@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
@@ -1,6 +1,6 @@
1
1
  export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
3
  export * as isArrayOf from './is-array-of/index.js'
4
- export * as randomPick from './random-pick/index.js'
5
- export * as shuffle from './shuffle/index.js'
6
4
  export * as make from './make/index.js'
5
+ export * as shuffle from './shuffle/index.js'
6
+ export * as randomPick from './random-pick/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as dedupe from './dedupe/index.js'
2
2
  export * as findDuplicates from './find-duplicates/index.js'
3
3
  export * as isArrayOf from './is-array-of/index.js'
4
- export * as randomPick from './random-pick/index.js'
5
- export * as shuffle from './shuffle/index.js'
6
4
  export * as make from './make/index.js'
5
+ export * as shuffle from './shuffle/index.js'
6
+ export * as randomPick from './random-pick/index.js'
@@ -12,5 +12,5 @@ type TypeOfChecker<C> = C extends ConstructorFunction<infer U> ? U : C extends T
12
12
  * Supports constructor functions (e.g., `Number`, `String`, `Boolean`, custom classes)
13
13
  * and custom type guard functions.
14
14
  */
15
- export declare function isArrayOf<C extends TypeChecker<any> | TypeChecker<any>[]>(input: unknown, _types?: C): input is Array<TypeOfChecker<C extends any[] ? C[number] : C>>;
15
+ export declare function isArrayOf<C extends TypeChecker<any> | Array<TypeChecker<any>>>(input: unknown, _types?: C): input is Array<TypeOfChecker<C extends any[] ? C[number] : C>>;
16
16
  export {};
@@ -4,7 +4,7 @@ import {
4
4
  } from "../../misc/is-constructor-function/index.js";
5
5
  function isArrayOf(input, _types) {
6
6
  if (!Array.isArray(input)) return false;
7
- if (!_types) return true;
7
+ if (_types === void 0) return true;
8
8
  const types = Array.isArray(_types) ? _types : [_types];
9
9
  const primitiveTypeMap = /* @__PURE__ */ new Map([
10
10
  [Number, "number"],
@@ -15,7 +15,7 @@ function isArrayOf(input, _types) {
15
15
  (entry) => types.some((typeChecker) => {
16
16
  if (!isConstructorFunction(typeChecker)) return typeChecker(entry);
17
17
  const primitiveType = primitiveTypeMap.get(typeChecker);
18
- if (primitiveType) return typeof entry === primitiveType;
18
+ if (primitiveType !== void 0) return typeof entry === primitiveType;
19
19
  return entry instanceof typeChecker;
20
20
  })
21
21
  );
@@ -1,4 +1,4 @@
1
- import { Nullish } from '../../misc/is-nullish/index.js';
1
+ import { type Nullish } from '../../misc/is-nullish/index.js';
2
2
  /** Union type representing all falsy values in JavaScript. */
3
3
  export type Falsy = Nullish | false | '' | 0 | -0 | typeof NaN | 0n;
4
4
  /** Type that excludes falsy values from T (except numbers, which may be 0). */
@@ -1,4 +1,4 @@
1
- import { Color, TransformedColor, Channel } from '../types.js';
1
+ import { type Color, type TransformedColor, type Channel } from '../types.js';
2
2
  /**
3
3
  * Sets a specific color channel to an absolute value.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Color, ContrastMethod } from '../types.js';
1
+ import type { Color, ContrastMethod } from '../types.js';
2
2
  /**
3
3
  * Calculates the contrast ratio between two colors using the specified method.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Color, Hex, Rgba, Hsla, Hsba, Laba, Lcha, Cmyka, Xyza, CssColor, TransformedColor, Srgba } from '../types.js';
1
+ import type { Color, Hex, Rgba, Hsla, Hsba, Laba, Lcha, Cmyka, Xyza, CssColor, TransformedColor, Srgba } from '../types.js';
2
2
  /**
3
3
  * Converts any supported color format to RGBA.
4
4
  *
@@ -1,9 +1,7 @@
1
1
  // src/agnostic/colors/convert/index.ts
2
2
  import { absoluteModulo } from "../../numbers/absolute-modulo/index.js";
3
3
  import { tidy } from "../tidy/index.js";
4
- import {
5
- cssColors
6
- } from "../types.js";
4
+ import { cssColors } from "../cssColorsMap.js";
7
5
  import {
8
6
  isHex,
9
7
  isRgb,
@@ -15,8 +13,9 @@ import {
15
13
  isLab,
16
14
  isLch
17
15
  } from "../typechecks/index.js";
16
+ import { unknownToString } from "../../errors/unknown-to-string/index.js";
18
17
  function _hex2rgb(hex) {
19
- if (!isHex(hex)) throw new Error(`invalid hex color ${hex}`);
18
+ if (!isHex(hex)) throw new Error(`invalid hex color ${unknownToString(hex)}`);
20
19
  let hexString = hex;
21
20
  const inputHex = hexString;
22
21
  const startsWithHash = hexString.startsWith("#");
@@ -28,9 +27,7 @@ function _hex2rgb(hex) {
28
27
  hexString = hexString.split("").map((c) => c + c).join("");
29
28
  } else if (hexString.length === 6) {
30
29
  hexString = hexString + "ff";
31
- } else if (hexString.length === 8) {
32
- hexString = hexString;
33
- } else throw new Error(`invalid hex color ${inputHex}`);
30
+ } else if (hexString.length !== 8) throw new Error(`invalid hex color ${inputHex}`);
34
31
  const r = parseInt(hexString.slice(0, 2), 16);
35
32
  const g = parseInt(hexString.slice(2, 4), 16);
36
33
  const b = parseInt(hexString.slice(4, 6), 16);
@@ -45,7 +42,7 @@ function _rgb2hex(rgb) {
45
42
  const aHex = Math.round(a * 255).toString(16).padStart(2, "0");
46
43
  const returned = `#${rHex}${gHex}${bHex}${aHex}`;
47
44
  if (!isHex(returned)) {
48
- throw new Error(`invalid hex color output ${returned}`);
45
+ throw new Error(`invalid hex color output ${unknownToString(returned)}`);
49
46
  }
50
47
  return returned;
51
48
  }
@@ -364,7 +361,7 @@ function toRgb(color) {
364
361
  if (isXyz(color)) return _xyz2rgb(color);
365
362
  if (isLab(color)) return _xyz2rgb(_lab2xyz(color));
366
363
  if (isLch(color)) return _xyz2rgb(_lab2xyz(_lch2lab(color)));
367
- throw new Error(`Invalid color input: ${color}`);
364
+ throw new Error(`Invalid color input: ${unknownToString(color)}`);
368
365
  }
369
366
  function toXyz(color) {
370
367
  if (isXyz(color)) return color;
@@ -376,7 +373,7 @@ function toXyz(color) {
376
373
  if (isCmyk(color)) return _rgb2xyz(_cmyk2rgb(color));
377
374
  if (isCssColor(color)) return _rgb2xyz(_css2rgb(color));
378
375
  if (isHex(color)) return _rgb2xyz(_hex2rgb(color));
379
- throw new Error(`Invalid color input: ${color}`);
376
+ throw new Error(`Invalid color input: ${unknownToString(color)}`);
380
377
  }
381
378
  function toLab(color) {
382
379
  if (isLab(color)) return color;
@@ -428,7 +425,7 @@ function viaRgb(color, transformer) {
428
425
  if (isHex(_color)) return toRgb(transformedRgb);
429
426
  if (isCssColor(_color)) return transformedRgb;
430
427
  const _typecheck = true;
431
- throw new Error(`Invalid color input: ${_color}`);
428
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
432
429
  }
433
430
  function viaHsl(color, transformer) {
434
431
  const _color = color;
@@ -444,7 +441,7 @@ function viaHsl(color, transformer) {
444
441
  if (isHex(_color)) return toHex(transformedHsl);
445
442
  if (isCssColor(_color)) return transformedHsl;
446
443
  const _typecheck = true;
447
- throw new Error(`Invalid color input: ${_color}`);
444
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
448
445
  }
449
446
  function viaHsb(color, transformer) {
450
447
  const _color = color;
@@ -460,7 +457,7 @@ function viaHsb(color, transformer) {
460
457
  if (isHex(_color)) return toHex(transformedHsb);
461
458
  if (isCssColor(_color)) return transformedHsb;
462
459
  const _typecheck = true;
463
- throw new Error(`Invalid color input: ${_color}`);
460
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
464
461
  }
465
462
  function viaCmyk(color, transformer) {
466
463
  const _color = color;
@@ -476,7 +473,7 @@ function viaCmyk(color, transformer) {
476
473
  if (isHex(_color)) return toHex(transformedCmyk);
477
474
  if (isCssColor(_color)) return transformedCmyk;
478
475
  const _typecheck = true;
479
- throw new Error(`Invalid color input: ${_color}`);
476
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
480
477
  }
481
478
  function viaXyz(color, transformer) {
482
479
  const _color = color;
@@ -492,7 +489,7 @@ function viaXyz(color, transformer) {
492
489
  if (isHex(_color)) return toHex(transformedXyz);
493
490
  if (isCssColor(_color)) return transformedXyz;
494
491
  const _typecheck = true;
495
- throw new Error(`Invalid color input: ${_color}`);
492
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
496
493
  }
497
494
  function viaLab(color, transformer) {
498
495
  const _color = color;
@@ -508,7 +505,7 @@ function viaLab(color, transformer) {
508
505
  if (isHex(_color)) return toHex(transformedLab);
509
506
  if (isCssColor(_color)) return transformedLab;
510
507
  const _typecheck = true;
511
- throw new Error(`Invalid color input: ${_color}`);
508
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
512
509
  }
513
510
  function viaLch(color, transformer) {
514
511
  const _color = color;
@@ -524,7 +521,7 @@ function viaLch(color, transformer) {
524
521
  if (isHex(_color)) return toHex(transformedLch);
525
522
  if (isCssColor(_color)) return transformedLch;
526
523
  const _typecheck = true;
527
- throw new Error(`Invalid color input: ${_color}`);
524
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
528
525
  }
529
526
  function linearizeToSRgb(rgb) {
530
527
  const cleanRgb = tidy(rgb);
@@ -0,0 +1,9 @@
1
+ import type { CssColor, Rgba } from './types.js';
2
+ type CssColorMap = {
3
+ [K in CssColor]: Rgba;
4
+ };
5
+ /**
6
+ * Map of CSS named colors to their corresponding RGBA values.
7
+ */
8
+ export declare const cssColors: CssColorMap;
9
+ export {};
@@ -1,4 +1,4 @@
1
- import { Color, DistanceMethod } from '../types.js';
1
+ import { type Color, type DistanceMethod } from '../types.js';
2
2
  /**
3
3
  * Calculates the perceptual distance between two colors using the specified method.
4
4
  *
@@ -1,12 +1,12 @@
1
1
  export * as channels from './channels/index.js'
2
- export * as contrast from './contrast/index.js'
2
+ export * as grayscale from './grayscale/index.js'
3
3
  export * as convert from './convert/index.js'
4
4
  export * as distance from './distance/index.js'
5
5
  export * as invert from './invert/index.js'
6
- export * as grayscale from './grayscale/index.js'
7
6
  export * as lerp from './lerp/index.js'
8
7
  export * as luminance from './luminance/index.js'
9
8
  export * as palette from './palette/index.js'
9
+ export * as rotate from './rotate/index.js'
10
10
  export * as tidy from './tidy/index.js'
11
11
  export * as typechecks from './typechecks/index.js'
12
- export * as rotate from './rotate/index.js'
12
+ export * as contrast from './contrast/index.js'
@@ -1,12 +1,12 @@
1
1
  export * as channels from './channels/index.js'
2
- export * as contrast from './contrast/index.js'
2
+ export * as grayscale from './grayscale/index.js'
3
3
  export * as convert from './convert/index.js'
4
4
  export * as distance from './distance/index.js'
5
5
  export * as invert from './invert/index.js'
6
- export * as grayscale from './grayscale/index.js'
7
6
  export * as lerp from './lerp/index.js'
8
7
  export * as luminance from './luminance/index.js'
9
8
  export * as palette from './palette/index.js'
9
+ export * as rotate from './rotate/index.js'
10
10
  export * as tidy from './tidy/index.js'
11
11
  export * as typechecks from './typechecks/index.js'
12
- export * as rotate from './rotate/index.js'
12
+ export * as contrast from './contrast/index.js'
@@ -1,4 +1,4 @@
1
- import { Color, TransformedColor, InvertMethod } from '../types.js';
1
+ import { type Color, type TransformedColor, type InvertMethod } from '../types.js';
2
2
  /**
3
3
  * Inverts a color using the specified method.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { Color, LuminanceMethod } from '../types.js';
1
+ import { type Color, type LuminanceMethod } from '../types.js';
2
2
  /**
3
3
  * Calculates the relative luminance of a color using the specified method.
4
4
  *
@@ -92,6 +92,8 @@ function palette(color, type) {
92
92
  return tetradicLab(color);
93
93
  case "tetradic-lch":
94
94
  return tetradicLch(color);
95
+ default:
96
+ throw new Error(`Invalid palette type: ${type}`);
95
97
  }
96
98
  }
97
99
  export {
@@ -3,6 +3,7 @@ import { isRgb, isHsl, isHsb, isCmyk, isXyz, isLab, isLch, isCssColor, isHex } f
3
3
  import { clamp } from "../../numbers/clamp/index.js";
4
4
  import { absoluteModulo } from "../../numbers/absolute-modulo/index.js";
5
5
  import { toRgb, toHex } from "../convert/index.js";
6
+ import { unknownToString } from "../../errors/unknown-to-string/index.js";
6
7
  function tidy(color) {
7
8
  const _color = color;
8
9
  if (isRgb(_color)) return {
@@ -51,7 +52,7 @@ function tidy(color) {
51
52
  if (isCssColor(_color)) return tidy(toRgb(_color));
52
53
  if (isHex(_color)) return toHex(tidy(toRgb(_color)));
53
54
  const _typecheck = true;
54
- throw new Error(`Invalid color input: ${_color}`);
55
+ throw new Error(`Invalid color input: ${unknownToString(_color)}`);
55
56
  }
56
57
  export {
57
58
  tidy
@@ -1,4 +1,4 @@
1
- import { Hex, Rgba, Hsla, Hsba, Laba, Lcha, Cmyka, Xyza, CssColor, Color } from '../types.js';
1
+ import { type Hex, type Rgba, type Hsla, type Hsba, type Laba, type Lcha, type Cmyka, type Xyza, type CssColor, type Color } from '../types.js';
2
2
  /**
3
3
  * Type guard to check if a value is a valid hexadecimal color string.
4
4
  *
@@ -1,8 +1,6 @@
1
1
  // src/agnostic/colors/typechecks/index.ts
2
2
  import { isNonNullObject } from "../../objects/is-object/index.js";
3
- import {
4
- cssColors
5
- } from "../types.js";
3
+ import { cssColors } from "../cssColorsMap.js";
6
4
  var isHex = (color) => {
7
5
  if (typeof color !== "string") return false;
8
6
  if (!color.startsWith("#")) return false;
@@ -99,13 +99,6 @@ export type Xyza = {
99
99
  * Union type of all valid CSS named colors.
100
100
  */
101
101
  export type CssColor = 'aliceblue' | 'antiquewhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedalmond' | 'blue' | 'blueviolet' | 'brown' | 'burlywood' | 'cadetblue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerblue' | 'cornsilk' | 'crimson' | 'cyan' | 'darkblue' | 'darkcyan' | 'darkgoldenrod' | 'darkgray' | 'darkgreen' | 'darkgrey' | 'darkkhaki' | 'darkmagenta' | 'darkolivegreen' | 'darkorange' | 'darkorchid' | 'darkred' | 'darksalmon' | 'darkseagreen' | 'darkslateblue' | 'darkslategray' | 'darkslategrey' | 'darkturquoise' | 'darkviolet' | 'deeppink' | 'deepskyblue' | 'dimgray' | 'dimgrey' | 'dodgerblue' | 'firebrick' | 'floralwhite' | 'forestgreen' | 'fuchsia' | 'gainsboro' | 'ghostwhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenyellow' | 'grey' | 'honeydew' | 'hotpink' | 'indianred' | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderblush' | 'lawngreen' | 'lemonchiffon' | 'lightblue' | 'lightcoral' | 'lightcyan' | 'lightgoldenrodyellow' | 'lightgray' | 'lightgreen' | 'lightgrey' | 'lightpink' | 'lightsalmon' | 'lightseagreen' | 'lightskyblue' | 'lightslategray' | 'lightslategrey' | 'lightsteelblue' | 'lightyellow' | 'lime' | 'limegreen' | 'linen' | 'magenta' | 'maroon' | 'mediumaquamarine' | 'mediumblue' | 'mediumorchid' | 'mediumpurple' | 'mediumseagreen' | 'mediumslateblue' | 'mediumspringgreen' | 'mediumturquoise' | 'mediumvioletred' | 'midnightblue' | 'mintcream' | 'mistyrose' | 'moccasin' | 'navajowhite' | 'navy' | 'oldlace' | 'olive' | 'olivedrab' | 'orange' | 'orangered' | 'orchid' | 'palegoldenrod' | 'palegreen' | 'paleturquoise' | 'palevioletred' | 'papayawhip' | 'peachpuff' | 'peru' | 'pink' | 'plum' | 'powderblue' | 'purple' | 'rebeccapurple' | 'red' | 'rosybrown' | 'royalblue' | 'saddlebrown' | 'salmon' | 'sandybrown' | 'seagreen' | 'seashell' | 'sienna' | 'silver' | 'skyblue' | 'slateblue' | 'slategray' | 'slategrey' | 'snow' | 'springgreen' | 'steelblue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whitesmoke' | 'yellow' | 'yellowgreen';
102
- type CssColorMap = {
103
- [K in CssColor]: Rgba;
104
- };
105
- /**
106
- * Map of CSS named colors to their corresponding RGBA values.
107
- */
108
- export declare const cssColors: CssColorMap;
109
102
  /**
110
103
  * Union type representing any supported color format.
111
104
  */
@@ -1,154 +0,0 @@
1
- // src/agnostic/colors/types.ts
2
- var cssColors = {
3
- aliceblue: { r: 240, g: 248, b: 255 },
4
- antiquewhite: { r: 250, g: 235, b: 215 },
5
- aqua: { r: 0, g: 255, b: 255 },
6
- aquamarine: { r: 127, g: 255, b: 212 },
7
- azure: { r: 240, g: 255, b: 255 },
8
- beige: { r: 245, g: 245, b: 220 },
9
- bisque: { r: 255, g: 228, b: 196 },
10
- black: { r: 0, g: 0, b: 0 },
11
- blanchedalmond: { r: 255, g: 235, b: 205 },
12
- blue: { r: 0, g: 0, b: 255 },
13
- blueviolet: { r: 138, g: 43, b: 226 },
14
- brown: { r: 165, g: 42, b: 42 },
15
- burlywood: { r: 222, g: 184, b: 135 },
16
- cadetblue: { r: 95, g: 158, b: 160 },
17
- chartreuse: { r: 127, g: 255, b: 0 },
18
- chocolate: { r: 210, g: 105, b: 30 },
19
- coral: { r: 255, g: 127, b: 80 },
20
- cornflowerblue: { r: 100, g: 149, b: 237 },
21
- cornsilk: { r: 255, g: 248, b: 220 },
22
- crimson: { r: 220, g: 20, b: 60 },
23
- cyan: { r: 0, g: 255, b: 255 },
24
- darkblue: { r: 0, g: 0, b: 139 },
25
- darkcyan: { r: 0, g: 139, b: 139 },
26
- darkgoldenrod: { r: 184, g: 134, b: 11 },
27
- darkgray: { r: 169, g: 169, b: 169 },
28
- darkgreen: { r: 0, g: 100, b: 0 },
29
- darkgrey: { r: 169, g: 169, b: 169 },
30
- darkkhaki: { r: 189, g: 183, b: 107 },
31
- darkmagenta: { r: 139, g: 0, b: 139 },
32
- darkolivegreen: { r: 85, g: 107, b: 47 },
33
- darkorange: { r: 255, g: 140, b: 0 },
34
- darkorchid: { r: 153, g: 50, b: 204 },
35
- darkred: { r: 139, g: 0, b: 0 },
36
- darksalmon: { r: 233, g: 150, b: 122 },
37
- darkseagreen: { r: 143, g: 188, b: 143 },
38
- darkslateblue: { r: 72, g: 61, b: 139 },
39
- darkslategray: { r: 47, g: 79, b: 79 },
40
- darkslategrey: { r: 47, g: 79, b: 79 },
41
- darkturquoise: { r: 0, g: 206, b: 209 },
42
- darkviolet: { r: 148, g: 0, b: 211 },
43
- deeppink: { r: 255, g: 20, b: 147 },
44
- deepskyblue: { r: 0, g: 191, b: 255 },
45
- dimgray: { r: 105, g: 105, b: 105 },
46
- dimgrey: { r: 105, g: 105, b: 105 },
47
- dodgerblue: { r: 30, g: 144, b: 255 },
48
- firebrick: { r: 178, g: 34, b: 34 },
49
- floralwhite: { r: 255, g: 250, b: 240 },
50
- forestgreen: { r: 34, g: 139, b: 34 },
51
- fuchsia: { r: 255, g: 0, b: 255 },
52
- gainsboro: { r: 220, g: 220, b: 220 },
53
- ghostwhite: { r: 248, g: 248, b: 255 },
54
- gold: { r: 255, g: 215, b: 0 },
55
- goldenrod: { r: 218, g: 165, b: 32 },
56
- gray: { r: 128, g: 128, b: 128 },
57
- green: { r: 0, g: 128, b: 0 },
58
- greenyellow: { r: 173, g: 255, b: 47 },
59
- grey: { r: 128, g: 128, b: 128 },
60
- honeydew: { r: 240, g: 255, b: 240 },
61
- hotpink: { r: 255, g: 105, b: 180 },
62
- indianred: { r: 205, g: 92, b: 92 },
63
- indigo: { r: 75, g: 0, b: 130 },
64
- ivory: { r: 255, g: 255, b: 240 },
65
- khaki: { r: 240, g: 230, b: 140 },
66
- lavender: { r: 230, g: 230, b: 250 },
67
- lavenderblush: { r: 255, g: 240, b: 245 },
68
- lawngreen: { r: 124, g: 252, b: 0 },
69
- lemonchiffon: { r: 255, g: 250, b: 205 },
70
- lightblue: { r: 173, g: 216, b: 230 },
71
- lightcoral: { r: 240, g: 128, b: 128 },
72
- lightcyan: { r: 224, g: 255, b: 255 },
73
- lightgoldenrodyellow: { r: 250, g: 250, b: 210 },
74
- lightgray: { r: 211, g: 211, b: 211 },
75
- lightgreen: { r: 144, g: 238, b: 144 },
76
- lightgrey: { r: 211, g: 211, b: 211 },
77
- lightpink: { r: 255, g: 182, b: 193 },
78
- lightsalmon: { r: 255, g: 160, b: 122 },
79
- lightseagreen: { r: 32, g: 178, b: 170 },
80
- lightskyblue: { r: 135, g: 206, b: 250 },
81
- lightslategray: { r: 119, g: 136, b: 153 },
82
- lightslategrey: { r: 119, g: 136, b: 153 },
83
- lightsteelblue: { r: 176, g: 196, b: 222 },
84
- lightyellow: { r: 255, g: 255, b: 224 },
85
- lime: { r: 0, g: 255, b: 0 },
86
- limegreen: { r: 50, g: 205, b: 50 },
87
- linen: { r: 250, g: 240, b: 230 },
88
- magenta: { r: 255, g: 0, b: 255 },
89
- maroon: { r: 128, g: 0, b: 0 },
90
- mediumaquamarine: { r: 102, g: 205, b: 170 },
91
- mediumblue: { r: 0, g: 0, b: 205 },
92
- mediumorchid: { r: 186, g: 85, b: 211 },
93
- mediumpurple: { r: 147, g: 112, b: 219 },
94
- mediumseagreen: { r: 60, g: 179, b: 113 },
95
- mediumslateblue: { r: 123, g: 104, b: 238 },
96
- mediumspringgreen: { r: 0, g: 250, b: 154 },
97
- mediumturquoise: { r: 72, g: 209, b: 204 },
98
- mediumvioletred: { r: 199, g: 21, b: 133 },
99
- midnightblue: { r: 25, g: 25, b: 112 },
100
- mintcream: { r: 245, g: 255, b: 250 },
101
- mistyrose: { r: 255, g: 228, b: 225 },
102
- moccasin: { r: 255, g: 228, b: 181 },
103
- navajowhite: { r: 255, g: 222, b: 173 },
104
- navy: { r: 0, g: 0, b: 128 },
105
- oldlace: { r: 253, g: 245, b: 230 },
106
- olive: { r: 128, g: 128, b: 0 },
107
- olivedrab: { r: 107, g: 142, b: 35 },
108
- orange: { r: 255, g: 165, b: 0 },
109
- orangered: { r: 255, g: 69, b: 0 },
110
- orchid: { r: 218, g: 112, b: 214 },
111
- palegoldenrod: { r: 238, g: 232, b: 170 },
112
- palegreen: { r: 152, g: 251, b: 152 },
113
- paleturquoise: { r: 175, g: 238, b: 238 },
114
- palevioletred: { r: 219, g: 112, b: 147 },
115
- papayawhip: { r: 255, g: 239, b: 213 },
116
- peachpuff: { r: 255, g: 218, b: 185 },
117
- peru: { r: 205, g: 133, b: 63 },
118
- pink: { r: 255, g: 192, b: 203 },
119
- plum: { r: 221, g: 160, b: 221 },
120
- powderblue: { r: 176, g: 224, b: 230 },
121
- purple: { r: 128, g: 0, b: 128 },
122
- rebeccapurple: { r: 102, g: 51, b: 153 },
123
- red: { r: 255, g: 0, b: 0 },
124
- rosybrown: { r: 188, g: 143, b: 143 },
125
- royalblue: { r: 65, g: 105, b: 225 },
126
- saddlebrown: { r: 139, g: 69, b: 19 },
127
- salmon: { r: 250, g: 128, b: 114 },
128
- sandybrown: { r: 244, g: 164, b: 96 },
129
- seagreen: { r: 46, g: 139, b: 87 },
130
- seashell: { r: 255, g: 245, b: 238 },
131
- sienna: { r: 160, g: 82, b: 45 },
132
- silver: { r: 192, g: 192, b: 192 },
133
- skyblue: { r: 135, g: 206, b: 235 },
134
- slateblue: { r: 106, g: 90, b: 205 },
135
- slategray: { r: 112, g: 128, b: 144 },
136
- slategrey: { r: 112, g: 128, b: 144 },
137
- snow: { r: 255, g: 250, b: 250 },
138
- springgreen: { r: 0, g: 255, b: 127 },
139
- steelblue: { r: 70, g: 130, b: 180 },
140
- tan: { r: 210, g: 180, b: 140 },
141
- teal: { r: 0, g: 128, b: 128 },
142
- thistle: { r: 216, g: 191, b: 216 },
143
- tomato: { r: 255, g: 99, b: 71 },
144
- turquoise: { r: 64, g: 224, b: 208 },
145
- violet: { r: 238, g: 130, b: 238 },
146
- wheat: { r: 245, g: 222, b: 179 },
147
- white: { r: 255, g: 255, b: 255 },
148
- whitesmoke: { r: 245, g: 245, b: 245 },
149
- yellow: { r: 255, g: 255, b: 0 },
150
- yellowgreen: { r: 154, g: 205, b: 50 }
151
- };
152
- export {
153
- cssColors
154
- };
@@ -5,9 +5,9 @@ export interface Block {
5
5
  }
6
6
  export declare class BEM {
7
7
  constructor();
8
- addBlock(blockNameArg: any): BEM;
9
- addElement(elementNameArg: any): BEM;
10
- addModifier(modifierNameArg: any): BEM;
8
+ addBlock(blockNameArg: any): this;
9
+ addElement(elementNameArg: any): this;
10
+ addModifier(modifierNameArg: any): this;
11
11
  copy(): BEM;
12
12
  block(blockNameArg: any): BEM;
13
13
  element(elementNameArg: any): BEM;
@@ -1,4 +1,5 @@
1
1
  // src/agnostic/css/bem/index.ts
2
+ import { isNonNullObject } from "agnostic/objects/is-object/index.js";
2
3
  import { isFalsy } from "../../booleans/is-falsy/index.js";
3
4
  import { isValidClassName } from "../is-valid-css-class-name/index.js";
4
5
  function getNamesArr(arg) {
@@ -9,7 +10,7 @@ function getNamesArr(arg) {
9
10
  });
10
11
  } else if (Array.isArray(arg)) {
11
12
  arg.forEach((elt) => returned.push(...getNamesArr(elt)));
12
- } else if (typeof arg === "object" && arg !== null) {
13
+ } else if (isNonNullObject(arg)) {
13
14
  Object.entries(arg).forEach(([key, val]) => {
14
15
  if (!isFalsy(val)) returned.push(...getNamesArr(key));
15
16
  });
@@ -39,26 +40,26 @@ var BEM = class _BEM {
39
40
  }
40
41
  addBlock(blockNameArg) {
41
42
  const blocksNames = getNamesArr(blockNameArg);
42
- blocksNames.forEach(this.addSingleBlock);
43
+ blocksNames.forEach(this.addSingleBlock.bind(this));
43
44
  return this;
44
45
  }
45
46
  addElement(elementNameArg) {
46
47
  const elementsNames = getNamesArr(elementNameArg);
47
- elementsNames.forEach(this.addSingleElement);
48
+ elementsNames.forEach(this.addSingleElement.bind(this));
48
49
  return this;
49
50
  }
50
51
  addModifier(modifierNameArg) {
51
52
  const currentBlock = this.getCurrentBlock();
52
53
  if (currentBlock === void 0) return this;
53
54
  const modifiersNames = getNamesArr(modifierNameArg);
54
- modifiersNames.forEach(this.addSingleModifier);
55
+ modifiersNames.forEach(this.addSingleModifier.bind(this));
55
56
  return this;
56
57
  }
57
58
  copy() {
58
59
  const copy = new _BEM();
59
60
  this.blocks.forEach((block) => {
60
61
  copy.addBlock(block.name);
61
- block.modifiers.forEach(copy.addModifier);
62
+ block.modifiers.forEach(copy.addModifier.bind(copy));
62
63
  });
63
64
  return copy;
64
65
  }
@@ -1,8 +1,61 @@
1
+ /**
2
+ * Object representing a CSS module mapping class names to hashed class strings.
3
+ */
1
4
  export type CssModuleObj = Readonly<Record<string, string>>;
5
+ /**
6
+ * Descriptor for modifiers.
7
+ * Can be:
8
+ * - a single string,
9
+ * - an array of strings,
10
+ * - an object mapping modifier names to boolean (only `true` modifiers are used).
11
+ */
2
12
  export type ModsDescriptor = string | string[] | Record<string, boolean | null | undefined>;
13
+ /**
14
+ * Descriptor for element names.
15
+ * Can be:
16
+ * - a single string,
17
+ * - `null`,
18
+ * - an array of strings or `null`.
19
+ */
3
20
  export type EltNamesDescriptor = string | null | Array<string | null>;
21
+ /**
22
+ * Options used to configure the `clss` function.
23
+ */
4
24
  export type Options = {
25
+ /** CSS module object containing class name mappings */
5
26
  cssModule: CssModuleObj;
27
+ /** Optional key for the root block in the CSS module */
6
28
  cssModuleRoot?: string;
7
29
  };
8
- export declare function clss(blockNames: string | string[], options?: Options): (eltNames: EltNamesDescriptor, modNames?: ModsDescriptor) => string;
30
+ /**
31
+ * Function to compute class names for elements and modifiers.
32
+ *
33
+ * @param eltNames - Element names or `null`. Can be a string, `null`, or array of strings/null.
34
+ * @param modNames - Modifier names. Can be a string, array of strings, or an object mapping modifiers to boolean.
35
+ * @returns A string containing all resolved public and private CSS classes.
36
+ *
37
+ * @example
38
+ * const classes = btnClss('icon', { active: true, disabled: false })
39
+ * // Returns: "button__icon button__icon--active _hash123 _hash456"
40
+ */
41
+ export type ClssMaker = (eltNames?: EltNamesDescriptor, modNames?: ModsDescriptor) => string;
42
+ /**
43
+ * Generates a `ClssMaker` function for a block or blocks.
44
+ *
45
+ * @param blockNames - A single block name or an array of block names.
46
+ * @param options - Optional configuration:
47
+ * - `cssModule`: Object mapping class names to their hashed equivalents (required if using CSS modules).
48
+ * - `cssModuleRoot`: Optional key for the root block in the CSS module (defaults to `'root'` if not provided).
49
+ * @returns {ClssMaker}
50
+ * A function to generate class names for elements and modifiers.
51
+ *
52
+ * The returned function (`ClssMaker`) parameters:
53
+ * - `eltNames`: Element names or `null`. Can be a string, `null`, or array of strings/null.
54
+ * - `modNames`: Modifier names. Can be a string, array of strings, or object mapping modifiers to boolean (`true` modifiers are included).
55
+ * - Returns a string containing all resolved public and private CSS classes, including element-specific and modifier-specific classes.
56
+ *
57
+ * @example
58
+ * const btnClss = clss('button', { cssModule: styles, cssModuleRoot: 'root' })
59
+ * const classes = btnClss('icon', { active: true, disabled: false })
60
+ */
61
+ export declare function clss(blockNames: string | string[], options?: Options): ClssMaker;
@@ -1,7 +1,7 @@
1
1
  // src/agnostic/css/clss/index.ts
2
2
  function clss(blockNames, options) {
3
- blockNames = Array.isArray(blockNames) ? blockNames : [blockNames];
4
- return (eltNames, modNames = []) => {
3
+ const blockNamesArr = Array.isArray(blockNames) ? blockNames : [blockNames];
4
+ return (eltNames = null, modNames = []) => {
5
5
  const eltNamesArr = Array.isArray(eltNames) ? eltNames : [eltNames];
6
6
  const modNamesArr = (Array.isArray(modNames) ? modNames : [modNames]).map((modName) => {
7
7
  if (typeof modName === "string") return modName;
@@ -9,7 +9,7 @@ function clss(blockNames, options) {
9
9
  return trueModNames;
10
10
  }).flat();
11
11
  const outputClassesArr = [];
12
- blockNames.forEach((compName) => {
12
+ blockNamesArr.forEach((compName) => {
13
13
  eltNamesArr.forEach((eltName) => {
14
14
  const targetPublicClss = eltName === null ? compName : `${compName}__${eltName}`;
15
15
  const targetPrivateClss = eltName === null ? options?.cssModule[options.cssModuleRoot ?? "root"] : options?.cssModule[eltName];
@@ -64,6 +64,7 @@ var niceColors = [
64
64
  var generateNiceColor = () => {
65
65
  const pos = Math.floor(Math.random() * niceColors.length);
66
66
  const found = niceColors[pos];
67
+ if (found === void 0) throw new Error("Could not generate color (should never happen)");
67
68
  return found;
68
69
  };
69
70
  export {
@@ -1,6 +1,6 @@
1
1
  export * as clss from './clss/index.js'
2
2
  export * as generateNiceColor from './generate-nice-color/index.js'
3
3
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
- export * as scale from './scale/index.js'
5
4
  export * as bem from './bem/index.js'
5
+ export * as scale from './scale/index.js'
6
6
  export * as stylesSet from './styles-set/index.js'
@@ -1,6 +1,6 @@
1
1
  export * as clss from './clss/index.js'
2
2
  export * as generateNiceColor from './generate-nice-color/index.js'
3
3
  export * as isValidCssClassName from './is-valid-css-class-name/index.js'
4
- export * as scale from './scale/index.js'
5
4
  export * as bem from './bem/index.js'
5
+ export * as scale from './scale/index.js'
6
6
  export * as stylesSet from './styles-set/index.js'