@visulima/string 3.0.0-alpha.9 → 3.0.0

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 (127) hide show
  1. package/CHANGELOG.md +298 -0
  2. package/LICENSE.md +68 -3
  3. package/README.md +80 -2
  4. package/dist/align-text.d.ts +35 -0
  5. package/dist/align-text.js +2 -34
  6. package/dist/case/camel-case.d.ts +17 -3
  7. package/dist/case/camel-case.js +1 -55
  8. package/dist/case/capital-case.d.ts +14 -3
  9. package/dist/case/capital-case.js +1 -47
  10. package/dist/case/constant-case.d.ts +14 -3
  11. package/dist/case/constant-case.js +1 -7
  12. package/dist/case/dot-case.d.ts +14 -3
  13. package/dist/case/dot-case.js +1 -7
  14. package/dist/case/flat-case.d.ts +12 -3
  15. package/dist/case/flat-case.js +1 -7
  16. package/dist/case/flip-case.d.ts +16 -3
  17. package/dist/case/flip-case.js +1 -82
  18. package/dist/case/identify-case.d.ts +15 -3
  19. package/dist/case/identify-case.js +1 -66
  20. package/dist/case/index.d.ts +8 -3
  21. package/dist/case/index.js +1 -20
  22. package/dist/case/kebab-case.d.ts +25 -3
  23. package/dist/case/kebab-case.js +1 -55
  24. package/dist/case/lower-first.d.ts +13 -3
  25. package/dist/case/lower-first.js +1 -9
  26. package/dist/case/no-case.d.ts +14 -3
  27. package/dist/case/no-case.js +1 -7
  28. package/dist/case/pascal-case.d.ts +17 -3
  29. package/dist/case/pascal-case.js +1 -48
  30. package/dist/case/pascal-snake-case.d.ts +14 -3
  31. package/dist/case/pascal-snake-case.js +1 -28
  32. package/dist/case/path-case.d.ts +14 -3
  33. package/dist/case/path-case.js +1 -7
  34. package/dist/case/sentence-case.d.ts +14 -3
  35. package/dist/case/sentence-case.js +1 -54
  36. package/dist/case/snake-case.d.ts +14 -3
  37. package/dist/case/snake-case.js +1 -7
  38. package/dist/case/split-by-case.d.ts +29 -3
  39. package/dist/case/split-by-case.js +1 -763
  40. package/dist/case/title-case.d.ts +12 -3
  41. package/dist/case/title-case.js +1 -40
  42. package/dist/case/train-case.d.ts +14 -3
  43. package/dist/case/train-case.js +1 -40
  44. package/dist/case/upper-first.d.ts +13 -3
  45. package/dist/case/upper-first.js +1 -9
  46. package/dist/closest-string.d.ts +32 -0
  47. package/dist/closest-string.js +1 -22
  48. package/dist/compare-similarity.d.ts +37 -0
  49. package/dist/compare-similarity.js +1 -12
  50. package/dist/count-occurrences.d.ts +9 -0
  51. package/dist/count-occurrences.js +1 -0
  52. package/dist/direction.d.ts +7 -0
  53. package/dist/direction.js +1 -0
  54. package/dist/east-asian-width.d.ts +52 -0
  55. package/dist/east-asian-width.js +1 -0
  56. package/dist/excerpt.d.ts +25 -0
  57. package/dist/excerpt.js +53 -0
  58. package/dist/get-string-truncated-width.d.ts +151 -0
  59. package/dist/get-string-truncated-width.js +1 -332
  60. package/dist/get-string-width.d.ts +58 -0
  61. package/dist/get-string-width.js +1 -5
  62. package/dist/indent.d.ts +87 -0
  63. package/dist/indent.js +1 -0
  64. package/dist/index.d.ts +12 -20
  65. package/dist/index.js +1 -44
  66. package/dist/is-fullwidth-code-point.d.ts +7 -0
  67. package/dist/is-fullwidth-code-point.js +1 -0
  68. package/dist/levenshtein.d.ts +25 -0
  69. package/dist/levenshtein.js +1 -0
  70. package/dist/native-string-types.d.ts +239 -0
  71. package/dist/outdent.d.ts +74 -0
  72. package/dist/outdent.js +1 -109
  73. package/dist/packem_shared/_isFullWidth-Dqc3MWgl.js +1 -0
  74. package/dist/packem_shared/closest-C6YDQs4m.js +1 -0
  75. package/dist/packem_shared/constants-aPzGW29R.js +1 -0
  76. package/dist/packem_shared/dedent-CPjAYUXh.js +1 -0
  77. package/dist/packem_shared/eastAsianWidth-DJV8Kqd-.js +1 -0
  78. package/dist/packem_shared/generate-cache-key-BqU1Cqwm.js +1 -0
  79. package/dist/packem_shared/indent-cz8WMI0e.js +1 -0
  80. package/dist/packem_shared/joinSegments-CaHT-45s.js +1 -0
  81. package/dist/packem_shared/lru-cache-BtMSrYQJ.js +1 -0
  82. package/dist/packem_shared/normalize-german-eszett-hNMwtGjd.js +1 -0
  83. package/dist/packem_shared/redent-ByOoJ6fN.js +1 -0
  84. package/dist/packem_shared/types.d-CmNvyl4l.d.ts +360 -0
  85. package/dist/packem_shared/types.d-fhe030jX.d.ts +402 -0
  86. package/dist/replace-string.d.ts +10 -0
  87. package/dist/replace-string.js +1 -0
  88. package/dist/slice.d.ts +42 -0
  89. package/dist/slice.js +1 -415
  90. package/dist/slugify.d.ts +10 -1
  91. package/dist/slugify.js +1 -46
  92. package/dist/test/utils.d.ts +17 -0
  93. package/dist/test/utils.js +13 -88
  94. package/dist/test/vitest.d.ts +3 -0
  95. package/dist/test/vitest.js +1 -5
  96. package/dist/transliterate.d.ts +10 -0
  97. package/dist/transliterate.js +5 -0
  98. package/dist/truncate.d.ts +43 -0
  99. package/dist/truncate.js +1 -112
  100. package/dist/utilities.d.ts +28 -2
  101. package/dist/utilities.js +1 -52
  102. package/dist/word-similarity-sort.d.ts +34 -0
  103. package/dist/word-similarity-sort.js +1 -22
  104. package/dist/word-wrap.d.ts +44 -0
  105. package/dist/word-wrap.js +8 -639
  106. package/package.json +70 -36
  107. package/dist/packem_shared/LRUCache-3r3SovvR.js +0 -46
  108. package/dist/packem_shared/closest-IHuSvnSn.js +0 -139
  109. package/dist/packem_shared/closestN-DUsjgiXb.js +0 -25
  110. package/dist/packem_shared/constants-BsZS5f0z.js +0 -95
  111. package/dist/packem_shared/countOccurrences-CS9XprQN.js +0 -22
  112. package/dist/packem_shared/direction-C9gfWWTK.js +0 -16
  113. package/dist/packem_shared/eastAsianWidthType-SD3YniiT.js +0 -20
  114. package/dist/packem_shared/excerpt-COsVNttN.js +0 -1502
  115. package/dist/packem_shared/generate-cache-key-DdayDfjV.js +0 -6
  116. package/dist/packem_shared/indent-D3DSCa6s.js +0 -33
  117. package/dist/packem_shared/isFullwidthCodePoint-IFXZxNjq.js +0 -10
  118. package/dist/packem_shared/joinSegments-CvxSgKz0.js +0 -44
  119. package/dist/packem_shared/lookup-BE8lEqy4.js +0 -104
  120. package/dist/packem_shared/lru-cache.d-BsP6kbVJ.d.ts +0 -13
  121. package/dist/packem_shared/normalize-german-eszett-4p3yKEzn.js +0 -8
  122. package/dist/packem_shared/redent-DSb1IJWn.js +0 -8
  123. package/dist/packem_shared/replaceString-Ce8X2ZQ-.js +0 -192
  124. package/dist/packem_shared/stripIndent-D_TRjxZ_.js +0 -20
  125. package/dist/packem_shared/transliterate-CKt9VK7D.js +0 -47756
  126. package/dist/packem_shared/types.d-BVNv675q.d.ts +0 -61
  127. package/dist/packem_shared/types.d-DfgbcNKh.d.ts +0 -57
package/CHANGELOG.md CHANGED
@@ -1,3 +1,301 @@
1
+ ## @visulima/string [3.0.0](https://github.com/visulima/visulima/compare/@visulima/string@2.0.6...@visulima/string@3.0.0) (2026-07-03)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * change min node version to 22.13
6
+
7
+ ### Features
8
+
9
+ * add string analysis functions for counting occurrences and detecting text direction ([de84ab0](https://github.com/visulima/visulima/commit/de84ab072e36d3fc834dd8d971db46fd62be249a))
10
+ * added new excerpt functions ([#582](https://github.com/visulima/visulima/issues/582)) ([1f2059f](https://github.com/visulima/visulima/commit/1f2059f79e8655d868cd9183d8645224c0af4fbb))
11
+ * **string): native indent implementation; refactor(tui:** replace indent-string and is-fullwidth-code-point ([1368488](https://github.com/visulima/visulima/commit/136848850242ddeae91320dd21d6fdeb0760768c))
12
+ * **string:** add east-asian-width, isFullwidthCodePoint exports and fix utilities ([b44e0c5](https://github.com/visulima/visulima/commit/b44e0c5b4e5cff7b39d9148516f7ed510bb35bb6))
13
+ * **string:** add indent, strip-indent, dedent, redent, isFullwidthCodePoint, and east-asian-width helpers ([5441f3c](https://github.com/visulima/visulima/commit/5441f3c883256165b36c0d9580bbb44cc36e9a62))
14
+ * **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
15
+
16
+ ### Bug Fixes
17
+
18
+ * add new package image, fixed readme rendering on npm, fixed building of packages ([b790ba2](https://github.com/visulima/visulima/commit/b790ba253ea07fef83528fd822a678facf021b5f))
19
+ * **data-manipulation:** resolve eslint and formatting issues ([3687b65](https://github.com/visulima/visulima/commit/3687b65d804abe316fad8c3a02ec659bf303332e))
20
+ * **data-manipulation:** resolve eslint and type-safety issues ([f1682c2](https://github.com/visulima/visulima/commit/f1682c2611cbcc6c85d4bbea520d43464b42e7ee))
21
+ * **docs:** correct code examples found during verification ([8e4f8c4](https://github.com/visulima/visulima/commit/8e4f8c4b0b1664c232fe5ae721b771c72d29a152))
22
+ * Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
23
+ * resolve failing tests across multiple packages ([2b4b6f0](https://github.com/visulima/visulima/commit/2b4b6f04169b60fdc4cf77b293015436a272c0fb))
24
+ * **security:** resolve CodeQL alerts on alpha→main ([541e206](https://github.com/visulima/visulima/commit/541e206517b2f78532d19638c18be95ff97e48ae)), closes [#713](https://github.com/visulima/visulima/issues/713)
25
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
26
+ * **string:** 3 bug fixes + 2 perf ([3591a75](https://github.com/visulima/visulima/commit/3591a75f8c9e5db4f990808d1c87fc3434d4acdf))
27
+ * **string:** cast string result to branded case types ([295e613](https://github.com/visulima/visulima/commit/295e613abfe301ba8e1dc308f5a519bb58d22aff))
28
+ * **string:** drop now-unused regex-complexity eslint-disable ([2b2213f](https://github.com/visulima/visulima/commit/2b2213fb9f4ae678aad5959c3acdd37640446a22))
29
+ * **string:** fix per-config char-width cache poisoning and dx gaps ([7e8dd51](https://github.com/visulima/visulima/commit/7e8dd51b1cc0cf71a8dbd6bae0d89d2cc3fb2403))
30
+ * **string:** properly fix eslint errors in code ([184b6a3](https://github.com/visulima/visulima/commit/184b6a30bb3d49185f64a0a6d88f693bd61644f9))
31
+ * **string:** remove remaining eslint suppressions with proper code fixes ([c2e183e](https://github.com/visulima/visulima/commit/c2e183ed1cdb8fe54d46c5376eca0208a9b65b0f))
32
+ * **string:** repair broken bench imports ([f077356](https://github.com/visulima/visulima/commit/f077356139dc4745c59ac286f5a0681918fbb366))
33
+ * **string:** resolve eslint and formatting issues ([1903c05](https://github.com/visulima/visulima/commit/1903c0531bd481e19488ad4aa7a186a95c181f15))
34
+ * **string:** resolve eslint and formatting issues ([c706cfb](https://github.com/visulima/visulima/commit/c706cfb0ebb8a21f287018d393b28f0aa4922601))
35
+ * **string:** resolve eslint errors ([18f4366](https://github.com/visulima/visulima/commit/18f43665e335b66f2960b4ebffc510efe9df9b6e))
36
+ * **string:** revert wordWrap resetAnsiAtLineBreak to not defeat preserveAnsi ([cdd13d0](https://github.com/visulima/visulima/commit/cdd13d0bde781ab6c356a547f0584e0c87e64958))
37
+ * **string:** update package files ([ca22f2e](https://github.com/visulima/visulima/commit/ca22f2efdd044ae20d421f729d185e1e93747cd8))
38
+ * **string:** update packem to 2.0.0-alpha.54 ([f144f53](https://github.com/visulima/visulima/commit/f144f53ffeddc9baf9dad5624f400ff4c90418a8))
39
+ * **string:** use case aggregator export and drop invalid slice case ([cefe2c7](https://github.com/visulima/visulima/commit/cefe2c776eae495c0fead9214ced7e52e95e6a56))
40
+ * **string:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([767788d](https://github.com/visulima/visulima/commit/767788de6a58ab0d9980f295829de40a7d19bef8))
41
+ * update Node.js engine version requirement to >=22.13 in multiple package.json files for improved compatibility ([b828e9a](https://github.com/visulima/visulima/commit/b828e9aeaebfc798eecddccd90e6ec7560c6d36a))
42
+ * update package OG images across multiple packages ([f08e4dd](https://github.com/visulima/visulima/commit/f08e4dd2b105ccb29c8412020a9c2be36d6c1e9e))
43
+ * **vis:** stop Windows test hangs; start fallow dead-code cleanup ([e87ca70](https://github.com/visulima/visulima/commit/e87ca708223560775c2bd9ec7a59e1aa5853b5de))
44
+ * **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
45
+
46
+ ### Performance Improvements
47
+
48
+ * **string:** disable esbuild keepNames in prod build ([8de9067](https://github.com/visulima/visulima/commit/8de906769625aa282246f470d4ff6dbb76cc52b2))
49
+
50
+ ### Documentation
51
+
52
+ * add missing documentation pages for email, string, and storage-client ([623f8af](https://github.com/visulima/visulima/commit/623f8afd2ea03dd2805fb2d7a9d10083571224bb))
53
+ * **string:** match per-file case subpath imports to actual exports ([1091367](https://github.com/visulima/visulima/commit/109136726458d682a9d6c276e0ce63d8fb35cf0c))
54
+ * **string:** refresh README ([ee62624](https://github.com/visulima/visulima/commit/ee626245007ecaf012925a21e9176e687029dbe8))
55
+
56
+ ### Styles
57
+
58
+ * cs fixes ([2a960bb](https://github.com/visulima/visulima/commit/2a960bb1772c9dc70080e2d75d3a0d827034e294))
59
+
60
+ ### Miscellaneous Chores
61
+
62
+ * add fallow code-intelligence across all packages ([a3b4821](https://github.com/visulima/visulima/commit/a3b48215002e86fed20f2973038b5d4a0aa1ce04))
63
+ * apply eslint + prettier autofixes across packages ([c1bb784](https://github.com/visulima/visulima/commit/c1bb7848a0d93d0dfe2960c77e3cda22239c79a0))
64
+ * bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
65
+ * **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))
66
+ * **data-manipulation:** remove empty dependency objects from package.json ([c0e8f76](https://github.com/visulima/visulima/commit/c0e8f7689a2da413f771494f6ecb07babc4b5e06))
67
+ * **data-manipulation:** update dependencies ([49458ab](https://github.com/visulima/visulima/commit/49458ab8f8e17d875840b1b4fe8b5efe12ff3513))
68
+ * fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
69
+ * fixed project.json names and schema path ([964722f](https://github.com/visulima/visulima/commit/964722f691db205c7edb9aa6db29e849a647500b))
70
+ * moved all packages into groups ([0615e9d](https://github.com/visulima/visulima/commit/0615e9d14a8a886e11da529ce150cf31ca973c10))
71
+ * re-sort workspace package.json files via vis sort-package-json ([f625696](https://github.com/visulima/visulima/commit/f625696cfac974325774b3243e1a83c3d23acbd7))
72
+ * **release:** @visulima/string@3.0.0-alpha.1 [skip ci]\n\n## @visulima/string [3.0.0-alpha.1](https://github.com/visulima/visulima/compare/@visulima/string@2.0.6...@visulima/string@3.0.0-alpha.1) (2025-12-07) ([2f522e1](https://github.com/visulima/visulima/commit/2f522e1b330bdc4543d8ea27da660ea23632cda1))
73
+ * **release:** @visulima/string@3.0.0-alpha.10 [skip ci]\n\n## @visulima/string [3.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.9...@visulima/string@3.0.0-alpha.10) (2026-04-21) ([eac9977](https://github.com/visulima/visulima/commit/eac9977320545369538b2ccb8faa3842cf7c8024))
74
+ * **release:** @visulima/string@3.0.0-alpha.11 [skip ci]\n\n## @visulima/string [3.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.10...@visulima/string@3.0.0-alpha.11) (2026-04-22) ([435a389](https://github.com/visulima/visulima/commit/435a389e75a300a4096345d6247c60e22ffb84fe))
75
+ * **release:** @visulima/string@3.0.0-alpha.12 [skip ci]\n\n## @visulima/string [3.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.11...@visulima/string@3.0.0-alpha.12) (2026-05-07) ([0d7ba88](https://github.com/visulima/visulima/commit/0d7ba88c60cb54e6b0a22957f39d0b46f9e3a755))
76
+ * **release:** @visulima/string@3.0.0-alpha.13 [skip ci]\n\n## @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) ([e2ee24e](https://github.com/visulima/visulima/commit/e2ee24eb193730f7738b9ccc0eb16e8e2798081a))
77
+ * **release:** @visulima/string@3.0.0-alpha.14 [skip ci]\n\n## @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) ([3e49932](https://github.com/visulima/visulima/commit/3e49932210278664cc252d93f4d35e54cd27ddb1))
78
+ * **release:** @visulima/string@3.0.0-alpha.15 [skip ci]\n\n## @visulima/string [3.0.0-alpha.15](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.14...@visulima/string@3.0.0-alpha.15) (2026-06-04) ([591a03f](https://github.com/visulima/visulima/commit/591a03f55de5989a9e8eab73ff0b9de529ccb414))
79
+ * **release:** @visulima/string@3.0.0-alpha.16 [skip ci]\n\n## @visulima/string [3.0.0-alpha.16](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.15...@visulima/string@3.0.0-alpha.16) (2026-06-04) ([b625699](https://github.com/visulima/visulima/commit/b625699a0b9eeaf812d832a83e3df55506c6f11f))
80
+ * **release:** @visulima/string@3.0.0-alpha.17 [skip ci]\n\n## @visulima/string [3.0.0-alpha.17](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.16...@visulima/string@3.0.0-alpha.17) (2026-06-13) ([ad30430](https://github.com/visulima/visulima/commit/ad3043006d2819fca4395b4e1021ee752c2c6b30))
81
+ * **release:** @visulima/string@3.0.0-alpha.18 [skip ci]\n\n## @visulima/string [3.0.0-alpha.18](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.17...@visulima/string@3.0.0-alpha.18) (2026-06-30) ([8ce2013](https://github.com/visulima/visulima/commit/8ce2013c88b027895664e09d9820d0c68c8d44cf))
82
+ * **release:** @visulima/string@3.0.0-alpha.2 [skip ci]\n\n## @visulima/string [3.0.0-alpha.2](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.1...@visulima/string@3.0.0-alpha.2) (2025-12-08) ([36357de](https://github.com/visulima/visulima/commit/36357de69f92338b312b59cc90237a54f18f1cec))
83
+ * **release:** @visulima/string@3.0.0-alpha.3 [skip ci]\n\n## @visulima/string [3.0.0-alpha.3](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.2...@visulima/string@3.0.0-alpha.3) (2025-12-11) ([3bca045](https://github.com/visulima/visulima/commit/3bca045eab552e53185860ffb6cc8c0db6dcbf79))
84
+ * **release:** @visulima/string@3.0.0-alpha.4 [skip ci]\n\n## @visulima/string [3.0.0-alpha.4](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.3...@visulima/string@3.0.0-alpha.4) (2025-12-13) ([fd4223b](https://github.com/visulima/visulima/commit/fd4223b0516ea6d955f1d6cb04ad9f1c2d6dc8c0))
85
+ * **release:** @visulima/string@3.0.0-alpha.5 [skip ci]\n\n## @visulima/string [3.0.0-alpha.5](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.4...@visulima/string@3.0.0-alpha.5) (2025-12-27) ([0ef1d7d](https://github.com/visulima/visulima/commit/0ef1d7d129beb2b4afb78b5c0c00da45e8139ff8))
86
+ * **release:** @visulima/string@3.0.0-alpha.6 [skip ci]\n\n## @visulima/string [3.0.0-alpha.6](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.5...@visulima/string@3.0.0-alpha.6) (2026-03-06) ([ed5b0fd](https://github.com/visulima/visulima/commit/ed5b0fd8f66763d954e4940313621850a88d95f7))
87
+ * **release:** @visulima/string@3.0.0-alpha.7 [skip ci]\n\n## @visulima/string [3.0.0-alpha.7](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.6...@visulima/string@3.0.0-alpha.7) (2026-03-26) ([0630118](https://github.com/visulima/visulima/commit/06301184607238cc7bd0aaaaa86ed763f7d3fbf0))
88
+ * **release:** @visulima/string@3.0.0-alpha.8 [skip ci]\n\n## @visulima/string [3.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.7...@visulima/string@3.0.0-alpha.8) (2026-03-26) ([9834032](https://github.com/visulima/visulima/commit/9834032c7415be93a6ae556757585ff39c990b0e))
89
+ * **release:** @visulima/string@3.0.0-alpha.9 [skip ci]\n\n## @visulima/string [3.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.8...@visulima/string@3.0.0-alpha.9) (2026-04-08) ([392af0a](https://github.com/visulima/visulima/commit/392af0a72a849b0146cb950a5d40cf299e11d51a))
90
+ * simplify pnpm-workspace packages list ([7cab221](https://github.com/visulima/visulima/commit/7cab221163632d9b7aa044a6f88c49083103a869))
91
+ * sorted package.json ([b47c545](https://github.com/visulima/visulima/commit/b47c545591600fdab17d5cd3a3fbc68b61e199da))
92
+ * **string:** add tsconfig.eslint.json for type-aware linting ([b29661d](https://github.com/visulima/visulima/commit/b29661dc2cf32823f4aff40ac3c7b6a3e12b678e))
93
+ * **string:** apply pending changes ([1d19db3](https://github.com/visulima/visulima/commit/1d19db3db45d060f22028692e677c935e8a36a2e))
94
+ * **string:** apply pending lint and source updates ([25b371c](https://github.com/visulima/visulima/commit/25b371c5026b200c87f88f7b424b6d8bd53f901a))
95
+ * **string:** apply prettier and eslint formatting sweep ([b449ce2](https://github.com/visulima/visulima/commit/b449ce291ddf2dbe56dfd104319b1515957d6422))
96
+ * **string:** apply prettier and eslint quote-style auto-fix ([db1d161](https://github.com/visulima/visulima/commit/db1d1615c7614fb537d53c458bdef3c38c6aab98))
97
+ * **string:** apply prettier formatting ([ed0e3a1](https://github.com/visulima/visulima/commit/ed0e3a15ff5d387ae4897eb0d4ed8a0a864951c2))
98
+ * **string:** housekeeping cleanup ([ecb3058](https://github.com/visulima/visulima/commit/ecb3058b68c2ffae62d9b1d685fe606a605861cd))
99
+ * **string:** migrate .prettierrc.cjs to prettier.config.js ([750ddba](https://github.com/visulima/visulima/commit/750ddba531071ff5b4d74a5e13799630c8d55c27))
100
+ * **string:** migrate deps to pnpm catalogs ([ae5e04a](https://github.com/visulima/visulima/commit/ae5e04a8823320f54dd0da351f9168a58fa5926c))
101
+ * **string:** update dependencies ([ac1b54e](https://github.com/visulima/visulima/commit/ac1b54e55d33bd1bd381a8d59f664cd7911a4fc3))
102
+ * **string:** update dependencies ([6282b31](https://github.com/visulima/visulima/commit/6282b310839ce1154133fe56468e9d52fc2feb91))
103
+ * **string:** update dependencies ([6ff101d](https://github.com/visulima/visulima/commit/6ff101df82e17d1673e47f1195e662b8eff4e04a))
104
+ * **string:** upgrade packem to 2.0.0-alpha.76 ([bcac381](https://github.com/visulima/visulima/commit/bcac381ead9c22befbc54cbd7ad67764e22140af))
105
+ * update @anolilab/semantic-release-pnpm and @anolilab/semantic-release-preset to versions 3.2.2 and 12.1.2 across multiple package.json files for improved compatibility ([3921626](https://github.com/visulima/visulima/commit/3921626141fe5da398749bf0ba675f1596f18afb))
106
+ * update bundled dependency licenses ([6ace4c6](https://github.com/visulima/visulima/commit/6ace4c69d41fc1fd0a744fbca8ca219ba631b4ab))
107
+ * update dependencies across multiple packages to improve compatibility and performance, including upgrading `@anolilab/semantic-release-pnpm` and `@anolilab/semantic-release-preset` to versions 3.2.0 and 12.1.0 respectively, and updating `react`, `react-dom`, and `next` versions to 19.2.1 and 16.0.7 in various package.json files ([aee8fcd](https://github.com/visulima/visulima/commit/aee8fcd796ae9b8d055903260e7150996ea9f53d))
108
+ * update lock file maintenance ([d83e716](https://github.com/visulima/visulima/commit/d83e71697b75d24704185b66bb521a934d2db02d))
109
+ * update the jsr.json ([864ab7e](https://github.com/visulima/visulima/commit/864ab7e71c4b5ae82f64792d1ae8debfea2c539b))
110
+ * visulima website ([#591](https://github.com/visulima/visulima/issues/591)) ([59ab2e2](https://github.com/visulima/visulima/commit/59ab2e2befb03e51cd2088956f83d9b87de6d033))
111
+ * year update ([47f4105](https://github.com/visulima/visulima/commit/47f410596ce7190cfea36a073db32e0cec50bbcd))
112
+
113
+ ### Code Refactoring
114
+
115
+ * **docs:** migrate Nextra components to fumadocs-ui, remove Nextra stripping ([484878f](https://github.com/visulima/visulima/commit/484878f01879363ef5e9a0282904dc4627d6060c))
116
+ * **string:** apply prettier/eslint formatting cleanup ([697c076](https://github.com/visulima/visulima/commit/697c0769fa090a80631da4974ba0b0f5cee7b2d6))
117
+
118
+ ### Tests
119
+
120
+ * improve coverage across packages ([91bd6d3](https://github.com/visulima/visulima/commit/91bd6d3b61736e3c8bd1fc59b0b5955f76a5d323))
121
+ * **repo:** add dist runtime + types integration tests ([32ee300](https://github.com/visulima/visulima/commit/32ee300b7184117a0ddf9f9d390f75f8932d5ed9))
122
+ * **string:** add regression tests for per-line ANSI re-coloring in wordWrap ([46ac426](https://github.com/visulima/visulima/commit/46ac4263ad9ad853d224227e24f4d9877be1d2d3))
123
+ * **string:** cover utility helpers, case edge paths, replace/slice/wrap/truncate and ansi-parser branches ([f8f9340](https://github.com/visulima/visulima/commit/f8f934011945f120ab5fa21454d88652d7ef5d33))
124
+
125
+ ### Build System
126
+
127
+ * regenerate bundled-license manifests and types ordering ([af26588](https://github.com/visulima/visulima/commit/af26588d75aaa937fd4862800560bd4070a4878c))
128
+
129
+ ### Continuous Integration
130
+
131
+ * **fallow:** make fallow:health advisory (--report-only) ([d57148e](https://github.com/visulima/visulima/commit/d57148ea0e3556b4c24d8d336b9fa14987f5dc7d))
132
+ * integrate codspeed for benchmark tracking ([e758f3d](https://github.com/visulima/visulima/commit/e758f3da491cc00d3f8bbf10d7ba3fdf8deb5325))
133
+
134
+
135
+ ### Dependencies
136
+
137
+ * **@visulima/colorize:** upgraded to 2.0.0
138
+
139
+ ## @visulima/string [3.0.0-alpha.18](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.17...@visulima/string@3.0.0-alpha.18) (2026-06-30)
140
+
141
+ ### Bug Fixes
142
+
143
+ * **security:** resolve CodeQL alerts on alpha→main ([541e206](https://github.com/visulima/visulima/commit/541e206517b2f78532d19638c18be95ff97e48ae)), closes [#713](https://github.com/visulima/visulima/issues/713)
144
+ * **string:** drop now-unused regex-complexity eslint-disable ([2b2213f](https://github.com/visulima/visulima/commit/2b2213fb9f4ae678aad5959c3acdd37640446a22))
145
+ * **vis:** stop Windows test hangs; start fallow dead-code cleanup ([e87ca70](https://github.com/visulima/visulima/commit/e87ca708223560775c2bd9ec7a59e1aa5853b5de))
146
+
147
+ ### Styles
148
+
149
+ * cs fixes ([2a960bb](https://github.com/visulima/visulima/commit/2a960bb1772c9dc70080e2d75d3a0d827034e294))
150
+
151
+ ### Miscellaneous Chores
152
+
153
+ * add fallow code-intelligence across all packages ([a3b4821](https://github.com/visulima/visulima/commit/a3b48215002e86fed20f2973038b5d4a0aa1ce04))
154
+
155
+ ### Continuous Integration
156
+
157
+ * **fallow:** make fallow:health advisory (--report-only) ([d57148e](https://github.com/visulima/visulima/commit/d57148ea0e3556b4c24d8d336b9fa14987f5dc7d))
158
+
159
+
160
+ ### Dependencies
161
+
162
+ * **@visulima/colorize:** upgraded to 2.0.0-alpha.15
163
+
164
+ ## @visulima/string [3.0.0-alpha.17](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.16...@visulima/string@3.0.0-alpha.17) (2026-06-13)
165
+
166
+ ### Bug Fixes
167
+
168
+ * **string:** fix per-config char-width cache poisoning and dx gaps ([7e8dd51](https://github.com/visulima/visulima/commit/7e8dd51b1cc0cf71a8dbd6bae0d89d2cc3fb2403))
169
+ * **string:** revert wordWrap resetAnsiAtLineBreak to not defeat preserveAnsi ([cdd13d0](https://github.com/visulima/visulima/commit/cdd13d0bde781ab6c356a547f0584e0c87e64958))
170
+
171
+ ### Documentation
172
+
173
+ * **string:** refresh README ([ee62624](https://github.com/visulima/visulima/commit/ee626245007ecaf012925a21e9176e687029dbe8))
174
+
175
+ ### Code Refactoring
176
+
177
+ * **string:** apply prettier/eslint formatting cleanup ([697c076](https://github.com/visulima/visulima/commit/697c0769fa090a80631da4974ba0b0f5cee7b2d6))
178
+
179
+ ### Tests
180
+
181
+ * **string:** add regression tests for per-line ANSI re-coloring in wordWrap ([46ac426](https://github.com/visulima/visulima/commit/46ac4263ad9ad853d224227e24f4d9877be1d2d3))
182
+
183
+ ### Build System
184
+
185
+ * regenerate bundled-license manifests and types ordering ([af26588](https://github.com/visulima/visulima/commit/af26588d75aaa937fd4862800560bd4070a4878c))
186
+
187
+
188
+ ### Dependencies
189
+
190
+ * **@visulima/colorize:** upgraded to 2.0.0-alpha.14
191
+
192
+ ## @visulima/string [3.0.0-alpha.16](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.15...@visulima/string@3.0.0-alpha.16) (2026-06-04)
193
+
194
+ ### Performance Improvements
195
+
196
+ * **string:** disable esbuild keepNames in prod build ([8de9067](https://github.com/visulima/visulima/commit/8de906769625aa282246f470d4ff6dbb76cc52b2))
197
+
198
+ ## @visulima/string [3.0.0-alpha.15](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.14...@visulima/string@3.0.0-alpha.15) (2026-06-04)
199
+
200
+ ### Bug Fixes
201
+
202
+ * **string:** 3 bug fixes + 2 perf ([3591a75](https://github.com/visulima/visulima/commit/3591a75f8c9e5db4f990808d1c87fc3434d4acdf))
203
+
204
+ ### Miscellaneous Chores
205
+
206
+ * apply eslint + prettier autofixes across packages ([c1bb784](https://github.com/visulima/visulima/commit/c1bb7848a0d93d0dfe2960c77e3cda22239c79a0))
207
+
208
+ ### Tests
209
+
210
+ * improve coverage across packages ([91bd6d3](https://github.com/visulima/visulima/commit/91bd6d3b61736e3c8bd1fc59b0b5955f76a5d323))
211
+ * **string:** cover utility helpers, case edge paths, replace/slice/wrap/truncate and ansi-parser branches ([f8f9340](https://github.com/visulima/visulima/commit/f8f934011945f120ab5fa21454d88652d7ef5d33))
212
+
213
+
214
+ ### Dependencies
215
+
216
+ * **@visulima/colorize:** upgraded to 2.0.0-alpha.13
217
+
218
+ ## @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)
219
+
220
+ ### Bug Fixes
221
+
222
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
223
+
224
+ ### Miscellaneous Chores
225
+
226
+ * **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))
227
+ * sorted package.json ([b47c545](https://github.com/visulima/visulima/commit/b47c545591600fdab17d5cd3a3fbc68b61e199da))
228
+ * **string:** apply prettier and eslint formatting sweep ([b449ce2](https://github.com/visulima/visulima/commit/b449ce291ddf2dbe56dfd104319b1515957d6422))
229
+
230
+ ### Tests
231
+
232
+ * **repo:** add dist runtime + types integration tests ([32ee300](https://github.com/visulima/visulima/commit/32ee300b7184117a0ddf9f9d390f75f8932d5ed9))
233
+
234
+
235
+ ### Dependencies
236
+
237
+ * **@visulima/colorize:** upgraded to 2.0.0-alpha.12
238
+
239
+ ## @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)
240
+
241
+ ### Bug Fixes
242
+
243
+ * **string:** use case aggregator export and drop invalid slice case ([cefe2c7](https://github.com/visulima/visulima/commit/cefe2c776eae495c0fead9214ced7e52e95e6a56))
244
+
245
+ ### Documentation
246
+
247
+ * **string:** match per-file case subpath imports to actual exports ([1091367](https://github.com/visulima/visulima/commit/109136726458d682a9d6c276e0ce63d8fb35cf0c))
248
+
249
+ ## @visulima/string [3.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.11...@visulima/string@3.0.0-alpha.12) (2026-05-07)
250
+
251
+ ### Bug Fixes
252
+
253
+ * **string:** repair broken bench imports ([f077356](https://github.com/visulima/visulima/commit/f077356139dc4745c59ac286f5a0681918fbb366))
254
+
255
+ ### Miscellaneous Chores
256
+
257
+ * re-sort workspace package.json files via vis sort-package-json ([f625696](https://github.com/visulima/visulima/commit/f625696cfac974325774b3243e1a83c3d23acbd7))
258
+ * simplify pnpm-workspace packages list ([7cab221](https://github.com/visulima/visulima/commit/7cab221163632d9b7aa044a6f88c49083103a869))
259
+ * **string:** apply prettier and eslint quote-style auto-fix ([db1d161](https://github.com/visulima/visulima/commit/db1d1615c7614fb537d53c458bdef3c38c6aab98))
260
+ * **string:** housekeeping cleanup ([ecb3058](https://github.com/visulima/visulima/commit/ecb3058b68c2ffae62d9b1d685fe606a605861cd))
261
+ * **string:** upgrade packem to 2.0.0-alpha.76 ([bcac381](https://github.com/visulima/visulima/commit/bcac381ead9c22befbc54cbd7ad67764e22140af))
262
+
263
+ ### Continuous Integration
264
+
265
+ * integrate codspeed for benchmark tracking ([e758f3d](https://github.com/visulima/visulima/commit/e758f3da491cc00d3f8bbf10d7ba3fdf8deb5325))
266
+
267
+ ## @visulima/string [3.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.10...@visulima/string@3.0.0-alpha.11) (2026-04-22)
268
+
269
+ ### Bug Fixes
270
+
271
+ * Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
272
+
273
+ ### Miscellaneous Chores
274
+
275
+ * update the jsr.json ([864ab7e](https://github.com/visulima/visulima/commit/864ab7e71c4b5ae82f64792d1ae8debfea2c539b))
276
+
277
+
278
+ ### Dependencies
279
+
280
+ * **@visulima/colorize:** upgraded to 2.0.0-alpha.10
281
+
282
+ ## @visulima/string [3.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.9...@visulima/string@3.0.0-alpha.10) (2026-04-21)
283
+
284
+ ### Bug Fixes
285
+
286
+ * **data-manipulation:** resolve eslint and formatting issues ([3687b65](https://github.com/visulima/visulima/commit/3687b65d804abe316fad8c3a02ec659bf303332e))
287
+ * **data-manipulation:** resolve eslint and type-safety issues ([f1682c2](https://github.com/visulima/visulima/commit/f1682c2611cbcc6c85d4bbea520d43464b42e7ee))
288
+ * **string:** cast string result to branded case types ([295e613](https://github.com/visulima/visulima/commit/295e613abfe301ba8e1dc308f5a519bb58d22aff))
289
+ * **string:** resolve eslint and formatting issues ([1903c05](https://github.com/visulima/visulima/commit/1903c0531bd481e19488ad4aa7a186a95c181f15))
290
+ * **string:** resolve eslint and formatting issues ([c706cfb](https://github.com/visulima/visulima/commit/c706cfb0ebb8a21f287018d393b28f0aa4922601))
291
+
292
+ ### Miscellaneous Chores
293
+
294
+ * bump engines.node to ^22.14.0 || >=24.10.0 ([c3d0931](https://github.com/visulima/visulima/commit/c3d0931d1504e4f21ebf50ea680cfa7ce4ba15ce))
295
+ * fixed jsr.json ([5d85e51](https://github.com/visulima/visulima/commit/5d85e5179de38e284ec433b14d77c71a1619c8d6))
296
+ * **string:** apply pending changes ([1d19db3](https://github.com/visulima/visulima/commit/1d19db3db45d060f22028692e677c935e8a36a2e))
297
+ * **string:** apply pending lint and source updates ([25b371c](https://github.com/visulima/visulima/commit/25b371c5026b200c87f88f7b424b6d8bd53f901a))
298
+
1
299
  ## @visulima/string [3.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/string@3.0.0-alpha.8...@visulima/string@3.0.0-alpha.9) (2026-04-08)
2
300
 
3
301
  ### Features
package/LICENSE.md CHANGED
@@ -530,14 +530,11 @@ Repository: https://github.com/alexreardon/tiny-invariant.git
530
530
  <!-- TYPE_DEPENDENCIES -->
531
531
 
532
532
  # Licenses of bundled types
533
-
534
533
  The published @visulima/string artifact additionally contains code with the following licenses:
535
534
  MIT
536
535
 
537
536
  # Bundled types:
538
-
539
537
  ## fastest-levenshtein
540
-
541
538
  License: MIT
542
539
  By: Kasper U. Weihe
543
540
  Repository: git+https://github.com/ka-weihe/fastest-levenshtein.git
@@ -564,4 +561,72 @@ Repository: git+https://github.com/ka-weihe/fastest-levenshtein.git
564
561
  > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
565
562
  > SOFTWARE.
566
563
 
564
+ ---------------------------------------
565
+
566
+ ## get-east-asian-width
567
+ License: MIT
568
+ By: Sindre Sorhus
569
+ Repository: sindresorhus/get-east-asian-width
570
+
571
+ > MIT License
572
+ >
573
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
574
+ >
575
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
576
+ >
577
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
578
+ >
579
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
580
+
581
+ ---------------------------------------
582
+
583
+ ## indent-string
584
+ License: MIT
585
+ By: Sindre Sorhus
586
+ Repository: sindresorhus/indent-string
587
+
588
+ > MIT License
589
+ >
590
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
591
+ >
592
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
593
+ >
594
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
595
+ >
596
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
597
+
598
+ ---------------------------------------
599
+
600
+ ## redent
601
+ License: MIT
602
+ By: Sindre Sorhus
603
+ Repository: sindresorhus/redent
604
+
605
+ > MIT License
606
+ >
607
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
608
+ >
609
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
610
+ >
611
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
612
+ >
613
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
614
+
615
+ ---------------------------------------
616
+
617
+ ## strip-indent
618
+ License: MIT
619
+ By: Sindre Sorhus
620
+ Repository: sindresorhus/strip-indent
621
+
622
+ > MIT License
623
+ >
624
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
625
+ >
626
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
627
+ >
628
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
629
+ >
630
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
631
+
567
632
  <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -555,6 +555,47 @@ sentenceCase("AJAXRequest"); // 'Ajax request'
555
555
  sentenceCase("QueryXML123String"); // 'Query xml 123 string'
556
556
  ```
557
557
 
558
+ #### flipCase
559
+
560
+ Flips the case of every character (lower → upper, upper → lower). Accepts the same `FlipOptions` (a `CaseOptions` minus `handleEmoji`) as the other case helpers, including `cache`, `locale`, `stripEmoji`, `stripAnsi`, and `handleAnsi`.
561
+
562
+ ```typescript
563
+ import { flipCase } from "@visulima/string";
564
+
565
+ flipCase("FooBar"); // 'fOObAR'
566
+ flipCase("foobar"); // 'FOOBAR'
567
+ flipCase("FOOBAR"); // 'foobar'
568
+ flipCase("XMLHttpRequest"); // 'xmlhTTPrEQUEST'
569
+ ```
570
+
571
+ #### identifyCase
572
+
573
+ Detects the case style of a string. Returns one of `"camel" | "pascal" | "snake" | "upper_snake" | "kebab" | "title" | "sentence" | "lower" | "upper" | "mixed" | "unknown"`. Throws a `TypeError` for non-string input.
574
+
575
+ ```typescript
576
+ import { identifyCase } from "@visulima/string";
577
+
578
+ identifyCase("fooBar"); // 'camel'
579
+ identifyCase("FooBar"); // 'pascal'
580
+ identifyCase("foo_bar"); // 'snake'
581
+ identifyCase("FOO_BAR"); // 'upper_snake'
582
+ identifyCase("foo-bar"); // 'kebab'
583
+ identifyCase("foo"); // 'lower'
584
+ identifyCase("FOO"); // 'upper'
585
+ identifyCase("FooBAR"); // 'mixed'
586
+ ```
587
+
588
+ ### Excerpt (HTML-aware truncation)
589
+
590
+ `excerpt` strips HTML tags and decodes entities, then truncates the resulting plain text to a character limit. It accepts the `TruncateOptions` (minus `position`, which is fixed to `"end"`). It throws a `TypeError` if `html` is not a string or `limit` is not a number.
591
+
592
+ ```typescript
593
+ import { excerpt } from "@visulima/string";
594
+
595
+ excerpt("<p>Hello <strong>world</strong>!</p>", 10); // 'Hello worl…'
596
+ excerpt("<div>This is a <em>long</em> text</div>", 20, { ellipsis: "..." }); // 'This is a long text'
597
+ ```
598
+
558
599
  ### String Width Calculation
559
600
 
560
601
  The package provides two functions for calculating string widths: `getStringWidth` for basic width calculation and `getStringTruncatedWidth` for width calculation with truncation support.
@@ -1076,13 +1117,14 @@ It transliterates non-ASCII characters using the `transliterate` function (if en
1076
1117
  - `allowedChars?: string`: Characters allowed in the slug. Others are replaced by `separator`. (Default: `"a-zA-Z0-9-_.~"`)
1077
1118
  - `fixChineseSpacing?: boolean`: Passed to `transliterate`. Determines if a space is added between transliterated Chinese characters (default: `true`).
1078
1119
  - `ignore?: string[]`: Passed to `transliterate`. Characters/strings to ignore during the initial transliteration phase (default: `[]`).
1079
- - `lowercase?: boolean`: Convert to lowercase. (Default: `true`). Cannot be true if `uppercase` is true.
1120
+ - `locale?: string`: Locale-aware transliteration. When set, locale-specific replacements are applied _before_ the global character map, so e.g. German `ö` becomes `oe` and Serbian `đ` becomes `dj`. Only the primary subtag is used (so `"de-DE"` resolves to `"de"`); unknown locales fall back to the global map. Supported locales: `de`, `da`, `nb`, `sr`, `tr`, `vi`. (Default: `undefined`).
1121
+ - `lowercase?: boolean`: Convert to lowercase. (Default: `true`). Cannot be `true` if `uppercase` is `true` — passing both throws a `TypeError`.
1080
1122
  - `replaceAfter?: OptionReplaceCombined`: Passed to `transliterate`. Search/replace pairs to apply _after_ the character map transliteration but _before_ slugification logic (default: `[]`).
1081
1123
  - `replaceBefore?: OptionReplaceCombined`: Passed to `transliterate`. Search/replace pairs to apply _before_ any transliteration (default: `[]`).
1082
1124
  - `separator?: string`: Custom separator. (Default: `"-"`).
1083
1125
  - `transliterate?: boolean`: Whether to perform the initial transliteration of non-ASCII characters. If `false`, only case conversion and character filtering/replacement are performed on the input string. (Default: `true`).
1084
1126
  - `unknown?: string`: Passed to `transliterate`. Character to use for unknown characters during transliteration (default: `""`).
1085
- - `uppercase?: boolean`: Convert to uppercase. (Default: `false`). Cannot be true if `lowercase` is true.
1127
+ - `uppercase?: boolean`: Convert to uppercase. (Default: `false`). Cannot be `true` if `lowercase` is `true` — passing both throws a `TypeError`.
1086
1128
 
1087
1129
  **Returns:**
1088
1130
 
@@ -1101,8 +1143,44 @@ slugify("FOO BAR", { lowercase: false, uppercase: true }); // 'FOO-BAR'
1101
1143
  slugify("foo bar baz", { separator: "_", allowedChars: "a-z_" }); // 'foo_bar_baz'
1102
1144
  slugify("Keep C++", { replaceBefore: { "C++": "cpp" } }); // 'keep-cpp'
1103
1145
  slugify("Keep !@#$", { allowedChars: "a-z!@$" }); // 'keep!@$'
1146
+
1147
+ // Locale-aware transliteration
1148
+ slugify("Käse-Spätzle", { locale: "de" }); // 'kaese-spaetzle'
1149
+ slugify("Đorđe", { locale: "sr" }); // 'djordje'
1104
1150
  ```
1105
1151
 
1152
+ ### String Similarity
1153
+
1154
+ The package ships several similarity helpers built on Levenshtein edit distance, useful for "did you mean?" UX, fuzzy matching, and sorting suggestions.
1155
+
1156
+ ```typescript
1157
+ import { closest, closestN, compareSimilarity, closestString, distance, similarity, wordSimilaritySort } from "@visulima/string";
1158
+
1159
+ // Raw Levenshtein edit distance (number of single-character edits).
1160
+ distance("kitten", "sitting"); // 3
1161
+
1162
+ // Normalized similarity score in the range [0, 1] (1 === identical).
1163
+ similarity("kitten", "sitting"); // ~0.571
1164
+ similarity("foo", "foo"); // 1
1165
+
1166
+ // The single closest match from a list.
1167
+ closest("fast", ["slow", "faster", "fastest"]); // 'faster'
1168
+
1169
+ // The N closest matches, best-first.
1170
+ closestN("fast", ["slow", "faster", "fastest", "fanta"], 2); // ['faster', 'fastest']
1171
+
1172
+ // Find the closest string (with options), e.g. for command suggestions.
1173
+ closestString("instal", ["install", "uninstall", "list"]); // 'install'
1174
+
1175
+ // Sort an array by similarity to a target string.
1176
+ wordSimilaritySort("hlelo", ["hello", "world", "help"]); // ['hello', 'help', 'world']
1177
+
1178
+ // A comparator you can pass to Array#sort.
1179
+ ["bar", "baz", "foo"].sort(compareSimilarity("ba")); // ['bar', 'baz', 'foo']
1180
+ ```
1181
+
1182
+ > `compareSimilarity`, `closestString`, and `wordSimilaritySort` accept an options object (`CompareSimilarityOptions` / `ClosestStringOptions` / `WordSimilaritySortOptions`) — see the inline JSDoc for details.
1183
+
1106
1184
  ### Text Alignment
1107
1185
 
1108
1186
  The `alignText` function aligns text (including multi-line strings and strings with ANSI escape codes) to the left, center, or right. It can handle both single strings (which can be split into lines based on the `split` option) and arrays of strings.
@@ -1,10 +1,45 @@
1
1
  import { StringWidthOptions } from "./get-string-width.js";
2
2
  import "./get-string-truncated-width.js";
3
+ /**
4
+ * Options for controlling the text alignment.
5
+ */
3
6
  type AlignTextOptions = {
7
+ /**
8
+ * The alignment direction.
9
+ * @default "center"
10
+ */
4
11
  align?: "center" | "left" | "right";
12
+ /**
13
+ * Character used for padding when aligning text.
14
+ * @default " "
15
+ */
5
16
  pad?: string;
17
+ /**
18
+ * The character to split the input string by, if it's a single string.
19
+ * @default "\n"
20
+ */
6
21
  split?: string;
22
+ /**
23
+ * Options to pass to `getStringWidth` for calculating the width of each line.
24
+ */
7
25
  stringWidthOptions?: StringWidthOptions;
8
26
  };
27
+ /**
28
+ * Aligns text (including multi-line strings with ANSI escape codes) to the left, center, or right.
29
+ * @example
30
+ * ```typescript
31
+ * alignText("Hello\nWorld!", { align: "right" });
32
+ * // => " Hello\nWorld!"
33
+ *
34
+ * alignText(["Beep", "Boop\nBop"], { align: "center" });
35
+ * // => [
36
+ * // " Beep",
37
+ * // "Boop\n Bop"
38
+ * // ]
39
+ * ```
40
+ * @param text The string or array of strings to align.
41
+ * @param options Options for controlling the alignment.
42
+ * @returns The aligned string or array of strings, matching the input type.
43
+ */
9
44
  declare const alignText: (text: string[] | string, options?: AlignTextOptions) => string[] | string;
10
45
  export { AlignTextOptions, alignText };
@@ -1,34 +1,2 @@
1
- import { getStringWidth } from './get-string-width.js';
2
-
3
- const halfDiff = (maxWidth, currentWidth) => Math.floor((maxWidth - currentWidth) / 2);
4
- const fullDiff = (maxWidth, currentWidth) => maxWidth - currentWidth;
5
- const alignText = (text, options = {}) => {
6
- const align = options.align ?? "center";
7
- if (align === "left") {
8
- return text;
9
- }
10
- const split = options.split ?? "\n";
11
- const pad = options.pad ?? " ";
12
- const widthDiffFunction = align === "right" ? fullDiff : halfDiff;
13
- let returnString = false;
14
- let lines;
15
- if (Array.isArray(text)) {
16
- lines = text;
17
- } else {
18
- returnString = true;
19
- lines = text.split(split);
20
- }
21
- let width;
22
- let maxWidth = 0;
23
- const result = lines.map((input) => {
24
- width = getStringWidth(input, options.stringWidthOptions);
25
- maxWidth = Math.max(width, maxWidth);
26
- return {
27
- str: input,
28
- width
29
- };
30
- }).map((object) => Array.from({ length: widthDiffFunction(maxWidth, object.width) + 1 }).join(pad) + object.str);
31
- return returnString ? result.join(split) : result;
32
- };
33
-
34
- export { alignText };
1
+ import{getStringWidth as f}from"./get-string-width.js";const m=(t,r)=>Math.floor((t-r)/2),c=(t,r)=>t-r,u=(t,r={})=>{const s=r.align??"center";if(s==="left")return t;const a=r.split??`
2
+ `,g=r.pad??" ",h=s==="right"?c:m;let l=!1,i;Array.isArray(t)?i=t:(l=!0,i=t.split(a));let o,e=0;const p=i.map(n=>(o=f(n,r.stringWidthOptions),e=Math.max(o,e),{str:n,width:o})).map(n=>Array.from({length:h(e,n.width)+1}).join(g)+n.str);return l?p.join(a):p};export{u as alignText};
@@ -1,5 +1,19 @@
1
- import { C as CaseOptions, a as CamelCase } from "../packem_shared/types.d-DfgbcNKh.js";
2
- import "../packem_shared/types.d-BVNv675q.js";
3
- import "../packem_shared/lru-cache.d-BsP6kbVJ.js";
1
+ import { b as CaseOptions, C as CamelCase } from "../packem_shared/types.d-fhe030jX.js";
2
+ import "../packem_shared/types.d-CmNvyl4l.js";
3
+ /**
4
+ * Converts a string to camelCase.
5
+ * @param value The string to convert.
6
+ * @param options Options for case conversion.
7
+ * @returns The string in camelCase.
8
+ * @example
9
+ * ```typescript
10
+ * camelCase('foo bar') // 'fooBar'
11
+ * camelCase('foo-bar') // 'fooBar'
12
+ * camelCase('foo_bar') // 'fooBar'
13
+ * camelCase('XMLHttpRequest') // 'xmlHttpRequest'
14
+ * camelCase('AJAXRequest') // 'ajaxRequest'
15
+ * camelCase('QueryXML123String') // 'queryXml123String'
16
+ * ```
17
+ */
4
18
  declare const camelCase: <T extends string = string>(value?: T, options?: CaseOptions) => CamelCase<T>;
5
19
  export { camelCase as default };