obsidian-typings 2.35.0 → 2.36.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/implementations.d.cts +40 -1
- package/dist/cjs/types.d.cts +49 -4
- package/dist/obsidian-typings.api.json +1285 -0
- package/package.json +1 -1
- package/tools/generateTypes.ts +75 -41
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -5,7 +5,7 @@ import { ChangeDesc, Extension } from '@codemirror/state';
|
|
|
5
5
|
import { EditorView, ViewUpdate } from '@codemirror/view';
|
|
6
6
|
import { App as App$1, BrowserWindow } from 'electron';
|
|
7
7
|
import moment$1 from 'moment';
|
|
8
|
-
import { App, BlockCache, CacheItem, CachedMetadata, CloseableComponent, ColorComponent, Command, Component, DataAdapter, Debouncer, EditableFileView, Editor, EditorPosition, EditorRange, EditorRangeOrCaret, EditorSuggest, EmbedCache, EventRef, Events, FileStats, FileView, FrontmatterLinkCache, HoverLinkSource, HoverPopover, IconName, ItemView, KeymapInfo, LinkCache, MarkdownEditView, MarkdownFileInfo, MarkdownPostProcessorContext, MarkdownPreviewView, MarkdownView, Menu, Modal, PaneType, Platform, Plugin as Plugin$1, PluginManifest, PluginSettingTab, Reference, ReferenceCache, Scope, SearchComponent, SearchResult, Setting, SettingTab, SplitDirection, TAbstractFile, TFile, TFolder, TextComponent, TextFileView, Vault, View, ViewCreator, ViewState, Workspace, WorkspaceLeaf, WorkspaceTabs } from 'obsidian';
|
|
8
|
+
import { 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, Platform, Plugin as Plugin$1, PluginManifest, PluginSettingTab, Reference, ReferenceCache, Scope, SearchComponent, SearchResult, Setting, SettingTab, SplitDirection, TAbstractFile, TFile, TFolder, TextComponent, TextFileView, Vault, View, ViewCreator, ViewState, Workspace, WorkspaceLeaf, WorkspaceTabs } from 'obsidian';
|
|
9
9
|
import { Application, Container, Graphics, Text as Text$1 } from 'pixi.js';
|
|
10
10
|
|
|
11
11
|
/** @public */
|
|
@@ -2011,13 +2011,30 @@ export interface CodeMirrorEditorSearchCursor {
|
|
|
2011
2011
|
to(): EditorPosition | void;
|
|
2012
2012
|
}
|
|
2013
2013
|
/** @public */
|
|
2014
|
+
export interface CommandPaletteModal extends FuzzySuggestModal<Command> {
|
|
2015
|
+
commands: Command[] | null;
|
|
2016
|
+
plugin: CommandPalettePluginInstance;
|
|
2017
|
+
}
|
|
2018
|
+
/** @public */
|
|
2019
|
+
export interface CommandPaletteOptions {
|
|
2020
|
+
pinned: string[];
|
|
2021
|
+
}
|
|
2022
|
+
/** @public */
|
|
2014
2023
|
export interface CommandPalettePlugin extends InternalPlugin<CommandPalettePluginInstance> {
|
|
2015
2024
|
}
|
|
2016
2025
|
/** @public */
|
|
2017
2026
|
export interface CommandPalettePluginInstance extends InternalPluginInstance<CommandPalettePlugin> {
|
|
2018
2027
|
app: App;
|
|
2019
2028
|
defaultOn: true;
|
|
2029
|
+
modal: CommandPaletteModal;
|
|
2030
|
+
options: CommandPaletteOptions;
|
|
2020
2031
|
plugin: CommandPalettePlugin;
|
|
2032
|
+
recentCommands: string[];
|
|
2033
|
+
getCommands(): Command[];
|
|
2034
|
+
onExternalSettingsChange(): Promise<void>;
|
|
2035
|
+
onOpen(): boolean;
|
|
2036
|
+
openCallback(): boolean;
|
|
2037
|
+
saveSettings(plugin: CommandPalettePlugin): void;
|
|
2021
2038
|
}
|
|
2022
2039
|
/** @public */
|
|
2023
2040
|
export interface Commands {
|
|
@@ -5717,6 +5734,28 @@ export interface Submenu {
|
|
|
5717
5734
|
title: string;
|
|
5718
5735
|
}
|
|
5719
5736
|
/** @public */
|
|
5737
|
+
export interface SuggestModalChooser<T, TModal> {
|
|
5738
|
+
chooser: TModal;
|
|
5739
|
+
containerEl: HTMLDivElement;
|
|
5740
|
+
numVisibleItems: number;
|
|
5741
|
+
rowHeight: number;
|
|
5742
|
+
selectedItem: number;
|
|
5743
|
+
suggestions: HTMLDivElement[];
|
|
5744
|
+
values: T[] | null;
|
|
5745
|
+
addMessage(text: string | DocumentFragment): void;
|
|
5746
|
+
addSuggestion(value: T): void;
|
|
5747
|
+
forceSetSelectedItem(index: number, evt: MouseEvent | KeyboardEvent): void;
|
|
5748
|
+
moveDown(evt: KeyboardEvent): false | void;
|
|
5749
|
+
moveUp(evt: KeyboardEvent): false | void;
|
|
5750
|
+
onSuggestionClick(evt: MouseEvent, suggestion: HTMLDivElement): void;
|
|
5751
|
+
onSuggestionMouseover(evt: MouseEvent, suggestion: HTMLDivElement): void;
|
|
5752
|
+
pageDown(evt: KeyboardEvent): false | void;
|
|
5753
|
+
pageUp(evt: KeyboardEvent): false | void;
|
|
5754
|
+
setSelectedItem(index: number, evt: MouseEvent | KeyboardEvent): void;
|
|
5755
|
+
setSuggestions(values: T[]): void;
|
|
5756
|
+
useSelectedItem(evt: MouseEvent | KeyboardEvent): void;
|
|
5757
|
+
}
|
|
5758
|
+
/** @public */
|
|
5720
5759
|
export interface SuggestionContainer<T> {
|
|
5721
5760
|
/**
|
|
5722
5761
|
* Which suggestions should be picked from
|
package/dist/cjs/types.d.cts
CHANGED
|
@@ -11,7 +11,7 @@ import * as fs from 'node:fs';
|
|
|
11
11
|
import { Stats } from 'node:fs';
|
|
12
12
|
import * as fsPromises from 'node:fs/promises';
|
|
13
13
|
import * as path from 'node:path';
|
|
14
|
-
import { App, BlockCache, CacheItem, CachedMetadata, CloseableComponent, ColorComponent, Command, Component, Constructor, DataAdapter, Debouncer, EditableFileView, Editor, EditorPosition, EditorRange, EditorRangeOrCaret, EditorSuggest, EmbedCache, EventRef, Events, FileStats, FileView, FrontmatterLinkCache, HoverLinkSource, HoverPopover, IconName, ItemView, KeymapInfo, LinkCache, MarkdownEditView, MarkdownFileInfo, MarkdownPostProcessorContext, MarkdownPreviewView, MarkdownView, Menu, Modal, Notice as _Notice, ObsidianProtocolData, PaneType, Platform, Plugin as Plugin, PluginManifest, PluginSettingTab, Reference, ReferenceCache, Scope, SearchComponent, SearchResult, Setting, SettingTab, SplitDirection, TAbstractFile, TFile, TFolder, TextComponent, TextFileView, Vault, View, ViewCreator, ViewState, Workspace, WorkspaceLeaf, WorkspaceTabs, request as _request, requestUrl as _requestUrl } from 'obsidian';
|
|
14
|
+
import { App, BlockCache, CacheItem, CachedMetadata, CloseableComponent, ColorComponent, Command, Component, Constructor, 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, Notice as _Notice, ObsidianProtocolData, PaneType, Platform, Plugin as Plugin, PluginManifest, PluginSettingTab, Reference, ReferenceCache, Scope, SearchComponent, SearchResult, Setting, SettingTab, SplitDirection, TAbstractFile, TFile, TFolder, TextComponent, TextFileView, Vault, View, ViewCreator, ViewState, Workspace, WorkspaceLeaf, WorkspaceTabs, request as _request, requestUrl as _requestUrl } from 'obsidian';
|
|
15
15
|
import { Application, Container, Graphics, Text as Text$1 } from 'pixi.js';
|
|
16
16
|
import _TurndownService from 'turndown';
|
|
17
17
|
|
|
@@ -573,9 +573,14 @@ declare module "obsidian" {
|
|
|
573
573
|
declare module "obsidian" {
|
|
574
574
|
/** @todo Documentation incomplete */
|
|
575
575
|
interface SuggestModal<T> extends Modal, ISuggestOwner<T> {
|
|
576
|
+
chooser: SuggestModalChooser<T, this>;
|
|
576
577
|
/** @internal */
|
|
577
|
-
clearButtonEl:
|
|
578
|
+
clearButtonEl: HTMLDivElement;
|
|
578
579
|
ctaEl: HTMLDivElement;
|
|
580
|
+
instructionsEl: HTMLDivElement;
|
|
581
|
+
isOpen: boolean;
|
|
582
|
+
onInput(): void;
|
|
583
|
+
updateSuggestions(): void;
|
|
579
584
|
}
|
|
580
585
|
}
|
|
581
586
|
declare module "obsidian" {
|
|
@@ -2208,9 +2213,10 @@ declare module "obsidian" {
|
|
|
2208
2213
|
/** @internal Background applied to application to dim it */
|
|
2209
2214
|
bgEl: HTMLElement;
|
|
2210
2215
|
/** @internal Opacity percentage of the background */
|
|
2211
|
-
bgOpacity:
|
|
2216
|
+
bgOpacity: string;
|
|
2212
2217
|
/** @internal Whether the background is being dimmed */
|
|
2213
2218
|
dimBackground: boolean;
|
|
2219
|
+
headerEl: HTMLDivElement;
|
|
2214
2220
|
/** @internal Modal container element */
|
|
2215
2221
|
modalEl: HTMLElement;
|
|
2216
2222
|
/** @internal Selection logic handler */
|
|
@@ -2396,7 +2402,7 @@ declare module "obsidian" {
|
|
|
2396
2402
|
/** @internal Scope that this scope is a child of */
|
|
2397
2403
|
parent: Scope | undefined;
|
|
2398
2404
|
/** @internal */
|
|
2399
|
-
|
|
2405
|
+
tabFocusContainerEl: HTMLElement | null;
|
|
2400
2406
|
/**
|
|
2401
2407
|
* @param event - Keyboard event
|
|
2402
2408
|
* @param keypress - Pressed key information
|
|
@@ -5237,13 +5243,30 @@ export interface CodeMirrorEditorSearchCursor {
|
|
|
5237
5243
|
to(): EditorPosition | void;
|
|
5238
5244
|
}
|
|
5239
5245
|
/** @public */
|
|
5246
|
+
export interface CommandPaletteModal extends FuzzySuggestModal<Command> {
|
|
5247
|
+
commands: Command[] | null;
|
|
5248
|
+
plugin: CommandPalettePluginInstance;
|
|
5249
|
+
}
|
|
5250
|
+
/** @public */
|
|
5251
|
+
export interface CommandPaletteOptions {
|
|
5252
|
+
pinned: string[];
|
|
5253
|
+
}
|
|
5254
|
+
/** @public */
|
|
5240
5255
|
export interface CommandPalettePlugin extends InternalPlugin<CommandPalettePluginInstance> {
|
|
5241
5256
|
}
|
|
5242
5257
|
/** @public */
|
|
5243
5258
|
export interface CommandPalettePluginInstance extends InternalPluginInstance<CommandPalettePlugin> {
|
|
5244
5259
|
app: App;
|
|
5245
5260
|
defaultOn: true;
|
|
5261
|
+
modal: CommandPaletteModal;
|
|
5262
|
+
options: CommandPaletteOptions;
|
|
5246
5263
|
plugin: CommandPalettePlugin;
|
|
5264
|
+
recentCommands: string[];
|
|
5265
|
+
getCommands(): Command[];
|
|
5266
|
+
onExternalSettingsChange(): Promise<void>;
|
|
5267
|
+
onOpen(): boolean;
|
|
5268
|
+
openCallback(): boolean;
|
|
5269
|
+
saveSettings(plugin: CommandPalettePlugin): void;
|
|
5247
5270
|
}
|
|
5248
5271
|
/** @public */
|
|
5249
5272
|
export interface Commands {
|
|
@@ -8943,6 +8966,28 @@ export interface Submenu {
|
|
|
8943
8966
|
title: string;
|
|
8944
8967
|
}
|
|
8945
8968
|
/** @public */
|
|
8969
|
+
export interface SuggestModalChooser<T, TModal> {
|
|
8970
|
+
chooser: TModal;
|
|
8971
|
+
containerEl: HTMLDivElement;
|
|
8972
|
+
numVisibleItems: number;
|
|
8973
|
+
rowHeight: number;
|
|
8974
|
+
selectedItem: number;
|
|
8975
|
+
suggestions: HTMLDivElement[];
|
|
8976
|
+
values: T[] | null;
|
|
8977
|
+
addMessage(text: string | DocumentFragment): void;
|
|
8978
|
+
addSuggestion(value: T): void;
|
|
8979
|
+
forceSetSelectedItem(index: number, evt: MouseEvent | KeyboardEvent): void;
|
|
8980
|
+
moveDown(evt: KeyboardEvent): false | void;
|
|
8981
|
+
moveUp(evt: KeyboardEvent): false | void;
|
|
8982
|
+
onSuggestionClick(evt: MouseEvent, suggestion: HTMLDivElement): void;
|
|
8983
|
+
onSuggestionMouseover(evt: MouseEvent, suggestion: HTMLDivElement): void;
|
|
8984
|
+
pageDown(evt: KeyboardEvent): false | void;
|
|
8985
|
+
pageUp(evt: KeyboardEvent): false | void;
|
|
8986
|
+
setSelectedItem(index: number, evt: MouseEvent | KeyboardEvent): void;
|
|
8987
|
+
setSuggestions(values: T[]): void;
|
|
8988
|
+
useSelectedItem(evt: MouseEvent | KeyboardEvent): void;
|
|
8989
|
+
}
|
|
8990
|
+
/** @public */
|
|
8946
8991
|
export interface SuggestionContainer<T> {
|
|
8947
8992
|
/**
|
|
8948
8993
|
* Which suggestions should be picked from
|