@design-edito/tools 0.2.39 → 0.2.40

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 (748) hide show
  1. package/agnostic/arrays/dedupe/index.d.ts +7 -0
  2. package/agnostic/arrays/dedupe/index.js +10 -0
  3. package/agnostic/arrays/find-duplicates/index.d.ts +14 -0
  4. package/agnostic/arrays/find-duplicates/index.js +24 -5
  5. package/agnostic/arrays/find-duplicates/index.test.d.ts +1 -0
  6. package/agnostic/arrays/is-array-of/index.d.ts +15 -4
  7. package/agnostic/arrays/is-array-of/index.js +23 -4
  8. package/agnostic/arrays/is-array-of/index.test.d.ts +1 -0
  9. package/agnostic/arrays/make/index.d.ts +8 -0
  10. package/agnostic/arrays/make/index.js +6 -4
  11. package/agnostic/arrays/make/index.test.d.ts +1 -0
  12. package/agnostic/arrays/random-pick/index.d.ts +20 -0
  13. package/agnostic/arrays/random-pick/index.js +2 -10
  14. package/agnostic/arrays/random-pick/index.test.d.ts +1 -0
  15. package/agnostic/arrays/shuffle/index.d.ts +8 -0
  16. package/agnostic/arrays/shuffle/index.js +11 -4
  17. package/agnostic/arrays/shuffle/index.test.d.ts +1 -0
  18. package/agnostic/booleans/is-falsy/index.d.ts +17 -0
  19. package/agnostic/booleans/is-falsy/index.js +1 -1
  20. package/agnostic/colors/channels/index.d.ts +34 -0
  21. package/agnostic/colors/channels/index.js +6 -6
  22. package/agnostic/colors/contrast/index.d.ts +8 -0
  23. package/agnostic/colors/contrast/index.js +27 -8
  24. package/agnostic/colors/convert/index.d.ts +144 -0
  25. package/agnostic/colors/convert/index.js +5 -5
  26. package/agnostic/colors/distance/index.d.ts +8 -0
  27. package/agnostic/colors/distance/index.js +50 -7
  28. package/agnostic/colors/grayscale/index.d.ts +9 -1
  29. package/agnostic/colors/grayscale/index.js +156 -7
  30. package/agnostic/colors/invert/index.d.ts +8 -0
  31. package/agnostic/colors/invert/index.js +45 -7
  32. package/agnostic/colors/lerp/index.d.ts +12 -1
  33. package/agnostic/colors/lerp/index.js +97 -7
  34. package/agnostic/colors/luminance/index.d.ts +7 -0
  35. package/agnostic/colors/luminance/index.js +6 -6
  36. package/agnostic/colors/palette/index.d.ts +10 -1
  37. package/agnostic/colors/palette/index.js +104 -9
  38. package/agnostic/colors/rotate/index.d.ts +10 -1
  39. package/agnostic/colors/rotate/index.js +7 -7
  40. package/agnostic/colors/tidy/index.d.ts +9 -1
  41. package/agnostic/colors/tidy/index.js +5 -5
  42. package/agnostic/colors/typechecks/index.d.ts +60 -0
  43. package/agnostic/colors/typechecks/index.js +3 -3
  44. package/agnostic/colors/types.d.ts +106 -0
  45. package/agnostic/colors/types.js +2 -2
  46. package/agnostic/css/bem/index.d.ts +29 -6
  47. package/agnostic/css/bem/index.js +155 -6
  48. package/agnostic/css/generate-nice-color/index.d.ts +8 -2
  49. package/agnostic/css/generate-nice-color/index.js +70 -5
  50. package/agnostic/css/is-valid-css-class-name/index.d.ts +11 -0
  51. package/agnostic/css/is-valid-css-class-name/index.js +1 -1
  52. package/agnostic/css/styles-set/index.js +167 -15
  53. package/agnostic/errors/register/index.d.ts +31 -33
  54. package/agnostic/errors/register/index.js +49 -5
  55. package/agnostic/errors/unknown-to-string/index.d.ts +6 -0
  56. package/agnostic/errors/unknown-to-string/index.js +1 -1
  57. package/agnostic/html/get-node-ancestors/index.d.ts +12 -0
  58. package/agnostic/html/get-node-ancestors/index.js +1 -1
  59. package/agnostic/html/get-position-inside-parent/index.d.ts +8 -0
  60. package/agnostic/html/get-position-inside-parent/index.js +8 -4
  61. package/agnostic/html/hyper-json/cast/index.js +12 -12
  62. package/agnostic/html/hyper-json/index.js +40 -16
  63. package/agnostic/html/hyper-json/method/index.js +1 -1
  64. package/agnostic/html/hyper-json/serialize/index.js +5 -5
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +12 -12
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +12 -12
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +12 -12
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +12 -12
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +12 -12
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +12 -12
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +12 -12
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +12 -12
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +12 -12
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +12 -12
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +12 -12
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +12 -12
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.js +12 -12
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.js +12 -12
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +12 -12
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +12 -12
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +12 -12
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +12 -12
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +12 -12
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +12 -12
  85. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +12 -12
  86. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +12 -12
  87. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +12 -12
  88. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +12 -12
  89. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +12 -12
  90. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +12 -12
  91. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +12 -12
  92. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +12 -12
  93. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +12 -12
  94. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +12 -12
  95. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +12 -12
  96. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +12 -12
  97. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +12 -12
  98. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +12 -12
  99. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +12 -12
  100. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +12 -12
  101. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +12 -12
  102. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +12 -12
  103. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +12 -12
  104. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +12 -12
  105. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +12 -12
  106. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +12 -12
  107. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +12 -12
  108. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +12 -12
  109. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +12 -12
  110. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +12 -12
  111. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +12 -12
  112. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +12 -12
  113. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +12 -12
  114. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +12 -12
  115. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +12 -12
  116. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +12 -12
  117. package/agnostic/html/hyper-json/smart-tags/index.js +4 -4
  118. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +5 -5
  119. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +5 -5
  120. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +12 -12
  121. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +12 -12
  122. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +12 -12
  123. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +12 -12
  124. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +12 -12
  125. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +12 -12
  126. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +5 -5
  127. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +12 -12
  128. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +12 -12
  129. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +12 -12
  130. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +12 -12
  131. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +12 -12
  132. package/agnostic/html/hyper-json/transformer/index.d.ts +1 -1
  133. package/agnostic/html/hyper-json/transformer/index.js +3 -3
  134. package/agnostic/html/hyper-json/tree/index.js +12 -12
  135. package/agnostic/html/hyper-json/types/index.d.ts +1 -1
  136. package/agnostic/html/hyper-json/types/index.js +1 -1
  137. package/agnostic/html/hyper-json/utils/index.d.ts +1 -1
  138. package/agnostic/html/hyper-json/utils/index.js +12 -12
  139. package/agnostic/html/insert-node/index.d.ts +17 -0
  140. package/agnostic/html/insert-node/index.js +1 -1
  141. package/agnostic/html/placeholders/index.d.ts +7 -9
  142. package/agnostic/html/placeholders/index.js +37 -5
  143. package/agnostic/html/replace-in-element/index.d.ts +14 -0
  144. package/agnostic/html/replace-in-element/index.js +1 -1
  145. package/agnostic/html/selector-to-element/index.d.ts +16 -1
  146. package/agnostic/html/selector-to-element/index.js +29 -11
  147. package/agnostic/html/string-to-nodes/index.d.ts +14 -7
  148. package/agnostic/html/string-to-nodes/index.js +14 -12
  149. package/agnostic/misc/assert/index.d.ts +5 -7
  150. package/agnostic/misc/assert/index.js +61 -8
  151. package/agnostic/misc/cast/index.d.ts +81 -10
  152. package/agnostic/misc/cast/index.js +18 -4
  153. package/agnostic/misc/connection/index.d.ts +26 -0
  154. package/agnostic/misc/connection/index.js +39 -0
  155. package/agnostic/misc/crawler/index.d.ts +63 -16
  156. package/agnostic/misc/crawler/index.js +36 -5
  157. package/agnostic/misc/crossenv/detect-runtime/index.d.ts +12 -2
  158. package/agnostic/misc/crossenv/detect-runtime/index.js +14 -5
  159. package/agnostic/misc/crossenv/types.d.ts +39 -0
  160. package/agnostic/misc/crossenv/types.js +7 -0
  161. package/agnostic/misc/crossenv/window/index.d.ts +28 -7
  162. package/agnostic/misc/crossenv/window/index.js +10 -4
  163. package/agnostic/misc/crossenv/window/index.test.d.ts +1 -0
  164. package/agnostic/misc/data-size/index.d.ts +43 -21
  165. package/agnostic/misc/data-size/index.js +270 -34
  166. package/agnostic/misc/data-size/types.d.ts +37 -0
  167. package/agnostic/misc/elo/index.d.ts +28 -30
  168. package/agnostic/misc/elo/index.js +27 -30
  169. package/agnostic/misc/is-constructor-function/index.d.ts +11 -0
  170. package/agnostic/misc/is-constructor-function/index.js +1 -1
  171. package/agnostic/misc/is-nullish/index.d.ts +22 -0
  172. package/agnostic/misc/is-nullish/index.js +1 -1
  173. package/agnostic/misc/logs/logger/index.js +109 -4
  174. package/agnostic/misc/logs/make-text-block/index.js +1 -1
  175. package/agnostic/misc/logs/styles/index.js +1 -1
  176. package/agnostic/misc/lorem-ipsum/index.d.ts +3 -5
  177. package/agnostic/misc/lorem-ipsum/index.js +187 -23
  178. package/agnostic/misc/normalize-extension/index.d.ts +10 -0
  179. package/agnostic/misc/normalize-extension/index.js +1 -1
  180. package/agnostic/misc/outcome/index.d.ts +56 -15
  181. package/agnostic/misc/outcome/index.js +8 -4
  182. package/agnostic/numbers/absolute-modulo/index.d.ts +7 -0
  183. package/agnostic/numbers/absolute-modulo/index.js +1 -1
  184. package/agnostic/numbers/clamp/index.d.ts +8 -0
  185. package/agnostic/numbers/clamp/index.js +1 -1
  186. package/agnostic/numbers/interpolate/index.d.ts +20 -1
  187. package/agnostic/numbers/interpolate/index.js +12 -7
  188. package/agnostic/numbers/responsive-harmonics/index.d.ts +20 -0
  189. package/agnostic/numbers/responsive-harmonics/index.js +49 -5
  190. package/agnostic/numbers/round/index.d.ts +24 -3
  191. package/agnostic/numbers/round/index.js +2 -2
  192. package/agnostic/objects/deep-get-property/index.d.ts +8 -0
  193. package/agnostic/objects/deep-get-property/index.js +23 -4
  194. package/agnostic/objects/enums/is-in-enum/index.d.ts +10 -0
  195. package/agnostic/objects/enums/is-in-enum/index.js +1 -1
  196. package/agnostic/objects/flatten-getters/index.d.ts +6 -0
  197. package/agnostic/objects/flatten-getters/index.js +19 -4
  198. package/agnostic/objects/is-object/index.d.ts +12 -0
  199. package/agnostic/objects/is-object/index.js +1 -1
  200. package/agnostic/objects/is-record/index.d.ts +6 -0
  201. package/agnostic/objects/is-record/index.js +1 -1
  202. package/agnostic/objects/record-format/index.d.ts +27 -0
  203. package/agnostic/objects/record-format/index.js +15 -4
  204. package/agnostic/objects/record-map/index.d.ts +9 -0
  205. package/agnostic/objects/record-map/index.js +1 -1
  206. package/agnostic/objects/validation/index.d.ts +11 -3
  207. package/agnostic/objects/validation/index.js +9 -5
  208. package/agnostic/optim/memoize/index.d.ts +10 -1
  209. package/agnostic/optim/memoize/index.js +16 -4
  210. package/agnostic/optim/throttle-debounce/index.js +110 -5
  211. package/agnostic/optim/throttle-debounce/types.d.ts +1 -1
  212. package/agnostic/random/hex-char/index.d.ts +2 -0
  213. package/agnostic/random/hex-char/index.js +1 -1
  214. package/agnostic/random/random/index.d.ts +14 -0
  215. package/agnostic/random/random/index.js +1 -1
  216. package/agnostic/random/uuid/index.d.ts +18 -0
  217. package/agnostic/random/uuid/index.js +1 -1
  218. package/agnostic/regexps/index.d.ts +95 -24
  219. package/agnostic/regexps/index.js +86 -5
  220. package/agnostic/sanitization/file-name/index.d.ts +13 -0
  221. package/agnostic/sanitization/file-name/index.js +7 -0
  222. package/agnostic/sanitization/html/index.d.ts +61 -0
  223. package/agnostic/sanitization/html/index.js +121 -0
  224. package/agnostic/sanitization/path/index.d.ts +11 -0
  225. package/agnostic/sanitization/path/index.js +14 -0
  226. package/agnostic/sanitization/types.d.ts +37 -0
  227. package/agnostic/sanitization/types.js +0 -0
  228. package/agnostic/sanitization/user-input/index.d.ts +13 -0
  229. package/agnostic/sanitization/user-input/index.js +23 -0
  230. package/agnostic/strings/char-codes/index.d.ts +82 -17
  231. package/agnostic/strings/char-codes/index.js +68 -5
  232. package/agnostic/strings/matches/index.d.ts +24 -0
  233. package/agnostic/strings/matches/index.js +1 -1
  234. package/agnostic/strings/normalize-indent/index.d.ts +22 -0
  235. package/agnostic/strings/normalize-indent/index.js +16 -4
  236. package/agnostic/strings/parse-table/index.d.ts +123 -66
  237. package/agnostic/strings/parse-table/index.js +83 -4
  238. package/agnostic/strings/replace-all/index.d.ts +20 -0
  239. package/agnostic/strings/replace-all/index.js +2 -2
  240. package/agnostic/strings/to-alphanum/index.d.ts +18 -0
  241. package/agnostic/strings/to-alphanum/index.js +8 -4
  242. package/agnostic/strings/trim/index.d.ts +18 -0
  243. package/agnostic/strings/trim/index.js +1 -1
  244. package/agnostic/time/dates/format-date/index.d.ts +47 -0
  245. package/agnostic/time/dates/format-date/index.js +58 -4
  246. package/agnostic/time/duration/index.d.ts +38 -25
  247. package/agnostic/time/duration/index.js +110 -5
  248. package/agnostic/time/timeout/index.d.ts +8 -0
  249. package/agnostic/time/timeout/index.js +16 -4
  250. package/agnostic/time/transitions/index.d.ts +73 -40
  251. package/agnostic/time/transitions/index.js +158 -5
  252. package/agnostic/time/wait/index.d.ts +6 -0
  253. package/agnostic/time/wait/index.js +1 -1
  254. package/chunks/{chunk-CLLJV343.js → chunk-27SSMK5F.js} +8 -7
  255. package/chunks/{chunk-FNQAF6CQ.js → chunk-2QDYPY2O.js} +5 -5
  256. package/chunks/{chunk-ON6LC3HE.js → chunk-2WSVYQ5Q.js} +6 -13
  257. package/chunks/chunk-4WE2WEXL.js +12 -0
  258. package/chunks/{chunk-QWNWZBIO.js → chunk-53ILYMIY.js} +8 -7
  259. package/chunks/{chunk-FF5NURFO.js → chunk-54KPQCVI.js} +6 -13
  260. package/chunks/{chunk-SRXNICSE.js → chunk-5CFQCSKJ.js} +6 -5
  261. package/chunks/{chunk-FKDPPFHV.js → chunk-5NTPCRFH.js} +1 -11
  262. package/chunks/{chunk-IV75M3KE.js → chunk-5O52VUI6.js} +6 -13
  263. package/chunks/{chunk-4XSDRT23.js → chunk-5X76KDYN.js} +7 -14
  264. package/chunks/{chunk-RHKFMXM3.js → chunk-65BFQP3T.js} +6 -5
  265. package/chunks/{chunk-7J7CYOXU.js → chunk-66BURDRK.js} +8 -15
  266. package/chunks/{chunk-ZEZCYPLQ.js → chunk-6BGIDRU5.js} +7 -14
  267. package/chunks/{chunk-5ZJ3KJPK.js → chunk-6YVXSCRH.js} +7 -14
  268. package/chunks/{chunk-NMYVJJXV.js → chunk-7B2E2NGH.js} +7 -14
  269. package/chunks/{chunk-YXLHZ2KW.js → chunk-AKFDKOHE.js} +2 -2
  270. package/chunks/{chunk-QAVYONH6.js → chunk-AKNR3U25.js} +5 -5
  271. package/chunks/{chunk-CVDCTI7F.js → chunk-AOEOW5XW.js} +7 -14
  272. package/chunks/{chunk-QSU3CVGF.js → chunk-ASWI3EO6.js} +6 -5
  273. package/chunks/{chunk-QWZ4ZNFA.js → chunk-AV373PHY.js} +8 -15
  274. package/chunks/{chunk-VROZGPC5.js → chunk-AXMAF3J2.js} +7 -14
  275. package/chunks/{chunk-QTA7ZEVX.js → chunk-AYGAQQXD.js} +6 -5
  276. package/chunks/chunk-BHGRXDTS.js +28 -0
  277. package/chunks/{chunk-CNYSX2L2.js → chunk-BQABPH3I.js} +7 -14
  278. package/chunks/{chunk-WV5N7ESL.js → chunk-BQXTV2GG.js} +9 -16
  279. package/chunks/{chunk-37TRFYZT.js → chunk-BXFRBV67.js} +6 -13
  280. package/chunks/{chunk-3LCD73SB.js → chunk-C4VX4TTP.js} +1 -1
  281. package/chunks/{chunk-3CLGBOHN.js → chunk-DBNCEHTT.js} +6 -13
  282. package/chunks/{chunk-HRNDUTZE.js → chunk-DBZAJJUF.js} +8 -15
  283. package/chunks/{chunk-SXRWMH3U.js → chunk-DUCLFPGE.js} +5 -5
  284. package/chunks/{chunk-UK2F7CWI.js → chunk-EBQRPRRC.js} +6 -13
  285. package/chunks/{chunk-TGVYEQIA.js → chunk-EEPLTO3E.js} +7 -14
  286. package/chunks/{chunk-D5CCWCEI.js → chunk-ENOTZXFS.js} +1 -1
  287. package/chunks/{chunk-ZTDVUXPR.js → chunk-EPUHVR7J.js} +1 -0
  288. package/chunks/{chunk-NCYE5WML.js → chunk-FAAIUU6V.js} +4 -4
  289. package/chunks/{chunk-REZC75LB.js → chunk-FH74QWR6.js} +10 -18
  290. package/chunks/{chunk-FD5WR2A5.js → chunk-FM3HGCFL.js} +8 -15
  291. package/chunks/{chunk-W3RXHN5I.js → chunk-FSI422YG.js} +6 -13
  292. package/chunks/{chunk-UT2J62LH.js → chunk-HEY7J6GI.js} +1 -1
  293. package/chunks/chunk-HOFEVF7T.js +61 -0
  294. package/chunks/chunk-HYPEWMYZ.js +10 -0
  295. package/chunks/{chunk-V3L55I2S.js → chunk-IBQQCUYV.js} +6 -13
  296. package/chunks/{chunk-2HJPX7E3.js → chunk-IK2S6ZYP.js} +6 -5
  297. package/chunks/{chunk-V3GX7SIJ.js → chunk-ISJONMNA.js} +1 -13
  298. package/chunks/{chunk-ZJTWDCNZ.js → chunk-J5D4OQ5U.js} +6 -13
  299. package/chunks/{chunk-67V4BGOB.js → chunk-JDINERKY.js} +1 -1
  300. package/chunks/{chunk-ZSUG52DO.js → chunk-JFXEMK66.js} +6 -13
  301. package/chunks/{chunk-RWO53U4X.js → chunk-JN2UETL4.js} +7 -14
  302. package/chunks/chunk-JU23NBY2.js +22 -0
  303. package/chunks/{chunk-BKO7GLC2.js → chunk-JVMFT3IT.js} +7 -6
  304. package/chunks/{chunk-AQBJ6HNB.js → chunk-K5UF634H.js} +1 -5
  305. package/chunks/{chunk-7UGMWTP5.js → chunk-KRYJVBO5.js} +1 -10
  306. package/chunks/{chunk-DZ2T5DTY.js → chunk-LFHDJTZJ.js} +1 -1
  307. package/chunks/{chunk-3G6FOHII.js → chunk-MHNUCHPP.js} +6 -5
  308. package/chunks/{chunk-P5JJOC5K.js → chunk-MSJ7WDFX.js} +8 -7
  309. package/chunks/{chunk-5VHFXWFM.js → chunk-NEMHJSNM.js} +6 -13
  310. package/chunks/{chunk-BWYH445G.js → chunk-NIIAUOBO.js} +6 -13
  311. package/chunks/{chunk-HFZGH6V2.js → chunk-NR7STUY3.js} +6 -5
  312. package/chunks/{chunk-2JH4TCT2.js → chunk-O66PEU62.js} +6 -13
  313. package/chunks/{chunk-QH64MYGA.js → chunk-O7UCJNVF.js} +7 -14
  314. package/chunks/{chunk-WAHPAZQS.js → chunk-OF2W4ZRG.js} +6 -13
  315. package/chunks/{chunk-P26Y7YUA.js → chunk-PTJO2TGI.js} +6 -5
  316. package/chunks/{chunk-BE7OXZRK.js → chunk-PTN2V757.js} +7 -14
  317. package/chunks/chunk-QEKI6WGQ.js +27 -0
  318. package/chunks/{chunk-EOE2ODJR.js → chunk-QHEWBOQI.js} +3 -3
  319. package/chunks/{chunk-N2T672IG.js → chunk-RGQNRTBI.js} +6 -13
  320. package/chunks/chunk-ROWPCMQY.js +29 -0
  321. package/chunks/{chunk-KJAEVOIW.js → chunk-S2I77NEE.js} +8 -15
  322. package/chunks/{chunk-CWZFRUBS.js → chunk-S6ZFFGWH.js} +7 -14
  323. package/chunks/{chunk-6IYUA43Q.js → chunk-SBBIQ5UH.js} +7 -14
  324. package/chunks/{chunk-IYQV2LP4.js → chunk-SGGJJ46D.js} +321 -319
  325. package/chunks/{chunk-YVKM7N55.js → chunk-U225LGOV.js} +8 -7
  326. package/chunks/{chunk-HWEGQVBQ.js → chunk-ULYGDEW2.js} +6 -13
  327. package/chunks/{chunk-QAQZEKIF.js → chunk-USIYKRNX.js} +6 -6
  328. package/chunks/{chunk-FB3GNE2B.js → chunk-UZ4SWSOZ.js} +8 -15
  329. package/chunks/{chunk-4XBUJAQU.js → chunk-VU6JYR3W.js} +7 -14
  330. package/chunks/{chunk-FE4DECBU.js → chunk-VYDUHDXW.js} +7 -14
  331. package/chunks/{chunk-BSUQNHAM.js → chunk-W5VY535B.js} +7 -14
  332. package/chunks/{chunk-STPN5KZL.js → chunk-WF2JNQV4.js} +8 -7
  333. package/chunks/chunk-XCBH6NLF.js +42 -0
  334. package/chunks/chunk-XIIJYVJZ.js +15 -0
  335. package/chunks/{chunk-QDVDHFMZ.js → chunk-Y6FD4ASO.js} +7 -14
  336. package/chunks/{chunk-C6QTHDDM.js → chunk-YOP6WVCF.js} +7 -14
  337. package/chunks/chunk-ZKIQ753F.js +23 -0
  338. package/chunks/{chunk-QLDN574K.js → chunk-ZTPRFEPV.js} +7 -14
  339. package/components/Comp/index.js +7 -4
  340. package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +4 -12
  341. package/node/@aws-s3/storage/directory/copy-dir/index.js +3 -3
  342. package/node/@aws-s3/storage/directory/list/index.d.ts +1 -1
  343. package/node/@aws-s3/storage/directory/list/index.js +3 -3
  344. package/node/@aws-s3/storage/directory/move-dir/index.d.ts +1 -1
  345. package/node/@aws-s3/storage/directory/move-dir/index.js +3 -3
  346. package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +1 -1
  347. package/node/@aws-s3/storage/directory/remove-dir/index.js +3 -3
  348. package/node/@aws-s3/storage/file/copy/index.d.ts +1 -1
  349. package/node/@aws-s3/storage/file/copy/index.js +3 -3
  350. package/node/@aws-s3/storage/file/download/index.d.ts +1 -1
  351. package/node/@aws-s3/storage/file/download/index.js +3 -3
  352. package/node/@aws-s3/storage/file/exists/index.d.ts +1 -1
  353. package/node/@aws-s3/storage/file/exists/index.js +3 -3
  354. package/node/@aws-s3/storage/file/move/index.d.ts +1 -1
  355. package/node/@aws-s3/storage/file/move/index.js +3 -3
  356. package/node/@aws-s3/storage/file/remove/index.d.ts +1 -1
  357. package/node/@aws-s3/storage/file/remove/index.js +3 -3
  358. package/node/@aws-s3/storage/file/stat/index.d.ts +1 -1
  359. package/node/@aws-s3/storage/file/stat/index.js +3 -3
  360. package/node/@aws-s3/storage/file/upload/index.d.ts +1 -1
  361. package/node/@aws-s3/storage/file/upload/index.js +3 -3
  362. package/node/@design-edito/index.d.ts +1 -2
  363. package/node/@design-edito/index.js +0 -8
  364. package/node/@express/@multer/index.d.ts +34 -1
  365. package/node/@express/@multer/index.js +43 -5
  366. package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +1 -1
  367. package/node/@google-cloud/storage/bucket/get-metadata/index.js +18 -5
  368. package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +1 -1
  369. package/node/@google-cloud/storage/directory/copy-dir/index.js +3 -3
  370. package/node/@google-cloud/storage/directory/list/index.d.ts +1 -1
  371. package/node/@google-cloud/storage/directory/list/index.js +3 -3
  372. package/node/@google-cloud/storage/directory/move-dir/index.d.ts +1 -1
  373. package/node/@google-cloud/storage/directory/move-dir/index.js +3 -3
  374. package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +1 -1
  375. package/node/@google-cloud/storage/directory/remove-dir/index.js +3 -3
  376. package/node/@google-cloud/storage/file/copy/index.d.ts +1 -1
  377. package/node/@google-cloud/storage/file/copy/index.js +3 -3
  378. package/node/@google-cloud/storage/file/download/index.d.ts +1 -1
  379. package/node/@google-cloud/storage/file/download/index.js +3 -3
  380. package/node/@google-cloud/storage/file/exists/index.d.ts +1 -1
  381. package/node/@google-cloud/storage/file/exists/index.js +3 -3
  382. package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +1 -1
  383. package/node/@google-cloud/storage/file/generate-signed-url/index.js +24 -5
  384. package/node/@google-cloud/storage/file/get-metadata/index.d.ts +1 -1
  385. package/node/@google-cloud/storage/file/get-metadata/index.js +20 -5
  386. package/node/@google-cloud/storage/file/get-permissions/index.d.ts +1 -1
  387. package/node/@google-cloud/storage/file/get-permissions/index.js +20 -5
  388. package/node/@google-cloud/storage/file/move/index.d.ts +1 -1
  389. package/node/@google-cloud/storage/file/move/index.js +3 -3
  390. package/node/@google-cloud/storage/file/remove/index.d.ts +1 -1
  391. package/node/@google-cloud/storage/file/remove/index.js +3 -3
  392. package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +1 -1
  393. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +25 -7
  394. package/node/@google-cloud/storage/file/stat/index.d.ts +1 -1
  395. package/node/@google-cloud/storage/file/stat/index.js +3 -3
  396. package/node/@google-cloud/storage/file/update-metadata/index.d.ts +1 -1
  397. package/node/@google-cloud/storage/file/update-metadata/index.js +20 -5
  398. package/node/@google-cloud/storage/file/upload/index.d.ts +1 -1
  399. package/node/@google-cloud/storage/file/upload/index.js +3 -3
  400. package/node/cloud-storage/clients/index.d.ts +27 -0
  401. package/node/cloud-storage/clients/index.js +2 -2
  402. package/node/cloud-storage/operations/copy-dir/index.d.ts +46 -1
  403. package/node/cloud-storage/operations/copy-dir/index.js +30 -9
  404. package/node/cloud-storage/operations/copy-file/index.d.ts +46 -1
  405. package/node/cloud-storage/operations/copy-file/index.js +30 -9
  406. package/node/cloud-storage/operations/download-file/index.d.ts +50 -1
  407. package/node/cloud-storage/operations/download-file/index.js +30 -9
  408. package/node/cloud-storage/operations/exists-file/index.d.ts +44 -1
  409. package/node/cloud-storage/operations/exists-file/index.js +30 -9
  410. package/node/cloud-storage/operations/list-dir/index.d.ts +40 -1
  411. package/node/cloud-storage/operations/list-dir/index.js +30 -9
  412. package/node/cloud-storage/operations/move-dir/index.d.ts +46 -1
  413. package/node/cloud-storage/operations/move-dir/index.js +30 -9
  414. package/node/cloud-storage/operations/move-file/index.d.ts +46 -1
  415. package/node/cloud-storage/operations/move-file/index.js +30 -9
  416. package/node/cloud-storage/operations/remove-dir/index.d.ts +42 -1
  417. package/node/cloud-storage/operations/remove-dir/index.js +30 -9
  418. package/node/cloud-storage/operations/remove-file/index.d.ts +42 -1
  419. package/node/cloud-storage/operations/remove-file/index.js +30 -9
  420. package/node/cloud-storage/operations/stat-file/index.d.ts +40 -1
  421. package/node/cloud-storage/operations/stat-file/index.js +30 -9
  422. package/node/cloud-storage/operations/upload-file/index.d.ts +46 -1
  423. package/node/cloud-storage/operations/upload-file/index.js +30 -9
  424. package/node/encryption/@aes-256-gcm/buffer/index.d.ts +1 -1
  425. package/node/encryption/@aes-256-gcm/buffer/index.js +22 -6
  426. package/node/encryption/@aes-256-gcm/uint8-array/index.d.ts +1 -1
  427. package/node/encryption/@aes-256-gcm/uint8-array/index.js +3 -3
  428. package/node/encryption/key/index.js +12 -4
  429. package/node/files/is-in-directory/index.d.ts +7 -0
  430. package/node/files/is-in-directory/index.js +8 -4
  431. package/node/files/read-write/index.d.ts +48 -4
  432. package/node/files/read-write/index.js +15 -4
  433. package/node/files/subpaths/index.d.ts +62 -33
  434. package/node/files/subpaths/index.js +119 -5
  435. package/node/ftps/directory/copy-dir/index.d.ts +1 -1
  436. package/node/ftps/directory/copy-dir/index.js +3 -3
  437. package/node/ftps/directory/list/index.d.ts +1 -1
  438. package/node/ftps/directory/list/index.js +3 -3
  439. package/node/ftps/directory/move-dir/index.d.ts +1 -1
  440. package/node/ftps/directory/move-dir/index.js +3 -3
  441. package/node/ftps/directory/remove-dir/index.d.ts +1 -1
  442. package/node/ftps/directory/remove-dir/index.js +3 -3
  443. package/node/ftps/file/copy/index.d.ts +1 -1
  444. package/node/ftps/file/copy/index.js +3 -3
  445. package/node/ftps/file/download/index.d.ts +1 -1
  446. package/node/ftps/file/download/index.js +3 -3
  447. package/node/ftps/file/exists/index.d.ts +1 -1
  448. package/node/ftps/file/exists/index.js +3 -3
  449. package/node/ftps/file/move/index.d.ts +1 -1
  450. package/node/ftps/file/move/index.js +3 -3
  451. package/node/ftps/file/remove/index.d.ts +1 -1
  452. package/node/ftps/file/remove/index.js +3 -3
  453. package/node/ftps/file/stat/index.d.ts +1 -1
  454. package/node/ftps/file/stat/index.js +3 -3
  455. package/node/ftps/file/upload/index.d.ts +1 -1
  456. package/node/ftps/file/upload/index.js +3 -3
  457. package/node/images/create/index.d.ts +6 -0
  458. package/node/images/create/index.js +13 -18
  459. package/node/images/format/index.d.ts +36 -1
  460. package/node/images/format/index.js +241 -44
  461. package/node/images/metadata/index.d.ts +6 -0
  462. package/node/images/metadata/index.js +13 -18
  463. package/node/images/transform/index.d.ts +23 -1
  464. package/node/images/transform/index.js +199 -39
  465. package/node/images/transform/operations/blur/index.d.ts +1 -1
  466. package/node/images/transform/operations/blur/index.js +4 -4
  467. package/node/images/transform/operations/brighten/index.d.ts +1 -1
  468. package/node/images/transform/operations/brighten/index.js +4 -4
  469. package/node/images/transform/operations/extend/index.d.ts +1 -1
  470. package/node/images/transform/operations/extend/index.js +9 -19
  471. package/node/images/transform/operations/extract/index.d.ts +1 -1
  472. package/node/images/transform/operations/extract/index.js +4 -4
  473. package/node/images/transform/operations/flatten/index.d.ts +1 -1
  474. package/node/images/transform/operations/flatten/index.js +9 -19
  475. package/node/images/transform/operations/flip/index.js +1 -1
  476. package/node/images/transform/operations/flop/index.js +1 -1
  477. package/node/images/transform/operations/hue/index.d.ts +1 -1
  478. package/node/images/transform/operations/hue/index.js +4 -4
  479. package/node/images/transform/operations/level/index.d.ts +1 -1
  480. package/node/images/transform/operations/level/index.js +4 -4
  481. package/node/images/transform/operations/lighten/index.d.ts +1 -1
  482. package/node/images/transform/operations/lighten/index.js +4 -4
  483. package/node/images/transform/operations/normalize/index.d.ts +1 -1
  484. package/node/images/transform/operations/normalize/index.js +4 -4
  485. package/node/images/transform/operations/overlay/index.d.ts +1 -1
  486. package/node/images/transform/operations/overlay/index.js +9 -19
  487. package/node/images/transform/operations/resize/index.d.ts +1 -1
  488. package/node/images/transform/operations/resize/index.js +9 -19
  489. package/node/images/transform/operations/rotate/index.d.ts +1 -1
  490. package/node/images/transform/operations/rotate/index.js +9 -19
  491. package/node/images/transform/operations/saturate/index.d.ts +1 -1
  492. package/node/images/transform/operations/saturate/index.js +4 -4
  493. package/node/images/types.d.ts +136 -1
  494. package/node/images/types.js +2 -2
  495. package/node/images/utils/index.d.ts +20 -0
  496. package/node/images/utils/index.js +6 -16
  497. package/node/process/on-exit/index.d.ts +23 -0
  498. package/node/process/on-exit/index.js +25 -8
  499. package/node/process/prompt-continue/index.d.ts +18 -0
  500. package/node/process/prompt-continue/index.js +1680 -0
  501. package/node/process/spawner/index.d.ts +18 -0
  502. package/node/process/spawner/index.js +83 -0
  503. package/node/sftp/directory/copy-dir/index.d.ts +1 -1
  504. package/node/sftp/directory/copy-dir/index.js +3 -3
  505. package/node/sftp/directory/list/index.d.ts +1 -1
  506. package/node/sftp/directory/list/index.js +3 -3
  507. package/node/sftp/directory/move-dir/index.d.ts +1 -1
  508. package/node/sftp/directory/move-dir/index.js +3 -3
  509. package/node/sftp/directory/remove-dir/index.d.ts +1 -1
  510. package/node/sftp/directory/remove-dir/index.js +3 -3
  511. package/node/sftp/file/copy/index.d.ts +1 -1
  512. package/node/sftp/file/copy/index.js +3 -3
  513. package/node/sftp/file/download/index.d.ts +1 -1
  514. package/node/sftp/file/download/index.js +3 -3
  515. package/node/sftp/file/exists/index.d.ts +1 -1
  516. package/node/sftp/file/exists/index.js +3 -3
  517. package/node/sftp/file/move/index.d.ts +1 -1
  518. package/node/sftp/file/move/index.js +3 -3
  519. package/node/sftp/file/remove/index.d.ts +1 -1
  520. package/node/sftp/file/remove/index.js +3 -3
  521. package/node/sftp/file/stat/index.d.ts +1 -1
  522. package/node/sftp/file/stat/index.js +3 -3
  523. package/node/sftp/file/upload/index.d.ts +1 -1
  524. package/node/sftp/file/upload/index.js +3 -3
  525. package/package.json +11 -3
  526. package/agnostic/arrays/index.d.ts +0 -13
  527. package/agnostic/arrays/index.js +0 -21
  528. package/agnostic/booleans/index.d.ts +0 -8
  529. package/agnostic/booleans/index.js +0 -9
  530. package/agnostic/colors/index.d.ts +0 -14
  531. package/agnostic/colors/index.js +0 -107
  532. package/agnostic/css/bem/BEM.d.ts +0 -29
  533. package/agnostic/css/bem/getNamesArr.d.ts +0 -2
  534. package/agnostic/css/index.d.ts +0 -14
  535. package/agnostic/css/index.js +0 -25
  536. package/agnostic/errors/index.d.ts +0 -6
  537. package/agnostic/errors/index.js +0 -9
  538. package/agnostic/html/index.d.ts +0 -19
  539. package/agnostic/html/index.js +0 -39
  540. package/agnostic/html/sanitize/index.d.ts +0 -24
  541. package/agnostic/html/sanitize/index.js +0 -15
  542. package/agnostic/index.d.ts +0 -26
  543. package/agnostic/index.js +0 -144
  544. package/agnostic/misc/crossenv/index.d.ts +0 -8
  545. package/agnostic/misc/crossenv/index.js +0 -10
  546. package/agnostic/misc/crossenv/types/index.d.ts +0 -19
  547. package/agnostic/misc/crossenv/types/index.js +0 -7
  548. package/agnostic/misc/get-current-downlink/index.d.ts +0 -1
  549. package/agnostic/misc/get-current-downlink/index.js +0 -7
  550. package/agnostic/misc/index.d.ts +0 -25
  551. package/agnostic/misc/index.js +0 -65
  552. package/agnostic/misc/logs/index.d.ts +0 -17
  553. package/agnostic/misc/logs/index.js +0 -10
  554. package/agnostic/numbers/index.d.ts +0 -13
  555. package/agnostic/numbers/index.js +0 -12
  556. package/agnostic/objects/enums/index.d.ts +0 -4
  557. package/agnostic/objects/enums/index.js +0 -8
  558. package/agnostic/objects/index.d.ts +0 -19
  559. package/agnostic/objects/index.js +0 -19
  560. package/agnostic/optim/index.d.ts +0 -7
  561. package/agnostic/optim/index.js +0 -9
  562. package/agnostic/random/index.d.ts +0 -12
  563. package/agnostic/random/index.js +0 -10
  564. package/agnostic/sanitization/index.d.ts +0 -3
  565. package/agnostic/sanitization/index.js +0 -35
  566. package/agnostic/strings/index.d.ts +0 -19
  567. package/agnostic/strings/index.js +0 -15
  568. package/agnostic/time/dates/index.d.ts +0 -4
  569. package/agnostic/time/dates/index.js +0 -8
  570. package/agnostic/time/index.d.ts +0 -12
  571. package/agnostic/time/index.js +0 -30
  572. package/chunks/chunk-26T64AEI.js +0 -28
  573. package/chunks/chunk-34U4HX4V.js +0 -73
  574. package/chunks/chunk-3KZNRSDD.js +0 -112
  575. package/chunks/chunk-3USAHFOX.js +0 -31
  576. package/chunks/chunk-42K3MQQ5.js +0 -31
  577. package/chunks/chunk-45E3E4KW.js +0 -43
  578. package/chunks/chunk-4RPGLKRQ.js +0 -43
  579. package/chunks/chunk-536IRELM.js +0 -40
  580. package/chunks/chunk-5CTAKAIP.js +0 -28
  581. package/chunks/chunk-6KM4UT6T.js +0 -34
  582. package/chunks/chunk-6NYUQXJT.js +0 -109
  583. package/chunks/chunk-6RGDWX4A.js +0 -24
  584. package/chunks/chunk-6YQGM6N6.js +0 -19
  585. package/chunks/chunk-7AWTHZLY.js +0 -12
  586. package/chunks/chunk-7DBNMU6N.js +0 -14
  587. package/chunks/chunk-7YJ4BB73.js +0 -20
  588. package/chunks/chunk-A3CDUWGR.js +0 -73
  589. package/chunks/chunk-AL7ESVX4.js +0 -42
  590. package/chunks/chunk-ALAGBHFV.js +0 -42
  591. package/chunks/chunk-ANPXBD2G.js +0 -35
  592. package/chunks/chunk-AZD3VUWK.js +0 -84
  593. package/chunks/chunk-B43NYQDI.js +0 -16
  594. package/chunks/chunk-BDGFY3GP.js +0 -42
  595. package/chunks/chunk-BGSJ5XCH.js +0 -20
  596. package/chunks/chunk-BJAYUP7M.js +0 -13
  597. package/chunks/chunk-BLDUC7TT.js +0 -17
  598. package/chunks/chunk-COVPTTAD.js +0 -10
  599. package/chunks/chunk-DKITT7OT.js +0 -296
  600. package/chunks/chunk-EDVNAV3G.js +0 -72
  601. package/chunks/chunk-EGBJXHCW.js +0 -47
  602. package/chunks/chunk-EIIADR7E.js +0 -24
  603. package/chunks/chunk-ENMBK6H7.js +0 -162
  604. package/chunks/chunk-EUQFWLAH.js +0 -20
  605. package/chunks/chunk-F3WCF6DL.js +0 -122
  606. package/chunks/chunk-FEIKHYDQ.js +0 -20
  607. package/chunks/chunk-FHLCPVND.js +0 -23
  608. package/chunks/chunk-FPEW3A27.js +0 -14
  609. package/chunks/chunk-FR5H2OCV.js +0 -21
  610. package/chunks/chunk-FVFVKL54.js +0 -32
  611. package/chunks/chunk-FZOU4OAW.js +0 -13
  612. package/chunks/chunk-G4ZB72XY.js +0 -257
  613. package/chunks/chunk-G5RRNREY.js +0 -37
  614. package/chunks/chunk-GABKKGNI.js +0 -206
  615. package/chunks/chunk-GL42Q643.js +0 -42
  616. package/chunks/chunk-GTVOFJKO.js +0 -20
  617. package/chunks/chunk-HKTNK262.js +0 -23
  618. package/chunks/chunk-HWVEI3RH.js +0 -31
  619. package/chunks/chunk-IRTPQATN.js +0 -16
  620. package/chunks/chunk-JBSS64SA.js +0 -6
  621. package/chunks/chunk-JMU5PDBD.js +0 -20
  622. package/chunks/chunk-JQXNEJAP.js +0 -18
  623. package/chunks/chunk-JTJA7DGW.js +0 -36
  624. package/chunks/chunk-JWBDZPQG.js +0 -18
  625. package/chunks/chunk-JZ5MFJQB.js +0 -37
  626. package/chunks/chunk-KIONYWA7.js +0 -168
  627. package/chunks/chunk-KWQ4K4GN.js +0 -28
  628. package/chunks/chunk-KXIA3YGF.js +0 -54
  629. package/chunks/chunk-KXIEPXDI.js +0 -40
  630. package/chunks/chunk-L7PIZQFC.js +0 -51
  631. package/chunks/chunk-LEXQ6E6L.js +0 -31
  632. package/chunks/chunk-LV2VMOWR.js +0 -18
  633. package/chunks/chunk-MFIGSRSO.js +0 -103
  634. package/chunks/chunk-MJQF3YZO.js +0 -21
  635. package/chunks/chunk-MV473S2C.js +0 -28
  636. package/chunks/chunk-MVYH3CSJ.js +0 -42
  637. package/chunks/chunk-N4JGLSGA.js +0 -28
  638. package/chunks/chunk-NRITRUZW.js +0 -10
  639. package/chunks/chunk-OC4VIF3N.js +0 -42
  640. package/chunks/chunk-OJCVOSWP.js +0 -41
  641. package/chunks/chunk-OKCPVFQW.js +0 -56
  642. package/chunks/chunk-OKFZJ6DJ.js +0 -9
  643. package/chunks/chunk-PAIUCLVK.js +0 -35
  644. package/chunks/chunk-PU7NOIJB.js +0 -16
  645. package/chunks/chunk-PVRYR5KX.js +0 -21
  646. package/chunks/chunk-PWNX5TWJ.js +0 -60
  647. package/chunks/chunk-QCOO4PV5.js +0 -54
  648. package/chunks/chunk-QHAB6XYD.js +0 -30
  649. package/chunks/chunk-QHLQVR3E.js +0 -54
  650. package/chunks/chunk-QKE2IYT5.js +0 -42
  651. package/chunks/chunk-QVPS2BCJ.js +0 -29
  652. package/chunks/chunk-R4DZKWSR.js +0 -42
  653. package/chunks/chunk-RASMASS4.js +0 -111
  654. package/chunks/chunk-RLAZR3NL.js +0 -8
  655. package/chunks/chunk-RLJOYG64.js +0 -33
  656. package/chunks/chunk-S2NMAH7K.js +0 -19
  657. package/chunks/chunk-S32K7POB.js +0 -29
  658. package/chunks/chunk-SKBOSWM2.js +0 -35
  659. package/chunks/chunk-SKMCIFS3.js +0 -27
  660. package/chunks/chunk-SNJJII7A.js +0 -65
  661. package/chunks/chunk-STW5RKR7.js +0 -175
  662. package/chunks/chunk-TIER4TF4.js +0 -26
  663. package/chunks/chunk-UNXRB2AV.js +0 -16
  664. package/chunks/chunk-UXEKCYL7.js +0 -28
  665. package/chunks/chunk-VFJYLXCI.js +0 -23
  666. package/chunks/chunk-VJJIYJMY.js +0 -13
  667. package/chunks/chunk-VLC7LRED.js +0 -191
  668. package/chunks/chunk-VTPRO4NJ.js +0 -10
  669. package/chunks/chunk-VYW4IADX.js +0 -35
  670. package/chunks/chunk-VZDUZTW6.js +0 -113
  671. package/chunks/chunk-WAMSK4A3.js +0 -67
  672. package/chunks/chunk-WH6BPDAC.js +0 -17
  673. package/chunks/chunk-WOAYU6LB.js +0 -13
  674. package/chunks/chunk-WOYF3N4A.js +0 -31
  675. package/chunks/chunk-WSC3WODJ.js +0 -157
  676. package/chunks/chunk-WSFCRVEQ.js +0 -9
  677. package/chunks/chunk-X53BGT33.js +0 -42
  678. package/chunks/chunk-XB3EGDBI.js +0 -127
  679. package/chunks/chunk-XBA26Z7E.js +0 -42
  680. package/chunks/chunk-XPGAVZGK.js +0 -98
  681. package/chunks/chunk-XR2LNUGW.js +0 -42
  682. package/chunks/chunk-Y5GGIBPI.js +0 -31
  683. package/chunks/chunk-YKPA3MQL.js +0 -31
  684. package/chunks/chunk-YP64J65L.js +0 -17
  685. package/chunks/chunk-YPTFPS76.js +0 -91
  686. package/chunks/chunk-YQWZ3EP2.js +0 -60
  687. package/chunks/chunk-YS6WMSWC.js +0 -15
  688. package/chunks/chunk-YUP434IY.js +0 -43
  689. package/chunks/chunk-Z7ZDDBV5.js +0 -18
  690. package/chunks/chunk-ZBBU2P4D.js +0 -28
  691. package/chunks/chunk-ZLBSI4TR.js +0 -21
  692. package/chunks/chunk-ZMT6S52U.js +0 -40
  693. package/chunks/chunk-ZNA7SWFK.js +0 -29
  694. package/chunks/chunk-ZYTGT7AE.js +0 -20
  695. package/components/index.d.ts +0 -4
  696. package/components/index.js +0 -13
  697. package/node/@aws-s3/index.d.ts +0 -2
  698. package/node/@aws-s3/index.js +0 -23
  699. package/node/@aws-s3/storage/directory/index.d.ts +0 -5
  700. package/node/@aws-s3/storage/directory/index.js +0 -22
  701. package/node/@aws-s3/storage/file/index.d.ts +0 -8
  702. package/node/@aws-s3/storage/file/index.js +0 -34
  703. package/node/@aws-s3/storage/index.d.ts +0 -3
  704. package/node/@aws-s3/storage/index.js +0 -25
  705. package/node/@design-edito/thumbnails/index.js +0 -1
  706. package/node/@express/index.d.ts +0 -2
  707. package/node/@express/index.js +0 -10
  708. package/node/@google-cloud/index.d.ts +0 -2
  709. package/node/@google-cloud/index.js +0 -30
  710. package/node/@google-cloud/storage/bucket/index.d.ts +0 -5
  711. package/node/@google-cloud/storage/bucket/index.js +0 -22
  712. package/node/@google-cloud/storage/directory/index.d.ts +0 -5
  713. package/node/@google-cloud/storage/directory/index.js +0 -22
  714. package/node/@google-cloud/storage/file/index.d.ts +0 -13
  715. package/node/@google-cloud/storage/file/index.js +0 -54
  716. package/node/@google-cloud/storage/index.d.ts +0 -4
  717. package/node/@google-cloud/storage/index.js +0 -35
  718. package/node/cloud-storage/index.d.ts +0 -3
  719. package/node/cloud-storage/index.js +0 -69
  720. package/node/cloud-storage/operations/index.d.ts +0 -12
  721. package/node/cloud-storage/operations/index.js +0 -95
  722. package/node/encryption/@aes-256-gcm/index.d.ts +0 -3
  723. package/node/encryption/@aes-256-gcm/index.js +0 -14
  724. package/node/encryption/index.d.ts +0 -3
  725. package/node/encryption/index.js +0 -16
  726. package/node/files/index.d.ts +0 -7
  727. package/node/files/index.js +0 -15
  728. package/node/ftps/directory/index.d.ts +0 -5
  729. package/node/ftps/directory/index.js +0 -22
  730. package/node/ftps/file/index.d.ts +0 -8
  731. package/node/ftps/file/index.js +0 -34
  732. package/node/ftps/index.d.ts +0 -3
  733. package/node/ftps/index.js +0 -25
  734. package/node/images/index.d.ts +0 -6
  735. package/node/images/index.js +0 -59
  736. package/node/index.d.ts +0 -12
  737. package/node/index.js +0 -172
  738. package/node/process/index.d.ts +0 -6
  739. package/node/process/index.js +0 -16
  740. package/node/sftp/directory/index.d.ts +0 -5
  741. package/node/sftp/directory/index.js +0 -22
  742. package/node/sftp/file/index.d.ts +0 -8
  743. package/node/sftp/file/index.js +0 -34
  744. package/node/sftp/index.d.ts +0 -3
  745. package/node/sftp/index.js +0 -25
  746. package/shared/errors/index.d.ts +0 -138
  747. /package/{node/@design-edito/thumbnails/index.d.ts → agnostic/arrays/dedupe/index.test.d.ts} +0 -0
  748. /package/{shared/index.d.ts → agnostic/misc/data-size/types.js} +0 -0
@@ -1,88 +1,145 @@
1
- import { Outcome } from '../../misc/outcome/index.js';
1
+ import * as Outcome from '../../misc/outcome/index.js';
2
+ /**
3
+ * Options for delimiter-based table parsing mode.
4
+ *
5
+ * In this mode, the table is split into rows and cells using delimiter functions.
6
+ * The header row is parsed into column names, which are then mapped to each body row's cell values.
7
+ *
8
+ * @template T - The type of objects in the resulting array, extending `Record<string, string>`.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const options: ParseTableLineModeOptions<MyRow> = {
13
+ * mode: 'line',
14
+ * splitLines: input => input.split('\n'),
15
+ * headerPos: 0,
16
+ * splitHeaderCells: header => header.split('\t'),
17
+ * bodyBounds: [1, Infinity],
18
+ * splitBodyCells: row => row.split('\t'),
19
+ * schema: obj => validateMyRow(obj)
20
+ * }
21
+ * ```
22
+ */
2
23
  export type ParseTableLineModeOptions<T extends Record<string, string>> = {
3
- inputToLines: (input: string) => string[];
4
- headLinePos: number;
5
- headLineToHeaders: (input: string) => string[];
6
- bodyLinesBounds: [number, number];
7
- bodyLineToCellValue: (input: string) => string[];
24
+ /** Parsing mode identifier. Must be 'line' for delimiter-based parsing. */
25
+ mode?: 'line';
26
+ /** Function to split the input string into lines. @default input => input.split('\n') */
27
+ splitLines: (input: string) => string[];
28
+ /** Zero-based index of the header line within the split lines array. @default 0 */
29
+ headerPos: number;
30
+ /** Tuple `[start, end]` indicating the range of line indices to parse as body rows (inclusive start, exclusive end). Use `Infinity` as the end value to parse until the last line. @default [1, Infinity] */
31
+ bodyBounds: [number, number];
32
+ /** Function to split the header line into individual column names. @default header => header.split('\t') */
33
+ splitHeaderCells: (input: string) => string[];
34
+ /** Function to split each body line into individual cell values. @default input => input.split('\t') */
35
+ splitBodyCells: (input: string) => string[];
36
+ /** Function to validate and transform each parsed row object. Return `undefined` to skip invalid rows. Skipped rows will not appear in the result and will not produce error messages. */
8
37
  schema: (obj: unknown) => T | undefined;
9
38
  };
39
+ /**
40
+ * Options for fixed-width column parsing mode.
41
+ *
42
+ * In this mode, the table is parsed using fixed character positions to define column boundaries.
43
+ * This is useful for parsing terminal output, formatted reports, or any text with consistent column alignment.
44
+ *
45
+ * @template T - The type of objects in the resulting array, extending `Record<string, string>`.
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * const options: ParseTableColumnModeOptions<MyRow> = {
50
+ * mode: 'column',
51
+ * splitLines: input => input.split('\n'),
52
+ * headerPos: 0,
53
+ * bodyBounds: [1, Infinity],
54
+ * columns: [0, 10, 25], // Columns start at positions 0, 10, and 25
55
+ * headerCellRefine: header => header.trim().toLowerCase(),
56
+ * bodyCellRefine: value => value.trim(),
57
+ * schema: obj => validateMyRow(obj)
58
+ * }
59
+ * ```
60
+ */
10
61
  export type ParseTableColumnModeOptions<T extends Record<string, string>> = {
11
- inputToLines: (input: string) => string[];
12
- headLinePos: number;
13
- bodyLinesBounds: [number, number];
62
+ /** Parsing mode identifier. Must be 'column' for fixed-width column parsing. */
63
+ mode?: 'column';
64
+ /** Function to split the input string into lines. @default input => input.split('\n') */
65
+ splitLines: (input: string) => string[];
66
+ /** Zero-based index of the header line within the split lines array. @default 0 */
67
+ headerPos: number;
68
+ /** Tuple `[start, end]` indicating the range of line indices to parse as body rows (inclusive start, exclusive end). Use `Infinity` as the end value to parse until the last line. @default [1, Infinity] */
69
+ bodyBounds: [number, number];
70
+ /** Array of starting character positions for each column. Each column extends from its start position to the start of the next column. The last column extends to the end of the line. @example [0, 10, 25] defines three columns: chars 0-9, 10-24, and 25-end */
14
71
  columns: number[];
15
- headerRefine: (header: string) => string;
16
- valueRefine: (value: string) => string;
72
+ /** Function to clean or normalize header names extracted from the header line. Applied to each column header after slicing. @default header => header */
73
+ headerCellRefine: (header: string) => string;
74
+ /** Function to clean or normalize cell values extracted from body rows. Applied to each cell value after slicing. @default value => value */
75
+ bodyCellRefine: (value: string) => string;
76
+ /** Function to validate and transform each parsed row object. Return `undefined` to skip invalid rows. Skipped rows will not appear in the result and will not produce error messages. */
17
77
  schema: (obj: unknown) => T | undefined;
18
78
  };
19
- export type ParseTableOptions<T extends Record<string, string>> = ParseTableLineModeOptions<T> | ParseTableColumnModeOptions<T>;
20
79
  /**
21
- * Parses a tabular string input into an array of objects, where each object represents a row in the table.
22
- *
23
- * There are two parsing modes:
24
- *
25
- * 1. **Delimiter-based parsing** (default)
26
- * - The table is split into rows and then into cells using functions such as splitting on `\n` and `\t`.
27
- * - The header row is parsed into an array of header names, which are mapped to each cell value.
28
- * - Defaults: `inputToLines = s => s.split('\n')`, `headLinePos = 0`, `headLineToHeaders = h => h.split('\t')`,
29
- * `bodyLinesBounds = [0, Infinity]`, `bodyLineToCellValue = r => r.split('\t')`.
30
- *
31
- * 2. **Column-slice parsing**
32
- * - The table is split into fixed-width columns based on start indices provided in `options.columns`.
33
- * - The header row and body rows are sliced using these column boundaries.
34
- * - Each header and cell value can be refined with user-provided functions.
35
- * - Defaults: `inputToLines = s => s.split('\n')`, `headLinePos = 0`, `bodyLinesBounds = [1, Infinity]`,
36
- * `headerRefine = h => h`, `valueRefine = v => v`.
80
+ * Union type of all supported parsing mode options.
37
81
  *
38
- * @template T - The type of the objects in the resulting array, extending `Record<string, string>`.
39
- * @param {string} table - The string representation of the table to be parsed.
40
- * @param {Partial<ParseTableOptions<T>> & { schema: (obj: unknown) => T }} options - Configuration options for parsing the table.
41
- *
42
- * ### Required
43
- * @param {function(unknown): T} options.schema - Function to validate and transform each row object.
82
+ * @template T - The type of objects in the resulting array, extending `Record<string, string>`.
83
+ */
84
+ export type ParseTableOptions<T extends Record<string, string>> = ParseTableLineModeOptions<T> | ParseTableColumnModeOptions<T>;
85
+ /**
86
+ * Parses a tabular string input into an array of typed objects.
44
87
  *
45
- * ### Common (optional)
46
- * @param {function(string): string[]} [options.inputToLines] - Function to split the input string into lines. Default: `s => s.split('\n')`.
47
- * @param {number} [options.headLinePos] - Index of the header line. Default: `0`.
48
- * @param {[number, number]} [options.bodyLinesBounds] - Tuple `[start, end]` indicating the range of lines to parse as body rows.
88
+ * Supports two parsing modes:
89
+ * 1. **Delimiter-based** (`mode: 'line'` or when `columns` is not provided): Splits rows and cells using delimiter functions
90
+ * 2. **Fixed-width columns** (`mode: 'column'` or when `columns` is provided): Slices text at fixed character positions
49
91
  *
50
- * ### Delimiter-based (optional, used when `columns` is not provided)
51
- * @param {function(string): string[]} [options.headLineToHeaders] - Function to parse the header line into an array of header names. Default: `h => h.split('\t')`.
52
- * @param {function(string): string[]} [options.bodyLineToCellValue] - Function to parse each body line into an array of cell values. Default: `r => r.split('\t')`.
92
+ * @template T - The type of objects in the resulting array, extending `Record<string, string>`.
93
+ * @param {string} table - The string representation of the table to parse.
94
+ * @param {Partial<ParseTableOptions<T>> & { schema: (obj: unknown) => T | undefined }} options - Configuration options.
95
+ * @param {function(unknown): T | undefined} options.schema - **Required.** Validates and transforms each row. Return `undefined` to skip invalid rows.
96
+ * @param {'line' | 'column'} [options.mode] - Parsing mode. If omitted, inferred from presence of `columns` property.
97
+ * @param {function(string): string[]} [options.splitLines] - How to split input into lines.
98
+ * @param {number} [options.headerPos=0] - Index of the header line.
99
+ * @param {[number, number]} [options.bodyBounds=[1, Infinity]] - Range of lines to parse as body rows `[start, end)`.
53
100
  *
54
- * ### Column-slice (optional, used when `columns` is provided)
55
- * @param {number[]} [options.columns] - Starting indices for each column. The last column extends to the end of the line.
56
- * @param {function(string): string} [options.headerRefine] - Function to clean or normalize header names. Default: `h => h`.
57
- * @param {function(string): string} [options.valueRefine] - Function to clean or normalize cell values. Default: `v => v`.
101
+ * **Delimiter-based mode options:**
102
+ * @param {function(string): string[]} [options.splitHeaderCells] - How to split header line into column names.
103
+ * @param {function(string): string[]} [options.splitBodyCells] - How to split body lines into cell values.
58
104
  *
59
- * @returns {Outcome.Either<T[], string>} An `Outcome` containing either:
60
- * - `success = true` with an array of parsed row objects, or
61
- * - `success = false` with an error message.
105
+ * **Fixed-width column mode options:**
106
+ * @param {number[]} [options.columns] - Starting positions for each column.
107
+ * @param {function(string): string} [options.headerCellRefine] - Clean/normalize header names.
108
+ * @param {function(string): string} [options.bodyCellRefine] - Clean/normalize cell values.
62
109
  *
63
- * @throws Will return a failure outcome if the header line cannot be found.
110
+ * @returns {Outcome.Either<T[], string>}
111
+ * - On success: `{ success: true, payload: T[] }` containing parsed rows.
112
+ * - On failure: `{ success: false, payload: string }` containing error message.
64
113
  *
65
114
  * @example
66
- * // Delimiter-based parsing (default)
67
- * const table = 'name\tage\nAlice\t30\nBob\t25';
68
- * const result = parseTable(table, { schema: row => row });
69
- * if (result.success) {
70
- * console.log(result.payload); // [{ name: 'Alice', age: '30' }, { name: 'Bob', age: '25' }]
71
- * }
115
+ * // Delimiter-based parsing (TSV)
116
+ * const tsvTable = 'name\tage\nAlice\t30\nBob\t25';
117
+ * const result = parseTable(tsvTable, { schema: row => row });
118
+ * // result.payload = [{ name: 'Alice', age: '30' }, { name: 'Bob', age: '25' }]
72
119
  *
73
120
  * @example
74
- * // Column-slice parsing
75
- * const table = 'Name Age\nAlice 30 \nBob 25 ';
76
- * const result = parseTable(table, {
77
- * schema: row => row,
78
- * columns: [0, 10, 15],
79
- * headerRefine: h => h.trim(),
80
- * valueRefine: v => v.trim()
121
+ * // Fixed-width column parsing
122
+ * const fixedTable = 'Name Age\nAlice 30 \nBob 25 ';
123
+ * const result = parseTable(fixedTable, {
124
+ * mode: 'column',
125
+ * columns: [0, 10],
126
+ * headerCellRefine: h => h.trim().toLowerCase(),
127
+ * bodyCellRefine: v => v.trim(),
128
+ * schema: row => row
81
129
  * });
82
- * if (result.success) {
83
- * console.log(result.payload); // [{ Name: 'Alice', Age: '30' }, { Name: 'Bob', Age: '25' }]
84
- * }
130
+ * // result.payload = [{ name: 'Alice', age: '30' }, { name: 'Bob', age: '25' }]
131
+ *
132
+ * @example
133
+ * // With schema validation
134
+ * type Person = { name: string; age: string };
135
+ * const validatePerson = (obj: unknown): Person | undefined => {
136
+ * if (typeof obj !== 'object' || obj === null) return undefined;
137
+ * const { name, age } = obj as any;
138
+ * if (typeof name !== 'string' || typeof age !== 'string') return undefined;
139
+ * return { name, age };
140
+ * };
141
+ * const result = parseTable(tsvTable, { schema: validatePerson });
85
142
  */
86
143
  export declare function parseTable<T extends Record<string, string>>(table: string, _options: Partial<ParseTableOptions<T>> & {
87
- schema: (obj: unknown) => T;
144
+ schema: (obj: unknown) => T | undefined;
88
145
  }): Outcome.Either<T[], string>;
@@ -1,8 +1,87 @@
1
1
  import {
2
- parseTable
3
- } from "../../../chunks/chunk-A3CDUWGR.js";
4
- import "../../../chunks/chunk-JMU5PDBD.js";
5
- import "../../../chunks/chunk-WSFCRVEQ.js";
2
+ makeFailure,
3
+ makeSuccess
4
+ } from "../../../chunks/chunk-QEKI6WGQ.js";
5
+ import "../../../chunks/chunk-XCBH6NLF.js";
6
+
7
+ // src/agnostic/strings/parse-table/index.ts
8
+ var defaultLineModeOptions = {
9
+ mode: "line",
10
+ splitLines: (i) => i.split("\n"),
11
+ headerPos: 0,
12
+ splitHeaderCells: (h) => h.split(" "),
13
+ bodyBounds: [1, Infinity],
14
+ splitBodyCells: (i) => i.split(" "),
15
+ schema: (i) => i
16
+ };
17
+ var defaultColumnModeOptions = {
18
+ mode: "column",
19
+ splitLines: (i) => i.split("\n"),
20
+ headerPos: 0,
21
+ bodyBounds: [1, Infinity],
22
+ columns: [],
23
+ headerCellRefine: (h) => h,
24
+ bodyCellRefine: (v) => v,
25
+ schema: (i) => i
26
+ };
27
+ function parseTable(table, _options) {
28
+ const inferredMode = "mode" in _options && _options.mode !== void 0 ? _options.mode : "columns" in _options ? "column" : "splitHeaderCells" in _options ? "line" : "line";
29
+ const options = inferredMode === "column" ? { ...defaultColumnModeOptions, ..._options, mode: "column" } : { ...defaultLineModeOptions, ..._options, mode: "line" };
30
+ const lines = options.splitLines(table);
31
+ const headLine = lines.at(options.headerPos);
32
+ if (headLine === void 0) return makeFailure(`Header line not found at position ${options.headerPos}`);
33
+ if (options.mode === "line" && "splitHeaderCells" in options) {
34
+ const headers = options.splitHeaderCells(headLine);
35
+ const [bodyStart, bodyEnd] = options.bodyBounds;
36
+ const bodyLines = lines.slice(bodyStart, bodyEnd);
37
+ const bodyLinesSplit = bodyLines.map(options.splitBodyCells);
38
+ const rows = [];
39
+ bodyLinesSplit.forEach((lineCells) => {
40
+ const row = {};
41
+ const cellCount = Math.min(lineCells.length, headers.length);
42
+ for (let cellPos = 0; cellPos < cellCount; cellPos++) {
43
+ const cellName = headers[cellPos];
44
+ const cellValue = lineCells[cellPos];
45
+ if (cellName !== void 0 && cellValue !== void 0) {
46
+ row[cellName] = cellValue;
47
+ }
48
+ }
49
+ const validated = options.schema(row);
50
+ if (validated !== void 0) rows.push(validated);
51
+ });
52
+ return makeSuccess(rows);
53
+ }
54
+ if (options.mode === "column" && "columns" in options) {
55
+ const { columns, headerCellRefine, bodyCellRefine } = options;
56
+ if (columns.length === 0) return makeFailure("Column mode requires at least one column position");
57
+ const colBounds = columns.map((colStartPos, colIndex) => {
58
+ const nextColStartPos = columns[colIndex + 1];
59
+ return [colStartPos, nextColStartPos ?? Infinity];
60
+ });
61
+ const headers = colBounds.map(([start, end]) => {
62
+ const rawHeader = headLine.slice(start, end);
63
+ return headerCellRefine(rawHeader);
64
+ });
65
+ const [bodyStart, bodyEnd] = options.bodyBounds;
66
+ const bodyLines = lines.slice(bodyStart, bodyEnd);
67
+ const rows = [];
68
+ bodyLines.forEach((line) => {
69
+ const row = {};
70
+ colBounds.forEach(([start, end], colIndex) => {
71
+ const header = headers[colIndex];
72
+ if (header !== void 0) {
73
+ const rawValue = line.slice(start, end);
74
+ const refinedValue = bodyCellRefine(rawValue);
75
+ row[header] = refinedValue;
76
+ }
77
+ });
78
+ const validated = options.schema(row);
79
+ if (validated !== void 0) rows.push(validated);
80
+ });
81
+ return makeSuccess(rows);
82
+ }
83
+ return makeFailure("Invalid parsing mode configuration");
84
+ }
6
85
  export {
7
86
  parseTable
8
87
  };
@@ -1 +1,21 @@
1
+ /**
2
+ * Replaces all occurrences of a pattern in a string.
3
+ *
4
+ * **Deprecated:** This function is mostly obsolete now that `String.prototype.replaceAll` is widely supported.
5
+ *
6
+ * @param input - The string to operate on.
7
+ * @param pattern - The string or RegExp pattern to replace.
8
+ * @param replacer - The replacement string or a function that returns a replacement for each match.
9
+ * @returns The resulting string with all matches replaced.
10
+ *
11
+ * @deprecated Use `String.prototype.replaceAll` instead.
12
+ *
13
+ * @example
14
+ * replaceAll('foo bar foo', 'foo', 'baz')
15
+ * // => 'baz bar baz'
16
+ *
17
+ * @example
18
+ * replaceAll('abc 123 abc', /abc/g, match => match.toUpperCase())
19
+ * // => 'ABC 123 ABC'
20
+ */
1
21
  export declare function replaceAll(input: string, pattern: string | RegExp, replacer: string | ((substring: string, ...args: any[]) => string)): string;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  replaceAll
3
- } from "../../../chunks/chunk-ZTDVUXPR.js";
4
- import "../../../chunks/chunk-WSFCRVEQ.js";
3
+ } from "../../../chunks/chunk-EPUHVR7J.js";
4
+ import "../../../chunks/chunk-XCBH6NLF.js";
5
5
  export {
6
6
  replaceAll
7
7
  };
@@ -1 +1,19 @@
1
+ /**
2
+ * Converts a string to an alphanumeric-only string.
3
+ *
4
+ * Non-alphanumeric characters are replaced with the provided `replacer`.
5
+ * Consecutive occurrences of the `replacer` are collapsed into a single instance.
6
+ *
7
+ * @param string - The input string to sanitize.
8
+ * @param replacer - The string to replace non-alphanumeric characters with. Defaults to empty string.
9
+ * @returns The sanitized alphanumeric string.
10
+ *
11
+ * @example
12
+ * toAlphanum("Hello, World!")
13
+ * // => "HelloWorld"
14
+ *
15
+ * @example
16
+ * toAlphanum("Hello, World!", "-")
17
+ * // => "Hello-World"
18
+ */
1
19
  export declare function toAlphanum(string: string, replacer?: string): string;
@@ -1,7 +1,11 @@
1
- import {
2
- toAlphanum
3
- } from "../../../chunks/chunk-COVPTTAD.js";
4
- import "../../../chunks/chunk-WSFCRVEQ.js";
1
+ import "../../../chunks/chunk-XCBH6NLF.js";
2
+
3
+ // src/agnostic/strings/to-alphanum/index.ts
4
+ function toAlphanum(string, replacer = "") {
5
+ const replaced = string.replace(/[^a-z0-9]/igm, replacer);
6
+ if (replacer.length === 0) return replaced;
7
+ return replaced.replace(new RegExp(`${replacer}+`, "igm"), replacer);
8
+ }
5
9
  export {
6
10
  toAlphanum
7
11
  };
@@ -1,2 +1,20 @@
1
+ /**
2
+ * Removes all leading whitespace characters from a string.
3
+ *
4
+ * @param string - The string to trim.
5
+ * @returns The input string without leading whitespace.
6
+ *
7
+ * @example
8
+ * trimStart(" hello") // => "hello"
9
+ */
1
10
  export declare function trimStart(string: string): string;
11
+ /**
12
+ * Removes all trailing whitespace characters from a string.
13
+ *
14
+ * @param string - The string to trim.
15
+ * @returns The input string without trailing whitespace.
16
+ *
17
+ * @example
18
+ * trimEnd("hello ") // => "hello"
19
+ */
2
20
  export declare function trimEnd(string: string): string;
@@ -2,7 +2,7 @@ import {
2
2
  trimEnd,
3
3
  trimStart
4
4
  } from "../../../chunks/chunk-6XL25OZX.js";
5
- import "../../../chunks/chunk-WSFCRVEQ.js";
5
+ import "../../../chunks/chunk-XCBH6NLF.js";
6
6
  export {
7
7
  trimEnd,
8
8
  trimStart
@@ -1 +1,48 @@
1
+ /**
2
+ * Formats a `Date` object into a string according to a custom template and locale.
3
+ *
4
+ * Supported tokens (placeholders must be wrapped in `{{...}}`):
5
+ *
6
+ * **Day**
7
+ * - `D` : Day of month (1–31)
8
+ * - `DD` : Day of month, padded (01–31)
9
+ * - `d` : Short weekday name (Mon, Tue, ...)
10
+ * - `dd` : Full weekday name (Monday, Tuesday, ...)
11
+ *
12
+ * **Month**
13
+ * - `M` : Month number (1–12)
14
+ * - `MM` : Month number, padded (01–12)
15
+ * - `MMM` : Short month name (Jan, Feb, ...)
16
+ * - `MMMM` : Full month name (January, February, ...)
17
+ *
18
+ * **Year**
19
+ * - `YY` : Two-digit year
20
+ * - `YYYY` : Four-digit year
21
+ *
22
+ * **Hours**
23
+ * - `H` : 24h format
24
+ * - `HH` : 24h format, padded
25
+ * - `h` : 12h format
26
+ * - `hh` : 12h format, padded
27
+ *
28
+ * **Minutes & Seconds**
29
+ * - `m` / `mm` : Minutes
30
+ * - `s` / `ss` : Seconds
31
+ *
32
+ * **AM/PM**
33
+ * - `A` : AM/PM
34
+ * - `a` : am/pm
35
+ *
36
+ * **Ordinal suffix**
37
+ * - `th` : Day ordinal suffix (`st`, `nd`, `rd`, `th` for English; `er` for French 1st)
38
+ *
39
+ * @param date - The `Date` object to format.
40
+ * @param format - The template string containing tokens.
41
+ * @param locale - Optional locale code (default: `'en'`).
42
+ * @returns Formatted date string.
43
+ *
44
+ * @example
45
+ * formatDate(new Date(2026, 0, 1, 15, 5), '{{YYYY}}-{{MM}}-{{DD}} {{hh}}:{{mm}} {{A}}')
46
+ * // => "2026-01-01 03:05 PM"
47
+ */
1
48
  export declare function formatDate(date: Date, format: string, locale?: string): string;
@@ -1,7 +1,61 @@
1
- import {
2
- formatDate
3
- } from "../../../../chunks/chunk-YQWZ3EP2.js";
4
- import "../../../../chunks/chunk-WSFCRVEQ.js";
1
+ import "../../../../chunks/chunk-XCBH6NLF.js";
2
+
3
+ // src/agnostic/time/dates/format-date/index.ts
4
+ function formatDate(date, format, locale = "en") {
5
+ try {
6
+ new Intl.DateTimeFormat(locale);
7
+ } catch {
8
+ locale = "en";
9
+ }
10
+ const day = date.getDate();
11
+ const dayOfWeek = date.getDay();
12
+ const month = date.getMonth();
13
+ const year = date.getFullYear();
14
+ const hours = date.getHours();
15
+ const minutes = date.getMinutes();
16
+ const seconds = date.getSeconds();
17
+ const isPM = hours >= 12;
18
+ const shortDateNames = [...Array(7)].map((_, i) => new Intl.DateTimeFormat(locale, { weekday: "short" }).format(new Date(2023, 0, i + 1)));
19
+ const dateNames = [...Array(7)].map((_, i) => new Intl.DateTimeFormat(locale, { weekday: "long" }).format(new Date(2023, 0, i + 1)));
20
+ const shortMonthNames = [...Array(12)].map((_, i) => new Intl.DateTimeFormat(locale, { month: "short" }).format(new Date(2023, i, 1)));
21
+ const monthNames = [...Array(12)].map((_, i) => new Intl.DateTimeFormat(locale, { month: "long" }).format(new Date(2023, i, 1)));
22
+ const replacements = {
23
+ "DD": () => String(day).padStart(2, "0"),
24
+ "D": () => String(day),
25
+ "dd": () => dateNames[dayOfWeek],
26
+ "d": () => shortDateNames[dayOfWeek],
27
+ "MM": () => String(month + 1).padStart(2, "0"),
28
+ "M": () => String(month + 1),
29
+ "MMMM": () => monthNames[month],
30
+ "MMM": () => shortMonthNames[month],
31
+ "YYYY": () => String(year),
32
+ "YY": () => String(year).slice(-2),
33
+ "hh": () => String(hours % 12 || 12).padStart(2, "0"),
34
+ "h": () => String(hours % 12 || 12),
35
+ "HH": () => String(hours).padStart(2, "0"),
36
+ "H": () => String(hours),
37
+ "mm": () => String(minutes).padStart(2, "0"),
38
+ "m": () => String(minutes),
39
+ "ss": () => String(seconds).padStart(2, "0"),
40
+ "s": () => String(seconds),
41
+ "A": () => isPM ? "PM" : "AM",
42
+ "a": () => isPM ? "pm" : "am",
43
+ "th": () => {
44
+ if (locale.startsWith("fr") && day === 1) return "er";
45
+ if (locale.startsWith("en")) {
46
+ const mod10 = day % 10;
47
+ const mod100 = day % 100;
48
+ if (mod10 === 1 && mod100 !== 11) return "st";
49
+ if (mod10 === 2 && mod100 !== 12) return "nd";
50
+ if (mod10 === 3 && mod100 !== 13) return "rd";
51
+ return "th";
52
+ }
53
+ return "";
54
+ }
55
+ };
56
+ const regexp = /{{(DD|D|dd|d|MM|M|MMMM|MMM|YYYY|YY|HH|H|hh|h|mm|m|ss|s|A|a|th)}}/g;
57
+ return format.replace(regexp, (match, token) => replacements[token]?.() ?? match);
58
+ }
5
59
  export {
6
60
  formatDate
7
61
  };
@@ -1,26 +1,39 @@
1
- export declare namespace Duration {
2
- type DurationType = 'milliseconds' | 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years';
3
- type DurationTypeShort = 'ms' | 's' | 'sec' | 'min' | 'm' | 'h' | 'd' | 'w' | 'mo' | 'mth' | 'y';
4
- class Duration {
5
- value: number;
6
- type: DurationType;
7
- constructor(value: number, type: DurationType | DurationTypeShort);
8
- toMilliseconds: () => number;
9
- toMs(): number;
10
- toSeconds(): number;
11
- toMinutes(): number;
12
- toHours(): number;
13
- toDays(): number;
14
- toWeeks(): number;
15
- toMonths(): number;
16
- toYear(): number;
17
- }
18
- function milliseconds(value: number): Duration;
19
- function seconds(value: number): Duration;
20
- function minutes(value: number): Duration;
21
- function hours(value: number): Duration;
22
- function days(value: number): Duration;
23
- function weeks(value: number): Duration;
24
- function months(value: number): Duration;
25
- function years(value: number): Duration;
1
+ /**
2
+ * Supported duration types (long form).
3
+ */
4
+ export type DurationType = 'milliseconds' | 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'years';
5
+ /**
6
+ * Supported duration types (short form aliases).
7
+ */
8
+ export type DurationTypeShort = 'ms' | 's' | 'sec' | 'min' | 'm' | 'h' | 'd' | 'w' | 'mo' | 'mth' | 'y';
9
+ /**
10
+ * Represents a duration in a specific unit and allows conversion to other units.
11
+ */
12
+ export declare class Duration {
13
+ value: number;
14
+ type: DurationType;
15
+ /**
16
+ * Creates a new Duration instance.
17
+ *
18
+ * @param value - The numeric value of the duration.
19
+ * @param type - The unit of the duration, either long or short form.
20
+ */
21
+ constructor(value: number, type: DurationType | DurationTypeShort);
22
+ toMilliseconds: () => number;
23
+ toMs(): number;
24
+ toSeconds(): number;
25
+ toMinutes(): number;
26
+ toHours(): number;
27
+ toDays(): number;
28
+ toWeeks(): number;
29
+ toMonths(): number;
30
+ toYear(): number;
26
31
  }
32
+ export declare function milliseconds(value: number): Duration;
33
+ export declare function seconds(value: number): Duration;
34
+ export declare function minutes(value: number): Duration;
35
+ export declare function hours(value: number): Duration;
36
+ export declare function days(value: number): Duration;
37
+ export declare function weeks(value: number): Duration;
38
+ export declare function months(value: number): Duration;
39
+ export declare function years(value: number): Duration;