(activeTab: TabType)
| 58 | } |
| 59 | |
| 60 | export function getDefaultRightSidebarLayoutState(activeTab: TabType): RightSidebarLayoutState { |
| 61 | // Default tabs come from the registry's `inDefaultLayout` flag — no |
| 62 | // hardcoded list to keep in sync. Adding a tab to the default layout is a |
| 63 | // one-line metadata change in `Tabs/tabConfig.ts`. |
| 64 | const defaultTabs: TabType[] = [...getDefaultLayoutTabIds()]; |
| 65 | const tabs = defaultTabs.includes(activeTab) ? defaultTabs : [...defaultTabs, activeTab]; |
| 66 | |
| 67 | return { |
| 68 | version: 1, |
| 69 | nextId: 2, |
| 70 | focusedTabsetId: "tabset-1", |
| 71 | root: { |
| 72 | type: "tabset", |
| 73 | id: "tabset-1", |
| 74 | tabs, |
| 75 | activeTab, |
| 76 | }, |
| 77 | }; |
| 78 | } |
| 79 | |
| 80 | export function parseRightSidebarLayoutState( |
| 81 | raw: unknown, |
no test coverage detected