Workspace
Class: Workspace
Section titled “Class: 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.
Extends
Section titled “Extends”EventDispatcher<{active-leaf-change: [WorkspaceLeaf|null];editor-menu: [Menu,Editor];editor-updated: [Editor, readonlyTransactionSpec[]];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]; }>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Workspace(
app):Workspace
Defined in: workspace.svelte.ts:1951
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:1324
readonlyapp:App
Defined in: workspace.svelte.ts:1951
containerEl
Section titled “containerEl”containerEl:
HTMLElement
Defined in: workspace.svelte.ts:1344
editorViews
Section titled “editorViews”
readonlyeditorViews:EditorViewRegistry
Defined in: workspace.svelte.ts:1318
floating
Section titled “floating”floating:
WorkspaceFloating
Defined in: workspace.svelte.ts:1335
focusedHostId
Section titled “focusedHostId”focusedHostId:
string
Defined in: workspace.svelte.ts:1326
focusMode
Section titled “focusMode”focusMode:
WorkspaceFocusModeState|null
Defined in: workspace.svelte.ts:1325
layoutReady
Section titled “layoutReady”layoutReady:
boolean
Defined in: workspace.svelte.ts:1336
leftRibbon
Section titled “leftRibbon”leftRibbon:
WorkspaceRibbon
Defined in: workspace.svelte.ts:1342
leftSplit
Section titled “leftSplit”leftSplit:
WorkspaceSidedock
Defined in: workspace.svelte.ts:1327
rightRibbon
Section titled “rightRibbon”rightRibbon:
WorkspaceRibbon
Defined in: workspace.svelte.ts:1343
rightSplit
Section titled “rightSplit”rightSplit:
WorkspaceSidedock
Defined in: workspace.svelte.ts:1331
rootContainer
Section titled “rootContainer”rootContainer:
WorkspaceRoot
Defined in: workspace.svelte.ts:1322
rootSplit
Section titled “rootSplit”rootSplit:
WorkspaceView
Defined in: workspace.svelte.ts:1323
statusCompatEl
Section titled “statusCompatEl”statusCompatEl:
HTMLElement
Defined in: workspace.svelte.ts:1341
statusEl
Section titled “statusEl”statusEl:
HTMLElement
Defined in: workspace.svelte.ts:1340
Accessors
Section titled “Accessors”activeEditor
Section titled “activeEditor”Get Signature
Section titled “Get Signature”get activeEditor():
MarkdownFileInfo|null
Defined in: workspace.svelte.ts:1826
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:1800
Returns
Section titled “Returns”WorkspaceLeaf | null
Set Signature
Section titled “Set Signature”set activeLeaf(
leaf):void
Defined in: workspace.svelte.ts:1822
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:1811
Returns
Section titled “Returns”WorkspaceLeaf | null
Methods
Section titled “Methods”changeLayout()
Section titled “changeLayout()”changeLayout(
workspace):Promise<void>
Defined in: workspace.svelte.ts:2025
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:1860
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
closeFloatingWindow()
Section titled “closeFloatingWindow()”closeFloatingWindow(
window,options?):void
Defined in: workspace.svelte.ts:2976
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
collapseFloatingWindow()
Section titled “collapseFloatingWindow()”collapseFloatingWindow(
window):void
Defined in: workspace.svelte.ts:2928
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:2967
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:2642
Parameters
Section titled “Parameters”Returns
Section titled “Returns”convertSidebarLeavesToGroup()
Section titled “convertSidebarLeavesToGroup()”convertSidebarLeavesToGroup(
side,leaves,options?):WorkspaceSidebarGroup
Defined in: workspace.svelte.ts:2598
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:2466
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:2460
Parameters
Section titled “Parameters”parent
Section titled “parent”number
Returns
Section titled “Returns”detachLeavesOfType()
Section titled “detachLeavesOfType()”detachLeavesOfType(
viewType):void
Defined in: workspace.svelte.ts:2444
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:2312
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | undefined
determineViewTypeForPath()
Section titled “determineViewTypeForPath()”determineViewTypeForPath(
path):string|undefined
Defined in: workspace.svelte.ts:2322
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 "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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”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">]
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”dropWorkspaceItemOnTabs()
Section titled “dropWorkspaceItemOnTabs()”dropWorkspaceItemOnTabs(
parent,options):Promise<boolean>
Defined in: workspace.svelte.ts:1487
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:3083
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 "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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”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">]
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”endLayoutDrag()
Section titled “endLayoutDrag()”endLayoutDrag(
options):WorkspaceLayoutDropEvent
Defined in: workspace.svelte.ts:1414
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:2693
Parameters
Section titled “Parameters”string
sideOrOptions?
Section titled “sideOrOptions?”SidebarSide | EnsureSideLeafOptions
options?
Section titled “options?”EnsureSideLeafOptions = {}
Returns
Section titled “Returns”enterFocusMode()
Section titled “enterFocusMode()”enterFocusMode(
leaf?):boolean
Defined in: workspace.svelte.ts:1840
Parameters
Section titled “Parameters”WorkspaceLeaf | null
Returns
Section titled “Returns”boolean
exitFocusMode()
Section titled “exitFocusMode()”exitFocusMode():
boolean
Defined in: workspace.svelte.ts:1856
Returns
Section titled “Returns”boolean
focusFloatingWindow()
Section titled “focusFloatingWindow()”focusFloatingWindow(
window):void
Defined in: workspace.svelte.ts:2895
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:1796
Returns
Section titled “Returns”void
getActiveFile()
Section titled “getActiveFile()”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.
Returns
Section titled “Returns”TFile | null
getActiveViewOfType()
Section titled “getActiveViewOfType()”getActiveViewOfType<
T>(type):T|null
Defined in: workspace.svelte.ts:2388
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
getCommandHostDocument()
Section titled “getCommandHostDocument()”getCommandHostDocument(
hostId?):Document
Defined in: workspace.svelte.ts:1771
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:1758
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:1762
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:2213
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”{ editorViewId: string; pattern: string; view?: RegisteredEditorViewContribution; } | undefined
getFocusedCommandHostId()
Section titled “getFocusedCommandHostId()”getFocusedCommandHostId():
string
Defined in: workspace.svelte.ts:1784
Returns
Section titled “Returns”string
getGroupLeaves()
Section titled “getGroupLeaves()”getGroupLeaves(
group):WorkspaceLeaf[]
Defined in: workspace.svelte.ts:2501
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”getLastOpenFiles()
Section titled “getLastOpenFiles()”getLastOpenFiles():
string[]
Defined in: workspace.svelte.ts:2658
Returns
Section titled “Returns”string[]
getLayout()
Section titled “getLayout()”getLayout():
Record<string,unknown>
Defined in: workspace.svelte.ts:2039
Returns
Section titled “Returns”Record<string, unknown>
getLeaf()
Section titled “getLeaf()”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.
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:2375
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:2450
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:3074
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:1971
Returns
Section titled “Returns”WorkspaceLeaf | null
getOrCreateSidebarGroup()
Section titled “getOrCreateSidebarGroup()”getOrCreateSidebarGroup(
side,group,options?):WorkspaceSidebarGroup
Defined in: workspace.svelte.ts:2569
Parameters
Section titled “Parameters”SidebarSide
string
options?
Section titled “options?”SidebarGroupOptions = {}
Returns
Section titled “Returns”getRightLeaf()
Section titled “getRightLeaf()”getRightLeaf(
split):WorkspaceLeaf|null
Defined in: workspace.svelte.ts:3059
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:2557
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:2594
Parameters
Section titled “Parameters”SidebarSide
string
Returns
Section titled “Returns”getSidebarGroups()
Section titled “getSidebarGroups()”getSidebarGroups(
side?):WorkspaceSidebarGroup[]
Defined in: workspace.svelte.ts:2540
Parameters
Section titled “Parameters”SidebarSide
Returns
Section titled “Returns”getUnpinnedLeaf()
Section titled “getUnpinnedLeaf()”getUnpinnedLeaf():
WorkspaceLeaf
Defined in: workspace.svelte.ts:2497
Returns
Section titled “Returns”getVisibleHintTargets()
Section titled “getVisibleHintTargets()”getVisibleHintTargets():
WorkspaceHintTarget[]
Defined in: workspace.svelte.ts:1975
Returns
Section titled “Returns”handleLinkContextMenu()
Section titled “handleLinkContextMenu()”handleLinkContextMenu(
menu,linktext,sourcePath,event?):void
Defined in: workspace.svelte.ts:2738
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:1868
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
iterateAllLeaves()
Section titled “iterateAllLeaves()”iterateAllLeaves<
T>(callback):void|T
Defined in: workspace.svelte.ts:2425
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:2401
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
loadLayout()
Section titled “loadLayout()”loadLayout(
file?):Promise<void>
Defined in: workspace.svelte.ts:1907
Parameters
Section titled “Parameters”string = "workspace.json"
Returns
Section titled “Returns”Promise<void>
maximizeFloatingWindow()
Section titled “maximizeFloatingWindow()”maximizeFloatingWindow(
window):void
Defined in: workspace.svelte.ts:2944
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:2936
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:2751
Parameters
Section titled “Parameters”WorkspaceWindowInitData
Returns
Section titled “Returns”WorkspaceWindow
moveLeafToSidebarGroup()
Section titled “moveLeafToSidebarGroup()”moveLeafToSidebarGroup(
leaf,group,options?):boolean
Defined in: workspace.svelte.ts:1677
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:1626
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:2790
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:2762
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:1423
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 "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"
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 "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"
Parameters
Section titled “Parameters”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>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”on<
T>(eventName,listener,context?):EventRef<{active-leaf-change: [WorkspaceLeaf|null];editor-menu: [Menu,Editor];editor-updated: [Editor, readonlyTransactionSpec[]];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
Type Parameters
Section titled “Type Parameters”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"
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: [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>
Inherited from
Section titled “Inherited from”once()
Section titled “once()”once<
T>(eventName,listener,context?):EventRef<{active-leaf-change: [WorkspaceLeaf|null];editor-menu: [Menu,Editor];editor-updated: [Editor, readonlyTransactionSpec[]];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
Type Parameters
Section titled “Type Parameters”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"
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: [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>
Inherited from
Section titled “Inherited from”onLayoutReady()
Section titled “onLayoutReady()”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.
Parameters
Section titled “Parameters”callback
Section titled “callback”() => any
Returns
Section titled “Returns”void
openLinkText()
Section titled “openLinkText()”openLinkText(
linktext,sourcePath,newLeaf?,openState?):Promise<void>
Defined in: workspace.svelte.ts:2668
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:2773
Parameters
Section titled “Parameters”WorkspaceWindowInitData
Returns
Section titled “Returns”registerEditorView()
Section titled “registerEditorView()”registerEditorView(
contribution): () =>void
Defined in: workspace.svelte.ts:2078
Parameters
Section titled “Parameters”contribution
Section titled “contribution”EditorViewContribution
Returns
Section titled “Returns”() => void
registerExtensions()
Section titled “registerExtensions()”registerExtensions(
extensions,viewType):void
Defined in: workspace.svelte.ts:2263
Parameters
Section titled “Parameters”extensions
Section titled “extensions”string[]
viewType
Section titled “viewType”string
Returns
Section titled “Returns”void
registerHoverLinkSource()
Section titled “registerHoverLinkSource()”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.
Parameters
Section titled “Parameters”string
HoverLinkSource
Returns
Section titled “Returns”void
registerSidebarView()
Section titled “registerSidebarView()”registerSidebarView(
type,options?):void
Defined in: workspace.svelte.ts:2082
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:2074
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:1358
Parameters
Section titled “Parameters”event?
Section titled “event?”WorkspaceLayoutChangeEvent = ...
Returns
Section titled “Returns”void
restoreFloatingWindow()
Section titled “restoreFloatingWindow()”restoreFloatingWindow(
window):void
Defined in: workspace.svelte.ts:2952
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: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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<void>
setActiveLeaf()
Section titled “setActiveLeaf()”setActiveLeaf(
leaf,params?):void
Defined in: workspace.svelte.ts:2358
Parameters
Section titled “Parameters”params?
Section titled “params?”focus?
Section titled “focus?”boolean
Returns
Section titled “Returns”void
setFloatingWindowBounds()
Section titled “setFloatingWindowBounds()”setFloatingWindowBounds(
window,bounds):void
Defined in: workspace.svelte.ts:2960
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:2914
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:2493
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:1405
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:2804
Returns
Section titled “Returns”boolean
toJson()
Section titled “toJson()”toJson():
WorkspaceJson
Defined in: workspace.svelte.ts:1872
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 "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"
Parameters
Section titled “Parameters”eventName
Section titled “eventName”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">]
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 "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"
Parameters
Section titled “Parameters”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">]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”unregisterExtensions()
Section titled “unregisterExtensions()”unregisterExtensions(
extensions,viewType):void
Defined in: workspace.svelte.ts:2295
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:2103
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
unregisterSidebarView()
Section titled “unregisterSidebarView()”unregisterSidebarView(
type):void
Defined in: workspace.svelte.ts:2089
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
unregisterView()
Section titled “unregisterView()”unregisterView(
type):boolean
Defined in: workspace.svelte.ts:2125
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
updateOptions()
Section titled “updateOptions()”updateOptions():
void
Defined in: workspace.svelte.ts:2107
Returns
Section titled “Returns”void
viewCreator()
Section titled “viewCreator()”viewCreator(
type):ViewCreator|undefined
Defined in: workspace.svelte.ts:2342
Parameters
Section titled “Parameters”string | TFile
Returns
Section titled “Returns”ViewCreator | undefined
willShowLayoutDropOverlay()
Section titled “willShowLayoutDropOverlay()”willShowLayoutDropOverlay(
options):WorkspaceLayoutDropEvent
Defined in: workspace.svelte.ts:1396
Parameters
Section titled “Parameters”options
Section titled “options”Omit<WorkspaceLayoutDropEvent, "defaultPrevented" | "preventDefault">
Returns
Section titled “Returns”WorkspaceLayoutDropEvent