@nmakarov/cli-toolkit 0.82.0 → 0.84.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/dist/cli-runner.cjs +12 -9
- package/dist/cli-runner.cjs.map +1 -1
- package/dist/cli-runner.js +12 -9
- package/dist/cli-runner.js.map +1 -1
- package/dist/index.cjs +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/init.cjs +12 -9
- package/dist/init.cjs.map +1 -1
- package/dist/init.js +12 -9
- package/dist/init.js.map +1 -1
- package/dist/screen.cjs +13 -8
- package/dist/screen.cjs.map +1 -1
- package/dist/screen.js +11 -8
- package/dist/screen.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -615,23 +615,23 @@ function formatKeyBindings(bindings, mode = "long") {
|
|
|
615
615
|
})));
|
|
616
616
|
groups.sort((a, b) => a.order - b.order);
|
|
617
617
|
const items = [];
|
|
618
|
-
groups.forEach((group) => {
|
|
618
|
+
groups.forEach((group, groupIndex) => {
|
|
619
619
|
const bindingWithCustom = resolvedBindings.find(
|
|
620
|
-
(b) => group.keys.includes(b
|
|
620
|
+
(b) => group.keys.includes(formatBindingKey(b)) && typeof b.resolvedCaption !== "string"
|
|
621
621
|
);
|
|
622
622
|
if (bindingWithCustom && bindingWithCustom.resolvedCaption) {
|
|
623
623
|
items.push(bindingWithCustom.resolvedCaption);
|
|
624
624
|
} else {
|
|
625
|
-
|
|
626
|
-
if (mode === "long") {
|
|
627
|
-
items.push(`${keyStr} to ${group.caption}`);
|
|
628
|
-
} else {
|
|
629
|
-
items.push(keyStr);
|
|
630
|
-
}
|
|
625
|
+
items.push(formatFooterHotkey(formatKeys(group.keys), group.caption, mode, `kb-${groupIndex}`));
|
|
631
626
|
}
|
|
632
627
|
});
|
|
633
628
|
return items;
|
|
634
629
|
}
|
|
630
|
+
function formatFooterHotkey(keyStr, caption = "", mode = "long", reactKey = "hotkey") {
|
|
631
|
+
const keyNode = h3(Text3, { key: `${reactKey}-key`, ...FOOTER_HOTKEY_STYLE }, keyStr);
|
|
632
|
+
if (mode !== "long" || !caption) return keyNode;
|
|
633
|
+
return h3(Text3, { key: reactKey, dimColor: true, color: "white" }, keyNode, ` to ${caption}`);
|
|
634
|
+
}
|
|
635
635
|
function formatKeys(keys) {
|
|
636
636
|
const keyMap = {
|
|
637
637
|
escape: "esc",
|
|
@@ -901,12 +901,13 @@ async function showMultiColumnListWithPreviewScreen(config2) {
|
|
|
901
901
|
}
|
|
902
902
|
});
|
|
903
903
|
}
|
|
904
|
-
var showMenuScreen, showWordGridScreen;
|
|
904
|
+
var FOOTER_HOTKEY_STYLE, showMenuScreen, showWordGridScreen;
|
|
905
905
|
var init_screens = __esm({
|
|
906
906
|
"src/screen/screens.js"() {
|
|
907
907
|
init_components();
|
|
908
908
|
init_list_components();
|
|
909
909
|
init_key_bindings();
|
|
910
|
+
FOOTER_HOTKEY_STYLE = { bold: true, color: "white", dimColor: false };
|
|
910
911
|
showMenuScreen = showListScreen;
|
|
911
912
|
showWordGridScreen = showMultiColumnListScreen;
|
|
912
913
|
}
|
|
@@ -10189,6 +10190,7 @@ export {
|
|
|
10189
10190
|
DEFAULT_RUNTIME_PARAM_SPECS,
|
|
10190
10191
|
Db,
|
|
10191
10192
|
Divider,
|
|
10193
|
+
FOOTER_HOTKEY_STYLE,
|
|
10192
10194
|
FileDatabase,
|
|
10193
10195
|
FileDatabaseError,
|
|
10194
10196
|
FooterPresets,
|
|
@@ -10273,6 +10275,7 @@ export {
|
|
|
10273
10275
|
ensureTasksRuntime,
|
|
10274
10276
|
flushTaskIpcLogs,
|
|
10275
10277
|
formatBindingKey,
|
|
10278
|
+
formatFooterHotkey,
|
|
10276
10279
|
getArgsInstance,
|
|
10277
10280
|
getPm2Process,
|
|
10278
10281
|
createElement3 as h,
|