@design-edito/tools 0.3.9 → 0.3.11

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 (387) hide show
  1. package/agnostic/arrays/index.d.ts +2 -2
  2. package/agnostic/arrays/index.js +2 -2
  3. package/agnostic/arrays/is-array-of/index.d.ts +1 -1
  4. package/agnostic/arrays/is-array-of/index.js +2 -2
  5. package/agnostic/booleans/is-falsy/index.d.ts +1 -1
  6. package/agnostic/colors/channels/index.d.ts +1 -1
  7. package/agnostic/colors/contrast/index.d.ts +1 -1
  8. package/agnostic/colors/convert/index.d.ts +1 -1
  9. package/agnostic/colors/convert/index.js +14 -17
  10. package/agnostic/colors/cssColorsMap.d.ts +9 -0
  11. package/agnostic/colors/distance/index.d.ts +1 -1
  12. package/agnostic/colors/index.d.ts +3 -3
  13. package/agnostic/colors/index.js +3 -3
  14. package/agnostic/colors/invert/index.d.ts +1 -1
  15. package/agnostic/colors/luminance/index.d.ts +1 -1
  16. package/agnostic/colors/palette/index.js +2 -0
  17. package/agnostic/colors/tidy/index.js +2 -1
  18. package/agnostic/colors/typechecks/index.d.ts +1 -1
  19. package/agnostic/colors/typechecks/index.js +1 -3
  20. package/agnostic/colors/types.d.ts +0 -7
  21. package/agnostic/colors/types.js +0 -154
  22. package/agnostic/css/bem/index.d.ts +3 -3
  23. package/agnostic/css/bem/index.js +6 -5
  24. package/agnostic/css/clss/index.d.ts +54 -1
  25. package/agnostic/css/clss/index.js +3 -3
  26. package/agnostic/css/generate-nice-color/index.js +1 -0
  27. package/agnostic/css/index.d.ts +1 -1
  28. package/agnostic/css/index.js +1 -1
  29. package/agnostic/css/styles-set/index.d.ts +4 -4
  30. package/agnostic/css/styles-set/index.js +1 -1
  31. package/agnostic/errors/index.d.ts +1 -1
  32. package/agnostic/errors/index.js +1 -1
  33. package/agnostic/errors/register/index.js +4 -2
  34. package/agnostic/html/get-node-ancestors/index.js +1 -1
  35. package/agnostic/html/get-position-inside-parent/index.js +1 -1
  36. package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
  37. package/agnostic/html/hyper-json/method/index.d.ts +2 -2
  38. package/agnostic/html/hyper-json/serialize/index.d.ts +1 -1
  39. package/agnostic/html/hyper-json/serialize/index.js +1 -1
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.d.ts +1 -1
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.d.ts +1 -1
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.d.ts +1 -1
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.d.ts +1 -1
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +1 -1
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.d.ts +1 -1
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.d.ts +1 -1
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -2
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.d.ts +1 -1
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.d.ts +1 -1
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.d.ts +1 -1
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -2
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.d.ts +1 -1
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.d.ts +1 -1
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.d.ts +1 -1
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +14 -14
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +14 -14
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.d.ts +1 -1
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.d.ts +1 -1
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.d.ts +1 -1
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.d.ts +2 -2
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +1 -1
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.d.ts +1 -1
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.d.ts +1 -1
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.d.ts +1 -1
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.d.ts +1 -1
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.d.ts +1 -1
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.d.ts +2 -2
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.d.ts +1 -1
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +2 -2
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +7 -4
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.d.ts +1 -1
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.d.ts +1 -1
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.d.ts +1 -1
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +2 -2
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +7 -4
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.d.ts +1 -1
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +9 -9
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.d.ts +2 -2
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.d.ts +1 -1
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.d.ts +1 -1
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.d.ts +1 -1
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +1 -1
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.d.ts +1 -1
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.d.ts +1 -1
  85. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.d.ts +1 -1
  86. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.d.ts +1 -1
  87. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.d.ts +1 -1
  88. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.d.ts +1 -1
  89. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.d.ts +1 -1
  90. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.d.ts +1 -1
  91. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +0 -1
  92. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +1 -1
  93. package/agnostic/html/hyper-json/smart-tags/index.d.ts +1 -1
  94. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.d.ts +1 -1
  95. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.d.ts +1 -1
  96. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.d.ts +1 -1
  97. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.d.ts +1 -1
  98. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.d.ts +1 -1
  99. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +1 -1
  100. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +3 -3
  101. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +3 -3
  102. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.d.ts +1 -1
  103. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.d.ts +1 -1
  104. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.d.ts +1 -1
  105. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.d.ts +1 -1
  106. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +3 -1
  107. package/agnostic/html/hyper-json/transformer/index.d.ts +2 -2
  108. package/agnostic/html/hyper-json/transformer/index.js +6 -9
  109. package/agnostic/html/hyper-json/tree/index.d.ts +1 -1
  110. package/agnostic/html/hyper-json/tree/index.js +14 -10
  111. package/agnostic/html/hyper-json/types/index.d.ts +9 -13
  112. package/agnostic/html/hyper-json/utils/index.d.ts +7 -7
  113. package/agnostic/html/hyper-json/utils/index.js +1 -1
  114. package/agnostic/html/index.d.ts +1 -1
  115. package/agnostic/html/index.js +1 -1
  116. package/agnostic/html/placeholders/index.d.ts +1 -1
  117. package/agnostic/html/selector-to-element/index.js +1 -1
  118. package/agnostic/index.d.ts +6 -6
  119. package/agnostic/index.js +6 -6
  120. package/agnostic/misc/assert/index.d.ts +5 -2
  121. package/agnostic/misc/assert/index.js +4 -4
  122. package/agnostic/misc/cast/index.d.ts +1 -1
  123. package/agnostic/misc/connection/index.js +0 -1
  124. package/agnostic/misc/crawler/index.d.ts +2 -2
  125. package/agnostic/misc/crossenv/detect-runtime/index.js +4 -4
  126. package/agnostic/misc/crossenv/index.d.ts +1 -1
  127. package/agnostic/misc/crossenv/index.js +1 -1
  128. package/agnostic/misc/crossenv/window/index.d.ts +1 -1
  129. package/agnostic/misc/crossenv/window/index.js +2 -2
  130. package/agnostic/misc/data-size/index.js +2 -2
  131. package/agnostic/misc/index.d.ts +6 -6
  132. package/agnostic/misc/index.js +6 -6
  133. package/agnostic/misc/is-constructor-function/index.d.ts +1 -1
  134. package/agnostic/misc/logs/logger/index.d.ts +11 -1
  135. package/agnostic/misc/logs/logger/index.js +40 -10
  136. package/agnostic/misc/logs/styles/index.d.ts +1 -0
  137. package/agnostic/misc/logs/styles/index.js +27 -9
  138. package/agnostic/misc/outcome/index.d.ts +7 -7
  139. package/agnostic/numbers/approximate-rational/index.js +4 -2
  140. package/agnostic/numbers/index.d.ts +3 -3
  141. package/agnostic/numbers/index.js +3 -3
  142. package/agnostic/objects/deep-get-property/index.js +2 -2
  143. package/agnostic/objects/flatten-getters/index.js +2 -1
  144. package/agnostic/objects/index.d.ts +5 -4
  145. package/agnostic/objects/index.js +5 -4
  146. package/agnostic/objects/record-format/index.js +1 -0
  147. package/agnostic/objects/sort-keys/index.d.ts +11 -0
  148. package/agnostic/objects/sort-keys/index.js +12 -0
  149. package/agnostic/objects/sort-keys/index.test.d.ts +1 -0
  150. package/agnostic/optim/memoize/index.js +1 -1
  151. package/agnostic/optim/throttle-debounce/index.d.ts +12 -10
  152. package/agnostic/optim/throttle-debounce/index.js +2 -2
  153. package/agnostic/optim/throttle-debounce/types.d.ts +1 -1
  154. package/agnostic/random/index.d.ts +1 -1
  155. package/agnostic/random/index.js +1 -1
  156. package/agnostic/random/random/index.js +1 -1
  157. package/agnostic/sanitization/html/index.js +7 -7
  158. package/agnostic/sanitization/index.d.ts +1 -1
  159. package/agnostic/sanitization/index.js +1 -1
  160. package/agnostic/sanitization/types.d.ts +2 -6
  161. package/agnostic/strings/char-codes/index.d.ts +5 -5
  162. package/agnostic/strings/char-codes/index.js +2 -2
  163. package/agnostic/strings/index.d.ts +3 -3
  164. package/agnostic/strings/index.js +3 -3
  165. package/agnostic/strings/matches/index.d.ts +2 -2
  166. package/agnostic/time/dates/format-date/index.js +23 -9
  167. package/agnostic/time/duration/index.d.ts +23 -2
  168. package/agnostic/time/duration/index.js +36 -4
  169. package/agnostic/time/index.d.ts +2 -2
  170. package/agnostic/time/index.js +2 -2
  171. package/agnostic/time/timeout/index.js +2 -2
  172. package/agnostic/time/transitions/index.d.ts +3 -3
  173. package/agnostic/time/transitions/index.js +4 -4
  174. package/agnostic/time/wait/index.d.ts +2 -2
  175. package/agnostic/time/wait/index.js +1 -1
  176. package/components/Disclaimer/index.d.ts +45 -0
  177. package/components/Disclaimer/index.js +70 -0
  178. package/components/Drawer/index.d.ts +45 -0
  179. package/components/Drawer/index.js +82 -0
  180. package/components/Drawer/styles.module.css +0 -0
  181. package/components/EventListener/index.d.ts +20 -3
  182. package/components/EventListener/index.js +15 -22
  183. package/components/Gallery/index.d.ts +67 -0
  184. package/components/Gallery/index.js +173 -0
  185. package/components/Gallery/styles.module.css +33 -0
  186. package/components/Gallery/utils.d.ts +1 -0
  187. package/components/Image/index.d.ts +60 -0
  188. package/components/Image/index.js +99 -0
  189. package/components/Image/styles.module.css +0 -0
  190. package/components/IntersectionObserver/index.d.ts +48 -11
  191. package/components/IntersectionObserver/index.js +13 -22
  192. package/components/Paginator/index.d.ts +72 -0
  193. package/components/Paginator/index.js +116 -0
  194. package/components/Paginator/styles.module.css +9 -0
  195. package/components/ResizeObserver/index.d.ts +27 -0
  196. package/components/ResizeObserver/index.js +81 -0
  197. package/components/Scrllgngn/index.d.ts +123 -0
  198. package/components/Scrllgngn/index.js +175 -0
  199. package/components/Scrllgngn/styles.module.css +74 -0
  200. package/components/Sequencer/index.controlled.d.ts +78 -0
  201. package/components/Sequencer/index.d.ts +85 -0
  202. package/components/Sequencer/index.js +109 -0
  203. package/components/Sequencer/styles.module.css +0 -0
  204. package/components/ShadowRoot/index.d.ts +35 -0
  205. package/components/ShadowRoot/index.js +56 -0
  206. package/components/ShadowRoot/styles.module.css +0 -0
  207. package/components/Subtitles/index.d.ts +58 -0
  208. package/components/Subtitles/index.js +111 -0
  209. package/components/Subtitles/styles.module.css +0 -0
  210. package/components/Subtitles/types.d.ts +10 -0
  211. package/components/Subtitles/types.js +0 -0
  212. package/components/Subtitles/utils.d.ts +28 -0
  213. package/components/Theatre/index.d.ts +64 -0
  214. package/components/Theatre/index.js +97 -0
  215. package/components/Theatre/styles.module.css +0 -0
  216. package/components/Video/index.d.ts +119 -0
  217. package/components/Video/index.js +358 -0
  218. package/components/Video/styles.module.css +0 -0
  219. package/components/Video/utils.d.ts +10 -0
  220. package/components/_WIP_AudioQuote/index.d.ts +1 -0
  221. package/components/_WIP_AudioQuote/index.js +0 -0
  222. package/components/_WIP_Icon/index.d.ts +1 -0
  223. package/components/_WIP_Icon/index.js +0 -0
  224. package/components/index.d.ts +15 -1
  225. package/components/index.js +15 -1
  226. package/components/public-classnames.d.ts +14 -3
  227. package/components/utils/index.d.ts +1 -0
  228. package/components/utils/index.js +12 -0
  229. package/components/utils/types.d.ts +3 -0
  230. package/components/utils/types.js +0 -0
  231. package/node/@aws-s3/index.test.d.ts +1 -0
  232. package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +2 -2
  233. package/node/@aws-s3/storage/directory/copy-dir/index.js +3 -3
  234. package/node/@aws-s3/storage/directory/index.d.ts +1 -1
  235. package/node/@aws-s3/storage/directory/index.js +1 -1
  236. package/node/@aws-s3/storage/directory/list/index.d.ts +2 -2
  237. package/node/@aws-s3/storage/directory/list/index.js +1 -1
  238. package/node/@aws-s3/storage/directory/move-dir/index.d.ts +3 -3
  239. package/node/@aws-s3/storage/directory/move-dir/index.js +3 -3
  240. package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +2 -2
  241. package/node/@aws-s3/storage/directory/remove-dir/index.js +4 -4
  242. package/node/@aws-s3/storage/file/copy/index.d.ts +1 -1
  243. package/node/@aws-s3/storage/file/download/index.d.ts +3 -3
  244. package/node/@aws-s3/storage/file/exists/index.d.ts +2 -2
  245. package/node/@aws-s3/storage/file/exists/index.js +1 -2
  246. package/node/@aws-s3/storage/file/index.d.ts +2 -2
  247. package/node/@aws-s3/storage/file/index.js +2 -2
  248. package/node/@aws-s3/storage/file/move/index.d.ts +2 -2
  249. package/node/@aws-s3/storage/file/remove/index.d.ts +1 -1
  250. package/node/@aws-s3/storage/file/stat/index.d.ts +1 -1
  251. package/node/@aws-s3/storage/file/upload/index.d.ts +2 -2
  252. package/node/@aws-s3/storage/index.d.ts +1 -1
  253. package/node/@aws-s3/storage/index.js +1 -1
  254. package/node/@express/@multer/index.d.ts +1 -1
  255. package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +1 -1
  256. package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +1 -1
  257. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  258. package/node/@google-cloud/storage/directory/index.js +1 -1
  259. package/node/@google-cloud/storage/directory/list/index.d.ts +1 -1
  260. package/node/@google-cloud/storage/directory/move-dir/index.d.ts +1 -1
  261. package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +1 -1
  262. package/node/@google-cloud/storage/file/copy/index.d.ts +2 -2
  263. package/node/@google-cloud/storage/file/download/index.d.ts +2 -2
  264. package/node/@google-cloud/storage/file/exists/index.d.ts +1 -1
  265. package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +1 -1
  266. package/node/@google-cloud/storage/file/get-metadata/index.d.ts +1 -1
  267. package/node/@google-cloud/storage/file/get-permissions/index.d.ts +1 -1
  268. package/node/@google-cloud/storage/file/index.d.ts +6 -6
  269. package/node/@google-cloud/storage/file/index.js +6 -6
  270. package/node/@google-cloud/storage/file/move/index.d.ts +1 -1
  271. package/node/@google-cloud/storage/file/remove/index.d.ts +1 -1
  272. package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +4 -4
  273. package/node/@google-cloud/storage/file/stat/index.d.ts +1 -1
  274. package/node/@google-cloud/storage/file/stat/index.js +2 -2
  275. package/node/@google-cloud/storage/file/update-metadata/index.d.ts +1 -1
  276. package/node/@google-cloud/storage/file/upload/index.d.ts +2 -2
  277. package/node/@google-cloud/storage/index.d.ts +1 -1
  278. package/node/@google-cloud/storage/index.js +1 -1
  279. package/node/cloud-storage/operations/copy-dir/index.d.ts +8 -8
  280. package/node/cloud-storage/operations/copy-dir/index.js +4 -4
  281. package/node/cloud-storage/operations/copy-file/index.d.ts +8 -8
  282. package/node/cloud-storage/operations/copy-file/index.js +4 -4
  283. package/node/cloud-storage/operations/download-file/index.d.ts +9 -9
  284. package/node/cloud-storage/operations/download-file/index.js +4 -4
  285. package/node/cloud-storage/operations/exists-file/index.d.ts +6 -6
  286. package/node/cloud-storage/operations/exists-file/index.js +4 -4
  287. package/node/cloud-storage/operations/index.d.ts +1 -1
  288. package/node/cloud-storage/operations/index.js +1 -1
  289. package/node/cloud-storage/operations/list-dir/index.d.ts +6 -6
  290. package/node/cloud-storage/operations/list-dir/index.js +4 -4
  291. package/node/cloud-storage/operations/move-dir/index.d.ts +8 -8
  292. package/node/cloud-storage/operations/move-dir/index.js +4 -4
  293. package/node/cloud-storage/operations/move-file/index.d.ts +8 -8
  294. package/node/cloud-storage/operations/move-file/index.js +4 -4
  295. package/node/cloud-storage/operations/remove-dir/index.d.ts +8 -8
  296. package/node/cloud-storage/operations/remove-dir/index.js +4 -4
  297. package/node/cloud-storage/operations/remove-file/index.d.ts +8 -8
  298. package/node/cloud-storage/operations/remove-file/index.js +4 -4
  299. package/node/cloud-storage/operations/stat-file/index.d.ts +8 -8
  300. package/node/cloud-storage/operations/stat-file/index.js +4 -4
  301. package/node/cloud-storage/operations/upload-file/index.d.ts +9 -9
  302. package/node/cloud-storage/operations/upload-file/index.js +4 -4
  303. package/node/encryption/index.d.ts +1 -1
  304. package/node/encryption/index.js +1 -1
  305. package/node/files/index.d.ts +1 -1
  306. package/node/files/index.js +1 -1
  307. package/node/files/read-write/index.js +1 -1
  308. package/node/files/subpaths/index.d.ts +3 -3
  309. package/node/files/subpaths/index.js +6 -6
  310. package/node/ftps/directory/copy-dir/index.d.ts +1 -1
  311. package/node/ftps/directory/copy-dir/index.js +1 -1
  312. package/node/ftps/directory/index.d.ts +2 -2
  313. package/node/ftps/directory/index.js +2 -2
  314. package/node/ftps/directory/list/index.d.ts +1 -1
  315. package/node/ftps/directory/move-dir/index.d.ts +1 -1
  316. package/node/ftps/directory/move-dir/index.js +1 -3
  317. package/node/ftps/directory/remove-dir/index.d.ts +2 -2
  318. package/node/ftps/file/copy/index.d.ts +1 -1
  319. package/node/ftps/file/copy/index.js +1 -1
  320. package/node/ftps/file/download/index.d.ts +2 -2
  321. package/node/ftps/file/exists/index.d.ts +2 -2
  322. package/node/ftps/file/exists/index.js +1 -1
  323. package/node/ftps/file/index.d.ts +1 -1
  324. package/node/ftps/file/index.js +1 -1
  325. package/node/ftps/file/move/index.d.ts +3 -3
  326. package/node/ftps/file/move/index.js +1 -1
  327. package/node/ftps/file/remove/index.d.ts +1 -1
  328. package/node/ftps/file/stat/index.d.ts +1 -1
  329. package/node/ftps/file/stat/index.js +2 -2
  330. package/node/ftps/file/upload/index.d.ts +2 -2
  331. package/node/images/format/index.d.ts +1 -1
  332. package/node/images/format/index.js +9 -9
  333. package/node/images/index.d.ts +1 -1
  334. package/node/images/index.js +1 -1
  335. package/node/images/metadata/index.d.ts +1 -1
  336. package/node/images/metadata/index.js +1 -1
  337. package/node/images/transform/index.d.ts +2 -2
  338. package/node/images/transform/index.js +26 -21
  339. package/node/images/transform/operations/blur/index.d.ts +1 -1
  340. package/node/images/transform/operations/brighten/index.d.ts +1 -1
  341. package/node/images/transform/operations/extend/index.d.ts +1 -1
  342. package/node/images/transform/operations/extract/index.d.ts +1 -1
  343. package/node/images/transform/operations/flatten/index.d.ts +1 -1
  344. package/node/images/transform/operations/flatten/index.js +1 -1
  345. package/node/images/transform/operations/flip/index.d.ts +1 -1
  346. package/node/images/transform/operations/flop/index.d.ts +1 -1
  347. package/node/images/transform/operations/hue/index.d.ts +1 -1
  348. package/node/images/transform/operations/index.d.ts +5 -5
  349. package/node/images/transform/operations/index.js +5 -5
  350. package/node/images/transform/operations/level/index.d.ts +1 -1
  351. package/node/images/transform/operations/lighten/index.d.ts +1 -1
  352. package/node/images/transform/operations/normalize/index.d.ts +1 -1
  353. package/node/images/transform/operations/overlay/index.js +1 -1
  354. package/node/images/transform/operations/resize/index.d.ts +1 -1
  355. package/node/images/transform/operations/rotate/index.d.ts +1 -1
  356. package/node/images/transform/operations/saturate/index.d.ts +1 -1
  357. package/node/index.d.ts +2 -2
  358. package/node/index.js +2 -2
  359. package/node/process/prompt-continue/index.js +1 -1
  360. package/node/process/spawner/index.d.ts +61 -10
  361. package/node/process/spawner/index.js +15 -13
  362. package/node/sftp/directory/copy-dir/index.d.ts +2 -1
  363. package/node/sftp/directory/copy-dir/index.js +2 -2
  364. package/node/sftp/directory/index.d.ts +1 -1
  365. package/node/sftp/directory/index.js +1 -1
  366. package/node/sftp/directory/list/index.d.ts +1 -1
  367. package/node/sftp/directory/move-dir/index.d.ts +1 -1
  368. package/node/sftp/directory/move-dir/index.js +2 -4
  369. package/node/sftp/directory/remove-dir/index.d.ts +2 -2
  370. package/node/sftp/file/copy/index.d.ts +2 -1
  371. package/node/sftp/file/copy/index.js +2 -2
  372. package/node/sftp/file/download/index.d.ts +3 -3
  373. package/node/sftp/file/exists/index.d.ts +1 -1
  374. package/node/sftp/file/index.d.ts +2 -2
  375. package/node/sftp/file/index.js +2 -2
  376. package/node/sftp/file/move/index.d.ts +3 -3
  377. package/node/sftp/file/move/index.js +3 -5
  378. package/node/sftp/file/remove/index.d.ts +1 -1
  379. package/node/sftp/file/remove/index.js +1 -1
  380. package/node/sftp/file/stat/index.d.ts +1 -1
  381. package/node/sftp/file/stat/index.js +1 -1
  382. package/node/sftp/file/upload/index.d.ts +3 -2
  383. package/node/sftp/file/upload/index.js +1 -1
  384. package/package.json +2265 -14
  385. package/components/Input/index.d.ts +0 -7
  386. package/components/Input/index.js +0 -29
  387. /package/components/{Input → Disclaimer}/styles.module.css +0 -0
@@ -16,7 +16,7 @@ async function assert(label, assertion) {
16
16
  else if (typeof assertion === "function") {
17
17
  try {
18
18
  const result = await assertion();
19
- if (result === false) return Outcome.makeFailure(label);
19
+ if (!result) return Outcome.makeFailure(label);
20
20
  else return Outcome.makeSuccess(label);
21
21
  } catch (err) {
22
22
  const errStr = unknownToString(err);
@@ -31,14 +31,14 @@ async function assert(label, assertion) {
31
31
  } else {
32
32
  assertions = Object.entries(assertion);
33
33
  }
34
- const allAsserted = await Promise.all(assertions.map(([innerLabel, innerAssertion]) => {
34
+ const allAsserted = await Promise.all(assertions.map(async ([innerLabel, innerAssertion]) => {
35
35
  const fullLabel = `${label} / ${innerLabel}`;
36
36
  const asserted = assert(fullLabel, innerAssertion);
37
- return asserted;
37
+ return await asserted;
38
38
  }));
39
39
  const allSuccess = allAsserted.every((asserted) => asserted.success);
40
40
  if (allSuccess) return Outcome.makeSuccess(allAsserted.map((e) => e.payload).join("\n"));
41
- const failures = allAsserted.filter((asserted) => asserted.success === false);
41
+ const failures = allAsserted.filter((asserted) => !asserted.success);
42
42
  const failuresStr = failures.map((failure) => failure.error).join("\n ");
43
43
  return Outcome.makeFailure(failuresStr);
44
44
  }
@@ -47,7 +47,7 @@ export declare function toNull(_value: unknown): null;
47
47
  * @param {unknown} value - The value to convert.
48
48
  * @returns {Array<unknown>} The array representation of the input.
49
49
  */
50
- export declare function toArray(value: unknown): Array<unknown>;
50
+ export declare function toArray(value: unknown): unknown[];
51
51
  /**
52
52
  * Converts a value to an array of numbers.
53
53
  *
@@ -15,7 +15,6 @@ function isConnection(unk) {
15
15
  if (!isType(unk.type)) return false;
16
16
  if (!("effectiveType" in unk)) return false;
17
17
  if (!isEffectiveType(unk.effectiveType)) return false;
18
- unk;
19
18
  return true;
20
19
  }
21
20
  function getConnection() {
@@ -30,7 +30,7 @@ export type Processor<T> = (url: string, content: T, hooks: {
30
30
  *
31
31
  * @template T - The type of content returned by the fetcher.
32
32
  */
33
- export type Options<T extends any> = {
33
+ export type Options<T> = {
34
34
  /** Maximum number of URLs to process. */
35
35
  limit: number;
36
36
  /** Optional delay between processing URLs, in milliseconds, or a function returning the delay. */
@@ -86,4 +86,4 @@ export type Crawler = {
86
86
  * console.log('Total processed:', crawler.processed.size);
87
87
  * ```
88
88
  */
89
- export declare function create<T extends any>(options: Options<T>): Crawler;
89
+ export declare function create<T>(options: Options<T>): Crawler;
@@ -1,11 +1,11 @@
1
1
  // src/agnostic/misc/crossenv/detect-runtime/index.ts
2
2
  import { RuntimeName } from "../types.js";
3
3
  function detectRuntime() {
4
- if (typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined") return RuntimeName.NODE;
5
- if (typeof window !== "undefined" && typeof window.document !== "undefined") return RuntimeName.BROWSER;
4
+ if (typeof process?.versions?.node !== "undefined") return RuntimeName.NODE;
5
+ if (typeof window?.document !== "undefined") return RuntimeName.BROWSER;
6
6
  if (typeof Deno !== "undefined") return RuntimeName.DENO;
7
- if (typeof process !== "undefined" && typeof navigator.userAgent === "string" && /ReactNative/.test(navigator.userAgent)) return RuntimeName.REACT_NATIVE;
8
- if (typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.version.electron !== "undefined") return RuntimeName.ELECTRON;
7
+ if (typeof process !== "undefined" && typeof navigator.userAgent === "string" && navigator.userAgent.includes("ReactNative")) return RuntimeName.REACT_NATIVE;
8
+ if (typeof process?.versions !== "undefined" && typeof process.version.electron !== "undefined") return RuntimeName.ELECTRON;
9
9
  if (typeof self !== "undefined" && typeof self.addEventListener === "function" && typeof Headers !== "undefined") return RuntimeName.CLOUDFLARE;
10
10
  if (typeof AWS !== "undefined" && typeof AWS.Lambda !== "undefined") return RuntimeName.AWS_LAMBDA;
11
11
  return null;
@@ -1,2 +1,2 @@
1
- export * as detectRuntime from './detect-runtime/index.js'
2
1
  export * as window from './window/index.js'
2
+ export * as detectRuntime from './detect-runtime/index.js'
@@ -1,2 +1,2 @@
1
- export * as detectRuntime from './detect-runtime/index.js'
2
1
  export * as window from './window/index.js'
2
+ export * as detectRuntime from './detect-runtime/index.js'
@@ -1,4 +1,4 @@
1
- import { MinimalWindow } from '../types.js';
1
+ import { type MinimalWindow } from '../types.js';
2
2
  /**
3
3
  * Checks whether a `window` object exists in the current environment.
4
4
  *
@@ -2,14 +2,14 @@
2
2
  function exists() {
3
3
  return typeof globalThis !== "undefined" && "window" in globalThis;
4
4
  }
5
- var _window = exists() ? globalThis["window"] ?? null : null;
5
+ var _window = exists() ? globalThis.window ?? null : null;
6
6
  function set(customWindow) {
7
7
  _window = customWindow;
8
8
  return customWindow;
9
9
  }
10
10
  function unset() {
11
11
  if (exists()) {
12
- _window = globalThis["window"];
12
+ _window = globalThis.window;
13
13
  } else {
14
14
  _window = null;
15
15
  }
@@ -67,7 +67,7 @@ var DataSize = class {
67
67
  if (this.unit === "exbibyte") return this.value * 8 * Math.pow(1024, 6);
68
68
  return this.value;
69
69
  }
70
- /* * * * * * * * * * * * * * * * * *
70
+ /* * * * * * * * * * * * * * * * * *
71
71
  * Decimal unit converters
72
72
  * * * * * * * * * * * * * * * * * */
73
73
  toBytes() {
@@ -98,7 +98,7 @@ var DataSize = class {
98
98
  return this.toBytes() / 1e18;
99
99
  }
100
100
  toEB = this.toExabytes.bind(this);
101
- /* * * * * * * * * * * * * * * * * *
101
+ /* * * * * * * * * * * * * * * * * *
102
102
  * Binary unit converters
103
103
  * * * * * * * * * * * * * * * * * */
104
104
  toKibibytes() {
@@ -1,12 +1,12 @@
1
- export * as connection from './connection/index.js'
2
- export * as cast from './cast/index.js'
3
1
  export * as assert from './assert/index.js'
2
+ export * as cast from './cast/index.js'
3
+ export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
- export * as dataSize from './data-size/index.js'
6
- export * as isNullish from './is-nullish/index.js'
5
+ export * as crossenv from './crossenv/index.js'
7
6
  export * as isConstructorFunction from './is-constructor-function/index.js'
7
+ export * as dataSize from './data-size/index.js'
8
8
  export * as logs from './logs/index.js'
9
+ export * as normalizeExtension from './normalize-extension/index.js'
10
+ export * as isNullish from './is-nullish/index.js'
9
11
  export * as loremIpsum from './lorem-ipsum/index.js'
10
- export * as crossenv from './crossenv/index.js'
11
12
  export * as outcome from './outcome/index.js'
12
- export * as normalizeExtension from './normalize-extension/index.js'
@@ -1,12 +1,12 @@
1
- export * as connection from './connection/index.js'
2
- export * as cast from './cast/index.js'
3
1
  export * as assert from './assert/index.js'
2
+ export * as cast from './cast/index.js'
3
+ export * as connection from './connection/index.js'
4
4
  export * as crawler from './crawler/index.js'
5
- export * as dataSize from './data-size/index.js'
6
- export * as isNullish from './is-nullish/index.js'
5
+ export * as crossenv from './crossenv/index.js'
7
6
  export * as isConstructorFunction from './is-constructor-function/index.js'
7
+ export * as dataSize from './data-size/index.js'
8
8
  export * as logs from './logs/index.js'
9
+ export * as normalizeExtension from './normalize-extension/index.js'
10
+ export * as isNullish from './is-nullish/index.js'
9
11
  export * as loremIpsum from './lorem-ipsum/index.js'
10
- export * as crossenv from './crossenv/index.js'
11
12
  export * as outcome from './outcome/index.js'
12
- export * as normalizeExtension from './normalize-extension/index.js'
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @template T - The type of object constructed by the function.
5
5
  */
6
- export type ConstructorFunction<T extends any = any> = new (...args: any[]) => T;
6
+ export type ConstructorFunction<T = any> = new (...args: any[]) => T;
7
7
  /**
8
8
  * Checks whether a given value is a constructor function (i.e., a class or function with a prototype).
9
9
  *
@@ -29,14 +29,24 @@ declare class Log<T extends ConsoleMethod = ConsoleMethod> {
29
29
  get displayStack(): string;
30
30
  }
31
31
  export declare class Logger {
32
- _private_threads: Map<string, Log[]>;
32
+ _private_threads: Map<string, Log<ConsoleMethod>[]>;
33
33
  constructor();
34
+ assert(thread?: string, ...args: ConsoleMethodsParams['assert']): void;
35
+ count(thread?: string, ...args: ConsoleMethodsParams['count']): void;
36
+ countReset(thread?: string, ...args: ConsoleMethodsParams['countReset']): void;
37
+ debug(thread?: string, ...args: ConsoleMethodsParams['debug']): void;
34
38
  dir(thread?: string, ...args: ConsoleMethodsParams['dir']): void;
39
+ dirxml(thread?: string, ...args: ConsoleMethodsParams['dirxml']): void;
35
40
  error(thread?: string, ...args: ConsoleMethodsParams['error']): void;
36
41
  group(thread?: string, ...args: ConsoleMethodsParams['group']): void;
42
+ groupCollapsed(thread?: string, ...args: ConsoleMethodsParams['groupCollapsed']): void;
37
43
  groupEnd(thread?: string, ...args: ConsoleMethodsParams['groupEnd']): void;
44
+ info(thread?: string, ...args: ConsoleMethodsParams['info']): void;
38
45
  log(thread?: string, ...args: ConsoleMethodsParams['log']): void;
39
46
  table(thread?: string, ...args: ConsoleMethodsParams['table']): void;
47
+ time(thread?: string, ...args: ConsoleMethodsParams['time']): void;
48
+ timeEnd(thread?: string, ...args: ConsoleMethodsParams['timeEnd']): void;
49
+ trace(thread?: string, ...args: ConsoleMethodsParams['trace']): void;
40
50
  warn(thread?: string, ...args: ConsoleMethodsParams['warn']): void;
41
51
  setLog<T extends ConsoleMethod>(threadName: string, type: T, data: ConsoleMethodsParams[T]): this;
42
52
  print(this: Logger, threadFilter?: string, withStack?: boolean): void;
@@ -32,45 +32,75 @@ var Log = class {
32
32
  var Logger = class {
33
33
  _private_threads = /* @__PURE__ */ new Map();
34
34
  constructor() {
35
+ this.assert = this.assert.bind(this);
36
+ this.count = this.count.bind(this);
37
+ this.countReset = this.countReset.bind(this);
38
+ this.debug = this.debug.bind(this);
35
39
  this.dir = this.dir.bind(this);
40
+ this.dirxml = this.dirxml.bind(this);
36
41
  this.error = this.error.bind(this);
37
42
  this.group = this.group.bind(this);
43
+ this.groupCollapsed = this.groupCollapsed.bind(this);
38
44
  this.groupEnd = this.groupEnd.bind(this);
45
+ this.info = this.info.bind(this);
39
46
  this.log = this.log.bind(this);
40
47
  this.table = this.table.bind(this);
48
+ this.time = this.time.bind(this);
49
+ this.timeEnd = this.timeEnd.bind(this);
50
+ this.trace = this.trace.bind(this);
41
51
  this.warn = this.warn.bind(this);
42
52
  this.setLog = this.setLog.bind(this);
43
53
  this.print = this.print.bind(this);
44
54
  this.printThreads = this.printThreads.bind(this);
45
55
  }
46
- // assert (thread: string = '', ...args: ConsoleMethodsParams['assert']) { this.setLog(thread, 'assert', args) }
47
- // count (thread: string = '', ...args: ConsoleMethodsParams['count']) { this.setLog(thread, 'count', args) }
48
- // countReset (thread: string = '', ...args: ConsoleMethodsParams['countReset']) { this.setLog(thread, 'countReset', args) }
49
- // debug (thread: string = '', ...args: ConsoleMethodsParams['debug']) { this.setLog(thread, 'debug', args) }
56
+ assert(thread = "", ...args) {
57
+ this.setLog(thread, "assert", args);
58
+ }
59
+ count(thread = "", ...args) {
60
+ this.setLog(thread, "count", args);
61
+ }
62
+ countReset(thread = "", ...args) {
63
+ this.setLog(thread, "countReset", args);
64
+ }
65
+ debug(thread = "", ...args) {
66
+ this.setLog(thread, "debug", args);
67
+ }
50
68
  dir(thread = "", ...args) {
51
69
  this.setLog(thread, "dir", args);
52
70
  }
53
- // dirxml (thread: string = '', ...args: ConsoleMethodsParams['dirxml']) { this.setLog(thread, 'dirxml', args) }
71
+ dirxml(thread = "", ...args) {
72
+ this.setLog(thread, "dirxml", args);
73
+ }
54
74
  error(thread = "", ...args) {
55
75
  this.setLog(thread, "error", args);
56
76
  }
57
77
  group(thread = "", ...args) {
58
78
  this.setLog(thread, "group", args);
59
79
  }
60
- // groupCollapsed (thread: string = '', ...args: ConsoleMethodsParams['groupCollapsed']) { this.setLog(thread, 'groupCollapsed', args) }
80
+ groupCollapsed(thread = "", ...args) {
81
+ this.setLog(thread, "groupCollapsed", args);
82
+ }
61
83
  groupEnd(thread = "", ...args) {
62
84
  this.setLog(thread, "groupEnd", args);
63
85
  }
64
- // info (thread: string = '', ...args: ConsoleMethodsParams['info']) { this.setLog(thread, 'info', args) }
86
+ info(thread = "", ...args) {
87
+ this.setLog(thread, "info", args);
88
+ }
65
89
  log(thread = "", ...args) {
66
90
  this.setLog(thread, "log", args);
67
91
  }
68
92
  table(thread = "", ...args) {
69
93
  this.setLog(thread, "table", args);
70
94
  }
71
- // time (thread: string = '', ...args: ConsoleMethodsParams['time']) { this.setLog(thread, 'time', args) }
72
- // timeEnd (thread: string = '', ...args: ConsoleMethodsParams['timeEnd']) { this.setLog(thread, 'timeEnd', args) }
73
- // trace (thread: string = '', ...args: ConsoleMethodsParams['trace']) { this.setLog(thread, 'trace', args) }
95
+ time(thread = "", ...args) {
96
+ this.setLog(thread, "time", args);
97
+ }
98
+ timeEnd(thread = "", ...args) {
99
+ this.setLog(thread, "timeEnd", args);
100
+ }
101
+ trace(thread = "", ...args) {
102
+ this.setLog(thread, "trace", args);
103
+ }
74
104
  warn(thread = "", ...args) {
75
105
  this.setLog(thread, "warn", args);
76
106
  }
@@ -8,4 +8,5 @@ export declare const styles: {
8
8
  success: (text: string) => string;
9
9
  error: (text: string) => string;
10
10
  warning: (text: string) => string;
11
+ italic: (text: string) => string;
11
12
  };
@@ -1,20 +1,38 @@
1
1
  // src/agnostic/misc/logs/styles/index.ts
2
- import chalk from "chalk";
3
2
  import { makeTextBlock } from "../make-text-block/index.js";
3
+ var ansi = {
4
+ reset: "\x1B[0m",
5
+ bold: "\x1B[1m",
6
+ italic: "\x1B[3m",
7
+ underline: "\x1B[4m",
8
+ fg: {
9
+ red: "\x1B[31m",
10
+ green: "\x1B[32m",
11
+ yellow: "\x1B[33m",
12
+ blue: "\x1B[34m",
13
+ gray: "\x1B[90m",
14
+ whiteBright: "\x1B[97m"
15
+ },
16
+ bg: {
17
+ red: "\x1B[41m"
18
+ }
19
+ };
20
+ var wrap = (...ansiCodes) => (text) => `${ansiCodes.join("")}${text}${ansi.reset}`;
4
21
  var styles = {
5
22
  regular: (text) => text,
6
- light: (text) => chalk.grey(text),
7
- danger: (text) => chalk.bold.bgRed.whiteBright(makeTextBlock(`/!\\
23
+ light: wrap(ansi.fg.gray),
24
+ danger: (text) => wrap(ansi.bold, ansi.bg.red, ansi.fg.whiteBright)(makeTextBlock(`/!\\
8
25
 
9
26
  ${text}
10
27
  `, 2, 6)),
11
- important: (text) => chalk.bold(text),
12
- title: (text) => `# ${chalk.bold.underline(`${text}
28
+ important: wrap(ansi.bold),
29
+ title: (text) => `# ${wrap(ansi.bold, ansi.underline)(`${text}
13
30
  `)}`,
14
- info: (text) => chalk.blueBright(text),
15
- success: (text) => chalk.greenBright(text),
16
- error: (text) => chalk.red(text),
17
- warning: (text) => chalk.yellow(text)
31
+ info: wrap(ansi.fg.blue),
32
+ success: wrap(ansi.fg.green),
33
+ error: wrap(ansi.fg.red),
34
+ warning: wrap(ansi.fg.yellow),
35
+ italic: wrap(ansi.italic)
18
36
  };
19
37
  export {
20
38
  styles
@@ -5,7 +5,7 @@
5
5
  * @property {true} success - Always `true`.
6
6
  * @property {Payload} payload - The success value.
7
7
  */
8
- export type Success<Payload extends any = any> = {
8
+ export type Success<Payload = any> = {
9
9
  success: true;
10
10
  payload: Payload;
11
11
  };
@@ -16,7 +16,7 @@ export type Success<Payload extends any = any> = {
16
16
  * @property {false} success - Always `false`.
17
17
  * @property {Error} error - The error value.
18
18
  */
19
- export type Failure<Error extends any = any> = {
19
+ export type Failure<Error = any> = {
20
20
  success: false;
21
21
  error: Error;
22
22
  };
@@ -26,7 +26,7 @@ export type Failure<Error extends any = any> = {
26
26
  * @template Payload - Type of success payload.
27
27
  * @template Error - Type of error.
28
28
  */
29
- export type Either<Payload extends any = any, Error extends any = any> = Success<Payload> | Failure<Error>;
29
+ export type Either<Payload = any, Error = any> = Success<Payload> | Failure<Error>;
30
30
  /**
31
31
  * Creates a success outcome with the given payload.
32
32
  *
@@ -34,7 +34,7 @@ export type Either<Payload extends any = any, Error extends any = any> = Success
34
34
  * @param {Payload} payload - The success value.
35
35
  * @returns {Success<Payload>} A success outcome object.
36
36
  */
37
- export declare function makeSuccess<Payload extends any>(payload: Payload): Success<Payload>;
37
+ export declare function makeSuccess<Payload>(payload: Payload): Success<Payload>;
38
38
  /**
39
39
  * Creates a failure outcome with the given error.
40
40
  *
@@ -42,7 +42,7 @@ export declare function makeSuccess<Payload extends any>(payload: Payload): Succ
42
42
  * @param {Error} error - The error value.
43
43
  * @returns {Failure<Error>} A failure outcome object.
44
44
  */
45
- export declare function makeFailure<Error extends any>(error: Error): Failure<Error>;
45
+ export declare function makeFailure<Error>(error: Error): Failure<Error>;
46
46
  /**
47
47
  * Creates either a success or failure outcome based on a boolean flag.
48
48
  *
@@ -52,5 +52,5 @@ export declare function makeFailure<Error extends any>(error: Error): Failure<Er
52
52
  * @param {Payload | Error} payloadOrError - The payload if success, or the error if failure.
53
53
  * @returns {Either<Payload, Error>} The resulting outcome.
54
54
  */
55
- export declare function make<Payload extends any>(success: true, payload: Payload): Success<Payload>;
56
- export declare function make<Error extends any>(success: false, error: Error): Failure<Error>;
55
+ export declare function make<Payload>(success: true, payload: Payload): Success<Payload>;
56
+ export declare function make<Error>(success: false, error: Error): Failure<Error>;
@@ -44,8 +44,10 @@ function approximateRationalDumb(target, maxRounds) {
44
44
  function approximateRational(target, maxDenominator = 1e3) {
45
45
  const sign = target < 0 ? -1 : 1;
46
46
  const absTarget = Math.abs(target);
47
- let h1 = 1, h2 = 0;
48
- let k1 = 0, k2 = 1;
47
+ let h1 = 1;
48
+ let h2 = 0;
49
+ let k1 = 0;
50
+ let k2 = 1;
49
51
  let b = absTarget;
50
52
  do {
51
53
  const a = Math.floor(b);
@@ -1,6 +1,6 @@
1
- export * as absoluteModulo from './absolute-modulo/index.js'
1
+ export * as approximateRational from './approximate-rational/index.js'
2
2
  export * as clamp from './clamp/index.js'
3
3
  export * as geometricProgressions from './geometric-progressions/index.js'
4
- export * as approximateRational from './approximate-rational/index.js'
5
- export * as round from './round/index.js'
6
4
  export * as interpolate from './interpolate/index.js'
5
+ export * as round from './round/index.js'
6
+ export * as absoluteModulo from './absolute-modulo/index.js'
@@ -1,6 +1,6 @@
1
- export * as absoluteModulo from './absolute-modulo/index.js'
1
+ export * as approximateRational from './approximate-rational/index.js'
2
2
  export * as clamp from './clamp/index.js'
3
3
  export * as geometricProgressions from './geometric-progressions/index.js'
4
- export * as approximateRational from './approximate-rational/index.js'
5
- export * as round from './round/index.js'
6
4
  export * as interpolate from './interpolate/index.js'
5
+ export * as round from './round/index.js'
6
+ export * as absoluteModulo from './absolute-modulo/index.js'
@@ -6,14 +6,14 @@ function deepGetProperty(anythingThatHasProperties, pathString) {
6
6
  let returned = currentObject;
7
7
  pathChunks.forEach((chunk, pos) => {
8
8
  const isLast = pos === pathChunks.length - 1;
9
- if (!isRecord(currentObject)) throw "PROPERTY_UNREACHABLE";
9
+ if (!isRecord(currentObject)) throw new Error("PROPERTY_UNREACHABLE");
10
10
  if (isLast) {
11
11
  const val = currentObject[chunk];
12
12
  returned = val;
13
13
  } else {
14
14
  const found = currentObject[chunk];
15
15
  if (isRecord(found)) currentObject = found;
16
- else throw "PROPERTY_UNREACHABLE";
16
+ else throw new Error("PROPERTY_UNREACHABLE");
17
17
  }
18
18
  });
19
19
  return returned;
@@ -5,7 +5,8 @@ function flattenGetters(obj) {
5
5
  ).filter(([_, desc]) => typeof desc.get === "function").map(([key]) => key);
6
6
  const returned = { ...obj };
7
7
  getters.forEach((getter) => {
8
- returned[getter] = obj[getter];
8
+ const key = getter;
9
+ returned[getter] = obj[key];
9
10
  });
10
11
  return returned;
11
12
  }
@@ -1,8 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
- export * as flattenGetters from './flatten-getters/index.js'
3
- export * as isObject from './is-object/index.js'
2
+ export * as enums from './enums/index.js'
4
3
  export * as isRecord from './is-record/index.js'
4
+ export * as isObject from './is-object/index.js'
5
5
  export * as recordFormat from './record-format/index.js'
6
- export * as validation from './validation/index.js'
6
+ export * as flattenGetters from './flatten-getters/index.js'
7
7
  export * as recordMap from './record-map/index.js'
8
- export * as enums from './enums/index.js'
8
+ export * as sortKeys from './sort-keys/index.js'
9
+ export * as validation from './validation/index.js'
@@ -1,8 +1,9 @@
1
1
  export * as deepGetProperty from './deep-get-property/index.js'
2
- export * as flattenGetters from './flatten-getters/index.js'
3
- export * as isObject from './is-object/index.js'
2
+ export * as enums from './enums/index.js'
4
3
  export * as isRecord from './is-record/index.js'
4
+ export * as isObject from './is-object/index.js'
5
5
  export * as recordFormat from './record-format/index.js'
6
- export * as validation from './validation/index.js'
6
+ export * as flattenGetters from './flatten-getters/index.js'
7
7
  export * as recordMap from './record-map/index.js'
8
- export * as enums from './enums/index.js'
8
+ export * as sortKeys from './sort-keys/index.js'
9
+ export * as validation from './validation/index.js'
@@ -3,6 +3,7 @@ async function recordFormat(input, format) {
3
3
  const result = {};
4
4
  for (const key in format) {
5
5
  const formatter = format[key];
6
+ if (formatter === void 0) continue;
6
7
  result[key] = await formatter(input[key]);
7
8
  }
8
9
  return result;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Returns a new object with the keys sorted according to the provided sorter.
3
+ *
4
+ * @template T - The type of the input object.
5
+ * @param {T} obj - The object whose keys should be sorted.
6
+ * @param {(a: keyof T, b: keyof T) => number} [sorter] - Optional function used to compare keys for sorting. Defaults to alphabetical order.
7
+ * @returns {{ [K in keyof T]: T[K] }} A new object with the same keys and values as the input, but sorted by key.
8
+ */
9
+ export declare function sortKeys<T extends Record<string, unknown>>(obj: T, sorter?: (a: keyof T, b: keyof T) => number): {
10
+ [K in keyof T]: T[K];
11
+ };
@@ -0,0 +1,12 @@
1
+ // src/agnostic/objects/sort-keys/index.ts
2
+ function sortKeys(obj, sorter = (a, b) => String(a).localeCompare(String(b))) {
3
+ const out = {};
4
+ const keys = Object.keys(obj);
5
+ for (const key of keys.sort(sorter)) {
6
+ out[key] = obj[key];
7
+ }
8
+ return out;
9
+ }
10
+ export {
11
+ sortKeys
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -3,7 +3,7 @@ function memoize(toMemoizeFunc) {
3
3
  let cachedArgs;
4
4
  let cachedResult;
5
5
  const memoizedFunc = (...args) => {
6
- const argsMatch = cachedArgs !== void 0 && args.length === cachedArgs.length && args.every((arg, i) => arg === cachedArgs[i]);
6
+ const argsMatch = cachedArgs !== void 0 && args.length === cachedArgs.length && args.every((arg, i) => arg === cachedArgs?.[i]);
7
7
  if (argsMatch && cachedResult !== void 0) return cachedResult.value;
8
8
  const result = toMemoizeFunc(...args);
9
9
  cachedArgs = args;
@@ -1,10 +1,5 @@
1
1
  type BasicFunction = (...args: any[]) => any;
2
- /**
3
- * Returns a throttled version of the function passed as an argument
4
- * @param toThrottleFunc - The function that has to be throttled
5
- * @param delayMs - The throttle delay in ms
6
- */
7
- export declare function throttle<T extends BasicFunction = BasicFunction>(toThrottleFunc: T, delayMs: number): {
2
+ type ThrottledResult<T extends BasicFunction> = {
8
3
  throttled: (...args: any[]) => {
9
4
  returnValue: ReturnType<T> | undefined;
10
5
  lastExecutedOn: number;
@@ -14,11 +9,12 @@ export declare function throttle<T extends BasicFunction = BasicFunction>(toThro
14
9
  setDelay: (delayMs: number) => void;
15
10
  };
16
11
  /**
17
- * Returns a debounced version of the function passed as an argument
18
- * @param toDebounceFunc - The function that has to be debounced
19
- * @param delayMs - The debounce delay in ms
12
+ * Returns a throttled version of the function passed as an argument
13
+ * @param toThrottleFunc - The function that has to be throttled
14
+ * @param delayMs - The throttle delay in ms
20
15
  */
21
- export declare function debounce<T extends BasicFunction = BasicFunction>(toDebounceFunc: T, delayMs: number): {
16
+ export declare function throttle<T extends BasicFunction = BasicFunction>(toThrottleFunc: T, delayMs: number): ThrottledResult<T>;
17
+ type DebounceResult<T extends BasicFunction> = {
22
18
  debounced: (...args: any[]) => {
23
19
  returnValue: ReturnType<T> | undefined;
24
20
  lastExecutedOn: number;
@@ -27,4 +23,10 @@ export declare function debounce<T extends BasicFunction = BasicFunction>(toDebo
27
23
  };
28
24
  setDelay: (delayMs: number) => void;
29
25
  };
26
+ /**
27
+ * Returns a debounced version of the function passed as an argument
28
+ * @param toDebounceFunc - The function that has to be debounced
29
+ * @param delayMs - The debounce delay in ms
30
+ */
31
+ export declare function debounce<T extends BasicFunction = BasicFunction>(toDebounceFunc: T, delayMs: number): DebounceResult<T>;
30
32
  export {};
@@ -3,7 +3,7 @@ function throttle(toThrottleFunc, delayMs) {
3
3
  let currentDelayMs = delayMs;
4
4
  let lastArgs = [];
5
5
  let lastExecutedOn = 0;
6
- let lastReturnValue = void 0;
6
+ let lastReturnValue;
7
7
  let nextExecutionTimeout = null;
8
8
  function scheduleNextCall() {
9
9
  if (nextExecutionTimeout !== null) {
@@ -56,7 +56,7 @@ function debounce(toDebounceFunc, delayMs) {
56
56
  let lastArgs = [];
57
57
  let lastCalledOn = 0;
58
58
  let lastExecutedOn = 0;
59
- let lastReturnValue = void 0;
59
+ let lastReturnValue;
60
60
  let nextExecutionTimeout = null;
61
61
  function scheduleNextCall() {
62
62
  if (nextExecutionTimeout !== null) {
@@ -1,2 +1,2 @@
1
- import { setTimeout } from 'node:timers';
1
+ import { type setTimeout } from 'node:timers';
2
2
  export type NodeTimeout = ReturnType<typeof setTimeout>;
@@ -1,3 +1,3 @@
1
1
  export * as hexChar from './hex-char/index.js'
2
- export * as uuid from './uuid/index.js'
3
2
  export * as random from './random/index.js'
3
+ export * as uuid from './uuid/index.js'
@@ -1,3 +1,3 @@
1
1
  export * as hexChar from './hex-char/index.js'
2
- export * as uuid from './uuid/index.js'
3
2
  export * as random from './random/index.js'
3
+ export * as uuid from './uuid/index.js'