saterminal 0.5.1 → 0.5.2

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.
Files changed (2) hide show
  1. package/package.json +2 -1
  2. package/src/text/wrap.ts +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saterminal",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "sat": "src/cli/index.ts"
@@ -25,6 +25,7 @@
25
25
  "node-html-parser": "^9.0.0",
26
26
  "pastel": "4.0.1",
27
27
  "react": "19.2.0",
28
+ "wrap-ansi": "^9.0.2",
28
29
  "zod": "4"
29
30
  },
30
31
  "devDependencies": {
package/src/text/wrap.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import wrapAnsi from "wrap-ansi";
1
2
  import { appendSegment, stylesEqual, type TextSegment, type TextStyle } from "@/text/rich-text.ts";
2
3
 
3
4
  export function wrapSegments(segments: TextSegment[], width: number): TextSegment[][] {
@@ -55,5 +56,5 @@ export function wrapSegments(segments: TextSegment[], width: number): TextSegmen
55
56
  }
56
57
 
57
58
  export function wrapText(value: string, width: number): string[] {
58
- return Bun.wrapAnsi(value, Math.max(1, width), { hard: false }).split("\n").map((line) => line.trim());
59
+ return wrapAnsi(value, Math.max(1, width), { hard: false }).split("\n").map((line) => line.trim());
59
60
  }