Skip to content

Workspace

Defined in: workspace.svelte.ts:1285

Owns the workspace layout tree, leaf registry, and view-type routing.

Workspace coordinates default file navigation, sidebar placement, layout persistence, and the active editor/leaf state that plugins interact with.

  • EventDispatcher<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }>

new Workspace(app): Workspace

Defined in: workspace.svelte.ts:1951

App

Workspace

EventDispatcher.constructor

_activeLeaf: WorkspaceLeaf | null

Defined in: workspace.svelte.ts:1324


readonly app: App

Defined in: workspace.svelte.ts:1951


containerEl: HTMLElement

Defined in: workspace.svelte.ts:1344


readonly editorViews: EditorViewRegistry

Defined in: workspace.svelte.ts:1318


floating: WorkspaceFloating

Defined in: workspace.svelte.ts:1335


focusedHostId: string

Defined in: workspace.svelte.ts:1326


focusMode: WorkspaceFocusModeState | null

Defined in: workspace.svelte.ts:1325


layoutReady: boolean

Defined in: workspace.svelte.ts:1336


leftRibbon: WorkspaceRibbon

Defined in: workspace.svelte.ts:1342


leftSplit: WorkspaceSidedock

Defined in: workspace.svelte.ts:1327


rightRibbon: WorkspaceRibbon

Defined in: workspace.svelte.ts:1343


rightSplit: WorkspaceSidedock

Defined in: workspace.svelte.ts:1331


rootContainer: WorkspaceRoot

Defined in: workspace.svelte.ts:1322


rootSplit: WorkspaceView

Defined in: workspace.svelte.ts:1323


statusCompatEl: HTMLElement

Defined in: workspace.svelte.ts:1341


statusEl: HTMLElement

Defined in: workspace.svelte.ts:1340

get activeEditor(): MarkdownFileInfo | null

Defined in: workspace.svelte.ts:1826

MarkdownFileInfo | null


get activeLeaf(): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:1800

WorkspaceLeaf | null

set activeLeaf(leaf): void

Defined in: workspace.svelte.ts:1822

WorkspaceLeaf | null

void


get activeRootLeaf(): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:1811

WorkspaceLeaf | null

changeLayout(workspace): Promise<void>

Defined in: workspace.svelte.ts:2025

any

Promise<void>


clearFocusModeForLeaf(leaf): boolean

Defined in: workspace.svelte.ts:1860

WorkspaceLeaf

boolean


closeFloatingWindow(window, options?): void

Defined in: workspace.svelte.ts:2976

WorkspaceWindow

boolean

string

void


collapseFloatingWindow(window): void

Defined in: workspace.svelte.ts:2928

WorkspaceWindow

void


commitFloatingWindowBounds(window, bounds, operation?): void

Defined in: workspace.svelte.ts:2967

WorkspaceWindow

Partial<Record<"x" | "y" | "width" | "height", number>>

string = "resize-floating-pane"

void


convertSidebarGroupToLeaves(group): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:2642

WorkspaceSidebarGroup

WorkspaceLeaf[]


convertSidebarLeavesToGroup(side, leaves, options?): WorkspaceSidebarGroup

Defined in: workspace.svelte.ts:2598

SidebarSide

WorkspaceLeaf[]

SidebarGroupOptions & object = {}

WorkspaceSidebarGroup


createLeafBySplit(leaf, direction?, before?): WorkspaceLeaf

Defined in: workspace.svelte.ts:2466

WorkspaceLeaf

SplitDirection = "vertical"

boolean = false

WorkspaceLeaf


createLeafInParent(parent, index): WorkspaceLeaf

Defined in: workspace.svelte.ts:2460

WorkspaceSplit

number

WorkspaceLeaf


detachLeavesOfType(viewType): void

Defined in: workspace.svelte.ts:2444

Remove all leaves of the given type.

string

void


determineViewType(type): string | undefined

Defined in: workspace.svelte.ts:2312

string

string | undefined


determineViewTypeForPath(path): string | undefined

Defined in: workspace.svelte.ts:2322

string

string | undefined


dispatch<T>(eventName, …args): boolean

Defined in: events.ts:105

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

T

ArgumentMap<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }>[Extract<T, "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu">]

boolean

EventDispatcher.dispatch


dropWorkspaceItemOnTabs(parent, options): Promise<boolean>

Defined in: workspace.svelte.ts:1487

WorkspaceTabs | WorkspaceSplit<EventMap<T>>

TFile

WorkspaceLeaf

string

WorkspaceLayoutDropPosition

WorkspaceLayoutDropSource

Promise<boolean>


duplicateLeaf(leaf, leafType, direction?): Promise<WorkspaceLeaf>

Defined in: workspace.svelte.ts:3083

WorkspaceLeaf

boolean | PaneType

SplitDirection = "vertical"

Promise<WorkspaceLeaf>


emit<T>(eventName, …args): boolean

Defined in: events.ts:98

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

T

ArgumentMap<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }>[Extract<T, "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu">]

boolean

EventDispatcher.emit


endLayoutDrag(options): WorkspaceLayoutDropEvent

Defined in: workspace.svelte.ts:1414

Omit<WorkspaceLayoutDropEvent, "defaultPrevented" | "preventDefault">

WorkspaceLayoutDropEvent


ensureSideLeaf(type, sideOrOptions?, options?): WorkspaceLeaf

Defined in: workspace.svelte.ts:2693

string

SidebarSide | EnsureSideLeafOptions

EnsureSideLeafOptions = {}

WorkspaceLeaf


enterFocusMode(leaf?): boolean

Defined in: workspace.svelte.ts:1840

WorkspaceLeaf | null

boolean


exitFocusMode(): boolean

Defined in: workspace.svelte.ts:1856

boolean


focusFloatingWindow(window): void

Defined in: workspace.svelte.ts:2895

WorkspaceWindow

void


focusRootHost(): void

Defined in: workspace.svelte.ts:1796

void


getActiveFile(): TFile | null

Defined in: workspace.svelte.ts:2411

Returns the file for the current view if it’s a FileView. Otherwise, it will return the most recently active file.

TFile | null


getActiveViewOfType<T>(type): T | null

Defined in: workspace.svelte.ts:2388

Get the currently active view of a given type.

T extends View

Constructor<T>

T | null


getCommandHostDocument(hostId?): Document

Defined in: workspace.svelte.ts:1771

string = ...

Document


getCommandHostIdForLeaf(target): string

Defined in: workspace.svelte.ts:1758

WorkspaceLeaf | null

string


getCommandHostLeaf(hostId): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:1762

string

WorkspaceLeaf | null


getEditorAssociationForPath(path): { editorViewId: string; pattern: string; view?: RegisteredEditorViewContribution; } | undefined

Defined in: workspace.svelte.ts:2213

string

{ editorViewId: string; pattern: string; view?: RegisteredEditorViewContribution; } | undefined


getFocusedCommandHostId(): string

Defined in: workspace.svelte.ts:1784

string


getGroupLeaves(group): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:2501

string

WorkspaceLeaf[]


getLastOpenFiles(): string[]

Defined in: workspace.svelte.ts:2658

string[]


getLayout(): Record<string, unknown>

Defined in: workspace.svelte.ts:2039

Record<string, unknown>


getLeaf(newLeaf?, direction?): WorkspaceLeaf

Defined in: workspace.svelte.ts:3143

If newLeaf is false (or not set) then an existing leaf which can be navigated is returned, or a new leaf will be created if there was no leaf available.

If newLeaf is 'tab' or true then a new leaf will be created in the preferred location within the root split and returned.

If newLeaf is 'split' then a new leaf will be created adjacent to the currently active leaf.

If newLeaf is 'window' then a popout window will be created with a new leaf inside.

boolean | PaneType

SplitDirection

WorkspaceLeaf


getLeafById(id): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:2375

Retrieve a leaf by its id.

string

Id of the leaf to retrieve.

WorkspaceLeaf | null


getLeavesOfType(viewType): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:2450

string

WorkspaceLeaf[]


getLeftLeaf(split): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:3074

Create a new leaf inside the left sidebar.

boolean

Should the existing split be split up?

WorkspaceLeaf | null


getMostRecentLeaf(): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:1971

WorkspaceLeaf | null


getOrCreateSidebarGroup(side, group, options?): WorkspaceSidebarGroup

Defined in: workspace.svelte.ts:2569

SidebarSide

string

SidebarGroupOptions = {}

WorkspaceSidebarGroup


getRightLeaf(split): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:3059

Create a new leaf inside the right sidebar.

boolean

Should the existing split be split up?

WorkspaceLeaf | null


getSidebarGroup(side, group): WorkspaceSidebarGroup | null

Defined in: workspace.svelte.ts:2557

SidebarSide

string

WorkspaceSidebarGroup | null


getSidebarGroupLeaves(side, group): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:2594

SidebarSide

string

WorkspaceLeaf[]


getSidebarGroups(side?): WorkspaceSidebarGroup[]

Defined in: workspace.svelte.ts:2540

SidebarSide

WorkspaceSidebarGroup[]


getUnpinnedLeaf(): WorkspaceLeaf

Defined in: workspace.svelte.ts:2497

WorkspaceLeaf


getVisibleHintTargets(): WorkspaceHintTarget[]

Defined in: workspace.svelte.ts:1975

WorkspaceHintTarget[]


handleLinkContextMenu(menu, linktext, sourcePath, event?): void

Defined in: workspace.svelte.ts:2738

Menu

string

string

MouseEvent

void


isFocusModeForTabs(tabs): boolean

Defined in: workspace.svelte.ts:1868

WorkspaceTabs

boolean


iterateAllLeaves<T>(callback): void | T

Defined in: workspace.svelte.ts:2425

Iterate through all leaves, including main area leaves, floating leaves, and sidebar leaves.

T = any

(leaf) => T

void | T


iterateRootLeaves(callback): void

Defined in: workspace.svelte.ts:2401

Iterate through all leaves in the main area of the workspace.

(leaf) => any

void


loadLayout(file?): Promise<void>

Defined in: workspace.svelte.ts:1907

string = "workspace.json"

Promise<void>


maximizeFloatingWindow(window): void

Defined in: workspace.svelte.ts:2944

WorkspaceWindow

void


minimizeFloatingWindow(window): void

Defined in: workspace.svelte.ts:2936

WorkspaceWindow

void


moveLeafToPopout(leaf, data?): WorkspaceWindow

Defined in: workspace.svelte.ts:2751

WorkspaceLeaf

WorkspaceWindowInitData

WorkspaceWindow


moveLeafToSidebarGroup(leaf, group, options?): boolean

Defined in: workspace.svelte.ts:1677

WorkspaceLeaf

WorkspaceSidebarGroup

string

WorkspaceLayoutDropSource

boolean


moveLeafToSidebarGroupIndex(leaf, group, index, options): boolean

Defined in: workspace.svelte.ts:1626

WorkspaceLeaf

WorkspaceSidebarGroup

number

string

"bottom" | "top"

WorkspaceLayoutDropSource

boolean


moveWorkspaceChildToFloating(item, data?, options?): WorkspaceWindow

Defined in: workspace.svelte.ts:2790

WorkspaceTabsChild

WorkspaceWindowInitData

string

WorkspaceLayoutDropSource

WorkspaceWindow


moveWorkspaceChildToPopout(item, data?): WorkspaceWindow

Defined in: workspace.svelte.ts:2762

WorkspaceTabsChild

WorkspaceWindowInitData

WorkspaceWindow


moveWorkspaceChildToTabIndex(item, target, index, options): boolean

Defined in: workspace.svelte.ts:1423

WorkspaceLeaf | WorkspaceSidebarGroup

WorkspaceTabs

number

string

"right" | "left"

WorkspaceLayoutDropSource

boolean


off<T>(eventName, listener, context?, once?): void

Defined in: events.ts:78

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

T

(…args) => void

any

boolean

void

EventDispatcher.off


offref<T>(ref): void

Defined in: events.ts:87

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

EventRef<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }, T>

void

EventDispatcher.offref


on<T>(eventName, listener, context?): EventRef<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }, T, any>

Defined in: events.ts:48

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

T

(…args) => void

any

EventRef<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }, T, any>

EventDispatcher.on


once<T>(eventName, listener, context?): EventRef<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }, T, any>

Defined in: events.ts:63

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

T

(…args) => void

any

EventRef<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }, T, any>

EventDispatcher.once


onLayoutReady(callback): void

Defined in: workspace.svelte.ts:1943

Runs the callback function right away if layout is already ready, or push it to a queue to be called later when layout is ready.

() => any

void


openLinkText(linktext, sourcePath, newLeaf?, openState?): Promise<void>

Defined in: workspace.svelte.ts:2668

string

string

boolean | PaneType

OpenViewState

Promise<void>


openPopoutLeaf(data?): WorkspaceLeaf

Defined in: workspace.svelte.ts:2773

WorkspaceWindowInitData

WorkspaceLeaf


registerEditorView(contribution): () => void

Defined in: workspace.svelte.ts:2078

EditorViewContribution

() => void


registerExtensions(extensions, viewType): void

Defined in: workspace.svelte.ts:2263

string[]

string

void


registerHoverLinkSource(id, info): void

Defined in: workspace.svelte.ts:2099

Registers a view with the ‘Page preview’ core plugin as an emitter of the ‘hover-link’ event.

string

HoverLinkSource

void


registerSidebarView(type, options?): void

Defined in: workspace.svelte.ts:2082

string

SidebarViewPlacementOptions = {}

void


registerView(type, viewCreator): void

Defined in: workspace.svelte.ts:2074

string

ViewCreator

void


requestSaveLayout(event?): void

Defined in: workspace.svelte.ts:1358

WorkspaceLayoutChangeEvent = ...

void


restoreFloatingWindow(window): void

Defined in: workspace.svelte.ts:2952

WorkspaceWindow

void


revealLeaf(leaf): Promise<void>

Defined in: workspace.svelte.ts:2050

Bring a given leaf to the foreground. If the leaf is in a sidebar, the sidebar will be uncollapsed. await this function to ensure your view has been fully loaded and is not deferred.

WorkspaceLeaf

Promise<void>


setActiveLeaf(leaf, params?): void

Defined in: workspace.svelte.ts:2358

WorkspaceLeaf

boolean

void


setFloatingWindowBounds(window, bounds): void

Defined in: workspace.svelte.ts:2960

WorkspaceWindow

Partial<Record<"x" | "y" | "width" | "height", number>>

void


setFloatingWindowDisplayState(window, displayState, operation?): void

Defined in: workspace.svelte.ts:2914

WorkspaceWindow

WorkspaceWindowDisplayState

string = ...

void


splitActiveLeaf(direction?): WorkspaceLeaf

Defined in: workspace.svelte.ts:2493

SplitDirection

WorkspaceLeaf


startLayoutDrag(options): WorkspaceLayoutDropEvent

Defined in: workspace.svelte.ts:1405

Omit<WorkspaceLayoutDropEvent, "defaultPrevented" | "preventDefault">

WorkspaceLayoutDropEvent


supportsPopoutWindows(): boolean

Defined in: workspace.svelte.ts:2804

boolean


toJson(): WorkspaceJson

Defined in: workspace.svelte.ts:1872

WorkspaceJson


trigger<T>(eventName, …args): boolean

Defined in: events.ts:91

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

T

ArgumentMap<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }>[Extract<T, "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu">]

boolean

EventDispatcher.trigger


tryTrigger<T>(evt, …args): void

Defined in: events.ts:112

T extends "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu"

EventRef<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }, T>

ArgumentMap<{ active-leaf-change: [WorkspaceLeaf | null]; editor-menu: [Menu, Editor]; editor-updated: [Editor, readonly TransactionSpec[]]; file-change: [TFile, string]; file-menu: [Menu, TAbstractFile, string, WorkspaceLeaf]; file-open: [TFile | null]; files-menu: [Menu, TAbstractFile[], string, WorkspaceLeaf]; focus-mode-change: [WorkspaceFocusModeState | null]; layout-change: [WorkspaceLayoutChangeEvent]; layout-did-drop: [WorkspaceLayoutDropEvent]; layout-drag-end: [WorkspaceLayoutDropEvent]; layout-drag-start: [WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [WorkspaceLayoutDropEvent]; layout-will-show-overlay: [WorkspaceLayoutDropEvent]; quick-preview: [TFile, string]; resize: [any]; }>[Extract<T, "editor-updated" | "resize" | "active-leaf-change" | "focus-mode-change" | "layout-ready" | "layout-change" | "layout-drag-start" | "layout-drag-end" | "layout-will-show-overlay" | "layout-will-drop" | "layout-did-drop" | "quick-preview" | "file-open" | "file-change" | "file-menu" | "files-menu" | "editor-menu">]

void

EventDispatcher.tryTrigger


unregisterExtensions(extensions, viewType): void

Defined in: workspace.svelte.ts:2295

string[]

string

void


unregisterHoverLinkSource(id): void

Defined in: workspace.svelte.ts:2103

string

void


unregisterSidebarView(type): void

Defined in: workspace.svelte.ts:2089

string

void


unregisterView(type): boolean

Defined in: workspace.svelte.ts:2125

string

boolean


updateOptions(): void

Defined in: workspace.svelte.ts:2107

void


viewCreator(type): ViewCreator | undefined

Defined in: workspace.svelte.ts:2342

string | TFile

ViewCreator | undefined


willShowLayoutDropOverlay(options): WorkspaceLayoutDropEvent

Defined in: workspace.svelte.ts:1396

Omit<WorkspaceLayoutDropEvent, "defaultPrevented" | "preventDefault">

WorkspaceLayoutDropEvent