@bigpixelrocket/uiok 0.2.2 → 0.3.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 +62 -1
- package/dist/button/TextLink.d.ts +27 -0
- package/dist/button/TextLink.js +15 -0
- package/dist/button/button.css +48 -0
- package/dist/button/index.d.ts +2 -1
- package/dist/button/index.js +2 -1
- package/dist/charts/Sparkline.d.ts +20 -0
- package/dist/charts/Sparkline.js +12 -0
- package/dist/charts/Sparkline.logic.d.ts +9 -0
- package/dist/charts/Sparkline.logic.js +27 -0
- package/dist/charts/charts.css +17 -0
- package/dist/charts/index.d.ts +2 -0
- package/dist/charts/index.js +2 -0
- package/dist/dialog/ConfirmDialog.d.ts +17 -1
- package/dist/dialog/ConfirmDialog.js +10 -4
- package/dist/dialog/DialogLists.d.ts +8 -1
- package/dist/dialog/DialogLists.js +3 -2
- package/dist/dialog/ModalDialog.d.ts +8 -0
- package/dist/dialog/ModalDialog.js +4 -2
- package/dist/dialog/ProgressDialog.d.ts +34 -0
- package/dist/dialog/ProgressDialog.js +40 -0
- package/dist/dialog/TypedNameDialog.d.ts +36 -0
- package/dist/dialog/TypedNameDialog.js +17 -0
- package/dist/dialog/index.d.ts +5 -2
- package/dist/dialog/index.js +4 -1
- package/dist/field/Switch.d.ts +26 -0
- package/dist/field/Switch.js +20 -0
- package/dist/field/field.css +110 -2
- package/dist/field/index.d.ts +3 -2
- package/dist/field/index.js +3 -2
- package/dist/filter/filter.css +16 -0
- package/dist/frame/AppRoot.d.ts +44 -0
- package/dist/frame/AppRoot.js +26 -0
- package/dist/frame/Dock.d.ts +88 -0
- package/dist/frame/Dock.js +129 -0
- package/dist/frame/FilterChips.d.ts +28 -0
- package/dist/frame/FilterChips.js +14 -0
- package/dist/frame/PageParts.d.ts +69 -0
- package/dist/frame/PageParts.js +60 -0
- package/dist/frame/PaneSplit.d.ts +74 -0
- package/dist/frame/PaneSplit.js +197 -0
- package/dist/frame/SidebarResizer.d.ts +35 -0
- package/dist/frame/SidebarResizer.js +43 -0
- package/dist/frame/StatusNotice.d.ts +20 -0
- package/dist/frame/StatusNotice.js +13 -0
- package/dist/frame/Tree.d.ts +140 -0
- package/dist/frame/Tree.js +141 -0
- package/dist/frame/TreeToggle.d.ts +18 -0
- package/dist/frame/TreeToggle.js +17 -0
- package/dist/frame/WindowFrame.d.ts +57 -0
- package/dist/frame/WindowFrame.js +19 -0
- package/dist/frame/frame.css +801 -0
- package/dist/frame/index.d.ts +22 -0
- package/dist/frame/index.js +22 -0
- package/dist/frame/sharedRef.d.ts +8 -0
- package/dist/frame/sharedRef.js +26 -0
- package/dist/grid/DataGrid.d.ts +10 -2
- package/dist/grid/DataGrid.js +47 -13
- package/dist/grid/DataGrid.logic.d.ts +16 -0
- package/dist/grid/DataGrid.logic.js +28 -0
- package/dist/grid/grid.css +128 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/labels/UiokLabels.d.ts +6 -0
- package/dist/labels/UiokLabels.js +5 -1
- package/dist/labels/dialog.d.ts +12 -0
- package/dist/labels/dialog.js +7 -1
- package/dist/labels/index.d.ts +2 -0
- package/dist/labels/index.js +2 -0
- package/dist/labels/keys.js +2 -0
- package/dist/labels/paneTabs.d.ts +27 -0
- package/dist/labels/paneTabs.js +10 -0
- package/dist/labels/selectAll.d.ts +4 -1
- package/dist/labels/selectAll.js +1 -1
- package/dist/labels/settings.d.ts +46 -0
- package/dist/labels/settings.js +29 -0
- package/dist/legend/KeyLegendStrip.d.ts +9 -1
- package/dist/legend/KeyLegendStrip.js +119 -5
- package/dist/legend/legend.css +52 -0
- package/dist/listing/EmptyState.d.ts +40 -0
- package/dist/listing/EmptyState.js +14 -0
- package/dist/listing/Listing.d.ts +23 -5
- package/dist/listing/Listing.js +11 -8
- package/dist/listing/index.d.ts +3 -1
- package/dist/listing/index.js +3 -1
- package/dist/listing/listing.css +172 -5
- package/dist/log/LogWell.d.ts +34 -0
- package/dist/log/LogWell.js +39 -0
- package/dist/log/LogWell.logic.d.ts +16 -0
- package/dist/log/LogWell.logic.js +26 -0
- package/dist/log/index.d.ts +8 -0
- package/dist/log/index.js +8 -0
- package/dist/log/log.css +57 -0
- package/dist/pane/Pane.d.ts +49 -0
- package/dist/pane/Pane.js +17 -0
- package/dist/pane/PaneActions.d.ts +3 -1
- package/dist/pane/PaneActions.js +6 -5
- package/dist/pane/PaneKeys.d.ts +10 -3
- package/dist/pane/PaneKeys.js +26 -7
- package/dist/pane/PaneTabs.d.ts +92 -0
- package/dist/pane/PaneTabs.js +326 -0
- package/dist/pane/PaneTabs.logic.d.ts +97 -0
- package/dist/pane/PaneTabs.logic.js +158 -0
- package/dist/pane/index.d.ts +7 -1
- package/dist/pane/index.js +7 -1
- package/dist/pane/panetabs.css +408 -0
- package/dist/pane/usePaneKeys.js +9 -11
- package/dist/pane/useTabDrag.d.ts +49 -0
- package/dist/pane/useTabDrag.js +306 -0
- package/dist/segmented/SegmentedChoice.d.ts +8 -1
- package/dist/segmented/SegmentedChoice.js +7 -4
- package/dist/shell/AboutWindow.d.ts +21 -0
- package/dist/shell/AboutWindow.js +10 -0
- package/dist/shell/LanguageChoice.d.ts +27 -0
- package/dist/shell/LanguageChoice.js +17 -0
- package/dist/shell/LoadFailure.d.ts +22 -0
- package/dist/shell/LoadFailure.js +15 -0
- package/dist/shell/Lockup.d.ts +52 -0
- package/dist/shell/Lockup.js +30 -0
- package/dist/shell/SettingsDialog.d.ts +97 -0
- package/dist/shell/SettingsDialog.js +219 -0
- package/dist/shell/SettingsDialog.logic.d.ts +33 -0
- package/dist/shell/SettingsDialog.logic.js +42 -0
- package/dist/shell/SettingsFiles.d.ts +55 -0
- package/dist/shell/SettingsFiles.js +30 -0
- package/dist/shell/SettingsPageKeys.d.ts +42 -0
- package/dist/shell/SettingsPageKeys.js +70 -0
- package/dist/shell/SettingsSubsection.d.ts +34 -0
- package/dist/shell/SettingsSubsection.js +30 -0
- package/dist/shell/SignIn.d.ts +61 -0
- package/dist/shell/SignIn.js +36 -0
- package/dist/shell/ThemePicker.d.ts +74 -0
- package/dist/shell/ThemePicker.js +96 -0
- package/dist/shell/ThemePicker.logic.d.ts +13 -0
- package/dist/shell/ThemePicker.logic.js +26 -0
- package/dist/shell/TitleBar.d.ts +44 -0
- package/dist/shell/TitleBar.js +23 -0
- package/dist/shell/UpdatePill.d.ts +26 -0
- package/dist/shell/UpdatePill.js +17 -0
- package/dist/shell/Updates.d.ts +99 -0
- package/dist/shell/Updates.js +72 -0
- package/dist/shell/index.d.ts +27 -0
- package/dist/shell/index.js +27 -0
- package/dist/shell/shell.css +243 -4
- package/dist/styles.css +10 -0
- package/dist/surface/GroupSwatch.d.ts +22 -0
- package/dist/surface/GroupSwatch.js +15 -0
- package/dist/surface/Tag.d.ts +26 -0
- package/dist/surface/Tag.js +12 -0
- package/dist/surface/index.d.ts +7 -0
- package/dist/surface/index.js +7 -0
- package/dist/surface/surface.css +116 -1
- package/dist/themes/catalog.js +4 -0
- package/dist/themes/themes.generated.css +244 -0
- package/dist/themes/tokens.d.ts +17 -5
- package/dist/themes/tokens.js +75 -1
- package/dist/tokens.css +11 -0
- package/package.json +1 -1
package/dist/listing/index.d.ts
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Listings: the column strip, rows and cells in the listing look (scoped by
|
|
3
3
|
* `.listing-root`), the row cursor they share with the keys, column widths,
|
|
4
4
|
* and the state, path, and terminal-well cells; `CurrentDot` marks the
|
|
5
|
-
* current one in a list
|
|
5
|
+
* current one in a list, and `EmptyState` fills a pane with nothing in it
|
|
6
|
+
* yet or one that could not load.
|
|
6
7
|
*/
|
|
7
8
|
export { type SortDirection } from '../labels/listing.js';
|
|
8
9
|
export { CurrentDot, type CurrentDotProps } from './CurrentDot.js';
|
|
10
|
+
export { EmptyState, type EmptyStateProps, type EmptyStateStep } from './EmptyState.js';
|
|
9
11
|
export { ACTION_COLUMN, Cell, column, ICON_LINK_PX, iconLinksColumn, linksColumn, Listing, PathCell, Row, RowCursorContext, StateMark, Strip, WellColumn, type CellProps, type ColumnSort, type ListingColumn, type ListingProps, type PathCellProps, type RowCursor, type RowProps, type StateMarkProps, type StateTone, type StripProps, type WellColumnProps } from './Listing.js';
|
|
10
12
|
export { pathParts, type PathParts } from './PathParts.logic.js';
|
package/dist/listing/index.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Listings: the column strip, rows and cells in the listing look (scoped by
|
|
3
3
|
* `.listing-root`), the row cursor they share with the keys, column widths,
|
|
4
4
|
* and the state, path, and terminal-well cells; `CurrentDot` marks the
|
|
5
|
-
* current one in a list
|
|
5
|
+
* current one in a list, and `EmptyState` fills a pane with nothing in it
|
|
6
|
+
* yet or one that could not load.
|
|
6
7
|
*/
|
|
7
8
|
export {} from '../labels/listing.js';
|
|
8
9
|
export { CurrentDot } from './CurrentDot.js';
|
|
10
|
+
export { EmptyState } from './EmptyState.js';
|
|
9
11
|
export { ACTION_COLUMN, Cell, column, ICON_LINK_PX, iconLinksColumn, linksColumn, Listing, PathCell, Row, RowCursorContext, StateMark, Strip, WellColumn } from './Listing.js';
|
|
10
12
|
export { pathParts } from './PathParts.logic.js';
|
package/dist/listing/listing.css
CHANGED
|
@@ -1148,7 +1148,7 @@ button.crumb-label > .crumb-text {
|
|
|
1148
1148
|
|
|
1149
1149
|
/* The bar: the state's tone, the width of the old inset bar. A row in no
|
|
1150
1150
|
state draws none. */
|
|
1151
|
-
:where(.listing-root) .row:is(.cursor, .marked)::after {
|
|
1151
|
+
:where(.listing-root) .row:is(.cursor, .marked, .row-changed)::after {
|
|
1152
1152
|
content: '';
|
|
1153
1153
|
width: var(--line-strong);
|
|
1154
1154
|
background: var(--row-bar, transparent);
|
|
@@ -1236,6 +1236,42 @@ button.crumb-label > .crumb-text {
|
|
|
1236
1236
|
background: var(--row-fill);
|
|
1237
1237
|
}
|
|
1238
1238
|
|
|
1239
|
+
/* Rows a save will change, the listing form of the grid's cell states
|
|
1240
|
+
(host classes through Row's className): a changed row (.row-changed)
|
|
1241
|
+
on the warning wash with a warning bar on its leading edge, and a row a
|
|
1242
|
+
save will delete (.row-removed) struck out in --danger on the danger
|
|
1243
|
+
wash, its quiet words in the on-surface tone floored on a state ground.
|
|
1244
|
+
The cursor, a mark, and a selection paint their own fill and bar over
|
|
1245
|
+
either; a removed row keeps its strike. */
|
|
1246
|
+
:where(.listing-root) .row.row-changed:where(:not(.cursor, .marked, .selected)) {
|
|
1247
|
+
--row-fill: var(--warning-wash);
|
|
1248
|
+
--row-bar: var(--warning);
|
|
1249
|
+
|
|
1250
|
+
background: var(--row-fill);
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
:where(.listing-root) .row.row-removed:where(:not(.cursor, .marked, .selected)) {
|
|
1254
|
+
--row-fill: var(--danger-wash);
|
|
1255
|
+
|
|
1256
|
+
background: var(--row-fill);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
:where(.listing-root) .row.row-removed > :is(.row-name, .row-meta) {
|
|
1260
|
+
text-decoration: line-through;
|
|
1261
|
+
text-decoration-color: var(--danger);
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
:where(.listing-root) .row:is(.row-changed, .row-removed):where(:not(.selected)) > .row-meta {
|
|
1265
|
+
color: var(--text-on-surface);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/* A row something is dragged over that will take the drop (.drop-target):
|
|
1269
|
+
an accent outline inside its edges, over whatever state it is in. */
|
|
1270
|
+
:where(.listing-root) .row.drop-target,
|
|
1271
|
+
:where(.listing-root) .row.drop-target:is(.cursor, .marked, .selected) {
|
|
1272
|
+
box-shadow: inset 0 0 0 var(--line-strong) var(--accent);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1239
1275
|
/* A focusable row (`Row` `focusable`) rings inside its edges: the list
|
|
1240
1276
|
around it scrolls, and would clip a ring drawn outside. */
|
|
1241
1277
|
:where(.listing-root) .row:focus-visible {
|
|
@@ -1315,6 +1351,13 @@ button.crumb-label > .crumb-text {
|
|
|
1315
1351
|
white-space: nowrap;
|
|
1316
1352
|
}
|
|
1317
1353
|
|
|
1354
|
+
/* A row in a tree or a plan (Row's level, as --row-level) indents its
|
|
1355
|
+
name one icon column a level, so a child's name starts under its
|
|
1356
|
+
parent's. At zero weight, so a host's own rule on the name wins. */
|
|
1357
|
+
:where(.listing-root .row > .row-name) {
|
|
1358
|
+
padding-inline-start: calc(var(--row-level, 0) * var(--icon-column));
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1318
1361
|
/* A listing selects rows, not text, as a file manager does: a drag, a
|
|
1319
1362
|
Shift-click, or a double-click on a row never starts a text selection,
|
|
1320
1363
|
in its name and values included, and a row copies through the host's
|
|
@@ -1358,6 +1401,13 @@ button.crumb-label > .crumb-text {
|
|
|
1358
1401
|
text-align: right;
|
|
1359
1402
|
}
|
|
1360
1403
|
|
|
1404
|
+
/* A missing value (SQL NULL) in a cell: italic in the row-meta tone, as
|
|
1405
|
+
the grid's cell-null; a state row's quiet-word rule takes it to the
|
|
1406
|
+
on-surface tone. */
|
|
1407
|
+
:where(.listing-root) .row-meta.value-null {
|
|
1408
|
+
font-style: italic;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1361
1411
|
/* The status line closes the pane: a summary of what the pane lists. Its
|
|
1362
1412
|
words start, and its last control's glyph ends, on the row inset, the
|
|
1363
1413
|
edges the path bar and the rows keep. */
|
|
@@ -1384,6 +1434,19 @@ button.crumb-label > .crumb-text {
|
|
|
1384
1434
|
white-space: nowrap;
|
|
1385
1435
|
}
|
|
1386
1436
|
|
|
1437
|
+
/* A notice as the status line's message keeps to its one line: centred on
|
|
1438
|
+
the bar, its words cut with an ellipsis rather than wrapped (give its
|
|
1439
|
+
notice-text cutTooltip with the whole text). */
|
|
1440
|
+
:where(.listing-root) .pane-summary > .notice {
|
|
1441
|
+
align-items: center;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
:where(.listing-root) .pane-summary > .notice .notice-text {
|
|
1445
|
+
overflow: hidden;
|
|
1446
|
+
text-overflow: ellipsis;
|
|
1447
|
+
white-space: nowrap;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1387
1450
|
/* Compact controls at the status line's end (PaneStatus's tools: Reveal,
|
|
1388
1451
|
Copy); the summary before them gives way to them. */
|
|
1389
1452
|
:where(.listing-root) .pane-status-tools {
|
|
@@ -1584,6 +1647,28 @@ button.crumb-label > .crumb-text {
|
|
|
1584
1647
|
color: var(--text);
|
|
1585
1648
|
}
|
|
1586
1649
|
|
|
1650
|
+
/* A warning (.warning): the warning tone's TriangleAlert, drawn as a mask
|
|
1651
|
+
in --warning as the danger line's glyph is, then the words in --text. A
|
|
1652
|
+
host that draws its own glyph first (an svg) gets no second one. */
|
|
1653
|
+
:where(.listing-root) .pane-message.warning {
|
|
1654
|
+
color: var(--text);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
:where(.listing-root) .pane-message.warning:not(:has(> svg:first-child))::before {
|
|
1658
|
+
content: '';
|
|
1659
|
+
flex: none;
|
|
1660
|
+
width: var(--icon-md);
|
|
1661
|
+
height: var(--icon-md);
|
|
1662
|
+
background: var(--warning);
|
|
1663
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E")
|
|
1664
|
+
center / contain no-repeat;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
:where(.listing-root) .pane-message.warning > svg:first-child {
|
|
1668
|
+
flex: none;
|
|
1669
|
+
color: var(--warning);
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1587
1672
|
/* A line that says a listing has no rows (`.empty`, Listing's `empty`)
|
|
1588
1673
|
reads as a quiet row in the rows' place: it starts where a row's icon
|
|
1589
1674
|
starts, in the rows' own typeface and size (the host's, as the rows'
|
|
@@ -1605,13 +1690,17 @@ button.crumb-label > .crumb-text {
|
|
|
1605
1690
|
where there is one (.pane-empty-detail). The pane keeps its path bar and
|
|
1606
1691
|
status line around it. A list that is merely empty (a folder with no
|
|
1607
1692
|
entries, a filter that matches nothing) says so with the quiet line
|
|
1608
|
-
`.pane-message.empty` instead.
|
|
1693
|
+
`.pane-message.empty` instead. In a pane shorter than the block, the
|
|
1694
|
+
block scrolls between the path bar and the status line, never pushing
|
|
1695
|
+
the status line out, and its top stays reachable (safe centring). */
|
|
1609
1696
|
:where(.listing-root) .pane-empty {
|
|
1610
1697
|
display: flex;
|
|
1611
1698
|
flex: 1;
|
|
1612
1699
|
flex-direction: column;
|
|
1613
1700
|
align-items: center;
|
|
1614
|
-
justify-content: center;
|
|
1701
|
+
justify-content: safe center;
|
|
1702
|
+
min-height: 0;
|
|
1703
|
+
overflow-y: auto;
|
|
1615
1704
|
gap: var(--space-2);
|
|
1616
1705
|
padding: var(--space-16);
|
|
1617
1706
|
color: var(--text-dim);
|
|
@@ -1630,6 +1719,12 @@ button.crumb-label > .crumb-text {
|
|
|
1630
1719
|
color: var(--text-faint);
|
|
1631
1720
|
}
|
|
1632
1721
|
|
|
1722
|
+
/* A pane that could not load (role="alert") leads with its glyph in the
|
|
1723
|
+
danger tone, as every failure's glyph is. */
|
|
1724
|
+
:where(.listing-root) .pane-empty[role='alert'] > svg {
|
|
1725
|
+
color: var(--danger);
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1633
1728
|
:where(.listing-root) .pane-empty :is(strong, h2) {
|
|
1634
1729
|
margin: 0;
|
|
1635
1730
|
color: var(--text);
|
|
@@ -1667,6 +1762,66 @@ button.crumb-label > .crumb-text {
|
|
|
1667
1762
|
overflow-wrap: anywhere;
|
|
1668
1763
|
}
|
|
1669
1764
|
|
|
1765
|
+
/* A host's own mark (a brand mark) in the glyph's place, at the glyph's
|
|
1766
|
+
scale: the mark is 1.4em, so the glyph's size sets its em. */
|
|
1767
|
+
:where(.listing-root) .pane-empty > .brand-mark {
|
|
1768
|
+
font-size: var(--icon-xl);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/* A quiet line under the actions (EmptyState's note). */
|
|
1772
|
+
:where(.listing-root) .pane-empty p.pane-empty-note {
|
|
1773
|
+
margin-top: var(--space-3);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
/* The way in as numbered steps side by side under the rest, each number in
|
|
1777
|
+
a small key-like box beside its words, its detail dim under its title. */
|
|
1778
|
+
:where(.listing-root) .pane-empty-steps {
|
|
1779
|
+
display: flex;
|
|
1780
|
+
flex-wrap: wrap;
|
|
1781
|
+
justify-content: center;
|
|
1782
|
+
gap: var(--space-4) var(--space-12);
|
|
1783
|
+
max-width: 620px;
|
|
1784
|
+
margin: var(--space-12) 0 0;
|
|
1785
|
+
padding: 0;
|
|
1786
|
+
list-style: none;
|
|
1787
|
+
font-size: var(--font-size-small);
|
|
1788
|
+
line-height: var(--line-height-prose);
|
|
1789
|
+
text-align: left;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
:where(.listing-root) .pane-empty-step {
|
|
1793
|
+
display: flex;
|
|
1794
|
+
gap: var(--space-3);
|
|
1795
|
+
max-width: 180px;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
:where(.listing-root) .pane-empty-step-number {
|
|
1799
|
+
display: inline-flex;
|
|
1800
|
+
flex: none;
|
|
1801
|
+
align-items: center;
|
|
1802
|
+
justify-content: center;
|
|
1803
|
+
min-width: var(--icon-lg);
|
|
1804
|
+
height: var(--icon-lg);
|
|
1805
|
+
margin-top: var(--space-1);
|
|
1806
|
+
border: var(--line) solid var(--control-border);
|
|
1807
|
+
border-radius: var(--radius-xs);
|
|
1808
|
+
color: var(--text-dim);
|
|
1809
|
+
font-family: var(--font-mono);
|
|
1810
|
+
font-size: var(--font-size-caption);
|
|
1811
|
+
line-height: var(--line-height-compact);
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
:where(.listing-root) .pane-empty-step-text {
|
|
1815
|
+
display: flex;
|
|
1816
|
+
flex-direction: column;
|
|
1817
|
+
-webkit-user-select: text;
|
|
1818
|
+
user-select: text;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
:where(.listing-root) .pane-empty-step-title {
|
|
1822
|
+
color: var(--text);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1670
1825
|
/* A state (StateMark): its mark, or its spinner for a transition, and its
|
|
1671
1826
|
word, in the state's tone. The mark takes the tone everywhere, the word
|
|
1672
1827
|
inside a row only, in the text-safe tone of its state. Each mark has its
|
|
@@ -1744,6 +1899,14 @@ button.crumb-label > .crumb-text {
|
|
|
1744
1899
|
box-shadow: inset 0 0 0 var(--line-strong) var(--accent);
|
|
1745
1900
|
}
|
|
1746
1901
|
|
|
1902
|
+
/* A note (info): an upright accent bar, the stem of an "i", as tall as the
|
|
1903
|
+
dot, so it reads apart from the busy ring in the same hue. */
|
|
1904
|
+
:where(.listing-root) .pane-tone-info > .pane-state-dot {
|
|
1905
|
+
width: var(--line-strong);
|
|
1906
|
+
background: var(--accent);
|
|
1907
|
+
box-shadow: none;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1747
1910
|
/* The busy spinner is the shared Spinner (it turns and stands still under
|
|
1748
1911
|
reduced motion on its own); the state only colours it. */
|
|
1749
1912
|
:where(.listing-root) .pane-state > svg.pane-state-busy {
|
|
@@ -1781,7 +1944,7 @@ button.crumb-label > .crumb-text {
|
|
|
1781
1944
|
on the accent tint whatever its hue. */
|
|
1782
1945
|
:where(.listing-root)
|
|
1783
1946
|
.row.marked:where(:not(.selected))
|
|
1784
|
-
:is(.pane-tone-ready, .pane-tone-warning, .pane-tone-danger)
|
|
1947
|
+
:is(.pane-tone-ready, .pane-tone-warning, .pane-tone-danger, .pane-tone-info)
|
|
1785
1948
|
> .pane-state-dot {
|
|
1786
1949
|
box-shadow: 0 0 0 var(--line) var(--text-on-surface);
|
|
1787
1950
|
}
|
|
@@ -1798,6 +1961,10 @@ button.crumb-label > .crumb-text {
|
|
|
1798
1961
|
color: var(--warning-text);
|
|
1799
1962
|
}
|
|
1800
1963
|
|
|
1964
|
+
:where(.listing-root) .row .pane-state.pane-tone-info {
|
|
1965
|
+
color: var(--accent-text);
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1801
1968
|
:where(.listing-root) .row .pane-state:is(.pane-tone-muted, .pane-tone-busy) {
|
|
1802
1969
|
color: var(--row-meta-text);
|
|
1803
1970
|
}
|
|
@@ -2207,7 +2374,7 @@ button.crumb-label > .crumb-text {
|
|
|
2207
2374
|
.listing-root:has(.pane.active) .pane:not(.active, .active .pane) *
|
|
2208
2375
|
)
|
|
2209
2376
|
)
|
|
2210
|
-
:is(.pane-tone-ready, .pane-tone-warning, .pane-tone-danger)
|
|
2377
|
+
:is(.pane-tone-ready, .pane-tone-warning, .pane-tone-danger, .pane-tone-info)
|
|
2211
2378
|
> .pane-state-dot {
|
|
2212
2379
|
box-shadow: 0 0 0 var(--line) var(--on-selected);
|
|
2213
2380
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
/** One line of a log. */
|
|
3
|
+
export interface LogLine {
|
|
4
|
+
/** Names the line among the log's; its place in the list where lines only ever append. */
|
|
5
|
+
readonly key: string | number;
|
|
6
|
+
/** What wrote it (a process's name, `queue.2`); none for a line of the log's own. */
|
|
7
|
+
readonly source?: string | null;
|
|
8
|
+
/** The line's words, as written. */
|
|
9
|
+
readonly text: ReactNode;
|
|
10
|
+
/** A line the host marks: a failure (`danger`), a warning, or one of the log's own quiet notes (`dim`). */
|
|
11
|
+
readonly tone?: 'danger' | 'warning' | 'dim';
|
|
12
|
+
}
|
|
13
|
+
/** Props for {@link LogWell}. */
|
|
14
|
+
export interface LogWellProps {
|
|
15
|
+
readonly lines: readonly LogLine[];
|
|
16
|
+
/** The log's accessible name ("Combined log"). */
|
|
17
|
+
readonly label: string;
|
|
18
|
+
/** The sources in the order their colours go, so each keeps its colour; any other takes the next in turn. */
|
|
19
|
+
readonly sources?: readonly string[];
|
|
20
|
+
/** Keeps the newest line in view while the reader is at the foot; a reader scrolled up stays put. */
|
|
21
|
+
readonly follow?: boolean;
|
|
22
|
+
/** The words shown while the log has no line. */
|
|
23
|
+
readonly empty?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A log in a well: each line in the code face, its source first in a
|
|
27
|
+
* column as wide as the longest source and in that source's own colour
|
|
28
|
+
* (`--log-source-*`, legible as text), a bar, then the words; a line the
|
|
29
|
+
* host marks takes its tone. The words can be selected and copied. With
|
|
30
|
+
* `follow`, a new line scrolls into view while the reader is at the foot.
|
|
31
|
+
* It is a `log` region, so a screen reader hears new lines without being
|
|
32
|
+
* moved; it takes the focus so the keys scroll it.
|
|
33
|
+
*/
|
|
34
|
+
export declare function LogWell({ lines, label, sources, follow, empty }: LogWellProps): ReactElement;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useLayoutEffect, useRef } from 'react';
|
|
3
|
+
import { logSourceColour, logSourceIndexes, logSourceWidth } from './LogWell.logic.js';
|
|
4
|
+
/** How near the foot, in pixels, still counts as reading the newest line. */
|
|
5
|
+
const FOOT_SLACK = 8;
|
|
6
|
+
/**
|
|
7
|
+
* A log in a well: each line in the code face, its source first in a
|
|
8
|
+
* column as wide as the longest source and in that source's own colour
|
|
9
|
+
* (`--log-source-*`, legible as text), a bar, then the words; a line the
|
|
10
|
+
* host marks takes its tone. The words can be selected and copied. With
|
|
11
|
+
* `follow`, a new line scrolls into view while the reader is at the foot.
|
|
12
|
+
* It is a `log` region, so a screen reader hears new lines without being
|
|
13
|
+
* moved; it takes the focus so the keys scroll it.
|
|
14
|
+
*/
|
|
15
|
+
export function LogWell({ lines, label, sources = [], follow = true, empty }) {
|
|
16
|
+
const well = useRef(null);
|
|
17
|
+
const atFoot = useRef(true);
|
|
18
|
+
const names = lines.map((line) => line.source);
|
|
19
|
+
const indexes = logSourceIndexes(names, sources);
|
|
20
|
+
const width = logSourceWidth(names);
|
|
21
|
+
const last = lines.at(-1)?.key;
|
|
22
|
+
useLayoutEffect(() => {
|
|
23
|
+
const element = well.current;
|
|
24
|
+
if (follow && atFoot.current && element) {
|
|
25
|
+
element.scrollTop = element.scrollHeight;
|
|
26
|
+
}
|
|
27
|
+
}, [follow, last, lines.length]);
|
|
28
|
+
return (_jsxs("div", { "aria-label": label, className: "log-well selectable", onScroll: (event) => {
|
|
29
|
+
const element = event.currentTarget;
|
|
30
|
+
atFoot.current =
|
|
31
|
+
element.scrollHeight - element.scrollTop - element.clientHeight <= FOOT_SLACK;
|
|
32
|
+
}, ref: well, role: "log", style: { '--log-source-width': `${width}ch` }, tabIndex: 0, children: [lines.length === 0 && empty !== undefined ? _jsx("p", { className: "log-empty", children: empty }) : null, lines.map((line) => {
|
|
33
|
+
const source = line.source ?? null;
|
|
34
|
+
const index = source === null ? undefined : indexes.get(source);
|
|
35
|
+
return (_jsxs("div", { className: "log-line", "data-tone": line.tone, children: [width > 0 ? (_jsx("span", { className: "log-source", style: index === undefined
|
|
36
|
+
? undefined
|
|
37
|
+
: { '--log-source': logSourceColour(index) }, children: source })) : null, width > 0 ? (_jsx("span", { "aria-hidden": true, className: "log-bar", children: "|" })) : null, _jsx("span", { className: "log-text", children: line.text })] }, line.key));
|
|
38
|
+
})] }));
|
|
39
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** How many source colours the theme defines (`--log-source-1` to `--log-source-6`). */
|
|
2
|
+
export declare const LOG_SOURCE_COLOURS = 6;
|
|
3
|
+
/**
|
|
4
|
+
* The colour token the log source at `index` (from zero) is written in, as
|
|
5
|
+
* a `var()`: `--log-source-1` for 0 through `--log-source-6` for 5,
|
|
6
|
+
* starting over at 6. Each holds 4.5:1 as text on a panel.
|
|
7
|
+
*/
|
|
8
|
+
export declare const logSourceColour: (index: number) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Each source's colour index, in the order given (`order`, then any other
|
|
11
|
+
* source in the order it first appears in `lines`), so a source keeps its
|
|
12
|
+
* colour however its lines interleave and whatever comes in later.
|
|
13
|
+
*/
|
|
14
|
+
export declare function logSourceIndexes(sources: readonly (string | null | undefined)[], order?: readonly string[]): ReadonlyMap<string, number>;
|
|
15
|
+
/** The width of a log's source column, in characters: its longest source, none when no line has one. */
|
|
16
|
+
export declare function logSourceWidth(sources: readonly (string | null | undefined)[]): number;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** How many source colours the theme defines (`--log-source-1` to `--log-source-6`). */
|
|
2
|
+
export const LOG_SOURCE_COLOURS = 6;
|
|
3
|
+
/**
|
|
4
|
+
* The colour token the log source at `index` (from zero) is written in, as
|
|
5
|
+
* a `var()`: `--log-source-1` for 0 through `--log-source-6` for 5,
|
|
6
|
+
* starting over at 6. Each holds 4.5:1 as text on a panel.
|
|
7
|
+
*/
|
|
8
|
+
export const logSourceColour = (index) => `var(--log-source-${(index % LOG_SOURCE_COLOURS) + 1})`;
|
|
9
|
+
/**
|
|
10
|
+
* Each source's colour index, in the order given (`order`, then any other
|
|
11
|
+
* source in the order it first appears in `lines`), so a source keeps its
|
|
12
|
+
* colour however its lines interleave and whatever comes in later.
|
|
13
|
+
*/
|
|
14
|
+
export function logSourceIndexes(sources, order = []) {
|
|
15
|
+
const indexes = new Map();
|
|
16
|
+
for (const source of [...order, ...sources]) {
|
|
17
|
+
if (source !== null && source !== undefined && !indexes.has(source)) {
|
|
18
|
+
indexes.set(source, indexes.size);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return indexes;
|
|
22
|
+
}
|
|
23
|
+
/** The width of a log's source column, in characters: its longest source, none when no line has one. */
|
|
24
|
+
export function logSourceWidth(sources) {
|
|
25
|
+
return sources.reduce((widest, source) => Math.max(widest, source?.length ?? 0), 0);
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs: `LogWell`, a log's lines in a well with each source's prefix in its
|
|
3
|
+
* own colour, and the rules that give a source its colour and its column
|
|
4
|
+
* (`logSourceIndexes`, `logSourceColour`, `logSourceWidth`). Its look is
|
|
5
|
+
* `log.css` in `@bigpixelrocket/uiok/styles.css`.
|
|
6
|
+
*/
|
|
7
|
+
export { LogWell, type LogLine, type LogWellProps } from './LogWell.js';
|
|
8
|
+
export { LOG_SOURCE_COLOURS, logSourceColour, logSourceIndexes, logSourceWidth } from './LogWell.logic.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs: `LogWell`, a log's lines in a well with each source's prefix in its
|
|
3
|
+
* own colour, and the rules that give a source its colour and its column
|
|
4
|
+
* (`logSourceIndexes`, `logSourceColour`, `logSourceWidth`). Its look is
|
|
5
|
+
* `log.css` in `@bigpixelrocket/uiok/styles.css`.
|
|
6
|
+
*/
|
|
7
|
+
export { LogWell } from './LogWell.js';
|
|
8
|
+
export { LOG_SOURCE_COLOURS, logSourceColour, logSourceIndexes, logSourceWidth } from './LogWell.logic.js';
|
package/dist/log/log.css
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* A log in a well (LogWell): the code face at the small size, the lines
|
|
2
|
+
kept as written (wrapping only where a line is longer than the well),
|
|
3
|
+
each source in a column as wide as the longest, in its own colour
|
|
4
|
+
(--log-source, which the component sets to a --log-source-N token, each
|
|
5
|
+
legible as text on a panel). */
|
|
6
|
+
.log-well {
|
|
7
|
+
min-height: 0;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: var(--space-3) var(--space-4);
|
|
10
|
+
overflow: auto;
|
|
11
|
+
border: var(--line) solid var(--border-strong);
|
|
12
|
+
border-radius: var(--radius-md);
|
|
13
|
+
background: var(--surface);
|
|
14
|
+
color: var(--text);
|
|
15
|
+
font: var(--font-weight-regular) var(--font-size-small) / var(--line-height-compact)
|
|
16
|
+
var(--font-mono);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.log-line {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: var(--log-source-width) auto minmax(0, 1fr);
|
|
22
|
+
column-gap: var(--space-3);
|
|
23
|
+
white-space: pre-wrap;
|
|
24
|
+
overflow-wrap: anywhere;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* A log with no sources: the words alone. */
|
|
28
|
+
.log-line:not(:has(> .log-source)) {
|
|
29
|
+
grid-template-columns: minmax(0, 1fr);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.log-source {
|
|
33
|
+
color: var(--log-source, var(--text-dim));
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.log-bar {
|
|
38
|
+
color: var(--text-faint);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.log-line[data-tone='danger'] > .log-text {
|
|
42
|
+
color: var(--danger-text);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.log-line[data-tone='warning'] > .log-text {
|
|
46
|
+
color: var(--warning-text);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.log-line[data-tone='dim'] > .log-text {
|
|
50
|
+
color: var(--text-dim);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.log-empty {
|
|
54
|
+
margin: 0;
|
|
55
|
+
color: var(--text-dim);
|
|
56
|
+
font-family: var(--font-ui);
|
|
57
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DOMAttributes, ReactElement, ReactNode, Ref } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The event handlers a host hangs on a pane or a region of the window for
|
|
4
|
+
* its keys, its focus, and its drop zone; nothing that styles it.
|
|
5
|
+
*/
|
|
6
|
+
export type RegionHandlers = Pick<DOMAttributes<HTMLElement>, 'onBlur' | 'onDragEnter' | 'onDragLeave' | 'onDragOver' | 'onDrop' | 'onFocus' | 'onKeyDown' | 'onKeyDownCapture' | 'onMouseDown' | 'onPointerDown'>;
|
|
7
|
+
/** Props for {@link PaneBox}. */
|
|
8
|
+
export interface PaneBoxProps extends RegionHandlers {
|
|
9
|
+
/** The pane holds the keyboard: its frame wears the accent. */
|
|
10
|
+
readonly active?: boolean;
|
|
11
|
+
/** The pane's accessible name, when its path bar does not name it. */
|
|
12
|
+
readonly label?: string;
|
|
13
|
+
/**
|
|
14
|
+
* `danger` draws its frame, and its front tab's outline, in the danger
|
|
15
|
+
* colour at rest, active, and in an inactive window (a production server).
|
|
16
|
+
*/
|
|
17
|
+
readonly tone?: 'danger';
|
|
18
|
+
/** The element it draws: a `section` by default, an `aside` for a sidebar. */
|
|
19
|
+
readonly as?: 'section' | 'aside';
|
|
20
|
+
readonly ref?: Ref<HTMLElement>;
|
|
21
|
+
/** Its tabs (`PaneTabs`), path bar, list, and status line, top to bottom. */
|
|
22
|
+
readonly children?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A pane in the listing look (under the listing root a `WindowFrame`
|
|
26
|
+
* wears): a framed column of its tab strip or path bar, its list, and its
|
|
27
|
+
* status line. `active` marks the pane that holds the keyboard; the others
|
|
28
|
+
* show their cursor row quietly.
|
|
29
|
+
*/
|
|
30
|
+
export declare function PaneBox({ active, label, tone, as: Element, ref, children, ...handlers }: PaneBoxProps): ReactElement;
|
|
31
|
+
/** Props for {@link PaneList}. */
|
|
32
|
+
export interface PaneListProps extends RegionHandlers {
|
|
33
|
+
/**
|
|
34
|
+
* The pane's home list, which the keys return to and Page Up and Page
|
|
35
|
+
* Down measure (`data-pane-home`): focusable by script, out of the Tab order.
|
|
36
|
+
*/
|
|
37
|
+
readonly home?: boolean;
|
|
38
|
+
/** Its rows act on a click, so the row under the pointer lights. */
|
|
39
|
+
readonly pointer?: boolean;
|
|
40
|
+
readonly label?: string;
|
|
41
|
+
readonly ref?: Ref<HTMLDivElement>;
|
|
42
|
+
/** Its listings, rows, and notes. */
|
|
43
|
+
readonly children?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The scrolling body of a pane, between its path bar and its status line:
|
|
47
|
+
* the listings and notes the pane shows.
|
|
48
|
+
*/
|
|
49
|
+
export declare function PaneList({ home, pointer, label, ref, children, ...handlers }: PaneListProps): ReactElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A pane in the listing look (under the listing root a `WindowFrame`
|
|
4
|
+
* wears): a framed column of its tab strip or path bar, its list, and its
|
|
5
|
+
* status line. `active` marks the pane that holds the keyboard; the others
|
|
6
|
+
* show their cursor row quietly.
|
|
7
|
+
*/
|
|
8
|
+
export function PaneBox({ active = false, label, tone, as: Element = 'section', ref, children, ...handlers }) {
|
|
9
|
+
return (_jsx(Element, { "aria-label": label, className: active ? 'pane active' : 'pane', "data-tone": tone, ref: ref, ...handlers, children: children }));
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The scrolling body of a pane, between its path bar and its status line:
|
|
13
|
+
* the listings and notes the pane shows.
|
|
14
|
+
*/
|
|
15
|
+
export function PaneList({ home = false, pointer = false, label, ref, children, ...handlers }) {
|
|
16
|
+
return (_jsx("div", { "aria-label": label, className: pointer ? 'pane-list pointer' : 'pane-list', "data-pane-home": home ? '' : undefined, ref: ref, tabIndex: home ? -1 : undefined, ...handlers, children: children }));
|
|
17
|
+
}
|
|
@@ -134,6 +134,8 @@ export interface RowIconActionProps {
|
|
|
134
134
|
readonly word?: string;
|
|
135
135
|
/** A destructive action, drawn as on `QuietAction`. */
|
|
136
136
|
readonly danger?: boolean;
|
|
137
|
+
/** The chord that runs it, as text ("⌘⌫"), written after the words in its tooltip as on `QuietAction`. */
|
|
138
|
+
readonly shortcut?: string;
|
|
137
139
|
}
|
|
138
140
|
/**
|
|
139
141
|
* A compact icon control: in a row, one that shows on its row's hover, its
|
|
@@ -143,4 +145,4 @@ export interface RowIconActionProps {
|
|
|
143
145
|
* in the listing look. Under `RowLinkLookContext` an action that names its
|
|
144
146
|
* verb (`word`, a row link) draws it in place of the icon or beside it.
|
|
145
147
|
*/
|
|
146
|
-
export declare function RowIconAction({ icon: Icon, label, disabled, onClick, ref, softDisabled, tip, verb, word, danger }: RowIconActionProps): ReactElement;
|
|
148
|
+
export declare function RowIconAction({ icon: Icon, label, disabled, onClick, ref, softDisabled, tip, verb, word, danger, shortcut }: RowIconActionProps): ReactElement;
|
package/dist/pane/PaneActions.js
CHANGED
|
@@ -91,7 +91,7 @@ export function QuietAction({ icon: Icon, word, label, lit = false, disabled = f
|
|
|
91
91
|
* in the listing look. Under `RowLinkLookContext` an action that names its
|
|
92
92
|
* verb (`word`, a row link) draws it in place of the icon or beside it.
|
|
93
93
|
*/
|
|
94
|
-
export function RowIconAction({ icon: Icon, label, disabled = false, onClick, ref, softDisabled = false, tip = label, verb, word, danger = false }) {
|
|
94
|
+
export function RowIconAction({ icon: Icon, label, disabled = false, onClick, ref, softDisabled = false, tip = label, verb, word, danger = false, shortcut }) {
|
|
95
95
|
const inRow = useInRow();
|
|
96
96
|
const chosen = useContext(RowLinkLookContext);
|
|
97
97
|
// Only an action that names its verb draws it in words.
|
|
@@ -102,9 +102,10 @@ export function RowIconAction({ icon: Icon, label, disabled = false, onClick, re
|
|
|
102
102
|
event.stopPropagation();
|
|
103
103
|
if (!softDisabled)
|
|
104
104
|
onClick();
|
|
105
|
-
}, ref: ref, tabIndex: inRow ? -1 : undefined, type: "button", ...(look !== 'icons' && tip === word
|
|
105
|
+
}, ref: ref, tabIndex: inRow ? -1 : undefined, type: "button", ...(look !== 'icons' && tip === word && shortcut === undefined
|
|
106
106
|
? {}
|
|
107
|
-
:
|
|
108
|
-
? tooltip(label)
|
|
109
|
-
|
|
107
|
+
: {
|
|
108
|
+
...(tip === label ? tooltip(label) : describedTooltip(tip)),
|
|
109
|
+
...(shortcut === undefined ? {} : { 'data-tooltip-shortcut': shortcut })
|
|
110
|
+
}), children: [look !== 'text' && _jsx(Icon, { "aria-hidden": true, size: ICON_SM }), look !== 'icons' && _jsx("span", { children: word })] }));
|
|
110
111
|
}
|
package/dist/pane/PaneKeys.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ControlVerb } from './PaneActions.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* A pane's home that shows: the first `data-pane-home` element in it (the
|
|
4
|
+
* sidebar's with `"sidebar"`) outside a hidden page, or null for none.
|
|
5
|
+
* Internal to the pane area.
|
|
6
|
+
*/
|
|
7
|
+
export declare const shownHome: (pane: Element | null, sidebar?: boolean) => HTMLElement | null;
|
|
8
|
+
/** The rows a pane's cursor walks, top to bottom: its `data-row-key` elements that show. */
|
|
3
9
|
export declare const paneRows: (pane: Element | null) => HTMLElement[];
|
|
4
10
|
/** A pane's row by its key, or null for none. */
|
|
5
11
|
export declare const paneRow: (pane: Element | null, key: string | null) => HTMLElement | null;
|
|
@@ -29,9 +35,10 @@ export interface SidebarTabStops {
|
|
|
29
35
|
* document puts it, make one cycle in document order that wraps at either
|
|
30
36
|
* end. A row's controls are no stops (the cursor row's keys run them) unless
|
|
31
37
|
* its listing keeps them in the Tab order (`Row`'s `tabbable`); a sidebar
|
|
32
|
-
* row's never are.
|
|
38
|
+
* row's never are. With `alone` (no sidebar shown) the page's stops make
|
|
39
|
+
* the one cycle, wrapping at either end, and the sidebar is never named.
|
|
33
40
|
*/
|
|
34
|
-
export declare function nextTabStop(main: Element, home: HTMLElement, from: TabStop, back: boolean, sidebar?: SidebarTabStops | null): TabStop;
|
|
41
|
+
export declare function nextTabStop(main: Element, home: HTMLElement, from: TabStop, back: boolean, sidebar?: SidebarTabStops | null, alone?: boolean): TabStop;
|
|
35
42
|
/**
|
|
36
43
|
* The rows one Page Up or Page Down moves in a pane: what its home
|
|
37
44
|
* (`data-pane-home`) shows of 24px rows, less one kept in view.
|