import { Disposable } from "../../base/common/lifecycle.js"; import { IObservable } from "../../base/common/observable.js"; /** Viewport classification based on container width. */ export type ViewportClass = "phone" | "tablet" | "desktop"; /** Default visibility for each workbench part. */ export interface IPartVisibilityDefaults { readonly sidebar: boolean; readonly auxiliaryBar: boolean; readonly panel: boolean; readonly sessions: boolean; readonly editor: boolean; } /** Default sizes (in pixels) for each workbench part. */ export interface IPartSizeDefaults { readonly sideBarSize: number; readonly auxiliaryBarSize: number; readonly panelSize: number; readonly sessionsWidth: number; } /** * Observable-based viewport classification and layout policy for * the Sessions workbench. Consumed by `SessionsWorkbench` to drive * part visibility, sizing, and behavior based on viewport dimensions * and platform. */ export declare class SessionsLayoutPolicy extends Disposable { /** Whether the current platform is iOS. */ readonly isIOS: boolean; /** Whether the current platform is Android. */ readonly isAndroid: boolean; /** Whether the current device supports touch input. */ readonly isTouchDevice: boolean; private readonly _viewportClass; /** Current viewport class derived from the most recent `update()` call. */ readonly viewportClass: IObservable; /** * Whether the agents window uses the desktop layout (editor spans the * detail panel as a docked auxiliary bar). Fixed by the workbench selected at * startup. Never active on phone, which has its own mobile layout. */ private _desktop; get isDesktop(): boolean; /** Set once at startup from the selected workbench before the first layout. */ setDesktop(value: boolean): void; /** `true` when the viewport class is `phone`. */ readonly isPhoneLayout: IObservable; constructor(); /** * Update the viewport classification. Call this from the workbench * `layout()` method whenever the container dimensions change. * * @param width Container width in pixels. * @param height Container height in pixels (reserved for future use). */ update(width: number, _height: number): void; /** * Returns the default part visibility for the given viewport class. * If no class is supplied the current observed class is used. */ getPartVisibilityDefaults(viewportClass?: ViewportClass): IPartVisibilityDefaults; /** * Returns the default part sizes for the given viewport dimensions. * If no viewport class is supplied the current observed class is used. * * @param width Container width in pixels. * @param height Container height in pixels (reserved for future use). * @param viewportClass Optional explicit viewport class override. */ getPartSizes(width: number, _height: number, viewportClass?: ViewportClass): IPartSizeDefaults; }