/** * @file * * Mock of Obsidian's `WorkspaceFloating`, the workspace item that holds the popout windows. */ import type { WorkspaceFloating as WorkspaceFloatingOriginal } from 'obsidian'; import type { Workspace } from './Workspace.cjs'; import { WorkspaceParent } from './WorkspaceParent.cjs'; /** * Mock of Obsidian's `WorkspaceFloating`, the parent of every popout `WorkspaceWindow`. The workspace keeps one as * its `floatingSplit`. */ export declare class WorkspaceFloating extends WorkspaceParent { /** * Whether the floating item may keep a single child; always `true`, as in Obsidian. */ allowSingleChild: boolean; /** * The item kind, `floating`, as Obsidian names it. */ type: string; /** * Creates the floating item. Obsidian does not construct it publicly; use {@link WorkspaceFloating.create2__}. * * @param workspace - The workspace the floating item belongs to. * @param id - The item id; a unique numeric id is generated when omitted. */ protected constructor(workspace?: Workspace, id?: string); /** * Mock-only factory: creates a floating item, spyable via `vi.spyOn(WorkspaceFloating, 'create2__')`. The * numbered subclass variant of `create__`. * * @param workspace - The workspace the floating item belongs to. * @param id - The item id; a unique numeric id is generated when omitted. * @returns The new floating item. */ static create2__(workspace?: Workspace, id?: string): WorkspaceFloating; /** * Mock-only: views a value typed as Obsidian's `WorkspaceFloating` as this mock. The numbered subclass variant * of `fromOriginalType__`. * * @param value - The value typed as the original `WorkspaceFloating`. * @returns The same object, typed as the mock. */ static fromOriginalType4__(value: WorkspaceFloatingOriginal): WorkspaceFloating; /** * Mock-only: views this mock as Obsidian's `WorkspaceFloating` type. The numbered subclass variant of * `asOriginalType__`. * * @returns The same object, typed as the original `WorkspaceFloating`. */ asOriginalType4__(): WorkspaceFloatingOriginal; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(WorkspaceFloating.prototype, 'constructor4__')`. * * @param _workspace - The workspace the floating item was created with. * @param _id - The item id the floating item was created with. */ constructor4__(_workspace?: Workspace, _id?: string): void; }