Skip to content

Commit

Permalink
chore: apply sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaoumov committed Sep 11, 2024
1 parent 56fe232 commit 57e5bde
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 50 deletions.
8 changes: 4 additions & 4 deletions src/obsidian/augmentations/MetadataCache.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ declare module "obsidian" {
iterateReferences(callback: (path: string) => void): void;
/** @internal */
linkResolver(): void;
/**
* Called whenever the metadatacache has finished updating
*/
on(name: "finished", callback: () => void): EventRef;
/**
* Called whenever the metadatacache is fully loaded in
*
* @remark 'finished' is also emitted when the cache is initialized
*/
on(name: "initialized", callback: () => void): EventRef;
/**
* Called whenever the metadatacache has finished updating
*/
on(name: "finished", callback: () => void): EventRef;
/** @internal Execute onCleanCache callbacks if cache is clean */
onCleanCache(): void;
/** @internal On creation of the cache: update metadata cache */
Expand Down
2 changes: 1 addition & 1 deletion src/obsidian/augmentations/Setting.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ declare module "obsidian" {
* @internal Open a specific tab by tab reference
*/
openTab(tab: SettingTab): void;
openTabById(id: "hotkeys"): HotkeysSettingTab;
/**
* Open a specific tab by ID
*
* @param id ID of the tab to open
*/
openTabById(id: string): SettingTab;
openTabById(id: "hotkeys"): HotkeysSettingTab;
/**
* @param tab Tab to remove
* @internal Remove a plugin tab from the settings modal
Expand Down
90 changes: 45 additions & 45 deletions src/obsidian/augmentations/Workspace.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,46 +167,13 @@ declare module "obsidian" {
/** @internal Load workspace from disk and initialize */
loadLayout(): Promise<void>;
/**
* @internal Triggers when user hovers over any note link element (file explorer, editor, ...)
* @remark Used for preparing (Ctrl) hover previews
*/
on(name: "hover-link", callback: (event: HoverLinkEvent) => void, ctx?: unknown): EventRef;
/** @internal Called whenever user opens tab group menu (contains e.g. stacked tabs button) */
on(name: "tab-group-menu", callback: (tabMenu: Menu, tabsLeaf: WorkspaceTabs) => void, ctx?: unknown): EventRef;
/** @internal Triggers when user swipes open left/right sidebar */
on(name: "swipe", callback: (touchEvents: ObsidianTouchEvent[]) => void, ctx?: unknown): EventRef;
/**
* Triggers when workspace layout is loaded
*
* @remark Prefer usage of onLayoutReady instead
*/
on(name: "layout-ready", callback: () => void, ctx?: unknown): EventRef;
/** @internal Triggers when user right-clicks on external URL in editor */
on(name: "url-menu", callback: (menu: Menu, url: string) => void, ctx?: unknown): EventRef;
/**
* Triggers when user clicks on 'N results' button in search view
*/
on(
name: "search:results-menu",
callback: (menu: Menu, search: GlobalSearchLeaf) => void,
ctx?: unknown
): EventRef;
/** @internal Called when user shares text on mobile */
on(name: "receive-text-menu", callback: (menu: Menu, x: unknown) => void, ctx?: unknown): EventRef;
/** @internal Called when user shares files on mobile */
on(name: "receive-files-menu", callback: (menu: Menu, x: unknown) => void, ctx?: unknown): EventRef;
/**
* Triggers when the user opens a context menu on a selection of multiple nodes in the canvas
* Triggers when the user opens a context menu on a connection in the canvas
*/
on(
name: "canvas:selection-menu",
callback: (menu: Menu, canvasView: CanvasView) => void,
name: "canvas:edge-menu",
callback: (menu: Menu, connection: CanvasConnection) => void,
ctx?: unknown
): EventRef;
/**
* Triggers when the user opens a context menu on a single node in the canvas
*/
on(name: "canvas:node-menu", callback: (menu: Menu, node: CanvasNode) => void, ctx?: unknown): EventRef;
/**
* Triggers when the user drops edge connection to empty space in the canvas
*/
Expand All @@ -216,11 +183,11 @@ declare module "obsidian" {
ctx?: unknown
): EventRef;
/**
* Triggers when the user opens a context menu on a connection in the canvas
* Triggers when the user opens a context menu on a selection of multiple nodes in the canvas
*/
on(
name: "canvas:edge-menu",
callback: (menu: Menu, connection: CanvasConnection) => void,
name: "canvas:selection-menu",
callback: (menu: Menu, canvasView: CanvasView) => void,
ctx?: unknown
): EventRef;
/**
Expand Down Expand Up @@ -250,14 +217,37 @@ declare module "obsidian" {
ctx?: unknown
): EventRef;
/**
* Triggers when the markdown scroll event is fired.
* Triggers when user clicks on 'N results' button in search view
*/
on(
name: "search:results-menu",
callback: (menu: Menu, search: GlobalSearchLeaf) => void,
ctx?: unknown
): EventRef;
/**
* Triggers when the browser history is updated.
*
* @param name - "markdown-scroll"
* @param name - "browser:update-history"
* @param callback - Callback function
* @param ctx - Context
* @returns Event reference
*/
on(name: "markdown-scroll", callback: (view: MarkdownScrollableEditView) => unknown, ctx?: unknown): EventRef;
on(name: "browser:update-history", callback: () => unknown, ctx?: unknown): EventRef;
/**
* Triggers when the user opens a context menu on a single node in the canvas
*/
on(name: "canvas:node-menu", callback: (menu: Menu, node: CanvasNode) => void, ctx?: unknown): EventRef;
/**
* @internal Triggers when user hovers over any note link element (file explorer, editor, ...)
* @remark Used for preparing (Ctrl) hover previews
*/
on(name: "hover-link", callback: (event: HoverLinkEvent) => void, ctx?: unknown): EventRef;
/**
* Triggers when workspace layout is loaded
*
* @remark Prefer usage of onLayoutReady instead
*/
on(name: "layout-ready", callback: () => void, ctx?: unknown): EventRef;
/**
* Triggers when the leaf menu is opened.
*
Expand All @@ -268,14 +258,24 @@ declare module "obsidian" {
*/
on(name: "leaf-menu", callback: (menu: Menu, leaf: WorkspaceLeaf) => unknown, ctx?: unknown): EventRef;
/**
* Triggers when the browser history is updated.
* Triggers when the markdown scroll event is fired.
*
* @param name - "browser:update-history"
* @param name - "markdown-scroll"
* @param callback - Callback function
* @param ctx - Context
* @returns Event reference
*/
on(name: "browser:update-history", callback: () => unknown, ctx?: unknown): EventRef;
on(name: "markdown-scroll", callback: (view: MarkdownScrollableEditView) => unknown, ctx?: unknown): EventRef;
/** @internal Called when user shares files on mobile */
on(name: "receive-files-menu", callback: (menu: Menu, x: unknown) => void, ctx?: unknown): EventRef;
/** @internal Called when user shares text on mobile */
on(name: "receive-text-menu", callback: (menu: Menu, x: unknown) => void, ctx?: unknown): EventRef;
/** @internal Triggers when user swipes open left/right sidebar */
on(name: "swipe", callback: (touchEvents: ObsidianTouchEvent[]) => void, ctx?: unknown): EventRef;
/** @internal Called whenever user opens tab group menu (contains e.g. stacked tabs button) */
on(name: "tab-group-menu", callback: (tabMenu: Menu, tabsLeaf: WorkspaceTabs) => void, ctx?: unknown): EventRef;
/** @internal Triggers when user right-clicks on external URL in editor */
on(name: "url-menu", callback: (menu: Menu, url: string) => void, ctx?: unknown): EventRef;
/** @internal Handles drag event on leaf */
onDragLeaf(e: DragEvent, leaf: WorkspaceLeaf): void;
/** @internal Handles layout change and saves layout to disk */
Expand Down

0 comments on commit 57e5bde

Please sign in to comment.