# WorkspaceShell

Give the parent a definite height. Place page content in `children`, side panels in `sidebar` and `inspector`, and navigation in `rail`. The optional title bar uses `--ac-sys-size-titleBar`. The status bar stays beneath the pane area.

| `Context` | `--ac-sys-size-titleBar` |
| - | - |
| `dark/compact` | `2.25rem` |
| `dark/comfortable` | `2.5rem` |
| `light/compact` | `2.25rem` |
| `light/comfortable` | `2.5rem` |

```tsx
import '@ancrel/tokens/css'
import '@ancrel/workspace/styles.css'
import './example.css'
import { WorkspaceShell } from '@ancrel/workspace'

export default function App() {
  return <section aria-label="Report workspace" className="report-workspace">
    <WorkspaceShell titleBar="Report" sidebar={<button>Contents</button>}
      inspector="Revision 2" statusBar="Ready" theme="light" density="compact">
      <h1>Overview</h1>
    </WorkspaceShell>
  </section>
}
```

Expected:

A light, compact workspace shows Contents, Overview and Revision 2 in separate wide panes. Below 768px the title bar offers Show sidebar and Show inspector. Show sidebar focuses Contents. Back to main restores focus to Show sidebar.

At container widths of 768px and above, the shell passes its panes and `split` options to ResizableSplit. Each pane scrolls independently. Use `mainAs="div"` inside an existing main landmark. Theme and density apply to this shell and its descendants, so nested previews can set either axis independently.

Below `narrowBreakpoint`, the title bar provides buttons for the available side panes. Opening a pane focuses its first available control or the pane itself. Returning to the main pane restores focus to the corresponding title-bar button. Supply `labels` to translate those buttons.

For local state, choose the starting pane with `defaultNarrowPane`. For controlled navigation, pass `narrowPane` and update it in `onNarrowPaneChange`. Install the appearance with `@ancrel/tokens/css` and `@ancrel/workspace/styles.css`.

| `Prop` | `Type` | `Required` | `Default` |
| - | - | - | - |
| `children` | `ReactNode` | `true` | `—` |
| `className` | `string` | `false` | `—` |
| `defaultNarrowPane` | `ShellPane` | `false` | `—` |
| `density` | `Density` | `false` | `—` |
| `inspector` | `ReactNode` | `false` | `—` |
| `key` | `React.Key \| null \| undefined` | `false` | `—` |
| `labels` | `Partial<{ showSidebar: string; showInspector: string; backToMain: string; }>` | `false` | `—` |
| `mainAs` | `'main' \| 'div'` | `false` | `—` |
| `narrowBreakpoint` | `number` | `false` | `—` |
| `narrowPane` | `ShellPane` | `false` | `—` |
| `onNarrowPaneChange` | `((pane: ShellPane) => void) \| undefined` | `false` | `—` |
| `rail` | `ReactNode` | `false` | `—` |
| `ref` | `React.Ref<HTMLDivElement> \| undefined` | `false` | `—` |
| `sidebar` | `ReactNode` | `false` | `—` |
| `split` | `Pick<ResizableSplitProps, 'leftConfig' \| 'rightConfig' \| 'minCenterWidth' \| 'persistKey' \| 'storage' \| 'labels' \| 'onWidthsChange'>` | `false` | `—` |
| `statusBar` | `ReactNode` | `false` | `—` |
| `theme` | `Theme` | `false` | `—` |
| `titleBar` | `ReactNode` | `false` | `—` |

```ts
import * as React from 'react';
import type { WorkspaceShellProps } from './types.js';
export declare const WorkspaceShell: React.ForwardRefExoticComponent<WorkspaceShellProps & React.RefAttributes<HTMLDivElement>>;
```

* default — dark/compact, dark/comfortable, light/compact, light/comfortable
* focus-visible — dark/compact, dark/comfortable, light/compact, light/comfortable
