@kerfjs/ui 5.0.0-beta.96 → 5.0.0-beta.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-catalog.json +3 -1
- package/ai/components/list-action-row.md +1 -0
- package/ai/components/list-item.md +1 -0
- package/ai/public-api-signatures-v1.md +24 -10
- package/ai/skill.md +4 -4
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +18 -4
- package/dist/catalog.js +6 -2
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-BU23Z5HZ.js → chunk-527IAEWG.js} +5 -3
- package/dist/chunk-527IAEWG.js.map +1 -0
- package/dist/{chunk-AYHC62OZ.js → chunk-AZWE2FB5.js} +15 -15
- package/dist/chunk-AZWE2FB5.js.map +1 -0
- package/dist/{nav-stack-BvSKY448.d.ts → nav-stack-Cp3Y8kJ9.d.ts} +5 -1
- package/dist/nav-stack.d.ts +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/select-register.js +11 -0
- package/dist/select-register.js.map +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js +1 -1
- package/dist/styles/catalog/components/catalog-example-stack.css +5 -0
- package/dist/styles/components/actions/popup-menu/popup-menu.css +7 -0
- package/dist/styles/components/actions/toolbar/toolbar.css +19 -0
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +11 -3
- package/dist/styles/components/actions/toolbar-text/toolbar-text.css +9 -0
- package/dist/styles/components/collections/list-action-row/list-action-row.css +14 -0
- package/dist/styles/components/collections/list-item/list-item.css +14 -0
- package/dist/styles/components/forms/select/select.css +1 -0
- package/dist/styles/components/forms/token-search-field/token-search-field.css +23 -5
- package/dist/styles/foundation.css +26 -0
- package/dist/styles/list-action-row.css +14 -0
- package/dist/styles/list-item.css +14 -0
- package/dist/styles/popup-menu.css +7 -0
- package/dist/styles/select.css +1 -0
- package/dist/styles/token-search-field.css +23 -5
- package/dist/styles/toolbar-control-group.css +11 -3
- package/dist/styles/toolbar-text.css +9 -0
- package/dist/styles/toolbar.css +19 -0
- package/dist/styles/webawesome.css +18 -0
- package/dist/wire-catalog.d.ts +1 -1
- package/dist/workbench.d.ts +1 -1
- package/dist/workbench.js +1 -1
- package/docs/catalog.md +7 -1
- package/docs/component-contract.md +10 -2
- package/docs/component-selection.md +20 -1
- package/docs/nav-stack.md +20 -6
- package/docs/webawesome-theme.md +7 -0
- package/llms.txt +14 -1
- package/package.json +1 -1
- package/dist/chunk-AYHC62OZ.js.map +0 -1
- package/dist/chunk-BU23Z5HZ.js.map +0 -1
package/docs/catalog.md
CHANGED
|
@@ -132,10 +132,16 @@ entry's `tags` array.
|
|
|
132
132
|
Pass `label` when the stack needs an accessible name: the rendered `section`
|
|
133
133
|
is then exposed as a named region. An unlabeled stack remains an ordinary
|
|
134
134
|
grouping rather than adding an unnecessary landmark.
|
|
135
|
+
A stack holds a 736px reading measure by default; pass `width="full"` for
|
|
136
|
+
application-width compositions (boards, app shells, drawers, split views) so
|
|
137
|
+
the stack spans the stage like a `viewport.width: "full"` row instead of
|
|
138
|
+
clipping them.
|
|
135
139
|
- `CatalogExample` is one row: optional generated `ListHeader` label, optional
|
|
136
140
|
generated note, then one specimen or one intentionally coupled specimen
|
|
137
141
|
cluster. Use one row per variant/state; do not hand-author the helper's private
|
|
138
|
-
classes.
|
|
142
|
+
classes. A supplied `label` also names the row's `section`, so each specimen
|
|
143
|
+
is a named region that assistive technology and
|
|
144
|
+
`getByRole("region", { name })` can address.
|
|
139
145
|
- Focused demos do not import local stylesheets, use inline `style`, or invent
|
|
140
146
|
styling-only `demo-*` classes. Prefer a public Kerf component, then a Web
|
|
141
147
|
Awesome surface when Kerf has no equivalent, then ordinary semantic HTML.
|
|
@@ -578,6 +578,10 @@ close motion: its flex size animates while a collapsible `TokenSearchField`
|
|
|
578
578
|
inside fills it on every frame, laid out at least basis-wide and clipped by the
|
|
579
579
|
group, so a query never wraps or leaves an empty band mid-transition. At 480px
|
|
580
580
|
container width or less, and under reduced motion, it opens in one frame.
|
|
581
|
+
A plain collapsible search group (no `sizing`) animates its own width the same
|
|
582
|
+
way: the `TokenSearchField` follows the group on every frame and keeps its
|
|
583
|
+
query on one line until the opening ends, so it never shows an empty band or a
|
|
584
|
+
query wrapped in a narrow, still-opening field.
|
|
581
585
|
Use `sizing="fill"` for a group, including a non-search segmented control,
|
|
582
586
|
that spans its wrapping row. Set `visibility="hide-collapsed-tiny"` on a
|
|
583
587
|
collapsible group to omit its closed icon at 224px or less; expanded content
|
|
@@ -619,8 +623,12 @@ own inset (8px for a raw `wa-dropdown`, the Select listbox's 4px for a
|
|
|
619
623
|
`PopupMenu`), while `compact` and `list-zero` apply to every nested menu. A
|
|
620
624
|
`PopupMenu` and a `Select` draw one popup: the same caret that turns to face the
|
|
621
625
|
open popup, fade-in surface, surface inset, row height and padding, current-row
|
|
622
|
-
fill,
|
|
623
|
-
`foundation.css`.
|
|
626
|
+
fill, group titles, and scroll cue, all read from one private popup-choice
|
|
627
|
+
contract in `foundation.css`. A capped popup that scrolls (a long listbox, a
|
|
628
|
+
menu, or a phone submenu) shows a soft shadow along each edge with more
|
|
629
|
+
choices beyond it, so overlay scrollbars never leave it looking complete; the
|
|
630
|
+
cue is CSS-only, appears only toward hidden rows, and a popup whose choices
|
|
631
|
+
all fit draws none. Checkbox items reserve a check column; plain commands start
|
|
624
632
|
at the checkmark's leading edge, beside the group title rather than the
|
|
625
633
|
farther-in Select option label. Checked submenu items keep their checkmark and
|
|
626
634
|
label inside the submenu surface. Compact mixed controls retain the standard
|
|
@@ -324,7 +324,10 @@ trailing zone that should take a full second row when expanded. `responsiveAt`
|
|
|
324
324
|
chooses the compact or narrow container breakpoint. The leading identity stays
|
|
325
325
|
in the first row. Set `centerAlign="balanced"` when the center zone must sit on
|
|
326
326
|
the toolbar's midpoint despite unequal or empty side content; it gives the
|
|
327
|
-
leading and trailing zones equal tracks.
|
|
327
|
+
leading and trailing zones equal tracks. A lone `ToolbarText` in a balanced
|
|
328
|
+
center is a navigation-bar title: the side zones keep their content width and
|
|
329
|
+
the title truncates first, centered while the sides leave room (NavStack uses
|
|
330
|
+
this once it shows a back control). `--kui-toolbar-leading-min-width`,
|
|
328
331
|
`--kui-toolbar-trailing-gap`, `--kui-toolbar-trailing-justify`, and the
|
|
329
332
|
`--kui-toolbar-*-padding-inline` zone tokens adjust local geometry without
|
|
330
333
|
selecting toolbar anatomy from application CSS.
|
|
@@ -579,6 +582,22 @@ the control's dimensions, shows `LoadingSpinner` in its icon slot, sets
|
|
|
579
582
|
| A command menu | `<ToolbarControlGroup single nestedDropdown><PopupMenu … /></ToolbarControlGroup>` | Register `@kerfjs/ui/popup-menu/register` once; set `menuInset` on the group |
|
|
580
583
|
| A collapsible search box | `<ToolbarControlGroup single><TokenSearchField collapsible … /></ToolbarControlGroup>` | The group animates the iconic ↔ expanded states; `wireTokenSearchFields` manages expand/collapse/focus by default |
|
|
581
584
|
|
|
585
|
+
### Room for an expanded search
|
|
586
|
+
|
|
587
|
+
A collapsible search group grows into the room beside its sibling groups. When
|
|
588
|
+
that room is too small, the siblings wrap onto a new row partway through the
|
|
589
|
+
opening, and the toolbar grows a row taller. Kerf does not hide or move your
|
|
590
|
+
other controls; plan for it instead:
|
|
591
|
+
|
|
592
|
+
- Size the expanded search to what fits: `--kui-token-search-expanded-width`
|
|
593
|
+
for a plain search group, or `sizing="grow"` with a `growBasis` that fits
|
|
594
|
+
beside the siblings.
|
|
595
|
+
- If a useful search cannot fit beside the other controls, set those controls
|
|
596
|
+
aside while it is open. Mark them `visibility="yield-to-expanded-sibling"`
|
|
597
|
+
(they leave a 480px-or-narrower toolbar while a sibling is expanded), or
|
|
598
|
+
gather them behind a "…" `PopupMenu` overflow group. The application decides
|
|
599
|
+
which controls yield.
|
|
600
|
+
|
|
582
601
|
### Application surfaces below search
|
|
583
602
|
|
|
584
603
|
Pass `expandedOverflow="visible"` to `ToolbarControlGroup content="search"`
|
package/docs/nav-stack.md
CHANGED
|
@@ -79,11 +79,23 @@ and layout content.
|
|
|
79
79
|
|
|
80
80
|
The top chrome is a real `Toolbar`, so it follows the same zone,
|
|
81
81
|
group, and responsive rules as every other toolbar. Its leading zone holds the
|
|
82
|
-
back control (a
|
|
83
|
-
depth), then `toolbar.leading
|
|
84
|
-
`
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
back control (a contained, bordered `ToolbarControlGroup`, shown once the stack has
|
|
83
|
+
depth), then `toolbar.leading`. `toolbar.trailing` fills the trailing zone.
|
|
84
|
+
Give each zone `ToolbarControlGroup`s or `ToolbarText`, as in any toolbar.
|
|
85
|
+
|
|
86
|
+
Where `toolbar.title` goes depends on the back control:
|
|
87
|
+
|
|
88
|
+
- **At the root** (no back control) the title is a filling `ToolbarText` at
|
|
89
|
+
the end of the leading zone, so it reads left-aligned.
|
|
90
|
+
- **Once the stack has depth**, the title is the center zone's only child and
|
|
91
|
+
the toolbar is `centerAlign="balanced"`, like a platform navigation bar. The
|
|
92
|
+
title sits on the bar's midpoint while the sides leave room, moves away from
|
|
93
|
+
a wider side when they do not, and truncates with an ellipsis before it
|
|
94
|
+
reaches the back control or a trailing group. It keeps the root title's
|
|
95
|
+
full-strength text color at its smaller size. This overrides a configured
|
|
96
|
+
`centerAlign`, which applies to view-owned center content.
|
|
97
|
+
- **A view that sets `toolbar.center`** owns the center zone, so its title
|
|
98
|
+
stays left-aligned in the leading zone at any depth.
|
|
87
99
|
|
|
88
100
|
Configure the toolbar with `toolbarConfig` instead of styling it:
|
|
89
101
|
|
|
@@ -110,7 +122,9 @@ Configure the toolbar with `toolbarConfig` instead of styling it:
|
|
|
110
122
|
- `toolbarConfig` supplies stack-wide defaults (`dividerSides`,
|
|
111
123
|
`centerAlign`, `responsive`, `responsiveAt`, `safeAreaEdges`) and adds
|
|
112
124
|
`label` (the toolbar's accessible name), `titleSize` (the title's
|
|
113
|
-
`ToolbarText` size
|
|
125
|
+
`ToolbarText` size; default `xlarge` at the root, where the title is the page
|
|
126
|
+
heading, and `large` once a back control shares the bar; a Workbench panel's
|
|
127
|
+
stack keeps `large` at every depth), and `headingLevel` (expose the title as
|
|
114
128
|
a heading; default a plain span). The defaults keep the stack's own chrome:
|
|
115
129
|
no divider, the standard Toolbar height (a 44px control band with 8px above and below), and the top and side safe-area edges
|
|
116
130
|
claimed.
|
package/docs/webawesome-theme.md
CHANGED
|
@@ -190,6 +190,13 @@ a panel, and a Web Awesome card containing details, using public components and
|
|
|
190
190
|
no demo stylesheet. Browser tests cover repeated layers, actual compositing,
|
|
191
191
|
text contrast, light/dark switching, narrow/wide layouts, and forced colors.
|
|
192
192
|
|
|
193
|
+
The built-in close control of a `wa-dialog` or `wa-drawer` matches a borderless
|
|
194
|
+
single `ToolbarControlGroup` button, the close a toolbar-composed dialog uses
|
|
195
|
+
(see the list-detail dialog recipe): a 40px circle with no border and the
|
|
196
|
+
neutral hover fill, in place of Web Awesome's 35px rounded square. The theme
|
|
197
|
+
sizes it through the directly exported `close-button__base` part, so the
|
|
198
|
+
default header and a toolbar-composed header present one close affordance.
|
|
199
|
+
|
|
193
200
|
Add `class="hide-actions"` to a `wa-dialog` when the dialog supplies its own
|
|
194
201
|
dismissal affordance and should omit Web Awesome's header action region. The
|
|
195
202
|
theme sets `display: none` on the directly exported `header-actions` part; it
|
package/llms.txt
CHANGED
|
@@ -254,7 +254,10 @@ headingLevel`, `TokenSearchField clearIcon`, `ContentItem frame="framed"` for a
|
|
|
254
254
|
gives option rows more room. `multiline` wraps labels, with
|
|
255
255
|
`multilineIconAlign="center"` when the icon should center on the whole copy.
|
|
256
256
|
`divider` owns row separators and `state="drag-target"` paints the drop
|
|
257
|
-
target. For
|
|
257
|
+
target. For lines only between rows, give every row but the last
|
|
258
|
+
`divider="after"` (the last `"none"`); a row's corners are flat wherever a
|
|
259
|
+
divider line meets them, so the group rounds only its outer corners on
|
|
260
|
+
hover and selection. For a reorderable list, set `draggable` + `itemId` on `ListItem`,
|
|
258
261
|
`ListItemLink`, or `ListActionRow` rows and call `wireListReorder` (from
|
|
259
262
|
`@kerfjs/ui/wire-list-reorder`) once; it paints the dimmed dragging rows and
|
|
260
263
|
the before/after insertion line, supports Alt+Shift+ArrowUp/ArrowDown, and
|
|
@@ -368,6 +371,16 @@ headingLevel`, `TokenSearchField clearIcon`, `ContentItem frame="framed"` for a
|
|
|
368
371
|
`LucideIcon` is 24px); if it looks wrong, fix the surrounding layout, not the
|
|
369
372
|
control. Never force a component's width/height to size it — that leaves a halo
|
|
370
373
|
or a stretched oval.
|
|
374
|
+
- **Make room for an expanded search instead of growing it past what fits.** A
|
|
375
|
+
collapsible search group grows into the space beside its sibling groups; if
|
|
376
|
+
that space is too small, the siblings wrap onto a new row while it opens.
|
|
377
|
+
Size the expanded search to what fits (`--kui-token-search-expanded-width`,
|
|
378
|
+
or `sizing="grow"` with a `growBasis` that fits), and if a useful search
|
|
379
|
+
cannot fit beside the other controls, set aside those controls while the
|
|
380
|
+
search is open: mark them `visibility="yield-to-expanded-sibling"` (they
|
|
381
|
+
leave a 480px-or-narrower toolbar while a sibling is expanded) or gather
|
|
382
|
+
them behind a "…" `PopupMenu` overflow group. The app decides which
|
|
383
|
+
controls yield.
|
|
371
384
|
- **Toolbars hold only `ToolbarText` and `ToolbarControlGroup`.** Never put a bare
|
|
372
385
|
button, input, link, or loose markup in a `leading`/`center`/`trailing` zone.
|
|
373
386
|
Wrap every control — `SegmentedControl`, `Select`, a collapsible
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/navigation/nav-stack/nav-stack.tsx"],"names":[],"mappings":";;;;;;;;;AAsGA,IAAM,uBAAA,GAA0B;AAAA,EAC9B,aAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAEA,IAAM,8BAAA,GAAiC;AAAA,EACrC,WAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAEA,SAAS,UAAA,CAAW,SAAwB,M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AA,CAAK;AAAA;AAAA,SAGV,CAAA,EACH,CAAA;AAAA,QACC,0BACC,GAAA,CAAC,QAAA,EAAA,EAAO,KAAA,EAAM,uBAAA,EAAwB,yBAAqB,IAAA,EACzD,QAAA,kBAAA,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,QAAA,EAAS,QAAA;AAAA,YACT,OAAO,MAAA,CAAO,KAAA;AAAA,YACd,SAAS,MAAA,CAAO,OAAA;AAAA,YAChB,cAAc,MAAA,CAAO,YAAA;AAAA,YACrB,aAAa,MAAA,CAAO,WAAA;AAAA,YACpB,YAAY,MAAA,CAAO,UAAA;AAAA,YACnB,cAAc,MAAA,CAAO,YAAA;AAAA,YACrB,aAAA,EACE,OAAO,aAAA,IAAiB,8BAAA;AAAA,YAE1B,SAAS,MAAA,CAAO,OAAA;AAAA,YAChB,QAAQ,MAAA,CAAO,MAAA;AAAA,YACf,UAAU,MAAA,CAAO;AAAA;AAAA,SACnB,EACF;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-AYHC62OZ.js","sourcesContent":["import { ChevronLeft } from 'lucide';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport type { NavPane } from '../../../shared/panels/nav-pane.js';\nimport type { PanelBottomToolbar } from '../../../shared/panels/panel-toolbar.js';\nimport { Toolbar, type ToolbarConfig } from '../../actions/toolbar/toolbar.js';\nimport { ToolbarControlGroup } from '../../actions/toolbar-control-group/toolbar-control-group.js';\nimport {\n type HeadingLevel,\n ToolbarText,\n type ToolbarTextSize,\n} from '../../actions/toolbar-text/toolbar-text.js';\nimport { List, type ListConfig } from '../../collections/list/list.js';\nimport { Pane } from '../../layout/pane/pane.js';\nimport { LucideIcon } from '../../media/lucide-icon/lucide-icon.js';\n\n/**\n * One entry in a {@link NavStack}. The app owns the stack as an array (usually a\n * signal); `NavStack` renders it and `wireNavStack` animates the transitions.\n */\nexport interface NavStackView extends NavPane<\n NavStackViewToolbar,\n PanelBottomToolbar\n> {\n /** Stable identity for keyed reconcile and transition direction. */\n key: string;\n}\n\n/** Per-view top toolbar. The stack supplies its back control before `leading`. */\nexport interface NavStackViewToolbar extends NavStackToolbarConfig {\n title?: string;\n leading?: KerfUiContent;\n center?: KerfUiContent;\n trailing?: KerfUiContent;\n}\n\n/** A view's structured bottom toolbar; it cross-fades on navigation. */\nexport type NavStackViewBottomToolbar = PanelBottomToolbar;\n\n/**\n * The top toolbar's configuration. Its `ToolbarConfig` forwards to the real\n * `Toolbar` the stack renders; by default that toolbar draws no divider and\n * claims the top and side safe-area edges the stack still touches.\n */\nexport interface NavStackToolbarConfig extends ToolbarConfig {\n /** Accessible name of the top toolbar (default: none). */\n label?: string;\n /** Size of the view title's `ToolbarText` (default `large`). */\n titleSize?: ToolbarTextSize;\n /** Expose the view title as a heading at this level (default: a plain span). */\n headingLevel?: HeadingLevel;\n}\n\nexport interface NavStackProps {\n id: string;\n /** Accessible name for the stack region. */\n label: string;\n /** The stack, root first; the last entry is the active top view. */\n views: NavStackView[];\n /** Accessible label for the icon-only back control (default \"Back\"). */\n backLabel?: string;\n /** The back control's icon (default a chevron-left `LucideIcon`). */\n backIcon?: KerfUiContent;\n /**\n * Visible text beside the back icon, such as the previous view's title\n * (default: icon only). When set, the text names the control and\n * `backLabel` is not used.\n */\n backText?: string;\n /** The top toolbar's configuration, forwarded to its `Toolbar`. */\n toolbarConfig?: NavStackToolbarConfig;\n /** Persistent last group in every view's top toolbar, supplied by a hosting panel. */\n panelToggle?: KerfUiContent;\n /** Hide the top toolbar entirely (rare — a fully custom-chrome view). */\n hideToolbar?: boolean;\n /** Optional persistent bottom toolbar used when the active view does not provide one. */\n bottomToolbar?: NavStackViewBottomToolbar;\n /**\n * Stack chrome separator. `auto` (default) draws both available edges\n * against a sunken active Pane and otherwise follows `chromeDividers`;\n * `hidden` suppresses the stack-owned edges.\n */\n separator?: 'auto' | 'hidden';\n /**\n * The line under the top chrome and over the bottom toolbar, where they\n * meet the active view. `scroll` (default) shows the chrome's line only\n * while the view's content is scrolled beneath it, and the bottom\n * toolbar's only while more content lies below — never when the content\n * fits — once `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is\n * wired above the stack; unwired, neither shows. `always` shows both\n * without the wiring; `none` neither, even when wired. The line is drawn\n * inside the chrome, so no state moves the chrome or the content. A\n * A sunken active Pane still draws the separator unless\n * `separator=\"hidden\"`. A `toolbarConfig.dividerSides` edge is the Toolbar's\n * own and is unaffected.\n */\n chromeDividers?: 'scroll' | 'always' | 'none';\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nconst DEFAULT_SAFE_AREA_EDGES = [\n 'block-start',\n 'inline-start',\n 'inline-end',\n] as const;\n\nconst DEFAULT_BOTTOM_SAFE_AREA_EDGES = [\n 'block-end',\n 'inline-start',\n 'inline-end',\n] as const;\n\nfunction chromeList(content: KerfUiContent, config?: ListConfig) {\n return (\n <List\n dividerSides={config?.dividerSides}\n gap={config?.gap}\n hAlign={config?.hAlign}\n vAlign={config?.vAlign}\n textInsets={config?.textInsets}\n controlInsets={config?.controlInsets}\n >\n {content}\n </List>\n );\n}\n\n/**\n * A navigation stack (iOS-style push/pop). Renders every entry stacked, the last\n * one active; `@kerfjs/ui/wire-nav-stack`'s `wireNavStack` slides the content and\n * cross-fades the chrome across a change. Its top chrome is a real `Toolbar`: the\n * back control and title lead, the active view's `toolbar` fills the zones,\n * and `toolbarConfig` supplies defaults. A single-pane\n * layout is a `NavStack` with one entry. See `docs/23-app-layouts.md` §3.1.\n */\nexport function NavStack({\n id,\n label,\n views,\n backLabel = 'Back',\n backIcon,\n backText,\n toolbarConfig = {},\n panelToggle,\n hideToolbar = false,\n bottomToolbar,\n separator = 'auto',\n chromeDividers = 'scroll',\n className = '',\n slot,\n}: NavStackProps) {\n const topIndex = views.length - 1;\n const top = views[topIndex];\n const topToolbar = top?.toolbar;\n const bottom = top?.bottomToolbar ?? bottomToolbar;\n const canPop = views.length > 1;\n const topDensity = topToolbar?.density ?? toolbarConfig.density;\n return (\n <section\n class={`kui-nav-stack ${className}`.trim()}\n id={id}\n data-component=\"nav-stack\"\n data-nav-stack-id={id}\n data-depth={String(views.length)}\n data-separator={separator}\n data-chrome-dividers={\n chromeDividers === 'always' || chromeDividers === 'none'\n ? chromeDividers\n : undefined\n }\n aria-label={label}\n slot={slot}\n >\n {!hideToolbar && (\n <div class=\"kui-nav-stack__chrome\" data-nav-stack-chrome>\n <Toolbar\n label={topToolbar?.label ?? toolbarConfig.label}\n density={topDensity}\n dividerSides={\n topToolbar?.dividerSides ?? toolbarConfig.dividerSides\n }\n centerAlign={topToolbar?.centerAlign ?? toolbarConfig.centerAlign}\n responsive={topToolbar?.responsive ?? toolbarConfig.responsive}\n responsiveAt={\n topToolbar?.responsiveAt ?? toolbarConfig.responsiveAt\n }\n safeAreaEdges={\n topToolbar?.safeAreaEdges ??\n toolbarConfig.safeAreaEdges ??\n DEFAULT_SAFE_AREA_EDGES\n }\n leading={\n <>\n {canPop && (\n <ToolbarControlGroup\n appearance=\"borderless\"\n shape=\"rounded\"\n content={backText ? 'mixed' : 'icon'}\n size={topDensity === 'compact' ? 'compact' : 'default'}\n single\n >\n <button\n type=\"button\"\n class=\"kui-nav-stack__back\"\n data-nav-back\n aria-label={backText ? undefined : backLabel}\n >\n {backIcon ?? (\n <LucideIcon\n icon={ChevronLeft}\n name=\"chevron-left\"\n className=\"kui-nav-stack__back-icon\"\n />\n )}\n {backText ? <span>{backText}</span> : null}\n </button>\n </ToolbarControlGroup>\n )}\n {topToolbar?.leading}\n <ToolbarText\n text={topToolbar?.title ?? ''}\n size={\n topToolbar?.titleSize ?? toolbarConfig.titleSize ?? 'large'\n }\n headingLevel={\n topToolbar?.headingLevel ?? toolbarConfig.headingLevel\n }\n fill\n />\n </>\n }\n center={topToolbar?.center}\n trailing={\n <>\n {topToolbar?.trailing}\n {panelToggle}\n </>\n }\n />\n </div>\n )}\n <div class=\"kui-nav-stack__viewport\" data-nav-stack-viewport>\n {views.map((view, index) => (\n <article\n class=\"kui-nav-stack__view\"\n data-key={view.key}\n data-nav-key={view.key}\n data-nav-active={String(index === topIndex)}\n aria-hidden={String(index !== topIndex)}\n >\n {view.pane ||\n view.header !== undefined ||\n view.footer !== undefined ? (\n <Pane\n appearance={view.pane?.appearance}\n deepInset={view.pane?.deepInset}\n tabIndex={view.pane?.tabIndex}\n outlined={view.pane?.outlined}\n contentElement={view.pane?.contentElement}\n contentLabel={view.pane?.contentLabel}\n separators={view.pane?.separators}\n safeAreaEdges={view.pane?.safeAreaEdges}\n chromeDividers={view.pane?.chromeDividers}\n header={\n view.header === undefined ? undefined : (\n <div data-nav-stack-header>\n {chromeList(view.header, view.headerList)}\n </div>\n )\n }\n footer={\n view.footer === undefined ? undefined : (\n <div data-nav-stack-footer>\n {chromeList(view.footer, view.footerList)}\n </div>\n )\n }\n >\n {view.content}\n </Pane>\n ) : (\n view.content\n )}\n </article>\n ))}\n </div>\n {bottom && (\n <footer class=\"kui-nav-stack__bottom\" data-nav-stack-bottom>\n <Toolbar\n position=\"footer\"\n label={bottom.label}\n density={bottom.density}\n dividerSides={bottom.dividerSides}\n centerAlign={bottom.centerAlign}\n responsive={bottom.responsive}\n responsiveAt={bottom.responsiveAt}\n safeAreaEdges={\n bottom.safeAreaEdges ?? DEFAULT_BOTTOM_SAFE_AREA_EDGES\n }\n leading={bottom.leading}\n center={bottom.center}\n trailing={bottom.trailing}\n />\n </footer>\n )}\n </section>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/workbench/internal/workbench-toolbars.tsx","../src/components/layout/workbench/workbench.tsx"],"names":["jsx","jsxs"],"mappings":";;;;;;;;;;;AA4EA,IAAM,KAAA,GAA8C;AAAA,EAClD,QAAA,EAAU,MAAA;AAAA,EACV,SAAA,EAAW,OAAA;AAAA,EACX,YAAA,EAAc;AAChB,CAAA;AAyBA,IAAM,gBAAA,GAAmB,CACvB,WAAA,EACA,GAAA,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AAAA,YACC,YAAA;AAAA,YACA,QAAA;AAAA,YACA,YAAA;AAAA,YACA,eAAA;AAAA,cACE,EAAA;AAAA,cACA,cAAA;AAAA,cACA,YAAA;AAAA,cACA,QAAQ,iBAAiB;AAAA;AAC3B;AACF,SAAA,EACF,CAAA;AAAA,QACC,SAAA,oBAAaA,GAAAA,CAAC,IAAA,EAAA,EAAK,IAAQ,IAAA,EAAK,OAAA,EAAQ,OAAO,SAAA,EAAW,CAAA;AAAA,QAC1D,OAAA;AAAA,UACC,SAAA;AAAA,UACA,OAAA;AAAA,UACA,YAAA;AAAA,UACA,gBAAgB,EAAA,EAAI,WAAA,EAAa,SAAA,EAAW,OAAA,CAAQ,WAAW,CAAC;AAAA,SAClE;AAAA,QACC,kCACCA,GAAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,yBAAA;AAAA,YACN,yBAAA,EAAuB,IAAA;AAAA,YACvB,aAAA,EAAY;AAAA;AAAA,SACd,GACE;AAAA;AAAA;AAAA,GACN;AAEJ","file":"chunk-BU23Z5HZ.js","sourcesContent":["import type { KerfUiContent } from '../../../../shared/content/semantic-content.js';\nimport {\n composedPanelBody,\n groupSizeFor,\n type PanelBottomToolbar,\n type PanelChromePlacement,\n type PanelSide,\n type PanelToggle,\n type PanelToggleAttributes,\n panelToggleGroup,\n type PanelToolbar,\n relocatedPanelGroups,\n} from '../../../../shared/panels/panel-toolbar.js';\nimport {\n FloatingToolbar,\n type FloatingToolbarPosition,\n} from '../../../actions/floating-toolbar/floating-toolbar.js';\nimport {\n Toolbar,\n type ToolbarConfig,\n} from '../../../actions/toolbar/toolbar.js';\nimport { List, type ListConfig } from '../../../collections/list/list.js';\nimport {\n NavStack,\n type NavStackProps,\n} from '../../../navigation/nav-stack/nav-stack.js';\nimport { Pane, type PaneConfig } from '../../pane/pane.js';\nimport {\n type WorkbenchPanelKey,\n workbenchRegionId,\n} from './workbench-resize.js';\n\n/** The standard toggle a Workbench renders for a panel (see {@link PanelToggle}). */\nexport type WorkbenchPanelToggle = PanelToggle;\n\n/**\n * A Workbench panel's top toolbar, composed by the Workbench so its groups can\n * follow the panel's open state (see {@link PanelToolbar} for the roles).\n * A collapsed rail's marked groups and toggle go to the leading edge of\n * `mainToolbar` (left rail) or its trailing edge (right rail); a collapsed\n * drawer's go to the trailing edge of `mainBottomToolbar`, else to a\n * `FloatingToolbar` in the work area's bottom-end corner.\n */\nexport type WorkbenchPanelToolbar = PanelToolbar;\nexport type WorkbenchPanelBottomToolbar = PanelBottomToolbar;\n\n/**\n * The work area's top toolbar; collapsed rails add their groups to it. Its\n * configuration forwards to its `Toolbar`. It draws no divider of its own by\n * default: the work area's `Pane` draws one under its header chrome, wherever\n * that chrome ends, while `main` is scrolled (`mainPane.chromeDividers`).\n */\nexport interface WorkbenchMainToolbar extends ToolbarConfig {\n label: string;\n /** The work area's title, usually an extra-large `ToolbarText`. */\n title?: KerfUiContent;\n /** Groups after the title. */\n leading?: KerfUiContent;\n center?: KerfUiContent;\n /** Groups at the trailing edge, before a collapsed right rail's groups. */\n trailing?: KerfUiContent;\n}\n\n/**\n * The work area's bottom toolbar; a collapsed drawer adds its groups to it.\n * Its configuration forwards to its `Toolbar`. It draws no divider of its own\n * by default: the work area's `Pane` draws one over its footer chrome while\n * more of `main` lies below (`mainPane.chromeDividers`).\n */\nexport interface WorkbenchMainBottomToolbar extends ToolbarConfig {\n label: string;\n leading?: KerfUiContent;\n center?: KerfUiContent;\n trailing?: KerfUiContent;\n}\n\nconst SIDES: Record<WorkbenchPanelKey, PanelSide> = {\n leftRail: 'left',\n rightRail: 'right',\n bottomDrawer: 'bottom',\n};\n\n/** A panel as far as its toolbar is concerned. */\nexport interface WorkbenchToolbarPanel {\n toolbar?: WorkbenchPanelToolbar;\n navStack?: Omit<\n NavStackProps,\n 'panelToggle' | 'hideToolbar' | 'className' | 'slot'\n >;\n header?: KerfUiContent;\n headerList?: ListConfig;\n headerPlacement?: PanelChromePlacement;\n footer?: KerfUiContent;\n footerList?: ListConfig;\n bottomToolbar?: WorkbenchPanelBottomToolbar;\n footerPlacement?: PanelChromePlacement;\n /** Configuration for the `Pane` a `toolbar` panel's content renders in. */\n pane?: PaneConfig;\n content?: KerfUiContent;\n collapsed?: boolean;\n /** The corner a collapsed panel's restore controls float in. */\n restorePosition?: FloatingToolbarPosition;\n}\n\n/** A Workbench toggle's wiring hooks: its side, morph key, and panel. */\nconst toggleAttributes = (\n workbenchId: string,\n key: WorkbenchPanelKey,\n): PanelToggleAttributes => ({\n 'data-workbench-toggle': SIDES[key],\n // Keyed, so the morph removes a toggle that leaves a toolbar instead of\n // reusing its (possibly focused) button for a different control.\n 'data-key': `${workbenchRegionId(workbenchId, key)}-toggle`,\n 'aria-controls': workbenchRegionId(workbenchId, key),\n});\n\n/**\n * The groups a collapsed panel hands to the work area: its marked groups,\n * then its toggle. Empty while the panel is open or has no toolbar.\n */\nexport function relocatedGroups(\n workbenchId: string,\n key: WorkbenchPanelKey,\n panel: WorkbenchToolbarPanel | undefined,\n density?: ToolbarConfig['density'],\n): KerfUiContent[] {\n const active = panel?.navStack?.views.at(-1);\n const toolbar =\n active && panel?.toolbar\n ? {\n ...panel.toolbar,\n leading: active.toolbar?.leading,\n center: active.toolbar?.center,\n trailing: active.toolbar?.trailing,\n }\n : panel?.toolbar;\n return relocatedPanelGroups(\n toolbar,\n SIDES[key],\n Boolean(panel?.collapsed),\n toggleAttributes(workbenchId, key),\n groupSizeFor(density),\n );\n}\n\n/**\n * A panel's content, wrapped in a `Pane` under its composed toolbar when it\n * has one (with its optional `footer` below). Without a toolbar the content\n * renders as given.\n */\nexport function panelBody(\n workbenchId: string,\n key: WorkbenchPanelKey,\n panel: WorkbenchToolbarPanel,\n) {\n const toolbar = panel.toolbar;\n if (panel.navStack) {\n const stack = panel.navStack;\n return NavStack({\n ...stack,\n toolbarConfig: {\n label: stack.toolbarConfig?.label ?? toolbar?.label,\n density: stack.toolbarConfig?.density ?? toolbar?.density,\n dividerSides:\n stack.toolbarConfig?.dividerSides ?? toolbar?.dividerSides,\n centerAlign: stack.toolbarConfig?.centerAlign ?? toolbar?.centerAlign,\n responsive: stack.toolbarConfig?.responsive ?? toolbar?.responsive,\n responsiveAt:\n stack.toolbarConfig?.responsiveAt ?? toolbar?.responsiveAt,\n safeAreaEdges:\n stack.toolbarConfig?.safeAreaEdges ?? toolbar?.safeAreaEdges,\n titleSize: stack.toolbarConfig?.titleSize,\n headingLevel: stack.toolbarConfig?.headingLevel,\n },\n panelToggle: toolbar?.toggle\n ? panelToggleGroup(\n SIDES[key],\n toolbar.toggle,\n Boolean(panel.collapsed),\n toggleAttributes(workbenchId, key),\n groupSizeFor(stack.toolbarConfig?.density ?? toolbar.density),\n )\n : undefined,\n });\n }\n if (!toolbar) return panel.content;\n return composedPanelBody({\n toolbar,\n side: SIDES[key],\n collapsed: Boolean(panel.collapsed),\n attributes: toggleAttributes(workbenchId, key),\n pane: panel.pane,\n header: panel.header,\n headerList: panel.headerList,\n headerPlacement: panel.headerPlacement,\n footer: panel.footer,\n footerList: panel.footerList,\n bottomToolbar: panel.bottomToolbar,\n footerPlacement: panel.footerPlacement,\n content: panel.content ?? null,\n });\n}\n\n/**\n * The work area's `mainHeader` / `mainFooter` chrome in a `List` carrying the\n * app's configuration; an omitted or `undefined` field keeps the `List`\n * default (no divider: the work area's `Pane` draws its chrome dividers).\n */\nfunction chromeList(content: KerfUiContent, config: ListConfig | undefined) {\n return (\n <List\n dividerSides={config?.dividerSides}\n gap={config?.gap}\n hAlign={config?.hAlign}\n vAlign={config?.vAlign}\n textInsets={config?.textInsets}\n controlInsets={config?.controlInsets}\n >\n {content}\n </List>\n );\n}\n\n/**\n * Whether the work area's header or footer chrome stays pinned (`fixed`),\n * scrolls away with the content (`scroll`), or stays pinned while the work\n * area is tall enough and scrolls with the content when it is short (`auto`,\n * the Pane's `chromePlacement=\"auto\"`; it applies to the pinned header and\n * footer together).\n */\nexport type WorkbenchChromePlacement = PanelChromePlacement;\n\n/**\n * The work area: the app's `main` in a `Pane` (configured by `mainPane`)\n * under `mainToolbar` and any `mainHeader` list, and above any `mainFooter`\n * list and `mainBottomToolbar` (the header and footer lists configured by\n * `mainHeaderList` / `mainFooterList`), with each collapsed panel's groups\n * added to the toolbar on its side. Without any of that chrome, `main`\n * renders as given; only `mainPane.appearance` applies to the Workbench's\n * own scroll region in that case.\n */\nexport function mainBody({\n workbenchId,\n main,\n mainToolbar,\n mainHeader,\n mainFooter,\n mainBottomToolbar,\n mainHeaderPlacement = 'fixed',\n mainFooterPlacement = 'fixed',\n mainPane,\n mainHeaderList,\n mainFooterList,\n leftRail,\n rightRail,\n bottomDrawer,\n}: {\n workbenchId: string;\n main: KerfUiContent;\n mainToolbar?: WorkbenchMainToolbar;\n mainHeader?: KerfUiContent;\n mainFooter?: KerfUiContent;\n mainBottomToolbar?: WorkbenchMainBottomToolbar;\n mainHeaderPlacement?: WorkbenchChromePlacement;\n mainFooterPlacement?: WorkbenchChromePlacement;\n mainPane?: PaneConfig;\n mainHeaderList?: ListConfig;\n mainFooterList?: ListConfig;\n leftRail?: WorkbenchToolbarPanel;\n rightRail?: WorkbenchToolbarPanel;\n bottomDrawer?: WorkbenchToolbarPanel;\n}) {\n if (!mainToolbar && !mainBottomToolbar && !mainHeader && !mainFooter)\n return main;\n const left = relocatedGroups(\n workbenchId,\n 'leftRail',\n leftRail,\n mainToolbar?.density,\n );\n const right = relocatedGroups(\n workbenchId,\n 'rightRail',\n rightRail,\n mainToolbar?.density,\n );\n const drawer = mainBottomToolbar\n ? relocatedGroups(\n workbenchId,\n 'bottomDrawer',\n bottomDrawer,\n mainBottomToolbar.density,\n )\n : [];\n // The Pane draws one divider under the header chrome and one over the\n // footer chrome, wherever that chrome ends, from the scroll state.\n const header =\n !mainToolbar && !mainHeader ? undefined : (\n <>\n {mainToolbar ? (\n <Toolbar\n label={mainToolbar.label}\n density={mainToolbar.density}\n dividerSides={mainToolbar.dividerSides}\n centerAlign={mainToolbar.centerAlign}\n responsive={mainToolbar.responsive}\n responsiveAt={mainToolbar.responsiveAt}\n safeAreaEdges={mainToolbar.safeAreaEdges}\n leading={\n <>\n {left}\n {mainToolbar.title}\n {mainToolbar.leading}\n </>\n }\n center={mainToolbar.center}\n trailing={\n <>\n {mainToolbar.trailing}\n {right}\n </>\n }\n />\n ) : null}\n {mainHeader ? chromeList(mainHeader, mainHeaderList) : null}\n </>\n );\n const footer =\n !mainFooter && !mainBottomToolbar ? undefined : (\n <>\n {mainFooter ? chromeList(mainFooter, mainFooterList) : null}\n {mainBottomToolbar ? (\n <Toolbar\n position=\"footer\"\n label={mainBottomToolbar.label}\n density={mainBottomToolbar.density}\n dividerSides={mainBottomToolbar.dividerSides}\n centerAlign={mainBottomToolbar.centerAlign}\n responsive={mainBottomToolbar.responsive}\n responsiveAt={mainBottomToolbar.responsiveAt}\n safeAreaEdges={mainBottomToolbar.safeAreaEdges}\n leading={mainBottomToolbar.leading}\n center={mainBottomToolbar.center}\n trailing={\n <>\n {mainBottomToolbar.trailing}\n {drawer}\n </>\n }\n />\n ) : null}\n </>\n );\n const scrollHeader = mainHeaderPlacement === 'scroll';\n const scrollFooter = mainFooterPlacement === 'scroll';\n return (\n <Pane\n header={scrollHeader ? undefined : header}\n footer={scrollFooter ? undefined : footer}\n chromePlacement={\n mainHeaderPlacement === 'auto' || mainFooterPlacement === 'auto'\n ? 'auto'\n : 'fixed'\n }\n contentElement={mainPane?.contentElement}\n contentLabel={mainPane?.contentLabel}\n separators={mainPane?.separators}\n safeAreaEdges={mainPane?.safeAreaEdges}\n chromeDividers={mainPane?.chromeDividers}\n appearance={mainPane?.appearance}\n deepInset={mainPane?.deepInset}\n tabIndex={mainPane?.tabIndex}\n outlined={mainPane?.outlined}\n >\n {scrollHeader || scrollFooter ? (\n // Chrome that scrolls joins the content in one gapless column that\n // fills the scroller, so it scrolls away with the content.\n <List flex>\n {scrollHeader ? header : null}\n {main}\n {scrollFooter ? footer : null}\n </List>\n ) : (\n main\n )}\n </Pane>\n );\n}\n\n/**\n * A collapsed panel's groups when the work area has no toolbar on its side\n * to take them: a `FloatingToolbar` for the panel's restore corner, so the\n * panel can always be reopened.\n */\nexport function floatingRestore(\n workbenchId: string,\n key: WorkbenchPanelKey,\n panel: WorkbenchToolbarPanel | undefined,\n hasTargetToolbar: boolean,\n) {\n if (hasTargetToolbar) return undefined;\n const groups = relocatedGroups(workbenchId, key, panel);\n if (groups.length === 0) return undefined;\n return (\n <FloatingToolbar\n label={panel!.toolbar!.label}\n position={\n panel!.restorePosition ??\n (key === 'leftRail' ? 'bottom-start' : 'bottom-end')\n }\n >\n {groups}\n </FloatingToolbar>\n );\n}\n","import type { SafeHtml } from 'kerfjs';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport type { NavPane } from '../../../shared/panels/nav-pane.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport type { ListConfig } from '../../collections/list/list.js';\nimport type { NavStackProps } from '../../navigation/nav-stack/nav-stack.js';\nimport type { PaneConfig } from '../pane/pane.js';\nimport { ResizeGrip } from '../resizable-region/internal/resize-grip.js';\nimport {\n clampRegionSize,\n type ResizableRegionAxis,\n type ResizableRegionCollapseMotion,\n type ResizableRegionContentOverflow,\n type ResizableRegionEdge,\n type ResizableRegionPresentation,\n type ResizableRegionRestorePosition,\n type ResizableRegionSeparator,\n} from '../resizable-region/resizable-region.js';\nimport {\n WORKBENCH_MAIN_MIN_HEIGHT,\n WORKBENCH_MAIN_MIN_SIZE,\n WORKBENCH_RESIZE_DEFAULTS,\n type WorkbenchPanelKey,\n workbenchRegionId,\n} from './internal/workbench-resize.js';\nimport {\n floatingRestore,\n mainBody,\n panelBody,\n type WorkbenchChromePlacement,\n type WorkbenchMainBottomToolbar,\n type WorkbenchMainToolbar,\n type WorkbenchPanelBottomToolbar,\n type WorkbenchPanelToolbar,\n} from './internal/workbench-toolbars.js';\n\nexport type {\n WorkbenchChromePlacement,\n WorkbenchMainBottomToolbar,\n WorkbenchMainToolbar,\n WorkbenchPanelBottomToolbar,\n WorkbenchPanelToggle,\n WorkbenchPanelToolbar,\n} from './internal/workbench-toolbars.js';\n\n/**\n * The Workbench container breakpoint below which a panel presents as an\n * overlay: `narrow` (704px or less) or `compact` (448px or less) — the same\n * breakpoints as `ResizableRegion`'s `responsiveFillAt` — or `never` to keep\n * it inline at every width.\n */\nexport type WorkbenchResponsiveOverlayAt =\n 'compact' | 'narrow' | 'never' | number;\n\n/**\n * How wide a rail's overlay is in a compact (448px or less) Workbench: `inset`\n * fills the Workbench less a dismiss margin on the side away from the rail's\n * edge, so a press beside it closes it; `full` fills the Workbench.\n */\nexport type WorkbenchCompactOverlay = 'inset' | 'full';\n\n/** Drag-resize limits for a resizable Workbench panel, in px. */\nexport interface WorkbenchPanelResizable {\n /** Smallest size (default 180 for a rail, 120 for the drawer). */\n min?: number;\n /** Largest size (default 480). */\n max?: number;\n}\n\n/** Region sizing, collapse, and presentation shared by either panel body. */\ninterface WorkbenchPanelBase {\n /** Whether the panel is currently collapsed (the app owns this). */\n collapsed?: boolean;\n /**\n * Rail width, or drawer height, in px. Overrides the CSS default. For a\n * resizable panel it is the current size (default 280 for a rail, 220 for\n * the drawer), clamped to the limits; the app owns it and `wireWorkbench`\n * reports each resize.\n */\n size?: number;\n /**\n * Opt in to drag and keyboard resizing on the panel's inner separator:\n * `true` for the default limits, or `{ min, max }`. Off by default. Pair it\n * with `wireWorkbench` from `@kerfjs/ui/wire-workbench`.\n */\n resizable?: boolean | WorkbenchPanelResizable;\n /** Accessible name for the panel region. */\n label?: string;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the panel region. */\n tabIndex?: 0 | -1;\n /** Keep the standard focus outline visible while this panel is expanded. */\n outlined?: boolean;\n separator?: ResizableRegionSeparator;\n collapseMotion?: ResizableRegionCollapseMotion;\n contentOverflow?: ResizableRegionContentOverflow;\n presentation?: ResizableRegionPresentation;\n /**\n * Present the panel as an overlay, without a separator, below a Workbench\n * container breakpoint, and inline above it. `compact` and `narrow` use\n * CSS container queries; a positive number is a pixel threshold measured\n * by `wireWorkbench` and requires a `collapsed` signal. A rail overlays from its side at full\n * height, over the work area and an open drawer; the bottom drawer\n * overlays the bottom of the work-area column. Rails default to `narrow`\n * (pass `never` to keep one inline); the drawer defaults to inline.\n */\n responsiveOverlayAt?: WorkbenchResponsiveOverlayAt;\n /**\n * A rail's overlay width in a compact Workbench (default `inset`: the\n * Workbench less `--kui-workbench-overlay-dismiss-margin`, 44px). Ignored\n * by the drawer.\n */\n compactOverlay?: WorkbenchCompactOverlay;\n /**\n * Control shown while collapsed, in a safe-area-aware corner of the\n * Workbench (not the viewport); the bottom drawer's sits in the work-area\n * column. Prefer `toolbar.toggle`, which the Workbench relocates into the\n * work area's toolbar (or this corner when that toolbar is absent).\n */\n restoreControl?: SafeHtml;\n restorePosition?: ResizableRegionRestorePosition;\n}\n\n/** The original static panel body: one toolbar, optional fixed chrome, and one Pane. */\nexport interface WorkbenchStaticPanel\n extends\n WorkbenchPanelBase,\n NavPane<WorkbenchPanelToolbar, WorkbenchPanelBottomToolbar> {\n /** The composed toolbar; marked groups and its toggle relocate on collapse. */\n toolbar?: WorkbenchPanelToolbar;\n headerPlacement?: WorkbenchChromePlacement;\n footerPlacement?: WorkbenchChromePlacement;\n navStack?: never;\n}\n\n/** A panel whose active NavStack view supplies the toolbar, fixed header, and scroll body. */\nexport interface WorkbenchNavigationPanel extends WorkbenchPanelBase {\n navStack: Omit<\n NavStackProps,\n 'panelToggle' | 'hideToolbar' | 'className' | 'slot'\n >;\n /** Supplies the standard toggle; active view groups precede it and may relocate on collapse. */\n toolbar: Omit<\n WorkbenchPanelToolbar,\n 'title' | 'leading' | 'center' | 'trailing'\n > & {\n toggle: NonNullable<WorkbenchPanelToolbar['toggle']>;\n };\n content?: never;\n header?: never;\n headerList?: never;\n headerPlacement?: never;\n footer?: never;\n footerList?: never;\n bottomToolbar?: never;\n footerPlacement?: never;\n pane?: never;\n}\n\n/** A collapsible Workbench side rail or bottom drawer. */\nexport type WorkbenchPanel = WorkbenchStaticPanel | WorkbenchNavigationPanel;\n\nexport interface WorkbenchProps {\n /**\n * The Workbench's `id`. Each panel's `id` derives from it —\n * `<id>-left-rail`, `<id>-right-rail`, `<id>-bottom-drawer` — so a toggle\n * can name the panel it shows and hides with `aria-controls`.\n */\n id: string;\n label: string;\n /** The central work area. */\n main: KerfUiContent;\n /**\n * The work area's top toolbar. A collapsed left rail's marked groups\n * and toggle lead it; a collapsed right rail's trail it. With it, `main`\n * renders in a `Pane` below the toolbar.\n */\n mainToolbar?: WorkbenchMainToolbar;\n /**\n * Fixed content under `mainToolbar` — supporting copy such as a\n * description — divided from the scrolling `main` below it.\n */\n mainHeader?: KerfUiContent;\n /**\n * Fixed content over `mainBottomToolbar` — a status line or a resource\n * toolbar — divided from the scrolling `main` above it.\n */\n mainFooter?: KerfUiContent;\n /**\n * The work area's bottom toolbar. A collapsed drawer's marked groups and\n * toggle trail it; without it they float in the work area's corner.\n */\n mainBottomToolbar?: WorkbenchMainBottomToolbar;\n /**\n * Whether `mainToolbar` and `mainHeader` stay pinned (`fixed`, default),\n * scroll away with `main` (`scroll`) — useful where large text would leave\n * pinned chrome little room — or stay pinned while the work area is tall\n * enough and scroll with `main` when it is short (`auto`).\n */\n mainHeaderPlacement?: WorkbenchChromePlacement;\n /** The same for `mainFooter` and `mainBottomToolbar` (default `fixed`). */\n mainFooterPlacement?: WorkbenchChromePlacement;\n /**\n * Configuration for the work area's `Pane` (`contentElement`,\n * `contentLabel`, `separators`, `safeAreaEdges`, `chromeDividers`), which it has whenever it\n * has a toolbar, `mainHeader`, or `mainFooter`; without that chrome, `main`\n * renders as given and this is ignored. Omitted or `undefined` fields keep\n * the `Pane` defaults.\n */\n mainPane?: PaneConfig;\n /** Accessible name for the central region when it needs its own landmark. */\n mainLabel?: string;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the central region. */\n mainTabIndex?: 0 | -1;\n /** Keep the standard focus outline visible on the central region. */\n mainOutlined?: boolean;\n /**\n * Configuration for the `List` that holds `mainHeader` (`gap`, `hAlign`,\n * `vAlign`, `dividerSides`, `textInsets`, `controlInsets`). Omitted or\n * `undefined` fields keep the defaults (no divider: the work area's\n * `Pane` draws the line under its header chrome).\n */\n mainHeaderList?: ListConfig;\n /**\n * The same for the `List` that holds `mainFooter` (no divider by default:\n * the work area's `Pane` draws the line over its footer chrome).\n */\n mainFooterList?: ListConfig;\n leftRail?: WorkbenchPanel;\n rightRail?: WorkbenchPanel;\n bottomDrawer?: WorkbenchPanel;\n /**\n * Minimum width, in px, the work area keeps beside the inline rails, fixed\n * or `resizable` (default 320; `0` turns it off). Resizing a rail stops\n * where the work area would drop below it, and inline rails shrink\n * proportionally when the Workbench gets narrower. Workbenches without a\n * rail ignore it.\n */\n mainMinSize?: number;\n /**\n * Minimum height, in px, the work area keeps above an inline bottom drawer,\n * fixed or `resizable` (default 120; `0` turns it off) — the drawer's\n * counterpart of `mainMinSize`. Resizing the drawer stops where the work\n * area would drop below it, and the drawer shrinks when the Workbench gets\n * shorter. Workbenches without a drawer ignore it.\n */\n mainMinHeight?: number;\n /** Dim the work area below any open overlay and absorb outside presses; off by default. */\n overlayBackdrop?: boolean;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\ninterface ResolvedResize {\n regionId: string;\n axis: ResizableRegionAxis;\n edge: ResizableRegionEdge;\n size: number;\n min: number;\n max: number;\n}\n\n/**\n * Each panel's separator is its inner edge. Growing the left rail moves that\n * edge toward the inline end; growing the right rail or the drawer moves it\n * toward the start — the same edge vocabulary `ResizableRegion` uses.\n */\nconst EDGES: Record<WorkbenchPanelKey, ResizableRegionEdge> = {\n leftRail: 'end',\n rightRail: 'start',\n bottomDrawer: 'start',\n};\n\nconst DEFAULT_LABELS: Record<WorkbenchPanelKey, string> = {\n leftRail: 'left rail',\n rightRail: 'right rail',\n bottomDrawer: 'bottom drawer',\n};\n\nfunction resolveResize(\n id: string,\n key: WorkbenchPanelKey,\n panel: WorkbenchPanel,\n): ResolvedResize | undefined {\n if (!panel.resizable) return undefined;\n const defaults = WORKBENCH_RESIZE_DEFAULTS[key];\n const limits = panel.resizable === true ? {} : panel.resizable;\n const min = limits.min ?? defaults.min;\n const max = Math.max(min, limits.max ?? defaults.max);\n return {\n regionId: workbenchRegionId(id, key),\n axis: key === 'bottomDrawer' ? 'vertical' : 'horizontal',\n edge: EDGES[key],\n size: clampRegionSize(panel.size ?? defaults.size, min, max),\n min,\n max,\n };\n}\n\n/** The attributes a resizable panel adds for the resize wiring to read. */\nconst resizeAttributes = (resize: ResolvedResize | undefined) =>\n resize\n ? {\n 'data-resizable': 'true',\n 'data-region-id': resize.regionId,\n 'data-axis': resize.axis,\n 'data-edge': resize.edge,\n }\n : {};\n\n/**\n * A resizable panel's size lives in the resize wiring's track property, so a\n * drag or key press resizes the panel before the app re-renders; the CSS maps\n * it onto the rail width or drawer height.\n */\nfunction panelStyle(\n panel: WorkbenchPanel,\n resize: ResolvedResize | undefined,\n sizeProperty: string,\n) {\n if (resize) return `--kui-resizable-region-size:${resize.size}px`;\n return panel.size ? `${sizeProperty}: ${panel.size}px` : undefined;\n}\n\n/**\n * The separator a resizable panel owns: the same focusable `role=\"separator\"`\n * contract a `ResizableRegion` handle carries, so one resize wiring drives\n * both. It leaves the tab order while the panel is collapsed or not inline.\n */\nfunction PanelHandle({\n panel,\n resize,\n label,\n}: {\n panel: WorkbenchPanel;\n resize: ResolvedResize;\n label: string;\n}) {\n const inert =\n Boolean(panel.collapsed) || (panel.presentation ?? 'inline') !== 'inline';\n return (\n <div\n class=\"kui-workbench__handle\"\n role=\"separator\"\n tabindex={inert ? '-1' : '0'}\n aria-label={`Resize ${label}`}\n aria-orientation={\n resize.axis === 'horizontal' ? 'vertical' : 'horizontal'\n }\n aria-valuemin={resize.min}\n aria-valuemax={resize.max}\n aria-valuenow={resize.size}\n aria-hidden={inert ? 'true' : undefined}\n data-kui-resize-handle\n data-region-id={resize.regionId}\n >\n <span class=\"kui-workbench__handle-icon\" aria-hidden=\"true\">\n <ResizeGrip axis={resize.axis} />\n </span>\n </div>\n );\n}\n\n/**\n * A collapsed panel leaves the accessibility tree as a whole, like a collapsed\n * `CollapsiblePanel`: its content and separator are already inert or hidden,\n * so the labeled landmark would otherwise stay behind, empty, for a screen\n * reader to land on. Its restore control renders outside it and stays\n * reachable.\n */\nfunction hiddenFromAccessibility(panel: WorkbenchPanel) {\n return panel.collapsed || panel.presentation === 'hidden'\n ? ('true' as const)\n : undefined;\n}\n\n/** A breakpoint's attribute value; `never` (or none) renders no attribute. */\nconst responsiveAt = (at: WorkbenchResponsiveOverlayAt | undefined) =>\n at === 'never' ? undefined : at;\n\nconst inline = (panel: WorkbenchPanel | undefined) =>\n Boolean(panel && (panel.presentation ?? 'inline') === 'inline');\n\nconst expanded = (panel: WorkbenchPanel | undefined) =>\n Boolean(panel && !panel.collapsed);\n\nconst responsiveRail = (panel: WorkbenchPanel | undefined) =>\n panel ? responsiveAt(panel.responsiveOverlayAt ?? 'narrow') : undefined;\n\nconst responsiveDrawer = (panel: WorkbenchPanel | undefined) =>\n panel ? responsiveAt(panel.responsiveOverlayAt) : undefined;\n\nfunction Rail({\n id,\n side,\n panel,\n}: {\n id: string;\n side: 'left' | 'right';\n panel: WorkbenchPanel;\n}) {\n const key: WorkbenchPanelKey = side === 'left' ? 'leftRail' : 'rightRail';\n const resize = resolveResize(id, key, panel);\n return (\n <aside\n id={workbenchRegionId(id, key)}\n class={`kui-workbench__rail kui-workbench__rail--${side}`}\n data-workbench-rail={side}\n data-appearance={\n !panel.toolbar && panel.pane?.appearance === 'sunken'\n ? 'sunken'\n : undefined\n }\n data-collapsed={String(panel.collapsed ?? false)}\n data-outlined={\n !panel.collapsed && panel.presentation !== 'hidden' && panel.outlined\n ? 'true'\n : undefined\n }\n data-separator={panel.separator ?? 'auto'}\n data-collapse-motion={panel.collapseMotion ?? 'slide'}\n data-content-overflow={panel.contentOverflow ?? 'clip'}\n data-presentation={panel.presentation ?? 'inline'}\n data-responsive-overlay-at={responsiveAt(\n panel.responsiveOverlayAt ?? 'narrow',\n )}\n data-compact-overlay={panel.compactOverlay ?? 'inset'}\n {...resizeAttributes(resize)}\n aria-label={panel.label || undefined}\n aria-hidden={hiddenFromAccessibility(panel)}\n tabindex={\n panel.collapsed || panel.presentation === 'hidden'\n ? panel.tabIndex === undefined\n ? undefined\n : -1\n : panel.tabIndex\n }\n inert={Boolean(panel.collapsed)}\n style={panelStyle(panel, resize, '--kui-workbench-rail-width')}\n >\n <div\n class=\"kui-workbench__panel-content\"\n data-workbench-panel-content\n inert={Boolean(panel.collapsed)}\n >\n {panelBody(id, key, panel)}\n </div>\n {resize && (\n <PanelHandle\n panel={panel}\n resize={resize}\n label={panel.label || DEFAULT_LABELS[key]}\n />\n )}\n </aside>\n );\n}\n\nfunction Drawer({ id, panel }: { id: string; panel: WorkbenchPanel }) {\n const resize = resolveResize(id, 'bottomDrawer', panel);\n return (\n <section\n id={workbenchRegionId(id, 'bottomDrawer')}\n class=\"kui-workbench__drawer\"\n data-workbench-drawer\n data-appearance={\n !panel.toolbar && panel.pane?.appearance === 'sunken'\n ? 'sunken'\n : undefined\n }\n data-collapsed={String(panel.collapsed ?? false)}\n data-outlined={\n !panel.collapsed && panel.presentation !== 'hidden' && panel.outlined\n ? 'true'\n : undefined\n }\n data-separator={panel.separator ?? 'auto'}\n data-collapse-motion={panel.collapseMotion ?? 'slide'}\n data-content-overflow={panel.contentOverflow ?? 'clip'}\n data-presentation={panel.presentation ?? 'inline'}\n data-responsive-overlay-at={responsiveAt(panel.responsiveOverlayAt)}\n {...resizeAttributes(resize)}\n aria-label={panel.label || undefined}\n aria-hidden={hiddenFromAccessibility(panel)}\n tabindex={\n panel.collapsed || panel.presentation === 'hidden'\n ? panel.tabIndex === undefined\n ? undefined\n : -1\n : panel.tabIndex\n }\n inert={Boolean(panel.collapsed)}\n style={panelStyle(panel, resize, '--kui-workbench-drawer-height')}\n >\n <div\n class=\"kui-workbench__panel-content\"\n data-workbench-panel-content\n inert={Boolean(panel.collapsed)}\n >\n {panelBody(id, 'bottomDrawer', panel)}\n </div>\n {resize && (\n <PanelHandle\n panel={panel}\n resize={resize}\n label={panel.label || DEFAULT_LABELS.bottomDrawer}\n />\n )}\n </section>\n );\n}\n\n/** A collapsed panel's restore control, outside the clipped panel. */\nfunction restore(\n panel: WorkbenchPanel | undefined,\n side: 'left' | 'right' | 'bottom',\n position: ResizableRegionRestorePosition,\n generated: SafeHtml | undefined,\n) {\n const control = panel?.restoreControl ?? generated;\n if (!panel?.collapsed || !control || panel.presentation === 'hidden')\n return '';\n return (\n <div\n class=\"kui-workbench__restore\"\n data-panel={side}\n data-position={panel.restorePosition ?? position}\n >\n {control}\n </div>\n );\n}\n\n/**\n * The Xcode-like multi-panel workspace: a collapsible left rail, right rail, and\n * bottom drawer around a central work area (any absent). Collapsing snaps the\n * panel's track to zero in one reflow while its fixed-size content slides out via\n * a composited transform — the instant-width / sliding-content technique, so the\n * work area relayouts once, not per frame. Bottom-drawer content stays anchored\n * to the shell's stable bottom edge throughout that transition. The app owns\n * each `collapsed` flag; the collapse is pure CSS. A collapsed panel renders\n * `inert` and `aria-hidden`, so neither Tab nor assistive technology reaches\n * controls that have slid out of view or an empty landmark (its restore control\n * lives outside it and stays reachable). A panel may opt in to drag and keyboard resizing with\n * `resizable`, which `wireWorkbench` drives. See `docs/23-app-layouts.md` §3.3.\n */\nexport function Workbench({\n id,\n label,\n main,\n leftRail,\n rightRail,\n bottomDrawer,\n mainToolbar,\n mainHeader,\n mainFooter,\n mainBottomToolbar,\n mainHeaderPlacement,\n mainFooterPlacement,\n mainPane,\n mainLabel,\n mainTabIndex,\n mainOutlined = false,\n mainHeaderList,\n mainFooterList,\n mainMinSize = WORKBENCH_MAIN_MIN_SIZE,\n mainMinHeight = WORKBENCH_MAIN_MIN_HEIGHT,\n overlayBackdrop = false,\n className = '',\n slot,\n}: WorkbenchProps) {\n // Each work-area minimum applies only on an axis a panel shares with it:\n // the width beside a rail, the height above the drawer.\n const px = (value: number) => Math.max(0, Math.round(value));\n const mainMin = leftRail || rightRail ? px(mainMinSize) : undefined;\n const mainMinBlock = bottomDrawer ? px(mainMinHeight) : undefined;\n const style = [\n mainMin === undefined ? '' : `--_kui-workbench-main-min-width:${mainMin}px`,\n mainMinBlock === undefined\n ? ''\n : `--_kui-workbench-main-min-height:${mainMinBlock}px`,\n ]\n .filter(Boolean)\n .join(';');\n // A region painted directly (no composed Pane chrome) needs the texture too.\n if (\n [leftRail, rightRail, bottomDrawer].some(\n (panel) => panel?.pane?.appearance === 'sunken',\n ) ||\n mainPane?.appearance === 'sunken'\n )\n ensureSunkenTexture();\n return (\n <section\n class={`kui-workbench ${className}`.trim()}\n id={id}\n data-component=\"workbench\"\n data-main-min-size={mainMin === undefined ? undefined : String(mainMin)}\n data-main-min-height={\n mainMinBlock === undefined ? undefined : String(mainMinBlock)\n }\n data-left-inline-expanded={\n inline(leftRail) && expanded(leftRail) ? 'true' : undefined\n }\n data-right-inline-expanded={\n inline(rightRail) && expanded(rightRail) ? 'true' : undefined\n }\n data-left-responsive-inline={\n inline(leftRail) ? responsiveRail(leftRail) : undefined\n }\n data-right-responsive-inline={\n inline(rightRail) ? responsiveRail(rightRail) : undefined\n }\n data-left-responsive-expanded={\n inline(leftRail) && expanded(leftRail)\n ? responsiveRail(leftRail)\n : undefined\n }\n data-right-responsive-expanded={\n inline(rightRail) && expanded(rightRail)\n ? responsiveRail(rightRail)\n : undefined\n }\n data-rail-overlay-expanded={\n (leftRail?.presentation === 'overlay' && expanded(leftRail)) ||\n (rightRail?.presentation === 'overlay' && expanded(rightRail))\n ? 'true'\n : undefined\n }\n data-drawer-overlay-expanded={\n bottomDrawer?.presentation === 'overlay' && expanded(bottomDrawer)\n ? 'true'\n : undefined\n }\n data-drawer-responsive-expanded={\n inline(bottomDrawer) && expanded(bottomDrawer)\n ? responsiveDrawer(bottomDrawer)\n : undefined\n }\n data-overlay-backdrop={overlayBackdrop ? 'true' : undefined}\n data-responsive-overlay={\n responsiveRail(leftRail) ||\n responsiveRail(rightRail) ||\n responsiveDrawer(bottomDrawer)\n ? 'true'\n : undefined\n }\n style={style || undefined}\n aria-label={label}\n slot={slot}\n >\n {leftRail && <Rail id={id} side=\"left\" panel={leftRail} />}\n {restore(\n leftRail,\n 'left',\n 'bottom-start',\n floatingRestore(id, 'leftRail', leftRail, Boolean(mainToolbar)),\n )}\n <div class=\"kui-workbench__center\">\n <div\n class=\"kui-workbench__main\"\n data-workbench-main\n data-outlined={mainOutlined ? 'true' : undefined}\n role={mainLabel ? 'region' : undefined}\n aria-label={mainLabel}\n tabindex={mainTabIndex}\n data-drawer-inline-expanded={\n inline(bottomDrawer) && expanded(bottomDrawer) ? 'true' : undefined\n }\n data-drawer-responsive-inline={\n inline(bottomDrawer) ? responsiveDrawer(bottomDrawer) : undefined\n }\n data-appearance={\n !mainToolbar &&\n !mainBottomToolbar &&\n !mainHeader &&\n !mainFooter &&\n mainPane?.appearance === 'sunken'\n ? 'sunken'\n : undefined\n }\n >\n {mainBody({\n workbenchId: id,\n main,\n mainToolbar,\n mainHeader,\n mainFooter,\n mainBottomToolbar,\n mainHeaderPlacement,\n mainFooterPlacement,\n mainPane,\n mainHeaderList,\n mainFooterList,\n leftRail,\n rightRail,\n bottomDrawer,\n })}\n </div>\n {bottomDrawer && <Drawer id={id} panel={bottomDrawer} />}\n {restore(\n bottomDrawer,\n 'bottom',\n 'bottom-end',\n floatingRestore(\n id,\n 'bottomDrawer',\n bottomDrawer,\n Boolean(mainBottomToolbar),\n ),\n )}\n </div>\n {rightRail && <Rail id={id} side=\"right\" panel={rightRail} />}\n {restore(\n rightRail,\n 'right',\n 'bottom-end',\n floatingRestore(id, 'rightRail', rightRail, Boolean(mainToolbar)),\n )}\n {overlayBackdrop ? (\n <div\n class=\"kui-workbench__backdrop\"\n data-workbench-backdrop\n aria-hidden=\"true\"\n />\n ) : null}\n </section>\n );\n}\n"]}
|