Skip to content

Commit 34a4fcf

Browse files
authored
Merge pull request #178 from obsidianmd/13399751385
Auto-generate docs for obsidian.d.ts
2 parents 75d731b + cca85af commit 34a4fcf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+399
-52
lines changed

en/Reference/TypeScript API/App.md

+7
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ export class App
2828
| [`vault`](App/vault) | | [`Vault`](Vault) | |
2929
| [`workspace`](App/workspace) | | [`Workspace`](Workspace) | |
3030

31+
## Methods
32+
33+
| Method | Modifiers | Description |
34+
| --- | --- | --- |
35+
| [`loadLocalStorage(key)`](App/loadLocalStorage) | | Retrieve value from <code>localStorage</code> for this vault. |
36+
| [`saveLocalStorage(key, data)`](App/saveLocalStorage) | | Save vault-specific value to <code>localStorage</code>. If data is <code>null</code>, the entry will be cleared. |
37+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
aliases: "App.loadLocalStorage"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`App`](App)[`loadLocalStorage`](App/loadLocalStorage)
9+
10+
## App.loadLocalStorage() method
11+
12+
Retrieve value from `localStorage` for this vault.
13+
14+
**Signature:**
15+
16+
```typescript
17+
loadLocalStorage(key: string): any | null;
18+
```
19+
20+
## Parameters
21+
22+
| Parameter | Type | Description |
23+
| --- | --- | --- |
24+
| <code>key</code> | <code>string</code> | |
25+
26+
**Returns:**
27+
28+
`any | null`
29+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
aliases: "App.saveLocalStorage"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`App`](App)[`saveLocalStorage`](App/saveLocalStorage)
9+
10+
## App.saveLocalStorage() method
11+
12+
Save vault-specific value to `localStorage`<!-- -->. If data is `null`<!-- -->, the entry will be cleared.
13+
14+
**Signature:**
15+
16+
```typescript
17+
saveLocalStorage(key: string, data: unknown | null): void;
18+
```
19+
20+
## Parameters
21+
22+
| Parameter | Type | Description |
23+
| --- | --- | --- |
24+
| <code>key</code> | <code>string</code> | |
25+
| <code>data</code> | <code>unknown &#124; null</code> | value being saved to localStorage. Must be serializable. |
26+
27+
**Returns:**
28+
29+
`void`
30+

en/Reference/TypeScript API/CachedMetadata.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ export interface CachedMetadata
2222
| --- | --- | --- | --- |
2323
| [`blocks?`](CachedMetadata/blocks) | | <code>Record</code><code>&lt;string, </code>[`BlockCache`](BlockCache)<code>&gt;</code> | _(Optional)_ |
2424
| [`embeds?`](CachedMetadata/embeds) | | [`EmbedCache`](EmbedCache)<code>[]</code> | _(Optional)_ |
25+
| [`footnoteRefs?`](CachedMetadata/footnoteRefs) | | [`FootnoteRefCache`](FootnoteRefCache)<code>[]</code> | _(Optional)_ |
2526
| [`footnotes?`](CachedMetadata/footnotes) | | [`FootnoteCache`](FootnoteCache)<code>[]</code> | _(Optional)_ |
2627
| [`frontmatter?`](CachedMetadata/frontmatter) | | [`FrontMatterCache`](FrontMatterCache) | _(Optional)_ |
2728
| [`frontmatterLinks?`](CachedMetadata/frontmatterLinks) | | [`FrontmatterLinkCache`](FrontmatterLinkCache)<code>[]</code> | _(Optional)_ |
2829
| [`frontmatterPosition?`](CachedMetadata/frontmatterPosition) | | [`Pos`](Pos) | _(Optional)_ Position of the frontmatter in the file. |
2930
| [`headings?`](CachedMetadata/headings) | | [`HeadingCache`](HeadingCache)<code>[]</code> | _(Optional)_ |
3031
| [`links?`](CachedMetadata/links) | | [`LinkCache`](LinkCache)<code>[]</code> | _(Optional)_ |
3132
| [`listItems?`](CachedMetadata/listItems) | | [`ListItemCache`](ListItemCache)<code>[]</code> | _(Optional)_ |
33+
| [`referenceLinks?`](CachedMetadata/referenceLinks) | | [`ReferenceLinkCache`](ReferenceLinkCache)<code>[]</code> | _(Optional)_ |
3234
| [`sections?`](CachedMetadata/sections) | | [`SectionCache`](SectionCache)<code>[]</code> | _(Optional)_ Sections are root level markdown blocks, which can be used to divide the document up. |
3335
| [`tags?`](CachedMetadata/tags) | | [`TagCache`](TagCache)<code>[]</code> | _(Optional)_ |
3436

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
aliases: "CachedMetadata.footnoteRefs"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`CachedMetadata`](CachedMetadata)[`footnoteRefs`](CachedMetadata/footnoteRefs)
9+
10+
## CachedMetadata.footnoteRefs property
11+
12+
13+
**Signature:**
14+
15+
```typescript
16+
footnoteRefs?: FootnoteRefCache[];
17+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
aliases: "CachedMetadata.referenceLinks"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`CachedMetadata`](CachedMetadata)[`referenceLinks`](CachedMetadata/referenceLinks)
9+
10+
## CachedMetadata.referenceLinks property
11+
12+
13+
**Signature:**
14+
15+
```typescript
16+
referenceLinks?: ReferenceLinkCache[];
17+
```

en/Reference/TypeScript API/DataAdapter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface DataAdapter
2323
| --- | --- |
2424
| [`append(normalizedPath, data, options)`](DataAdapter/append) | Add text to the end of a plaintext file. |
2525
| [`copy(normalizedPath, normalizedNewPath)`](DataAdapter/copy) | Create a copy of a file. This will fail if there is already a file at <code>normalizedNewPath</code>. |
26-
| [`exists(normalizedPath, sensitive)`](DataAdapter/exists) | Check if something exists at the given path. |
26+
| [`exists(normalizedPath, sensitive)`](DataAdapter/exists) | Check if something exists at the given path. For a faster way to synchronously check if a note or attachment is in the vault, use [Vault.getAbstractFileByPath()](Vault/getAbstractFileByPath)<!-- -->. |
2727
| [`getName()`](DataAdapter/getName) | |
2828
| [`getResourcePath(normalizedPath)`](DataAdapter/getResourcePath) | Returns an URI for the browser engine to use, for example to embed an image. |
2929
| [`list(normalizedPath)`](DataAdapter/list) | Retrieve a list of all files and folders inside the given folder, non-recursive. |

en/Reference/TypeScript API/DataAdapter/exists.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cssclasses: hide-title
99

1010
## DataAdapter.exists() method
1111

12-
Check if something exists at the given path.
12+
Check if something exists at the given path. For a faster way to synchronously check if a note or attachment is in the vault, use [Vault.getAbstractFileByPath()](Vault/getAbstractFileByPath)<!-- -->.
1313

1414
**Signature:**
1515

en/Reference/TypeScript API/Debouncer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ export interface Debouncer<T extends unknown[], V>
2020

2121
| Method | Description |
2222
| --- | --- |
23-
| [`cancel()`](Debouncer/cancel) | |
24-
| [`run()`](Debouncer/run) | |
23+
| [`cancel()`](Debouncer/cancel) | Cancel any pending debounced function call. |
24+
| [`run()`](Debouncer/run) | If there is any pending function call, clear the timer and call the function immediately. |
2525

en/Reference/TypeScript API/Debouncer/cancel.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cssclasses: hide-title
99

1010
## Debouncer.cancel() method
1111

12+
Cancel any pending debounced function call.
1213

1314
**Signature:**
1415

en/Reference/TypeScript API/Debouncer/run.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cssclasses: hide-title
99

1010
## Debouncer.run() method
1111

12+
If there is any pending function call, clear the timer and call the function immediately.
1213

1314
**Signature:**
1415

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
aliases: "FootnoteRefCache"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`FootnoteRefCache`](FootnoteRefCache)
9+
10+
## FootnoteRefCache interface
11+
12+
13+
**Signature:**
14+
15+
```typescript
16+
export interface FootnoteRefCache extends CacheItem
17+
```
18+
**Extends:** [`CacheItem`](CacheItem)
19+
20+
## Properties
21+
22+
| Property | Modifiers | Type | Description |
23+
| --- | --- | --- | --- |
24+
| [`id`](FootnoteRefCache/id) | | <code>string</code> | |
25+
| [`position`](CacheItem/position) | | [`Pos`](Pos) | <p>Position of this item in the note.</p><p>(Inherited from [CacheItem](CacheItem)<!-- -->)</p> |
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
aliases: "FootnoteRefCache.id"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`FootnoteRefCache`](FootnoteRefCache)[`id`](FootnoteRefCache/id)
9+
10+
## FootnoteRefCache.id property
11+
12+
13+
**Signature:**
14+
15+
```typescript
16+
id: string;
17+
```

en/Reference/TypeScript API/FuzzySuggestModal.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export abstract class FuzzySuggestModal<T> extends SuggestModal<FuzzyMatch<T>>
4343
4444
| Method | Modifiers | Description |
4545
| --- | --- | --- |
46-
| [`close()`](Modal/close) | | <p>(Inherited from [Modal](Modal)<!-- -->)</p> |
46+
| [`close()`](Modal/close) | | <p>Hide the modal.</p><p>(Inherited from [Modal](Modal)<!-- -->)</p> |
4747
| [`getItems()`](FuzzySuggestModal/getItems) | <code>abstract</code> | |
4848
| [`getItemText(item)`](FuzzySuggestModal/getItemText) | <code>abstract</code> | |
4949
| [`getSuggestions(query)`](FuzzySuggestModal/getSuggestions) | | |
@@ -52,7 +52,7 @@ export abstract class FuzzySuggestModal<T> extends SuggestModal<FuzzyMatch<T>>
5252
| [`onClose()`](Modal/onClose) | | <p>(Inherited from [Modal](Modal)<!-- -->)</p> |
5353
| [`onNoSuggestion()`](SuggestModal/onNoSuggestion) | | <p>(Inherited from [SuggestModal](SuggestModal)<!-- -->)</p> |
5454
| [`onOpen()`](Modal/onOpen) | | <p>(Inherited from [Modal](Modal)<!-- -->)</p> |
55-
| [`open()`](Modal/open) | | <p>(Inherited from [Modal](Modal)<!-- -->)</p> |
55+
| [`open()`](Modal/open) | | <p>Show the modal on the the active window. On mobile, the modal will animate on screen.</p><p>(Inherited from [Modal](Modal)<!-- -->)</p> |
5656
| [`renderSuggestion(item, el)`](FuzzySuggestModal/renderSuggestion) | | |
5757
| [`selectActiveSuggestion(evt)`](SuggestModal/selectActiveSuggestion) | | <p>(Inherited from [SuggestModal](SuggestModal)<!-- -->)</p> |
5858
| [`selectSuggestion(value, evt)`](SuggestModal/selectSuggestion) | | <p>(Inherited from [SuggestModal](SuggestModal)<!-- -->)</p> |

en/Reference/TypeScript API/HoverPopover.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class HoverPopover extends Component
2121
2222
| Constructor | Modifiers | Description |
2323
| --- | --- | --- |
24-
| [`(constructor)(parent, targetEl, waitTime)`](HoverPopover/(constructor).md) | | Constructs a new instance of the <code>HoverPopover</code> class |
24+
| [`(constructor)(parent, targetEl, waitTime, staticPos)`](HoverPopover/(constructor).md) | | Constructs a new instance of the <code>HoverPopover</code> class |
2525
2626
## Properties
2727

en/Reference/TypeScript API/HoverPopover/(constructor).md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Constructs a new instance of the `HoverPopover` class
1414
**Signature:**
1515

1616
```typescript
17-
constructor(parent: HoverParent, targetEl: HTMLElement | null, waitTime?: number);
17+
constructor(parent: HoverParent, targetEl: HTMLElement | null, waitTime?: number, staticPos?: Point | null);
1818
```
1919

2020
## Parameters
@@ -24,4 +24,5 @@ constructor(parent: HoverParent, targetEl: HTMLElement | null, waitTime?: number
2424
| <code>parent</code> | [`HoverParent`](HoverParent) | |
2525
| <code>targetEl</code> | <code>HTMLElement</code><code> &#124; null</code> | |
2626
| <code>waitTime</code> | <code>number</code> | _(Optional)_ |
27+
| <code>staticPos</code> | [`Point`](Point)<code> &#124; null</code> | _(Optional)_ |
2728

en/Reference/TypeScript API/LivePreviewState.md

-24
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
aliases: "LivePreviewStateType"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`LivePreviewStateType`](LivePreviewStateType)
9+
10+
## LivePreviewStateType interface
11+
12+
The object stored in the view plugin [livePreviewState](livePreviewState)
13+
14+
**Signature:**
15+
16+
```typescript
17+
export interface LivePreviewStateType
18+
```
19+
20+
## Properties
21+
22+
| Property | Modifiers | Type | Description |
23+
| --- | --- | --- | --- |
24+
| [`mousedown`](LivePreviewStateType/mousedown) | | <code>boolean</code> | True if the left mouse is currently held down in the editor (for example, when drag-to-select text). |
25+

en/Reference/TypeScript API/LivePreviewState/mousedown.md renamed to en/Reference/TypeScript API/LivePreviewStateType/mousedown.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
aliases: "LivePreviewState.mousedown"
2+
aliases: "LivePreviewStateType.mousedown"
33
cssclasses: hide-title
44
---
55

66
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
77

8-
[`LivePreviewState`](LivePreviewState)[`mousedown`](LivePreviewState/mousedown)
8+
[`LivePreviewStateType`](LivePreviewStateType)[`mousedown`](LivePreviewStateType/mousedown)
99

10-
## LivePreviewState.mousedown property
10+
## LivePreviewStateType.mousedown property
1111

1212
True if the left mouse is currently held down in the editor (for example, when drag-to-select text).
1313

en/Reference/TypeScript API/Loc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ export interface Loc
2222
| Property | Modifiers | Type | Description |
2323
| --- | --- | --- | --- |
2424
| [`col`](Loc/col) | | <code>number</code> | Column number. |
25-
| [`line`](Loc/line) | | <code>number</code> | Line number. |
25+
| [`line`](Loc/line) | | <code>number</code> | Line number. 0-based. |
2626
| [`offset`](Loc/offset) | | <code>number</code> | Number of characters from the beginning of the file. |
2727

en/Reference/TypeScript API/Loc/line.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cssclasses: hide-title
99

1010
## Loc.line property
1111

12-
Line number.
12+
Line number. 0-based.
1313

1414
**Signature:**
1515

en/Reference/TypeScript API/Modal.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ export class Modal implements CloseableComponent
3939
4040
| Method | Modifiers | Description |
4141
| --- | --- | --- |
42-
| [`close()`](Modal/close) | | |
42+
| [`close()`](Modal/close) | | Hide the modal. |
4343
| [`onClose()`](Modal/onClose) | | |
4444
| [`onOpen()`](Modal/onOpen) | | |
45-
| [`open()`](Modal/open) | | |
45+
| [`open()`](Modal/open) | | Show the modal on the the active window. On mobile, the modal will animate on screen. |
4646
| [`setContent(content)`](Modal/setContent) | | |
4747
| [`setTitle(title)`](Modal/setTitle) | | |
4848

en/Reference/TypeScript API/Modal/close.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cssclasses: hide-title
99

1010
## Modal.close() method
1111

12+
Hide the modal.
1213

1314
**Signature:**
1415

en/Reference/TypeScript API/Modal/open.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cssclasses: hide-title
99

1010
## Modal.open() method
1111

12+
Show the modal on the the active window. On mobile, the modal will animate on screen.
1213

1314
**Signature:**
1415

en/Reference/TypeScript API/Notice.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export class Notice
2727

2828
| Property | Modifiers | Type | Description |
2929
| --- | --- | --- | --- |
30+
| [`containerEl`](Notice/containerEl) | | <code>HTMLElement</code> | |
31+
| [`messageEl`](Notice/messageEl) | | <code>HTMLElement</code> | |
3032
| [`noticeEl`](Notice/noticeEl) | | <code>HTMLElement</code> | |
3133

3234
## Methods
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
aliases: "Notice.containerEl"
3+
cssclasses: hide-title
4+
---
5+
6+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
7+
8+
[`Notice`](Notice)[`containerEl`](Notice/containerEl)
9+
10+
## Notice.containerEl property
11+
12+
13+
**Signature:**
14+
15+
```typescript
16+
containerEl: HTMLElement;
17+
```

0 commit comments

Comments
 (0)