Skip to content

Workspace

API reference uses a reviewed source snapshot. Source links open the published source; unverified line locations are omitted.

Defined in: workspace.svelte.ts:2018

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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }>

new Workspace(app): Workspace

Defined in: workspace.svelte.ts:3030

App

Workspace

EventDispatcher.constructor

_activeLeaf: WorkspaceLeaf | null

Defined in: workspace.svelte.ts:2065


readonly app: App

Defined in: workspace.svelte.ts:3030


bottomPanel: WorkspaceBottomPanel

Defined in: workspace.svelte.ts:2080


containerEl: HTMLElement

Defined in: workspace.svelte.ts:2107


readonly diagnostics: DiagnosticsManager

Defined in: workspace.svelte.ts:2089


displayMode: WorkspaceDisplayMode

Defined in: workspace.svelte.ts:2064


readonly editorViews: EditorViewRegistry

Defined in: workspace.svelte.ts:2058


floating: WorkspaceFloating

Defined in: workspace.svelte.ts:2081


focusedHostId: string

Defined in: workspace.svelte.ts:2070


focusMode: WorkspaceFocusModeState | null

Defined in: workspace.svelte.ts:2069


layoutReady: boolean

Defined in: workspace.svelte.ts:2082


leftRibbon: WorkspaceRibbon

Defined in: workspace.svelte.ts:2105


leftSplit: WorkspaceSidedock

Defined in: workspace.svelte.ts:2071


rightRibbon: WorkspaceRibbon

Defined in: workspace.svelte.ts:2106


rightSplit: WorkspaceSidedock

Defined in: workspace.svelte.ts:2075


rootContainer: WorkspaceRoot

Defined in: workspace.svelte.ts:2062


rootSplit: WorkspaceView

Defined in: workspace.svelte.ts:2063


statusCompatEl: HTMLElement

Defined in: workspace.svelte.ts:2104


statusEl: HTMLElement

Defined in: workspace.svelte.ts:2103

get activeEditor(): MarkdownFileInfo | null

Defined in: workspace.svelte.ts:2667

MarkdownFileInfo | null


get activeLeaf(): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:2641

WorkspaceLeaf | null

set activeLeaf(leaf): void

Defined in: workspace.svelte.ts:2663

WorkspaceLeaf | null

void


get activeRootLeaf(): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:2652

WorkspaceLeaf | null


get bottomPanelAlignment(): WorkspaceBottomPanelAlignment

Defined in: workspace.svelte.ts:5329

Configured desktop span of the bottom panel.

WorkspaceBottomPanelAlignment


get isMobileMode(): boolean

Defined in: workspace.svelte.ts:2682

boolean

activateLeaf(leaf, options?): boolean

Defined in: workspace.svelte.ts:4537

WorkspaceLeaf | null

WorkspaceActivateLeafOptions = {}

boolean


changeLayout(workspace): Promise<void>

Defined in: workspace.svelte.ts:3814

any

Promise<void>


clearFocusModeForLeaf(leaf): boolean

Defined in: workspace.svelte.ts:2732

WorkspaceLeaf

boolean


closeFloatingWindow(window, options?): void

Defined in: workspace.svelte.ts:5179

WorkspaceWindow

boolean

string

void


closeLeafAndSelectFallback(leaf, options?): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:4587

WorkspaceLeaf

WorkspaceCloseLeafAndSelectFallbackOptions = {}

WorkspaceLeaf | null


collapseFloatingWindow(window): void

Defined in: workspace.svelte.ts:5131

WorkspaceWindow

void


commitFloatingWindowBounds(window, bounds, operation?): void

Defined in: workspace.svelte.ts:5170

WorkspaceWindow

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

string = "resize-floating-pane"

void


convertSidebarGroupToLeaves(group): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:4814

WorkspaceSidebarGroup

WorkspaceLeaf[]


convertSidebarLeavesToGroup(side, leaves, options?): WorkspaceSidebarGroup

Defined in: workspace.svelte.ts:4770

SidebarSide

WorkspaceLeaf[]

SidebarGroupOptions & object = {}

WorkspaceSidebarGroup


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

Defined in: workspace.svelte.ts:4635

WorkspaceLeaf

SplitDirection = "vertical"

boolean = false

WorkspaceLeaf


createLeafInParent(parent, index): WorkspaceLeaf

Defined in: workspace.svelte.ts:4629

WorkspaceSplit

number

WorkspaceLeaf


createOnDemandPluginInstallView(leaf, file, options?): Promise<OnDemandPluginInstallView | null>

Defined in: workspace.svelte.ts:4227

WorkspaceLeaf

TFile

boolean

Promise<OnDemandPluginInstallView | null>


detachLeavesOfType(viewType): void

Defined in: workspace.svelte.ts:4520

Remove all leaves of the given type.

string

void


determineViewType(type): string | undefined

Defined in: workspace.svelte.ts:4210

string

string | undefined


determineViewTypeForPath(path): string | undefined

Defined in: workspace.svelte.ts:4220

string

string | undefined


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

Defined in: events.ts:105

T extends "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }>[Extract<T, "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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


disposeWorkspaceHost(): Promise<void>

Defined in: workspace.svelte.ts:3312

Dispose the API-owned shell controller and its compatibility bridges.

Promise<void>


dropWorkspaceItemOnTabs(parent, options): Promise<boolean>

Defined in: workspace.svelte.ts:2318

WorkspaceTabs | WorkspaceSplit<EventMap<T>>

TFile

WorkspaceLeaf

string

WorkspaceLayoutDropPosition

WorkspaceLayoutDropSource

Promise<boolean>


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

Defined in: workspace.svelte.ts:5344

WorkspaceLeaf

boolean | PaneType

SplitDirection = "vertical"

Promise<WorkspaceLeaf>


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

Defined in: events.ts:98

T extends "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }>[Extract<T, "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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:2242

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

WorkspaceLayoutDropEvent


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

Defined in: workspace.svelte.ts:4879

string

SidebarSide | EnsureSideLeafOptions = "right"

EnsureSideLeafOptions = {}

WorkspaceLeaf


enterFocusMode(leaf?): boolean

Defined in: workspace.svelte.ts:2712

WorkspaceLeaf | null = ...

boolean


exitFocusMode(): boolean

Defined in: workspace.svelte.ts:2728

boolean


flushLayout(): Promise<void>

Defined in: workspace.svelte.ts:2137

Drain the single layout writer before a host closes, reloads or switches.

Promise<void>


flushPluginChanges(): Promise<void>

Defined in: workspace.svelte.ts:2132

Await admitted App Shell transitions before the owning host tears down.

Promise<void>


focusFloatingWindow(window): void

Defined in: workspace.svelte.ts:5098

WorkspaceWindow

void


focusRootHost(): void

Defined in: workspace.svelte.ts:2637

void


getActiveFile(): TFile | null

Defined in: workspace.svelte.ts:4380

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:4357

Get the currently active view of a given type.

T extends View

Constructor<T>

T | null


getBottomLeaf(): WorkspaceLeaf

Defined in: workspace.svelte.ts:5287

Create and activate a new leaf in the bottom panel.

WorkspaceLeaf


getCommandHostDocument(hostId?): Document

Defined in: workspace.svelte.ts:2612

string = ...

Document


getCommandHostIdForLeaf(target): string

Defined in: workspace.svelte.ts:2599

WorkspaceLeaf | null

string


getCommandHostLeaf(hostId): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:2603

string

WorkspaceLeaf | null


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

Defined in: workspace.svelte.ts:4041

string

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


getFileIconForPath(path): string | undefined

Defined in: workspace.svelte.ts:4092

Resolve presentation metadata without activating plugins or creating views.

string

string | undefined


getFocusedCommandHostId(): string

Defined in: workspace.svelte.ts:2625

string


getGroupLeaves(group): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:4673

string

WorkspaceLeaf[]


getLastOpenFiles(): string[]

Defined in: workspace.svelte.ts:4830

string[]


getLayout(): Record<string, unknown>

Defined in: workspace.svelte.ts:3828

Record<string, unknown>


getLeaf(newLeaf?, direction?): WorkspaceLeaf

Defined in: workspace.svelte.ts:5423

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:4344

Retrieve a leaf by its id.

string

Id of the leaf to retrieve.

WorkspaceLeaf | null


getLeavesOfType(viewType): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:4526

string

WorkspaceLeaf[]


getLeftLeaf(split): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:5277

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:3760

WorkspaceLeaf | null


getOpenLeafEntries(options?): WorkspaceOpenLeafEntry[]

Defined in: workspace.svelte.ts:4417

WorkspaceOpenLeafEntryOptions = {}

WorkspaceOpenLeafEntry[]


getOrCreateSidebarGroup(side, group, options?): WorkspaceSidebarGroup

Defined in: workspace.svelte.ts:4741

SidebarSide

string

SidebarGroupOptions = {}

WorkspaceSidebarGroup


getRecentFiles(): TFile[]

Defined in: workspace.svelte.ts:4841

TFile[]


getRightLeaf(split): WorkspaceLeaf | null

Defined in: workspace.svelte.ts:5262

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:4729

SidebarSide

string

WorkspaceSidebarGroup | null


getSidebarGroupLeaves(side, group): WorkspaceLeaf[]

Defined in: workspace.svelte.ts:4766

SidebarSide

string

WorkspaceLeaf[]


getSidebarGroups(side?): WorkspaceSidebarGroup[]

Defined in: workspace.svelte.ts:4712

SidebarSide

WorkspaceSidebarGroup[]


getUnpinnedLeaf(): WorkspaceLeaf

Defined in: workspace.svelte.ts:4669

WorkspaceLeaf


getVisibleHintTargets(): WorkspaceHintTarget[]

Defined in: workspace.svelte.ts:3764

WorkspaceHintTarget[]


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

Defined in: workspace.svelte.ts:4924

Menu

string

string

MouseEvent

void


isFocusModeForTabs(tabs): boolean

Defined in: workspace.svelte.ts:2740

WorkspaceTabs

boolean


iterateAllLeaves<T>(callback): void | T

Defined in: workspace.svelte.ts:4401

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:4370

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

(leaf) => any

void


listNamedLayouts(): Promise<string[]>

Defined in: workspace.svelte.ts:2894

Promise<string[]>


loadLayout(file?): Promise<void>

Defined in: workspace.svelte.ts:2817

string = "workspace.json"

Promise<void>


loadNamedLayout(name): Promise<void>

Defined in: workspace.svelte.ts:2912

string

Promise<void>


maximizeFloatingWindow(window): void

Defined in: workspace.svelte.ts:5147

WorkspaceWindow

void


minimizeFloatingWindow(window): void

Defined in: workspace.svelte.ts:5139

WorkspaceWindow

void


moveLeafToPopout(leaf, data?): WorkspaceWindow

Defined in: workspace.svelte.ts:4937

WorkspaceLeaf

WorkspaceWindowInitData

WorkspaceWindow


moveLeafToSidebarGroup(leaf, group, options?): boolean

Defined in: workspace.svelte.ts:2518

WorkspaceLeaf

WorkspaceSidebarGroup

string

WorkspaceLayoutDropSource

boolean


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

Defined in: workspace.svelte.ts:2467

WorkspaceLeaf

WorkspaceSidebarGroup

number

string

"bottom" | "top"

WorkspaceLayoutDropSource

boolean


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

Defined in: workspace.svelte.ts:4993

WorkspaceTabsChild

WorkspaceWindowInitData

string

WorkspaceLayoutDropSource

WorkspaceWindow


moveWorkspaceChildToPopout(item, data?): WorkspaceWindow

Defined in: workspace.svelte.ts:4948

WorkspaceTabsChild

WorkspaceWindowInitData

WorkspaceWindow


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

Defined in: workspace.svelte.ts:2251

WorkspaceLeaf | WorkspaceSidebarGroup

WorkspaceTabs

number

string

"right" | "left"

WorkspaceLayoutDropSource

boolean


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

Defined in: events.ts:78

T extends "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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 "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }, T>

void

EventDispatcher.offref


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

Defined in: events.ts:48

T extends "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }, T, any>

EventDispatcher.on


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

Defined in: events.ts:63

T extends "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }, T, any>

EventDispatcher.once


onFileIconsChanged(listener): () => void

Defined in: workspace.svelte.ts:4103

() => void

() => void


onLayoutReady(callback): void

Defined in: workspace.svelte.ts:3022

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


openFloatingLeaf(data?): WorkspaceLeaf

Defined in: workspace.svelte.ts:4976

WorkspaceWindowInitData

WorkspaceLeaf


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

Defined in: workspace.svelte.ts:4854

string

string

boolean | PaneType

OpenViewState

Promise<void>


openPopoutLeaf(data?): WorkspaceLeaf

Defined in: workspace.svelte.ts:4959

WorkspaceWindowInitData

WorkspaceLeaf


projectCompatibilityRibbonItem(item, side): () => void

Defined in: workspace.svelte.ts:2180

WorkspaceRibbonItem

"right" | "left"

() => void


reconcileFileReference(oldPath, file): void

Defined in: workspace.svelte.ts:4390

Reconcile the remembered file through its workspace owner.

string

TFile | null

void


registerDiagnosticOpener(opener): () => void

Defined in: workspace.svelte.ts:3160

Register an owned opener for application-specific diagnostic resources.

(location) => boolean | Promise<boolean>

() => void


registerEditorView(contribution): () => void

Defined in: workspace.svelte.ts:3883

EditorViewContribution

() => void


registerExtensions(extensions, viewType, options?): () => void

Defined in: workspace.svelte.ts:4116

string[]

string

ExtensionRegistrationOptions

() => void


registerHoverLinkSource(id, info): void

Defined in: workspace.svelte.ts:3913

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:3896

string

SidebarViewPlacementOptions = {}

void


registerView(type, viewCreator): void

Defined in: workspace.svelte.ts:3877

string

ViewCreator

void


requestSaveLayout(event?): void

Defined in: workspace.svelte.ts:2144

WorkspaceLayoutChangeEvent = ...

void


resetLayoutToDefault(): Promise<void>

Defined in: workspace.svelte.ts:2928

Promise<void>


restoreFloatingWindow(window): void

Defined in: workspace.svelte.ts:5155

WorkspaceWindow

void


revealLeaf(leaf): Promise<void>

Defined in: workspace.svelte.ts:3839

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>


saveNamedLayout(name): Promise<void>

Defined in: workspace.svelte.ts:2901

string

Promise<void>


setActiveLeaf(leaf, params?): void

Defined in: workspace.svelte.ts:4327

WorkspaceLeaf

boolean

void


setBottomPanelAlignment(alignment): boolean

Defined in: workspace.svelte.ts:5336

Update the live design-core shell setting without writing workspace JSON.

WorkspaceBottomPanelAlignment

boolean


setBottomPanelOpen(open): void

Defined in: workspace.svelte.ts:5302

Open or close the bottom panel without changing its last size.

boolean

void


setBottomPanelSize(size): void

Defined in: workspace.svelte.ts:5312

Resize the bottom panel using design-core’s supported range.

number

void


setDisplayMode(mode, reason?): void

Defined in: workspace.svelte.ts:2687

WorkspaceDisplayMode

WorkspaceDisplayModeReason = "manual"

void


setFloatingWindowBounds(window, bounds): void

Defined in: workspace.svelte.ts:5163

WorkspaceWindow

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

void


setFloatingWindowDisplayState(window, displayState, operation?): void

Defined in: workspace.svelte.ts:5117

WorkspaceWindow

WorkspaceWindowDisplayState

string = ...

void


splitActiveLeaf(direction?): WorkspaceLeaf

Defined in: workspace.svelte.ts:4665

SplitDirection

WorkspaceLeaf


startLayoutDrag(options): WorkspaceLayoutDropEvent

Defined in: workspace.svelte.ts:2233

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

WorkspaceLayoutDropEvent


supportsPopoutWindows(): boolean

Defined in: workspace.svelte.ts:5007

boolean


toggleBottomPanel(): void

Defined in: workspace.svelte.ts:5324

Toggle the bottom panel while retaining its last expanded size.

void


toJson(): WorkspaceJson

Defined in: workspace.svelte.ts:2744

WorkspaceJson


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

Defined in: events.ts:91

T extends "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }>[Extract<T, "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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 "resize" | "editor-updated" | "active-leaf-change" | "display-mode-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: [leaf?: WorkspaceLeaf | null]; display-mode-change: [event: WorkspaceDisplayModeChangeEvent]; editor-menu: [menu: Menu, editor: Editor]; editor-updated: [editor: Editor, transactions: readonly TransactionSpec[]]; file-change: [file: TFile, event: string]; file-menu: [menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf]; file-open: [file: TFile | null]; files-menu: [menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf]; focus-mode-change: [state: WorkspaceFocusModeState | null]; layout-change: [event: WorkspaceLayoutChangeEvent]; layout-did-drop: [event: WorkspaceLayoutDropEvent]; layout-drag-end: [event: WorkspaceLayoutDropEvent]; layout-drag-start: [event: WorkspaceLayoutDropEvent]; layout-ready: []; layout-will-drop: [event: WorkspaceLayoutDropEvent]; layout-will-show-overlay: [event: WorkspaceLayoutDropEvent]; quick-preview: [file: TFile, string]; resize: [any]; }, T>

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

string[]

string

void


unregisterHoverLinkSource(id): void

Defined in: workspace.svelte.ts:3917

string

void


unregisterSidebarView(type): void

Defined in: workspace.svelte.ts:3903

string

void


unregisterView(type): boolean

Defined in: workspace.svelte.ts:3939

string

boolean


updateOptions(): void

Defined in: workspace.svelte.ts:3921

void


viewCreator(type): ViewCreator | undefined

Defined in: workspace.svelte.ts:4311

string | TFile

ViewCreator | undefined


willShowLayoutDropOverlay(options): WorkspaceLayoutDropEvent

Defined in: workspace.svelte.ts:2224

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

WorkspaceLayoutDropEvent