Skip to content

Commit

Permalink
Update to v1.6.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
lishid committed Jul 10, 2024
1 parent 8b2eda0 commit f20b17e
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 14 deletions.
79 changes: 66 additions & 13 deletions obsidian.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ export abstract class AbstractInputSuggest<T> extends PopoverSuggest<T> {

/** @public */
protected abstract getSuggestions(query: string): T[] | Promise<T[]>;

/** @public */
selectSuggestion(value: T, evt: MouseEvent | KeyboardEvent): void;
/**
* Registers a callback to handle when a suggestion is selected by the user.
* @public
Expand Down Expand Up @@ -528,6 +529,10 @@ export interface CachedMetadata {
* @public
*/
headings?: HeadingCache[];
/**
* @public
*/
footnotes?: FootnoteCache[];
/**
* Sections are root level markdown blocks, which can be used to divide the document up.
* @public
Expand Down Expand Up @@ -567,7 +572,10 @@ export interface CacheItem {

}

/** @public */
/**
* A closeable component that can get dismissed via the Android 'back' button.
* @public
*/
export interface CloseableComponent {
/** @public */
close(): any;
Expand Down Expand Up @@ -1224,6 +1232,7 @@ export interface EditorSelectionOrCaret {

/** @public */
export abstract class EditorSuggest<T> extends PopoverSuggest<T> {

/**
* Current suggestion context, containing the result of `onTrigger`.
* This will be null any time the EditorSuggest is not supposed to run.
Expand Down Expand Up @@ -1408,6 +1417,13 @@ export class FileManager {
*/
renameFile(file: TAbstractFile, newPath: string): Promise<void>;

/**
* Remove a file or a folder from the vault according the user's preferred 'trash'
* options (either moving the file to .trash/ or the OS trash bin).
* @param file
* @public
*/
trashFile(file: TAbstractFile): Promise<void>;
/**
* Generate a markdown link based on the user's preferences.
* @param file - the file to link to.
Expand Down Expand Up @@ -1639,6 +1655,17 @@ export abstract class FileView extends ItemView {
*/
export function finishRenderMath(): Promise<void>;

/**
* @public
*/
export interface FootnoteCache extends CacheItem {
/**
* @public
*/
id: string;
}


/**
* @public
*/
Expand Down Expand Up @@ -2669,6 +2696,7 @@ export class Modal implements CloseableComponent {
* @public
*/
modalEl: HTMLElement;

/**
* @public
*/
Expand All @@ -2691,6 +2719,7 @@ export class Modal implements CloseableComponent {
* @public
*/
open(): void;

/**
* @public
*/
Expand Down Expand Up @@ -3652,6 +3681,11 @@ export class SliderComponent extends ValueComponent<number> {
* @public
*/
setDisabled(disabled: boolean): this;
/**
* @param instant whether or not the value should get updated while the slider is dragging
* @public
*/
setInstant(instant: boolean): this;
/**
* @public
*/
Expand Down Expand Up @@ -3764,6 +3798,7 @@ export abstract class SuggestModal<T> extends Modal implements ISuggestOwner<T>
* @public
*/
resultContainerEl: HTMLElement;

/**
* @public
*/
Expand Down Expand Up @@ -4216,6 +4251,12 @@ export class Vault extends Events {
* @public
*/
getAllLoadedFiles(): TAbstractFile[];
/**
* Get all folders in the vault.
* @param includeRoot - Should the root folder (`/`) be returned
* @public
*/
getAllFolders(includeRoot?: boolean): TFolder[];

/**
* @public
Expand Down Expand Up @@ -4641,6 +4682,7 @@ export class Workspace extends Events {
* @public
*/
on(name: 'resize', callback: () => any, ctx?: any): EventRef;

/**
* @public
*/
Expand Down Expand Up @@ -4742,6 +4784,12 @@ export class WorkspaceFloating extends WorkspaceParent {
*/
export abstract class WorkspaceItem extends Events {

/**
* The direct parent of the leaf.
* @public
*/
abstract parent: WorkspaceParent;

/**
* @public
*/
Expand All @@ -4761,6 +4809,18 @@ export abstract class WorkspaceItem extends Events {
*/
export class WorkspaceLeaf extends WorkspaceItem {

/**
* The direct parent of the leaf.
*
* On desktop, a leaf is always a child of a `WorkspaceTabs` component.
* On mobile, a leaf might be a child of a `WorkspaceMobileDrawer`.
* Perform an `instanceof` check before making an assumption about the
* `parent`.
*
* @public
*/
parent: WorkspaceTabs | WorkspaceMobileDrawer;

/**
* @public
*/
Expand Down Expand Up @@ -4932,6 +4992,10 @@ export class WorkspaceWindow extends WorkspaceContainer {
* @public
*/
export interface WorkspaceWindowInitData {
/** @public */
x?: number;
/** @public */
y?: number;

/**
* The suggested size
Expand All @@ -4947,16 +5011,5 @@ export interface WorkspaceWindowInitData {

export { }

/** @public */
declare global {
/**
* Global reference to the app.
* @public
* @deprecated - Prefer not to use this value directly.
*/
var app: App;
}

/** @public */
export type IconName = string;

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian",
"version": "1.5.7",
"version": "1.6.6",
"description": "Type definitions for the latest Obsidian API (https://obsidian.md)",
"keywords": ["obsdmd"],
"homepage": "https://obsidian.md",
Expand Down

0 comments on commit f20b17e

Please sign in to comment.