obsidian-typings 4.80.0 → 4.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/cjs/implementations.d.cts +185 -41
- package/dist/cjs/types.d.cts +276 -51
- package/dist/obsidian-typings.api.json +888 -295
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,6 +95,12 @@ In most cases, we recommend to always use the latest release.
|
|
|
95
95
|
>
|
|
96
96
|
> If you run `npm install obsidian-typings` instead, the most likely, the library will not get updated.
|
|
97
97
|
|
|
98
|
+
> [!WARNING]
|
|
99
|
+
>
|
|
100
|
+
> The package installs several libraries that trigger `npm audit` warnings.
|
|
101
|
+
>
|
|
102
|
+
> Those packages cannot be updated because they should match the exact versions Obsidian uses internally.
|
|
103
|
+
|
|
98
104
|
### 2. Enable in `tsconfig.json` (recommended) <span id="add-types-setting-to-tsconfig-json"></span>
|
|
99
105
|
|
|
100
106
|
Add `obsidian-typings` to the `types` array of your `tsconfig.json` to make all extended typings available globally without explicit importing them:
|
|
@@ -8,7 +8,7 @@ import type { Tree as LezerTree } from '@lezer/common';
|
|
|
8
8
|
import type { App as App$1, BrowserWindow } from 'electron';
|
|
9
9
|
import type { Mermaid } from 'mermaid';
|
|
10
10
|
import type { FSWatcher } from 'node:fs';
|
|
11
|
-
import type { App, BlockCache, CacheItem, CachedMetadata, CloseableComponent, ColorComponent, Command, Component, DataAdapter, Debouncer, EditableFileView, Editor, EditorPosition, EditorRange, EditorRangeOrCaret, EditorSuggest, EmbedCache, EventRef, Events, FileStats, FileView, FrontmatterLinkCache, FuzzySuggestModal, HoverLinkSource, HoverPopover, IconName, ItemView, KeymapInfo, LinkCache, MarkdownEditView, MarkdownFileInfo, MarkdownPostProcessorContext, MarkdownPreviewView, MarkdownView, Menu, Modal, PaneType, Plugin as Plugin, PluginManifest, PluginSettingTab, PopoverSuggest, Reference, ReferenceCache, RenderContext, Scope, SearchComponent, SearchResult, Setting, SettingTab, SplitDirection, TAbstractFile, TFile, TFolder, TextComponent, TextFileView, Vault, View, ViewCreator, ViewState, Workspace, WorkspaceLeaf, WorkspaceTabs, moment as moment$1 } from 'obsidian';
|
|
11
|
+
import type { App, BasesConfigFileFilter, BlockCache, CacheItem, CachedMetadata, CloseableComponent, ColorComponent, Command, Component, DataAdapter, Debouncer, EditableFileView, Editor, EditorPosition, EditorRange, EditorRangeOrCaret, EditorSuggest, EmbedCache, EventRef, Events, FileStats, FileView, FrontmatterLinkCache, FuzzySuggestModal, HoverLinkSource, HoverPopover, IconName, ItemView, KeymapInfo, LinkCache, MarkdownEditView, MarkdownFileInfo, MarkdownPostProcessorContext, MarkdownPreviewView, MarkdownView, Menu, Modal, PaneType, Plugin as Plugin, PluginManifest, PluginSettingTab, PopoverSuggest, Reference, ReferenceCache, RenderContext, Scope, SearchComponent, SearchResult, Setting, SettingTab, SplitDirection, TAbstractFile, TFile, TFolder, TextComponent, TextFileView, Vault, View, ViewCreator, ViewState, Workspace, WorkspaceLeaf, WorkspaceTabs, moment as moment$1 } from 'obsidian';
|
|
12
12
|
import type { default as pdfjsLib } from 'pdfjs-dist';
|
|
13
13
|
import type { Application, Container, Graphics, ICanvas, Sprite, Text as Text$1, TextStyle } from 'pixi.js';
|
|
14
14
|
import type { default as Prism$1 } from 'prismjs';
|
|
@@ -614,14 +614,28 @@ export interface AddOverlayOptions {
|
|
|
614
614
|
* @unofficial
|
|
615
615
|
*/
|
|
616
616
|
export interface AliasesPropertyWidgetComponent extends PropertyWidgetComponentBase {
|
|
617
|
+
/** The container element for the property widget. */
|
|
618
|
+
containerEl: HTMLElement;
|
|
617
619
|
/** The render context for the property widget. */
|
|
618
620
|
ctx: PropertyRenderContext;
|
|
619
621
|
/** The hover popover for the property widget. */
|
|
620
|
-
hoverPopover:
|
|
622
|
+
hoverPopover: null;
|
|
621
623
|
/** The multiselect component for the property widget. */
|
|
622
624
|
multiselect: Multiselect;
|
|
623
625
|
/** The type of the property widget. */
|
|
624
626
|
type: "aliases";
|
|
627
|
+
/**
|
|
628
|
+
* Handle focus event.
|
|
629
|
+
*
|
|
630
|
+
* @param mode - The focus mode.
|
|
631
|
+
*/
|
|
632
|
+
onFocus(): void;
|
|
633
|
+
/**
|
|
634
|
+
* Set the value of the property widget.
|
|
635
|
+
*
|
|
636
|
+
* @param value - The value to set.
|
|
637
|
+
*/
|
|
638
|
+
setValue(value: unknown): void;
|
|
625
639
|
}
|
|
626
640
|
/**
|
|
627
641
|
* @todo Documentation incomplete.
|
|
@@ -1357,6 +1371,78 @@ export interface BacklinkView extends InfoFileView {
|
|
|
1357
1371
|
*/
|
|
1358
1372
|
export interface BacklinkViewConstructor extends TypedViewConstructor<BacklinkView> {
|
|
1359
1373
|
}
|
|
1374
|
+
/**
|
|
1375
|
+
* BasesConfigFileFilter `and` clause.
|
|
1376
|
+
*
|
|
1377
|
+
* @public
|
|
1378
|
+
* @unofficial
|
|
1379
|
+
*/
|
|
1380
|
+
export interface BasesConfigFileFilterAndClause {
|
|
1381
|
+
/**
|
|
1382
|
+
* All of the following filters must match.
|
|
1383
|
+
*
|
|
1384
|
+
* @public
|
|
1385
|
+
* @since 1.10.0
|
|
1386
|
+
* @example
|
|
1387
|
+
* ```ts
|
|
1388
|
+
* {
|
|
1389
|
+
* and: [
|
|
1390
|
+
* '*.md',
|
|
1391
|
+
* '*.txt',
|
|
1392
|
+
* ],
|
|
1393
|
+
* }
|
|
1394
|
+
* ```
|
|
1395
|
+
*/
|
|
1396
|
+
and: BasesConfigFileFilter[];
|
|
1397
|
+
}
|
|
1398
|
+
/**
|
|
1399
|
+
* BasesConfigFileFilter `not` clause.
|
|
1400
|
+
*
|
|
1401
|
+
* @public
|
|
1402
|
+
* @unofficial
|
|
1403
|
+
*/
|
|
1404
|
+
export interface BasesConfigFileFilterNotClause {
|
|
1405
|
+
/**
|
|
1406
|
+
* None of the following filters should match.
|
|
1407
|
+
*
|
|
1408
|
+
* @public
|
|
1409
|
+
* @since 1.10.0
|
|
1410
|
+
* @example
|
|
1411
|
+
* ```ts
|
|
1412
|
+
* {
|
|
1413
|
+
* not: [
|
|
1414
|
+
* '*.md',
|
|
1415
|
+
* '*.txt',
|
|
1416
|
+
* ],
|
|
1417
|
+
* }
|
|
1418
|
+
* ```
|
|
1419
|
+
*/
|
|
1420
|
+
not: BasesConfigFileFilter[];
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* BasesConfigFileFilter `or` clause.
|
|
1424
|
+
*
|
|
1425
|
+
* @public
|
|
1426
|
+
* @unofficial
|
|
1427
|
+
*/
|
|
1428
|
+
export interface BasesConfigFileFilterOrClause {
|
|
1429
|
+
/**
|
|
1430
|
+
* Some of the following filters should match.
|
|
1431
|
+
*
|
|
1432
|
+
* @public
|
|
1433
|
+
* @since 1.10.0
|
|
1434
|
+
* @example
|
|
1435
|
+
* ```ts
|
|
1436
|
+
* {
|
|
1437
|
+
* or: [
|
|
1438
|
+
* '*.md',
|
|
1439
|
+
* '*.txt',
|
|
1440
|
+
* ],
|
|
1441
|
+
* }
|
|
1442
|
+
* ```
|
|
1443
|
+
*/
|
|
1444
|
+
or: BasesConfigFileFilter[];
|
|
1445
|
+
}
|
|
1360
1446
|
/**
|
|
1361
1447
|
* Bases context
|
|
1362
1448
|
*
|
|
@@ -3808,6 +3894,18 @@ export interface CheckboxPropertyWidgetComponent extends PropertyWidgetComponent
|
|
|
3808
3894
|
checkboxEl: HTMLInputElement;
|
|
3809
3895
|
/** The type of the property widget. */
|
|
3810
3896
|
type: "checkbox";
|
|
3897
|
+
/**
|
|
3898
|
+
* Handle focus event.
|
|
3899
|
+
*
|
|
3900
|
+
* @param mode - The focus mode.
|
|
3901
|
+
*/
|
|
3902
|
+
onFocus(): void;
|
|
3903
|
+
/**
|
|
3904
|
+
* Set the value of the property widget.
|
|
3905
|
+
*
|
|
3906
|
+
* @param value - The value to set.
|
|
3907
|
+
*/
|
|
3908
|
+
setValue(value: unknown): void;
|
|
3811
3909
|
}
|
|
3812
3910
|
/**
|
|
3813
3911
|
* @todo Documentation incomplete.
|
|
@@ -6055,6 +6153,18 @@ export interface FilePropertyWidgetComponent extends PropertyWidgetComponentBase
|
|
|
6055
6153
|
inputEl: HTMLInputElement;
|
|
6056
6154
|
/** The type of the property widget. */
|
|
6057
6155
|
type: "file";
|
|
6156
|
+
/**
|
|
6157
|
+
* Handle focus event.
|
|
6158
|
+
*
|
|
6159
|
+
* @param mode - The focus mode.
|
|
6160
|
+
*/
|
|
6161
|
+
onFocus(): void;
|
|
6162
|
+
/**
|
|
6163
|
+
* Set the value of the property widget.
|
|
6164
|
+
*
|
|
6165
|
+
* @param value - The value to set.
|
|
6166
|
+
*/
|
|
6167
|
+
setValue(value: unknown): void;
|
|
6058
6168
|
}
|
|
6059
6169
|
/**
|
|
6060
6170
|
* @todo Documentation incomplete.
|
|
@@ -6281,6 +6391,18 @@ export interface FolderPropertyWidgetComponent extends PropertyWidgetComponentBa
|
|
|
6281
6391
|
inputEl: HTMLInputElement;
|
|
6282
6392
|
/** The type of the property widget. */
|
|
6283
6393
|
type: "folder";
|
|
6394
|
+
/**
|
|
6395
|
+
* Handle focus event.
|
|
6396
|
+
*
|
|
6397
|
+
* @param mode - The focus mode.
|
|
6398
|
+
*/
|
|
6399
|
+
onFocus(): void;
|
|
6400
|
+
/**
|
|
6401
|
+
* Set the value of the property widget.
|
|
6402
|
+
*
|
|
6403
|
+
* @param value - The value to set.
|
|
6404
|
+
*/
|
|
6405
|
+
setValue(value: unknown): void;
|
|
6284
6406
|
}
|
|
6285
6407
|
/**
|
|
6286
6408
|
* @todo Documentation incomplete.
|
|
@@ -9039,13 +9161,25 @@ export interface MultiselectOptionContextMenuContext {
|
|
|
9039
9161
|
*/
|
|
9040
9162
|
export interface MultitextPropertyWidgetComponent extends PropertyWidgetComponentBase {
|
|
9041
9163
|
/** The hover popover for the property widget. */
|
|
9042
|
-
hoverPopover:
|
|
9164
|
+
hoverPopover: null;
|
|
9043
9165
|
/** The multiselect component for the property widget. */
|
|
9044
9166
|
multiselect: Multiselect;
|
|
9045
9167
|
/** The type of the property widget. */
|
|
9046
9168
|
type: "multitext";
|
|
9047
9169
|
/** The values of the property widget. */
|
|
9048
9170
|
valueSet: Set<string>;
|
|
9171
|
+
/**
|
|
9172
|
+
* Handle focus event.
|
|
9173
|
+
*
|
|
9174
|
+
* @param mode - The focus mode.
|
|
9175
|
+
*/
|
|
9176
|
+
onFocus(): void;
|
|
9177
|
+
/**
|
|
9178
|
+
* Set the value of the property widget.
|
|
9179
|
+
*
|
|
9180
|
+
* @param value - The value to set.
|
|
9181
|
+
*/
|
|
9182
|
+
setValue(value: unknown): void;
|
|
9049
9183
|
}
|
|
9050
9184
|
/**
|
|
9051
9185
|
* @todo Documentation incomplete.
|
|
@@ -9161,6 +9295,18 @@ export interface NumberPropertyWidgetComponent extends PropertyWidgetComponentBa
|
|
|
9161
9295
|
type: "number";
|
|
9162
9296
|
/** Show the error message. */
|
|
9163
9297
|
showError(): void;
|
|
9298
|
+
/**
|
|
9299
|
+
* Handle focus event.
|
|
9300
|
+
*
|
|
9301
|
+
* @param mode - The focus mode.
|
|
9302
|
+
*/
|
|
9303
|
+
onFocus(): void;
|
|
9304
|
+
/**
|
|
9305
|
+
* Set the value of the property widget.
|
|
9306
|
+
*
|
|
9307
|
+
* @param value - The value to set.
|
|
9308
|
+
*/
|
|
9309
|
+
setValue(value: unknown): void;
|
|
9164
9310
|
}
|
|
9165
9311
|
/**
|
|
9166
9312
|
* @todo Documentation incomplete.
|
|
@@ -9850,6 +9996,18 @@ export interface PropertyPropertyWidgetComponent extends PropertyWidgetComponent
|
|
|
9850
9996
|
inputEl: HTMLInputElement;
|
|
9851
9997
|
/** The type of the property widget. */
|
|
9852
9998
|
type: "property";
|
|
9999
|
+
/**
|
|
10000
|
+
* Handle focus event.
|
|
10001
|
+
*
|
|
10002
|
+
* @param mode - The focus mode.
|
|
10003
|
+
*/
|
|
10004
|
+
onFocus(): void;
|
|
10005
|
+
/**
|
|
10006
|
+
* Set the value of the property widget.
|
|
10007
|
+
*
|
|
10008
|
+
* @param value - The value to set.
|
|
10009
|
+
*/
|
|
10010
|
+
setValue(value: unknown): void;
|
|
9853
10011
|
}
|
|
9854
10012
|
/**
|
|
9855
10013
|
* Combobox component for {@link PropertyPropertyWidgetComponent}.
|
|
@@ -10049,8 +10207,6 @@ export interface PropertyWidget<ComponentType extends PropertyWidgetComponentBas
|
|
|
10049
10207
|
* @unofficial
|
|
10050
10208
|
*/
|
|
10051
10209
|
export interface PropertyWidgetComponentBase {
|
|
10052
|
-
/** The container element for the property widget. */
|
|
10053
|
-
containerEl: HTMLElement;
|
|
10054
10210
|
/** The type of the property widget. */
|
|
10055
10211
|
type: string;
|
|
10056
10212
|
/**
|
|
@@ -10059,18 +10215,6 @@ export interface PropertyWidgetComponentBase {
|
|
|
10059
10215
|
* @param mode - The focus mode.
|
|
10060
10216
|
*/
|
|
10061
10217
|
focus(mode?: FocusMode): void;
|
|
10062
|
-
/**
|
|
10063
|
-
* Handle focus event.
|
|
10064
|
-
*
|
|
10065
|
-
* @param mode - The focus mode.
|
|
10066
|
-
*/
|
|
10067
|
-
onFocus(mode: FocusMode): void;
|
|
10068
|
-
/**
|
|
10069
|
-
* Set the value of the property widget.
|
|
10070
|
-
*
|
|
10071
|
-
* @param value - The value to set.
|
|
10072
|
-
*/
|
|
10073
|
-
setValue(value: unknown): void;
|
|
10074
10218
|
}
|
|
10075
10219
|
/**
|
|
10076
10220
|
* @todo Documentation incomplete.
|
|
@@ -11361,6 +11505,18 @@ export interface TagsPropertyWidgetComponent extends PropertyWidgetComponentBase
|
|
|
11361
11505
|
multiselect: Multiselect;
|
|
11362
11506
|
/** The type of the property widget. */
|
|
11363
11507
|
type: "tags";
|
|
11508
|
+
/**
|
|
11509
|
+
* Handle focus event.
|
|
11510
|
+
*
|
|
11511
|
+
* @param mode - The focus mode.
|
|
11512
|
+
*/
|
|
11513
|
+
onFocus(): void;
|
|
11514
|
+
/**
|
|
11515
|
+
* Set the value of the property widget.
|
|
11516
|
+
*
|
|
11517
|
+
* @param value - The value to set.
|
|
11518
|
+
*/
|
|
11519
|
+
setValue(value: unknown): void;
|
|
11364
11520
|
}
|
|
11365
11521
|
/**
|
|
11366
11522
|
* @todo Documentation incomplete.
|
|
@@ -11389,46 +11545,34 @@ export interface TemplatesPluginInstance extends InternalPluginInstance<Template
|
|
|
11389
11545
|
* @unofficial
|
|
11390
11546
|
*/
|
|
11391
11547
|
export interface TextPropertyWidgetComponent extends PropertyWidgetComponentBase {
|
|
11548
|
+
/** The container element for the property widget. */
|
|
11549
|
+
containerEl: HTMLElement;
|
|
11392
11550
|
/** The render context for the property widget. */
|
|
11393
11551
|
ctx: PropertyRenderContext;
|
|
11394
11552
|
/** The input element for the property widget. */
|
|
11395
11553
|
inputEl: HTMLInputElement;
|
|
11396
|
-
/** The
|
|
11397
|
-
|
|
11398
|
-
/** The link text element for the property widget. */
|
|
11399
|
-
linkTextEl: HTMLDivElement;
|
|
11554
|
+
/** The hover popover for the property widget. */
|
|
11555
|
+
hoverPopover: null;
|
|
11400
11556
|
/** The type of the property widget. */
|
|
11401
11557
|
type: "text";
|
|
11402
11558
|
/** The value of the property widget. */
|
|
11403
11559
|
value: string;
|
|
11404
11560
|
/**
|
|
11405
|
-
*
|
|
11406
|
-
*
|
|
11407
|
-
* @returns The display text.
|
|
11408
|
-
*/
|
|
11409
|
-
getDisplayText(): string;
|
|
11410
|
-
/**
|
|
11411
|
-
* Get the link text of the property widget.
|
|
11412
|
-
*
|
|
11413
|
-
* @returns The link text.
|
|
11561
|
+
* Render the property widget.
|
|
11414
11562
|
*/
|
|
11415
|
-
|
|
11563
|
+
render(): void;
|
|
11416
11564
|
/**
|
|
11417
|
-
*
|
|
11565
|
+
* Handle focus event.
|
|
11418
11566
|
*
|
|
11419
|
-
* @
|
|
11567
|
+
* @param mode - The focus mode.
|
|
11420
11568
|
*/
|
|
11421
|
-
|
|
11569
|
+
onFocus(): void;
|
|
11422
11570
|
/**
|
|
11423
|
-
*
|
|
11571
|
+
* Set the value of the property widget.
|
|
11424
11572
|
*
|
|
11425
|
-
* @
|
|
11426
|
-
*/
|
|
11427
|
-
isWikilink(): boolean;
|
|
11428
|
-
/**
|
|
11429
|
-
* Render the property widget.
|
|
11573
|
+
* @param value - The value to set.
|
|
11430
11574
|
*/
|
|
11431
|
-
|
|
11575
|
+
setValue(value: unknown): void;
|
|
11432
11576
|
}
|
|
11433
11577
|
/**
|
|
11434
11578
|
* @todo Documentation incomplete.
|