@visulima/string 1.0.2 → 1.0.4

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 (34) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/case/camel-case.cjs +2 -2
  3. package/dist/case/camel-case.mjs +2 -2
  4. package/dist/case/capital-case.cjs +2 -2
  5. package/dist/case/capital-case.mjs +2 -2
  6. package/dist/case/flip-case.cjs +1 -1
  7. package/dist/case/flip-case.mjs +1 -1
  8. package/dist/case/index.cjs +1 -1
  9. package/dist/case/index.mjs +1 -1
  10. package/dist/case/kebab-case.cjs +2 -2
  11. package/dist/case/kebab-case.mjs +2 -2
  12. package/dist/case/pascal-case.cjs +2 -2
  13. package/dist/case/pascal-case.mjs +2 -2
  14. package/dist/case/sentence-case.cjs +2 -2
  15. package/dist/case/sentence-case.mjs +2 -2
  16. package/dist/case/split-by-case.cjs +35 -32
  17. package/dist/case/split-by-case.mjs +35 -32
  18. package/dist/case/train-case.cjs +1 -1
  19. package/dist/case/train-case.mjs +1 -1
  20. package/dist/get-string-truncated-width.cjs +53 -20
  21. package/dist/get-string-truncated-width.mjs +53 -20
  22. package/dist/index.cjs +2 -2
  23. package/dist/index.mjs +2 -2
  24. package/dist/outdent.cjs +4 -1
  25. package/dist/outdent.mjs +4 -1
  26. package/dist/packem_shared/{WrapMode-D4OAY7qi.mjs → WrapMode-B-WBY1mj.mjs} +1 -1
  27. package/dist/packem_shared/{WrapMode-DyodRTmi.cjs → WrapMode-Dsqu9BaX.cjs} +1 -1
  28. package/dist/packem_shared/{constants-nihvIvk5.cjs → constants-CKuHriHc.cjs} +1 -3
  29. package/dist/packem_shared/{constants-CKNmLDBQ.mjs → constants-CsGLUb4U.mjs} +2 -3
  30. package/dist/packem_shared/{joinSegments-CqLUoCzF.cjs → joinSegments-B_7bxy5J.cjs} +1 -1
  31. package/dist/packem_shared/{joinSegments-B2-yNNIj.mjs → joinSegments-BovQ2h_P.mjs} +1 -1
  32. package/dist/slice.cjs +1 -1
  33. package/dist/slice.mjs +1 -1
  34. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## @visulima/string [1.0.4](https://github.com/visulima/visulima/compare/@visulima/string@1.0.3...@visulima/string@1.0.4) (2025-05-01)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **string:** enhance handling of box-drawing characters in string width calculations ([6d1d83a](https://github.com/visulima/visulima/commit/6d1d83a6823d90f9104363a91e8add7e0557fc27))
6
+
7
+ ## @visulima/string [1.0.3](https://github.com/visulima/visulima/compare/@visulima/string@1.0.2...@visulima/string@1.0.3) (2025-04-29)
8
+
9
+ ### Bug Fixes
10
+
11
+ * enhance string width calculations and handling of ANSI sequences ([#497](https://github.com/visulima/visulima/issues/497)) ([fb650f7](https://github.com/visulima/visulima/commit/fb650f7169d7e9a7aa79123282ff7f4ff5c6693c))
12
+
1
13
  ## @visulima/string [1.0.2](https://github.com/visulima/visulima/compare/@visulima/string@1.0.1...@visulima/string@1.0.2) (2025-03-22)
2
14
 
3
15
  ### Bug Fixes
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- const constants = require('../packem_shared/constants-nihvIvk5.cjs');
3
+ const constants = require('../packem_shared/constants-CKuHriHc.cjs');
4
4
  const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
5
5
  const case_lowerFirst = require('./lower-first.cjs');
6
6
  const case_splitByCase = require('./split-by-case.cjs');
7
7
  const case_upperFirst = require('./upper-first.cjs');
8
8
  const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
9
- const joinSegments = require('../packem_shared/joinSegments-CqLUoCzF.cjs');
9
+ const joinSegments = require('../packem_shared/joinSegments-B_7bxy5J.cjs');
10
10
  const normalizeGermanEszett = require('../packem_shared/normalize-german-eszett-DJK0S2qj.cjs');
11
11
 
12
12
  var __defProp = Object.defineProperty;
@@ -1,10 +1,10 @@
1
- import { R as RE_FAST_ANSI } from '../packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { R as RE_FAST_ANSI } from '../packem_shared/constants-CsGLUb4U.mjs';
2
2
  import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
3
3
  import lowerFirst from './lower-first.mjs';
4
4
  import { splitByCase } from './split-by-case.mjs';
5
5
  import upperFirst from './upper-first.mjs';
6
6
  import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
7
- import joinSegments from '../packem_shared/joinSegments-B2-yNNIj.mjs';
7
+ import joinSegments from '../packem_shared/joinSegments-BovQ2h_P.mjs';
8
8
  import { n as normalizeGermanEszett } from '../packem_shared/normalize-german-eszett-fpJ4lZL6.mjs';
9
9
 
10
10
  var __defProp = Object.defineProperty;
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- const constants = require('../packem_shared/constants-nihvIvk5.cjs');
3
+ const constants = require('../packem_shared/constants-CKuHriHc.cjs');
4
4
  const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
5
5
  const case_splitByCase = require('./split-by-case.cjs');
6
6
  const case_upperFirst = require('./upper-first.cjs');
7
7
  const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
8
- const joinSegments = require('../packem_shared/joinSegments-CqLUoCzF.cjs');
8
+ const joinSegments = require('../packem_shared/joinSegments-B_7bxy5J.cjs');
9
9
  const normalizeGermanEszett = require('../packem_shared/normalize-german-eszett-DJK0S2qj.cjs');
10
10
 
11
11
  var __defProp = Object.defineProperty;
@@ -1,9 +1,9 @@
1
- import { R as RE_FAST_ANSI } from '../packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { R as RE_FAST_ANSI } from '../packem_shared/constants-CsGLUb4U.mjs';
2
2
  import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
3
3
  import { splitByCase } from './split-by-case.mjs';
4
4
  import upperFirst from './upper-first.mjs';
5
5
  import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
6
- import joinSegments from '../packem_shared/joinSegments-B2-yNNIj.mjs';
6
+ import joinSegments from '../packem_shared/joinSegments-BovQ2h_P.mjs';
7
7
  import { n as normalizeGermanEszett } from '../packem_shared/normalize-german-eszett-fpJ4lZL6.mjs';
8
8
 
9
9
  var __defProp = Object.defineProperty;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
5
  const node_util = require('node:util');
6
- const constants = require('../packem_shared/constants-nihvIvk5.cjs');
6
+ const constants = require('../packem_shared/constants-CKuHriHc.cjs');
7
7
  const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
8
8
  const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
9
9
 
@@ -1,5 +1,5 @@
1
1
  import { stripVTControlCharacters } from 'node:util';
2
- import { s as stripEmoji } from '../packem_shared/constants-CKNmLDBQ.mjs';
2
+ import { s as stripEmoji } from '../packem_shared/constants-CsGLUb4U.mjs';
3
3
  import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
4
4
  import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
5
5
 
@@ -21,7 +21,7 @@ const case_splitByCase = require('./split-by-case.cjs');
21
21
  const case_titleCase = require('./title-case.cjs');
22
22
  const case_trainCase = require('./train-case.cjs');
23
23
  const case_upperFirst = require('./upper-first.cjs');
24
- const joinSegments = require('../packem_shared/joinSegments-CqLUoCzF.cjs');
24
+ const joinSegments = require('../packem_shared/joinSegments-B_7bxy5J.cjs');
25
25
 
26
26
 
27
27
 
@@ -17,4 +17,4 @@ export { splitByCase } from './split-by-case.mjs';
17
17
  export { default as titleCase } from './title-case.mjs';
18
18
  export { default as trainCase } from './train-case.mjs';
19
19
  export { default as upperFirst } from './upper-first.mjs';
20
- export { default as joinSegments } from '../packem_shared/joinSegments-B2-yNNIj.mjs';
20
+ export { default as joinSegments } from '../packem_shared/joinSegments-BovQ2h_P.mjs';
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const constants = require('../packem_shared/constants-nihvIvk5.cjs');
5
+ const constants = require('../packem_shared/constants-CKuHriHc.cjs');
6
6
  const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
7
7
  const case_splitByCase = require('./split-by-case.cjs');
8
8
  const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
9
- const joinSegments = require('../packem_shared/joinSegments-CqLUoCzF.cjs');
9
+ const joinSegments = require('../packem_shared/joinSegments-B_7bxy5J.cjs');
10
10
  const normalizeGermanEszett = require('../packem_shared/normalize-german-eszett-DJK0S2qj.cjs');
11
11
 
12
12
  var __defProp = Object.defineProperty;
@@ -1,8 +1,8 @@
1
- import { R as RE_FAST_ANSI } from '../packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { R as RE_FAST_ANSI } from '../packem_shared/constants-CsGLUb4U.mjs';
2
2
  import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
3
3
  import { splitByCase } from './split-by-case.mjs';
4
4
  import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
5
- import joinSegments from '../packem_shared/joinSegments-B2-yNNIj.mjs';
5
+ import joinSegments from '../packem_shared/joinSegments-BovQ2h_P.mjs';
6
6
  import { n as normalizeGermanEszett } from '../packem_shared/normalize-german-eszett-fpJ4lZL6.mjs';
7
7
 
8
8
  var __defProp = Object.defineProperty;
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- const constants = require('../packem_shared/constants-nihvIvk5.cjs');
3
+ const constants = require('../packem_shared/constants-CKuHriHc.cjs');
4
4
  const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
5
5
  const case_splitByCase = require('./split-by-case.cjs');
6
6
  const case_upperFirst = require('./upper-first.cjs');
7
7
  const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
8
- const joinSegments = require('../packem_shared/joinSegments-CqLUoCzF.cjs');
8
+ const joinSegments = require('../packem_shared/joinSegments-B_7bxy5J.cjs');
9
9
  const normalizeGermanEszett = require('../packem_shared/normalize-german-eszett-DJK0S2qj.cjs');
10
10
 
11
11
  var __defProp = Object.defineProperty;
@@ -1,9 +1,9 @@
1
- import { R as RE_FAST_ANSI } from '../packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { R as RE_FAST_ANSI } from '../packem_shared/constants-CsGLUb4U.mjs';
2
2
  import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
3
3
  import { splitByCase } from './split-by-case.mjs';
4
4
  import upperFirst from './upper-first.mjs';
5
5
  import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
6
- import joinSegments from '../packem_shared/joinSegments-B2-yNNIj.mjs';
6
+ import joinSegments from '../packem_shared/joinSegments-BovQ2h_P.mjs';
7
7
  import { n as normalizeGermanEszett } from '../packem_shared/normalize-german-eszett-fpJ4lZL6.mjs';
8
8
 
9
9
  var __defProp = Object.defineProperty;
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- const constants = require('../packem_shared/constants-nihvIvk5.cjs');
3
+ const constants = require('../packem_shared/constants-CKuHriHc.cjs');
4
4
  const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
5
5
  const case_splitByCase = require('./split-by-case.cjs');
6
6
  const case_upperFirst = require('./upper-first.cjs');
7
7
  const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
8
- const joinSegments = require('../packem_shared/joinSegments-CqLUoCzF.cjs');
8
+ const joinSegments = require('../packem_shared/joinSegments-B_7bxy5J.cjs');
9
9
  const normalizeGermanEszett = require('../packem_shared/normalize-german-eszett-DJK0S2qj.cjs');
10
10
 
11
11
  var __defProp = Object.defineProperty;
@@ -1,9 +1,9 @@
1
- import { R as RE_FAST_ANSI } from '../packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { R as RE_FAST_ANSI } from '../packem_shared/constants-CsGLUb4U.mjs';
2
2
  import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
3
3
  import { splitByCase } from './split-by-case.mjs';
4
4
  import upperFirst from './upper-first.mjs';
5
5
  import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
6
- import joinSegments from '../packem_shared/joinSegments-B2-yNNIj.mjs';
6
+ import joinSegments from '../packem_shared/joinSegments-BovQ2h_P.mjs';
7
7
  import { n as normalizeGermanEszett } from '../packem_shared/normalize-german-eszett-fpJ4lZL6.mjs';
8
8
 
9
9
  var __defProp = Object.defineProperty;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
5
  const node_util = require('node:util');
6
- const constants = require('../packem_shared/constants-nihvIvk5.cjs');
6
+ const constants = require('../packem_shared/constants-CKuHriHc.cjs');
7
7
  const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
8
8
 
9
9
  var __defProp$2 = Object.defineProperty;
@@ -50,6 +50,9 @@ for (let index = 0; index < 128; index++) {
50
50
  isLowerCode[index] = index >= 97 && index <= 122 ? 1 : 0;
51
51
  isDigitCode[index] = index >= 48 && index <= 57 ? 1 : 0;
52
52
  }
53
+ const isUpper = /* @__PURE__ */ __name((code) => isUpperCode[code], "isUpper");
54
+ const isLower = /* @__PURE__ */ __name((code) => isLowerCode[code], "isLower");
55
+ const isDigit = /* @__PURE__ */ __name((code) => isDigitCode[code], "isDigit");
53
56
  const handleScriptTransitions = /* @__PURE__ */ __name((s, scriptDetectors, caseSensitive, locale, customSplitLogic) => {
54
57
  if (s.length === 0) {
55
58
  return [];
@@ -84,15 +87,15 @@ const handleScriptTransitions = /* @__PURE__ */ __name((s, scriptDetectors, case
84
87
  break;
85
88
  }
86
89
  }
87
- const isUpper = caseSensitive && locale ? char === char.toLocaleUpperCase(locale) : false;
90
+ const isUpperCaseChar = caseSensitive && locale ? char === char.toLocaleUpperCase(locale) : false;
88
91
  let shouldSplit = false;
89
92
  if (customSplitLogic) {
90
- shouldSplit = customSplitLogic(previousType, currentType, previousIsUpper, isUpper, char, index, chars);
93
+ shouldSplit = customSplitLogic(previousType, currentType, previousIsUpper, isUpperCaseChar, char, index, chars);
91
94
  } else {
92
95
  if (previousType !== currentType && previousType !== "other" && currentType !== "other") {
93
96
  shouldSplit = true;
94
97
  }
95
- if (caseSensitive && currentType !== "other" && !previousIsUpper && isUpper) {
98
+ if (caseSensitive && currentType !== "other" && !previousIsUpper && isUpperCaseChar) {
96
99
  shouldSplit = true;
97
100
  }
98
101
  }
@@ -104,7 +107,7 @@ const handleScriptTransitions = /* @__PURE__ */ __name((s, scriptDetectors, case
104
107
  }
105
108
  previousType = currentType;
106
109
  if (caseSensitive) {
107
- previousIsUpper = isUpper;
110
+ previousIsUpper = isUpperCaseChar;
108
111
  }
109
112
  }
110
113
  if (currentSegment && currentSegment.length > 0) {
@@ -138,11 +141,11 @@ const splitCamelCaseFast = /* @__PURE__ */ __name((s, knownAcronyms = /* @__PURE
138
141
  continue;
139
142
  }
140
143
  }
141
- const previousIsUpper = previousCode && previousCode < 128 && isUpperCode[previousCode];
142
- const currentIsUpper = currentCode && currentCode < 128 && isUpperCode[currentCode];
143
- const previousIsLower = previousCode && previousCode < 128 && isLowerCode[previousCode];
144
- const previousIsDigit = previousCode && previousCode < 128 && isDigitCode[previousCode];
145
- const currentIsDigit = currentCode && currentCode < 128 && isDigitCode[currentCode];
144
+ const previousIsUpper = previousCode && previousCode < 128 && isUpper(previousCode);
145
+ const currentIsUpper = currentCode && currentCode < 128 && isUpper(currentCode);
146
+ const previousIsLower = previousCode && previousCode < 128 && isLower(previousCode);
147
+ const previousIsDigit = previousCode && previousCode < 128 && isDigit(previousCode);
148
+ const currentIsDigit = currentCode && currentCode < 128 && isDigit(currentCode);
146
149
  if (previousIsLower && currentIsUpper) {
147
150
  tokens.push(s.slice(start, index));
148
151
  start = index;
@@ -158,8 +161,8 @@ const splitCamelCaseFast = /* @__PURE__ */ __name((s, knownAcronyms = /* @__PURE
158
161
  let isNextDigit = false;
159
162
  if (index + 1 < width) {
160
163
  const nextCode = s.codePointAt(index + 1);
161
- isNextUpper = nextCode && nextCode < 128 && isUpperCode[nextCode];
162
- isNextDigit = nextCode && nextCode < 128 && isDigitCode[nextCode];
164
+ isNextUpper = nextCode && nextCode < 128 && isUpper(nextCode);
165
+ isNextDigit = nextCode && nextCode < 128 && isDigit(nextCode);
163
166
  }
164
167
  if (!isNextDigit && isNextUpper) {
165
168
  tokens.push(s.slice(start, index), s.slice(index, index + 1));
@@ -169,7 +172,7 @@ const splitCamelCaseFast = /* @__PURE__ */ __name((s, knownAcronyms = /* @__PURE
169
172
  }
170
173
  if (index + 1 < width) {
171
174
  const nextCode = s.codePointAt(index + 1);
172
- const nextIsLower = nextCode && nextCode < 128 && isLowerCode[nextCode];
175
+ const nextIsLower = nextCode && nextCode < 128 && isLower(nextCode);
173
176
  if (previousIsUpper && currentIsUpper && nextIsLower) {
174
177
  const candidate = s.slice(start, index + 1);
175
178
  if (!knownAcronyms.has(candidate)) {
@@ -202,10 +205,10 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
202
205
  let upperSequenceStart = previousIsUpper2 ? 0 : -1;
203
206
  for (let index = 1; index < width_2; index++) {
204
207
  const char = chars2[index];
205
- const isUpper = char === char.toLocaleUpperCase(locale);
206
- if (isUpper === previousIsUpper2) {
208
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
209
+ if (isUpperCaseChar === previousIsUpper2) {
207
210
  currentSegment2 += char;
208
- } else if (isUpper) {
211
+ } else if (isUpperCaseChar) {
209
212
  if (currentSegment2 && currentSegment2.length > 0) {
210
213
  result2.push(currentSegment2);
211
214
  currentSegment2 = char;
@@ -226,7 +229,7 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
226
229
  isInUpperSequence = false;
227
230
  upperSequenceStart = -1;
228
231
  }
229
- previousIsUpper2 = isUpper;
232
+ previousIsUpper2 = isUpperCaseChar;
230
233
  }
231
234
  if (currentSegment2 && currentSegment2.length > 0) {
232
235
  result2.push(currentSegment2);
@@ -246,15 +249,15 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
246
249
  for (let index = 1; index < width_2; index++) {
247
250
  const char = chars2[index];
248
251
  const currentType = constants.RE_CYRILLIC.test(char) ? 1 : constants.RE_LATIN.test(char) ? 2 : 0;
249
- const isUpper = char === char.toLocaleUpperCase(locale);
250
- if (previousType !== currentType && (previousType === 1 || previousType === 2) && (currentType === 1 || currentType === 2) || currentType === previousType && !previousIsUpper2 && isUpper) {
252
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
253
+ if (previousType !== currentType && (previousType === 1 || previousType === 2) && (currentType === 1 || currentType === 2) || currentType === previousType && !previousIsUpper2 && isUpperCaseChar) {
251
254
  result2.push(currentSegment2);
252
255
  currentSegment2 = char;
253
256
  } else {
254
257
  currentSegment2 += char;
255
258
  }
256
259
  previousType = currentType;
257
- previousIsUpper2 = isUpper;
260
+ previousIsUpper2 = isUpperCaseChar;
258
261
  }
259
262
  if (currentSegment2 && currentSegment2.length > 0) {
260
263
  result2.push(currentSegment2);
@@ -298,14 +301,14 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
298
301
  let previousIsUpper2 = part[0] === part[0].toLocaleUpperCase(locale);
299
302
  for (let index = 1; index < partLength; index++) {
300
303
  const char = part[index];
301
- const isUpper = char === char.toLocaleUpperCase(locale);
302
- if (!previousIsUpper2 && isUpper) {
304
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
305
+ if (!previousIsUpper2 && isUpperCaseChar) {
303
306
  result2.push(word);
304
307
  word = char;
305
308
  } else {
306
309
  word += char;
307
310
  }
308
- previousIsUpper2 = isUpper;
311
+ previousIsUpper2 = isUpperCaseChar;
309
312
  }
310
313
  if (word) {
311
314
  result2.push(word);
@@ -367,10 +370,10 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
367
370
  let previousIsUpper2 = chars2[0] === chars2[0].toLocaleUpperCase(locale);
368
371
  for (let index = 1; index < width_2; index++) {
369
372
  const char = chars2[index];
370
- const isUpper = char === char.toLocaleUpperCase(locale);
373
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
371
374
  const isSpecialChar = /[ČŠŽĐ]/i.test(char);
372
375
  const nextIsUpper = index < width_2 - 1 && chars2[index + 1] === chars2[index + 1].toLocaleUpperCase(locale);
373
- if (!previousIsUpper2 && isUpper || isSpecialChar && nextIsUpper) {
376
+ if (!previousIsUpper2 && isUpperCaseChar || isSpecialChar && nextIsUpper) {
374
377
  result2.push(currentSegment2);
375
378
  currentSegment2 = char;
376
379
  if (isSpecialChar && nextIsUpper) {
@@ -380,7 +383,7 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
380
383
  } else {
381
384
  currentSegment2 += char;
382
385
  }
383
- previousIsUpper2 = isUpper;
386
+ previousIsUpper2 = isUpperCaseChar;
384
387
  }
385
388
  if (currentSegment2 && currentSegment2.length > 0) {
386
389
  result2.push(currentSegment2);
@@ -500,18 +503,18 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
500
503
  let previousIsUpper2 = chars2[0] === chars2[0].toLocaleUpperCase(locale);
501
504
  for (let index = 1; index < width_2; index++) {
502
505
  const char = chars2[index];
503
- const isUpper = char === char.toLocaleUpperCase(locale);
506
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
504
507
  if (constants.RE_UZBEK_LATIN_MODIFIER.test(char) || constants.RE_UZBEK_LATIN_MODIFIER.test(chars2[index - 1])) {
505
508
  currentSegment2 += char;
506
509
  continue;
507
510
  }
508
- if (!previousIsUpper2 && isUpper) {
511
+ if (!previousIsUpper2 && isUpperCaseChar) {
509
512
  result2.push(currentSegment2);
510
513
  currentSegment2 = char;
511
514
  } else {
512
515
  currentSegment2 += char;
513
516
  }
514
- previousIsUpper2 = isUpper;
517
+ previousIsUpper2 = isUpperCaseChar;
515
518
  }
516
519
  if (currentSegment2 && currentSegment2.length > 0) {
517
520
  result2.push(currentSegment2);
@@ -533,7 +536,7 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
533
536
  }
534
537
  for (let index = 1; index < width_; index++) {
535
538
  const char = chars[index];
536
- const isUpper = char === char.toLocaleUpperCase(locale);
539
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
537
540
  let isAcronym = false;
538
541
  for (const acronym of knownAcronyms) {
539
542
  if (s.startsWith(acronym, index)) {
@@ -547,13 +550,13 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
547
550
  if (isAcronym) {
548
551
  continue;
549
552
  }
550
- if (!previousIsUpper && isUpper) {
553
+ if (!previousIsUpper && isUpperCaseChar) {
551
554
  result.push(currentSegment);
552
555
  currentSegment = char;
553
556
  } else {
554
557
  currentSegment += char;
555
558
  }
556
- previousIsUpper = isUpper;
559
+ previousIsUpper = isUpperCaseChar;
557
560
  }
558
561
  if (currentSegment) {
559
562
  result.push(currentSegment);
@@ -1,5 +1,5 @@
1
1
  import { stripVTControlCharacters } from 'node:util';
2
- import { j as RE_EMOJI, s as stripEmoji, k as RE_SEPARATORS, R as RE_FAST_ANSI, l as RE_CYRILLIC, m as RE_LATIN, n as RE_GREEK, o as RE_GREEK_LATIN_SPLIT, p as RE_KANJI, q as RE_HEBREW, r as RE_ARABIC, t as RE_HANGUL, u as RE_UZBEK_LATIN_MODIFIER, v as RE_KATAKANA, w as RE_HIRAGANA, x as RE_DEVANAGARI, y as RE_BENGALI, z as RE_GUJARATI, A as RE_GURMUKHI, B as RE_KANNADA, C as RE_TAMIL, D as RE_TELUGU, E as RE_MALAYALAM, F as RE_SINHALA, G as RE_THAI, H as RE_LAO, I as RE_TIBETAN, J as RE_MYANMAR, K as RE_ETHIOPIC, L as RE_KHMER, M as RE_ORIYA } from '../packem_shared/constants-CKNmLDBQ.mjs';
2
+ import { j as RE_EMOJI, s as stripEmoji, k as RE_SEPARATORS, R as RE_FAST_ANSI, l as RE_CYRILLIC, m as RE_LATIN, n as RE_GREEK, o as RE_GREEK_LATIN_SPLIT, p as RE_KANJI, q as RE_HEBREW, r as RE_ARABIC, t as RE_HANGUL, u as RE_UZBEK_LATIN_MODIFIER, v as RE_KATAKANA, w as RE_HIRAGANA, x as RE_DEVANAGARI, y as RE_BENGALI, z as RE_GUJARATI, A as RE_GURMUKHI, B as RE_KANNADA, C as RE_TAMIL, D as RE_TELUGU, E as RE_MALAYALAM, F as RE_SINHALA, G as RE_THAI, H as RE_LAO, I as RE_TIBETAN, J as RE_MYANMAR, K as RE_ETHIOPIC, L as RE_KHMER, M as RE_ORIYA } from '../packem_shared/constants-CsGLUb4U.mjs';
3
3
  import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
4
4
 
5
5
  var __defProp$2 = Object.defineProperty;
@@ -46,6 +46,9 @@ for (let index = 0; index < 128; index++) {
46
46
  isLowerCode[index] = index >= 97 && index <= 122 ? 1 : 0;
47
47
  isDigitCode[index] = index >= 48 && index <= 57 ? 1 : 0;
48
48
  }
49
+ const isUpper = /* @__PURE__ */ __name((code) => isUpperCode[code], "isUpper");
50
+ const isLower = /* @__PURE__ */ __name((code) => isLowerCode[code], "isLower");
51
+ const isDigit = /* @__PURE__ */ __name((code) => isDigitCode[code], "isDigit");
49
52
  const handleScriptTransitions = /* @__PURE__ */ __name((s, scriptDetectors, caseSensitive, locale, customSplitLogic) => {
50
53
  if (s.length === 0) {
51
54
  return [];
@@ -80,15 +83,15 @@ const handleScriptTransitions = /* @__PURE__ */ __name((s, scriptDetectors, case
80
83
  break;
81
84
  }
82
85
  }
83
- const isUpper = caseSensitive && locale ? char === char.toLocaleUpperCase(locale) : false;
86
+ const isUpperCaseChar = caseSensitive && locale ? char === char.toLocaleUpperCase(locale) : false;
84
87
  let shouldSplit = false;
85
88
  if (customSplitLogic) {
86
- shouldSplit = customSplitLogic(previousType, currentType, previousIsUpper, isUpper, char, index, chars);
89
+ shouldSplit = customSplitLogic(previousType, currentType, previousIsUpper, isUpperCaseChar, char, index, chars);
87
90
  } else {
88
91
  if (previousType !== currentType && previousType !== "other" && currentType !== "other") {
89
92
  shouldSplit = true;
90
93
  }
91
- if (caseSensitive && currentType !== "other" && !previousIsUpper && isUpper) {
94
+ if (caseSensitive && currentType !== "other" && !previousIsUpper && isUpperCaseChar) {
92
95
  shouldSplit = true;
93
96
  }
94
97
  }
@@ -100,7 +103,7 @@ const handleScriptTransitions = /* @__PURE__ */ __name((s, scriptDetectors, case
100
103
  }
101
104
  previousType = currentType;
102
105
  if (caseSensitive) {
103
- previousIsUpper = isUpper;
106
+ previousIsUpper = isUpperCaseChar;
104
107
  }
105
108
  }
106
109
  if (currentSegment && currentSegment.length > 0) {
@@ -134,11 +137,11 @@ const splitCamelCaseFast = /* @__PURE__ */ __name((s, knownAcronyms = /* @__PURE
134
137
  continue;
135
138
  }
136
139
  }
137
- const previousIsUpper = previousCode && previousCode < 128 && isUpperCode[previousCode];
138
- const currentIsUpper = currentCode && currentCode < 128 && isUpperCode[currentCode];
139
- const previousIsLower = previousCode && previousCode < 128 && isLowerCode[previousCode];
140
- const previousIsDigit = previousCode && previousCode < 128 && isDigitCode[previousCode];
141
- const currentIsDigit = currentCode && currentCode < 128 && isDigitCode[currentCode];
140
+ const previousIsUpper = previousCode && previousCode < 128 && isUpper(previousCode);
141
+ const currentIsUpper = currentCode && currentCode < 128 && isUpper(currentCode);
142
+ const previousIsLower = previousCode && previousCode < 128 && isLower(previousCode);
143
+ const previousIsDigit = previousCode && previousCode < 128 && isDigit(previousCode);
144
+ const currentIsDigit = currentCode && currentCode < 128 && isDigit(currentCode);
142
145
  if (previousIsLower && currentIsUpper) {
143
146
  tokens.push(s.slice(start, index));
144
147
  start = index;
@@ -154,8 +157,8 @@ const splitCamelCaseFast = /* @__PURE__ */ __name((s, knownAcronyms = /* @__PURE
154
157
  let isNextDigit = false;
155
158
  if (index + 1 < width) {
156
159
  const nextCode = s.codePointAt(index + 1);
157
- isNextUpper = nextCode && nextCode < 128 && isUpperCode[nextCode];
158
- isNextDigit = nextCode && nextCode < 128 && isDigitCode[nextCode];
160
+ isNextUpper = nextCode && nextCode < 128 && isUpper(nextCode);
161
+ isNextDigit = nextCode && nextCode < 128 && isDigit(nextCode);
159
162
  }
160
163
  if (!isNextDigit && isNextUpper) {
161
164
  tokens.push(s.slice(start, index), s.slice(index, index + 1));
@@ -165,7 +168,7 @@ const splitCamelCaseFast = /* @__PURE__ */ __name((s, knownAcronyms = /* @__PURE
165
168
  }
166
169
  if (index + 1 < width) {
167
170
  const nextCode = s.codePointAt(index + 1);
168
- const nextIsLower = nextCode && nextCode < 128 && isLowerCode[nextCode];
171
+ const nextIsLower = nextCode && nextCode < 128 && isLower(nextCode);
169
172
  if (previousIsUpper && currentIsUpper && nextIsLower) {
170
173
  const candidate = s.slice(start, index + 1);
171
174
  if (!knownAcronyms.has(candidate)) {
@@ -198,10 +201,10 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
198
201
  let upperSequenceStart = previousIsUpper2 ? 0 : -1;
199
202
  for (let index = 1; index < width_2; index++) {
200
203
  const char = chars2[index];
201
- const isUpper = char === char.toLocaleUpperCase(locale);
202
- if (isUpper === previousIsUpper2) {
204
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
205
+ if (isUpperCaseChar === previousIsUpper2) {
203
206
  currentSegment2 += char;
204
- } else if (isUpper) {
207
+ } else if (isUpperCaseChar) {
205
208
  if (currentSegment2 && currentSegment2.length > 0) {
206
209
  result2.push(currentSegment2);
207
210
  currentSegment2 = char;
@@ -222,7 +225,7 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
222
225
  isInUpperSequence = false;
223
226
  upperSequenceStart = -1;
224
227
  }
225
- previousIsUpper2 = isUpper;
228
+ previousIsUpper2 = isUpperCaseChar;
226
229
  }
227
230
  if (currentSegment2 && currentSegment2.length > 0) {
228
231
  result2.push(currentSegment2);
@@ -242,15 +245,15 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
242
245
  for (let index = 1; index < width_2; index++) {
243
246
  const char = chars2[index];
244
247
  const currentType = RE_CYRILLIC.test(char) ? 1 : RE_LATIN.test(char) ? 2 : 0;
245
- const isUpper = char === char.toLocaleUpperCase(locale);
246
- if (previousType !== currentType && (previousType === 1 || previousType === 2) && (currentType === 1 || currentType === 2) || currentType === previousType && !previousIsUpper2 && isUpper) {
248
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
249
+ if (previousType !== currentType && (previousType === 1 || previousType === 2) && (currentType === 1 || currentType === 2) || currentType === previousType && !previousIsUpper2 && isUpperCaseChar) {
247
250
  result2.push(currentSegment2);
248
251
  currentSegment2 = char;
249
252
  } else {
250
253
  currentSegment2 += char;
251
254
  }
252
255
  previousType = currentType;
253
- previousIsUpper2 = isUpper;
256
+ previousIsUpper2 = isUpperCaseChar;
254
257
  }
255
258
  if (currentSegment2 && currentSegment2.length > 0) {
256
259
  result2.push(currentSegment2);
@@ -294,14 +297,14 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
294
297
  let previousIsUpper2 = part[0] === part[0].toLocaleUpperCase(locale);
295
298
  for (let index = 1; index < partLength; index++) {
296
299
  const char = part[index];
297
- const isUpper = char === char.toLocaleUpperCase(locale);
298
- if (!previousIsUpper2 && isUpper) {
300
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
301
+ if (!previousIsUpper2 && isUpperCaseChar) {
299
302
  result2.push(word);
300
303
  word = char;
301
304
  } else {
302
305
  word += char;
303
306
  }
304
- previousIsUpper2 = isUpper;
307
+ previousIsUpper2 = isUpperCaseChar;
305
308
  }
306
309
  if (word) {
307
310
  result2.push(word);
@@ -363,10 +366,10 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
363
366
  let previousIsUpper2 = chars2[0] === chars2[0].toLocaleUpperCase(locale);
364
367
  for (let index = 1; index < width_2; index++) {
365
368
  const char = chars2[index];
366
- const isUpper = char === char.toLocaleUpperCase(locale);
369
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
367
370
  const isSpecialChar = /[ČŠŽĐ]/i.test(char);
368
371
  const nextIsUpper = index < width_2 - 1 && chars2[index + 1] === chars2[index + 1].toLocaleUpperCase(locale);
369
- if (!previousIsUpper2 && isUpper || isSpecialChar && nextIsUpper) {
372
+ if (!previousIsUpper2 && isUpperCaseChar || isSpecialChar && nextIsUpper) {
370
373
  result2.push(currentSegment2);
371
374
  currentSegment2 = char;
372
375
  if (isSpecialChar && nextIsUpper) {
@@ -376,7 +379,7 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
376
379
  } else {
377
380
  currentSegment2 += char;
378
381
  }
379
- previousIsUpper2 = isUpper;
382
+ previousIsUpper2 = isUpperCaseChar;
380
383
  }
381
384
  if (currentSegment2 && currentSegment2.length > 0) {
382
385
  result2.push(currentSegment2);
@@ -496,18 +499,18 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
496
499
  let previousIsUpper2 = chars2[0] === chars2[0].toLocaleUpperCase(locale);
497
500
  for (let index = 1; index < width_2; index++) {
498
501
  const char = chars2[index];
499
- const isUpper = char === char.toLocaleUpperCase(locale);
502
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
500
503
  if (RE_UZBEK_LATIN_MODIFIER.test(char) || RE_UZBEK_LATIN_MODIFIER.test(chars2[index - 1])) {
501
504
  currentSegment2 += char;
502
505
  continue;
503
506
  }
504
- if (!previousIsUpper2 && isUpper) {
507
+ if (!previousIsUpper2 && isUpperCaseChar) {
505
508
  result2.push(currentSegment2);
506
509
  currentSegment2 = char;
507
510
  } else {
508
511
  currentSegment2 += char;
509
512
  }
510
- previousIsUpper2 = isUpper;
513
+ previousIsUpper2 = isUpperCaseChar;
511
514
  }
512
515
  if (currentSegment2 && currentSegment2.length > 0) {
513
516
  result2.push(currentSegment2);
@@ -529,7 +532,7 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
529
532
  }
530
533
  for (let index = 1; index < width_; index++) {
531
534
  const char = chars[index];
532
- const isUpper = char === char.toLocaleUpperCase(locale);
535
+ const isUpperCaseChar = char === char.toLocaleUpperCase(locale);
533
536
  let isAcronym = false;
534
537
  for (const acronym of knownAcronyms) {
535
538
  if (s.startsWith(acronym, index)) {
@@ -543,13 +546,13 @@ const splitCamelCaseLocale = /* @__PURE__ */ __name((s, locale, knownAcronyms) =
543
546
  if (isAcronym) {
544
547
  continue;
545
548
  }
546
- if (!previousIsUpper && isUpper) {
549
+ if (!previousIsUpper && isUpperCaseChar) {
547
550
  result.push(currentSegment);
548
551
  currentSegment = char;
549
552
  } else {
550
553
  currentSegment += char;
551
554
  }
552
- previousIsUpper = isUpper;
555
+ previousIsUpper = isUpperCaseChar;
553
556
  }
554
557
  if (currentSegment) {
555
558
  result.push(currentSegment);
@@ -4,7 +4,7 @@ const LRUCache = require('../packem_shared/LRUCache-Crb-m7cw.cjs');
4
4
  const case_splitByCase = require('./split-by-case.cjs');
5
5
  const case_upperFirst = require('./upper-first.cjs');
6
6
  const generateCacheKey = require('../packem_shared/generate-cache-key-D8f1auDB.cjs');
7
- const joinSegments = require('../packem_shared/joinSegments-CqLUoCzF.cjs');
7
+ const joinSegments = require('../packem_shared/joinSegments-B_7bxy5J.cjs');
8
8
 
9
9
  var __defProp = Object.defineProperty;
10
10
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -2,7 +2,7 @@ import LRUCache from '../packem_shared/LRUCache-udNErhWw.mjs';
2
2
  import { splitByCase } from './split-by-case.mjs';
3
3
  import upperFirst from './upper-first.mjs';
4
4
  import { g as generateCacheKey } from '../packem_shared/generate-cache-key-YSju5pj2.mjs';
5
- import joinSegments from '../packem_shared/joinSegments-B2-yNNIj.mjs';
5
+ import joinSegments from '../packem_shared/joinSegments-BovQ2h_P.mjs';
6
6
 
7
7
  var __defProp = Object.defineProperty;
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const constants = require('./packem_shared/constants-nihvIvk5.cjs');
5
+ const constants = require('./packem_shared/constants-CKuHriHc.cjs');
6
6
 
7
7
  var __defProp$2 = Object.defineProperty;
8
8
  var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
@@ -71,6 +71,9 @@ const getCharType = /* @__PURE__ */ __name((codePoint) => {
71
71
  if (codePoint >= 160 && codePoint <= 255) {
72
72
  return "latin";
73
73
  }
74
+ if (codePoint >= 9472 && codePoint <= 9599) {
75
+ return "latin";
76
+ }
74
77
  if (codePoint >= 4352 && codePoint <= 4607 || // Hangul Jamo
75
78
  codePoint >= 11904 && codePoint <= 40959 || // CJK & radicals
76
79
  codePoint >= 44032 && codePoint <= 55215 || // Hangul Syllables
@@ -182,6 +185,7 @@ const getStringTruncatedWidth = /* @__PURE__ */ __name((input, options = {}) =>
182
185
  }
183
186
  const config = {
184
187
  truncation: {
188
+ countAnsiEscapeCodes: options.countAnsiEscapeCodes ?? false,
185
189
  ellipsis: options.ellipsis ?? "",
186
190
  ellipsisWidth: options.ellipsisWidth ?? (options.ellipsis ? getStringTruncatedWidth(options.ellipsis, {
187
191
  ...options,
@@ -214,31 +218,58 @@ const getStringTruncatedWidth = /* @__PURE__ */ __name((input, options = {}) =>
214
218
  const hasAnsi = input.includes("\x1B") || input.includes("›");
215
219
  while (index < length) {
216
220
  if (hasAnsi && (input[index] === "\x1B" || input[index] === "›")) {
217
- constants.RE_ANSI.lastIndex = index;
218
- constants.RE_VALID_ANSI_PAIRS.lastIndex = index;
219
- constants.RE_VALID_HYPERLINKS.lastIndex = index;
220
- if (constants.RE_ANSI.test(input) && (constants.RE_VALID_ANSI_PAIRS.test(input) || constants.RE_VALID_HYPERLINKS.test(input))) {
221
- const ansiLength = constants.RE_ANSI.lastIndex - index;
222
- const ansiWidth = options.countAnsiEscapeCodes ? ansiLength : config.width.ansi;
223
- if (index + 3 < length && input.slice(index, index + 4) === "\x1B]8;") {
224
- const startPos = constants.RE_ANSI.lastIndex;
225
- constants.RE_ANSI_LINK_END.lastIndex = startPos;
226
- if (constants.RE_ANSI_LINK_END.test(input)) {
227
- const endPos = constants.RE_ANSI_LINK_END.lastIndex;
228
- const textContent = input.slice(startPos, endPos - 5);
229
- const textWidth = textContent.length;
230
- if (width + textWidth > truncationLimit) {
231
- truncationIndex = Math.min(truncationIndex, startPos);
221
+ if (input.startsWith("\x1B]8;;", index)) {
222
+ const BELL = "\x07";
223
+ const OSC8_CLOSER = "\x1B]8;;" + BELL;
224
+ const OSC8_CLOSER_LEN = OSC8_CLOSER.length;
225
+ const endOfParametersIndex = input.indexOf(BELL, index + 5);
226
+ if (endOfParametersIndex === -1) ; else {
227
+ const startOfCloserIndex = input.indexOf(OSC8_CLOSER, endOfParametersIndex + 1);
228
+ if (startOfCloserIndex === -1) ; else {
229
+ const endOfSequenceIndex = startOfCloserIndex + OSC8_CLOSER_LEN;
230
+ const linkText = input.slice(endOfParametersIndex + 1, startOfCloserIndex);
231
+ const strippedLinkText = linkText.replace(constants.RE_ANSI, "");
232
+ const linkTextWidthResult = getStringTruncatedWidth(strippedLinkText, {
233
+ ambiguousIsNarrow: config.width.ambiguousIsNarrow,
234
+ ambiguousWidth: config.width.ambiguous,
235
+ ansiWidth: config.width.ansi,
236
+ controlWidth: config.width.control,
237
+ countAnsiEscapeCodes: false,
238
+ // Never count ANSI in link text width
239
+ ellipsis: config.truncation.ellipsis,
240
+ ellipsisWidth: config.truncation.ellipsisWidth,
241
+ emojiWidth: config.width.emoji,
242
+ fullWidth: config.width.fullWidth,
243
+ halfWidth: config.width.halfWidth,
244
+ limit: Math.max(0, truncationLimit - width),
245
+ regularWidth: config.width.regular,
246
+ tabWidth: config.width.tab,
247
+ wideWidth: config.width.wide
248
+ });
249
+ const textWidth = linkTextWidthResult.width;
250
+ if (linkTextWidthResult.truncated) {
251
+ truncationEnabled = true;
252
+ truncationIndex = Math.min(truncationIndex, index);
253
+ } else if (width + textWidth > truncationLimit) {
254
+ truncationIndex = Math.min(truncationIndex, index);
255
+ truncationEnabled = true;
232
256
  if (width + textWidth > config.truncation.limit) {
233
- truncationEnabled = true;
234
257
  break;
235
258
  }
236
259
  }
237
260
  width += textWidth;
238
- index = endPos;
261
+ index = endOfSequenceIndex;
262
+ if (truncationEnabled && width >= config.truncation.limit) {
263
+ break;
264
+ }
239
265
  continue;
240
266
  }
241
267
  }
268
+ }
269
+ constants.RE_ANSI.lastIndex = index;
270
+ if (constants.RE_ANSI.test(input)) {
271
+ const ansiLength = constants.RE_ANSI.lastIndex - index;
272
+ const ansiWidth = config.truncation.countAnsiEscapeCodes ? ansiLength : config.width.ansi;
242
273
  if (width + ansiWidth > truncationLimit) {
243
274
  truncationIndex = Math.min(truncationIndex, index);
244
275
  if (width + ansiWidth > config.truncation.limit) {
@@ -374,11 +405,13 @@ const getStringTruncatedWidth = /* @__PURE__ */ __name((input, options = {}) =>
374
405
  index += codePoint > 65535 ? 2 : 1;
375
406
  }
376
407
  let finalWidth = width;
408
+ let ellipsed = false;
377
409
  if (truncationEnabled && config.truncation.limit >= config.truncation.ellipsisWidth) {
378
- finalWidth = Math.min(truncationLimit + config.truncation.ellipsisWidth, config.truncation.limit);
410
+ finalWidth = config.truncation.limit;
411
+ ellipsed = true;
379
412
  }
380
413
  return {
381
- ellipsed: truncationEnabled && config.truncation.limit >= config.truncation.ellipsisWidth,
414
+ ellipsed,
382
415
  index: truncationEnabled ? truncationIndex : length,
383
416
  truncated: truncationEnabled,
384
417
  width: finalWidth
@@ -1,4 +1,4 @@
1
- import { c as RE_ANSI, a as RE_VALID_ANSI_PAIRS, b as RE_VALID_HYPERLINKS, N as RE_ANSI_LINK_END, O as RE_CONTROL, j as RE_EMOJI } from './packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { c as RE_ANSI, N as RE_CONTROL, j as RE_EMOJI } from './packem_shared/constants-CsGLUb4U.mjs';
2
2
 
3
3
  var __defProp$2 = Object.defineProperty;
4
4
  var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
@@ -67,6 +67,9 @@ const getCharType = /* @__PURE__ */ __name((codePoint) => {
67
67
  if (codePoint >= 160 && codePoint <= 255) {
68
68
  return "latin";
69
69
  }
70
+ if (codePoint >= 9472 && codePoint <= 9599) {
71
+ return "latin";
72
+ }
70
73
  if (codePoint >= 4352 && codePoint <= 4607 || // Hangul Jamo
71
74
  codePoint >= 11904 && codePoint <= 40959 || // CJK & radicals
72
75
  codePoint >= 44032 && codePoint <= 55215 || // Hangul Syllables
@@ -178,6 +181,7 @@ const getStringTruncatedWidth = /* @__PURE__ */ __name((input, options = {}) =>
178
181
  }
179
182
  const config = {
180
183
  truncation: {
184
+ countAnsiEscapeCodes: options.countAnsiEscapeCodes ?? false,
181
185
  ellipsis: options.ellipsis ?? "",
182
186
  ellipsisWidth: options.ellipsisWidth ?? (options.ellipsis ? getStringTruncatedWidth(options.ellipsis, {
183
187
  ...options,
@@ -210,31 +214,58 @@ const getStringTruncatedWidth = /* @__PURE__ */ __name((input, options = {}) =>
210
214
  const hasAnsi = input.includes("\x1B") || input.includes("›");
211
215
  while (index < length) {
212
216
  if (hasAnsi && (input[index] === "\x1B" || input[index] === "›")) {
213
- RE_ANSI.lastIndex = index;
214
- RE_VALID_ANSI_PAIRS.lastIndex = index;
215
- RE_VALID_HYPERLINKS.lastIndex = index;
216
- if (RE_ANSI.test(input) && (RE_VALID_ANSI_PAIRS.test(input) || RE_VALID_HYPERLINKS.test(input))) {
217
- const ansiLength = RE_ANSI.lastIndex - index;
218
- const ansiWidth = options.countAnsiEscapeCodes ? ansiLength : config.width.ansi;
219
- if (index + 3 < length && input.slice(index, index + 4) === "\x1B]8;") {
220
- const startPos = RE_ANSI.lastIndex;
221
- RE_ANSI_LINK_END.lastIndex = startPos;
222
- if (RE_ANSI_LINK_END.test(input)) {
223
- const endPos = RE_ANSI_LINK_END.lastIndex;
224
- const textContent = input.slice(startPos, endPos - 5);
225
- const textWidth = textContent.length;
226
- if (width + textWidth > truncationLimit) {
227
- truncationIndex = Math.min(truncationIndex, startPos);
217
+ if (input.startsWith("\x1B]8;;", index)) {
218
+ const BELL = "\x07";
219
+ const OSC8_CLOSER = "\x1B]8;;" + BELL;
220
+ const OSC8_CLOSER_LEN = OSC8_CLOSER.length;
221
+ const endOfParametersIndex = input.indexOf(BELL, index + 5);
222
+ if (endOfParametersIndex === -1) ; else {
223
+ const startOfCloserIndex = input.indexOf(OSC8_CLOSER, endOfParametersIndex + 1);
224
+ if (startOfCloserIndex === -1) ; else {
225
+ const endOfSequenceIndex = startOfCloserIndex + OSC8_CLOSER_LEN;
226
+ const linkText = input.slice(endOfParametersIndex + 1, startOfCloserIndex);
227
+ const strippedLinkText = linkText.replace(RE_ANSI, "");
228
+ const linkTextWidthResult = getStringTruncatedWidth(strippedLinkText, {
229
+ ambiguousIsNarrow: config.width.ambiguousIsNarrow,
230
+ ambiguousWidth: config.width.ambiguous,
231
+ ansiWidth: config.width.ansi,
232
+ controlWidth: config.width.control,
233
+ countAnsiEscapeCodes: false,
234
+ // Never count ANSI in link text width
235
+ ellipsis: config.truncation.ellipsis,
236
+ ellipsisWidth: config.truncation.ellipsisWidth,
237
+ emojiWidth: config.width.emoji,
238
+ fullWidth: config.width.fullWidth,
239
+ halfWidth: config.width.halfWidth,
240
+ limit: Math.max(0, truncationLimit - width),
241
+ regularWidth: config.width.regular,
242
+ tabWidth: config.width.tab,
243
+ wideWidth: config.width.wide
244
+ });
245
+ const textWidth = linkTextWidthResult.width;
246
+ if (linkTextWidthResult.truncated) {
247
+ truncationEnabled = true;
248
+ truncationIndex = Math.min(truncationIndex, index);
249
+ } else if (width + textWidth > truncationLimit) {
250
+ truncationIndex = Math.min(truncationIndex, index);
251
+ truncationEnabled = true;
228
252
  if (width + textWidth > config.truncation.limit) {
229
- truncationEnabled = true;
230
253
  break;
231
254
  }
232
255
  }
233
256
  width += textWidth;
234
- index = endPos;
257
+ index = endOfSequenceIndex;
258
+ if (truncationEnabled && width >= config.truncation.limit) {
259
+ break;
260
+ }
235
261
  continue;
236
262
  }
237
263
  }
264
+ }
265
+ RE_ANSI.lastIndex = index;
266
+ if (RE_ANSI.test(input)) {
267
+ const ansiLength = RE_ANSI.lastIndex - index;
268
+ const ansiWidth = config.truncation.countAnsiEscapeCodes ? ansiLength : config.width.ansi;
238
269
  if (width + ansiWidth > truncationLimit) {
239
270
  truncationIndex = Math.min(truncationIndex, index);
240
271
  if (width + ansiWidth > config.truncation.limit) {
@@ -370,11 +401,13 @@ const getStringTruncatedWidth = /* @__PURE__ */ __name((input, options = {}) =>
370
401
  index += codePoint > 65535 ? 2 : 1;
371
402
  }
372
403
  let finalWidth = width;
404
+ let ellipsed = false;
373
405
  if (truncationEnabled && config.truncation.limit >= config.truncation.ellipsisWidth) {
374
- finalWidth = Math.min(truncationLimit + config.truncation.ellipsisWidth, config.truncation.limit);
406
+ finalWidth = config.truncation.limit;
407
+ ellipsed = true;
375
408
  }
376
409
  return {
377
- ellipsed: truncationEnabled && config.truncation.limit >= config.truncation.ellipsisWidth,
410
+ ellipsed,
378
411
  index: truncationEnabled ? truncationIndex : length,
379
412
  truncated: truncationEnabled,
380
413
  width: finalWidth
package/dist/index.cjs CHANGED
@@ -21,13 +21,13 @@ const case_splitByCase = require('./case/split-by-case.cjs');
21
21
  const case_titleCase = require('./case/title-case.cjs');
22
22
  const case_trainCase = require('./case/train-case.cjs');
23
23
  const case_upperFirst = require('./case/upper-first.cjs');
24
- const joinSegments = require('./packem_shared/joinSegments-CqLUoCzF.cjs');
24
+ const joinSegments = require('./packem_shared/joinSegments-B_7bxy5J.cjs');
25
25
  const getStringTruncatedWidth = require('./get-string-truncated-width.cjs');
26
26
  const getStringWidth = require('./get-string-width.cjs');
27
27
  const outdent = require('./outdent.cjs');
28
28
  const slice = require('./slice.cjs');
29
29
  const truncate = require('./truncate.cjs');
30
- const WrapMode = require('./packem_shared/WrapMode-DyodRTmi.cjs');
30
+ const WrapMode = require('./packem_shared/WrapMode-Dsqu9BaX.cjs');
31
31
 
32
32
 
33
33
 
package/dist/index.mjs CHANGED
@@ -17,10 +17,10 @@ export { splitByCase } from './case/split-by-case.mjs';
17
17
  export { default as titleCase } from './case/title-case.mjs';
18
18
  export { default as trainCase } from './case/train-case.mjs';
19
19
  export { default as upperFirst } from './case/upper-first.mjs';
20
- export { default as joinSegments } from './packem_shared/joinSegments-B2-yNNIj.mjs';
20
+ export { default as joinSegments } from './packem_shared/joinSegments-BovQ2h_P.mjs';
21
21
  export { getStringTruncatedWidth } from './get-string-truncated-width.mjs';
22
22
  export { getStringWidth } from './get-string-width.mjs';
23
23
  export { outdent } from './outdent.mjs';
24
24
  export { slice } from './slice.mjs';
25
25
  export { truncate } from './truncate.mjs';
26
- export { WrapMode, wordWrap } from './packem_shared/WrapMode-D4OAY7qi.mjs';
26
+ export { WrapMode, wordWrap } from './packem_shared/WrapMode-B-WBY1mj.mjs';
package/dist/outdent.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const constants = require('./packem_shared/constants-nihvIvk5.cjs');
5
+ const constants = require('./packem_shared/constants-CKuHriHc.cjs');
6
6
 
7
7
  var __defProp = Object.defineProperty;
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -114,6 +114,9 @@ const createInstance = /* @__PURE__ */ __name((options) => {
114
114
  });
115
115
  }, "createInstance");
116
116
  const defaultOutdent = createInstance({
117
+ cache: true,
118
+ // Enable caching by default
119
+ newline: null,
117
120
  trimLeadingNewline: true,
118
121
  trimTrailingNewline: true
119
122
  });
package/dist/outdent.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { d as RE_ONLY_WHITESPACE_WITH_AT_LEAST_ONE_NEWLINE, e as RE_STARTS_WITH_NEWLINE_OR_IS_EMPTY, f as RE_LEADING_NEWLINE, g as RE_TRAILING_NEWLINE, h as RE_MATCH_NEWLINES, i as RE_DETECT_INDENTATION } from './packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { d as RE_ONLY_WHITESPACE_WITH_AT_LEAST_ONE_NEWLINE, e as RE_STARTS_WITH_NEWLINE_OR_IS_EMPTY, f as RE_LEADING_NEWLINE, g as RE_TRAILING_NEWLINE, h as RE_MATCH_NEWLINES, i as RE_DETECT_INDENTATION } from './packem_shared/constants-CsGLUb4U.mjs';
2
2
 
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -110,6 +110,9 @@ const createInstance = /* @__PURE__ */ __name((options) => {
110
110
  });
111
111
  }, "createInstance");
112
112
  const defaultOutdent = createInstance({
113
+ cache: true,
114
+ // Enable caching by default
115
+ newline: null,
113
116
  trimLeadingNewline: true,
114
117
  trimTrailingNewline: true
115
118
  });
@@ -1,4 +1,4 @@
1
- import { P as ESCAPES, Q as ANSI_ESCAPE_LINK, S as ANSI_SGR_TERMINATOR, T as ANSI_ESCAPE_BELL, U as ANSI_CSI, V as RE_ESCAPE_PATTERN, W as ANSI_RESET_CODES, X as END_CODE, Y as RE_ZERO_WIDTH } from './constants-CKNmLDBQ.mjs';
1
+ import { O as ESCAPES, P as ANSI_ESCAPE_LINK, Q as ANSI_SGR_TERMINATOR, S as ANSI_ESCAPE_BELL, T as ANSI_CSI, U as RE_ESCAPE_PATTERN, V as ANSI_RESET_CODES, W as END_CODE, X as RE_ZERO_WIDTH } from './constants-CsGLUb4U.mjs';
2
2
  import { getStringWidth } from '../get-string-width.mjs';
3
3
 
4
4
  var __defProp$5 = Object.defineProperty;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const constants = require('./constants-nihvIvk5.cjs');
5
+ const constants = require('./constants-CKuHriHc.cjs');
6
6
  const getStringWidth = require('../get-string-width.cjs');
7
7
 
8
8
  var __defProp$5 = Object.defineProperty;
@@ -65,8 +65,7 @@ const RE_ONLY_WHITESPACE_WITH_AT_LEAST_ONE_NEWLINE = /^[ \t]*[\r\n][ \t\r\n]*$/;
65
65
  const RE_MATCH_NEWLINES = /\r\n|\n|\r/g;
66
66
  const RE_ANSI = /[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g;
67
67
  const RE_VALID_ANSI_PAIRS = /\u001B\[(\d+(?:;\d+)*)?m[^\u001B]*(?:\u001B\[(?:\d+(?:;\d+)*)?m|$)/g;
68
- const RE_VALID_HYPERLINKS = /\u001B\]8;;[^\u0007]*\u0007[^\u001B]*(?:\u001B\]8;;\u0007|$)/g;
69
- const RE_ANSI_LINK_END = /\u001B\]8;;\u0007/y;
68
+ const RE_VALID_HYPERLINKS = /\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)(.*?)\u001B\]8;;(?:\u0007|\u001B\\)/g;
70
69
  const RE_CONTROL = /[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y;
71
70
  const RE_EMOJI = emojiRegex();
72
71
  const RE_SEPARATORS = /[-_./\s]+/g;
@@ -108,7 +107,6 @@ exports.ANSI_SGR_TERMINATOR = ANSI_SGR_TERMINATOR;
108
107
  exports.END_CODE = END_CODE;
109
108
  exports.ESCAPES = ESCAPES;
110
109
  exports.RE_ANSI = RE_ANSI;
111
- exports.RE_ANSI_LINK_END = RE_ANSI_LINK_END;
112
110
  exports.RE_ARABIC = RE_ARABIC;
113
111
  exports.RE_BENGALI = RE_BENGALI;
114
112
  exports.RE_CONTROL = RE_CONTROL;
@@ -63,8 +63,7 @@ const RE_ONLY_WHITESPACE_WITH_AT_LEAST_ONE_NEWLINE = /^[ \t]*[\r\n][ \t\r\n]*$/;
63
63
  const RE_MATCH_NEWLINES = /\r\n|\n|\r/g;
64
64
  const RE_ANSI = /[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g;
65
65
  const RE_VALID_ANSI_PAIRS = /\u001B\[(\d+(?:;\d+)*)?m[^\u001B]*(?:\u001B\[(?:\d+(?:;\d+)*)?m|$)/g;
66
- const RE_VALID_HYPERLINKS = /\u001B\]8;;[^\u0007]*\u0007[^\u001B]*(?:\u001B\]8;;\u0007|$)/g;
67
- const RE_ANSI_LINK_END = /\u001B\]8;;\u0007/y;
66
+ const RE_VALID_HYPERLINKS = /\u001B\]8;[^\u0007\u001B]*(?:\u0007|\u001B\\)(.*?)\u001B\]8;;(?:\u0007|\u001B\\)/g;
68
67
  const RE_CONTROL = /[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y;
69
68
  const RE_EMOJI = emojiRegex();
70
69
  const RE_SEPARATORS = /[-_./\s]+/g;
@@ -98,4 +97,4 @@ const RE_TIBETAN = new RegExp("\\p{Script=Tibetan}", "u");
98
97
  const RE_UZBEK_LATIN_MODIFIER = /[\u02BB\u02BC\u0027]/u;
99
98
  const stripEmoji = /* @__PURE__ */ __name((stringValue) => stringValue.replace(RE_EMOJI, ""), "stripEmoji");
100
99
 
101
- export { RE_GURMUKHI as A, RE_KANNADA as B, RE_TAMIL as C, RE_TELUGU as D, RE_MALAYALAM as E, RE_SINHALA as F, RE_THAI as G, RE_LAO as H, RE_TIBETAN as I, RE_MYANMAR as J, RE_ETHIOPIC as K, RE_KHMER as L, RE_ORIYA as M, RE_ANSI_LINK_END as N, RE_CONTROL as O, ESCAPES as P, ANSI_ESCAPE_LINK as Q, RE_FAST_ANSI as R, ANSI_SGR_TERMINATOR as S, ANSI_ESCAPE_BELL as T, ANSI_CSI as U, RE_ESCAPE_PATTERN as V, ANSI_RESET_CODES as W, END_CODE as X, RE_ZERO_WIDTH as Y, RE_VALID_ANSI_PAIRS as a, RE_VALID_HYPERLINKS as b, RE_ANSI as c, RE_ONLY_WHITESPACE_WITH_AT_LEAST_ONE_NEWLINE as d, RE_STARTS_WITH_NEWLINE_OR_IS_EMPTY as e, RE_LEADING_NEWLINE as f, RE_TRAILING_NEWLINE as g, RE_MATCH_NEWLINES as h, RE_DETECT_INDENTATION as i, RE_EMOJI as j, RE_SEPARATORS as k, RE_CYRILLIC as l, RE_LATIN as m, RE_GREEK as n, RE_GREEK_LATIN_SPLIT as o, RE_KANJI as p, RE_HEBREW as q, RE_ARABIC as r, stripEmoji as s, RE_HANGUL as t, RE_UZBEK_LATIN_MODIFIER as u, RE_KATAKANA as v, RE_HIRAGANA as w, RE_DEVANAGARI as x, RE_BENGALI as y, RE_GUJARATI as z };
100
+ export { RE_GURMUKHI as A, RE_KANNADA as B, RE_TAMIL as C, RE_TELUGU as D, RE_MALAYALAM as E, RE_SINHALA as F, RE_THAI as G, RE_LAO as H, RE_TIBETAN as I, RE_MYANMAR as J, RE_ETHIOPIC as K, RE_KHMER as L, RE_ORIYA as M, RE_CONTROL as N, ESCAPES as O, ANSI_ESCAPE_LINK as P, ANSI_SGR_TERMINATOR as Q, RE_FAST_ANSI as R, ANSI_ESCAPE_BELL as S, ANSI_CSI as T, RE_ESCAPE_PATTERN as U, ANSI_RESET_CODES as V, END_CODE as W, RE_ZERO_WIDTH as X, RE_VALID_ANSI_PAIRS as a, RE_VALID_HYPERLINKS as b, RE_ANSI as c, RE_ONLY_WHITESPACE_WITH_AT_LEAST_ONE_NEWLINE as d, RE_STARTS_WITH_NEWLINE_OR_IS_EMPTY as e, RE_LEADING_NEWLINE as f, RE_TRAILING_NEWLINE as g, RE_MATCH_NEWLINES as h, RE_DETECT_INDENTATION as i, RE_EMOJI as j, RE_SEPARATORS as k, RE_CYRILLIC as l, RE_LATIN as m, RE_GREEK as n, RE_GREEK_LATIN_SPLIT as o, RE_KANJI as p, RE_HEBREW as q, RE_ARABIC as r, stripEmoji as s, RE_HANGUL as t, RE_UZBEK_LATIN_MODIFIER as u, RE_KATAKANA as v, RE_HIRAGANA as w, RE_DEVANAGARI as x, RE_BENGALI as y, RE_GUJARATI as z };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const constants = require('./constants-nihvIvk5.cjs');
3
+ const constants = require('./constants-CKuHriHc.cjs');
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,4 +1,4 @@
1
- import { R as RE_FAST_ANSI } from './constants-CKNmLDBQ.mjs';
1
+ import { R as RE_FAST_ANSI } from './constants-CsGLUb4U.mjs';
2
2
 
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
package/dist/slice.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const constants = require('./packem_shared/constants-nihvIvk5.cjs');
5
+ const constants = require('./packem_shared/constants-CKuHriHc.cjs');
6
6
  const getStringWidth = require('./get-string-width.cjs');
7
7
  const LRUCache = require('./packem_shared/LRUCache-Crb-m7cw.cjs');
8
8
 
package/dist/slice.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as RE_VALID_ANSI_PAIRS, b as RE_VALID_HYPERLINKS, c as RE_ANSI } from './packem_shared/constants-CKNmLDBQ.mjs';
1
+ import { a as RE_VALID_ANSI_PAIRS, b as RE_VALID_HYPERLINKS, c as RE_ANSI } from './packem_shared/constants-CsGLUb4U.mjs';
2
2
  import { getStringWidth } from './get-string-width.mjs';
3
3
  import LRUCache from './packem_shared/LRUCache-udNErhWw.mjs';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/string",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Functions for manipulating strings.",
5
5
  "keywords": [
6
6
  "visulima",