diff --git a/packages/client/ui-sidebar-right/src/client/service.ts b/packages/client/ui-sidebar-right/src/client/service.ts index f056f4b280..c4bfc1252b 100644 --- a/packages/client/ui-sidebar-right/src/client/service.ts +++ b/packages/client/ui-sidebar-right/src/client/service.ts @@ -79,28 +79,6 @@ interface SidebarRightSessions { readonly openTabs: SidebarTabInventory['source'] } -/** What the controller needs from the page around it: the viewport rule and focus continuity. */ -export interface SidebarRightHost { - /** - * Whether the viewport is narrow enough that an expanded panel is presented fullscreen. - * @returns the rule's verdict for the frame width the seats last rendered at. - */ - readonly autoFullscreen: () => boolean - /** - * Commit a page operation and focus the pane it selects. - * @param sessionId - the Session whose page is opening. - * @param open - the synchronous operation; returns the selected pane, or `undefined` when unchanged. - */ - readonly openWithFocus: (sessionId: SessionId, open: () => PaneId | undefined) => void - /** - * Commit a keyboard/menu close and retain focus on a surviving visible pane. - * @param sessionId - the Session whose page is closing. - * @param paneId - the pane whose page is closing. - * @param close - the synchronous cleanup and removal. - */ - readonly closeWithFocus: (sessionId: SessionId, paneId: PaneId, close: () => void) => void -} - /** * Create the public controller and the plugin-private Session callbacks. * Adoption reconciles restored records before any seat renders, then follows commits. @@ -147,6 +125,28 @@ export function createSidebarRightController(tabs: SidebarRightTabRegistry, pin: } } +/** What the controller needs from the page around it: the viewport rule and focus continuity. */ +export interface SidebarRightHost { + /** + * Whether the viewport is narrow enough that an expanded panel is presented fullscreen. + * @returns the rule's verdict for the frame width the seats last rendered at. + */ + readonly autoFullscreen: () => boolean + /** + * Commit a page operation and focus the pane it selects. + * @param sessionId - the Session whose page is opening. + * @param open - the synchronous operation; returns the selected pane, or `undefined` when unchanged. + */ + readonly openWithFocus: (sessionId: SessionId, open: () => PaneId | undefined) => void + /** + * Commit a keyboard/menu close and retain focus on a surviving visible pane. + * @param sessionId - the Session whose page is closing. + * @param paneId - the pane whose page is closing. + * @param close - the synchronous cleanup and removal. + */ + readonly closeWithFocus: (sessionId: SessionId, paneId: PaneId, close: () => void) => void +} + /** Where an open lands; every field is optional and the defaults are the common case. */ export interface SidebarRightPlacement { /** Land a new tab in this pane instead of the active docked one. */