@bigpixelrocket/uiok 0.4.0 → 0.6.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.
- package/CHANGELOG.md +63 -1
- package/dist/button/TextLink.d.ts +26 -3
- package/dist/button/TextLink.js +5 -3
- package/dist/button/button.css +7 -0
- package/dist/dialog/ModalDialog.js +8 -2
- package/dist/dialog/SectionedDialog.d.ts +37 -0
- package/dist/dialog/SectionedDialog.js +157 -0
- package/dist/dialog/dialog.css +102 -0
- package/dist/dialog/index.d.ts +4 -2
- package/dist/dialog/index.js +4 -2
- package/dist/frame/AppRoot.d.ts +1 -1
- package/dist/frame/AppRoot.js +2 -1
- package/dist/frame/Dock.d.ts +1 -1
- package/dist/frame/Dock.js +2 -1
- package/dist/frame/FilterChips.d.ts +5 -2
- package/dist/frame/FilterChips.js +35 -2
- package/dist/frame/FilterChips.logic.d.ts +24 -0
- package/dist/frame/FilterChips.logic.js +34 -0
- package/dist/frame/PageParts.d.ts +4 -3
- package/dist/frame/PageParts.js +10 -3
- package/dist/frame/SideBySide.d.ts +32 -0
- package/dist/frame/SideBySide.js +50 -0
- package/dist/frame/Tree.d.ts +9 -3
- package/dist/frame/Tree.js +8 -5
- package/dist/frame/WindowFrame.d.ts +1 -1
- package/dist/frame/WindowFrame.js +3 -1
- package/dist/frame/frame.css +74 -5
- package/dist/frame/index.d.ts +4 -2
- package/dist/frame/index.js +4 -2
- package/dist/grid/grid.css +1 -0
- package/dist/icon/ProductMark.d.ts +57 -0
- package/dist/icon/ProductMark.js +26 -0
- package/dist/icon/icon.css +53 -0
- package/dist/icon/index.d.ts +3 -1
- package/dist/icon/index.js +3 -1
- package/dist/keyboard/Keyboard.logic.js +20 -3
- package/dist/keychord/KeyChord.d.ts +17 -1
- package/dist/keychord/KeyChord.js +16 -1
- package/dist/keychord/ShortcutIndex.d.ts +49 -0
- package/dist/keychord/ShortcutIndex.js +28 -0
- package/dist/keychord/index.d.ts +8 -2
- package/dist/keychord/index.js +8 -2
- package/dist/keychord/keychord.css +101 -0
- package/dist/labels/dialog.d.ts +2 -0
- package/dist/labels/dialog.js +2 -1
- package/dist/labels/keys.d.ts +5 -0
- package/dist/labels/keys.js +2 -1
- package/dist/labels/settings.d.ts +6 -0
- package/dist/labels/settings.js +1 -0
- package/dist/listing/Listing.d.ts +95 -7
- package/dist/listing/Listing.js +57 -13
- package/dist/listing/ListingScope.d.ts +7 -0
- package/dist/listing/ListingScope.js +8 -0
- package/dist/listing/PaneMessage.d.ts +7 -4
- package/dist/listing/PaneMessage.js +11 -4
- package/dist/listing/Timeline.d.ts +51 -0
- package/dist/listing/Timeline.js +28 -0
- package/dist/listing/index.d.ts +4 -2
- package/dist/listing/index.js +3 -1
- package/dist/listing/listing.css +268 -25
- package/dist/log/Ansi.logic.d.ts +27 -0
- package/dist/log/Ansi.logic.js +203 -0
- package/dist/log/LogWell.d.ts +11 -2
- package/dist/log/LogWell.js +15 -3
- package/dist/log/index.d.ts +1 -0
- package/dist/log/index.js +1 -0
- package/dist/log/log.css +80 -0
- package/dist/menu/Menu.d.ts +133 -0
- package/dist/menu/Menu.js +351 -0
- package/dist/menu/Menu.logic.d.ts +83 -0
- package/dist/menu/Menu.logic.js +92 -0
- package/dist/menu/index.d.ts +6 -1
- package/dist/menu/index.js +6 -1
- package/dist/menu/menu.css +57 -0
- package/dist/palette/Palette.d.ts +3 -2
- package/dist/palette/Palette.js +8 -4
- package/dist/palette/PaletteRows.d.ts +138 -0
- package/dist/palette/PaletteRows.js +76 -0
- package/dist/palette/index.d.ts +5 -2
- package/dist/palette/index.js +5 -2
- package/dist/pane/Pane.d.ts +42 -6
- package/dist/pane/Pane.js +92 -5
- package/dist/pane/PaneFrame.d.ts +22 -1
- package/dist/pane/PaneFrame.js +42 -5
- package/dist/pane/PaneKeys.d.ts +5 -1
- package/dist/pane/PaneKeys.js +28 -3
- package/dist/pane/PaneKeys.logic.d.ts +25 -0
- package/dist/pane/PaneKeys.logic.js +30 -0
- package/dist/pane/index.d.ts +2 -2
- package/dist/pane/index.js +1 -1
- package/dist/pane/usePaneKeys.d.ts +8 -1
- package/dist/pane/usePaneKeys.js +32 -12
- package/dist/shell/SettingsDialog.d.ts +20 -2
- package/dist/shell/SettingsDialog.js +13 -3
- package/dist/shell/index.d.ts +1 -1
- package/dist/styles.css +18 -3
- package/dist/surface/FactList.d.ts +54 -0
- package/dist/surface/FactList.js +33 -0
- package/dist/surface/FactTable.d.ts +44 -0
- package/dist/surface/FactTable.js +33 -0
- package/dist/surface/index.d.ts +7 -2
- package/dist/surface/index.js +7 -2
- package/dist/surface/surface.css +139 -2
- package/dist/tabs/PageTabs.d.ts +6 -0
- package/dist/tabs/PageTabs.js +1 -1
- package/dist/tabs/tabs.css +14 -0
- package/dist/terminal/TerminalBox.d.ts +30 -0
- package/dist/terminal/TerminalBox.js +17 -0
- package/dist/terminal/ghostty/core.d.ts +12 -4
- package/dist/terminal/ghostty/core.js +12 -4
- package/dist/terminal/index.d.ts +6 -2
- package/dist/terminal/index.js +6 -2
- package/dist/terminal/terminal.css +29 -0
- package/dist/text/Code.d.ts +15 -0
- package/dist/text/Code.js +12 -0
- package/dist/text/index.d.ts +6 -1
- package/dist/text/index.js +6 -1
- package/dist/text/text.css +21 -0
- package/dist/themes/themes.generated.css +20 -0
- package/dist/themes/tokens.d.ts +1 -0
- package/dist/themes/tokens.js +16 -2
- package/package.json +1 -1
|
@@ -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
|
+
}
|
package/dist/icon/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Icons: the four sizes for lucide's `size` prop,
|
|
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';
|
package/dist/icon/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Icons: the four sizes for lucide's `size` prop,
|
|
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';
|
|
@@ -53,9 +53,26 @@ export function isTextEditingTarget(target) {
|
|
|
53
53
|
if (target.closest('textarea') instanceof HTMLTextAreaElement) {
|
|
54
54
|
return true;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
return isEditableContent(target);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Whether an element's content is editable, as the browser resolves it
|
|
60
|
+
* (`isContentEditable`), or, where that is missing (jsdom), by walking up
|
|
61
|
+
* past `inherit` and absent or unknown values to the nearest `true`, `''`,
|
|
62
|
+
* `plaintext-only`, or `false`.
|
|
63
|
+
*/
|
|
64
|
+
function isEditableContent(element) {
|
|
65
|
+
if (element instanceof HTMLElement && typeof element.isContentEditable === 'boolean') {
|
|
66
|
+
return element.isContentEditable;
|
|
67
|
+
}
|
|
68
|
+
for (let node = element; node !== null; node = node.parentElement) {
|
|
69
|
+
const setting = node.getAttribute('contenteditable')?.toLowerCase();
|
|
70
|
+
if (setting === '' || setting === 'true' || setting === 'plaintext-only')
|
|
71
|
+
return true;
|
|
72
|
+
if (setting === 'false')
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
return false;
|
|
59
76
|
}
|
|
60
77
|
/**
|
|
61
78
|
* Controls and explicitly focusable surfaces whose native key behavior must
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
2
|
import type { Chord } from '../keyboard/Keyboard.logic.js';
|
|
3
3
|
import { type LayerModifier } from '../keyboard/KeyChord.logic.js';
|
|
4
4
|
/**
|
|
@@ -25,3 +25,19 @@ export interface KeyChordProps {
|
|
|
25
25
|
* empty key draws its modifiers alone.
|
|
26
26
|
*/
|
|
27
27
|
export declare function KeyChord({ chord, omit, tone, recording }: KeyChordProps): ReactElement;
|
|
28
|
+
/** Props for {@link KeyChords}. */
|
|
29
|
+
export interface KeyChordsProps {
|
|
30
|
+
/** The chords that run one verb, in the order to show them. */
|
|
31
|
+
readonly chords: readonly Chord[];
|
|
32
|
+
/** Every chord's look (`KeyChord`'s `tone`). */
|
|
33
|
+
readonly tone?: KeyChordTone;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Several chords that run one verb, each its own `KeyChord`, parted by the
|
|
37
|
+
* `keys.or` word ("⇧⌘N or ⌘N"), drawn quiet between them and read between
|
|
38
|
+
* their names ("Shift Command N or Command N"), so two chords never run
|
|
39
|
+
* together as one. One chord draws alone; none draws nothing. Put `keycap`
|
|
40
|
+
* on an element round it to draw each chord as a key cap. Draws
|
|
41
|
+
* `.keychords` with `.keychords-or` between the chords.
|
|
42
|
+
*/
|
|
43
|
+
export declare function KeyChords({ chords, tone }: KeyChordsProps): ReactElement | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowBigUp, ArrowDown, ArrowDownToLine, ArrowLeft, ArrowRight, ArrowRightToLine, ArrowUp, ArrowUpToLine, ChevronUp, ChevronsDown, ChevronsUp, Command, CornerDownLeft, Delete, Option, Slash } from 'lucide-react';
|
|
3
|
+
import { Fragment } from 'react';
|
|
3
4
|
import { chordParts, chordSpoken } from '../keyboard/KeyChord.logic.js';
|
|
4
5
|
import { useLabels } from '../labels/UiokProvider.js';
|
|
5
6
|
/**
|
|
@@ -53,3 +54,17 @@ export function KeyChord({ chord, omit = [], tone, recording = false }) {
|
|
|
53
54
|
const parts = chordParts(chord).filter((part) => typeof part === 'object' ? part.key !== '' : !omit.includes(part));
|
|
54
55
|
return (_jsx("kbd", { "aria-label": chordSpoken(chord, keys), className: "keychord", "data-state": recording ? 'recording' : undefined, "data-tone": tone, children: parts.map((part, index) => (_jsx(Key, { labels: keys, part: part }, index))) }));
|
|
55
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Several chords that run one verb, each its own `KeyChord`, parted by the
|
|
59
|
+
* `keys.or` word ("⇧⌘N or ⌘N"), drawn quiet between them and read between
|
|
60
|
+
* their names ("Shift Command N or Command N"), so two chords never run
|
|
61
|
+
* together as one. One chord draws alone; none draws nothing. Put `keycap`
|
|
62
|
+
* on an element round it to draw each chord as a key cap. Draws
|
|
63
|
+
* `.keychords` with `.keychords-or` between the chords.
|
|
64
|
+
*/
|
|
65
|
+
export function KeyChords({ chords, tone }) {
|
|
66
|
+
const { keys } = useLabels();
|
|
67
|
+
if (chords.length === 0)
|
|
68
|
+
return null;
|
|
69
|
+
return (_jsx("span", { className: "keychords", children: chords.map((chord, index) => (_jsxs(Fragment, { children: [index === 0 ? null : _jsx("span", { className: "keychords-or", children: keys.or }), _jsx(KeyChord, { chord: chord, tone: tone })] }, index))) }));
|
|
70
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import type { Chord } from '../keyboard/Keyboard.logic.js';
|
|
3
|
+
/** Props for {@link ShortcutIndex}. */
|
|
4
|
+
export interface ShortcutIndexProps {
|
|
5
|
+
/** The index's accessible name: "Keyboard shortcuts". */
|
|
6
|
+
readonly label: string;
|
|
7
|
+
/** Its groups (`ShortcutGroup`), in order. */
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Every key a window answers, in groups of verbs, each verb with the chords
|
|
12
|
+
* that run it: one grid for every group, so the chords stand in one column
|
|
13
|
+
* at the index's end from the first group to the last, whatever each group's
|
|
14
|
+
* longest verb. Put it in a dialog (a frosted `ModalDialog`) or a page; a
|
|
15
|
+
* find field above it is the host's. Draws `.shortcut-index`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ShortcutIndex({ label, children }: ShortcutIndexProps): ReactElement;
|
|
18
|
+
/** Props for {@link ShortcutGroup}. */
|
|
19
|
+
export interface ShortcutGroupProps {
|
|
20
|
+
/** The group's name, as an overline over its verbs: "Services". */
|
|
21
|
+
readonly title: string;
|
|
22
|
+
/** Its verbs (`ShortcutRow`). */
|
|
23
|
+
readonly children: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/** One group of a `ShortcutIndex`: its name over its verbs, a hairline above every group but the first. */
|
|
26
|
+
export declare function ShortcutGroup({ title, children }: ShortcutGroupProps): ReactElement;
|
|
27
|
+
/** Props for {@link ShortcutRow}. */
|
|
28
|
+
export interface ShortcutRowProps {
|
|
29
|
+
/** The verb, as menus name it: "Restart". */
|
|
30
|
+
readonly verb: string;
|
|
31
|
+
/** What it does, beyond its name, in a quieter line under it. */
|
|
32
|
+
readonly detail?: string;
|
|
33
|
+
/** The chords that run it now, each drawn as a key cap; none draws `none`. */
|
|
34
|
+
readonly chords: readonly Chord[];
|
|
35
|
+
/** The words in the chord column when it has no chord: "No shortcut". */
|
|
36
|
+
readonly none?: string;
|
|
37
|
+
/** Its chords were changed from the defaults: the caps wear the accent tone. */
|
|
38
|
+
readonly changed?: boolean;
|
|
39
|
+
/** Not available where the index was opened: the verb and its chords a tone down. */
|
|
40
|
+
readonly dim?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* One verb of a `ShortcutGroup`: its name (and a detail under it) at the
|
|
44
|
+
* start, its chords as key caps at the end, in the index's one chord
|
|
45
|
+
* column; several chords are parted by "or" (`KeyChords`) and wrap within
|
|
46
|
+
* the column, aligned to its end. Each chord is named in words for
|
|
47
|
+
* assistive technology (`KeyChord`).
|
|
48
|
+
*/
|
|
49
|
+
export declare function ShortcutRow({ verb, detail, chords, none, changed, dim }: ShortcutRowProps): ReactElement;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { KeyChords } from './KeyChord.js';
|
|
4
|
+
/**
|
|
5
|
+
* Every key a window answers, in groups of verbs, each verb with the chords
|
|
6
|
+
* that run it: one grid for every group, so the chords stand in one column
|
|
7
|
+
* at the index's end from the first group to the last, whatever each group's
|
|
8
|
+
* longest verb. Put it in a dialog (a frosted `ModalDialog`) or a page; a
|
|
9
|
+
* find field above it is the host's. Draws `.shortcut-index`.
|
|
10
|
+
*/
|
|
11
|
+
export function ShortcutIndex({ label, children }) {
|
|
12
|
+
return (_jsx("div", { "aria-label": label, className: "shortcut-index", role: "region", children: children }));
|
|
13
|
+
}
|
|
14
|
+
/** One group of a `ShortcutIndex`: its name over its verbs, a hairline above every group but the first. */
|
|
15
|
+
export function ShortcutGroup({ title, children }) {
|
|
16
|
+
const headingId = useId();
|
|
17
|
+
return (_jsxs("section", { "aria-labelledby": headingId, className: "shortcut-group", children: [_jsx("h3", { className: "shortcut-group-title overline", id: headingId, children: title }), _jsx("dl", { className: "shortcut-group-rows", children: children })] }));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* One verb of a `ShortcutGroup`: its name (and a detail under it) at the
|
|
21
|
+
* start, its chords as key caps at the end, in the index's one chord
|
|
22
|
+
* column; several chords are parted by "or" (`KeyChords`) and wrap within
|
|
23
|
+
* the column, aligned to its end. Each chord is named in words for
|
|
24
|
+
* assistive technology (`KeyChord`).
|
|
25
|
+
*/
|
|
26
|
+
export function ShortcutRow({ verb, detail, chords, none, changed = false, dim = false }) {
|
|
27
|
+
return (_jsxs("div", { className: dim ? 'shortcut-row dim' : 'shortcut-row', children: [_jsxs("dt", { className: "shortcut-verb", children: [verb, detail === undefined ? null : _jsx("span", { className: "shortcut-detail", children: detail })] }), _jsx("dd", { className: "shortcut-chords keycap", children: chords.length === 0 ? (_jsx("span", { className: "shortcut-none", children: none })) : (_jsx(KeyChords, { chords: chords, tone: changed ? 'accent' : undefined })) })] }));
|
|
28
|
+
}
|
package/dist/keychord/index.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `KeyChord`: a chord drawn as key caps, named in words for assistive
|
|
3
|
+
* technology; `KeyChords`, several chords for one verb parted by "or";
|
|
4
|
+
* `ShortcutIndex` with `ShortcutGroup` and `ShortcutRow`, every
|
|
5
|
+
* key a window answers in groups whose chords share one column.
|
|
6
|
+
*/
|
|
7
|
+
export { KeyChord, KeyChords, type KeyChordProps, type KeyChordsProps, type KeyChordTone } from './KeyChord.js';
|
|
8
|
+
export { ShortcutGroup, ShortcutIndex, ShortcutRow, type ShortcutGroupProps, type ShortcutIndexProps, type ShortcutRowProps } from './ShortcutIndex.js';
|
package/dist/keychord/index.js
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `KeyChord`: a chord drawn as key caps, named in words for assistive
|
|
3
|
+
* technology; `KeyChords`, several chords for one verb parted by "or";
|
|
4
|
+
* `ShortcutIndex` with `ShortcutGroup` and `ShortcutRow`, every
|
|
5
|
+
* key a window answers in groups whose chords share one column.
|
|
6
|
+
*/
|
|
7
|
+
export { KeyChord, KeyChords } from './KeyChord.js';
|
|
8
|
+
export { ShortcutGroup, ShortcutIndex, ShortcutRow } from './ShortcutIndex.js';
|
|
@@ -117,3 +117,104 @@
|
|
|
117
117
|
outline: var(--line) solid var(--accent);
|
|
118
118
|
outline-offset: var(--line);
|
|
119
119
|
}
|
|
120
|
+
|
|
121
|
+
/* ---- Several chords (KeyChords) ----
|
|
122
|
+
|
|
123
|
+
Chords that run one verb, parted by a quiet word ("or") so two never
|
|
124
|
+
read as one run of keys; they wrap whole, never inside a chord. */
|
|
125
|
+
.keychords {
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
flex-wrap: wrap;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: var(--space-2) var(--space-3);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.keychords-or {
|
|
133
|
+
color: var(--text-dim);
|
|
134
|
+
font-size: var(--font-size-caption);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ---- Shortcut index (ShortcutIndex, ShortcutGroup, ShortcutRow) ----
|
|
138
|
+
|
|
139
|
+
Every key a window answers, in groups: one grid down the whole index
|
|
140
|
+
(each group and each row a subgrid of it), so the chord column stands at
|
|
141
|
+
the index's end at one width from the first group to the last. A verb
|
|
142
|
+
takes the room left; its chords sit at the column's end, several
|
|
143
|
+
wrapping within it. The column is as wide as its longest chords but
|
|
144
|
+
never more than half the index, so a verb with many chords wraps them
|
|
145
|
+
instead of squeezing every verb to nothing. A hairline parts the
|
|
146
|
+
groups. */
|
|
147
|
+
.shortcut-index {
|
|
148
|
+
display: grid;
|
|
149
|
+
grid-template-columns: minmax(0, 1fr) fit-content(50%);
|
|
150
|
+
column-gap: var(--space-8);
|
|
151
|
+
font: var(--font-size-small) / var(--line-height-compact) var(--font-ui);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.shortcut-group,
|
|
155
|
+
.shortcut-group-rows,
|
|
156
|
+
.shortcut-row {
|
|
157
|
+
display: grid;
|
|
158
|
+
grid-column: 1 / -1;
|
|
159
|
+
grid-template-columns: subgrid;
|
|
160
|
+
margin: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.shortcut-group {
|
|
164
|
+
padding-block: var(--space-6);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.shortcut-group:first-child {
|
|
168
|
+
padding-block-start: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.shortcut-group + .shortcut-group {
|
|
172
|
+
border-top: var(--line) solid var(--border);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.shortcut-group-title {
|
|
176
|
+
grid-column: 1 / -1;
|
|
177
|
+
margin: 0 0 var(--space-3);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.shortcut-row {
|
|
181
|
+
align-items: center;
|
|
182
|
+
min-height: var(--row-height-dense);
|
|
183
|
+
padding-block: var(--space-1);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.shortcut-verb {
|
|
187
|
+
min-width: 0;
|
|
188
|
+
color: var(--text);
|
|
189
|
+
overflow-wrap: break-word;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.shortcut-detail {
|
|
193
|
+
display: block;
|
|
194
|
+
color: var(--text-dim);
|
|
195
|
+
font-size: var(--font-size-caption);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.shortcut-chords {
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: flex-end;
|
|
201
|
+
margin: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.shortcut-chords > .keychords {
|
|
205
|
+
justify-content: flex-end;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.shortcut-none {
|
|
209
|
+
color: var(--text-dim);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* A verb not available where the index was opened: a tone down, its caps
|
|
213
|
+
too. */
|
|
214
|
+
.shortcut-row.dim > .shortcut-verb {
|
|
215
|
+
color: var(--text-dim);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.shortcut-row.dim > .shortcut-chords {
|
|
219
|
+
opacity: var(--disabled-opacity);
|
|
220
|
+
}
|
package/dist/labels/dialog.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export interface DialogLabels {
|
|
|
36
36
|
readonly runInBackground: string;
|
|
37
37
|
/** The note under a typed-name confirmation's field (`TypedNameDialog`): "Type the name to confirm." */
|
|
38
38
|
readonly typeName: string;
|
|
39
|
+
/** The accessible name of a sectioned dialog's sidebar (`SectionedDialog`): "Sections". */
|
|
40
|
+
readonly sections: string;
|
|
39
41
|
}
|
|
40
42
|
/** English dialog words: the `dialog` group `UiokProvider` starts from. */
|
|
41
43
|
export declare const DEFAULT_DIALOG_LABELS: DialogLabels;
|
package/dist/labels/dialog.js
CHANGED
package/dist/labels/keys.d.ts
CHANGED
|
@@ -23,6 +23,11 @@ export interface KeyLabels {
|
|
|
23
23
|
readonly spaceCap: string;
|
|
24
24
|
/** What the Escape key cap says when a chord is drawn: "esc". */
|
|
25
25
|
readonly escapeCap: string;
|
|
26
|
+
/**
|
|
27
|
+
* The word between two chords that run the same verb (`KeyChords`), drawn
|
|
28
|
+
* and read between them: "or".
|
|
29
|
+
*/
|
|
30
|
+
readonly or: string;
|
|
26
31
|
}
|
|
27
32
|
/** English key names and macOS glyphs: the `keys` group `UiokProvider` starts from. */
|
|
28
33
|
export declare const DEFAULT_KEY_LABELS: KeyLabels;
|
package/dist/labels/keys.js
CHANGED
|
@@ -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
|
}
|
package/dist/labels/settings.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ReactElement, type ReactNode } from 'react';
|
|
1
|
+
import { type MouseEvent, type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
import type { SortDirection } from '../labels/listing.js';
|
|
3
|
-
import { type LinkLook } from '../pane/PaneActions.js';
|
|
3
|
+
import { type ControlVerb, type LinkLook } from '../pane/PaneActions.js';
|
|
4
4
|
/**
|
|
5
5
|
* A listing column as wide as `ch` characters and the gutter before it, for
|
|
6
6
|
* a listing's `grid`: `column(9)` is "calc(9ch + var(--pane-column-gap))".
|
|
@@ -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
|
/**
|
|
@@ -137,18 +139,78 @@ export interface RowCursor {
|
|
|
137
139
|
}
|
|
138
140
|
/** The cursor of the pane a row is in, which the app provides; without one no row is the cursor. */
|
|
139
141
|
export declare const RowCursorContext: import("react").Context<RowCursor>;
|
|
142
|
+
/**
|
|
143
|
+
* The radio a row leads with in place of its mark (`Row`'s `radio`): the
|
|
144
|
+
* row is one choice of several, the one picked checked.
|
|
145
|
+
*/
|
|
146
|
+
export interface RowRadio {
|
|
147
|
+
/** Whether this row is the one picked. */
|
|
148
|
+
readonly checked: boolean;
|
|
149
|
+
/** Picks this row; a press on the radio, or the key the app maps to its `verb`. */
|
|
150
|
+
readonly onPick: () => void;
|
|
151
|
+
/** The radio group's name, the same on every row of the choice and unique in the window. */
|
|
152
|
+
readonly group: string;
|
|
153
|
+
/** Holds the choice where it is (a change under way). */
|
|
154
|
+
readonly disabled?: boolean;
|
|
155
|
+
/** What the cursor row's keys run it for (`data-verb`), so a key the app maps picks the cursor row. */
|
|
156
|
+
readonly verb?: ControlVerb;
|
|
157
|
+
}
|
|
140
158
|
/** Props for {@link Row}. */
|
|
141
159
|
export interface RowProps {
|
|
142
160
|
/** Names the row to the cursor (`data-row-key`); unique in its pane. */
|
|
143
161
|
readonly rowKey: string;
|
|
144
162
|
/** The icon before the name, decorative. */
|
|
145
163
|
readonly mark?: ReactNode;
|
|
164
|
+
/**
|
|
165
|
+
* Leads the row with a radio in the mark's place: the row is one choice
|
|
166
|
+
* of several (the database a server uses), named by the row's name.
|
|
167
|
+
*/
|
|
168
|
+
readonly radio?: RowRadio;
|
|
146
169
|
readonly name: ReactNode;
|
|
147
170
|
/** The name cell's own class, beside `row-name`. */
|
|
148
171
|
readonly nameClass?: string;
|
|
149
172
|
readonly className?: string;
|
|
173
|
+
/**
|
|
174
|
+
* The row's item is not there yet (a version not installed, a product
|
|
175
|
+
* not added): its name in the quieter row-meta tone (`.row-dim`).
|
|
176
|
+
*/
|
|
177
|
+
readonly dim?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* The row adds one to its listing ("Add service…"), at the listing's
|
|
180
|
+
* foot: an accent plus in the mark's slot unless `mark` gives another
|
|
181
|
+
* glyph, and dim words that turn full under the pointer, the focus, and
|
|
182
|
+
* on the cursor row (`.pane-add`).
|
|
183
|
+
*/
|
|
184
|
+
readonly add?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Picked in a selection (`.selected`, `aria-selected`): the solid accent
|
|
187
|
+
* fill while its pane holds the keys, the neutral fill otherwise.
|
|
188
|
+
*/
|
|
189
|
+
readonly selected?: boolean;
|
|
190
|
+
/** Ticked in a checkbox column (`.marked`): the marked tint and its leading bar. */
|
|
191
|
+
readonly marked?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* A change waiting to be applied: `changed` washes the row in the
|
|
194
|
+
* warning tone with its leading bar, `removed` strikes its name and
|
|
195
|
+
* cells out on the danger wash (`.row-changed`, `.row-removed`).
|
|
196
|
+
*/
|
|
197
|
+
readonly change?: 'changed' | 'removed' | null;
|
|
198
|
+
/**
|
|
199
|
+
* The row stands out from its peers (the slowest path of a plan, the
|
|
200
|
+
* busiest item): its name in the strong weight (`.row-emphasis`).
|
|
201
|
+
*/
|
|
202
|
+
readonly emphasis?: boolean;
|
|
150
203
|
/** Opens the row's item on a click anywhere but its controls. */
|
|
151
204
|
readonly onOpen?: () => void;
|
|
205
|
+
/**
|
|
206
|
+
* A secondary click (the right button, a Control-click, the menu key) on
|
|
207
|
+
* the row, with the row's key, for the row's menu: open it at
|
|
208
|
+
* `event.clientX` and `event.clientY`. The row moves the pane's cursor to
|
|
209
|
+
* itself first, as a file manager does, so the menu acts on the cursor row,
|
|
210
|
+
* and cancels the browser's own menu; a cancelled event is one the
|
|
211
|
+
* `PaneBox` around it leaves alone, so one click never opens both menus.
|
|
212
|
+
*/
|
|
213
|
+
readonly onContextMenu?: (event: MouseEvent<HTMLElement>, rowKey: string) => void;
|
|
152
214
|
/**
|
|
153
215
|
* How deep the row stands in a tree or a plan: its name is indented by one
|
|
154
216
|
* icon column a level (`--row-level`); 0, or none, is no indent. The
|
|
@@ -169,7 +231,9 @@ export interface RowProps {
|
|
|
169
231
|
* it to the pane's cursor (`RowCursorContext`), which it wears as the
|
|
170
232
|
* listing's cursor row (`.cursor`, `aria-current`); the pointer moving over
|
|
171
233
|
* it or the focus entering it moves the cursor there. A row with `onOpen`
|
|
172
|
-
* opens its item on a click anywhere but its controls
|
|
234
|
+
* opens its item on a click anywhere but its controls; one with
|
|
235
|
+
* `onContextMenu` takes the cursor on a secondary click, then hands the
|
|
236
|
+
* click and its key to the app for the row's menu. Controls that say
|
|
173
237
|
* what the keys run mark it with `data-verb` (`QuietAction`,
|
|
174
238
|
* `RowIconAction`), and the app reads them off the cursor row
|
|
175
239
|
* (`verbControl`); such controls leave the Tab order, unless `tabbable`
|
|
@@ -177,18 +241,42 @@ export interface RowProps {
|
|
|
177
241
|
* is a stop of its own: the cursor row in the Tab order (or, while no row
|
|
178
242
|
* is, the one marked `entry`), the others reached by the keys that move it.
|
|
179
243
|
*/
|
|
180
|
-
export declare function Row({ rowKey, mark, name, nameClass, className, onOpen, level, tabbable, focusable, entry, children }: RowProps): ReactElement;
|
|
244
|
+
export declare function Row({ rowKey, mark, radio, name, nameClass, className, dim, add, selected, marked, change, emphasis, onOpen, onContextMenu, level, tabbable, focusable, entry, children }: RowProps): ReactElement;
|
|
245
|
+
/**
|
|
246
|
+
* A cell's tone: `warning` a value with something waiting on it (an
|
|
247
|
+
* update), `accent` a value offered (the version an update brings),
|
|
248
|
+
* `danger` a value that failed.
|
|
249
|
+
*/
|
|
250
|
+
export type CellTone = 'warning' | 'accent' | 'danger';
|
|
181
251
|
/** Props for {@link Cell}. */
|
|
182
252
|
export interface CellProps {
|
|
183
253
|
/** Right-aligned, for numbers. */
|
|
184
254
|
readonly align?: 'right';
|
|
255
|
+
/**
|
|
256
|
+
* Its words in a tone, which holds on the cursor row and under the
|
|
257
|
+
* pointer; the row-meta tone when absent. A selection paints it in its
|
|
258
|
+
* own words, as every cell.
|
|
259
|
+
*/
|
|
260
|
+
readonly tone?: CellTone;
|
|
261
|
+
/**
|
|
262
|
+
* What the cell holds when it is not a value: `action`, the row's verbs
|
|
263
|
+
* at its end (`QuietAction`, `RowIconAction`; `.pane-action-cell`), or
|
|
264
|
+
* `hover`, secondary icon controls in view on every row in their quiet
|
|
265
|
+
* tone (`.pane-hover-cell`).
|
|
266
|
+
*/
|
|
267
|
+
readonly kind?: 'action' | 'hover';
|
|
268
|
+
/** The value is missing (SQL NULL): its words in the row-meta tone's italic (`.value-null`). */
|
|
269
|
+
readonly missing?: boolean;
|
|
185
270
|
readonly className?: string;
|
|
186
271
|
/** The cell's whole text, for one cut short, as its tooltip and description; none when null. */
|
|
187
272
|
readonly tip?: string | null;
|
|
188
273
|
readonly children?: ReactNode;
|
|
189
274
|
}
|
|
190
|
-
/**
|
|
191
|
-
|
|
275
|
+
/**
|
|
276
|
+
* A cell of a row after its name, in the listing's metadata look
|
|
277
|
+
* (`.row-meta`), in the row-meta tone or the `tone` given.
|
|
278
|
+
*/
|
|
279
|
+
export declare function Cell({ align, tone, kind, missing, className, tip, children }: CellProps): ReactElement;
|
|
192
280
|
/**
|
|
193
281
|
* The tone of a state: ready, a warning, a failure, a transition under way,
|
|
194
282
|
* quiet, or a note (`info`: an Info or Note line, in the accent).
|