obsidian-typings 4.96.0 → 4.97.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 CHANGED
@@ -70,7 +70,7 @@ To make it easier to adapt to these differences, this package provides typings f
70
70
  Typings for each `Obsidian` version can be found in their own git branches: namely `release/obsidian-public/*` and `release/obsidian-catalyst/*`:
71
71
 
72
72
  - Latest `public` release: [`release/obsidian-public/1.11.7`](https://github.com/Fevol/obsidian-typings/tree/release/obsidian-public/1.11.7)
73
- - Latest `catalyst` release: [`release/obsidian-catalyst/1.12.0`](https://github.com/Fevol/obsidian-typings/tree/release/obsidian-catalyst/1.12.0)
73
+ - Latest `catalyst` release: [`release/obsidian-catalyst/1.12.1`](https://github.com/Fevol/obsidian-typings/tree/release/obsidian-catalyst/1.12.1)
74
74
 
75
75
  Older versions of the package are available, but support for them is limited.
76
76
  In most cases, we recommend to always use the latest release.
@@ -4627,7 +4627,7 @@ declare module "obsidian" {
4627
4627
  *
4628
4628
  * @since 1.10.0
4629
4629
  */
4630
- interface PropertyOption extends BaseOption {
4630
+ interface BasesPropertyOption extends BasesOption {
4631
4631
  /**
4632
4632
  * Default value.
4633
4633
  *
@@ -5465,6 +5465,13 @@ declare module "obsidian" {
5465
5465
  * @since 1.11.4
5466
5466
  */
5467
5467
  interface SecretStorage {
5468
+ /**
5469
+ * Gets the last access timestamp for a secret key
5470
+ * @param id The secret ID
5471
+ * @returns Timestamp in milliseconds, or null if never accessed
5472
+ * @official
5473
+ */
5474
+ getLastAccess(id: string): number | null;
5468
5475
  /**
5469
5476
  * Gets a secret from storage
5470
5477
  *
@@ -5474,14 +5481,6 @@ declare module "obsidian" {
5474
5481
  * @since 1.11.4
5475
5482
  */
5476
5483
  getSecret(id: string): string | null;
5477
- /**
5478
- * Loads all secrets from storage
5479
- *
5480
- * @official
5481
- * @since 1.11.4
5482
- * @deprecated - Added only for typing purposes. Use {@link loadSecrets} instead.
5483
- */
5484
- loadSecrets__(): void;
5485
5484
  /**
5486
5485
  * Lists all secrets in storage
5487
5486
  *
@@ -6428,7 +6427,7 @@ declare module "obsidian" {
6428
6427
  *
6429
6428
  * @since 1.10.2
6430
6429
  */
6431
- interface FileOption extends BaseOption {
6430
+ interface BasesFileOption extends BasesOption {
6432
6431
  /**
6433
6432
  * The default value of the option.
6434
6433
  *
@@ -6467,7 +6466,7 @@ declare module "obsidian" {
6467
6466
  *
6468
6467
  * @since 1.10.2
6469
6468
  */
6470
- interface FolderOption extends BaseOption {
6469
+ interface BasesFolderOption extends BasesOption {
6471
6470
  /**
6472
6471
  * The default value of the option.
6473
6472
  *
@@ -6506,7 +6505,7 @@ declare module "obsidian" {
6506
6505
  *
6507
6506
  * @since 1.10.2
6508
6507
  */
6509
- interface FormulaOption extends BaseOption {
6508
+ interface BasesFormulaOption extends BasesOption {
6510
6509
  /**
6511
6510
  * The default value of the option.
6512
6511
  *
@@ -10032,44 +10031,6 @@ declare module "obsidian" {
10032
10031
  original: string;
10033
10032
  }
10034
10033
  }
10035
- declare module "obsidian" {
10036
- /**
10037
- * Base option.
10038
- *
10039
- * @since 1.10.0
10040
- */
10041
- interface BaseOption {
10042
- /**
10043
- * Display name.
10044
- *
10045
- * @official
10046
- * @since 1.10.0
10047
- */
10048
- displayName: string;
10049
- /**
10050
- * Key.
10051
- *
10052
- * @official
10053
- * @since 1.10.0
10054
- */
10055
- key: string;
10056
- /**
10057
- * If provided, the option will be hidden if the function returns true.
10058
- *
10059
- * @param config - Read-only copy of the current view configuration.
10060
- * @returns `true` if the option should be hidden, false otherwise.
10061
- * @official
10062
- * @since 1.10.2
10063
- */
10064
- shouldHide?: (config: BasesViewConfig) => boolean;
10065
- /**
10066
- * Type
10067
- * @official
10068
- * @since 1.10.0
10069
- */
10070
- type: string;
10071
- }
10072
- }
10073
10034
  declare module "obsidian" {
10074
10035
  /**
10075
10036
  * Base type for all non-null {@link Values}.
@@ -10114,6 +10075,54 @@ declare module "obsidian" {
10114
10075
  toString(): string;
10115
10076
  }
10116
10077
  }
10078
+ declare module "obsidian" {
10079
+ /**
10080
+ * Bases option.
10081
+ *
10082
+ * @since 1.10.0
10083
+ */
10084
+ interface BasesOption {
10085
+ /**
10086
+ * Display name.
10087
+ *
10088
+ * @official
10089
+ * @since 1.10.0
10090
+ */
10091
+ displayName: string;
10092
+ /**
10093
+ * Key.
10094
+ *
10095
+ * @official
10096
+ * @since 1.10.0
10097
+ */
10098
+ key: string;
10099
+ /**
10100
+ * If provided, the option will be hidden if the function returns true.
10101
+ *
10102
+ * @param config - Read-only copy of the current view configuration.
10103
+ * @returns `true` if the option should be hidden, false otherwise.
10104
+ * @official
10105
+ * @since 1.10.2
10106
+ */
10107
+ shouldHide?: () => boolean;
10108
+ /**
10109
+ * Type
10110
+ * @official
10111
+ * @since 1.10.0
10112
+ */
10113
+ type: string;
10114
+ }
10115
+ }
10116
+ declare module "obsidian" {
10117
+ /**
10118
+ * Bases options.
10119
+ *
10120
+ * @since 1.10.0
10121
+ *
10122
+ * @deprecated - Added only for typing purposes. Use {@link BasesOptions} instead.
10123
+ */
10124
+ type BasesOptions__ = BasesDropdownOption | BasesFileOption | BasesFolderOption | BasesFormulaOption | BasesMultitextOption | BasesPropertyOption | BasesSliderOption | BasesTextOption | BasesToggleOption;
10125
+ }
10117
10126
  declare module "obsidian" {
10118
10127
  /**
10119
10128
  * Bases sort config.
@@ -10137,6 +10146,19 @@ declare module "obsidian" {
10137
10146
  property: BasesPropertyId;
10138
10147
  }
10139
10148
  }
10149
+ declare module "obsidian" {
10150
+ /**
10151
+ * BasesOptions and the associated sub-types are configuration-driven settings controls
10152
+ * which can be provided by a {@link BasesViewRegistration} to expose configuration options
10153
+ * to users in the view config menu of the Bases toolbar.
10154
+ *
10155
+ * @public
10156
+ * @since 1.10.0
10157
+ *
10158
+ * @deprecated - Added only for typing purposes. Use {@link BasesAllOptions} instead.
10159
+ */
10160
+ type BasesAllOptions__ = BasesOptions | BasesOptionGroup<BasesOptions>;
10161
+ }
10140
10162
  declare module "obsidian" {
10141
10163
  /**
10142
10164
  * Cached metadata for a note.
@@ -10343,35 +10365,32 @@ declare module "obsidian" {
10343
10365
  *
10344
10366
  * @since 1.10.0
10345
10367
  */
10346
- interface GroupOption {
10368
+ export interface BasesOptionGroup<T extends BasesOption> {
10347
10369
  /**
10348
- * Display name.
10349
- *
10350
- * @official
10370
+ * @public
10351
10371
  * @since 1.10.0
10372
+ * @unofficial ERROR: Missing `@unofficial` or `@official` tag
10352
10373
  */
10353
10374
  displayName: string;
10354
10375
  /**
10355
- * Items.
10356
- *
10357
- * @official
10376
+ * @public
10358
10377
  * @since 1.10.0
10378
+ * @unofficial ERROR: Missing `@unofficial` or `@official` tag
10359
10379
  */
10360
- items: Exclude<ViewOption, GroupOption>[];
10380
+ items: T[];
10361
10381
  /**
10362
10382
  * If provided, the group will be hidden if the function returns true.
10363
10383
  *
10364
- * @param config - Read-only copy of the current view configuration.
10365
- * @returns `true` if the group should be hidden, `false` otherwise.
10366
- * @official
10384
+ * @public
10367
10385
  * @since 1.10.2
10386
+ * @param config - Read-only copy of the current view configuration.
10387
+ * @unofficial ERROR: Missing `@unofficial` or `@official` tag
10368
10388
  */
10369
- shouldHide?: (config: BasesViewConfig) => boolean;
10389
+ shouldHide?: () => boolean;
10370
10390
  /**
10371
- * Type.
10372
- *
10373
- * @official
10391
+ * @public
10374
10392
  * @since 1.10.0
10393
+ * @unofficial ERROR: Missing `@unofficial` or `@official` tag
10375
10394
  */
10376
10395
  type: "group";
10377
10396
  }
@@ -10680,7 +10699,7 @@ declare module "obsidian" {
10680
10699
  * @official
10681
10700
  * @since 1.10.0
10682
10701
  */
10683
- options?: () => ViewOption[];
10702
+ options?: (config: BasesViewConfig) => BasesAllOptions[];
10684
10703
  }
10685
10704
  }
10686
10705
  declare module "obsidian" {
@@ -10936,7 +10955,7 @@ declare module "obsidian" {
10936
10955
  *
10937
10956
  * @since 1.10.0
10938
10957
  */
10939
- interface DropdownOption extends BaseOption {
10958
+ interface BasesDropdownOption extends BasesOption {
10940
10959
  /**
10941
10960
  * Default value.
10942
10961
  *
@@ -12961,7 +12980,7 @@ declare module "obsidian" {
12961
12980
  *
12962
12981
  * @since 1.10.0
12963
12982
  */
12964
- interface MultitextOption extends BaseOption {
12983
+ interface BasesMultitextOption extends BasesOption {
12965
12984
  /**
12966
12985
  * Default value.
12967
12986
  *
@@ -13667,7 +13686,7 @@ declare module "obsidian" {
13667
13686
  *
13668
13687
  * @since 1.10.0
13669
13688
  */
13670
- interface SliderOption extends BaseOption {
13689
+ interface BasesSliderOption extends BasesOption {
13671
13690
  /**
13672
13691
  * Default value.
13673
13692
  *
@@ -13897,7 +13916,7 @@ declare module "obsidian" {
13897
13916
  *
13898
13917
  * @since 1.10.0
13899
13918
  */
13900
- interface TextOption extends BaseOption {
13919
+ interface BasesTextOption extends BasesOption {
13901
13920
  /**
13902
13921
  * Default value.
13903
13922
  *
@@ -16164,7 +16183,7 @@ declare module "obsidian" {
16164
16183
  *
16165
16184
  * @since 1.10.0
16166
16185
  */
16167
- interface ToggleOption extends BaseOption {
16186
+ interface BasesToggleOption extends BasesOption {
16168
16187
  /**
16169
16188
  * Default value.
16170
16189
  *
@@ -16259,17 +16278,6 @@ declare module "obsidian" {
16259
16278
  state?: Record<string, unknown>;
16260
16279
  }
16261
16280
  }
16262
- declare module "obsidian" {
16263
- /**
16264
- * ViewOption and the associated sub-types are configuration-driven settings controls
16265
- * which can be provided by a {@link BasesViewRegistration} to expose configuration options
16266
- * to users in the view config menu of the Bases toolbar.
16267
- *
16268
- * @since 1.10.0
16269
- * @deprecated - Added only for typing purposes. Use {@link ViewOption} instead.
16270
- */
16271
- type ViewOption__ = DropdownOption | FileOption | FolderOption | FormulaOption | GroupOption | MultitextOption | PropertyOption | SliderOption | TextOption | ToggleOption;
16272
- }
16273
16281
  declare module "obsidian" {
16274
16282
  /**
16275
16283
  * Work directly with files and folders inside a vault.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-typings",
3
- "version": "4.96.0",
3
+ "version": "4.97.0",
4
4
  "description": "Extended type definitions for the Obsidian API (https://obsidian.md)",
5
5
  "main": "",
6
6
  "module": "",
@@ -74,7 +74,7 @@
74
74
  "electron": "39.2.7",
75
75
  "i18next": "25.2.1",
76
76
  "mermaid": "11.4.1",
77
- "obsidian": "1.11.4",
77
+ "obsidian": "1.12.0",
78
78
  "pdfjs-dist": "5.3.31",
79
79
  "pixi.js": "7.2.4",
80
80
  "scrypt-js": "3.0.1",