zidane-ui/ workspace
import { … } from 'zidane-ui/workspace'ui/src/workspace/index.ts
Components#
LayoutBudgetProviderComponent#
Provides the resolved horizontal budget to the columns below.
PanelContentViewComponent#
Paints an extension panel's declarative content: sections of rows, prose and key / value facts, and the footer actions. Memoised: its host re-renders on every panel content or badge change, for any tab.
PanelCornerComponent#
Renders the corner cluster: pop out and full screen (while open), then the toggle.
PanelGlyphComponent#
Renders a panel's icon, or its extension's mark.
PanelSessionRowProviderComponent#
Panel rows below that stand for a session are drawn with row: the app's
own session row, so they look and move like its session list.
SidePanelComponent#
The side panel for the scope on screen: its tab groups, their bodies, the resize edge and, when it floats and slid away, the edge tab.
WorkspaceHostProviderComponent#
Puts a WorkspaceHost in context for the WorkspaceProviders below (what AppHostProvider does with
host.workspace).
WorkspaceProviderComponent#
Provides the side panel's state for scope to the components below.
Functions#
detailsPreviewFunction#
The first prose detail, flattened to plain text for the collapsed preview.
focusedTabScopeFunction#
The scope holding focus: from the focused element (or from) up to the first registered one.
None when that scope is hidden: focus left behind in a kept-alive tab the user switched away
from (browsers keep it on a display: none element) must not take ctrl+w from the shown tab.
hoveredTabScopeFunction#
The scope under the pointer (the innermost hovered element up).
keepFocusInFunction#
After a tab key acted in region: whenever the element holding focus goes
away with what it showed (a closed file's editor, a stepped-away tab, even
a beat later), focus lands back on the region instead of the page, so the
next key and the next arrow stay there. Stops once the user is elsewhere.
panelCornerWidthFunction#
The width the cluster covers at the end of the band, in px: what the strip or header under it reserves.
panelTabScopeFunction#
The scope of the side panel's visible tab (SidePanel marks its root
data-side-panel), if it has one. Hidden kept-alive tabs have no boxes.
registerTabScopeFunction#
Register scope on el (marks it data-tab-scope). Returns the unregister.
steppedIndexFunction#
The index a step lands on in a list, wrapping; -1 when the list is empty.
tabTargetFunction#
Where ⌥⌘← / ⌥⌘→ act, from what holds focus (or from). Focus on the
page itself (it fell there): the region the user was in, if still shown.
touchRecentFunction#
Most recent first, deduplicated, capped at max. Returns list itself when nothing changes.
trackTabRegionsFunction#
Follow where the user is (pointer down, focus in). Install once per window; returns the uninstall.
useExtensionPanelsFunction#
The extension panels offered in cwd, kept per folder: switching back to a
folder shows its tabs at once, and a slow list for a folder left behind
never lands on the one shown. A folder not listed yet keeps the last list
until its own arrives, so the strip does not drop its tabs for a frame.
Re-lists when the host says the catalog changed.
useLayoutBudgetFunction#
The budget from the nearest LayoutBudgetProvider. Throws outside one.
useLayoutBudgetOptionalFunction#
The budget from the nearest LayoutBudgetProvider, or null (chrome that may render outside one).
useOptionalWorkspaceActionsFunction#
useWorkspaceActions, or null outside a WorkspaceProvider.
useOptionalWorkspaceViewFunction#
useWorkspaceView, or null outside a WorkspaceProvider.
usePanelGroupHandlersFunction#
The splitTabRight / splitTabDown handlers for the WorkspaceProvider above, or none while they cannot act.
usePanelVisibleFunction#
Whether the tab body calling it is on screen (true outside a side panel).
useScopeLayoutFunction#
Live layout for a scope (EMPTY_LAYOUT without one). A scope on screen owns its layout from then on
(adoptScopeLayout; the draft excepted): what it shows stays put while other sessions of its project
change theirs.
useTabScopeFunction#
Register a tab scope on the element ref points at, with handlers that always see the latest render.
useWorkspaceFunction#
Everything at once (re-renders on any panel change); prefer the narrower hooks above.
useWorkspaceActionsFunction#
Stable actions only: never re-renders on panel state changes. Throws outside a WorkspaceProvider.
useWorkspaceContentFunction#
Extension content and badges. Re-renders on every content load and badge change.
useWorkspaceHostFunction#
The WorkspaceHost from the nearest WorkspaceHostProvider, or null.
useWorkspaceKeyCommandsFunction#
The side panel's key commands for the WorkspaceProvider above. Each is present only while it can act.
useWorkspaceLabelsFunction#
Returns the side panel's strings: the defaults merged with any overrides given to WorkspaceProvider or LabelsProvider.
useWorkspaceRequestsFunction#
The one-shot requests to tab bodies.
useWorkspaceViewFunction#
The catalog, strips and open state. Re-renders on navigation, not on content loads.
Constants#
PanelVisibilityContextConstant#
Whether the tab body below is on screen; TabParking provides it per body. Default: visible.
TAB_REGION_PROPSConstant#
Props for a focus region's root: marked, and focusable by a click (not by Tab).
Interfaces#
BudgetColumnInterface#
A column's wanted width and its bounds.
LayoutBudgetInterface#
The resolved widths and modes, the slid-away flag and the drag caps.
LayoutBudgetProviderPropsInterface#
Props for LayoutBudgetProvider.
PanelContentViewPropsInterface#
Props for PanelContentView.
PanelCornerPropsInterface#
Props of PanelCorner.
PanelGlyphPropsInterface#
Props for PanelGlyph.
PanelOpenEventInterface#
A click's modifiers, as onOpenPath receives them.
PanelSessionRowPropsInterface#
Props of a PanelSessionRowProvider's row.
PanelSessionRowProviderPropsInterface#
Props of PanelSessionRowProvider.
SidePanelPropsInterface#
Props for SidePanel.
StripControlsInterface#
The panel's own buttons, on one strip only.
TabScopeInterface#
What a surface does with the tab keys: step, close, find.
TabTargetInterface#
Where the tab keys act: a scope, and the focus region holding focus.
WorkspaceActionsInterface#
Every panel action; one object whose identity never changes for the provider's lifetime.
WorkspaceContentInterface#
Extension content and badges: the fast-changing part.
WorkspaceContentTargetInterface#
Where extension panels load: the folder, and the session they show beside.
WorkspaceHostProviderPropsInterface#
Props for WorkspaceHostProvider.
WorkspaceKeyCommandsOptionsInterface#
Options for useWorkspaceKeyCommands.
WorkspaceProviderPropsInterface#
Props for WorkspaceProvider.
WorkspaceRequestsInterface#
One-shot hand-overs to tab bodies (consumed with the matching take* action).
WorkspaceTabRegistryInterface#
The tab kinds an app offers: how each tab renders, and how the panel
treats it. Read at render; a body re-renders when its tab or the
panel's bodyKey changes.
WorkspaceViewInterface#
Catalog, strip and open/active state: changes on user navigation, not on content loads.
Types#
WorkspaceApiType#
Everything useWorkspace returns.