@visulima/string 3.0.0-alpha.13 → 3.0.0-alpha.14

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 +21 -0
  2. package/dist/case/camel-case.d.ts +2 -2
  3. package/dist/case/capital-case.d.ts +2 -2
  4. package/dist/case/constant-case.d.ts +2 -2
  5. package/dist/case/dot-case.d.ts +2 -2
  6. package/dist/case/flat-case.d.ts +2 -2
  7. package/dist/case/flip-case.d.ts +2 -2
  8. package/dist/case/identify-case.d.ts +2 -2
  9. package/dist/case/index.d.ts +2 -2
  10. package/dist/case/kebab-case.d.ts +2 -2
  11. package/dist/case/lower-first.d.ts +2 -2
  12. package/dist/case/no-case.d.ts +2 -2
  13. package/dist/case/pascal-case.d.ts +2 -2
  14. package/dist/case/pascal-snake-case.d.ts +2 -2
  15. package/dist/case/path-case.d.ts +2 -2
  16. package/dist/case/sentence-case.d.ts +2 -2
  17. package/dist/case/snake-case.d.ts +2 -2
  18. package/dist/case/split-by-case.d.ts +2 -2
  19. package/dist/case/title-case.d.ts +2 -2
  20. package/dist/case/train-case.d.ts +2 -2
  21. package/dist/case/upper-first.d.ts +2 -2
  22. package/dist/compare-similarity.d.ts +1 -1
  23. package/dist/get-string-truncated-width.js +1 -1
  24. package/dist/index.d.ts +3 -3
  25. package/dist/index.js +1 -1
  26. package/dist/packem_shared/{eastAsianWidthType-lcBsj7vg.js → eastAsianWidthType-GZeXsSGs.js} +1 -1
  27. package/dist/packem_shared/{isFullwidthCodePoint-Dmsf2-5L.js → isFullwidthCodePoint-DJd4PBMe.js} +1 -1
  28. package/dist/packem_shared/lookup-CNDd-Nq4.js +1 -0
  29. package/dist/packem_shared/{types.d-FOLSY2Tc.d.ts → types.d-BaFAOLxg.d.ts} +1 -1
  30. package/dist/packem_shared/{types.d-NJ4vcG-A.d.ts → types.d-CEMfJjRV.d.ts} +1 -1
  31. package/dist/slugify.d.ts +1 -1
  32. package/dist/utilities.d.ts +1 -1
  33. package/package.json +16 -18
  34. package/dist/packem_shared/lookup-ChWuUpyb.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## @visulima/string [3.0.0-alpha.14](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.13...@visulima/string@3.0.0-alpha.14) (2026-05-27)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
6
+
7
+ ### Miscellaneous Chores
8
+
9
+ * **ci-stability:** green CI across vis, native, lint, tests, attw ([#651](https://github.com/visulima/visulima/issues/651)) ([d4eb684](https://github.com/visulima/visulima/commit/d4eb684b5f75c818c9251048c605a0ed54a268e3))
10
+ * sorted package.json ([b47c545](https://github.com/visulima/visulima/commit/b47c545591600fdab17d5cd3a3fbc68b61e199da))
11
+ * **string:** apply prettier and eslint formatting sweep ([b449ce2](https://github.com/visulima/visulima/commit/b449ce291ddf2dbe56dfd104319b1515957d6422))
12
+
13
+ ### Tests
14
+
15
+ * **repo:** add dist runtime + types integration tests ([32ee300](https://github.com/visulima/visulima/commit/32ee300b7184117a0ddf9f9d390f75f8932d5ed9))
16
+
17
+
18
+ ### Dependencies
19
+
20
+ * **@visulima/colorize:** upgraded to 2.0.0-alpha.12
21
+
1
22
  ## @visulima/string [3.0.0-alpha.13](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.12...@visulima/string@3.0.0-alpha.13) (2026-05-10)
2
23
 
3
24
  ### Bug Fixes
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, a as CamelCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, a as CamelCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to camelCase.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, b as CapitalCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, b as CapitalCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to Capital Case.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, c as ConstantCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, c as ConstantCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to CONSTANT_CASE.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, D as DotCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, D as DotCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to dot.case.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, F as FlatCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, F as FlatCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to flat case (all lowercase, no separators).
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, d as FlipCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, d as FlipCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Options specific to flip case operations.
@@ -1,5 +1,5 @@
1
- import { I as IdentifyCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { I as IdentifyCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Identifies the case style of a string.
@@ -1,4 +1,4 @@
1
- export { type N as NodeLocale } from "../packem_shared/types.d-NJ4vcG-A.js";
1
+ export { type N as NodeLocale } from "../packem_shared/types.d-CEMfJjRV.js";
2
2
  export { default as camelCase } from "./camel-case.js";
3
3
  export { default as capitalCase } from "./capital-case.js";
4
4
  export { default as constantCase } from "./constant-case.js";
@@ -17,7 +17,7 @@ export { default as snakeCase } from "./snake-case.js";
17
17
  export { type SplitOptions, splitByCase } from "./split-by-case.js";
18
18
  export { default as titleCase } from "./title-case.js";
19
19
  export { default as trainCase } from "./train-case.js";
20
- export { type a as CamelCase, type b as CapitalCase, type C as CaseOptions, type c as ConstantCase, type D as DotCase, type F as FlatCase, type d as FlipCase, type I as IdentifyCase, type K as KebabCase, type L as LocaleOptions, type e as LowerFirst, type N as NoCase, type P as PascalCase, type f as PascalSnakeCase, type g as PathCase, type S as SentenceCase, type h as SnakeCase, type i as SplitByCase, type T as TitleCase, type j as TrainCase, type U as UpperFirst } from "../packem_shared/types.d-FOLSY2Tc.js";
20
+ export { type a as CamelCase, type b as CapitalCase, type C as CaseOptions, type c as ConstantCase, type D as DotCase, type F as FlatCase, type d as FlipCase, type I as IdentifyCase, type K as KebabCase, type L as LocaleOptions, type e as LowerFirst, type N as NoCase, type P as PascalCase, type f as PascalSnakeCase, type g as PathCase, type S as SentenceCase, type h as SnakeCase, type i as SplitByCase, type T as TitleCase, type j as TrainCase, type U as UpperFirst } from "../packem_shared/types.d-BaFAOLxg.js";
21
21
  export { default as upperFirst } from "./upper-first.js";
22
22
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
23
23
  /**
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, K as KebabCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, K as KebabCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  interface KebabCaseOptions extends CaseOptions {
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { L as LocaleOptions, e as LowerFirst } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { L as LocaleOptions, e as LowerFirst } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts first character to lower case.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, N as NoCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, N as NoCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to no case (space separated words).
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, P as PascalCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, P as PascalCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to PascalCase.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, f as PascalSnakeCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, f as PascalSnakeCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to Pascal_Snake_Case.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, g as PathCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, g as PathCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to path/case.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, S as SentenceCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, S as SentenceCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to Sentence case.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, h as SnakeCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, h as SnakeCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to snake_case.
@@ -1,5 +1,5 @@
1
- import { L as LocaleOptions, i as SplitByCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { L as LocaleOptions, i as SplitByCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /** Options for the `splitByCase` function. */
5
5
  interface SplitOptions extends LocaleOptions {
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, T as TitleCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, T as TitleCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * With Title Case all words are capitalized, except for minor words.
@@ -1,5 +1,5 @@
1
- import { C as CaseOptions, j as TrainCase } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { C as CaseOptions, j as TrainCase } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts a string to Train-Case.
@@ -1,5 +1,5 @@
1
- import { L as LocaleOptions, U as UpperFirst } from "../packem_shared/types.d-FOLSY2Tc.js";
2
- import "../packem_shared/types.d-NJ4vcG-A.js";
1
+ import { L as LocaleOptions, U as UpperFirst } from "../packem_shared/types.d-BaFAOLxg.js";
2
+ import "../packem_shared/types.d-CEMfJjRV.js";
3
3
  import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
4
4
  /**
5
5
  * Converts first character to upper case.
@@ -39,5 +39,5 @@ interface CompareSimilarityOptions {
39
39
  * assert.deepStrictEqual(sortedWords, ["help", "hi", "hello"]);
40
40
  * ```
41
41
  */
42
- declare const compareSimilarity: (givenWord: string, options?: CompareSimilarityOptions) => ((a: string, b: string) => number);
42
+ declare const compareSimilarity: (givenWord: string, options?: CompareSimilarityOptions) => (a: string, b: string) => number;
43
43
  export { CompareSimilarityOptions, compareSimilarity };
@@ -1 +1 @@
1
- var y=Object.defineProperty;var A=(i,t)=>y(i,"name",{value:t,configurable:!0});import{eastAsianWidthType as O}from"./packem_shared/eastAsianWidthType-lcBsj7vg.js";import{g as m,h as b,i as M}from"./packem_shared/constants-DmzZF6_u.js";var B=Object.defineProperty,I=A((i,t)=>B(i,"name",{value:t,configurable:!0}),"d");const T=new Map,g=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,W=I(i=>i>=32&&i<=126?"latin":i===8203||i===8204||i===8205||i===8288?"zero":i<=31||i>=127&&i<=159?"control":i>=160&&i<=255||i>=9472&&i<=9599?"latin":i>=4352&&i<=4607||i>=11904&&i<=40959||i>=44032&&i<=55215||i>=63744&&i<=64255||i>=65280&&i<=65519&&!(i>=65377&&i<=65439)||i>=12352&&i<=12543?"wide":i===8230?"latin":"other","getCharType"),P=I((i,t)=>{const e=Math.floor(i/65536),r=i%65536;let h=T.get(e);if(h||(h=new Map,T.set(e,h)),h.has(r))return h.get(r);let u;if(W(i)==="latin")u=t.width.regular;else if(W(i)==="control")u=t.width.control;else if(W(i)==="wide")u=t.width.wide;else switch(O(i)){case"ambiguous":{u=t.width.ambiguousIsNarrow?t.width.regular:t.width.wide;break}case"fullwidth":{u=t.width.fullWidth;break}case"wide":{u=t.width.wide;break}default:u=t.width.regular}return h.set(r,u),u},"getCachedCharWidth"),R=I(i=>i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071||i>=917760&&i<=917999||i>=65024&&i<=65039||i>=3633&&i<=3642||i>=3655&&i<=3662||i>=3761&&i<=3769||i>=3771&&i<=3772||i>=3784&&i<=3789||i>=2304&&i<=2307||i>=2362&&i<=2383||i>=2385&&i<=2391||i>=2402&&i<=2403||i>=2433&&i<=2435||i>=2492&&i<=2500||i>=2509&&i<=2509||i>=2561&&i<=2563||i>=2620&&i<=2637||i>=1611&&i<=1631||i>=1648&&i<=1648||i>=1750&&i<=1773||i>=2276&&i<=2302||i>=1425&&i<=1469||i>=1471&&i<=1471||i>=1473&&i<=1474||i>=1476&&i<=1477||i>=1479&&i<=1479||i>=3893&&i<=3893||i>=3895&&i<=3895||i>=3897&&i<=3897||i>=3953&&i<=3966||i>=3968&&i<=3972||i>=3974&&i<=3975?!0:i>=768&&i<=777||i>=803&&i<=803,"isCombiningCharacter"),j=I((i,t={})=>{if(!i||i.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const e={truncation:{countAnsiEscapeCodes:t.countAnsiEscapeCodes??!1,ellipsis:t.ellipsis??"",ellipsisWidth:t.ellipsisWidth??(t.ellipsis?j(t.ellipsis,{...t,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:t.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:t.ambiguousIsNarrow??!1,ansi:t.ansiWidth??0,control:t.controlWidth??0,emoji:t.emojiWidth??2,fullWidth:t.fullWidth??2,halfWidth:t.halfWidth??1,regular:t.regularWidth??1,tab:t.tabWidth??8,wide:t.wideWidth??2}},r=Math.max(0,e.truncation.limit-e.truncation.ellipsisWidth),{length:h}=i,u=h>1e4;let a=0,n=0,l=h,s=!1;const F=i.includes("\x1B")||i.includes("›");for(;a<h;){if(F&&(i[a]==="\x1B"||i[a]==="›")){if(i.startsWith("\x1B]8;;",a)){const o="\x1B]8;;\x07",w=o.length,p=i.indexOf("\x07",a+5);if(p!==-1){const x=i.indexOf(o,p+1);if(x!==-1){const S=x+w,_=i.slice(p+1,x).replace(m,""),C=j(_,{ambiguousIsNarrow:e.width.ambiguousIsNarrow,ansiWidth:e.width.ansi,controlWidth:e.width.control,countAnsiEscapeCodes:!1,ellipsis:e.truncation.ellipsis,ellipsisWidth:e.truncation.ellipsisWidth,emojiWidth:e.width.emoji,fullWidth:e.width.fullWidth,halfWidth:e.width.halfWidth,limit:Math.max(0,r-n),regularWidth:e.width.regular,tabWidth:e.width.tab,wideWidth:e.width.wide}),k=C.width;if(C.truncated)s=!0,l=Math.min(l,a);else if(n+k>r&&(l=Math.min(l,a),s=!0,n+k>e.truncation.limit))break;if(n+=k,a=S,s&&n>=e.truncation.limit)break;continue}}}if(m.lastIndex=a,m.test(i)){const o=m.lastIndex-a,w=e.truncation.countAnsiEscapeCodes?o:e.width.ansi;if(n+w>r&&(l=Math.min(l,a),n+w>e.truncation.limit)){s=!0;break}n+=w,a=m.lastIndex;continue}}const c=i.codePointAt(a);if(c===8203||c===65279||c>=8288&&c<=8292){a+=1;continue}if(c===9){if(n+e.width.tab>r&&(l=Math.min(l,a),n+e.width.tab>e.truncation.limit)){s=!0;break}n+=e.width.tab,a+=1;continue}if(g.lastIndex=a,g.test(i)){const o=(g.lastIndex-a)*e.width.regular;if(n+o>r){const w=Math.floor((r-n)/e.width.regular);if(l=Math.min(l,a+w),n+o>e.truncation.limit){s=!0;break}}n+=o,a=g.lastIndex;continue}if((c<=31||c>=127&&c<=159)&&(b.lastIndex=a,b.test(i))){const o=(b.lastIndex-a)*e.width.control;if(n+o>r&&(l=Math.min(l,a+Math.floor((r-n)/e.width.control)),n+o>e.truncation.limit)){s=!0;break}n+=o,a=b.lastIndex;continue}if(M.lastIndex=a,M.test(i)){if(n+e.width.emoji>r&&(l=Math.min(l,a),n+e.width.emoji>e.truncation.limit)){s=!0;break}n+=e.width.emoji,a=M.lastIndex;continue}const f=i.codePointAt(a)??0;if(R(f)){a+=f>65535?2:1;continue}let d;if(u)d=P(f,e);else switch(W(f)){case"control":{d=e.width.control;break}case"latin":{d=e.width.regular;break}case"wide":{d=e.width.wide;break}case"zero":{d=0;break}default:switch(O(f)){case"ambiguous":{d=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{d=e.width.fullWidth;break}case"wide":{d=e.width.wide;break}default:d=e.width.regular}}if(n+d>r&&(l=Math.min(l,a),n+d>e.truncation.limit)){s=!0;break}n+=d,a+=f>65535?2:1}let N=n,E=!1;return s&&e.truncation.limit>=e.truncation.ellipsisWidth&&(N=e.truncation.limit,E=!0),{ellipsed:E,index:s?l:h,truncated:s,width:N}},"getStringTruncatedWidth");export{j as getStringTruncatedWidth};
1
+ var y=Object.defineProperty;var A=(i,t)=>y(i,"name",{value:t,configurable:!0});import{eastAsianWidthType as O}from"./packem_shared/eastAsianWidthType-GZeXsSGs.js";import{g as m,h as b,i as M}from"./packem_shared/constants-DmzZF6_u.js";var B=Object.defineProperty,I=A((i,t)=>B(i,"name",{value:t,configurable:!0}),"d");const T=new Map,g=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,W=I(i=>i>=32&&i<=126?"latin":i===8203||i===8204||i===8205||i===8288?"zero":i<=31||i>=127&&i<=159?"control":i>=160&&i<=255||i>=9472&&i<=9599?"latin":i>=4352&&i<=4607||i>=11904&&i<=40959||i>=44032&&i<=55215||i>=63744&&i<=64255||i>=65280&&i<=65519&&!(i>=65377&&i<=65439)||i>=12352&&i<=12543?"wide":i===8230?"latin":"other","getCharType"),P=I((i,t)=>{const e=Math.floor(i/65536),r=i%65536;let h=T.get(e);if(h||(h=new Map,T.set(e,h)),h.has(r))return h.get(r);let u;if(W(i)==="latin")u=t.width.regular;else if(W(i)==="control")u=t.width.control;else if(W(i)==="wide")u=t.width.wide;else switch(O(i)){case"ambiguous":{u=t.width.ambiguousIsNarrow?t.width.regular:t.width.wide;break}case"fullwidth":{u=t.width.fullWidth;break}case"wide":{u=t.width.wide;break}default:u=t.width.regular}return h.set(r,u),u},"getCachedCharWidth"),R=I(i=>i>=768&&i<=879||i>=6832&&i<=6911||i>=7616&&i<=7679||i>=8400&&i<=8447||i>=65056&&i<=65071||i>=917760&&i<=917999||i>=65024&&i<=65039||i>=3633&&i<=3642||i>=3655&&i<=3662||i>=3761&&i<=3769||i>=3771&&i<=3772||i>=3784&&i<=3789||i>=2304&&i<=2307||i>=2362&&i<=2383||i>=2385&&i<=2391||i>=2402&&i<=2403||i>=2433&&i<=2435||i>=2492&&i<=2500||i>=2509&&i<=2509||i>=2561&&i<=2563||i>=2620&&i<=2637||i>=1611&&i<=1631||i>=1648&&i<=1648||i>=1750&&i<=1773||i>=2276&&i<=2302||i>=1425&&i<=1469||i>=1471&&i<=1471||i>=1473&&i<=1474||i>=1476&&i<=1477||i>=1479&&i<=1479||i>=3893&&i<=3893||i>=3895&&i<=3895||i>=3897&&i<=3897||i>=3953&&i<=3966||i>=3968&&i<=3972||i>=3974&&i<=3975?!0:i>=768&&i<=777||i>=803&&i<=803,"isCombiningCharacter"),j=I((i,t={})=>{if(!i||i.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const e={truncation:{countAnsiEscapeCodes:t.countAnsiEscapeCodes??!1,ellipsis:t.ellipsis??"",ellipsisWidth:t.ellipsisWidth??(t.ellipsis?j(t.ellipsis,{...t,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:t.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:t.ambiguousIsNarrow??!1,ansi:t.ansiWidth??0,control:t.controlWidth??0,emoji:t.emojiWidth??2,fullWidth:t.fullWidth??2,halfWidth:t.halfWidth??1,regular:t.regularWidth??1,tab:t.tabWidth??8,wide:t.wideWidth??2}},r=Math.max(0,e.truncation.limit-e.truncation.ellipsisWidth),{length:h}=i,u=h>1e4;let a=0,n=0,l=h,s=!1;const F=i.includes("\x1B")||i.includes("›");for(;a<h;){if(F&&(i[a]==="\x1B"||i[a]==="›")){if(i.startsWith("\x1B]8;;",a)){const o="\x1B]8;;\x07",w=o.length,p=i.indexOf("\x07",a+5);if(p!==-1){const x=i.indexOf(o,p+1);if(x!==-1){const S=x+w,_=i.slice(p+1,x).replace(m,""),C=j(_,{ambiguousIsNarrow:e.width.ambiguousIsNarrow,ansiWidth:e.width.ansi,controlWidth:e.width.control,countAnsiEscapeCodes:!1,ellipsis:e.truncation.ellipsis,ellipsisWidth:e.truncation.ellipsisWidth,emojiWidth:e.width.emoji,fullWidth:e.width.fullWidth,halfWidth:e.width.halfWidth,limit:Math.max(0,r-n),regularWidth:e.width.regular,tabWidth:e.width.tab,wideWidth:e.width.wide}),k=C.width;if(C.truncated)s=!0,l=Math.min(l,a);else if(n+k>r&&(l=Math.min(l,a),s=!0,n+k>e.truncation.limit))break;if(n+=k,a=S,s&&n>=e.truncation.limit)break;continue}}}if(m.lastIndex=a,m.test(i)){const o=m.lastIndex-a,w=e.truncation.countAnsiEscapeCodes?o:e.width.ansi;if(n+w>r&&(l=Math.min(l,a),n+w>e.truncation.limit)){s=!0;break}n+=w,a=m.lastIndex;continue}}const c=i.codePointAt(a);if(c===8203||c===65279||c>=8288&&c<=8292){a+=1;continue}if(c===9){if(n+e.width.tab>r&&(l=Math.min(l,a),n+e.width.tab>e.truncation.limit)){s=!0;break}n+=e.width.tab,a+=1;continue}if(g.lastIndex=a,g.test(i)){const o=(g.lastIndex-a)*e.width.regular;if(n+o>r){const w=Math.floor((r-n)/e.width.regular);if(l=Math.min(l,a+w),n+o>e.truncation.limit){s=!0;break}}n+=o,a=g.lastIndex;continue}if((c<=31||c>=127&&c<=159)&&(b.lastIndex=a,b.test(i))){const o=(b.lastIndex-a)*e.width.control;if(n+o>r&&(l=Math.min(l,a+Math.floor((r-n)/e.width.control)),n+o>e.truncation.limit)){s=!0;break}n+=o,a=b.lastIndex;continue}if(M.lastIndex=a,M.test(i)){if(n+e.width.emoji>r&&(l=Math.min(l,a),n+e.width.emoji>e.truncation.limit)){s=!0;break}n+=e.width.emoji,a=M.lastIndex;continue}const f=i.codePointAt(a)??0;if(R(f)){a+=f>65535?2:1;continue}let d;if(u)d=P(f,e);else switch(W(f)){case"control":{d=e.width.control;break}case"latin":{d=e.width.regular;break}case"wide":{d=e.width.wide;break}case"zero":{d=0;break}default:switch(O(f)){case"ambiguous":{d=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{d=e.width.fullWidth;break}case"wide":{d=e.width.wide;break}default:d=e.width.regular}}if(n+d>r&&(l=Math.min(l,a),n+d>e.truncation.limit)){s=!0;break}n+=d,a+=f>65535?2:1}let N=n,E=!1;return s&&e.truncation.limit>=e.truncation.ellipsisWidth&&(N=e.truncation.limit,E=!0),{ellipsed:E,index:s?l:h,truncated:s,width:N}},"getStringTruncatedWidth");export{j as getStringTruncatedWidth};
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export { default as snakeCase } from "./case/snake-case.js";
17
17
  export { type SplitOptions, splitByCase } from "./case/split-by-case.js";
18
18
  export { default as titleCase } from "./case/title-case.js";
19
19
  export { default as trainCase } from "./case/train-case.js";
20
- export { type a as CamelCase, type b as CapitalCase, type C as CaseOptions, type c as ConstantCase, type D as DotCase, type F as FlatCase, type d as FlipCase, type I as IdentifyCase, type K as KebabCase, type L as LocaleOptions, type e as LowerFirst, type N as NoCase, type P as PascalCase, type f as PascalSnakeCase, type g as PathCase, type S as SentenceCase, type h as SnakeCase, type i as SplitByCase, type T as TitleCase, type j as TrainCase, type U as UpperFirst } from "./packem_shared/types.d-FOLSY2Tc.js";
20
+ export { type a as CamelCase, type b as CapitalCase, type C as CaseOptions, type c as ConstantCase, type D as DotCase, type F as FlatCase, type d as FlipCase, type I as IdentifyCase, type K as KebabCase, type L as LocaleOptions, type e as LowerFirst, type N as NoCase, type P as PascalCase, type f as PascalSnakeCase, type g as PathCase, type S as SentenceCase, type h as SnakeCase, type i as SplitByCase, type T as TitleCase, type j as TrainCase, type U as UpperFirst } from "./packem_shared/types.d-BaFAOLxg.js";
21
21
  export { default as upperFirst } from "./case/upper-first.js";
22
22
  export { joinSegments } from "./case/index.js";
23
23
  export { type ClosestStringOptions, closestString } from "./closest-string.js";
@@ -27,8 +27,8 @@ export { truncate } from "./truncate.js";
27
27
  export { type StringTruncatedWidthOptions, type StringTruncatedWidthResult, getStringTruncatedWidth } from "./get-string-truncated-width.js";
28
28
  export { type StringWidthOptions, getStringWidth } from "./get-string-width.js";
29
29
  export { type Outdent, type Options as OutdentOptions, outdent } from "./outdent.js";
30
- import { O as OptionReplaceArray, a as IntervalArray, b as OptionsTransliterate } from "./packem_shared/types.d-NJ4vcG-A.js";
31
- export { type A as All, type c as Any, type C as CharAt, type d as Charmap, type e as Concat, type E as EndsWith, type f as Includes, type g as Interval, type h as IsBooleanLiteral, type i as IsNumberLiteral, type I as IsStringLiteral, type j as IsStringLiteralArray, type J as Join, type L as Length, type M as Math, type N as NodeLocale, type k as OptionReplaceCombined, type l as OptionReplaceObject, type P as PadEnd, type m as PadStart, type R as Repeat, type n as Replace, type o as ReplaceAll, type p as Reverse, type q as Slice, type S as SlugifyOptions, type r as Split, type s as StartsWith, type T as ToLowerCase, type t as ToUpperCase, type u as Trim, type v as TrimEnd, type w as TrimStart } from "./packem_shared/types.d-NJ4vcG-A.js";
30
+ import { O as OptionReplaceArray, I as IntervalArray, b as OptionsTransliterate } from "./packem_shared/types.d-CEMfJjRV.js";
31
+ export { type A as All, type c as Any, type C as CharAt, type d as Charmap, type e as Concat, type E as EndsWith, type f as Includes, type g as Interval, type h as IsBooleanLiteral, type i as IsNumberLiteral, type a as IsStringLiteral, type j as IsStringLiteralArray, type J as Join, type L as Length, type M as Math, type N as NodeLocale, type k as OptionReplaceCombined, type l as OptionReplaceObject, type P as PadEnd, type m as PadStart, type R as Repeat, type n as Replace, type o as ReplaceAll, type p as Reverse, type q as Slice, type S as SlugifyOptions, type r as Split, type s as StartsWith, type T as ToLowerCase, type t as ToUpperCase, type u as Trim, type v as TrimEnd, type w as TrimStart } from "./packem_shared/types.d-CEMfJjRV.js";
32
32
  export { type SliceOptions, slice } from "./slice.js";
33
33
  export { default as slugify } from "./slugify.js";
34
34
  export { escapeRegExp, findStringOccurrences, hasChinese, hasPunctuationOrSpace, inRange } from "./utilities.js";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{alignText as r}from"./align-text.js";import{default as a}from"./case/camel-case.js";import{default as s}from"./case/capital-case.js";import{default as m}from"./case/constant-case.js";import{default as d}from"./case/dot-case.js";import{default as i}from"./case/flat-case.js";import{flipCase as u}from"./case/flip-case.js";import{default as C}from"./case/identify-case.js";import{kebabCase as S}from"./case/kebab-case.js";import{default as y}from"./case/lower-first.js";import{default as w}from"./case/no-case.js";import{default as F}from"./case/pascal-case.js";import{default as T}from"./case/pascal-snake-case.js";import{default as A}from"./case/path-case.js";import{default as R}from"./case/sentence-case.js";import{default as B}from"./case/snake-case.js";import{splitByCase as I}from"./case/split-by-case.js";import{default as N}from"./case/title-case.js";import{default as v}from"./case/train-case.js";import{default as D}from"./case/upper-first.js";import{default as H}from"./packem_shared/joinSegments-D27SxoCV.js";import{closestString as K}from"./closest-string.js";import{compareSimilarity as Q}from"./compare-similarity.js";import{countOccurrences as V}from"./packem_shared/countOccurrences-DIHSCdcG.js";import{direction as Y}from"./packem_shared/direction-dtczwUOE.js";import{excerpt as _}from"./packem_shared/excerpt-DhV2yoHG.js";import{getStringTruncatedWidth as ee}from"./get-string-truncated-width.js";import{getStringWidth as re}from"./get-string-width.js";import{default as ae}from"./packem_shared/isFullwidthCodePoint-Dmsf2-5L.js";import{closestN as se}from"./packem_shared/closestN-Vd5oNJy_.js";import{outdent as me}from"./outdent.js";import{default as de}from"./packem_shared/replaceString-aq-C7Wor.js";import{slice as ie}from"./slice.js";import{default as ue}from"./slugify.js";import{default as Ce}from"./packem_shared/transliterate-D1p1yYE7.js";import{truncate as Se}from"./truncate.js";import{escapeRegExp as ye,findStringOccurrences as We,hasChinese as we,hasPunctuationOrSpace as ke,inRange as Fe}from"./utilities.js";import{wordSimilaritySort as Te}from"./word-similarity-sort.js";import{WrapMode as Ae,wordWrap as Pe}from"./word-wrap.js";import{default as je}from"./packem_shared/indent-CDlPQmpe.js";import{default as Ee}from"./packem_shared/redent-BECVOaZp.js";import{dedent as Me,default as Ne}from"./packem_shared/stripIndent-Dt8hSxVM.js";import{closest as ve,distance as ze}from"./packem_shared/closest-uarbVSbs.js";import{eastAsianWidth as Ge,eastAsianWidthType as He}from"./packem_shared/eastAsianWidthType-lcBsj7vg.js";export{Ae as WrapMode,r as alignText,a as camelCase,s as capitalCase,ve as closest,se as closestN,K as closestString,Q as compareSimilarity,m as constantCase,V as countOccurrences,Me as dedent,Y as direction,ze as distance,d as dotCase,Ge as eastAsianWidth,He as eastAsianWidthType,ye as escapeRegExp,_ as excerpt,We as findStringOccurrences,i as flatCase,u as flipCase,ee as getStringTruncatedWidth,re as getStringWidth,we as hasChinese,ke as hasPunctuationOrSpace,C as identifyCase,Fe as inRange,je as indent,ae as isFullwidthCodePoint,H as joinSegments,S as kebabCase,y as lowerFirst,w as noCase,me as outdent,F as pascalCase,T as pascalSnakeCase,A as pathCase,Ee as redent,de as replaceString,R as sentenceCase,ie as slice,ue as slugify,B as snakeCase,I as splitByCase,Ne as stripIndent,N as titleCase,v as trainCase,Ce as transliterate,Se as truncate,D as upperFirst,Te as wordSimilaritySort,Pe as wordWrap};
1
+ import{alignText as r}from"./align-text.js";import{default as a}from"./case/camel-case.js";import{default as s}from"./case/capital-case.js";import{default as m}from"./case/constant-case.js";import{default as d}from"./case/dot-case.js";import{default as i}from"./case/flat-case.js";import{flipCase as u}from"./case/flip-case.js";import{default as C}from"./case/identify-case.js";import{kebabCase as S}from"./case/kebab-case.js";import{default as y}from"./case/lower-first.js";import{default as w}from"./case/no-case.js";import{default as F}from"./case/pascal-case.js";import{default as T}from"./case/pascal-snake-case.js";import{default as A}from"./case/path-case.js";import{default as R}from"./case/sentence-case.js";import{default as B}from"./case/snake-case.js";import{splitByCase as I}from"./case/split-by-case.js";import{default as N}from"./case/title-case.js";import{default as v}from"./case/train-case.js";import{default as D}from"./case/upper-first.js";import{default as H}from"./packem_shared/joinSegments-D27SxoCV.js";import{closestString as K}from"./closest-string.js";import{compareSimilarity as Q}from"./compare-similarity.js";import{countOccurrences as V}from"./packem_shared/countOccurrences-DIHSCdcG.js";import{direction as Y}from"./packem_shared/direction-dtczwUOE.js";import{excerpt as _}from"./packem_shared/excerpt-DhV2yoHG.js";import{getStringTruncatedWidth as ee}from"./get-string-truncated-width.js";import{getStringWidth as re}from"./get-string-width.js";import{default as ae}from"./packem_shared/isFullwidthCodePoint-DJd4PBMe.js";import{closestN as se}from"./packem_shared/closestN-Vd5oNJy_.js";import{outdent as me}from"./outdent.js";import{default as de}from"./packem_shared/replaceString-aq-C7Wor.js";import{slice as ie}from"./slice.js";import{default as ue}from"./slugify.js";import{default as Ce}from"./packem_shared/transliterate-D1p1yYE7.js";import{truncate as Se}from"./truncate.js";import{escapeRegExp as ye,findStringOccurrences as We,hasChinese as we,hasPunctuationOrSpace as ke,inRange as Fe}from"./utilities.js";import{wordSimilaritySort as Te}from"./word-similarity-sort.js";import{WrapMode as Ae,wordWrap as Pe}from"./word-wrap.js";import{default as je}from"./packem_shared/indent-CDlPQmpe.js";import{default as Ee}from"./packem_shared/redent-BECVOaZp.js";import{dedent as Me,default as Ne}from"./packem_shared/stripIndent-Dt8hSxVM.js";import{closest as ve,distance as ze}from"./packem_shared/closest-uarbVSbs.js";import{eastAsianWidth as Ge,eastAsianWidthType as He}from"./packem_shared/eastAsianWidthType-GZeXsSGs.js";export{Ae as WrapMode,r as alignText,a as camelCase,s as capitalCase,ve as closest,se as closestN,K as closestString,Q as compareSimilarity,m as constantCase,V as countOccurrences,Me as dedent,Y as direction,ze as distance,d as dotCase,Ge as eastAsianWidth,He as eastAsianWidthType,ye as escapeRegExp,_ as excerpt,We as findStringOccurrences,i as flatCase,u as flipCase,ee as getStringTruncatedWidth,re as getStringWidth,we as hasChinese,ke as hasPunctuationOrSpace,C as identifyCase,Fe as inRange,je as indent,ae as isFullwidthCodePoint,H as joinSegments,S as kebabCase,y as lowerFirst,w as noCase,me as outdent,F as pascalCase,T as pascalSnakeCase,A as pathCase,Ee as redent,de as replaceString,R as sentenceCase,ie as slice,ue as slugify,B as snakeCase,I as splitByCase,Ne as stripIndent,N as titleCase,v as trainCase,Ce as transliterate,Se as truncate,D as upperFirst,Te as wordSimilaritySort,Pe as wordWrap};
@@ -1 +1 @@
1
- var r=Object.defineProperty;var a=(e,t)=>r(e,"name",{value:t,configurable:!0});import{i as n,a as o,b as u,g as d}from"./lookup-ChWuUpyb.js";var f=Object.defineProperty,i=a((e,t)=>f(e,"name",{value:t,configurable:!0}),"e");function s(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}a(s,"r");i(s,"validate");function p(e){return s(e),d(e)}a(p,"eastAsianWidthType");i(p,"eastAsianWidthType");function W(e,{ambiguousAsWide:t=!1}={}){return s(e),n(e)||o(e)||t&&u(e)?2:1}a(W,"eastAsianWidth");i(W,"eastAsianWidth");export{n as _isFullWidth,o as _isWide,W as eastAsianWidth,p as eastAsianWidthType};
1
+ var r=Object.defineProperty;var a=(e,t)=>r(e,"name",{value:t,configurable:!0});import{i as n,a as o,b as u,g as d}from"./lookup-CNDd-Nq4.js";var f=Object.defineProperty,i=a((e,t)=>f(e,"name",{value:t,configurable:!0}),"e");function s(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}a(s,"r");i(s,"validate");function p(e){return s(e),d(e)}a(p,"eastAsianWidthType");i(p,"eastAsianWidthType");function W(e,{ambiguousAsWide:t=!1}={}){return s(e),n(e)||o(e)||t&&u(e)?2:1}a(W,"eastAsianWidth");i(W,"eastAsianWidth");export{n as _isFullWidth,o as _isWide,W as eastAsianWidth,p as eastAsianWidthType};
@@ -1 +1 @@
1
- var r=Object.defineProperty;var a=(e,i)=>r(e,"name",{value:i,configurable:!0});import{i as t,a as s}from"./lookup-ChWuUpyb.js";var l=Object.defineProperty,o=a((e,i)=>l(e,"name",{value:i,configurable:!0}),"i");const n=o(e=>Number.isInteger(e)?t(e)||s(e):!1,"isFullwidthCodePoint");export{n as default};
1
+ var r=Object.defineProperty;var a=(e,i)=>r(e,"name",{value:i,configurable:!0});import{i as t,a as s}from"./lookup-CNDd-Nq4.js";var l=Object.defineProperty,o=a((e,i)=>l(e,"name",{value:i,configurable:!0}),"i");const n=o(e=>Number.isInteger(e)?t(e)||s(e):!1,"isFullwidthCodePoint");export{n as default};
@@ -0,0 +1 @@
1
+ var m=Object.defineProperty;var l=(i,e)=>m(i,"name",{value:e,configurable:!0});const g=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],h=12288,w=65510,P=[12288,12288,65281,65376,65504,65510],c=8361,C=65518,M=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],b=32,R=10630,x=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],v=4352,W=262141,d=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var y=Object.defineProperty,j=l((i,e)=>y(i,"name",{value:e,configurable:!0}),"r$1");const r=j((i,e)=>{let n=0,a=Math.floor(i.length/2)-1;for(;n<=a;){const o=Math.floor((n+a)/2),s=o*2;if(e<i[s])a=o-1;else if(e>i[s+1])n=o+1;else return!0}return!1},"isInRange");var p=Object.defineProperty,u=l((i,e)=>p(i,"name",{value:e,configurable:!0}),"r");const t=19968,[A,F]=f(d);function f(i){let e=i[0],n=i[1];for(let a=0;a<i.length;a+=2){const o=i[a],s=i[a+1];if(t>=o&&t<=s)return[o,s];s-o>n-e&&(e=o,n=s)}return[e,n]}l(f,"k");u(f,"findWideFastPathRange");const I=u(i=>i<161||i>1114109?!1:r(g,i),"isAmbiguous"),O=u(i=>i<h||i>w?!1:r(P,i),"isFullWidth"),k=u(i=>i<c||i>C?!1:r(M,i),"isHalfWidth"),H=u(i=>i<b||i>R?!1:r(x,i),"isNarrow"),N=u(i=>i>=A&&i<=F?!0:i<v||i>W?!1:r(d,i),"isWide");function S(i){return I(i)?"ambiguous":O(i)?"fullwidth":k(i)?"halfwidth":H(i)?"narrow":N(i)?"wide":"neutral"}l(S,"getCategory");u(S,"getCategory");export{N as a,I as b,S as g,O as i};
@@ -1,4 +1,4 @@
1
- import { I as IsStringLiteral, N as NodeLocale } from "./types.d-NJ4vcG-A.js";
1
+ import { a as IsStringLiteral, N as NodeLocale } from "./types.d-CEMfJjRV.js";
2
2
  import { L as LRUCache } from "./lru-cache.d-BsP6kbVJ.js";
3
3
  /**
4
4
  * Valid characters used to split strings into words.
@@ -343,4 +343,4 @@ interface SlugifyOptions extends OptionsTransliterate {
343
343
  */
344
344
  uppercase?: boolean;
345
345
  }
346
- export { All as A, CharAt as C, EndsWith as E, IsStringLiteral as I, Join as J, Length as L, Math as M, NodeLocale as N, OptionReplaceArray as O, PadEnd as P, Repeat as R, SlugifyOptions as S, ToLowerCase as T, IntervalArray as a, OptionsTransliterate as b, Any as c, Charmap as d, Concat as e, Includes as f, Interval as g, IsBooleanLiteral as h, IsNumberLiteral as i, IsStringLiteralArray as j, OptionReplaceCombined as k, OptionReplaceObject as l, PadStart as m, Replace as n, ReplaceAll as o, Reverse as p, Slice as q, Split as r, StartsWith as s, ToUpperCase as t, Trim as u, TrimEnd as v, TrimStart as w };
346
+ export { All as A, CharAt as C, EndsWith as E, IntervalArray as I, Join as J, Length as L, Math as M, NodeLocale as N, OptionReplaceArray as O, PadEnd as P, Repeat as R, SlugifyOptions as S, ToLowerCase as T, IsStringLiteral as a, OptionsTransliterate as b, Any as c, Charmap as d, Concat as e, Includes as f, Interval as g, IsBooleanLiteral as h, IsNumberLiteral as i, IsStringLiteralArray as j, OptionReplaceCombined as k, OptionReplaceObject as l, PadStart as m, Replace as n, ReplaceAll as o, Reverse as p, Slice as q, Split as r, StartsWith as s, ToUpperCase as t, Trim as u, TrimEnd as v, TrimStart as w };
package/dist/slugify.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as SlugifyOptions } from "./packem_shared/types.d-NJ4vcG-A.js";
1
+ import { S as SlugifyOptions } from "./packem_shared/types.d-CEMfJjRV.js";
2
2
  /**
3
3
  * Converts a string into a URL-friendly slug.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { a as IntervalArray } from "./packem_shared/types.d-NJ4vcG-A.js";
1
+ import { I as IntervalArray } from "./packem_shared/types.d-CEMfJjRV.js";
2
2
  export { L as LRUCache } from "./packem_shared/lru-cache.d-BsP6kbVJ.js";
3
3
  /**
4
4
  * Escapes characters with special meaning in regular expressions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/string",
3
- "version": "3.0.0-alpha.13",
3
+ "version": "3.0.0-alpha.14",
4
4
  "description": "Functions for manipulating strings.",
5
5
  "keywords": [
6
6
  "align",
@@ -51,14 +51,7 @@
51
51
  "visulima"
52
52
  ],
53
53
  "homepage": "https://visulima.com/packages/string",
54
- "bugs": {
55
- "url": "https://github.com/visulima/visulima/issues"
56
- },
57
- "license": "MIT",
58
- "author": {
59
- "name": "Daniel Bannert",
60
- "email": "d.bannert@anolilab.de"
61
- },
54
+ "bugs": "https://github.com/visulima/visulima/issues",
62
55
  "repository": {
63
56
  "type": "git",
64
57
  "url": "git+https://github.com/visulima/visulima.git",
@@ -74,13 +67,13 @@
74
67
  "url": "https://anolilab.com/support"
75
68
  }
76
69
  ],
77
- "files": [
78
- "dist",
79
- "README.md",
80
- "CHANGELOG.md"
81
- ],
82
- "type": "module",
70
+ "license": "MIT",
71
+ "author": {
72
+ "name": "Daniel Bannert",
73
+ "email": "d.bannert@anolilab.de"
74
+ },
83
75
  "sideEffects": false,
76
+ "type": "module",
84
77
  "exports": {
85
78
  "./native-string-types": {
86
79
  "types": "./dist/native-string-types.d.ts"
@@ -227,11 +220,16 @@
227
220
  },
228
221
  "./package.json": "./package.json"
229
222
  },
223
+ "files": [
224
+ "dist",
225
+ "README.md",
226
+ "CHANGELOG.md"
227
+ ],
228
+ "engines": {
229
+ "node": "^22.14.0 || >=24.10.0"
230
+ },
230
231
  "publishConfig": {
231
232
  "access": "public",
232
233
  "provenance": true
233
- },
234
- "engines": {
235
- "node": "^22.14.0 || >=24.10.0"
236
234
  }
237
235
  }
@@ -1 +0,0 @@
1
- var W=Object.defineProperty;var l=(e,a)=>W(e,"name",{value:a,configurable:!0});const f=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],g=[12288,12288,65281,65376,65504,65510],c=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],h=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],u=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var m=Object.defineProperty,v=l((e,a)=>m(e,"name",{value:a,configurable:!0}),"r$1");const t=v((e,a)=>{let s=0,r=Math.floor(e.length/2)-1;for(;s<=r;){const i=Math.floor((s+r)/2),n=i*2;if(a<e[n])r=i-1;else if(a>e[n+1])s=i+1;else return!0}return!1},"isInRange");var w=Object.defineProperty,o=l((e,a)=>w(e,"name",{value:a,configurable:!0}),"r");const p=f[0],y=f.at(-1),F=g[0],R=g.at(-1),j=c[0],A=c.at(-1),C=h[0],P=h.at(-1),x=u[0],H=u.at(-1),d=19968,[I,M]=b(u);function b(e){let a=e[0],s=e[1];for(let r=0;r<e.length;r+=2){const i=e[r],n=e[r+1];if(d>=i&&d<=n)return[i,n];n-i>s-a&&(a=i,s=n)}return[a,s]}l(b,"N");o(b,"findWideFastPathRange");const N=o(e=>e<p||e>y?!1:t(f,e),"isAmbiguous"),O=o(e=>e<F||e>R?!1:t(g,e),"isFullWidth"),E=o(e=>e<j||e>A?!1:t(c,e),"isHalfWidth"),S=o(e=>e<C||e>P?!1:t(h,e),"isNarrow"),k=o(e=>e>=I&&e<=M?!0:e<x||e>H?!1:t(u,e),"isWide");function q(e){return N(e)?"ambiguous":O(e)?"fullwidth":E(e)?"halfwidth":S(e)?"narrow":k(e)?"wide":"neutral"}l(q,"getCategory");o(q,"getCategory");export{k as a,N as b,q as g,O as i};