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.
Extends
Section titled “Extends”EventDispatcher<{active-leaf-change: [leaf?:WorkspaceLeaf|null];display-mode-change: [event:WorkspaceDisplayModeChangeEvent];editor-menu: [menu:Menu,editor:Editor];editor-updated: [editor:Editor,transactions: readonlyTransactionSpec[]];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]; }>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Workspace(
app):Workspace
Defined in: workspace.svelte.ts:3030
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Workspace
Overrides
Section titled “Overrides”Properties
Section titled “Properties”_activeLeaf
Section titled “_activeLeaf”_activeLeaf:
WorkspaceLeaf|null
Defined in: workspace.svelte.ts:2065
readonlyapp:App
Defined in: workspace.svelte.ts:3030
bottomPanel
Section titled “bottomPanel”bottomPanel:
WorkspaceBottomPanel
Defined in: workspace.svelte.ts:2080
containerEl
Section titled “containerEl”containerEl:
HTMLElement
Defined in: workspace.svelte.ts:2107
diagnostics
Section titled “diagnostics”
readonlydiagnostics:DiagnosticsManager
Defined in: workspace.svelte.ts:2089
displayMode
Section titled “displayMode”displayMode:
WorkspaceDisplayMode
Defined in: workspace.svelte.ts:2064
editorViews
Section titled “editorViews”
readonlyeditorViews:EditorViewRegistry
Defined in: workspace.svelte.ts:2058
floating
Section titled “floating”floating:
WorkspaceFloating
Defined in: workspace.svelte.ts:2081
focusedHostId
Section titled “focusedHostId”focusedHostId:
string
Defined in: workspace.svelte.ts:2070
focusMode
Section titled “focusMode”focusMode:
WorkspaceFocusModeState|null
Defined in: workspace.svelte.ts:2069
layoutReady
Section titled “layoutReady”layoutReady:
boolean
Defined in: workspace.svelte.ts:2082
leftRibbon
Section titled “leftRibbon”leftRibbon:
WorkspaceRibbon
Defined in: workspace.svelte.ts:2105
leftSplit
Section titled “leftSplit”leftSplit:
WorkspaceSidedock
Defined in: workspace.svelte.ts:2071
rightRibbon
Section titled “rightRibbon”rightRibbon:
WorkspaceRibbon
Defined in: workspace.svelte.ts:2106
rightSplit
Section titled “rightSplit”rightSplit:
WorkspaceSidedock
Defined in: workspace.svelte.ts:2075
rootContainer
Section titled “rootContainer”rootContainer:
WorkspaceRoot
Defined in: workspace.svelte.ts:2062
rootSplit
Section titled “rootSplit”rootSplit:
WorkspaceView
Defined in: workspace.svelte.ts:2063
statusCompatEl
Section titled “statusCompatEl”statusCompatEl:
HTMLElement
Defined in: workspace.svelte.ts:2104
statusEl
Section titled “statusEl”statusEl:
HTMLElement
Defined in: workspace.svelte.ts:2103
Accessors
Section titled “Accessors”activeEditor
Section titled “activeEditor”Get Signature
Section titled “Get Signature”get activeEditor():
MarkdownFileInfo|null
Defined in: workspace.svelte.ts:2667
Returns
Section titled “Returns”MarkdownFileInfo | null
activeLeaf
Section titled “activeLeaf”Get Signature
Section titled “Get Signature”get activeLeaf():
WorkspaceLeaf|null
Defined in: workspace.svelte.ts:2641
Returns
Section titled “Returns”WorkspaceLeaf | null
Set Signature
Section titled “Set Signature”set activeLeaf(
leaf):void
Defined in: workspace.svelte.ts:2663
Parameters
Section titled “Parameters”WorkspaceLeaf | null
Returns
Section titled “Returns”void
activeRootLeaf
Section titled “activeRootLeaf”Get Signature
Section titled “Get Signature”get activeRootLeaf():
WorkspaceLeaf|null
Defined in: workspace.svelte.ts:2652
Returns
Section titled “Returns”WorkspaceLeaf | null
bottomPanelAlignment
Section titled “bottomPanelAlignment”Get Signature
Section titled “Get Signature”get bottomPanelAlignment():
WorkspaceBottomPanelAlignment
Defined in: workspace.svelte.ts:5329
Configured desktop span of the bottom panel.
Returns
Section titled “Returns”WorkspaceBottomPanelAlignment
isMobileMode
Section titled “isMobileMode”Get Signature
Section titled “Get Signature”get isMobileMode():
boolean
Defined in: workspace.svelte.ts:2682
Returns
Section titled “Returns”boolean
Methods
Section titled “Methods”activateLeaf()
Section titled “activateLeaf()”activateLeaf(
leaf,options?):boolean
Defined in: workspace.svelte.ts:4537
Parameters
Section titled “Parameters”WorkspaceLeaf | null
options?
Section titled “options?”WorkspaceActivateLeafOptions = {}
Returns
Section titled “Returns”boolean
changeLayout()
Section titled “changeLayout()”changeLayout(
workspace):Promise<void>
Defined in: workspace.svelte.ts:3814
Parameters
Section titled “Parameters”workspace
Section titled “workspace”any
Returns
Section titled “Returns”Promise<void>
clearFocusModeForLeaf()
Section titled “clearFocusModeForLeaf()”clearFocusModeForLeaf(
leaf):boolean
Defined in: workspace.svelte.ts:2732
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
closeFloatingWindow()
Section titled “closeFloatingWindow()”closeFloatingWindow(
window,options?):void
Defined in: workspace.svelte.ts:5179
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
options?
Section titled “options?”closeHost?
Section titled “closeHost?”boolean
operation?
Section titled “operation?”string
Returns
Section titled “Returns”void
closeLeafAndSelectFallback()
Section titled “closeLeafAndSelectFallback()”closeLeafAndSelectFallback(
leaf,options?):WorkspaceLeaf|null
Defined in: workspace.svelte.ts:4587
Parameters
Section titled “Parameters”options?
Section titled “options?”WorkspaceCloseLeafAndSelectFallbackOptions = {}
Returns
Section titled “Returns”WorkspaceLeaf | null
collapseFloatingWindow()
Section titled “collapseFloatingWindow()”collapseFloatingWindow(
window):void
Defined in: workspace.svelte.ts:5131
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
Returns
Section titled “Returns”void
commitFloatingWindowBounds()
Section titled “commitFloatingWindowBounds()”commitFloatingWindowBounds(
window,bounds,operation?):void
Defined in: workspace.svelte.ts:5170
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
bounds
Section titled “bounds”Partial<Record<"x" | "y" | "width" | "height", number>>
operation?
Section titled “operation?”string = "resize-floating-pane"
Returns
Section titled “Returns”void
convertSidebarGroupToLeaves()
Section titled “convertSidebarGroupToLeaves()”convertSidebarGroupToLeaves(
group):WorkspaceLeaf[]
Defined in: workspace.svelte.ts:4814
Parameters
Section titled “Parameters”Returns
Section titled “Returns”convertSidebarLeavesToGroup()
Section titled “convertSidebarLeavesToGroup()”convertSidebarLeavesToGroup(
side,leaves,options?):WorkspaceSidebarGroup
Defined in: workspace.svelte.ts:4770
Parameters
Section titled “Parameters”SidebarSide
leaves
Section titled “leaves”options?
Section titled “options?”SidebarGroupOptions & object = {}
Returns
Section titled “Returns”createLeafBySplit()
Section titled “createLeafBySplit()”createLeafBySplit(
leaf,direction?,before?):WorkspaceLeaf
Defined in: workspace.svelte.ts:4635
Parameters
Section titled “Parameters”direction?
Section titled “direction?”SplitDirection = "vertical"
before?
Section titled “before?”boolean = false
Returns
Section titled “Returns”createLeafInParent()
Section titled “createLeafInParent()”createLeafInParent(
parent,index):WorkspaceLeaf
Defined in: workspace.svelte.ts:4629
Parameters
Section titled “Parameters”parent
Section titled “parent”number
Returns
Section titled “Returns”createOnDemandPluginInstallView()
Section titled “createOnDemandPluginInstallView()”createOnDemandPluginInstallView(
leaf,file,options?):Promise<OnDemandPluginInstallView|null>
Defined in: workspace.svelte.ts:4227
Parameters
Section titled “Parameters”options?
Section titled “options?”confirm?
Section titled “confirm?”boolean
Returns
Section titled “Returns”Promise<OnDemandPluginInstallView | null>
detachLeavesOfType()
Section titled “detachLeavesOfType()”detachLeavesOfType(
viewType):void
Defined in: workspace.svelte.ts:4520
Remove all leaves of the given type.
Parameters
Section titled “Parameters”viewType
Section titled “viewType”string
Returns
Section titled “Returns”void
determineViewType()
Section titled “determineViewType()”determineViewType(
type):string|undefined
Defined in: workspace.svelte.ts:4210
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | undefined
determineViewTypeForPath()
Section titled “determineViewTypeForPath()”determineViewTypeForPath(
path):string|undefined
Defined in: workspace.svelte.ts:4220
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | undefined
dispatch()
Section titled “dispatch()”dispatch<
T>(eventName, …args):boolean
Defined in: events.ts:105
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”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">]
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”disposeWorkspaceHost()
Section titled “disposeWorkspaceHost()”disposeWorkspaceHost():
Promise<void>
Defined in: workspace.svelte.ts:3312
Dispose the API-owned shell controller and its compatibility bridges.
Returns
Section titled “Returns”Promise<void>
dropWorkspaceItemOnTabs()
Section titled “dropWorkspaceItemOnTabs()”dropWorkspaceItemOnTabs(
parent,options):Promise<boolean>
Defined in: workspace.svelte.ts:2318
Parameters
Section titled “Parameters”parent
Section titled “parent”WorkspaceTabs | WorkspaceSplit<EventMap<T>>
options
Section titled “options”operation?
Section titled “operation?”string
position
Section titled “position”WorkspaceLayoutDropPosition
source?
Section titled “source?”WorkspaceLayoutDropSource
Returns
Section titled “Returns”Promise<boolean>
duplicateLeaf()
Section titled “duplicateLeaf()”duplicateLeaf(
leaf,leafType,direction?):Promise<WorkspaceLeaf>
Defined in: workspace.svelte.ts:5344
Parameters
Section titled “Parameters”leafType
Section titled “leafType”boolean | PaneType
direction?
Section titled “direction?”SplitDirection = "vertical"
Returns
Section titled “Returns”Promise<WorkspaceLeaf>
emit()
Section titled “emit()”emit<
T>(eventName, …args):boolean
Defined in: events.ts:98
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”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">]
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”endLayoutDrag()
Section titled “endLayoutDrag()”endLayoutDrag(
options):WorkspaceLayoutDropEvent
Defined in: workspace.svelte.ts:2242
Parameters
Section titled “Parameters”options
Section titled “options”Omit<WorkspaceLayoutDropEvent, "defaultPrevented" | "preventDefault">
Returns
Section titled “Returns”WorkspaceLayoutDropEvent
ensureSideLeaf()
Section titled “ensureSideLeaf()”ensureSideLeaf(
type,sideOrOptions?,options?):WorkspaceLeaf
Defined in: workspace.svelte.ts:4879
Parameters
Section titled “Parameters”string
sideOrOptions?
Section titled “sideOrOptions?”SidebarSide | EnsureSideLeafOptions = "right"
options?
Section titled “options?”EnsureSideLeafOptions = {}
Returns
Section titled “Returns”enterFocusMode()
Section titled “enterFocusMode()”enterFocusMode(
leaf?):boolean
Defined in: workspace.svelte.ts:2712
Parameters
Section titled “Parameters”WorkspaceLeaf | null = ...
Returns
Section titled “Returns”boolean
exitFocusMode()
Section titled “exitFocusMode()”exitFocusMode():
boolean
Defined in: workspace.svelte.ts:2728
Returns
Section titled “Returns”boolean
flushLayout()
Section titled “flushLayout()”flushLayout():
Promise<void>
Defined in: workspace.svelte.ts:2137
Drain the single layout writer before a host closes, reloads or switches.
Returns
Section titled “Returns”Promise<void>
flushPluginChanges()
Section titled “flushPluginChanges()”flushPluginChanges():
Promise<void>
Defined in: workspace.svelte.ts:2132
Await admitted App Shell transitions before the owning host tears down.
Returns
Section titled “Returns”Promise<void>
focusFloatingWindow()
Section titled “focusFloatingWindow()”focusFloatingWindow(
window):void
Defined in: workspace.svelte.ts:5098
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
Returns
Section titled “Returns”void
focusRootHost()
Section titled “focusRootHost()”focusRootHost():
void
Defined in: workspace.svelte.ts:2637
Returns
Section titled “Returns”void
getActiveFile()
Section titled “getActiveFile()”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.
Returns
Section titled “Returns”TFile | null
getActiveViewOfType()
Section titled “getActiveViewOfType()”getActiveViewOfType<
T>(type):T|null
Defined in: workspace.svelte.ts:4357
Get the currently active view of a given type.
Type Parameters
Section titled “Type Parameters”T extends View
Parameters
Section titled “Parameters”Constructor<T>
Returns
Section titled “Returns”T | null
getBottomLeaf()
Section titled “getBottomLeaf()”getBottomLeaf():
WorkspaceLeaf
Defined in: workspace.svelte.ts:5287
Create and activate a new leaf in the bottom panel.
Returns
Section titled “Returns”getCommandHostDocument()
Section titled “getCommandHostDocument()”getCommandHostDocument(
hostId?):Document
Defined in: workspace.svelte.ts:2612
Parameters
Section titled “Parameters”hostId?
Section titled “hostId?”string = ...
Returns
Section titled “Returns”Document
getCommandHostIdForLeaf()
Section titled “getCommandHostIdForLeaf()”getCommandHostIdForLeaf(
target):string
Defined in: workspace.svelte.ts:2599
Parameters
Section titled “Parameters”target
Section titled “target”WorkspaceLeaf | null
Returns
Section titled “Returns”string
getCommandHostLeaf()
Section titled “getCommandHostLeaf()”getCommandHostLeaf(
hostId):WorkspaceLeaf|null
Defined in: workspace.svelte.ts:2603
Parameters
Section titled “Parameters”hostId
Section titled “hostId”string
Returns
Section titled “Returns”WorkspaceLeaf | null
getEditorAssociationForPath()
Section titled “getEditorAssociationForPath()”getEditorAssociationForPath(
path): {editorViewId:string;pattern:string;view?:RegisteredEditorViewContribution; } |undefined
Defined in: workspace.svelte.ts:4041
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”{ editorViewId: string; pattern: string; view?: RegisteredEditorViewContribution; } | undefined
getFileIconForPath()
Section titled “getFileIconForPath()”getFileIconForPath(
path):string|undefined
Defined in: workspace.svelte.ts:4092
Resolve presentation metadata without activating plugins or creating views.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | undefined
getFocusedCommandHostId()
Section titled “getFocusedCommandHostId()”getFocusedCommandHostId():
string
Defined in: workspace.svelte.ts:2625
Returns
Section titled “Returns”string
getGroupLeaves()
Section titled “getGroupLeaves()”getGroupLeaves(
group):WorkspaceLeaf[]
Defined in: workspace.svelte.ts:4673
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”getLastOpenFiles()
Section titled “getLastOpenFiles()”getLastOpenFiles():
string[]
Defined in: workspace.svelte.ts:4830
Returns
Section titled “Returns”string[]
getLayout()
Section titled “getLayout()”getLayout():
Record<string,unknown>
Defined in: workspace.svelte.ts:3828
Returns
Section titled “Returns”Record<string, unknown>
getLeaf()
Section titled “getLeaf()”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.
Parameters
Section titled “Parameters”newLeaf?
Section titled “newLeaf?”boolean | PaneType
direction?
Section titled “direction?”SplitDirection
Returns
Section titled “Returns”getLeafById()
Section titled “getLeafById()”getLeafById(
id):WorkspaceLeaf|null
Defined in: workspace.svelte.ts:4344
Retrieve a leaf by its id.
Parameters
Section titled “Parameters”string
Id of the leaf to retrieve.
Returns
Section titled “Returns”WorkspaceLeaf | null
getLeavesOfType()
Section titled “getLeavesOfType()”getLeavesOfType(
viewType):WorkspaceLeaf[]
Defined in: workspace.svelte.ts:4526
Parameters
Section titled “Parameters”viewType
Section titled “viewType”string
Returns
Section titled “Returns”getLeftLeaf()
Section titled “getLeftLeaf()”getLeftLeaf(
split):WorkspaceLeaf|null
Defined in: workspace.svelte.ts:5277
Create a new leaf inside the left sidebar.
Parameters
Section titled “Parameters”boolean
Should the existing split be split up?
Returns
Section titled “Returns”WorkspaceLeaf | null
getMostRecentLeaf()
Section titled “getMostRecentLeaf()”getMostRecentLeaf():
WorkspaceLeaf|null
Defined in: workspace.svelte.ts:3760
Returns
Section titled “Returns”WorkspaceLeaf | null
getOpenLeafEntries()
Section titled “getOpenLeafEntries()”getOpenLeafEntries(
options?):WorkspaceOpenLeafEntry[]
Defined in: workspace.svelte.ts:4417
Parameters
Section titled “Parameters”options?
Section titled “options?”WorkspaceOpenLeafEntryOptions = {}
Returns
Section titled “Returns”WorkspaceOpenLeafEntry[]
getOrCreateSidebarGroup()
Section titled “getOrCreateSidebarGroup()”getOrCreateSidebarGroup(
side,group,options?):WorkspaceSidebarGroup
Defined in: workspace.svelte.ts:4741
Parameters
Section titled “Parameters”SidebarSide
string
options?
Section titled “options?”SidebarGroupOptions = {}
Returns
Section titled “Returns”getRecentFiles()
Section titled “getRecentFiles()”getRecentFiles():
TFile[]
Defined in: workspace.svelte.ts:4841
Returns
Section titled “Returns”TFile[]
getRightLeaf()
Section titled “getRightLeaf()”getRightLeaf(
split):WorkspaceLeaf|null
Defined in: workspace.svelte.ts:5262
Create a new leaf inside the right sidebar.
Parameters
Section titled “Parameters”boolean
Should the existing split be split up?
Returns
Section titled “Returns”WorkspaceLeaf | null
getSidebarGroup()
Section titled “getSidebarGroup()”getSidebarGroup(
side,group):WorkspaceSidebarGroup|null
Defined in: workspace.svelte.ts:4729
Parameters
Section titled “Parameters”SidebarSide
string
Returns
Section titled “Returns”WorkspaceSidebarGroup | null
getSidebarGroupLeaves()
Section titled “getSidebarGroupLeaves()”getSidebarGroupLeaves(
side,group):WorkspaceLeaf[]
Defined in: workspace.svelte.ts:4766
Parameters
Section titled “Parameters”SidebarSide
string
Returns
Section titled “Returns”getSidebarGroups()
Section titled “getSidebarGroups()”getSidebarGroups(
side?):WorkspaceSidebarGroup[]
Defined in: workspace.svelte.ts:4712
Parameters
Section titled “Parameters”SidebarSide
Returns
Section titled “Returns”getUnpinnedLeaf()
Section titled “getUnpinnedLeaf()”getUnpinnedLeaf():
WorkspaceLeaf
Defined in: workspace.svelte.ts:4669
Returns
Section titled “Returns”getVisibleHintTargets()
Section titled “getVisibleHintTargets()”getVisibleHintTargets():
WorkspaceHintTarget[]
Defined in: workspace.svelte.ts:3764
Returns
Section titled “Returns”handleLinkContextMenu()
Section titled “handleLinkContextMenu()”handleLinkContextMenu(
menu,linktext,sourcePath,event?):void
Defined in: workspace.svelte.ts:4924
Parameters
Section titled “Parameters”linktext
Section titled “linktext”string
sourcePath
Section titled “sourcePath”string
event?
Section titled “event?”MouseEvent
Returns
Section titled “Returns”void
isFocusModeForTabs()
Section titled “isFocusModeForTabs()”isFocusModeForTabs(
tabs):boolean
Defined in: workspace.svelte.ts:2740
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
iterateAllLeaves()
Section titled “iterateAllLeaves()”iterateAllLeaves<
T>(callback):void|T
Defined in: workspace.svelte.ts:4401
Iterate through all leaves, including main area leaves, floating leaves, and sidebar leaves.
Type Parameters
Section titled “Type Parameters”T = any
Parameters
Section titled “Parameters”callback
Section titled “callback”(leaf) => T
Returns
Section titled “Returns”void | T
iterateRootLeaves()
Section titled “iterateRootLeaves()”iterateRootLeaves(
callback):void
Defined in: workspace.svelte.ts:4370
Iterate through all leaves in the main area of the workspace.
Parameters
Section titled “Parameters”callback
Section titled “callback”(leaf) => any
Returns
Section titled “Returns”void
listNamedLayouts()
Section titled “listNamedLayouts()”listNamedLayouts():
Promise<string[]>
Defined in: workspace.svelte.ts:2894
Returns
Section titled “Returns”Promise<string[]>
loadLayout()
Section titled “loadLayout()”loadLayout(
file?):Promise<void>
Defined in: workspace.svelte.ts:2817
Parameters
Section titled “Parameters”string = "workspace.json"
Returns
Section titled “Returns”Promise<void>
loadNamedLayout()
Section titled “loadNamedLayout()”loadNamedLayout(
name):Promise<void>
Defined in: workspace.svelte.ts:2912
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
maximizeFloatingWindow()
Section titled “maximizeFloatingWindow()”maximizeFloatingWindow(
window):void
Defined in: workspace.svelte.ts:5147
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
Returns
Section titled “Returns”void
minimizeFloatingWindow()
Section titled “minimizeFloatingWindow()”minimizeFloatingWindow(
window):void
Defined in: workspace.svelte.ts:5139
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
Returns
Section titled “Returns”void
moveLeafToPopout()
Section titled “moveLeafToPopout()”moveLeafToPopout(
leaf,data?):WorkspaceWindow
Defined in: workspace.svelte.ts:4937
Parameters
Section titled “Parameters”WorkspaceWindowInitData
Returns
Section titled “Returns”WorkspaceWindow
moveLeafToSidebarGroup()
Section titled “moveLeafToSidebarGroup()”moveLeafToSidebarGroup(
leaf,group,options?):boolean
Defined in: workspace.svelte.ts:2518
Parameters
Section titled “Parameters”options?
Section titled “options?”operation?
Section titled “operation?”string
source?
Section titled “source?”WorkspaceLayoutDropSource
Returns
Section titled “Returns”boolean
moveLeafToSidebarGroupIndex()
Section titled “moveLeafToSidebarGroupIndex()”moveLeafToSidebarGroupIndex(
leaf,group,index,options):boolean
Defined in: workspace.svelte.ts:2467
Parameters
Section titled “Parameters”number
options
Section titled “options”operation?
Section titled “operation?”string
position
Section titled “position”"bottom" | "top"
source?
Section titled “source?”WorkspaceLayoutDropSource
Returns
Section titled “Returns”boolean
moveWorkspaceChildToFloating()
Section titled “moveWorkspaceChildToFloating()”moveWorkspaceChildToFloating(
item,data?,options?):WorkspaceWindow
Defined in: workspace.svelte.ts:4993
Parameters
Section titled “Parameters”WorkspaceTabsChild
WorkspaceWindowInitData
options?
Section titled “options?”operation?
Section titled “operation?”string
source?
Section titled “source?”WorkspaceLayoutDropSource
Returns
Section titled “Returns”WorkspaceWindow
moveWorkspaceChildToPopout()
Section titled “moveWorkspaceChildToPopout()”moveWorkspaceChildToPopout(
item,data?):WorkspaceWindow
Defined in: workspace.svelte.ts:4948
Parameters
Section titled “Parameters”WorkspaceTabsChild
WorkspaceWindowInitData
Returns
Section titled “Returns”WorkspaceWindow
moveWorkspaceChildToTabIndex()
Section titled “moveWorkspaceChildToTabIndex()”moveWorkspaceChildToTabIndex(
item,target,index,options):boolean
Defined in: workspace.svelte.ts:2251
Parameters
Section titled “Parameters”WorkspaceLeaf | WorkspaceSidebarGroup
target
Section titled “target”number
options
Section titled “options”operation?
Section titled “operation?”string
position
Section titled “position”"right" | "left"
source?
Section titled “source?”WorkspaceLayoutDropSource
Returns
Section titled “Returns”boolean
off<
T>(eventName,listener,context?,once?):void
Defined in: events.ts:78
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”T
listener
Section titled “listener”(…args) => void
context?
Section titled “context?”any
boolean
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”offref()
Section titled “offref()”offref<
T>(ref):void
Defined in: events.ts:87
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”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>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”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: readonlyTransactionSpec[]];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
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”T
listener
Section titled “listener”(…args) => void
context?
Section titled “context?”any
Returns
Section titled “Returns”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>
Inherited from
Section titled “Inherited from”once()
Section titled “once()”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: readonlyTransactionSpec[]];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
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”T
listener
Section titled “listener”(…args) => void
context?
Section titled “context?”any
Returns
Section titled “Returns”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>
Inherited from
Section titled “Inherited from”onFileIconsChanged()
Section titled “onFileIconsChanged()”onFileIconsChanged(
listener): () =>void
Defined in: workspace.svelte.ts:4103
Parameters
Section titled “Parameters”listener
Section titled “listener”() => void
Returns
Section titled “Returns”() => void
onLayoutReady()
Section titled “onLayoutReady()”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.
Parameters
Section titled “Parameters”callback
Section titled “callback”() => any
Returns
Section titled “Returns”void
openFloatingLeaf()
Section titled “openFloatingLeaf()”openFloatingLeaf(
data?):WorkspaceLeaf
Defined in: workspace.svelte.ts:4976
Parameters
Section titled “Parameters”WorkspaceWindowInitData
Returns
Section titled “Returns”openLinkText()
Section titled “openLinkText()”openLinkText(
linktext,sourcePath,newLeaf?,openState?):Promise<void>
Defined in: workspace.svelte.ts:4854
Parameters
Section titled “Parameters”linktext
Section titled “linktext”string
sourcePath
Section titled “sourcePath”string
newLeaf?
Section titled “newLeaf?”boolean | PaneType
openState?
Section titled “openState?”Returns
Section titled “Returns”Promise<void>
openPopoutLeaf()
Section titled “openPopoutLeaf()”openPopoutLeaf(
data?):WorkspaceLeaf
Defined in: workspace.svelte.ts:4959
Parameters
Section titled “Parameters”WorkspaceWindowInitData
Returns
Section titled “Returns”projectCompatibilityRibbonItem()
Section titled “projectCompatibilityRibbonItem()”projectCompatibilityRibbonItem(
item,side): () =>void
Defined in: workspace.svelte.ts:2180
Parameters
Section titled “Parameters”WorkspaceRibbonItem
"right" | "left"
Returns
Section titled “Returns”() => void
reconcileFileReference()
Section titled “reconcileFileReference()”reconcileFileReference(
oldPath,file):void
Defined in: workspace.svelte.ts:4390
Reconcile the remembered file through its workspace owner.
Parameters
Section titled “Parameters”oldPath
Section titled “oldPath”string
TFile | null
Returns
Section titled “Returns”void
registerDiagnosticOpener()
Section titled “registerDiagnosticOpener()”registerDiagnosticOpener(
opener): () =>void
Defined in: workspace.svelte.ts:3160
Register an owned opener for application-specific diagnostic resources.
Parameters
Section titled “Parameters”opener
Section titled “opener”(location) => boolean | Promise<boolean>
Returns
Section titled “Returns”() => void
registerEditorView()
Section titled “registerEditorView()”registerEditorView(
contribution): () =>void
Defined in: workspace.svelte.ts:3883
Parameters
Section titled “Parameters”contribution
Section titled “contribution”EditorViewContribution
Returns
Section titled “Returns”() => void
registerExtensions()
Section titled “registerExtensions()”registerExtensions(
extensions,viewType,options?): () =>void
Defined in: workspace.svelte.ts:4116
Parameters
Section titled “Parameters”extensions
Section titled “extensions”string[]
viewType
Section titled “viewType”string
options?
Section titled “options?”ExtensionRegistrationOptions
Returns
Section titled “Returns”() => void
registerHoverLinkSource()
Section titled “registerHoverLinkSource()”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.
Parameters
Section titled “Parameters”string
HoverLinkSource
Returns
Section titled “Returns”void
registerSidebarView()
Section titled “registerSidebarView()”registerSidebarView(
type,options?):void
Defined in: workspace.svelte.ts:3896
Parameters
Section titled “Parameters”string
options?
Section titled “options?”SidebarViewPlacementOptions = {}
Returns
Section titled “Returns”void
registerView()
Section titled “registerView()”registerView(
type,viewCreator):void
Defined in: workspace.svelte.ts:3877
Parameters
Section titled “Parameters”string
viewCreator
Section titled “viewCreator”ViewCreator
Returns
Section titled “Returns”void
requestSaveLayout()
Section titled “requestSaveLayout()”requestSaveLayout(
event?):void
Defined in: workspace.svelte.ts:2144
Parameters
Section titled “Parameters”event?
Section titled “event?”WorkspaceLayoutChangeEvent = ...
Returns
Section titled “Returns”void
resetLayoutToDefault()
Section titled “resetLayoutToDefault()”resetLayoutToDefault():
Promise<void>
Defined in: workspace.svelte.ts:2928
Returns
Section titled “Returns”Promise<void>
restoreFloatingWindow()
Section titled “restoreFloatingWindow()”restoreFloatingWindow(
window):void
Defined in: workspace.svelte.ts:5155
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
Returns
Section titled “Returns”void
revealLeaf()
Section titled “revealLeaf()”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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
saveNamedLayout()
Section titled “saveNamedLayout()”saveNamedLayout(
name):Promise<void>
Defined in: workspace.svelte.ts:2901
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
setActiveLeaf()
Section titled “setActiveLeaf()”setActiveLeaf(
leaf,params?):void
Defined in: workspace.svelte.ts:4327
Parameters
Section titled “Parameters”params?
Section titled “params?”focus?
Section titled “focus?”boolean
Returns
Section titled “Returns”void
setBottomPanelAlignment()
Section titled “setBottomPanelAlignment()”setBottomPanelAlignment(
alignment):boolean
Defined in: workspace.svelte.ts:5336
Update the live design-core shell setting without writing workspace JSON.
Parameters
Section titled “Parameters”alignment
Section titled “alignment”WorkspaceBottomPanelAlignment
Returns
Section titled “Returns”boolean
setBottomPanelOpen()
Section titled “setBottomPanelOpen()”setBottomPanelOpen(
open):void
Defined in: workspace.svelte.ts:5302
Open or close the bottom panel without changing its last size.
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”void
setBottomPanelSize()
Section titled “setBottomPanelSize()”setBottomPanelSize(
size):void
Defined in: workspace.svelte.ts:5312
Resize the bottom panel using design-core’s supported range.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
setDisplayMode()
Section titled “setDisplayMode()”setDisplayMode(
mode,reason?):void
Defined in: workspace.svelte.ts:2687
Parameters
Section titled “Parameters”WorkspaceDisplayMode
reason?
Section titled “reason?”WorkspaceDisplayModeReason = "manual"
Returns
Section titled “Returns”void
setFloatingWindowBounds()
Section titled “setFloatingWindowBounds()”setFloatingWindowBounds(
window,bounds):void
Defined in: workspace.svelte.ts:5163
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
bounds
Section titled “bounds”Partial<Record<"x" | "y" | "width" | "height", number>>
Returns
Section titled “Returns”void
setFloatingWindowDisplayState()
Section titled “setFloatingWindowDisplayState()”setFloatingWindowDisplayState(
window,displayState,operation?):void
Defined in: workspace.svelte.ts:5117
Parameters
Section titled “Parameters”window
Section titled “window”WorkspaceWindow
displayState
Section titled “displayState”WorkspaceWindowDisplayState
operation?
Section titled “operation?”string = ...
Returns
Section titled “Returns”void
splitActiveLeaf()
Section titled “splitActiveLeaf()”splitActiveLeaf(
direction?):WorkspaceLeaf
Defined in: workspace.svelte.ts:4665
Parameters
Section titled “Parameters”direction?
Section titled “direction?”SplitDirection
Returns
Section titled “Returns”startLayoutDrag()
Section titled “startLayoutDrag()”startLayoutDrag(
options):WorkspaceLayoutDropEvent
Defined in: workspace.svelte.ts:2233
Parameters
Section titled “Parameters”options
Section titled “options”Omit<WorkspaceLayoutDropEvent, "defaultPrevented" | "preventDefault">
Returns
Section titled “Returns”WorkspaceLayoutDropEvent
supportsPopoutWindows()
Section titled “supportsPopoutWindows()”supportsPopoutWindows():
boolean
Defined in: workspace.svelte.ts:5007
Returns
Section titled “Returns”boolean
toggleBottomPanel()
Section titled “toggleBottomPanel()”toggleBottomPanel():
void
Defined in: workspace.svelte.ts:5324
Toggle the bottom panel while retaining its last expanded size.
Returns
Section titled “Returns”void
toJson()
Section titled “toJson()”toJson():
WorkspaceJson
Defined in: workspace.svelte.ts:2744
Returns
Section titled “Returns”WorkspaceJson
trigger()
Section titled “trigger()”trigger<
T>(eventName, …args):boolean
Defined in: events.ts:91
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”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">]
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”tryTrigger()
Section titled “tryTrigger()”tryTrigger<
T>(evt, …args):void
Defined in: events.ts:112
Type Parameters
Section titled “Type Parameters”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"
Parameters
Section titled “Parameters”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">]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”unregisterExtensions()
Section titled “unregisterExtensions()”unregisterExtensions(
extensions,viewType):void
Defined in: workspace.svelte.ts:4182
Parameters
Section titled “Parameters”extensions
Section titled “extensions”string[]
viewType
Section titled “viewType”string
Returns
Section titled “Returns”void
unregisterHoverLinkSource()
Section titled “unregisterHoverLinkSource()”unregisterHoverLinkSource(
id):void
Defined in: workspace.svelte.ts:3917
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
unregisterSidebarView()
Section titled “unregisterSidebarView()”unregisterSidebarView(
type):void
Defined in: workspace.svelte.ts:3903
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
unregisterView()
Section titled “unregisterView()”unregisterView(
type):boolean
Defined in: workspace.svelte.ts:3939
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
updateOptions()
Section titled “updateOptions()”updateOptions():
void
Defined in: workspace.svelte.ts:3921
Returns
Section titled “Returns”void
viewCreator()
Section titled “viewCreator()”viewCreator(
type):ViewCreator|undefined
Defined in: workspace.svelte.ts:4311
Parameters
Section titled “Parameters”string | TFile
Returns
Section titled “Returns”ViewCreator | undefined
willShowLayoutDropOverlay()
Section titled “willShowLayoutDropOverlay()”willShowLayoutDropOverlay(
options):WorkspaceLayoutDropEvent
Defined in: workspace.svelte.ts:2224
Parameters
Section titled “Parameters”options
Section titled “options”Omit<WorkspaceLayoutDropEvent, "defaultPrevented" | "preventDefault">
Returns
Section titled “Returns”WorkspaceLayoutDropEvent