obsidian-typings 2.2.1-beta.25 → 2.2.1-beta.26

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +113 -111
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -3200,115 +3200,6 @@ export interface LinkResolverQueue {
3200
3200
  remove(file: TFile): void;
3201
3201
  }
3202
3202
  /** @public */
3203
- export interface PluginsManifestsRecord extends Record<string, PluginManifest> {
3204
- }
3205
- /** @public */
3206
- export interface PluginsPluginsRecord extends Record<string, Plugin$1> {
3207
- }
3208
- /** @public */
3209
- export interface Plugins {
3210
- /**
3211
- * Reference to App
3212
- */
3213
- app: App;
3214
- /**
3215
- * Set of enabled plugin IDs
3216
- *
3217
- * @remark The plugin ids aren't guaranteed to be either active (in `app.plugins.plugins`) or installed (in `app.plugins.manifests`)
3218
- */
3219
- enabledPlugins: Set<string>;
3220
- /** @internal Plugin ID that is currently being enabled */
3221
- loadingPluginId: string | null;
3222
- /**
3223
- * Manifests of all the plugins that are installed
3224
- */
3225
- manifests: PluginsManifestsRecord;
3226
- /**
3227
- * Mapping of plugin ID to active plugin instance
3228
- *
3229
- * @remark Prefer usage of getPlugin to access a plugin
3230
- */
3231
- plugins: PluginsPluginsRecord;
3232
- /**
3233
- * Mapping of plugin ID to available updates
3234
- */
3235
- updates: Map<string, PluginUpdateManifest>;
3236
- /** @internal Check online list for deprecated plugins to automatically disable */
3237
- checkForDeprecations(): Promise<void>;
3238
- /**
3239
- * Check for plugin updates
3240
- */
3241
- checkForUpdates(): Promise<void>;
3242
- /**
3243
- * Unload a plugin by ID
3244
- */
3245
- disablePlugin(id: string): Promise<void>;
3246
- /**
3247
- * Unload a plugin by ID and save config for persistence
3248
- */
3249
- disablePluginAndSave(id: string): Promise<void>;
3250
- /**
3251
- * Enable a plugin by ID
3252
- */
3253
- enablePlugin(id: string): Promise<void>;
3254
- /**
3255
- * Enable a plugin by ID and save config for persistence
3256
- */
3257
- enablePluginAndSave(id: string): Promise<void>;
3258
- /**
3259
- * Get a plugin by ID
3260
- */
3261
- getPlugin(id: string): Plugin$1 | null;
3262
- /**
3263
- * Get the folder where plugins are stored
3264
- */
3265
- getPluginFolder(): string;
3266
- /** @internal Load plugin manifests and enable plugins from config */
3267
- initialize(): Promise<void>;
3268
- /**
3269
- * Install a plugin from a given URL
3270
- */
3271
- installPlugin(repo: string, version: string, manifest: PluginManifest): Promise<void>;
3272
- /**
3273
- * Check whether a plugin is deprecated
3274
- */
3275
- isDeprecated(id: string): boolean;
3276
- /**
3277
- * Check whether community plugins are enabled
3278
- */
3279
- isEnabled(): boolean;
3280
- /**
3281
- * Load a specific plugin's manifest by its folder path
3282
- */
3283
- loadManifest(path: string): Promise<void>;
3284
- /** @internal Load all plugin manifests from plugin folder */
3285
- loadManifests(): Promise<void>;
3286
- /**
3287
- * Load a plugin by its ID
3288
- */
3289
- loadPlugin(id: string): Promise<Plugin$1>;
3290
- /** @internal */
3291
- onRaw(e: unknown): void;
3292
- /** @internal - Save current plugin configs */
3293
- saveConfig(): Promise<void>;
3294
- /** @internal Toggle whether community plugins are enabled */
3295
- setEnable(enabled: boolean): Promise<void>;
3296
- /**
3297
- * Uninstall a plugin by ID
3298
- */
3299
- uninstallPlugin(id: string): Promise<void>;
3300
- /**
3301
- * Unload a plugin by ID
3302
- */
3303
- unloadPlugin(id: string): Promise<void>;
3304
- }
3305
- /** @public */
3306
- export interface MetadataCacheFileCacheRecord extends Record<string, FileCacheEntry> {
3307
- }
3308
- /** @public */
3309
- export interface MetadataCacheMetadataCacheRecord extends Record<string, CachedMetadata> {
3310
- }
3311
- /** @public */
3312
3203
  export interface CustomArrayDictDataRecord<T> extends Record<string, T[]> {
3313
3204
  }
3314
3205
  /** @todo Documentation incomplete */
@@ -3325,6 +3216,12 @@ export interface CustomArrayDict<T> {
3325
3216
  remove(key: string, value: T): void;
3326
3217
  removeKey(key: string): void;
3327
3218
  }
3219
+ /** @public */
3220
+ export interface MetadataCacheFileCacheRecord extends Record<string, FileCacheEntry> {
3221
+ }
3222
+ /** @public */
3223
+ export interface MetadataCacheMetadataCacheRecord extends Record<string, CachedMetadata> {
3224
+ }
3328
3225
  declare module "obsidian" {
3329
3226
  interface MetadataCache extends Events {
3330
3227
  /**
@@ -3335,6 +3232,8 @@ declare module "obsidian" {
3335
3232
  blockCache: BlockCache;
3336
3233
  /** @internal IndexedDB database */
3337
3234
  db: IDBDatabase;
3235
+ didFinish: Debouncer<[
3236
+ ], void>;
3338
3237
  /** @internal File contents cache */
3339
3238
  fileCache: MetadataCacheFileCacheRecord;
3340
3239
  /** @internal Whether the cache is fully loaded */
@@ -3371,7 +3270,7 @@ declare module "obsidian" {
3371
3270
  /** @internal */
3372
3271
  clear(): unknown;
3373
3272
  /** @internal */
3374
- computeMetadataAsync(e: unknown): Promise<unknown>;
3273
+ computeMetadataAsync(arrayBuffer: ArrayBuffer): Promise<void>;
3375
3274
  /** @internal Remove all entries that contain deleted path */
3376
3275
  deletePath(path: string): void;
3377
3276
  /**
@@ -3462,7 +3361,7 @@ declare module "obsidian" {
3462
3361
  /** @internal Bind actions to listeners on vault */
3463
3362
  watchVaultChanges(): void;
3464
3363
  /** @internal Send message to worker to update metadata cache */
3465
- work(cacheEntry: unknown): void;
3364
+ work(arrayBuffer: ArrayBuffer): Promise<CachedMetadata>;
3466
3365
  }
3467
3366
  }
3468
3367
  declare module "obsidian" {
@@ -6476,6 +6375,109 @@ export interface InternalPlugins extends Events {
6476
6375
  /** @internal - Save current plugin configs */
6477
6376
  saveConfig(): Promise<void>;
6478
6377
  }
6378
+ /** @public */
6379
+ export interface PluginsManifestsRecord extends Record<string, PluginManifest> {
6380
+ }
6381
+ /** @public */
6382
+ export interface PluginsPluginsRecord extends Record<string, Plugin$1> {
6383
+ }
6384
+ /** @public */
6385
+ export interface Plugins {
6386
+ /**
6387
+ * Reference to App
6388
+ */
6389
+ app: App;
6390
+ /**
6391
+ * Set of enabled plugin IDs
6392
+ *
6393
+ * @remark The plugin ids aren't guaranteed to be either active (in `app.plugins.plugins`) or installed (in `app.plugins.manifests`)
6394
+ */
6395
+ enabledPlugins: Set<string>;
6396
+ /** @internal Plugin ID that is currently being enabled */
6397
+ loadingPluginId: string | null;
6398
+ /**
6399
+ * Manifests of all the plugins that are installed
6400
+ */
6401
+ manifests: PluginsManifestsRecord;
6402
+ /**
6403
+ * Mapping of plugin ID to active plugin instance
6404
+ *
6405
+ * @remark Prefer usage of getPlugin to access a plugin
6406
+ */
6407
+ plugins: PluginsPluginsRecord;
6408
+ /**
6409
+ * Mapping of plugin ID to available updates
6410
+ */
6411
+ updates: Map<string, PluginUpdateManifest>;
6412
+ /** @internal Check online list for deprecated plugins to automatically disable */
6413
+ checkForDeprecations(): Promise<void>;
6414
+ /**
6415
+ * Check for plugin updates
6416
+ */
6417
+ checkForUpdates(): Promise<void>;
6418
+ /**
6419
+ * Unload a plugin by ID
6420
+ */
6421
+ disablePlugin(id: string): Promise<void>;
6422
+ /**
6423
+ * Unload a plugin by ID and save config for persistence
6424
+ */
6425
+ disablePluginAndSave(id: string): Promise<void>;
6426
+ /**
6427
+ * Enable a plugin by ID
6428
+ */
6429
+ enablePlugin(id: string): Promise<void>;
6430
+ /**
6431
+ * Enable a plugin by ID and save config for persistence
6432
+ */
6433
+ enablePluginAndSave(id: string): Promise<void>;
6434
+ /**
6435
+ * Get a plugin by ID
6436
+ */
6437
+ getPlugin(id: string): Plugin$1 | null;
6438
+ /**
6439
+ * Get the folder where plugins are stored
6440
+ */
6441
+ getPluginFolder(): string;
6442
+ /** @internal Load plugin manifests and enable plugins from config */
6443
+ initialize(): Promise<void>;
6444
+ /**
6445
+ * Install a plugin from a given URL
6446
+ */
6447
+ installPlugin(repo: string, version: string, manifest: PluginManifest): Promise<void>;
6448
+ /**
6449
+ * Check whether a plugin is deprecated
6450
+ */
6451
+ isDeprecated(id: string): boolean;
6452
+ /**
6453
+ * Check whether community plugins are enabled
6454
+ */
6455
+ isEnabled(): boolean;
6456
+ /**
6457
+ * Load a specific plugin's manifest by its folder path
6458
+ */
6459
+ loadManifest(path: string): Promise<void>;
6460
+ /** @internal Load all plugin manifests from plugin folder */
6461
+ loadManifests(): Promise<void>;
6462
+ /**
6463
+ * Load a plugin by its ID
6464
+ */
6465
+ loadPlugin(id: string): Promise<Plugin$1>;
6466
+ /** @internal */
6467
+ onRaw(e: unknown): void;
6468
+ /** @internal - Save current plugin configs */
6469
+ saveConfig(): Promise<void>;
6470
+ /** @internal Toggle whether community plugins are enabled */
6471
+ setEnable(enabled: boolean): Promise<void>;
6472
+ /**
6473
+ * Uninstall a plugin by ID
6474
+ */
6475
+ uninstallPlugin(id: string): Promise<void>;
6476
+ /**
6477
+ * Unload a plugin by ID
6478
+ */
6479
+ unloadPlugin(id: string): Promise<void>;
6480
+ }
6479
6481
  declare module "obsidian" {
6480
6482
  interface App {
6481
6483
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-typings",
3
- "version": "2.2.1-beta.25",
3
+ "version": "2.2.1-beta.26",
4
4
  "description": "Extended type definitions for the Obsidian API (https://obsidian.md)",
5
5
  "main": "",
6
6
  "module": "",