nexrall-code 0.5.175 → 0.5.176
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/index.js +5 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -157427,7 +157427,9 @@ function reserveBlockRows(previous, showing) {
|
|
|
157427
157427
|
function drainBlockRows(previous, printedRows) {
|
|
157428
157428
|
return Math.max(0, previous - Math.max(0, printedRows));
|
|
157429
157429
|
}
|
|
157430
|
-
|
|
157430
|
+
function replayReserveRows(slack, liveRows, pendingRows = 0) {
|
|
157431
|
+
return Math.max(Math.max(0, liveRows), Math.max(0, slack) - Math.max(0, pendingRows));
|
|
157432
|
+
}
|
|
157431
157433
|
function fillerRowCount(rowsAlreadyPrinted, footerTextValue = "", columns = process.stdout.columns ?? 80, rows = process.stdout.rows, reservedRows = 0, headroom = 2) {
|
|
157432
157434
|
if (!rows)
|
|
157433
157435
|
return 0;
|
|
@@ -168652,13 +168654,6 @@ function decideCtrlC(state) {
|
|
|
168652
168654
|
}
|
|
168653
168655
|
|
|
168654
168656
|
// src/ui/inkTerminal.tsx
|
|
168655
|
-
function fillerContent(rows) {
|
|
168656
|
-
if (rows <= 0)
|
|
168657
|
-
return "";
|
|
168658
|
-
if (rows === 1)
|
|
168659
|
-
return " ";
|
|
168660
|
-
return "\n".repeat(rows - 1);
|
|
168661
|
-
}
|
|
168662
168657
|
function isBusySlashCommand(line) {
|
|
168663
168658
|
return /^\/[a-z][\w-]*(\s|$)/.test(line.trim());
|
|
168664
168659
|
}
|
|
@@ -169555,19 +169550,8 @@ var App2 = ({ onReady }) => {
|
|
|
169555
169550
|
const liveRows = liveRef.current ? rowsOccupied(liveRef.current, columns) : 0;
|
|
169556
169551
|
const footer2 = footerRef.current ? footerText(footerRef.current) : "";
|
|
169557
169552
|
const slack = fillerRowCount(printedRows, footer2, columns, void 0, liveRows, 1);
|
|
169558
|
-
|
|
169559
|
-
|
|
169560
|
-
const filler = fillerRowCount(
|
|
169561
|
-
printedRows,
|
|
169562
|
-
footer2,
|
|
169563
|
-
columns,
|
|
169564
|
-
void 0,
|
|
169565
|
-
Math.max(liveRows, seed) + Math.max(0, pendingRows),
|
|
169566
|
-
1
|
|
169567
|
-
);
|
|
169568
|
-
if (filler <= 0)
|
|
169569
|
-
return withoutOldFiller;
|
|
169570
|
-
return [...withoutOldFiller, { id: idCounter++, content: fillerContent(filler), isFiller: true }];
|
|
169553
|
+
liveReserveRef.current = replayReserveRows(slack, liveRows, pendingRows);
|
|
169554
|
+
return withoutOldFiller;
|
|
169571
169555
|
});
|
|
169572
169556
|
}, []);
|
|
169573
169557
|
const forceFullRedraw = (0, import_react36.useCallback)(() => {
|