Skip to content

Commit

Permalink
Update to v0.11.11.
Browse files Browse the repository at this point in the history
  • Loading branch information
lishid committed Apr 1, 2021
1 parent 55946e5 commit dbfa19a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 12 deletions.
41 changes: 39 additions & 2 deletions obsidian.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as CodeMirror from 'codemirror';
import * as Moment from 'moment';

declare global {
interface ObjectConstructor {
Expand Down Expand Up @@ -672,8 +673,16 @@ export abstract class Editor {
/** @public */
abstract getValue(): string;
/** @public */
abstract setValue(content: string): void;
/** @public */
abstract getLine(line: number): string;
/** @public */
abstract setLine(n: number, text: string): void;
/** @public */
abstract lineCount(): number;
/** @public */
abstract lastLine(): number;
/** @public */
abstract getSelection(): string;
/** @public */
somethingSelected(): boolean;
Expand All @@ -688,6 +697,8 @@ export abstract class Editor {
/** @public */
abstract listSelections(): EditorSelection[];
/** @public */
setCursor(pos: EditorPosition | number, ch?: number): void;
/** @public */
abstract setSelection(anchor: EditorPosition, head?: EditorPosition): void;
/** @public */
abstract focus(): void;
Expand Down Expand Up @@ -1474,6 +1485,9 @@ export class MarkdownSourceView implements MarkdownSubView, HoverParent {

/**
* @deprecated - Please use {@link MarkdownView#editor} instead.
* If you have to use this because you're augmenting specific CodeMirror 5 implementations,
* be aware that it will only work in source code mode on the desktop app, and it will
* not work on Mobile, or once WYSIWYG mode is released.
* @public
*/
cmEditor: CodeMirror.Editor;
Expand Down Expand Up @@ -1788,6 +1802,18 @@ export class Modal {
onClose(): void;
}

/**
* Mod = Cmd on MacOS and Ctrl on other OS
* Ctrl = Ctrl key for every OS
* Meta = Cmd on MacOS and Win key on other OS
* @public
*/
export type Modifier = 'Mod' | 'Ctrl' | 'Meta' | 'Shift' | 'Alt';

/** @public */
export const moment_2: typeof Moment;
export { moment_2 as moment }

/**
* @public
*/
Expand Down Expand Up @@ -1896,6 +1922,9 @@ export function parseLinktext(linktext: string): {
subpath: string;
};

/** @public */
export function parseYaml(yaml: string): any;

/**
* @public
*/
Expand Down Expand Up @@ -2150,7 +2179,7 @@ export class Scope {
* @param key - Keycode from https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
* @param func - the callback
*/
register(modifiers: string[], key: string | null, func: KeymapEventListener): KeymapEventHandler;
register(modifiers: Modifier[], key: string | null, func: KeymapEventListener): KeymapEventHandler;
/**
* @public
*/
Expand All @@ -2166,6 +2195,7 @@ export class SearchComponent extends AbstractTextComponent<HTMLInputElement> {
* @public
*/
clearButtonEl: HTMLElement;

/**
* @public
*/
Expand Down Expand Up @@ -2688,6 +2718,13 @@ export class Vault extends Events {
*/
adapter: DataAdapter;

/**
* Gets the path to the config folder.
* This value is typically `.obsidian` but it could be different.
* @public
*/
configDir: string;

/**
* Gets the name of the vault
* @public
Expand All @@ -2697,7 +2734,7 @@ export class Vault extends Events {
/**
* @public
*/
getAbstractFileByPath(path: string): TAbstractFile;
getAbstractFileByPath(path: string): TAbstractFile | null;

/**
* @public
Expand Down
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "obsidian",
"version": "0.11.7",
"description": "Definitions for the latest Obsidian API (https://obsidian.md)",
"types": "obsidian.d.ts",
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@types/codemirror": "0.0.98"
}
"name": "obsidian",
"version": "0.11.11",
"description": "Definitions for the latest Obsidian API (https://obsidian.md)",
"types": "obsidian.d.ts",
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@types/codemirror": "0.0.108",
"moment": "2.29.1",
"yaml": "2.0.0-4"
}
}

0 comments on commit dbfa19a

Please sign in to comment.