/** * @file * * Mock of Obsidian's `SettingPage`, a page rendered inside the settings modal. */ import type { SettingPage as SettingPageOriginal } from 'obsidian'; /** * Mock of Obsidian's `SettingPage` base class. * * The constructor builds detached root, titlebar and content elements; subclasses render into * {@link SettingPage.containerEl} from {@link SettingPage.display}. */ export declare abstract class SettingPage { /** * Container for the page's content, which {@link SettingPage.display} renders into. */ containerEl: HTMLElement; /** * The page's outermost element, holding the titlebar and the content container. */ rootEl: HTMLElement; /** * Title displayed in the page titlebar; empty until a subclass sets it. */ title: string; /** * The element holding the page's titlebar. */ titlebarEl: HTMLElement; /** * Creates the page and its detached root, titlebar and content elements. */ constructor(); /** * Mock-only: views a value typed as Obsidian's `SettingPage` as this mock. * * @param value - The value typed as the original `SettingPage`. * @returns The same object, typed as the mock. */ static fromOriginalType__(value: SettingPageOriginal): SettingPage; /** * Mock-only: views this mock as Obsidian's `SettingPage` type. * * @returns The same object, typed as the original `SettingPage`. */ asOriginalType__(): SettingPageOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(SettingPage.prototype, 'constructor__')`. */ constructor__(): void; /** * Called when the page is opened; clears and re-renders content into {@link SettingPage.containerEl}. */ abstract display(): void; /** * Hides the page's contents when the user navigates away, switches tabs or closes the settings modal. * A no-op in the mock. */ hide(): void; }