@bigpixelrocket/uiok 0.4.0 → 0.5.0

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/button/TextLink.d.ts +19 -3
  3. package/dist/button/TextLink.js +4 -3
  4. package/dist/dialog/ModalDialog.js +8 -2
  5. package/dist/frame/Tree.d.ts +8 -2
  6. package/dist/frame/Tree.js +5 -3
  7. package/dist/frame/WindowFrame.js +2 -1
  8. package/dist/frame/frame.css +26 -4
  9. package/dist/icon/ProductMark.d.ts +57 -0
  10. package/dist/icon/ProductMark.js +26 -0
  11. package/dist/icon/icon.css +53 -0
  12. package/dist/icon/index.d.ts +3 -1
  13. package/dist/icon/index.js +3 -1
  14. package/dist/labels/settings.d.ts +6 -0
  15. package/dist/labels/settings.js +1 -0
  16. package/dist/listing/Listing.d.ts +60 -4
  17. package/dist/listing/Listing.js +39 -10
  18. package/dist/listing/ListingScope.d.ts +7 -0
  19. package/dist/listing/ListingScope.js +8 -0
  20. package/dist/listing/Timeline.d.ts +51 -0
  21. package/dist/listing/Timeline.js +28 -0
  22. package/dist/listing/index.d.ts +4 -2
  23. package/dist/listing/index.js +3 -1
  24. package/dist/listing/listing.css +185 -22
  25. package/dist/log/Ansi.logic.d.ts +27 -0
  26. package/dist/log/Ansi.logic.js +203 -0
  27. package/dist/log/LogWell.d.ts +11 -2
  28. package/dist/log/LogWell.js +15 -3
  29. package/dist/log/index.d.ts +1 -0
  30. package/dist/log/index.js +1 -0
  31. package/dist/log/log.css +80 -0
  32. package/dist/menu/Menu.d.ts +89 -0
  33. package/dist/menu/Menu.js +143 -0
  34. package/dist/menu/Menu.logic.d.ts +56 -0
  35. package/dist/menu/Menu.logic.js +64 -0
  36. package/dist/menu/index.d.ts +5 -1
  37. package/dist/menu/index.js +5 -1
  38. package/dist/menu/menu.css +51 -0
  39. package/dist/palette/Palette.d.ts +3 -2
  40. package/dist/palette/Palette.js +8 -4
  41. package/dist/palette/PaletteRows.d.ts +129 -0
  42. package/dist/palette/PaletteRows.js +74 -0
  43. package/dist/palette/index.d.ts +5 -2
  44. package/dist/palette/index.js +5 -2
  45. package/dist/pane/PaneFrame.d.ts +22 -1
  46. package/dist/pane/PaneFrame.js +42 -5
  47. package/dist/pane/index.d.ts +1 -1
  48. package/dist/shell/SettingsDialog.d.ts +20 -2
  49. package/dist/shell/SettingsDialog.js +13 -3
  50. package/dist/shell/index.d.ts +1 -1
  51. package/dist/styles.css +1 -0
  52. package/dist/surface/FactTable.d.ts +44 -0
  53. package/dist/surface/FactTable.js +33 -0
  54. package/dist/surface/index.d.ts +4 -2
  55. package/dist/surface/index.js +4 -2
  56. package/dist/surface/surface.css +64 -0
  57. package/dist/tabs/PageTabs.d.ts +6 -0
  58. package/dist/tabs/PageTabs.js +1 -1
  59. package/dist/tabs/tabs.css +14 -0
  60. package/dist/terminal/TerminalBox.d.ts +30 -0
  61. package/dist/terminal/TerminalBox.js +17 -0
  62. package/dist/terminal/index.d.ts +3 -1
  63. package/dist/terminal/index.js +3 -1
  64. package/dist/terminal/terminal.css +29 -0
  65. package/dist/themes/themes.generated.css +20 -0
  66. package/dist/themes/tokens.d.ts +1 -0
  67. package/dist/themes/tokens.js +13 -1
  68. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.5.0] - 2026-11-23
10
+
11
+ ### Added
12
+
13
+ - `Menu` (`@bigpixelrocket/uiok/menu`): a menu of verbs or places opened at a point or dropped from an element, through a portal: items (`MenuItemEntry`) with a glyph or a mark, a chord as key caps, a danger tone, a disabled state with its reason, a check, and the current one's dot; separators and group headings; the keys held while open (↑ ↓, Home, End, Return, Space, Escape, Tab), kept from the browser-key guard and a page's own key handlers (`data-native-keyboard`); a menu taller than the window scrolls, the keys keeping the cursor's item in view. Its pure placement and keys are `placeMenu` and `menuKeyAction`.
14
+ - `PanePathBar`'s `siblings` (`PaneSiblings`): the last crumb becomes a ⌄ button that drops the places beside it (a service's other versions) as a `Menu`, the one shown marked; a pick, a closing key, or a second press gives the focus back to the crumb, even when the pick renames it.
15
+ - Palette rows as components (`@bigpixelrocket/uiok/palette`): `PaletteList`, `PaletteOption` (mark, name, a sentence, path, or command, a trail, the current dot, cursor, disabled; its context, a trail in words, and its current state read as its description unless the caller words one), `PaletteHeading`, `PaletteNote`, `PaletteNotes`, and `PaletteFailure`.
16
+ - `TerminalBox` and `TERMINAL_BOX_HEIGHT` (`@bigpixelrocket/uiok/terminal`): a terminal framed at a fixed height (200px by default, a dialog's console), or filling its parent (a dock).
17
+ - `ProductMark` and `ProductMarkShape` (`@bigpixelrocket/uiok/icon`): a product's brand mark drawn from data the app passes in, with a fallback glyph, and the theme token `--product-mark-mix` (100% in a light theme, 78% in a dark one) that sets how much of the brand colour shows; a mark with no colour of its own and a fallback glyph take a row's icon tone, on the cursor and a selection too.
18
+ - `FactTable`, `FactRow`, and `FactTone` (`@bigpixelrocket/uiok/surface`): a page's short table of facts, a state glyph, name, detail, and value a row.
19
+ - `Cell`'s `tone` (`CellTone`: `warning`, `accent`, `danger`), held on the cursor row and under the pointer; `Row`'s `dim` (a name in the row-meta tone, `.row-dim`) and `add` (the add row's look with its accent plus); `TreeRow`'s `add`, whose plus keeps the accent on the cursor row.
20
+ - `PageTab`'s `count`, drawn after the tab's name and read in its accessible name.
21
+ - `TextLink`'s `disabled` and `label` (an accessible name of its own).
22
+ - `SettingsPage`'s `chip` takes a `SettingsChip` (`text`, `icon`, `tip`) as well as a string, and the `settings` label `pageWithChip`, which names a sidebar row and its chip apart ("Updates, Update to 1.4.4").
23
+ - `TimelineCell` and `TimelineScale` (`@bigpixelrocket/uiok/listing`): a row's span on a shared scale (a wait, then a bar, in the solid accent on the path that matters) and the ticks over its column, its bar and wait in the selection's words on a selected row and its span read once, as its name; `Row`'s `emphasis` puts a row's name in the strong weight.
24
+ - `Row`'s `selected`, `marked`, and `change` (`changed`, `removed`), and `Cell`'s `kind` (`action`, `hover`) and `missing`, so a row's states and a cell's kinds need no class name.
25
+ - `LogWell`'s `ansi`, which draws each line's SGR colours, backgrounds, and weights in the theme's text tones (a dim filled run keeps its fill's paired words) and drops every other escape sequence, control string (OSC, DCS, SOS, PM, APC), and cut-off escape, reading colon subparameters as one parameter and applying no CSI with a private marker or an intermediate, in time linear in the line, over `ansiSegments`, `ANSI_COLOURS`, `AnsiColour`, and `AnsiSegment` (`@bigpixelrocket/uiok/log`).
26
+
27
+ ### Changed
28
+
29
+ - A `ModalDialog`'s box (the Settings dialog's included) and a `Palette`'s box carry the listing scope (`.listing-root`), and a `Listing` drawn outside any scope carries it itself, its own rules matching the listing that carries the scope, so listings, rows, and filter fields keep their look in a dialog, a palette, or anywhere else, in the listing's monospace face. `Palette`'s classes are now `folder-menu palette listing-root`.
30
+
31
+ ### Fixed
32
+
33
+ - The tree keeps its look where single-class rules lost to others: a chevron off the cursor row draws in the rows' dim icon tone rather than its row's words, a tree note that is also a listing's empty line (`.pane-message.empty`) keeps the tree's small size and padding, and a focused `TreeFilterInput` shows its row's underline without the field focus ring.
34
+
9
35
  ## [0.4.0] - 2026-11-23
10
36
 
11
37
  ### Added
@@ -245,7 +271,8 @@ The first published version. The package is published to npm as `@bigpixelrocket
245
271
  - `lucide-react` 1.31 or later within 1.x is a peer dependency.
246
272
  - Terminal (`@bigpixelrocket/uiok/terminal`, `docs/components/terminal.md`): `Terminal`, Ghostty's VT engine as WebAssembly drawn on a canvas, read-only without `onInput`, with a Copy and Paste menu whose chords come from `menuChords`, a visual bell, line-editing actions bound by `actionForKey`, and `TerminalScrollbackContext`. The package root does not export it, so an app without a terminal never loads its assets. Its words are the new `terminal` label group; the package now ships a `NOTICE` with the engine's, adapter's, and font's licences.
247
273
 
248
- [Unreleased]: https://github.com/Bigpixelrocket/uiok/compare/v0.4.0...HEAD
274
+ [Unreleased]: https://github.com/Bigpixelrocket/uiok/compare/v0.5.0...HEAD
275
+ [0.5.0]: https://github.com/Bigpixelrocket/uiok/compare/v0.4.0...v0.5.0
249
276
  [0.4.0]: https://github.com/Bigpixelrocket/uiok/compare/v0.3.0...v0.4.0
250
277
  [0.3.0]: https://github.com/Bigpixelrocket/uiok/compare/v0.2.3...v0.3.0
251
278
  [0.2.3]: https://github.com/Bigpixelrocket/uiok/compare/v0.2.2...v0.2.3
@@ -2,8 +2,23 @@ import type { LucideIcon } from 'lucide-react';
2
2
  import type { ReactElement } from 'react';
3
3
  /** Props for {@link TextLink}. */
4
4
  export interface TextLinkProps {
5
- /** The link's words, which are also its accessible name: "DROP DATABASE in the manual". */
5
+ /**
6
+ * The link's words, which are also its accessible name unless `label`
7
+ * gives one: "DROP DATABASE in the manual".
8
+ */
6
9
  readonly children: string;
10
+ /**
11
+ * The accessible name, when the words alone do not say what the link
12
+ * opens: "View the whole log" for a strip's "View". The words stay what
13
+ * the eye reads; the name is what a screen reader says.
14
+ */
15
+ readonly label?: string;
16
+ /**
17
+ * Refuses the press for now (nothing to open yet): the words dim, the
18
+ * pointer underlines nothing, and the link leaves the Tab order, as
19
+ * every disabled button does.
20
+ */
21
+ readonly disabled?: boolean;
7
22
  /** What it opens: the host opens the manual page, the place, or the window. */
8
23
  readonly onClick: () => void;
9
24
  /** A glyph before the words (a book for a manual page), at the small icon size. */
@@ -21,7 +36,8 @@ export interface TextLinkProps {
21
36
  * It wears the accent's text colour and underlines under the pointer; it
22
37
  * takes the keyboard's focus with the shared ring. It is a button because
23
38
  * the host decides how to open what it names (an external browser, a tab),
24
- * so it never navigates the page itself. Styled by `.text-link` in
39
+ * so it never navigates the page itself. A `disabled` link dims and
40
+ * refuses the press; `label` names it when its words are short. Styled by `.text-link` in
25
41
  * `@bigpixelrocket/uiok/styles.css`.
26
42
  */
27
- export declare function TextLink({ children, onClick, icon: Icon, code, tip, shortcut }: TextLinkProps): ReactElement;
43
+ export declare function TextLink({ children, onClick, icon: Icon, code, tip, shortcut, label, disabled }: TextLinkProps): ReactElement;
@@ -7,9 +7,10 @@ import { tooltip } from '../tooltip/Tooltip.logic.js';
7
7
  * It wears the accent's text colour and underlines under the pointer; it
8
8
  * takes the keyboard's focus with the shared ring. It is a button because
9
9
  * the host decides how to open what it names (an external browser, a tab),
10
- * so it never navigates the page itself. Styled by `.text-link` in
10
+ * so it never navigates the page itself. A `disabled` link dims and
11
+ * refuses the press; `label` names it when its words are short. Styled by `.text-link` in
11
12
  * `@bigpixelrocket/uiok/styles.css`.
12
13
  */
13
- export function TextLink({ children, onClick, icon: Icon, code = false, tip, shortcut }) {
14
- return (_jsxs("button", { className: code ? 'text-link code' : 'text-link', onClick: onClick, type: "button", ...(tip === undefined && shortcut === undefined ? {} : tooltip(tip ?? children, shortcut)), children: [Icon === undefined ? null : _jsx(Icon, { "aria-hidden": true, size: ICON_SM }), _jsx("span", { className: "text-link-words", children: children })] }));
14
+ export function TextLink({ children, onClick, icon: Icon, code = false, tip, shortcut, label, disabled = false }) {
15
+ return (_jsxs("button", { "aria-label": label, className: code ? 'text-link code' : 'text-link', disabled: disabled, onClick: onClick, type: "button", ...(tip === undefined && shortcut === undefined ? {} : tooltip(tip ?? children, shortcut)), children: [Icon === undefined ? null : _jsx(Icon, { "aria-hidden": true, size: ICON_SM }), _jsx("span", { className: "text-link-words", children: children })] }));
15
16
  }
@@ -3,6 +3,7 @@ import { createContext, useCallback, useContext, useEffect, useLayoutEffect, use
3
3
  import { createPortal } from 'react-dom';
4
4
  import { isKeyKept } from '../keyboard/BrowserKeys.js';
5
5
  import { isTextEditingTarget } from '../keyboard/Keyboard.logic.js';
6
+ import { ListingScopeContext } from '../listing/ListingScope.js';
6
7
  import { cutTooltip } from '../tooltip/Tooltip.logic.js';
7
8
  import { DialogLayerContext } from './DialogLayer.js';
8
9
  import { DialogLegend } from './DialogLegend.js';
@@ -156,7 +157,12 @@ function DialogFrame({ title, labelId, describedBy, className, size, icon: Icon,
156
157
  containTab(event, dialogRef.current);
157
158
  }
158
159
  };
159
- return (_jsx("div", { className: frosted ? 'dialog-backdrop frosted' : 'dialog-backdrop', onMouseDown: onOutsidePress, children: _jsxs("div", { "aria-describedby": describedBy, "aria-labelledby": labelId, "aria-modal": "true", className: ['dialog', size === undefined ? null : `dialog-size-${size}`, className]
160
+ return (_jsx("div", { className: frosted ? 'dialog-backdrop frosted' : 'dialog-backdrop', onMouseDown: onOutsidePress, children: _jsxs("div", { "aria-describedby": describedBy, "aria-labelledby": labelId, "aria-modal": "true", className: [
161
+ 'dialog',
162
+ 'listing-root',
163
+ size === undefined ? null : `dialog-size-${size}`,
164
+ className
165
+ ]
160
166
  .filter(Boolean)
161
167
  .join(' '), "data-pinned": pinned !== null || undefined, "data-tone": tone, onKeyDown: (event) => {
162
168
  // React bubbles events through portals, so a dialog portalled from
@@ -197,5 +203,5 @@ function DialogFrame({ title, labelId, describedBy, className, size, icon: Icon,
197
203
  }
198
204
  }
199
205
  containFocus(event);
200
- }, onMouseDown: (event) => event.stopPropagation(), ref: dialogRef, role: "dialog", style: pinned === null ? undefined : { ['--dialog-top']: `${pinned}px` }, tabIndex: -1, children: [_jsxs("div", { className: "dialog-heading", children: [Icon && _jsx(Icon, { "aria-hidden": true, className: "dialog-icon" }), _jsx("h2", { id: labelId, ...(typeof title === 'string' ? cutTooltip(title) : {}), children: title })] }), _jsx(NestedFocusContext, { value: claimNestedFocus, children: children }), legend && _jsx(DialogLegend, { legend: legend, onLeave: onCancel })] }) }));
206
+ }, onMouseDown: (event) => event.stopPropagation(), ref: dialogRef, role: "dialog", style: pinned === null ? undefined : { ['--dialog-top']: `${pinned}px` }, tabIndex: -1, children: [_jsxs("div", { className: "dialog-heading", children: [Icon && _jsx(Icon, { "aria-hidden": true, className: "dialog-icon" }), _jsx("h2", { id: labelId, ...(typeof title === 'string' ? cutTooltip(title) : {}), children: title })] }), _jsx(NestedFocusContext, { value: claimNestedFocus, children: _jsx(ListingScopeContext, { value: true, children: children }) }), legend && _jsx(DialogLegend, { legend: legend, onLeave: onCancel })] }) }));
201
207
  }
@@ -1,4 +1,4 @@
1
- import type { LucideIcon } from 'lucide-react';
1
+ import { type LucideIcon } from 'lucide-react';
2
2
  import { type KeyboardEvent, type ReactElement, type ReactNode, type Ref } from 'react';
3
3
  import type { RegionHandlers } from '../pane/Pane.js';
4
4
  /** Props for {@link TreePane}. */
@@ -73,6 +73,12 @@ export interface TreeRowProps {
73
73
  readonly onOpen?: () => void;
74
74
  /** The row itself takes the focus: in the Tab order while it is the cursor row. */
75
75
  readonly focusable?: boolean;
76
+ /**
77
+ * The row adds one under its parent ("Add runtime…"): an accent plus in
78
+ * the glyph's slot unless `glyph` gives another, and dim words that turn
79
+ * full under the pointer and on the cursor row, as a listing's add row.
80
+ */
81
+ readonly add?: boolean;
76
82
  }
77
83
  /**
78
84
  * One row of a sidebar's tree: the chevron's slot, the glyph, the name (cut
@@ -83,7 +89,7 @@ export interface TreeRowProps {
83
89
  * the cursor there. Its controls leave the Tab order, since the tree's keys
84
90
  * run them. The expansion and its keys stay the host's.
85
91
  */
86
- export declare function TreeRow({ rowKey, level, kind, toggle, glyph, name, detail, trailing, tool, marked, onOpen, focusable }: TreeRowProps): ReactElement;
92
+ export declare function TreeRow({ rowKey, level, kind, toggle, glyph, name, detail, trailing, tool, marked, onOpen, focusable, add }: TreeRowProps): ReactElement;
87
93
  /**
88
94
  * What a tree's tool row is: a plain tool (a filter field, a pager, an Add
89
95
  * action), a note under a node (past the chevron's slot), a heading over a
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Plus } from 'lucide-react';
2
3
  import { createContext, useCallback, useContext, useId, useLayoutEffect, useMemo, useRef, useSyncExternalStore } from 'react';
3
4
  import { ICON_MD } from '../icon/sizes.js';
4
5
  import { RowCursorContext } from '../listing/Listing.js';
@@ -87,7 +88,7 @@ export function TreeList({ label, ref, children, ...handlers }) {
87
88
  * the cursor there. Its controls leave the Tab order, since the tree's keys
88
89
  * run them. The expansion and its keys stay the host's.
89
90
  */
90
- export function TreeRow({ rowKey, level = 0, kind = 'node', toggle, glyph, name, detail, trailing, tool, marked = false, onOpen, focusable = false }) {
91
+ export function TreeRow({ rowKey, level = 0, kind = 'node', toggle, glyph, name, detail, trailing, tool, marked = false, onOpen, focusable = false, add = false }) {
91
92
  const cursor = useContext(RowCursorContext);
92
93
  const tree = useContext(TreeIdContext);
93
94
  const current = useSyncExternalStore(cursor.subscribe, () => cursor.current() === rowKey);
@@ -104,14 +105,15 @@ export function TreeRow({ rowKey, level = 0, kind = 'node', toggle, glyph, name,
104
105
  kind === 'band' ? 'tree-band' : '',
105
106
  kind === 'group' ? 'tree-group' : '',
106
107
  current ? 'cursor' : '',
107
- marked ? 'marked' : ''
108
+ marked ? 'marked' : '',
109
+ add ? 'pane-add' : ''
108
110
  ]
109
111
  .filter(Boolean)
110
112
  .join(' ');
111
113
  return (_jsx(InListingRowContext.Provider, { value: true, children: _jsx(InRowContext.Provider, { value: true, children: _jsxs("div", { "aria-current": current ? 'true' : undefined, "aria-expanded": toggle === undefined ? undefined : toggle.open, "aria-level": level + 1, "aria-selected": marked, className: classes, "data-row-key": rowKey, id: tree === null ? undefined : rowId(tree.id, rowKey), onClick: onOpen, onFocus: () => cursor.point(rowKey), onPointerMove: () => {
112
114
  if (!current)
113
115
  cursor.point(rowKey);
114
- }, role: "treeitem", style: levelStyle(level), tabIndex: focusable ? (current ? 0 : -1) : undefined, children: [toggle === undefined ? (_jsx("span", { "aria-hidden": true, className: "row-icon" })) : (_jsx(TreeToggle, { label: toggle.label, onToggle: toggle.onToggle, open: toggle.open })), _jsx("span", { "aria-hidden": true, className: "tree-glyph", children: glyph }), _jsxs("span", { className: "row-name tree-name", ...(typeof name === 'string' && detail === undefined ? cutTooltip(name) : {}), children: [name, detail === undefined ? null : (_jsxs(_Fragment, { children: [' ', _jsx("span", { className: "tree-detail", children: detail })] }))] }), _jsxs("span", { className: "row-meta align-right", children: [trailing, tool === undefined ? null : _jsx("span", { className: "tree-row-tool", children: tool })] })] }) }) }));
116
+ }, role: "treeitem", style: levelStyle(level), tabIndex: focusable ? (current ? 0 : -1) : undefined, children: [toggle === undefined ? (_jsx("span", { "aria-hidden": true, className: "row-icon" })) : (_jsx(TreeToggle, { label: toggle.label, onToggle: toggle.onToggle, open: toggle.open })), _jsx("span", { "aria-hidden": true, className: "tree-glyph", children: glyph === undefined && add ? _jsx(Plus, { size: ICON_MD }) : glyph }), _jsxs("span", { className: "row-name tree-name", ...(typeof name === 'string' && detail === undefined ? cutTooltip(name) : {}), children: [name, detail === undefined ? null : (_jsxs(_Fragment, { children: [' ', _jsx("span", { className: "tree-detail", children: detail })] }))] }), _jsxs("span", { className: "row-meta align-right", children: [trailing, tool === undefined ? null : _jsx("span", { className: "tree-row-tool", children: tool })] })] }) }) }));
115
117
  }
116
118
  /**
117
119
  * A row of a tree that is not a node, at its level's indent in the small
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ListingScopeContext } from '../listing/ListingScope.js';
2
3
  /** Whether a slot was given something to draw: idiomatic `cond && <Part />` passes false for none. */
3
4
  export const drawn = (node) => node !== null && node !== undefined && node !== false && node !== '';
4
5
  /**
@@ -15,5 +16,5 @@ export const drawn = (node) => node !== null && node !== undefined && node !== f
15
16
  export function WindowFrame({ brand, sidebar = null, resizer = null, sidebarWidth, main, tray = null, dock = null, legend = null, trailing = null, group }) {
16
17
  const shown = drawn(sidebar);
17
18
  const parts = (_jsxs(_Fragment, { children: [shown ? _jsx("div", { className: "window-frame-slot window-frame-sidebar", children: sidebar }) : null, shown ? resizer : null, _jsx("div", { className: "window-frame-slot window-frame-main", children: main }), drawn(tray) ? _jsx("div", { className: "window-frame-slot window-frame-tray", children: tray }) : null, drawn(dock) ? _jsx("div", { className: "window-frame-slot window-frame-dock", children: dock }) : null] }));
18
- return (_jsxs("div", { className: "window-frame space-root listing-root", "data-sidebar": shown ? 'shown' : 'hidden', style: { '--window-band-width': `${sidebarWidth}px` }, children: [_jsxs("div", { className: "window-frame-band", children: [_jsx("div", { className: "window-frame-band-lead", children: brand }), _jsx("span", { "aria-hidden": true, className: "window-frame-band-rest" }), drawn(trailing) ? _jsx("div", { className: "shell-trailing", children: trailing }) : null] }), group === undefined ? (parts) : (_jsx("div", { className: "window-frame-group", ...group, children: parts })), drawn(legend) ? _jsx("div", { className: "window-frame-legend", children: legend }) : null] }));
19
+ return (_jsx(ListingScopeContext, { value: true, children: _jsxs("div", { className: "window-frame space-root listing-root", "data-sidebar": shown ? 'shown' : 'hidden', style: { '--window-band-width': `${sidebarWidth}px` }, children: [_jsxs("div", { className: "window-frame-band", children: [_jsx("div", { className: "window-frame-band-lead", children: brand }), _jsx("span", { "aria-hidden": true, className: "window-frame-band-rest" }), drawn(trailing) ? _jsx("div", { className: "shell-trailing", children: trailing }) : null] }), group === undefined ? (parts) : (_jsx("div", { className: "window-frame-group", ...group, children: parts })), drawn(legend) ? _jsx("div", { className: "window-frame-legend", children: legend }) : null] }) }));
19
20
  }
@@ -341,7 +341,9 @@
341
341
  --row-fill: var(--strip);
342
342
  }
343
343
 
344
- /* The disclosure chevron in a row's first column (`TreeToggle`). */
344
+ /* The disclosure chevron in a row's first column (`TreeToggle`), in the
345
+ rows' dim icon tone (a row's words may be darker). One class, so the
346
+ cursor, mark, selection, and hover tones over a row's icon still win. */
345
347
  .tree-chev {
346
348
  display: inline-flex;
347
349
  align-items: center;
@@ -350,7 +352,7 @@
350
352
  border: 0;
351
353
  border-radius: var(--radius-xs);
352
354
  background: none;
353
- color: inherit;
355
+ color: var(--text-dim);
354
356
  }
355
357
 
356
358
  .tree-chev:hover {
@@ -385,8 +387,10 @@
385
387
  color: var(--row-meta-text);
386
388
  }
387
389
 
388
- /* On a cursor or marked row the quiet words take the surface's text. */
389
- .row:is(.cursor, .marked):where(:not(.selected)) :is(.tree-detail, .tree-glyph),
390
+ /* On a cursor or marked row the quiet words take the surface's text, and
391
+ the glyph too but on an add row, which keeps its accent plus. */
392
+ .row:is(.cursor, .marked):where(:not(.selected)) .tree-detail,
393
+ .row:is(.cursor, .marked):where(:not(.selected, .pane-add)) .tree-glyph,
390
394
  .tree-tool.cursor,
391
395
  .tree-tool.cursor .tree-note-glyph {
392
396
  color: var(--text-on-surface);
@@ -462,6 +466,14 @@
462
466
  );
463
467
  }
464
468
 
469
+ /* A tree note that is also a listing's empty line (`.pane-message.empty`,
470
+ "No tables") keeps the tree's size and padding, which that two-class
471
+ rule would otherwise replace with the rows' size and no padding. */
472
+ .tree-tool.pane-message.empty {
473
+ padding-block: var(--space-1);
474
+ font-size: var(--font-size-small);
475
+ }
476
+
465
477
  /* A heading over a group of rows further down the tree. */
466
478
  .tree-tool.tree-heading {
467
479
  margin-top: var(--space-3);
@@ -505,6 +517,16 @@
505
517
  text-overflow: ellipsis;
506
518
  }
507
519
 
520
+ /* Its row's underline shows the focus, so no field ring: two classes'
521
+ weight, past the base stylesheet's ring, which comes later. Forced
522
+ colours draw no shadow, so there the underline is gone and the ring
523
+ stays. */
524
+ @media (forced-colors: none) {
525
+ .tree-filter-input:focus-visible {
526
+ outline: 0;
527
+ }
528
+ }
529
+
508
530
  /* ---- A pane's quick row ---- */
509
531
 
510
532
  /* A row of quiet buttons under a pane's path bar (FilterChips: the tree's
@@ -0,0 +1,57 @@
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { ReactElement } from 'react';
3
+ /**
4
+ * A product's brand mark as data: what the app knows about a product (a
5
+ * language, a database, a tool) and hands the library to draw. The library
6
+ * ships no marks and no brand colours of its own.
7
+ */
8
+ export interface ProductMarkShape {
9
+ /** The product's name: the mark's tooltip, and its accessible name where it stands alone. */
10
+ readonly title: string;
11
+ /** The mark's path data, on a 24-unit square (`viewBox` changes the part shown). */
12
+ readonly path: string;
13
+ /**
14
+ * The brand's colour as a CSS colour (`#777bb4`), or `currentColor` for a
15
+ * mark published in plain black, which then follows the quiet icon tone.
16
+ * The theme decides how much of it shows (`--product-mark-mix`).
17
+ */
18
+ readonly colour: string;
19
+ /**
20
+ * The part of the artwork to show, when a published mark pairs a symbol
21
+ * with a wordmark that would not read at glyph size; `0 0 24 24` when
22
+ * absent.
23
+ */
24
+ readonly viewBox?: string;
25
+ /**
26
+ * An outline drawn round the shape in its own colour, in viewBox units,
27
+ * for a mark published in lines too fine to read at row size.
28
+ */
29
+ readonly stroke?: number;
30
+ }
31
+ /** Props for {@link ProductMark}. */
32
+ export interface ProductMarkProps {
33
+ /** The product's mark; null or absent draws `fallback` instead. */
34
+ readonly mark?: ProductMarkShape | null;
35
+ /**
36
+ * The glyph drawn when there is no mark (a database's, a terminal's), in
37
+ * the quiet icon tone at the icon size.
38
+ */
39
+ readonly fallback?: LucideIcon;
40
+ /**
41
+ * The mark's name for assistive technology, for a mark that stands alone;
42
+ * absent, the mark is decorative, since the name beside it says it.
43
+ */
44
+ readonly label?: string;
45
+ }
46
+ /**
47
+ * A product's mark beside its name (a row's icon, a crumb, a palette's
48
+ * option): the brand's path in the brand's colour, mixed toward the text
49
+ * tone as far as the theme asks (`--product-mark-mix`: none in a light
50
+ * theme, some in a dark one, where a dark brand colour would sink), at the
51
+ * icon size (`--icon-md`), with the product's name as its tooltip. With
52
+ * no mark it draws `fallback`, a lucide glyph in the quiet icon tone, or
53
+ * nothing. The app owns the marks and their colours and passes one in, so
54
+ * the library stays free of any product list. Draws `.product-mark`
55
+ * (`.glyph` for a fallback), with `--product-mark-colour`.
56
+ */
57
+ export declare function ProductMark({ mark, fallback: Fallback, label }: ProductMarkProps): ReactElement;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { tooltip } from '../tooltip/Tooltip.logic.js';
3
+ import { ICON_MD } from './sizes.js';
4
+ /**
5
+ * A product's mark beside its name (a row's icon, a crumb, a palette's
6
+ * option): the brand's path in the brand's colour, mixed toward the text
7
+ * tone as far as the theme asks (`--product-mark-mix`: none in a light
8
+ * theme, some in a dark one, where a dark brand colour would sink), at the
9
+ * icon size (`--icon-md`), with the product's name as its tooltip. With
10
+ * no mark it draws `fallback`, a lucide glyph in the quiet icon tone, or
11
+ * nothing. The app owns the marks and their colours and passes one in, so
12
+ * the library stays free of any product list. Draws `.product-mark`
13
+ * (`.glyph` for a fallback), with `--product-mark-colour`.
14
+ */
15
+ export function ProductMark({ mark = null, fallback: Fallback, label }) {
16
+ const naming = label === undefined
17
+ ? { 'aria-hidden': true }
18
+ : { 'aria-label': label, role: 'img' };
19
+ if (mark === null) {
20
+ return (_jsx("span", { className: "product-mark glyph", ...naming, ...(label === undefined ? {} : tooltip(label)), children: Fallback === undefined ? null : _jsx(Fallback, { "aria-hidden": true, size: ICON_MD }) }));
21
+ }
22
+ return (_jsx("span", { className: "product-mark", style: {
23
+ '--product-mark-colour': mark.colour,
24
+ ...(mark.stroke === undefined ? {} : { '--product-mark-stroke': mark.stroke })
25
+ }, ...naming, ...tooltip(label ?? mark.title), children: _jsx("svg", { "aria-hidden": true, viewBox: mark.viewBox ?? '0 0 24 24', children: _jsx("path", { className: mark.stroke === undefined ? undefined : 'product-mark-outline', d: mark.path }) }) }));
26
+ }
@@ -0,0 +1,53 @@
1
+ /* ---- Product marks (ProductMark) ----
2
+
3
+ A product's brand mark at the icon size, beside its name in a row, a
4
+ crumb, or a palette's option. The brand colour is the app's data
5
+ (--product-mark-colour, set on the mark); how much of it shows is the
6
+ theme's (--product-mark-mix), the rest the text tone, so a dark brand
7
+ colour still reads on a dark ground. A mark with no colour of its own
8
+ (currentColor) and a fallback glyph take the quiet icon tone, at zero
9
+ weight; in a row's icon column they take that column's tone instead,
10
+ so they rise with it on the cursor and turn with it on a selection. */
11
+ .product-mark {
12
+ display: inline-flex;
13
+ flex: none;
14
+ align-items: center;
15
+ justify-content: center;
16
+ width: var(--icon-md);
17
+ height: var(--icon-md);
18
+ }
19
+
20
+ :where(.product-mark) {
21
+ color: var(--text-dim);
22
+ }
23
+
24
+ :where(.row-icon, .tree-glyph) > .product-mark {
25
+ color: inherit;
26
+ }
27
+
28
+ .product-mark > svg {
29
+ --product-mark-fill: color-mix(
30
+ in srgb,
31
+ var(--product-mark-colour, currentColor) var(--product-mark-mix),
32
+ var(--text)
33
+ );
34
+
35
+ width: var(--icon-md);
36
+ height: var(--icon-md);
37
+ fill: var(--product-mark-fill);
38
+ }
39
+
40
+ /* A mark published in hairlines gains an outline of its own colour,
41
+ rounded so its joins stay smooth; its width is in viewBox units, which
42
+ CSS pixels are inside an svg. */
43
+ .product-mark .product-mark-outline {
44
+ stroke: var(--product-mark-fill);
45
+ stroke-width: calc(var(--product-mark-stroke) * 1px);
46
+ stroke-linejoin: round;
47
+ stroke-linecap: round;
48
+ }
49
+
50
+ /* A fallback glyph is an icon: its strokes are lucide's, unfilled. */
51
+ .product-mark.glyph > svg {
52
+ fill: none;
53
+ }
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Icons: the four sizes for lucide's `size` prop, and the one spinner.
2
+ * Icons: the four sizes for lucide's `size` prop, the one spinner, and
3
+ * `ProductMark`, a product's brand mark drawn from the app's data.
3
4
  */
4
5
  export * from './sizes.js';
5
6
  export * from './Spinner.js';
7
+ export * from './ProductMark.js';
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Icons: the four sizes for lucide's `size` prop, and the one spinner.
2
+ * Icons: the four sizes for lucide's `size` prop, the one spinner, and
3
+ * `ProductMark`, a product's brand mark drawn from the app's data.
3
4
  */
4
5
  export * from './sizes.js';
5
6
  export * from './Spinner.js';
7
+ export * from './ProductMark.js';
@@ -39,6 +39,12 @@ export interface SettingsLabels {
39
39
  readonly sidebar: string;
40
40
  /** The dialog's one verb, on Return and Escape: "Done". */
41
41
  readonly done: string;
42
+ /**
43
+ * A sidebar row's accessible name while it carries a chip: its page and
44
+ * the chip's words, apart, so they are not read as one word ("Updates,
45
+ * Update to 1.4.4").
46
+ */
47
+ readonly pageWithChip: (page: string, chip: string) => string;
42
48
  /** The Appearance page's words. */
43
49
  readonly appearance: AppearanceLabels;
44
50
  }
@@ -9,6 +9,7 @@ export const DEFAULT_SETTINGS_LABELS = {
9
9
  title: 'Settings',
10
10
  sidebar: 'Settings pages',
11
11
  done: 'Done',
12
+ pageWithChip: (page, chip) => `${page}, ${chip}`,
12
13
  appearance: {
13
14
  title: 'Theme',
14
15
  mode: 'Appearance',
@@ -111,7 +111,9 @@ export interface ListingProps {
111
111
  * inside its pane. A listing with no rows says so in `empty`: a quiet row
112
112
  * under the strip instead of a table (`.pane-message.empty`, starting where
113
113
  * a row's icon starts, in the rows' type, dim), its column labels left out, so no
114
- * header stands over a row that is not one.
114
+ * header stands over a row that is not one. Drawn outside the listing
115
+ * scope (the frame, a dialog, and a palette carry it), it carries
116
+ * `.listing-root` itself, so a listing looks the same anywhere.
115
117
  */
116
118
  export declare function Listing({ title, label, grid, columns, className, empty, titleSort, titleLabel, children }: ListingProps): ReactElement;
117
119
  /**
@@ -147,6 +149,36 @@ export interface RowProps {
147
149
  /** The name cell's own class, beside `row-name`. */
148
150
  readonly nameClass?: string;
149
151
  readonly className?: string;
152
+ /**
153
+ * The row's item is not there yet (a version not installed, a product
154
+ * not added): its name in the quieter row-meta tone (`.row-dim`).
155
+ */
156
+ readonly dim?: boolean;
157
+ /**
158
+ * The row adds one to its listing ("Add service…"), at the listing's
159
+ * foot: an accent plus in the mark's slot unless `mark` gives another
160
+ * glyph, and dim words that turn full under the pointer, the focus, and
161
+ * on the cursor row (`.pane-add`).
162
+ */
163
+ readonly add?: boolean;
164
+ /**
165
+ * Picked in a selection (`.selected`, `aria-selected`): the solid accent
166
+ * fill while its pane holds the keys, the neutral fill otherwise.
167
+ */
168
+ readonly selected?: boolean;
169
+ /** Ticked in a checkbox column (`.marked`): the marked tint and its leading bar. */
170
+ readonly marked?: boolean;
171
+ /**
172
+ * A change waiting to be applied: `changed` washes the row in the
173
+ * warning tone with its leading bar, `removed` strikes its name and
174
+ * cells out on the danger wash (`.row-changed`, `.row-removed`).
175
+ */
176
+ readonly change?: 'changed' | 'removed' | null;
177
+ /**
178
+ * The row stands out from its peers (the slowest path of a plan, the
179
+ * busiest item): its name in the strong weight (`.row-emphasis`).
180
+ */
181
+ readonly emphasis?: boolean;
150
182
  /** Opens the row's item on a click anywhere but its controls. */
151
183
  readonly onOpen?: () => void;
152
184
  /**
@@ -177,18 +209,42 @@ export interface RowProps {
177
209
  * is a stop of its own: the cursor row in the Tab order (or, while no row
178
210
  * is, the one marked `entry`), the others reached by the keys that move it.
179
211
  */
180
- export declare function Row({ rowKey, mark, name, nameClass, className, onOpen, level, tabbable, focusable, entry, children }: RowProps): ReactElement;
212
+ export declare function Row({ rowKey, mark, name, nameClass, className, dim, add, selected, marked, change, emphasis, onOpen, level, tabbable, focusable, entry, children }: RowProps): ReactElement;
213
+ /**
214
+ * A cell's tone: `warning` a value with something waiting on it (an
215
+ * update), `accent` a value offered (the version an update brings),
216
+ * `danger` a value that failed.
217
+ */
218
+ export type CellTone = 'warning' | 'accent' | 'danger';
181
219
  /** Props for {@link Cell}. */
182
220
  export interface CellProps {
183
221
  /** Right-aligned, for numbers. */
184
222
  readonly align?: 'right';
223
+ /**
224
+ * Its words in a tone, which holds on the cursor row and under the
225
+ * pointer; the row-meta tone when absent. A selection paints it in its
226
+ * own words, as every cell.
227
+ */
228
+ readonly tone?: CellTone;
229
+ /**
230
+ * What the cell holds when it is not a value: `action`, the row's verbs
231
+ * at its end (`QuietAction`, `RowIconAction`; `.pane-action-cell`), or
232
+ * `hover`, secondary icon controls in view on every row in their quiet
233
+ * tone (`.pane-hover-cell`).
234
+ */
235
+ readonly kind?: 'action' | 'hover';
236
+ /** The value is missing (SQL NULL): its words in the row-meta tone's italic (`.value-null`). */
237
+ readonly missing?: boolean;
185
238
  readonly className?: string;
186
239
  /** The cell's whole text, for one cut short, as its tooltip and description; none when null. */
187
240
  readonly tip?: string | null;
188
241
  readonly children?: ReactNode;
189
242
  }
190
- /** A cell of a row after its name, in the listing's metadata look (`.row-meta`). */
191
- export declare function Cell({ align, className, tip, children }: CellProps): ReactElement;
243
+ /**
244
+ * A cell of a row after its name, in the listing's metadata look
245
+ * (`.row-meta`), in the row-meta tone or the `tone` given.
246
+ */
247
+ export declare function Cell({ align, tone, kind, missing, className, tip, children }: CellProps): ReactElement;
192
248
  /**
193
249
  * The tone of a state: ready, a warning, a failure, a transition under way,
194
250
  * quiet, or a note (`info`: an Info or Note line, in the accent).