numux 1.13.0 → 1.14.1
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/numux.js +39 -22
- package/package.json +1 -1
package/dist/numux.js
CHANGED
|
@@ -36,7 +36,7 @@ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports,
|
|
|
36
36
|
var require_package = __commonJS((exports, module) => {
|
|
37
37
|
module.exports = {
|
|
38
38
|
name: "numux",
|
|
39
|
-
version: "1.
|
|
39
|
+
version: "1.14.1",
|
|
40
40
|
description: "Terminal multiplexer with dependency orchestration",
|
|
41
41
|
type: "module",
|
|
42
42
|
license: "MIT",
|
|
@@ -1902,14 +1902,17 @@ import { BoxRenderable, createCliRenderer } from "@opentui/core";
|
|
|
1902
1902
|
// src/ui/keybindings.ts
|
|
1903
1903
|
var SHORTCUTS = {
|
|
1904
1904
|
restartAll: { key: "r", label: "Shift+R", description: "restart all", shift: true },
|
|
1905
|
-
copy: { key: "y", label: "Y
|
|
1905
|
+
copy: { key: "y", label: "Y", description: "copy all" },
|
|
1906
1906
|
search: { key: "f", label: "F", description: "search" },
|
|
1907
1907
|
restart: { key: "r", label: "R", description: "restart" },
|
|
1908
1908
|
stopStart: { key: "s", label: "S", description: "stop/start" },
|
|
1909
|
-
clear: { key: "l", label: "L", description: "clear" }
|
|
1909
|
+
clear: { key: "l", label: "L", description: "clear" },
|
|
1910
|
+
scrollToTop: { key: "g", label: "G", description: "top" },
|
|
1911
|
+
scrollToBottom: { key: "g", label: "Shift+G", description: "bottom", shift: true }
|
|
1910
1912
|
};
|
|
1911
1913
|
var STATUS_HINTS = [
|
|
1912
1914
|
["\u2190\u2192/1-9", "tabs"],
|
|
1915
|
+
["G/Shift+G", "top/bottom"],
|
|
1913
1916
|
[SHORTCUTS.restart.label, SHORTCUTS.restart.description],
|
|
1914
1917
|
[SHORTCUTS.stopStart.label, SHORTCUTS.stopStart.description],
|
|
1915
1918
|
[SHORTCUTS.search.label, SHORTCUTS.search.description],
|
|
@@ -1954,9 +1957,11 @@ class Pane {
|
|
|
1954
1957
|
this.terminal.onSelectionChanged = (selection) => {
|
|
1955
1958
|
const result = origOnSelectionChanged(selection);
|
|
1956
1959
|
if (selection?.isActive && !selection.isDragging) {
|
|
1957
|
-
const text =
|
|
1960
|
+
const text = this.terminal.getSelectedText();
|
|
1958
1961
|
if (text) {
|
|
1959
1962
|
this._onCopy?.(text);
|
|
1963
|
+
} else {
|
|
1964
|
+
queueMicrotask(() => renderer.clearSelection());
|
|
1960
1965
|
}
|
|
1961
1966
|
}
|
|
1962
1967
|
return result;
|
|
@@ -1993,6 +1998,9 @@ class Pane {
|
|
|
1993
1998
|
onScroll(handler) {
|
|
1994
1999
|
this._onScroll = handler;
|
|
1995
2000
|
}
|
|
2001
|
+
getText() {
|
|
2002
|
+
return this.terminal.getText();
|
|
2003
|
+
}
|
|
1996
2004
|
onCopy(handler) {
|
|
1997
2005
|
this._onCopy = handler;
|
|
1998
2006
|
}
|
|
@@ -2494,10 +2502,6 @@ class App {
|
|
|
2494
2502
|
});
|
|
2495
2503
|
this.renderer.keyInput.on("keypress", (key) => {
|
|
2496
2504
|
log(key);
|
|
2497
|
-
if (key.super && key.name === "c") {
|
|
2498
|
-
this.copySelection();
|
|
2499
|
-
return;
|
|
2500
|
-
}
|
|
2501
2505
|
if (key.ctrl && key.name === "c") {
|
|
2502
2506
|
if (this.searchMode) {
|
|
2503
2507
|
this.exitSearch();
|
|
@@ -2517,12 +2521,20 @@ class App {
|
|
|
2517
2521
|
const isInteractive = this.config.processes[this.activePane]?.interactive === true;
|
|
2518
2522
|
if (!isInteractive) {
|
|
2519
2523
|
const name = key.name.toLowerCase();
|
|
2524
|
+
if (key.shift && name === SHORTCUTS.scrollToBottom.key) {
|
|
2525
|
+
this.panes.get(this.activePane)?.scrollToBottom();
|
|
2526
|
+
return;
|
|
2527
|
+
}
|
|
2528
|
+
if (name === SHORTCUTS.scrollToTop.key) {
|
|
2529
|
+
this.panes.get(this.activePane)?.scrollToTop();
|
|
2530
|
+
return;
|
|
2531
|
+
}
|
|
2520
2532
|
if (key.shift && name === SHORTCUTS.restartAll.key) {
|
|
2521
2533
|
this.manager.restartAll(this.termCols, this.termRows);
|
|
2522
2534
|
return;
|
|
2523
2535
|
}
|
|
2524
2536
|
if (name === SHORTCUTS.copy.key) {
|
|
2525
|
-
this.
|
|
2537
|
+
this.copyAllText();
|
|
2526
2538
|
return;
|
|
2527
2539
|
}
|
|
2528
2540
|
if (name === SHORTCUTS.search.key) {
|
|
@@ -2635,22 +2647,27 @@ class App {
|
|
|
2635
2647
|
const cmd = process.platform === "darwin" ? "pbcopy" : process.platform === "linux" ? "xclip -selection clipboard" : null;
|
|
2636
2648
|
if (cmd) {
|
|
2637
2649
|
const [bin, ...args] = cmd.split(" ");
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2650
|
+
try {
|
|
2651
|
+
const proc = Bun.spawn([bin, ...args], { stdin: "pipe" });
|
|
2652
|
+
proc.stdin.write(text);
|
|
2653
|
+
proc.stdin.end();
|
|
2654
|
+
proc.exited.catch(() => {});
|
|
2655
|
+
} catch {}
|
|
2641
2656
|
}
|
|
2642
2657
|
}
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2658
|
+
copyAllText() {
|
|
2659
|
+
if (!this.activePane)
|
|
2660
|
+
return;
|
|
2661
|
+
const pane = this.panes.get(this.activePane);
|
|
2662
|
+
if (!pane)
|
|
2663
|
+
return;
|
|
2664
|
+
const text = pane.getText();
|
|
2665
|
+
if (!text) {
|
|
2666
|
+
this.statusBar.showTemporaryMessage("No output to copy");
|
|
2667
|
+
return;
|
|
2668
|
+
}
|
|
2650
2669
|
this.copyToClipboard(text);
|
|
2651
|
-
this.
|
|
2652
|
-
this.statusBar.showTemporaryMessage("Copied!");
|
|
2653
|
-
return true;
|
|
2670
|
+
this.statusBar.showTemporaryMessage("Copied all output!");
|
|
2654
2671
|
}
|
|
2655
2672
|
enterSearch() {
|
|
2656
2673
|
this.searchMode = true;
|