obsidian-typings 2.25.0 → 2.26.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 +389 -262
- package/dist/cjs/types.d.cts +436 -358
- package/dist/obsidian-typings.api.json +6221 -998
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
3
|
import { SearchQuery } from '@codemirror/search';
|
|
4
|
-
import { ChangeDesc,
|
|
4
|
+
import { ChangeDesc, Extension } from '@codemirror/state';
|
|
5
5
|
import { EditorView, ViewUpdate } from '@codemirror/view';
|
|
6
6
|
import { BrowserWindow } from 'electron';
|
|
7
7
|
import moment$1 from 'moment';
|
|
8
|
-
import { App, BlockCache, CachedMetadata, CloseableComponent, ColorComponent, Command, Component, DataAdapter, Debouncer, EditableFileView, Editor, EditorPosition, EditorRange, EditorSuggest, EmbedCache, EventRef, Events, FileStats, FileView, FrontmatterLinkCache, HoverLinkSource, HoverPopover, IconName, ItemView, KeymapInfo, LinkCache,
|
|
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';
|
|
9
9
|
import { Application, Container, Graphics, Text as Text$1 } from 'pixi.js';
|
|
10
10
|
|
|
11
11
|
/** @public */
|
|
@@ -366,6 +366,10 @@ export interface Account {
|
|
|
366
366
|
seats: number;
|
|
367
367
|
token: string;
|
|
368
368
|
}
|
|
369
|
+
/** @public */
|
|
370
|
+
export interface AddOverlayOptions {
|
|
371
|
+
query: RegExp;
|
|
372
|
+
}
|
|
369
373
|
/** @todo Documentation incomplete */
|
|
370
374
|
/** @public */
|
|
371
375
|
export interface AllPropertiesView extends ItemView {
|
|
@@ -437,9 +441,7 @@ export interface AppConstructor extends ConstructorBase<[
|
|
|
437
441
|
/** @public */
|
|
438
442
|
export interface AppMenuBarManager {
|
|
439
443
|
app: App;
|
|
440
|
-
constructor:
|
|
441
|
-
updateMenuItems(arg1: unknown, arg2: unknown): unknown;
|
|
442
|
-
};
|
|
444
|
+
constructor: AppMenuBarManagerConstructor;
|
|
443
445
|
onLayoutChange: Debouncer<[
|
|
444
446
|
], unknown>;
|
|
445
447
|
onWindowFrameChange: Debouncer<[
|
|
@@ -457,6 +459,10 @@ export interface AppMenuBarManager {
|
|
|
457
459
|
updateWorkspace(): unknown;
|
|
458
460
|
}
|
|
459
461
|
/** @public */
|
|
462
|
+
export interface AppMenuBarManagerConstructor {
|
|
463
|
+
updateMenuItems(arg1: unknown, arg2: unknown): unknown;
|
|
464
|
+
}
|
|
465
|
+
/** @public */
|
|
460
466
|
export interface AppSetting extends Modal {
|
|
461
467
|
/**
|
|
462
468
|
* Current active tab of the settings modal
|
|
@@ -643,12 +649,7 @@ export interface AppVaultConfig {
|
|
|
643
649
|
/**
|
|
644
650
|
* Saved on executing 'Export to PDF' command
|
|
645
651
|
*/
|
|
646
|
-
pdfExportSettings?:
|
|
647
|
-
pageSize: "letter" | string;
|
|
648
|
-
landscape: false | boolean;
|
|
649
|
-
margin: "0" | string;
|
|
650
|
-
downscalePercent: 100 | number;
|
|
651
|
-
};
|
|
652
|
+
pdfExportSettings?: PdfExportSettings;
|
|
652
653
|
/**
|
|
653
654
|
* Files & Links \> Confirm line deletion
|
|
654
655
|
*/
|
|
@@ -795,18 +796,14 @@ export interface BBox {
|
|
|
795
796
|
}
|
|
796
797
|
/** @public */
|
|
797
798
|
export interface BacklinkPlugin extends InternalPlugin<BacklinkPluginInstance> {
|
|
798
|
-
views:
|
|
799
|
-
backlink(left: WorkspaceLeaf): BacklinkView;
|
|
800
|
-
};
|
|
799
|
+
views: BacklinkPluginViews;
|
|
801
800
|
}
|
|
802
801
|
/** @public */
|
|
803
802
|
export interface BacklinkPluginInstance extends InternalPluginInstance<BacklinkPlugin> {
|
|
804
803
|
app: App;
|
|
805
804
|
defaultOn: true;
|
|
806
805
|
file?: TFile | null;
|
|
807
|
-
options:
|
|
808
|
-
backlinkInDocument?: boolean;
|
|
809
|
-
};
|
|
806
|
+
options: BacklinkPluginInstanceOptions;
|
|
810
807
|
plugin: BacklinkPlugin;
|
|
811
808
|
initLeaf(): void;
|
|
812
809
|
onEnable(app: App, plugin: BacklinkPlugin): Promise<void>;
|
|
@@ -819,12 +816,18 @@ export interface BacklinkPluginInstance extends InternalPluginInstance<BacklinkP
|
|
|
819
816
|
toggleBacklinksInDocument(skip: boolean): boolean | undefined;
|
|
820
817
|
updateBacklinks(): void;
|
|
821
818
|
}
|
|
819
|
+
/** @public */
|
|
820
|
+
export interface BacklinkPluginInstanceOptions {
|
|
821
|
+
backlinkInDocument?: boolean;
|
|
822
|
+
}
|
|
823
|
+
/** @public */
|
|
824
|
+
export interface BacklinkPluginViews extends Record<string, ViewCreator> {
|
|
825
|
+
backlink(left: WorkspaceLeaf): BacklinkView;
|
|
826
|
+
}
|
|
822
827
|
/** @todo Documentation incomplete */
|
|
823
828
|
/** @public */
|
|
824
829
|
export interface BacklinkView extends InfoFileView {
|
|
825
|
-
backlink:
|
|
826
|
-
recomputeBacklink: (backlinkFile: TFile) => void;
|
|
827
|
-
};
|
|
830
|
+
backlink: BacklinkViewBacklink;
|
|
828
831
|
/**
|
|
829
832
|
* Get the current view type
|
|
830
833
|
*/
|
|
@@ -837,6 +840,10 @@ export interface BacklinkView extends InfoFileView {
|
|
|
837
840
|
update(): void;
|
|
838
841
|
}
|
|
839
842
|
/** @public */
|
|
843
|
+
export interface BacklinkViewBacklink {
|
|
844
|
+
recomputeBacklink(backlinkFile: TFile): void;
|
|
845
|
+
}
|
|
846
|
+
/** @public */
|
|
840
847
|
export interface BacklinkViewConstructor extends TypedViewConstructor<BacklinkView> {
|
|
841
848
|
}
|
|
842
849
|
/**
|
|
@@ -957,9 +964,7 @@ export interface BookmarkItem {
|
|
|
957
964
|
}
|
|
958
965
|
/** @public */
|
|
959
966
|
export interface BookmarksPlugin extends InternalPlugin<BookmarksPluginInstance> {
|
|
960
|
-
views:
|
|
961
|
-
bookmarks(left: WorkspaceLeaf): BookmarksView;
|
|
962
|
-
};
|
|
967
|
+
views: BookmarksPluginViews;
|
|
963
968
|
}
|
|
964
969
|
/** @public */
|
|
965
970
|
export interface BookmarksPluginInstance extends InternalPluginInstance<BookmarksPlugin>, Events {
|
|
@@ -1001,6 +1006,10 @@ export interface BookmarksPluginInstance extends InternalPluginInstance<Bookmark
|
|
|
1001
1006
|
saveData(): void;
|
|
1002
1007
|
updateTabHeaders(): void;
|
|
1003
1008
|
}
|
|
1009
|
+
/** @public */
|
|
1010
|
+
export interface BookmarksPluginViews extends Record<string, ViewCreator> {
|
|
1011
|
+
bookmarks(left: WorkspaceLeaf): BookmarksView;
|
|
1012
|
+
}
|
|
1004
1013
|
/** @todo Documentation incomplete */
|
|
1005
1014
|
/** @public */
|
|
1006
1015
|
export interface BookmarksView extends ItemView {
|
|
@@ -1064,6 +1073,11 @@ export interface BookmarksViewConstructor extends TypedViewConstructor<Bookmarks
|
|
|
1064
1073
|
bookmarksPluginInstance: BookmarksPluginInstance
|
|
1065
1074
|
]> {
|
|
1066
1075
|
}
|
|
1076
|
+
/** @public */
|
|
1077
|
+
export interface Bracket {
|
|
1078
|
+
pos: EditorPosition;
|
|
1079
|
+
ch: string;
|
|
1080
|
+
}
|
|
1067
1081
|
/** @todo Documentation incomplete */
|
|
1068
1082
|
/** @public */
|
|
1069
1083
|
export interface BrowserHistoryView extends ItemView {
|
|
@@ -1195,6 +1209,10 @@ export interface BrowserViewConstructor extends TypedViewConstructor<BrowserView
|
|
|
1195
1209
|
]> {
|
|
1196
1210
|
}
|
|
1197
1211
|
/** @public */
|
|
1212
|
+
export interface Btime {
|
|
1213
|
+
btime(path: string, btime: number): void;
|
|
1214
|
+
}
|
|
1215
|
+
/** @public */
|
|
1198
1216
|
export interface CanvasConnection {
|
|
1199
1217
|
}
|
|
1200
1218
|
/** @public */
|
|
@@ -1265,16 +1283,7 @@ export interface CanvasPluginInstance extends InternalPluginInstance<CanvasPlugi
|
|
|
1265
1283
|
defaultOn: true;
|
|
1266
1284
|
index: CanvasIndex;
|
|
1267
1285
|
localDataManager: CanvasDataManager;
|
|
1268
|
-
options:
|
|
1269
|
-
cardLabelVisibility?: "always" | "hover" | "never";
|
|
1270
|
-
defaultModDragBehavior?: "card" | "group" | "media" | "menu" | "note" | "webpage";
|
|
1271
|
-
defaultWheelBehavior?: "pan" | "zoom";
|
|
1272
|
-
newFileLocation?: "root" | "current" | "folder";
|
|
1273
|
-
newFileFolderPath?: string;
|
|
1274
|
-
snapToGrid?: boolean;
|
|
1275
|
-
snapToObjects?: boolean;
|
|
1276
|
-
zoomBreakpoint?: number;
|
|
1277
|
-
};
|
|
1286
|
+
options: CanvasPluginInstanceOptions;
|
|
1278
1287
|
plugin: CanvasPlugin;
|
|
1279
1288
|
renameQueue: PromisedQueue;
|
|
1280
1289
|
renames: unknown[];
|
|
@@ -1282,6 +1291,17 @@ export interface CanvasPluginInstance extends InternalPluginInstance<CanvasPlugi
|
|
|
1282
1291
|
], unknown>;
|
|
1283
1292
|
}
|
|
1284
1293
|
/** @public */
|
|
1294
|
+
export interface CanvasPluginInstanceOptions {
|
|
1295
|
+
cardLabelVisibility?: "always" | "hover" | "never";
|
|
1296
|
+
defaultModDragBehavior?: "card" | "group" | "media" | "menu" | "note" | "webpage";
|
|
1297
|
+
defaultWheelBehavior?: "pan" | "zoom";
|
|
1298
|
+
newFileLocation?: "root" | "current" | "folder";
|
|
1299
|
+
newFileFolderPath?: string;
|
|
1300
|
+
snapToGrid?: boolean;
|
|
1301
|
+
snapToObjects?: boolean;
|
|
1302
|
+
zoomBreakpoint?: number;
|
|
1303
|
+
}
|
|
1304
|
+
/** @public */
|
|
1285
1305
|
export interface CanvasRectEx {
|
|
1286
1306
|
cx: number;
|
|
1287
1307
|
cy: number;
|
|
@@ -1730,22 +1750,35 @@ export interface CapacitorAdapterFs {
|
|
|
1730
1750
|
open(realPath: string): Promise<void>;
|
|
1731
1751
|
read(realPath: string): Promise<string>;
|
|
1732
1752
|
readBinary(realPath: string): Promise<ArrayBuffer>;
|
|
1733
|
-
readdir(realPath: string):
|
|
1753
|
+
readdir(realPath: string): Promise<CapacitorFileEntry[]>;
|
|
1734
1754
|
rename(realPath: string, newRealPath: string): Promise<void>;
|
|
1735
1755
|
rmdir(realPath: string): Promise<void>;
|
|
1736
1756
|
setTimes(realPath: string, ctime: number, mtime: number): Promise<void>;
|
|
1737
|
-
stat(realPath: string): Promise<
|
|
1757
|
+
stat(realPath: string): Promise<CapacitorFileEntry>;
|
|
1738
1758
|
trash(realPath: string): Promise<void>;
|
|
1739
1759
|
verifyIcloud(realPath: string): Promise<void>;
|
|
1740
1760
|
watch(realPath: string): Promise<void>;
|
|
1741
1761
|
watchAndStatAll(realPath: string): Promise<{
|
|
1742
|
-
children:
|
|
1762
|
+
children: CapacitorFileEntry[];
|
|
1743
1763
|
}>;
|
|
1744
1764
|
write(realPath: string, data: string): Promise<void>;
|
|
1745
1765
|
writeBinary(realPath: string, data: ArrayBuffer): Promise<void>;
|
|
1746
1766
|
writeBinaryInternal(realPath: string, data: ArrayBuffer): Promise<void>;
|
|
1747
1767
|
}
|
|
1748
1768
|
/** @public */
|
|
1769
|
+
export interface CapacitorFileEntry extends Partial<FileStats> {
|
|
1770
|
+
name: string;
|
|
1771
|
+
type: "file" | "directory";
|
|
1772
|
+
uri: string;
|
|
1773
|
+
}
|
|
1774
|
+
/** @public */
|
|
1775
|
+
export interface ClickableToken {
|
|
1776
|
+
start: EditorPosition;
|
|
1777
|
+
end: EditorPosition;
|
|
1778
|
+
text: string;
|
|
1779
|
+
type: string;
|
|
1780
|
+
}
|
|
1781
|
+
/** @public */
|
|
1749
1782
|
export interface ClipboardManager {
|
|
1750
1783
|
/**
|
|
1751
1784
|
* Reference to the app
|
|
@@ -1797,16 +1830,9 @@ export interface ClipboardManager {
|
|
|
1797
1830
|
saveAttachment(name: string, extension: string, data: ArrayBuffer, replace: boolean): Promise<void>;
|
|
1798
1831
|
}
|
|
1799
1832
|
/** @public */
|
|
1800
|
-
export interface
|
|
1833
|
+
export interface CodeMirrorAdapterEx {
|
|
1801
1834
|
new (cm6: VimEditor): CodeMirrorEditor;
|
|
1802
|
-
commands:
|
|
1803
|
-
cursorCharLeft(editor: CodeMirrorEditor): void;
|
|
1804
|
-
redo(editor: CodeMirrorEditor): void;
|
|
1805
|
-
undo(editor: CodeMirrorEditor): void;
|
|
1806
|
-
newlineAndIndent(editor: CodeMirrorEditor): void;
|
|
1807
|
-
newlineAndIndentBefore(editor: CodeMirrorEditor): void;
|
|
1808
|
-
indentAuto(editor: CodeMirrorEditor): void;
|
|
1809
|
-
};
|
|
1835
|
+
commands: CodeMirrorAdapterExCommands;
|
|
1810
1836
|
isMac: boolean;
|
|
1811
1837
|
keyMap: Record<string, unknown>;
|
|
1812
1838
|
keys: Record<string, unknown>;
|
|
@@ -1817,14 +1843,11 @@ export interface CodeMirrorAdapter2 {
|
|
|
1817
1843
|
defineOption(option: string, defaultValue: unknown, handler: () => void): void;
|
|
1818
1844
|
e_preventDefault(event: Event): void;
|
|
1819
1845
|
e_stop(event: Event): void;
|
|
1820
|
-
findEnclosingTag(doc:
|
|
1821
|
-
|
|
1822
|
-
close: EditorRange2;
|
|
1823
|
-
} | undefined;
|
|
1824
|
-
findMatchingTag(doc: CodeMirrorAdapter2, pos: EditorPosition): void;
|
|
1846
|
+
findEnclosingTag(doc: CodeMirrorAdapterEx, pos: EditorPosition): EnclosingTag | undefined;
|
|
1847
|
+
findMatchingTag(doc: CodeMirrorAdapterEx, pos: EditorPosition): void;
|
|
1825
1848
|
isWordChar(char: string): boolean;
|
|
1826
1849
|
keyName(event: KeyboardEvent): string;
|
|
1827
|
-
lookupKey(key: string, context: unknown, callback: (action: (codeMirrorAdapter:
|
|
1850
|
+
lookupKey(key: string, context: unknown, callback: (action: (codeMirrorAdapter: CodeMirrorAdapterEx) => boolean) => void): void;
|
|
1828
1851
|
off(event: string, listener: EventListenerOrEventListenerObject): void;
|
|
1829
1852
|
on(event: string, listener: EventListenerOrEventListenerObject): void;
|
|
1830
1853
|
rmClass(element: HTMLElement, className: string): void;
|
|
@@ -1832,30 +1855,26 @@ export interface CodeMirrorAdapter2 {
|
|
|
1832
1855
|
vimKey(event: KeyboardEvent): string;
|
|
1833
1856
|
}
|
|
1834
1857
|
/** @public */
|
|
1858
|
+
export interface CodeMirrorAdapterExCommands {
|
|
1859
|
+
cursorCharLeft(editor: CodeMirrorEditor): void;
|
|
1860
|
+
redo(editor: CodeMirrorEditor): void;
|
|
1861
|
+
undo(editor: CodeMirrorEditor): void;
|
|
1862
|
+
newlineAndIndent(editor: CodeMirrorEditor): void;
|
|
1863
|
+
newlineAndIndentBefore(editor: CodeMirrorEditor): void;
|
|
1864
|
+
indentAuto(editor: CodeMirrorEditor): void;
|
|
1865
|
+
}
|
|
1866
|
+
/** @public */
|
|
1835
1867
|
export interface CodeMirrorEditor {
|
|
1836
|
-
$lineHandleChanges:
|
|
1837
|
-
|
|
1838
|
-
}[] | undefined;
|
|
1839
|
-
addOverlay(options: {
|
|
1840
|
-
query: RegExp;
|
|
1841
|
-
}): SearchQuery | undefined;
|
|
1868
|
+
$lineHandleChanges: LineHandleChange[] | undefined;
|
|
1869
|
+
addOverlay(options: AddOverlayOptions): SearchQuery | undefined;
|
|
1842
1870
|
blur(): void;
|
|
1843
|
-
charCoords(pos: EditorPosition, mode: "local" | "page" | "window" | "div"):
|
|
1844
|
-
left: number;
|
|
1845
|
-
top: number;
|
|
1846
|
-
bottom: number;
|
|
1847
|
-
};
|
|
1871
|
+
charCoords(pos: EditorPosition, mode: "local" | "page" | "window" | "div"): Coords;
|
|
1848
1872
|
clipPos(pos: EditorPosition): EditorPosition;
|
|
1849
|
-
coordsChar(coords:
|
|
1850
|
-
left: number;
|
|
1851
|
-
top: number;
|
|
1852
|
-
}, mode: "local" | "page" | "window" | "div"): EditorPosition;
|
|
1873
|
+
coordsChar(coords: Coords, mode: "local" | "page" | "window" | "div"): EditorPosition;
|
|
1853
1874
|
defaultTextHeight(): number;
|
|
1854
1875
|
destroy(): void;
|
|
1855
1876
|
execCommand(command: string): void;
|
|
1856
|
-
findMatchingBracket(pos: EditorPosition):
|
|
1857
|
-
to?: EditorPosition;
|
|
1858
|
-
};
|
|
1877
|
+
findMatchingBracket(pos: EditorPosition): MatchingBracket;
|
|
1859
1878
|
findPosV(start: EditorPosition, amount: number, unit: "line" | "page", goalColumn: number): EditorPosition;
|
|
1860
1879
|
firstLine(): number;
|
|
1861
1880
|
focus(): void;
|
|
@@ -1868,38 +1887,17 @@ export interface CodeMirrorEditor {
|
|
|
1868
1887
|
getLineHandle(line: number): LineHandle;
|
|
1869
1888
|
getLineNumber(handle: LineHandle): number | null;
|
|
1870
1889
|
getMainSelection(): EditorSelection;
|
|
1871
|
-
getMode():
|
|
1872
|
-
name: string;
|
|
1873
|
-
};
|
|
1890
|
+
getMode(): CodeMirrorEditorMode;
|
|
1874
1891
|
getOption(option: string): unknown;
|
|
1875
1892
|
getRange(from: EditorPosition, to: EditorPosition): string;
|
|
1876
|
-
getScrollInfo():
|
|
1877
|
-
|
|
1878
|
-
top: number;
|
|
1879
|
-
height: number;
|
|
1880
|
-
width: number;
|
|
1881
|
-
clientHeight: number;
|
|
1882
|
-
clientWidth: number;
|
|
1883
|
-
};
|
|
1884
|
-
getSearchCursor(query: RegExp, pos: EditorPosition): {
|
|
1885
|
-
findNext(): boolean;
|
|
1886
|
-
findPrevious(): boolean;
|
|
1887
|
-
find(reverse?: boolean): boolean;
|
|
1888
|
-
from(): EditorPosition | void;
|
|
1889
|
-
to(): EditorPosition | void;
|
|
1890
|
-
replace(text: string): void;
|
|
1891
|
-
};
|
|
1893
|
+
getScrollInfo(): ScrollInfo;
|
|
1894
|
+
getSearchCursor(query: RegExp, pos: EditorPosition): CodeMirrorEditorSearchCursor;
|
|
1892
1895
|
getSelection(): string;
|
|
1893
1896
|
getSelections(): string[];
|
|
1894
1897
|
getTokenTypeAt(pos: EditorPosition): string;
|
|
1895
1898
|
getValue(): string;
|
|
1896
1899
|
getWrapperElement(): HTMLElement;
|
|
1897
|
-
hardWrap(options:
|
|
1898
|
-
column?: number;
|
|
1899
|
-
from?: number;
|
|
1900
|
-
to?: number;
|
|
1901
|
-
allowMerge?: boolean;
|
|
1902
|
-
}): void;
|
|
1900
|
+
hardWrap(options: HardWrapOptions): void;
|
|
1903
1901
|
indentLess(): void;
|
|
1904
1902
|
indentLine(line: number, more?: boolean): void;
|
|
1905
1903
|
indentMore(): void;
|
|
@@ -1916,15 +1914,10 @@ export interface CodeMirrorEditor {
|
|
|
1916
1914
|
off(event: string, listener: EventListenerOrEventListenerObject): void;
|
|
1917
1915
|
on(event: string, listener: EventListenerOrEventListenerObject): void;
|
|
1918
1916
|
onBeforeEndOperation(): void;
|
|
1919
|
-
onChange(lineHandleChange:
|
|
1920
|
-
changes: ChangeDesc;
|
|
1921
|
-
}): void;
|
|
1917
|
+
onChange(lineHandleChange: LineHandleChange): void;
|
|
1922
1918
|
onSelectionChange(): void;
|
|
1923
1919
|
openDialog(template: string, keyValidator: (keyValue: string) => boolean, options?: Partial<OpenDialogOptions>): void;
|
|
1924
|
-
openNotification(message: string, options?:
|
|
1925
|
-
duration?: number;
|
|
1926
|
-
bottom?: boolean;
|
|
1927
|
-
}): () => void;
|
|
1920
|
+
openNotification(message: string, options?: OpenNotificationOptions): () => void;
|
|
1928
1921
|
operation<T>(fn: () => T): T;
|
|
1929
1922
|
overWriteSelection(text: string): void;
|
|
1930
1923
|
posFromIndex(index: number): EditorPosition;
|
|
@@ -1934,28 +1927,14 @@ export interface CodeMirrorEditor {
|
|
|
1934
1927
|
replaceRange(text: string, from: EditorPosition, to?: EditorPosition): void;
|
|
1935
1928
|
replaceSelection(text: string): void;
|
|
1936
1929
|
replaceSelections(texts: string[]): void;
|
|
1937
|
-
scanForBracket(from: EditorPosition, direction: number, style?: string):
|
|
1938
|
-
|
|
1939
|
-
ch: string;
|
|
1940
|
-
} | null;
|
|
1941
|
-
scrollInfo(): {
|
|
1942
|
-
left: number;
|
|
1943
|
-
top: number;
|
|
1944
|
-
height: number;
|
|
1945
|
-
width: number;
|
|
1946
|
-
clientHeight: number;
|
|
1947
|
-
clientWidth: number;
|
|
1948
|
-
};
|
|
1930
|
+
scanForBracket(from: EditorPosition, direction: number, style?: string): Bracket | null;
|
|
1931
|
+
scrollInfo(): ScrollInfo;
|
|
1949
1932
|
scrollIntoView(pos?: EditorPosition, margin?: number): void;
|
|
1950
1933
|
scrollTo(x?: number, y?: number): void;
|
|
1951
|
-
setBookmark(pos: EditorPosition, options?:
|
|
1952
|
-
insertLeft?: boolean;
|
|
1953
|
-
}): Bookmark;
|
|
1934
|
+
setBookmark(pos: EditorPosition, options?: SetBookmarkOptions): Bookmark;
|
|
1954
1935
|
setCursor(line: number, ch: number): void;
|
|
1955
1936
|
setOption(option: string, value: unknown): void;
|
|
1956
|
-
setSelection(anchor: EditorPosition, head: EditorPosition, options?:
|
|
1957
|
-
origin?: string;
|
|
1958
|
-
}): void;
|
|
1937
|
+
setSelection(anchor: EditorPosition, head: EditorPosition, options?: SetSelectionOptions): void;
|
|
1959
1938
|
setSelections(selections: EditorSelection[], primaryIndex?: number): void;
|
|
1960
1939
|
setSize(width: number, height: number): void;
|
|
1961
1940
|
setValue(content: string): void;
|
|
@@ -1965,6 +1944,19 @@ export interface CodeMirrorEditor {
|
|
|
1965
1944
|
virtualSelectionMode(): boolean;
|
|
1966
1945
|
}
|
|
1967
1946
|
/** @public */
|
|
1947
|
+
export interface CodeMirrorEditorMode {
|
|
1948
|
+
name: string;
|
|
1949
|
+
}
|
|
1950
|
+
/** @public */
|
|
1951
|
+
export interface CodeMirrorEditorSearchCursor {
|
|
1952
|
+
findNext(): boolean;
|
|
1953
|
+
findPrevious(): boolean;
|
|
1954
|
+
find(reverse?: boolean): boolean;
|
|
1955
|
+
from(): EditorPosition | void;
|
|
1956
|
+
to(): EditorPosition | void;
|
|
1957
|
+
replace(text: string): void;
|
|
1958
|
+
}
|
|
1959
|
+
/** @public */
|
|
1968
1960
|
export interface CommandPalettePlugin extends InternalPlugin<CommandPalettePluginInstance> {
|
|
1969
1961
|
}
|
|
1970
1962
|
/** @public */
|
|
@@ -2040,6 +2032,18 @@ export interface ConstructorBase<Args extends unknown[], Instance> {
|
|
|
2040
2032
|
new (...args: Args): Instance;
|
|
2041
2033
|
prototype: Instance;
|
|
2042
2034
|
}
|
|
2035
|
+
/** @public */
|
|
2036
|
+
export interface Coords {
|
|
2037
|
+
left: number;
|
|
2038
|
+
right: number;
|
|
2039
|
+
top: number;
|
|
2040
|
+
bottom: number;
|
|
2041
|
+
}
|
|
2042
|
+
/** @public */
|
|
2043
|
+
export interface CoordsLeftTop {
|
|
2044
|
+
left: number;
|
|
2045
|
+
top: number;
|
|
2046
|
+
}
|
|
2043
2047
|
/** @todo Documentation incomplete */
|
|
2044
2048
|
/** @public */
|
|
2045
2049
|
export interface CustomArrayDict<T> {
|
|
@@ -2123,9 +2127,7 @@ export interface CustomCSS extends Component {
|
|
|
2123
2127
|
*
|
|
2124
2128
|
* @returns String obsidian.css contents
|
|
2125
2129
|
*/
|
|
2126
|
-
downloadLegacyTheme(
|
|
2127
|
-
repo: string;
|
|
2128
|
-
}): Promise<string>;
|
|
2130
|
+
downloadLegacyTheme(options: DownloadLegacyThemeOptions): Promise<string>;
|
|
2129
2131
|
/**
|
|
2130
2132
|
* Enable translucency of application background
|
|
2131
2133
|
*/
|
|
@@ -2166,19 +2168,11 @@ export interface CustomCSS extends Component {
|
|
|
2166
2168
|
*
|
|
2167
2169
|
* @remark Name will be used as the folder name for the theme
|
|
2168
2170
|
*/
|
|
2169
|
-
installLegacyTheme(
|
|
2170
|
-
name: string;
|
|
2171
|
-
repo: string;
|
|
2172
|
-
author: string;
|
|
2173
|
-
}): Promise<void>;
|
|
2171
|
+
installLegacyTheme(options: InstallThemeOptions): Promise<void>;
|
|
2174
2172
|
/**
|
|
2175
2173
|
* Install a theme using the regular theme download pipeline
|
|
2176
2174
|
*/
|
|
2177
|
-
installTheme(
|
|
2178
|
-
name: string;
|
|
2179
|
-
repo: string;
|
|
2180
|
-
author: string;
|
|
2181
|
-
}, version: string): Promise<void>;
|
|
2175
|
+
installTheme(options: InstallThemeOptions, version: string): Promise<void>;
|
|
2182
2176
|
/**
|
|
2183
2177
|
* Check whether a specific theme is installed by theme name
|
|
2184
2178
|
*/
|
|
@@ -2274,6 +2268,10 @@ export interface Dimensions {
|
|
|
2274
2268
|
height: number;
|
|
2275
2269
|
width: number;
|
|
2276
2270
|
}
|
|
2271
|
+
/** @public */
|
|
2272
|
+
export interface DownloadLegacyThemeOptions {
|
|
2273
|
+
repo: string;
|
|
2274
|
+
}
|
|
2277
2275
|
/** @todo Documentation incomplete */
|
|
2278
2276
|
/** @public */
|
|
2279
2277
|
export interface DragManager {
|
|
@@ -2383,7 +2381,7 @@ export interface EdgeIndexData {
|
|
|
2383
2381
|
minY: number;
|
|
2384
2382
|
}
|
|
2385
2383
|
/** @public */
|
|
2386
|
-
export interface
|
|
2384
|
+
export interface EditorRangeEx {
|
|
2387
2385
|
from: EditorPosition | null;
|
|
2388
2386
|
to: EditorPosition | null;
|
|
2389
2387
|
}
|
|
@@ -2476,22 +2474,27 @@ export interface EditorStatusPluginInstance extends InternalPluginInstance<Edito
|
|
|
2476
2474
|
plugin: EditorStatusPlugin;
|
|
2477
2475
|
}
|
|
2478
2476
|
/** @public */
|
|
2477
|
+
export interface EditorSuggestEx {
|
|
2478
|
+
currentSuggest?: EditorSuggest<unknown>;
|
|
2479
|
+
suggests: EditorSuggest<unknown>[];
|
|
2480
|
+
}
|
|
2481
|
+
/** @public */
|
|
2479
2482
|
export interface EditorSuggests {
|
|
2480
2483
|
/**
|
|
2481
2484
|
* Currently active and rendered editor suggestion popup
|
|
2482
2485
|
*/
|
|
2483
|
-
currentSuggest: null | EditorSuggest<
|
|
2486
|
+
currentSuggest: null | EditorSuggest<unknown>;
|
|
2484
2487
|
/**
|
|
2485
2488
|
* Registered editor suggestions
|
|
2486
2489
|
*
|
|
2487
2490
|
* @remark Used for providing autocompletions for specific strings
|
|
2488
2491
|
* @tutorial Reference official documentation under EditorSuggest<T> for usage
|
|
2489
2492
|
*/
|
|
2490
|
-
suggests: EditorSuggest<
|
|
2493
|
+
suggests: EditorSuggest<unknown>[];
|
|
2491
2494
|
/**
|
|
2492
2495
|
* Add a new editor suggestion to the list of registered suggestion providers
|
|
2493
2496
|
*/
|
|
2494
|
-
addSuggest(suggest: EditorSuggest<
|
|
2497
|
+
addSuggest(suggest: EditorSuggest<unknown>): void;
|
|
2495
2498
|
/**
|
|
2496
2499
|
* Close the currently active editor suggestion popup
|
|
2497
2500
|
*/
|
|
@@ -2503,7 +2506,7 @@ export interface EditorSuggests {
|
|
|
2503
2506
|
/**
|
|
2504
2507
|
* Remove a registered editor suggestion from the list of registered suggestion providers
|
|
2505
2508
|
*/
|
|
2506
|
-
removeSuggest(suggest: EditorSuggest<
|
|
2509
|
+
removeSuggest(suggest: EditorSuggest<unknown>): void;
|
|
2507
2510
|
/**
|
|
2508
2511
|
* Update position of currently active and rendered editor suggestion popup
|
|
2509
2512
|
*/
|
|
@@ -2511,7 +2514,7 @@ export interface EditorSuggests {
|
|
|
2511
2514
|
/**
|
|
2512
2515
|
* Set the currently active editor suggestion popup to specified suggester
|
|
2513
2516
|
*/
|
|
2514
|
-
setCurrentSuggest(suggest: EditorSuggest<
|
|
2517
|
+
setCurrentSuggest(suggest: EditorSuggest<unknown>): void;
|
|
2515
2518
|
/**
|
|
2516
2519
|
* Run check on focused editor to see whether a suggestion should be triggered and rendered
|
|
2517
2520
|
*/
|
|
@@ -2643,7 +2646,7 @@ export interface EmbeddedEditorView extends Component {
|
|
|
2643
2646
|
/**
|
|
2644
2647
|
* Current state of the editor
|
|
2645
2648
|
*/
|
|
2646
|
-
state:
|
|
2649
|
+
state: unknown;
|
|
2647
2650
|
/**
|
|
2648
2651
|
* Text contents being embedded
|
|
2649
2652
|
*/
|
|
@@ -2728,6 +2731,11 @@ export interface EmptyView extends ItemView {
|
|
|
2728
2731
|
export interface EmptyViewConstructor extends TypedViewConstructor<EmptyView> {
|
|
2729
2732
|
}
|
|
2730
2733
|
/** @public */
|
|
2734
|
+
export interface EnclosingTag {
|
|
2735
|
+
open: EditorRangeEx;
|
|
2736
|
+
close: EditorRangeEx;
|
|
2737
|
+
}
|
|
2738
|
+
/** @public */
|
|
2731
2739
|
export interface EventsEntry {
|
|
2732
2740
|
ctx: unknown;
|
|
2733
2741
|
e: Events;
|
|
@@ -3103,13 +3111,21 @@ export interface FileSuggestManager {
|
|
|
3103
3111
|
export interface FileTreeItem {
|
|
3104
3112
|
file: TAbstractFile;
|
|
3105
3113
|
}
|
|
3114
|
+
/** @public */
|
|
3115
|
+
export interface FocusMetadataOptions {
|
|
3116
|
+
focusHeading: boolean;
|
|
3117
|
+
propertyIdx?: number;
|
|
3118
|
+
propertyKey?: string;
|
|
3119
|
+
}
|
|
3120
|
+
/** @public */
|
|
3121
|
+
export interface Fold {
|
|
3122
|
+
from: number;
|
|
3123
|
+
to: number;
|
|
3124
|
+
}
|
|
3106
3125
|
/** @todo Documentation incomplete */
|
|
3107
3126
|
/** @public */
|
|
3108
3127
|
export interface FoldInfo {
|
|
3109
|
-
folds:
|
|
3110
|
-
from: number;
|
|
3111
|
-
to: number;
|
|
3112
|
-
}[];
|
|
3128
|
+
folds: Fold[];
|
|
3113
3129
|
lines: number;
|
|
3114
3130
|
}
|
|
3115
3131
|
/** @public */
|
|
@@ -3138,6 +3154,20 @@ export interface FrameDom {
|
|
|
3138
3154
|
updateStatus(): void;
|
|
3139
3155
|
updateTitle(): void;
|
|
3140
3156
|
}
|
|
3157
|
+
/** @public */
|
|
3158
|
+
export interface GetRecentFilesOptions {
|
|
3159
|
+
showMarkdown: boolean;
|
|
3160
|
+
showCanvas: boolean;
|
|
3161
|
+
showNonImageAttachments: boolean;
|
|
3162
|
+
showImages: boolean;
|
|
3163
|
+
maxCount: number;
|
|
3164
|
+
}
|
|
3165
|
+
/** @public */
|
|
3166
|
+
export interface GetTypeInfoOptions {
|
|
3167
|
+
key: string;
|
|
3168
|
+
type: string;
|
|
3169
|
+
value: unknown;
|
|
3170
|
+
}
|
|
3141
3171
|
/** @todo Documentation incomplete */
|
|
3142
3172
|
/** @public */
|
|
3143
3173
|
export interface GlobalSearchPlugin extends InternalPlugin<GlobalSearchPluginInstance> {
|
|
@@ -3408,12 +3438,7 @@ export interface GraphRenderer {
|
|
|
3408
3438
|
/** @internal */
|
|
3409
3439
|
targetScale: number;
|
|
3410
3440
|
/** @internal */
|
|
3411
|
-
viewport:
|
|
3412
|
-
bottom: number;
|
|
3413
|
-
left: number;
|
|
3414
|
-
right: number;
|
|
3415
|
-
top: number;
|
|
3416
|
-
};
|
|
3441
|
+
viewport: Coords;
|
|
3417
3442
|
/** @internal */
|
|
3418
3443
|
width: number;
|
|
3419
3444
|
/** @internal */
|
|
@@ -3463,6 +3488,13 @@ export interface GroupBookmarkItem extends BookmarkItem {
|
|
|
3463
3488
|
type: "group";
|
|
3464
3489
|
}
|
|
3465
3490
|
/** @public */
|
|
3491
|
+
export interface HardWrapOptions {
|
|
3492
|
+
column?: number;
|
|
3493
|
+
from?: number;
|
|
3494
|
+
to?: number;
|
|
3495
|
+
allowMerge?: boolean;
|
|
3496
|
+
}
|
|
3497
|
+
/** @public */
|
|
3466
3498
|
export interface HotkeyManager {
|
|
3467
3499
|
/**
|
|
3468
3500
|
* Reference to App
|
|
@@ -3570,12 +3602,14 @@ export interface HoverLinkEvent {
|
|
|
3570
3602
|
linktext: string;
|
|
3571
3603
|
source: "search" | "editor" | "preview" | "properties" | "graph" | "file-explorer" | "hover-link";
|
|
3572
3604
|
sourcePath?: string;
|
|
3573
|
-
state?:
|
|
3574
|
-
scroll: unknown;
|
|
3575
|
-
};
|
|
3605
|
+
state?: HoverLinkEventState;
|
|
3576
3606
|
targetEl: HTMLElement | null;
|
|
3577
3607
|
}
|
|
3578
3608
|
/** @public */
|
|
3609
|
+
export interface HoverLinkEventState {
|
|
3610
|
+
scroll: unknown;
|
|
3611
|
+
}
|
|
3612
|
+
/** @public */
|
|
3579
3613
|
export interface IFramedMarkdownEditor extends MarkdownScrollableEditView {
|
|
3580
3614
|
/**
|
|
3581
3615
|
* Function that cleans up the iframe and listeners
|
|
@@ -3662,6 +3696,12 @@ export interface InfoFileView extends FileView {
|
|
|
3662
3696
|
*/
|
|
3663
3697
|
onFileOpen(file: TFile): void;
|
|
3664
3698
|
}
|
|
3699
|
+
/** @public */
|
|
3700
|
+
export interface InstallThemeOptions {
|
|
3701
|
+
name: string;
|
|
3702
|
+
repo: string;
|
|
3703
|
+
author: string;
|
|
3704
|
+
}
|
|
3665
3705
|
/** @todo Documentation incomplete */
|
|
3666
3706
|
/** @public */
|
|
3667
3707
|
export interface InternalPlugin<InternalPluginInstance> extends Component {
|
|
@@ -3731,9 +3771,7 @@ export interface InternalPlugins extends Events {
|
|
|
3731
3771
|
*
|
|
3732
3772
|
* @remark Prefer usage of getPluginById to access a plugin
|
|
3733
3773
|
*/
|
|
3734
|
-
plugins:
|
|
3735
|
-
[ID in InternalPluginNameType]: InternalPluginNamePluginsMapping[ID];
|
|
3736
|
-
};
|
|
3774
|
+
plugins: InternalPluginNamePluginsMapping;
|
|
3737
3775
|
/** @internal Request save of plugin configs */
|
|
3738
3776
|
requestSaveConfig: Debouncer<[
|
|
3739
3777
|
], Promise<void>>;
|
|
@@ -3810,6 +3848,10 @@ export interface LineHandle {
|
|
|
3810
3848
|
row: number;
|
|
3811
3849
|
}
|
|
3812
3850
|
/** @public */
|
|
3851
|
+
export interface LineHandleChange {
|
|
3852
|
+
changes: ChangeDesc;
|
|
3853
|
+
}
|
|
3854
|
+
/** @public */
|
|
3813
3855
|
export interface LinkChangeUpdate {
|
|
3814
3856
|
change: string;
|
|
3815
3857
|
reference: ReferenceCache;
|
|
@@ -4120,6 +4162,10 @@ export interface MarkdownBaseView extends Component {
|
|
|
4120
4162
|
updateOptions(): void;
|
|
4121
4163
|
}
|
|
4122
4164
|
/** @public */
|
|
4165
|
+
export interface MarkdownEditViewEphemeralState {
|
|
4166
|
+
cursor: EditorRange;
|
|
4167
|
+
}
|
|
4168
|
+
/** @public */
|
|
4123
4169
|
export interface MarkdownImporterPlugin extends InternalPlugin<MarkdownImporterPluginInstance> {
|
|
4124
4170
|
}
|
|
4125
4171
|
/** @public */
|
|
@@ -4223,6 +4269,23 @@ export interface MarkdownScrollableEditView extends MarkdownBaseView {
|
|
|
4223
4269
|
export interface MarkdownViewConstructor extends TypedViewConstructor<MarkdownView> {
|
|
4224
4270
|
}
|
|
4225
4271
|
/** @public */
|
|
4272
|
+
export interface MarkdownViewEphemeralState extends Record<string, unknown> {
|
|
4273
|
+
scroll: number;
|
|
4274
|
+
}
|
|
4275
|
+
/** @public */
|
|
4276
|
+
export interface MarkdownViewModes {
|
|
4277
|
+
preview: MarkdownPreviewView;
|
|
4278
|
+
source: MarkdownEditView;
|
|
4279
|
+
}
|
|
4280
|
+
/** @public */
|
|
4281
|
+
export interface MarkdownViewSourceMode {
|
|
4282
|
+
cmEditor: unknown;
|
|
4283
|
+
}
|
|
4284
|
+
/** @public */
|
|
4285
|
+
export interface MatchingBracket {
|
|
4286
|
+
to?: EditorPosition;
|
|
4287
|
+
}
|
|
4288
|
+
/** @public */
|
|
4226
4289
|
export interface MenuSubmenuConfigRecord extends Record<string, {
|
|
4227
4290
|
title: string;
|
|
4228
4291
|
icon: string;
|
|
@@ -4235,6 +4298,10 @@ export interface MetadataCacheFileCacheRecord extends Record<string, FileCacheEn
|
|
|
4235
4298
|
export interface MetadataCacheMetadataCacheRecord extends Record<string, CachedMetadata> {
|
|
4236
4299
|
}
|
|
4237
4300
|
/** @public */
|
|
4301
|
+
export interface MetadataCacheWorkerMessage {
|
|
4302
|
+
data: CachedMetadata;
|
|
4303
|
+
}
|
|
4304
|
+
/** @public */
|
|
4238
4305
|
export interface MetadataEditor extends Component {
|
|
4239
4306
|
/**
|
|
4240
4307
|
* Button element for adding a new property
|
|
@@ -4442,10 +4509,7 @@ export interface MetadataEditorProperty extends Component {
|
|
|
4442
4509
|
/**
|
|
4443
4510
|
* Info about the inferred and expected property widget given key-value pair
|
|
4444
4511
|
*/
|
|
4445
|
-
typeInfo:
|
|
4446
|
-
expected: PropertyWidget<unknown>;
|
|
4447
|
-
inferred: PropertyWidget<unknown>;
|
|
4448
|
-
};
|
|
4512
|
+
typeInfo: MetadataEditorPropertyTypeInfo;
|
|
4449
4513
|
/**
|
|
4450
4514
|
* Element that contains the value input or widget
|
|
4451
4515
|
*/
|
|
@@ -4500,6 +4564,11 @@ export interface MetadataEditorProperty extends Component {
|
|
|
4500
4564
|
showPropertyMenu(event: MouseEvent): void;
|
|
4501
4565
|
}
|
|
4502
4566
|
/** @public */
|
|
4567
|
+
export interface MetadataEditorPropertyTypeInfo {
|
|
4568
|
+
expected: PropertyWidget<unknown>;
|
|
4569
|
+
inferred: PropertyWidget<unknown>;
|
|
4570
|
+
}
|
|
4571
|
+
/** @public */
|
|
4503
4572
|
export interface MetadataTypeManager extends Events {
|
|
4504
4573
|
/**
|
|
4505
4574
|
* Reference to App
|
|
@@ -4530,14 +4599,7 @@ export interface MetadataTypeManager extends Events {
|
|
|
4530
4599
|
*/
|
|
4531
4600
|
getPropertyInfo(property: string): PropertyInfo;
|
|
4532
4601
|
/** @internal Get expected widget type for property and the one inferred from the property value */
|
|
4533
|
-
getTypeInfo(
|
|
4534
|
-
key: string;
|
|
4535
|
-
type: string;
|
|
4536
|
-
value: unknown;
|
|
4537
|
-
}): {
|
|
4538
|
-
inferred: PropertyWidget<unknown>;
|
|
4539
|
-
expected: PropertyWidget<unknown>;
|
|
4540
|
-
};
|
|
4602
|
+
getTypeInfo(options: GetTypeInfoOptions): TypeInfo;
|
|
4541
4603
|
/**
|
|
4542
4604
|
* Get all properties with an assigned widget type
|
|
4543
4605
|
*/
|
|
@@ -4641,11 +4703,7 @@ export interface ObsidianTouchEvent {
|
|
|
4641
4703
|
direction: "x" | "y";
|
|
4642
4704
|
evt: TouchEvent;
|
|
4643
4705
|
points: number;
|
|
4644
|
-
registerCallback:
|
|
4645
|
-
move(x: number): void;
|
|
4646
|
-
cancel(): void;
|
|
4647
|
-
finish(x: number, y: number, z: number): void;
|
|
4648
|
-
};
|
|
4706
|
+
registerCallback: ObsidianTouchEventRegisterCallback;
|
|
4649
4707
|
startX: number;
|
|
4650
4708
|
startY: number;
|
|
4651
4709
|
targetEl: HTMLElement;
|
|
@@ -4654,6 +4712,12 @@ export interface ObsidianTouchEvent {
|
|
|
4654
4712
|
y: number;
|
|
4655
4713
|
}
|
|
4656
4714
|
/** @public */
|
|
4715
|
+
export interface ObsidianTouchEventRegisterCallback {
|
|
4716
|
+
move(x: number): void;
|
|
4717
|
+
cancel(): void;
|
|
4718
|
+
finish(x: number, y: number, z: number): void;
|
|
4719
|
+
}
|
|
4720
|
+
/** @public */
|
|
4657
4721
|
export interface OpenDialogOptions {
|
|
4658
4722
|
bottom: number;
|
|
4659
4723
|
closeOnBlur: boolean;
|
|
@@ -4666,6 +4730,11 @@ export interface OpenDialogOptions {
|
|
|
4666
4730
|
onKeyUp(e: KeyboardEvent, value: string, callback: (value: unknown) => void): void;
|
|
4667
4731
|
}
|
|
4668
4732
|
/** @public */
|
|
4733
|
+
export interface OpenNotificationOptions {
|
|
4734
|
+
duration?: number;
|
|
4735
|
+
bottom?: boolean;
|
|
4736
|
+
}
|
|
4737
|
+
/** @public */
|
|
4669
4738
|
export interface OutgoingLinkPlugin extends InternalPlugin<OutgoingLinkPluginInstance> {
|
|
4670
4739
|
}
|
|
4671
4740
|
/** @public */
|
|
@@ -4761,6 +4830,25 @@ export interface PagePreviewPluginInstance extends InternalPluginInstance<PagePr
|
|
|
4761
4830
|
app: App;
|
|
4762
4831
|
defaultOn: true;
|
|
4763
4832
|
}
|
|
4833
|
+
/** @public */
|
|
4834
|
+
export interface PdfExportSettings {
|
|
4835
|
+
/**
|
|
4836
|
+
* Default: 'letter'
|
|
4837
|
+
*/
|
|
4838
|
+
pageSize: string;
|
|
4839
|
+
/**
|
|
4840
|
+
* Default: false
|
|
4841
|
+
*/
|
|
4842
|
+
landscape: boolean;
|
|
4843
|
+
/**
|
|
4844
|
+
* Default: '0'
|
|
4845
|
+
*/
|
|
4846
|
+
margin: string;
|
|
4847
|
+
/**
|
|
4848
|
+
* Default: 100
|
|
4849
|
+
*/
|
|
4850
|
+
downscalePercent: number;
|
|
4851
|
+
}
|
|
4764
4852
|
/** @todo Documentation incomplete */
|
|
4765
4853
|
/** @public */
|
|
4766
4854
|
export interface PdfView extends EditableFileView {
|
|
@@ -4930,14 +5018,7 @@ export interface Pointer {
|
|
|
4930
5018
|
y: number;
|
|
4931
5019
|
}
|
|
4932
5020
|
/** @public */
|
|
4933
|
-
export interface PositionedReference extends Reference {
|
|
4934
|
-
/**
|
|
4935
|
-
* Position of the reference in the file
|
|
4936
|
-
*/
|
|
4937
|
-
position: {
|
|
4938
|
-
start: Loc;
|
|
4939
|
-
end: Loc;
|
|
4940
|
-
};
|
|
5021
|
+
export interface PositionedReference extends Reference, CacheItem {
|
|
4941
5022
|
}
|
|
4942
5023
|
/** @public */
|
|
4943
5024
|
export interface PromisedQueue {
|
|
@@ -5118,13 +5199,7 @@ export interface RecentFileTracker {
|
|
|
5118
5199
|
/**
|
|
5119
5200
|
* Get last n files of type (defaults to 10)
|
|
5120
5201
|
*/
|
|
5121
|
-
getRecentFiles(
|
|
5122
|
-
showMarkdown: boolean;
|
|
5123
|
-
showCanvas: boolean;
|
|
5124
|
-
showNonImageAttachments: boolean;
|
|
5125
|
-
showImages: boolean;
|
|
5126
|
-
maxCount: number;
|
|
5127
|
-
}): string[];
|
|
5202
|
+
getRecentFiles(options?: GetRecentFilesOptions): string[];
|
|
5128
5203
|
/**
|
|
5129
5204
|
* Set the last opened files
|
|
5130
5205
|
*/
|
|
@@ -5203,13 +5278,22 @@ export interface SQLResultSet {
|
|
|
5203
5278
|
/** @public */
|
|
5204
5279
|
export interface SQLResultSetRowList {
|
|
5205
5280
|
length: number;
|
|
5206
|
-
item(index: number):
|
|
5281
|
+
item(index: number): unknown;
|
|
5207
5282
|
}
|
|
5208
5283
|
/** @public */
|
|
5209
5284
|
export interface SQLTransaction {
|
|
5210
5285
|
executeSql(sqlStatement: string, arguments?: unknown[], callback?: (transaction: SQLTransaction, resultSet: SQLResultSet) => void, errorCallback?: (transaction: SQLTransaction, error: SQLError) => boolean): void;
|
|
5211
5286
|
}
|
|
5212
5287
|
/** @public */
|
|
5288
|
+
export interface ScrollInfo {
|
|
5289
|
+
left: number;
|
|
5290
|
+
top: number;
|
|
5291
|
+
height: number;
|
|
5292
|
+
width: number;
|
|
5293
|
+
clientHeight: number;
|
|
5294
|
+
clientWidth: number;
|
|
5295
|
+
}
|
|
5296
|
+
/** @public */
|
|
5213
5297
|
export interface SearchBookmarkItem extends BookmarkItem {
|
|
5214
5298
|
query: string;
|
|
5215
5299
|
type: "search";
|
|
@@ -5219,31 +5303,19 @@ export interface SearchCursor {
|
|
|
5219
5303
|
/**
|
|
5220
5304
|
* Current editor search position
|
|
5221
5305
|
*/
|
|
5222
|
-
current():
|
|
5223
|
-
from: EditorPosition;
|
|
5224
|
-
to: EditorPosition;
|
|
5225
|
-
};
|
|
5306
|
+
current(): EditorRange;
|
|
5226
5307
|
/**
|
|
5227
5308
|
* All search results
|
|
5228
5309
|
*/
|
|
5229
|
-
findAll():
|
|
5230
|
-
from: EditorPosition;
|
|
5231
|
-
to: EditorPosition;
|
|
5232
|
-
}[];
|
|
5310
|
+
findAll(): EditorRange[];
|
|
5233
5311
|
/**
|
|
5234
5312
|
* Next editor search position
|
|
5235
5313
|
*/
|
|
5236
|
-
findNext():
|
|
5237
|
-
from: EditorPosition;
|
|
5238
|
-
to: EditorPosition;
|
|
5239
|
-
};
|
|
5314
|
+
findNext(): EditorRange;
|
|
5240
5315
|
/**
|
|
5241
5316
|
* Previous editor search position
|
|
5242
5317
|
*/
|
|
5243
|
-
findPrevious():
|
|
5244
|
-
from: EditorPosition;
|
|
5245
|
-
to: EditorPosition;
|
|
5246
|
-
};
|
|
5318
|
+
findPrevious(): EditorRange;
|
|
5247
5319
|
/**
|
|
5248
5320
|
* Replace current search result with specified text
|
|
5249
5321
|
*
|
|
@@ -5340,9 +5412,7 @@ export interface SerializedWorkspace {
|
|
|
5340
5412
|
/**
|
|
5341
5413
|
* Left ribbon
|
|
5342
5414
|
*/
|
|
5343
|
-
leftRibbon:
|
|
5344
|
-
hiddenItems: SerializedWorkspaceLeftRibbonHiddenItemsRecord;
|
|
5345
|
-
};
|
|
5415
|
+
leftRibbon: SerializedWorkspaceLeftRibbon;
|
|
5346
5416
|
/**
|
|
5347
5417
|
* Main (center) workspace leaf
|
|
5348
5418
|
*/
|
|
@@ -5359,6 +5429,10 @@ export interface SerializedWorkspaceItem {
|
|
|
5359
5429
|
type: string;
|
|
5360
5430
|
}
|
|
5361
5431
|
/** @public */
|
|
5432
|
+
export interface SerializedWorkspaceLeftRibbon {
|
|
5433
|
+
hiddenItems: SerializedWorkspaceLeftRibbonHiddenItemsRecord;
|
|
5434
|
+
}
|
|
5435
|
+
/** @public */
|
|
5362
5436
|
export interface SerializedWorkspaceLeftRibbonHiddenItemsRecord extends Record<string, boolean> {
|
|
5363
5437
|
}
|
|
5364
5438
|
/** @public */
|
|
@@ -5367,6 +5441,22 @@ export interface SerializedWorkspaceSidedock extends SerializedWorkspaceItem {
|
|
|
5367
5441
|
width: number;
|
|
5368
5442
|
}
|
|
5369
5443
|
/** @public */
|
|
5444
|
+
export interface SetBookmarkOptions {
|
|
5445
|
+
insertLeft?: boolean;
|
|
5446
|
+
}
|
|
5447
|
+
/** @public */
|
|
5448
|
+
export interface SetHighlightMatch {
|
|
5449
|
+
focus: boolean;
|
|
5450
|
+
startLoc?: number;
|
|
5451
|
+
endLoc?: number;
|
|
5452
|
+
line?: number;
|
|
5453
|
+
match?: unknown;
|
|
5454
|
+
}
|
|
5455
|
+
/** @public */
|
|
5456
|
+
export interface SetSelectionOptions {
|
|
5457
|
+
origin?: string;
|
|
5458
|
+
}
|
|
5459
|
+
/** @public */
|
|
5370
5460
|
export interface ShareReceiver {
|
|
5371
5461
|
app: App;
|
|
5372
5462
|
/**
|
|
@@ -5420,10 +5510,7 @@ export interface StateHistory {
|
|
|
5420
5510
|
/**
|
|
5421
5511
|
* Ephemeral cursor state within Editor of leaf
|
|
5422
5512
|
*/
|
|
5423
|
-
eState:
|
|
5424
|
-
cursor: EditorRange;
|
|
5425
|
-
scroll: number;
|
|
5426
|
-
};
|
|
5513
|
+
eState: StateHistoryEphemeralState;
|
|
5427
5514
|
/**
|
|
5428
5515
|
* Icon of the leaf
|
|
5429
5516
|
*/
|
|
@@ -5431,10 +5518,7 @@ export interface StateHistory {
|
|
|
5431
5518
|
/**
|
|
5432
5519
|
* History of previous and future states of leaf
|
|
5433
5520
|
*/
|
|
5434
|
-
leafHistory?:
|
|
5435
|
-
backHistory: StateHistory[];
|
|
5436
|
-
forwardHistory: StateHistory[];
|
|
5437
|
-
};
|
|
5521
|
+
leafHistory?: StateHistoryLeafHistory;
|
|
5438
5522
|
/**
|
|
5439
5523
|
* Id of parent to which the leaf belonged
|
|
5440
5524
|
*/
|
|
@@ -5453,6 +5537,26 @@ export interface StateHistory {
|
|
|
5453
5537
|
title?: string;
|
|
5454
5538
|
}
|
|
5455
5539
|
/** @public */
|
|
5540
|
+
export interface StateHistoryEphemeralState {
|
|
5541
|
+
cursor: EditorRange;
|
|
5542
|
+
scroll: number;
|
|
5543
|
+
}
|
|
5544
|
+
/** @public */
|
|
5545
|
+
export interface StateHistoryLeafHistory {
|
|
5546
|
+
backHistory: StateHistory[];
|
|
5547
|
+
forwardHistory: StateHistory[];
|
|
5548
|
+
}
|
|
5549
|
+
/** @public */
|
|
5550
|
+
export interface StatusBar {
|
|
5551
|
+
app: App;
|
|
5552
|
+
containerEl: HTMLElement;
|
|
5553
|
+
}
|
|
5554
|
+
/** @public */
|
|
5555
|
+
export interface Submenu {
|
|
5556
|
+
title: string;
|
|
5557
|
+
icon: string;
|
|
5558
|
+
}
|
|
5559
|
+
/** @public */
|
|
5456
5560
|
export interface SuggestionContainer<T> {
|
|
5457
5561
|
/**
|
|
5458
5562
|
* Which suggestions should be picked from
|
|
@@ -5825,6 +5929,29 @@ export interface Tree<T> {
|
|
|
5825
5929
|
*/
|
|
5826
5930
|
toggleCollapseAll(): void;
|
|
5827
5931
|
}
|
|
5932
|
+
/** @public */
|
|
5933
|
+
export interface TreeNodeInfo {
|
|
5934
|
+
childLeft: number;
|
|
5935
|
+
childLeftPadding: number;
|
|
5936
|
+
childTop: number;
|
|
5937
|
+
computed: boolean;
|
|
5938
|
+
height: number;
|
|
5939
|
+
hidden: boolean;
|
|
5940
|
+
next: boolean;
|
|
5941
|
+
queued: boolean;
|
|
5942
|
+
width: number;
|
|
5943
|
+
}
|
|
5944
|
+
/** @public */
|
|
5945
|
+
export interface TreeNodeVChildren<T> {
|
|
5946
|
+
addChild: (item: TreeNode<T>) => void;
|
|
5947
|
+
_children: TreeNode<T>[];
|
|
5948
|
+
owner: TreeNode<T>;
|
|
5949
|
+
}
|
|
5950
|
+
/** @public */
|
|
5951
|
+
export interface TypeInfo {
|
|
5952
|
+
inferred: PropertyWidget<unknown>;
|
|
5953
|
+
expected: PropertyWidget<unknown>;
|
|
5954
|
+
}
|
|
5828
5955
|
/**
|
|
5829
5956
|
* A constructor for a view that is typed to a specific view type.
|
|
5830
5957
|
*
|
|
@@ -5867,6 +5994,12 @@ export interface VideoView extends EditableFileView {
|
|
|
5867
5994
|
export interface VideoViewConstructor extends TypedViewConstructor<VideoView> {
|
|
5868
5995
|
}
|
|
5869
5996
|
/** @public */
|
|
5997
|
+
export interface ViewEphemeralState {
|
|
5998
|
+
focus: boolean;
|
|
5999
|
+
focusOnMobile: boolean;
|
|
6000
|
+
cursor?: EditorRangeOrCaret;
|
|
6001
|
+
}
|
|
6002
|
+
/** @public */
|
|
5870
6003
|
export interface ViewRegistry extends Events {
|
|
5871
6004
|
/**
|
|
5872
6005
|
* Mapping of file extensions to view type
|
|
@@ -5996,39 +6129,46 @@ export interface VimApi {
|
|
|
5996
6129
|
export interface VimEditor {
|
|
5997
6130
|
state: VimState;
|
|
5998
6131
|
}
|
|
5999
|
-
/** @todo Documentation incomplete */
|
|
6000
6132
|
/** @public */
|
|
6001
6133
|
export interface VimState {
|
|
6002
|
-
vim:
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6134
|
+
vim: VimStateVim;
|
|
6135
|
+
vimPlugin: VimStateVimPlugin;
|
|
6136
|
+
}
|
|
6137
|
+
/** @public */
|
|
6138
|
+
export interface VimStateVim {
|
|
6139
|
+
inputState: VimStateVimInputState;
|
|
6140
|
+
insertMode: false;
|
|
6141
|
+
insertModeRepeat: undefined;
|
|
6142
|
+
lastEditActionCommand: undefined;
|
|
6143
|
+
lastEditInputState: undefined;
|
|
6144
|
+
lastHPos: number;
|
|
6145
|
+
lastHSPos: number;
|
|
6146
|
+
lastMotion: VimStateVimLastMotion;
|
|
6147
|
+
lastPastedText: null;
|
|
6148
|
+
lastSelection: null;
|
|
6149
|
+
}
|
|
6150
|
+
/** @public */
|
|
6151
|
+
export interface VimStateVimInputState {
|
|
6152
|
+
changeQueue: null;
|
|
6153
|
+
keyBuffer: [
|
|
6154
|
+
];
|
|
6155
|
+
motion: null;
|
|
6156
|
+
motionArgs: null;
|
|
6157
|
+
motionRepeat: [
|
|
6158
|
+
];
|
|
6159
|
+
operator: null;
|
|
6160
|
+
operatorArgs: null;
|
|
6161
|
+
prefixRepeat: [
|
|
6162
|
+
];
|
|
6163
|
+
registerName: null;
|
|
6164
|
+
}
|
|
6165
|
+
/** @public */
|
|
6166
|
+
export interface VimStateVimLastMotion {
|
|
6167
|
+
name?: string;
|
|
6168
|
+
}
|
|
6169
|
+
/** @public */
|
|
6170
|
+
export interface VimStateVimPlugin {
|
|
6171
|
+
lastKeydown: string;
|
|
6032
6172
|
}
|
|
6033
6173
|
/** @public */
|
|
6034
6174
|
export interface WeakMapWrapper<K extends object, V> extends WeakMap<K, V> {
|
|
@@ -6328,27 +6468,14 @@ export type TreeItem<T> = TreeNode<T> & {
|
|
|
6328
6468
|
};
|
|
6329
6469
|
/**
|
|
6330
6470
|
* @todo Documentation incomplete
|
|
6471
|
+
* @public
|
|
6331
6472
|
*/
|
|
6332
|
-
/** @public */
|
|
6333
6473
|
export type TreeNode<T = object> = T & {
|
|
6334
6474
|
childrenEl: HTMLElement;
|
|
6335
6475
|
el: HTMLElement;
|
|
6336
|
-
info:
|
|
6337
|
-
childLeft: number;
|
|
6338
|
-
childLeftPadding: number;
|
|
6339
|
-
childTop: number;
|
|
6340
|
-
computed: boolean;
|
|
6341
|
-
height: number;
|
|
6342
|
-
hidden: boolean;
|
|
6343
|
-
next: boolean;
|
|
6344
|
-
queued: boolean;
|
|
6345
|
-
width: number;
|
|
6346
|
-
};
|
|
6476
|
+
info: TreeNodeInfo;
|
|
6347
6477
|
pusherEl: HTMLElement;
|
|
6348
|
-
vChildren:
|
|
6349
|
-
_children: TreeNode<T>[];
|
|
6350
|
-
owner: TreeNode<T>;
|
|
6351
|
-
};
|
|
6478
|
+
vChildren: TreeNodeVChildren<T>;
|
|
6352
6479
|
};
|
|
6353
6480
|
/** @public */
|
|
6354
6481
|
export type TypedViewCreator<TView extends View> = (leaf: WorkspaceLeaf) => TView;
|