pi-compact-tools 0.5.6 → 0.5.7
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.
|
@@ -47,8 +47,16 @@ export function hardWrapTextWithAnsi(text: string, width: number): string[] {
|
|
|
47
47
|
wrapped.push("");
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
let offset = 0;
|
|
51
|
+
while (offset < lineWidth) {
|
|
52
|
+
if (offset > 0) {
|
|
53
|
+
const remainder = sliceByColumn(logicalLine, offset, lineWidth - offset, true);
|
|
54
|
+
const whitespace = stripTerminalSequences(remainder).match(/^\s+/u)?.[0] ?? "";
|
|
55
|
+
offset += visibleWidth(whitespace);
|
|
56
|
+
if (offset >= lineWidth) break;
|
|
57
|
+
}
|
|
51
58
|
wrapped.push(sliceByColumn(logicalLine, offset, safeWidth, true));
|
|
59
|
+
offset += safeWidth;
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
return wrapped;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-compact-tools",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"description": "Compact, expandable UI for pi's built-in tools, bundled with a polished GitHub Dark theme.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"typescript": "^5.9.0"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
|
-
"node": ">=
|
|
59
|
+
"node": ">=22.19.0"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|