import { type Command, Component, type DataAdapter, type FrontMatterCache, Notice, Plugin, type PluginManifest, Setting, type View, type ViewStateResult } from "obsidian"; import type { AsyncOrSync } from "ts-essentials"; import type { PluginContext } from "./plugin.js"; export declare class LambdaComponent extends Component { protected readonly onLoad: (this: LambdaComponent) => void; protected readonly onUnload: (this: LambdaComponent) => void; constructor(onLoad?: (this: LambdaComponent) => void, onUnload?: (this: LambdaComponent) => void); onload(): void; onunload(): void; } export declare abstract class ResourceComponent extends Component { #private; protected static readonly sentinel: unique symbol; get onLoaded(): Promise; get value(): T; protected set value(value: T); onload(): void; protected abstract load0(): AsyncOrSync; } export interface StatusUI { readonly report: (status?: unknown) => void; } export declare class UpdatableUI { #private; new(create: () => V, configure: ((value: V) => void) | null, destroy: ((value: V) => void) | null): this; newSetting(element: HTMLElement, configure: (setting: Setting) => void): this; finally(finalizer: () => void): this; embed(create: () => U, configure?: ((ele: U) => void) | null, destroy?: ((ele: U) => void) | null): this; update(): void; destroy(): void; } export declare function statusUI(ui: UpdatableUI, element: HTMLElement): StatusUI; export declare class UnnamespacedID { readonly id: V; constructor(id: V); namespaced(context: Plugin | PluginManifest): string; } type AddCommandPredefinedOptions = { readonly [K in "name"]: Command[K]; }; export declare function addCommand(context: PluginContext, name: () => string, command: Readonly>): Command; export declare function addRibbonIcon(context: PluginContext, id: string, icon: string, title: () => string, callback: (event: MouseEvent) => unknown): void; export declare function awaitCSS(element: HTMLElement): Promise; export declare namespace awaitCSS { const CLASS = "obsidian-plugin-library:await-css"; } export declare function cleanFrontmatterCache(cache?: FrontMatterCache): Readonly>; export declare function commandNamer(cmdNamer: () => string, pluginNamer: () => string, defaultPluginName: string, format: string): () => string; export declare function printMalformedData(context: PluginContext, actual: unknown, expected?: unknown): void; export declare function newCollaborativeState(context: Plugin | PluginManifest, states: ReadonlyMap, unknown>): unknown; export declare function notice(message: () => DocumentFragment | string, timeout?: number, context?: PluginContext): Notice; export declare function notice2(message: () => DocumentFragment | string, timeout?: number, context?: PluginContext): Notice; export declare function printError(error: Error, message?: () => string, context?: PluginContext): void; export declare function readStateCollaboratively(implType: string, state: unknown): unknown; export declare function recordViewStateHistory(context: PluginContext, result: ViewStateResult): void; export declare function saveFileAs(context: PluginContext, adapter: DataAdapter, data: File): Promise; export declare function updateView(context: PluginContext, view: View): void; export declare function useSettings(element: HTMLElement): { readonly element: HTMLElement; readonly remover: () => void; }; export declare function useSubsettings(element: HTMLElement): HTMLElement; export declare function writeStateCollaboratively(state: unknown, implType: string, implState: unknown): unknown; export {}; //# sourceMappingURL=obsidian.d.ts.map