@oxecli/oxe 1.0.36 → 1.0.37

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/dist/ui.js +9 -1
  2. package/package.json +1 -1
package/dist/ui.js CHANGED
@@ -615,7 +615,15 @@ function wrapRuns(runs, width) {
615
615
  while (rest.length > 0) {
616
616
  if (curLen >= width)
617
617
  flush();
618
- const take = Math.min(rest.length, width - curLen);
618
+ let take = Math.min(rest.length, width - curLen);
619
+ // Keep normal text readable by wrapping at a word boundary. A single
620
+ // oversized token still falls back to a hard wrap so the frame stays
621
+ // within its width.
622
+ if (take < rest.length && curLen > 0) {
623
+ const lastSpace = rest.slice(0, take).lastIndexOf(" ");
624
+ if (lastSpace > 0)
625
+ take = lastSpace + 1;
626
+ }
619
627
  const chunk = rest.slice(0, take);
620
628
  cur += run.style ? run.style + chunk + "\x1b[0m" : chunk;
621
629
  curLen += take;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxecli/oxe",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },