obsidian-typings 4.59.0 → 4.60.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/dist/cjs/types.d.cts +182 -24
- package/package.json +2 -2
package/dist/cjs/types.d.cts
CHANGED
|
@@ -4252,7 +4252,7 @@ declare module "obsidian" {
|
|
|
4252
4252
|
*/
|
|
4253
4253
|
register(cb: () => any): void;
|
|
4254
4254
|
/**
|
|
4255
|
-
* Registers
|
|
4255
|
+
* Registers a DOM event to be detached when unloading.
|
|
4256
4256
|
*
|
|
4257
4257
|
* @typeParam K - The type of the event to register.
|
|
4258
4258
|
* @param el - The element to register the event on.
|
|
@@ -4270,7 +4270,7 @@ declare module "obsidian" {
|
|
|
4270
4270
|
*/
|
|
4271
4271
|
registerDomEvent<K extends keyof DocumentEventMap>(el: Document, type: K, callback: (this: HTMLElement, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4272
4272
|
/**
|
|
4273
|
-
* Registers
|
|
4273
|
+
* Registers a DOM event to be detached when unloading.
|
|
4274
4274
|
*
|
|
4275
4275
|
* @typeParam K - The type of the event to register.
|
|
4276
4276
|
* @param el - The element to register the event on.
|
|
@@ -4287,7 +4287,7 @@ declare module "obsidian" {
|
|
|
4287
4287
|
*/
|
|
4288
4288
|
registerDomEvent<K extends keyof HTMLElementEventMap>(el: HTMLElement, type: K, callback: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4289
4289
|
/**
|
|
4290
|
-
* Registers
|
|
4290
|
+
* Registers a DOM event to be detached when unloading.
|
|
4291
4291
|
*
|
|
4292
4292
|
* @typeParam K - The type of the event to register.
|
|
4293
4293
|
* @param el - The element to register the event on.
|
|
@@ -6296,6 +6296,114 @@ declare module "obsidian" {
|
|
|
6296
6296
|
constructor__(containerEl: HTMLElement): this;
|
|
6297
6297
|
}
|
|
6298
6298
|
}
|
|
6299
|
+
declare module "obsidian" {
|
|
6300
|
+
/**
|
|
6301
|
+
* A text input allowing selection of a file from in the vault.
|
|
6302
|
+
*
|
|
6303
|
+
* @since 1.10.2
|
|
6304
|
+
*/
|
|
6305
|
+
export interface FileOption extends BaseOption {
|
|
6306
|
+
/**
|
|
6307
|
+
* The default value of the option.
|
|
6308
|
+
*
|
|
6309
|
+
* @official
|
|
6310
|
+
* @since 1.10.2
|
|
6311
|
+
*/
|
|
6312
|
+
default?: string;
|
|
6313
|
+
/**
|
|
6314
|
+
* Filter the files to be displayed in the file picker.
|
|
6315
|
+
*
|
|
6316
|
+
* @param file - The file to filter.
|
|
6317
|
+
* @returns `true` if the file should be displayed, `false` otherwise.
|
|
6318
|
+
* @official
|
|
6319
|
+
* @since 1.10.2
|
|
6320
|
+
*/
|
|
6321
|
+
filter?: (file: TFile) => boolean;
|
|
6322
|
+
/**
|
|
6323
|
+
* The placeholder of the option.
|
|
6324
|
+
*
|
|
6325
|
+
* @official
|
|
6326
|
+
* @since 1.10.2
|
|
6327
|
+
*/
|
|
6328
|
+
placeholder?: string;
|
|
6329
|
+
/**
|
|
6330
|
+
* The type of the option.
|
|
6331
|
+
*
|
|
6332
|
+
* @official
|
|
6333
|
+
* @since 1.10.2
|
|
6334
|
+
*/
|
|
6335
|
+
type: "file";
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
declare module "obsidian" {
|
|
6339
|
+
/**
|
|
6340
|
+
* A text input allowing selection of a folder from in the vault.
|
|
6341
|
+
*
|
|
6342
|
+
* @since 1.10.2
|
|
6343
|
+
*/
|
|
6344
|
+
export interface FolderOption extends BaseOption {
|
|
6345
|
+
/**
|
|
6346
|
+
* The default value of the option.
|
|
6347
|
+
*
|
|
6348
|
+
* @official
|
|
6349
|
+
* @since 1.10.2
|
|
6350
|
+
*/
|
|
6351
|
+
default?: string;
|
|
6352
|
+
/**
|
|
6353
|
+
* Filter the folders to be displayed in the folder picker.
|
|
6354
|
+
*
|
|
6355
|
+
* @param folder - The folder to filter.
|
|
6356
|
+
* @returns `true` if the folder should be displayed, `false` otherwise.
|
|
6357
|
+
* @official
|
|
6358
|
+
* @since 1.10.2
|
|
6359
|
+
*/
|
|
6360
|
+
filter?: (folder: TFolder) => boolean;
|
|
6361
|
+
/**
|
|
6362
|
+
* The placeholder of the option.
|
|
6363
|
+
*
|
|
6364
|
+
* @official
|
|
6365
|
+
* @since 1.10.2
|
|
6366
|
+
*/
|
|
6367
|
+
placeholder?: string;
|
|
6368
|
+
/**
|
|
6369
|
+
* The type of the option.
|
|
6370
|
+
*
|
|
6371
|
+
* @official
|
|
6372
|
+
* @since 1.10.2
|
|
6373
|
+
*/
|
|
6374
|
+
type: "folder";
|
|
6375
|
+
}
|
|
6376
|
+
}
|
|
6377
|
+
declare module "obsidian" {
|
|
6378
|
+
/**
|
|
6379
|
+
* A text input supporting formula evaluation.
|
|
6380
|
+
*
|
|
6381
|
+
* @since 1.10.2
|
|
6382
|
+
*/
|
|
6383
|
+
export interface FormulaOption extends BaseOption {
|
|
6384
|
+
/**
|
|
6385
|
+
* The default value of the option.
|
|
6386
|
+
*
|
|
6387
|
+
* @official
|
|
6388
|
+
* @since 1.10.2
|
|
6389
|
+
*/
|
|
6390
|
+
default?: string;
|
|
6391
|
+
/**
|
|
6392
|
+
* The placeholder of the option.
|
|
6393
|
+
*
|
|
6394
|
+
* @official
|
|
6395
|
+
* @since 1.10.2
|
|
6396
|
+
*/
|
|
6397
|
+
placeholder?: string;
|
|
6398
|
+
/**
|
|
6399
|
+
* The type of the option.
|
|
6400
|
+
*
|
|
6401
|
+
* @official
|
|
6402
|
+
* @since 1.10.2
|
|
6403
|
+
*/
|
|
6404
|
+
type: "formula";
|
|
6405
|
+
}
|
|
6406
|
+
}
|
|
6299
6407
|
declare module "obsidian" {
|
|
6300
6408
|
/**
|
|
6301
6409
|
* A toggle component.
|
|
@@ -9805,6 +9913,15 @@ declare module "obsidian" {
|
|
|
9805
9913
|
* @since 1.10.0
|
|
9806
9914
|
*/
|
|
9807
9915
|
key: string;
|
|
9916
|
+
/**
|
|
9917
|
+
* If provided, the option will be hidden if the function returns true.
|
|
9918
|
+
*
|
|
9919
|
+
* @param config - Read-only copy of the current view configuration.
|
|
9920
|
+
* @returns `true` if the option should be hidden, false otherwise.
|
|
9921
|
+
* @official
|
|
9922
|
+
* @since 1.10.2
|
|
9923
|
+
*/
|
|
9924
|
+
shouldHide?: (config: BasesViewConfig) => boolean;
|
|
9808
9925
|
/**
|
|
9809
9926
|
* Type
|
|
9810
9927
|
* @official
|
|
@@ -10093,6 +10210,15 @@ declare module "obsidian" {
|
|
|
10093
10210
|
* @since 1.10.0
|
|
10094
10211
|
*/
|
|
10095
10212
|
items: Exclude<ViewOption, GroupOption>[];
|
|
10213
|
+
/**
|
|
10214
|
+
* If provided, the group will be hidden if the function returns true.
|
|
10215
|
+
*
|
|
10216
|
+
* @param config - Read-only copy of the current view configuration.
|
|
10217
|
+
* @returns `true` if the group should be hidden, `false` otherwise.
|
|
10218
|
+
* @official
|
|
10219
|
+
* @since 1.10.2
|
|
10220
|
+
*/
|
|
10221
|
+
shouldHide?: (config: BasesViewConfig) => boolean;
|
|
10096
10222
|
/**
|
|
10097
10223
|
* Type.
|
|
10098
10224
|
*
|
|
@@ -10281,12 +10407,14 @@ declare module "obsidian" {
|
|
|
10281
10407
|
* });
|
|
10282
10408
|
* ```
|
|
10283
10409
|
* @official
|
|
10410
|
+
* @since 0.9.7
|
|
10284
10411
|
*/
|
|
10285
10412
|
onChange(callback: (value: string) => any): this;
|
|
10286
10413
|
/**
|
|
10287
10414
|
* Manually invokes the callback registered with `onChange`.
|
|
10288
10415
|
*
|
|
10289
10416
|
* @official
|
|
10417
|
+
* @since 0.9.21
|
|
10290
10418
|
*/
|
|
10291
10419
|
onChanged(): void;
|
|
10292
10420
|
/**
|
|
@@ -10312,6 +10440,7 @@ declare module "obsidian" {
|
|
|
10312
10440
|
* textComponent.setPlaceholder('foo');
|
|
10313
10441
|
* ```
|
|
10314
10442
|
* @official
|
|
10443
|
+
* @since 0.9.7
|
|
10315
10444
|
*/
|
|
10316
10445
|
setPlaceholder(placeholder: string): this;
|
|
10317
10446
|
/**
|
|
@@ -10412,17 +10541,24 @@ declare module "obsidian" {
|
|
|
10412
10541
|
*/
|
|
10413
10542
|
renderTo(el: HTMLElement, ctx: RenderContext): void;
|
|
10414
10543
|
/**
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
*/
|
|
10544
|
+
* Get the string representation of this Value.
|
|
10545
|
+
*
|
|
10546
|
+
* @returns The string representation of this Value.
|
|
10547
|
+
* @deprecated - Added only for typing purposes. Use {@link Value.toString} instead.
|
|
10548
|
+
* @official
|
|
10549
|
+
* @since 1.10.0
|
|
10550
|
+
*/
|
|
10423
10551
|
toString__(): string;
|
|
10424
10552
|
}
|
|
10425
10553
|
namespace Value {
|
|
10554
|
+
/**
|
|
10555
|
+
* The type of the value.
|
|
10556
|
+
*
|
|
10557
|
+
* @official
|
|
10558
|
+
* @since 1.10.0
|
|
10559
|
+
* @deprecated - Added only for typing purposes. Use {@link Value.type} instead.
|
|
10560
|
+
*/
|
|
10561
|
+
let type__: string;
|
|
10426
10562
|
/**
|
|
10427
10563
|
* Equals.
|
|
10428
10564
|
*
|
|
@@ -11274,7 +11410,7 @@ declare module "obsidian" {
|
|
|
11274
11410
|
*/
|
|
11275
11411
|
getName(): string;
|
|
11276
11412
|
/**
|
|
11277
|
-
* Returns
|
|
11413
|
+
* Returns a URI for the browser engine to use, for example to embed an image.
|
|
11278
11414
|
*
|
|
11279
11415
|
* @param normalizedPath - The path to get the resource path for.
|
|
11280
11416
|
* @returns A URI for the browser engine to use.
|
|
@@ -11627,7 +11763,7 @@ declare module "obsidian" {
|
|
|
11627
11763
|
*/
|
|
11628
11764
|
getNativePath(normalizedPath: string): string;
|
|
11629
11765
|
/**
|
|
11630
|
-
* Returns
|
|
11766
|
+
* Returns a URI for the browser engine to use, for example to embed an image.
|
|
11631
11767
|
*
|
|
11632
11768
|
* @param normalizedPath - The path to get the resource path for.
|
|
11633
11769
|
* @returns A URI for the browser engine to use.
|
|
@@ -12814,6 +12950,16 @@ declare module "obsidian" {
|
|
|
12814
12950
|
* @deprecated - Added only for typing purposes. Use {@link constructor} instead.
|
|
12815
12951
|
*/
|
|
12816
12952
|
constructor__(controller: QueryController): this;
|
|
12953
|
+
/**
|
|
12954
|
+
* Display the new note menu for a file with the provided filename and optionally a function to modify the frontmatter.
|
|
12955
|
+
*
|
|
12956
|
+
* @param baseFileName - The filename of the base file.
|
|
12957
|
+
* @param frontmatterProcessor - A function to modify the frontmatter.
|
|
12958
|
+
* @returns A promise that resolves when the file is created.
|
|
12959
|
+
* @official
|
|
12960
|
+
* @since 1.10.2
|
|
12961
|
+
*/
|
|
12962
|
+
createFileForView(baseFileName: string, frontmatterProcessor?: (frontmatter: any) => void): Promise<void>;
|
|
12817
12963
|
/**
|
|
12818
12964
|
* Called when there is new data for the query. This view should rerender with the updated data.
|
|
12819
12965
|
* @official
|
|
@@ -13477,7 +13623,7 @@ declare module "obsidian" {
|
|
|
13477
13623
|
*/
|
|
13478
13624
|
interface BasesQueryResult {
|
|
13479
13625
|
/**
|
|
13480
|
-
*
|
|
13626
|
+
* An ungrouped version of the data, with user-configured sort and limit applied.
|
|
13481
13627
|
* Where appropriate, views should support groupBy by using `groupedData` instead of this value.
|
|
13482
13628
|
*
|
|
13483
13629
|
* @official
|
|
@@ -13788,7 +13934,7 @@ declare module "obsidian" {
|
|
|
13788
13934
|
/**
|
|
13789
13935
|
* A single character indicating the checked status of a task.
|
|
13790
13936
|
* The space character `' '` is interpreted as an incomplete task.
|
|
13791
|
-
*
|
|
13937
|
+
* Any other character is interpreted as completed task.
|
|
13792
13938
|
* `undefined` if this item isn't a task.
|
|
13793
13939
|
*
|
|
13794
13940
|
* @official
|
|
@@ -14026,6 +14172,19 @@ declare module "obsidian" {
|
|
|
14026
14172
|
* @since 1.10.0
|
|
14027
14173
|
*/
|
|
14028
14174
|
getDisplayName(propertyId: BasesPropertyId): string;
|
|
14175
|
+
/**
|
|
14176
|
+
* Retrieve a user-configured value from the config, evaluating it as a
|
|
14177
|
+
* formula in the context of the current Base. For embedded bases, or bases
|
|
14178
|
+
* in the sidebar, this means evaluating the formula against the currently
|
|
14179
|
+
* active file.
|
|
14180
|
+
*
|
|
14181
|
+
* @param view - The view to evaluate the formula in the context of.
|
|
14182
|
+
* @param key - The key to evaluate the formula for.
|
|
14183
|
+
* @returns the {@link Value} result from evaluating the formula, or {@link NullValue} if the formula is invalid, or the key is not present.
|
|
14184
|
+
* @official
|
|
14185
|
+
* @since 1.10.2
|
|
14186
|
+
*/
|
|
14187
|
+
getEvaluatedFormula(view: BasesView, key: string): Value;
|
|
14029
14188
|
/**
|
|
14030
14189
|
* Ordered list of properties to display in this view.
|
|
14031
14190
|
* In a table, these can be interpreted as the list of visible columns.
|
|
@@ -15684,12 +15843,11 @@ declare module "obsidian" {
|
|
|
15684
15843
|
*/
|
|
15685
15844
|
default?: boolean;
|
|
15686
15845
|
/**
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
*/
|
|
15846
|
+
* Type.
|
|
15847
|
+
*
|
|
15848
|
+
* @official
|
|
15849
|
+
* @since 1.10.0
|
|
15850
|
+
*/
|
|
15693
15851
|
type: "toggle";
|
|
15694
15852
|
}
|
|
15695
15853
|
}
|
|
@@ -15780,7 +15938,7 @@ declare module "obsidian" {
|
|
|
15780
15938
|
* @since 1.10.0
|
|
15781
15939
|
* @deprecated - Added only for typing purposes. Use {@link ViewOption} instead.
|
|
15782
15940
|
*/
|
|
15783
|
-
type ViewOption__ =
|
|
15941
|
+
type ViewOption__ = DropdownOption | FileOption | FolderOption | FormulaOption | GroupOption | MultitextOption | PropertyOption | SliderOption | TextOption | ToggleOption;
|
|
15784
15942
|
}
|
|
15785
15943
|
declare module "obsidian" {
|
|
15786
15944
|
/**
|
|
@@ -15902,7 +16060,7 @@ declare module "obsidian" {
|
|
|
15902
16060
|
*/
|
|
15903
16061
|
getRealPath(path: string): string;
|
|
15904
16062
|
/**
|
|
15905
|
-
* Returns
|
|
16063
|
+
* Returns a URI for the browser engine to use, for example to embed an image.
|
|
15906
16064
|
*
|
|
15907
16065
|
* @param normalizedPath - path to file/folder, use {@link normalizePath} to normalize beforehand.
|
|
15908
16066
|
* @returns A URI for the browser engine to use.
|
|
@@ -16467,7 +16625,7 @@ declare module "obsidian" {
|
|
|
16467
16625
|
*/
|
|
16468
16626
|
getName(): string;
|
|
16469
16627
|
/**
|
|
16470
|
-
* Returns
|
|
16628
|
+
* Returns a URI for the browser engine to use, for example to embed an image.
|
|
16471
16629
|
*
|
|
16472
16630
|
* @param file - The file to get the resource path for.
|
|
16473
16631
|
* @returns The resource path for the file.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obsidian-typings",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.60.0",
|
|
4
4
|
"description": "Extended type definitions for the Obsidian API (https://obsidian.md)",
|
|
5
5
|
"main": "",
|
|
6
6
|
"module": "",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"i18next": "25.2.1",
|
|
76
76
|
"mermaid": "11.4.1",
|
|
77
77
|
"moment": "2.29.4",
|
|
78
|
-
"obsidian": "1.10.
|
|
78
|
+
"obsidian": "1.10.2-1",
|
|
79
79
|
"pdfjs-dist": "5.3.31",
|
|
80
80
|
"pixi.js": "7.2.4",
|
|
81
81
|
"scrypt-js": "3.0.1",
|