Parameters for ViewPanel.

interface ViewPanelParams {
    confirmOnDestroy?: boolean;
    container?: HTMLElement;
    height?: number;
    onClose?: () => void;
    onDestroy?: () => void;
    onPin?: () => void;
    storageKey?: string;
    title?: string;
    width?: number;
    x?: number;
    y?: number;
}

Properties

confirmOnDestroy?: boolean

When true (the default), clicking the destroy button opens a modal confirm/cancel dialog and only tears the panel + View down after the user confirms. Set to false to skip the dialog — useful for tests and for callers that gate destruction themselves.

Programmatic panel.destroy() calls and the Escape-to-minimize shortcut bypass the dialog — only the destroy-button click is gated.

container?: HTMLElement

DOM container for the panel + pill. Defaults to document.body.

height?: number

Initial panel height in pixels (including chrome). Default 360.

onClose?: () => void

Invoked when the panel's minimize button is clicked, after the panel hides itself. The View is preserved and re-revealed when the user clicks the side-rail pill — minimize is non-destructive. For actual View teardown, use onDestroy instead.

onDestroy?: () => void

Invoked when the panel's destroy button (✕) is clicked and the user confirms the modal dialog. The handler is responsible for destroying the wrapped View; the panel itself is torn down automatically via FloatingPanelBase.destroy just before this hook fires. The destroy button is omitted when onDestroy is not supplied.

onPin?: () => void

Invoked when the panel's pin / dock button is clicked. The handler is responsible for moving the hosted canvas into the flow layout and tearing the panel down; see demo!studio.viewManager.ViewManager.pinView | ViewManager.pinView. The pin button is omitted when onPin is not supplied.

storageKey?: string

localStorage key for the panel's drag-position + closed state. Each ViewPanel needs a unique key so two panels don't share a slot.

title?: string

Text shown in the panel header and on the reopen pill.

width?: number

Initial panel width in pixels (excluding chrome). Default 480.

x?: number

Initial panel left edge in CSS pixels from the viewport's top-left. Default — leave the panel's stylesheet default (80px). Supplying x (or y) makes the caller's value win over any persisted localStorage layout, which gives test/snapshot runs deterministic placement regardless of a developer's prior drags.

y?: number

Initial panel top edge in CSS pixels from the viewport's top-left. Default — stylesheet default (80px). Same "wins over localStorage" semantics as x.