@xynogen/pix-toolbox 0.1.9 → 0.1.10
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/package.json +1 -1
- package/src/toolbox.ts +16 -5
package/package.json
CHANGED
package/src/toolbox.ts
CHANGED
|
@@ -343,6 +343,9 @@ export default function registerToolbox(pi: ExtensionAPI): void {
|
|
|
343
343
|
(tui: TUI, theme: Theme, keybindings: KeybindingsManager, done: (r: null) => void) => {
|
|
344
344
|
const accent = "accent";
|
|
345
345
|
const mute = (s: string) => theme.fg("muted", s);
|
|
346
|
+
const guide = (key: string, action: string) =>
|
|
347
|
+
theme.fg("text", key) + theme.fg("dim", ` ${action}`);
|
|
348
|
+
const guideSep = theme.fg("dim", " · ");
|
|
346
349
|
|
|
347
350
|
type RowState = "active" | "gated";
|
|
348
351
|
const stateOf = (name: string): RowState => (ops.isActive(name) ? "active" : "gated");
|
|
@@ -449,12 +452,19 @@ export default function registerToolbox(pi: ExtensionAPI): void {
|
|
|
449
452
|
render(w: number) {
|
|
450
453
|
const mw = modalWidth(w);
|
|
451
454
|
const inner = mw - 4; // CHROME = 2 border + 2 padding
|
|
452
|
-
const footer = statusText ? [statusText] : [];
|
|
455
|
+
const footer = statusText ? ["", statusText] : [""];
|
|
453
456
|
footer.push(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
"
|
|
457
|
-
|
|
457
|
+
guide("↑↓", "navigate") +
|
|
458
|
+
guideSep +
|
|
459
|
+
guide("←→/PgUp/PgDn", "inspect") +
|
|
460
|
+
guideSep +
|
|
461
|
+
guide("e", "enable") +
|
|
462
|
+
guideSep +
|
|
463
|
+
guide("d", "disable") +
|
|
464
|
+
guideSep +
|
|
465
|
+
guide("space", "toggle") +
|
|
466
|
+
guideSep +
|
|
467
|
+
guide("esc", "close"),
|
|
458
468
|
);
|
|
459
469
|
const result = frameModal({
|
|
460
470
|
width: mw,
|
|
@@ -464,6 +474,7 @@ export default function registerToolbox(pi: ExtensionAPI): void {
|
|
|
464
474
|
theme.fg(accent, theme.bold("🧰 Toolbox")),
|
|
465
475
|
theme.fg("muted", "Search:"),
|
|
466
476
|
...search.render(inner),
|
|
477
|
+
"",
|
|
467
478
|
],
|
|
468
479
|
body: list.render(inner),
|
|
469
480
|
selectedBodyRange: pager.selectedRange({
|