@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,7 +1,7 @@
1
1
  // src/agnostic/random/random/index.ts
2
2
  function random(bound1 = 1, bound2) {
3
3
  const min = bound2 === void 0 ? 0 : bound1;
4
- const max = bound2 === void 0 ? bound1 : bound2;
4
+ const max = bound2 ?? bound1;
5
5
  if (min === max || min > max) return void 0;
6
6
  const range = max - min;
7
7
  return Math.random() * range + min;
@@ -27,12 +27,12 @@ function sanitizeElement(element, options = defaultOptions) {
27
27
  const normalizedTagName = tagName.toLowerCase().trim();
28
28
  const tagIsInForbidden = forbiddenTags.includes("*") || forbiddenTags.includes(normalizedTagName);
29
29
  if (tagIsInForbidden) {
30
- if (verbose === true) console.warn(tagName, "tag is forbidden");
30
+ if (verbose) console.warn(tagName, "tag is forbidden");
31
31
  return null;
32
32
  }
33
33
  const tagIsInAllowed = allowedTags.includes("*") || allowedTags.includes(normalizedTagName);
34
34
  if (!tagIsInAllowed) {
35
- if (verbose === true) console.warn(tagName, "tag is not allowed");
35
+ if (verbose) console.warn(tagName, "tag is not allowed");
36
36
  return null;
37
37
  }
38
38
  const returnedElement = Window.get().document.createElement(tagName);
@@ -47,20 +47,20 @@ function sanitizeElement(element, options = defaultOptions) {
47
47
  if (typeof nameTester === "string" && nameTester !== "*" && attributeName !== nameTester) return false;
48
48
  if (typeof nameTester !== "string" && !nameTester.test(attributeName)) return false;
49
49
  if (valTesters === void 0) {
50
- if (verbose === true) console.warn(attributeName, "attribute on", tagName, "tag is forbidden");
50
+ if (verbose) console.warn(attributeName, "attribute on", tagName, "tag is forbidden");
51
51
  return true;
52
52
  }
53
53
  if (valTesters.includes("*")) {
54
- if (verbose === true) console.warn(attributeName, "attribute on", tagName, "tag is forbidden");
54
+ if (verbose) console.warn(attributeName, "attribute on", tagName, "tag is forbidden");
55
55
  return true;
56
56
  }
57
57
  return valTesters.some((valTester) => {
58
58
  if (typeof valTester === "string" && attributeValue === valTester) {
59
- if (verbose === true) console.warn(attributeValue, "value for", attributeName, "attribute on", tagName, "tag is forbidden. Rule:", valTester);
59
+ if (verbose) console.warn(attributeValue, "value for", attributeName, "attribute on", tagName, "tag is forbidden. Rule:", valTester);
60
60
  return true;
61
61
  }
62
62
  if (typeof valTester !== "string" && valTester.test(attributeValue)) {
63
- if (verbose === true) console.warn(attributeValue, "value for", attributeName, "attribute on", tagName, "tag is forbidden. Rule:", valTester);
63
+ if (verbose) console.warn(attributeValue, "value for", attributeName, "attribute on", tagName, "tag is forbidden. Rule:", valTester);
64
64
  return true;
65
65
  }
66
66
  return false;
@@ -93,7 +93,7 @@ function sanitizeElement(element, options = defaultOptions) {
93
93
  });
94
94
  });
95
95
  if (!isInAllowed) {
96
- if (verbose === true) console.warn(...latestNotAllowedReason);
96
+ if (verbose) console.warn(...latestNotAllowedReason);
97
97
  return false;
98
98
  }
99
99
  return true;
@@ -1,4 +1,4 @@
1
1
  export * as fileName from './file-name/index.js'
2
- export * as html from './html/index.js'
3
2
  export * as path from './path/index.js'
3
+ export * as html from './html/index.js'
4
4
  export * as userInput from './user-input/index.js'
@@ -1,4 +1,4 @@
1
1
  export * as fileName from './file-name/index.js'
2
- export * as html from './html/index.js'
3
2
  export * as path from './path/index.js'
3
+ export * as html from './html/index.js'
4
4
  export * as userInput from './user-input/index.js'
@@ -26,12 +26,8 @@ export type SanitizeHtmlOptions = {
26
26
  keepComments?: boolean;
27
27
  allowedTags?: string[];
28
28
  forbiddenTags?: string[];
29
- allowedAttributes?: {
30
- [tagName: string]: AttributeNameValPair[];
31
- };
32
- forbiddenAttributes?: {
33
- [tagName: string]: AttributeNameValPair[];
34
- };
29
+ allowedAttributes?: Record<string, AttributeNameValPair[]>;
30
+ forbiddenAttributes?: Record<string, AttributeNameValPair[]>;
35
31
  depth?: number;
36
32
  verbose?: boolean;
37
33
  };
@@ -43,25 +43,25 @@ export declare function charFromB36CharCode(b36CharCode: B36CharCode): string;
43
43
  * @param string - Input string.
44
44
  * @returns Array of character codes.
45
45
  */
46
- export declare function toCharCodes(string: string): Array<CharCode>;
46
+ export declare function toCharCodes(string: string): CharCode[];
47
47
  /**
48
48
  * Converts a string into an array of base-36 encoded character codes.
49
49
  * @param string - Input string.
50
50
  * @returns Array of base-36 character codes.
51
51
  */
52
- export declare function toB36CharCodes(string: string): Array<B36CharCode>;
52
+ export declare function toB36CharCodes(string: string): B36CharCode[];
53
53
  /**
54
54
  * Converts an array of Unicode character codes back to a string.
55
55
  * @param charCodes - Array of character codes.
56
56
  * @returns Reconstructed string.
57
57
  */
58
- export declare function fromCharCodes(charCodes: Array<CharCode>): string;
58
+ export declare function fromCharCodes(charCodes: CharCode[]): string;
59
59
  /**
60
60
  * Converts an array of base-36 encoded character codes back to a string.
61
61
  * @param b36CharCodes - Array of base-36 character codes.
62
62
  * @returns Reconstructed string.
63
63
  */
64
- export declare function fromB36CharCodes(b36CharCodes: Array<B36CharCode>): string;
64
+ export declare function fromB36CharCodes(b36CharCodes: B36CharCode[]): string;
65
65
  /**
66
66
  * Serializes an array of character codes (Unicode or base-36) into a string.
67
67
  * @param charCodes - Array of character codes to serialize.
@@ -73,7 +73,7 @@ export declare function serialize(charCodes: Array<CharCode | B36CharCode>): str
73
73
  * @param serializedCharCodes - Serialized string.
74
74
  * @returns Array of Unicode character codes.
75
75
  */
76
- export declare function deserialize(serializedCharCodes: string): Array<CharCode>;
76
+ export declare function deserialize(serializedCharCodes: string): CharCode[];
77
77
  /**
78
78
  * Deserializes a string of base-36 character codes and reconstructs the original string.
79
79
  * @param serializedCharCodes - Serialized string.
@@ -35,10 +35,10 @@ function toB36CharCodes(string) {
35
35
  return chars.map(charToB36CharCode);
36
36
  }
37
37
  function fromCharCodes(charCodes) {
38
- return charCodes.map(charFromCharCode).map((char) => char === null ? "\0" : char).join("");
38
+ return charCodes.map(charFromCharCode).map((char) => char ?? "\0").join("");
39
39
  }
40
40
  function fromB36CharCodes(b36CharCodes) {
41
- return b36CharCodes.map(charFromB36CharCode).map((char) => char === null ? "\0" : char).join("");
41
+ return b36CharCodes.map(charFromB36CharCode).map((char) => char ?? "\0").join("");
42
42
  }
43
43
  function serialize(charCodes) {
44
44
  return charCodes.map((c) => typeof c === "string" ? c : charCodeToB36(c)).join(",");
@@ -1,7 +1,7 @@
1
- export * as charCodes from './char-codes/index.js'
2
1
  export * as matches from './matches/index.js'
2
+ export * as normalizeIndent from './normalize-indent/index.js'
3
+ export * as charCodes from './char-codes/index.js'
4
+ export * as parseTable from './parse-table/index.js'
3
5
  export * as replaceAll from './replace-all/index.js'
4
6
  export * as toAlphanum from './to-alphanum/index.js'
5
7
  export * as trim from './trim/index.js'
6
- export * as normalizeIndent from './normalize-indent/index.js'
7
- export * as parseTable from './parse-table/index.js'
@@ -1,7 +1,7 @@
1
- export * as charCodes from './char-codes/index.js'
2
1
  export * as matches from './matches/index.js'
2
+ export * as normalizeIndent from './normalize-indent/index.js'
3
+ export * as charCodes from './char-codes/index.js'
4
+ export * as parseTable from './parse-table/index.js'
3
5
  export * as replaceAll from './replace-all/index.js'
4
6
  export * as toAlphanum from './to-alphanum/index.js'
5
7
  export * as trim from './trim/index.js'
6
- export * as normalizeIndent from './normalize-indent/index.js'
7
- export * as parseTable from './parse-table/index.js'
@@ -17,7 +17,7 @@ export declare function matches(input: string, matcher: Matcher): boolean;
17
17
  * @param matchers - A matcher or array of matchers.
18
18
  * @returns `true` if the input matches at least one matcher, otherwise `false`.
19
19
  */
20
- export declare function matchesSome(input: string, matchers: Matcher | Array<Matcher>): boolean;
20
+ export declare function matchesSome(input: string, matchers: Matcher | Matcher[]): boolean;
21
21
  /**
22
22
  * Checks whether a string matches every matcher in a list (or a single matcher).
23
23
  *
@@ -25,4 +25,4 @@ export declare function matchesSome(input: string, matchers: Matcher | Array<Mat
25
25
  * @param matchers - A matcher or array of matchers.
26
26
  * @returns `true` if the input matches all matchers, otherwise `false`.
27
27
  */
28
- export declare function matchesEvery(input: string, matchers: Matcher | Array<Matcher>): boolean;
28
+ export declare function matchesEvery(input: string, matchers: Matcher | Matcher[]): boolean;
@@ -1,8 +1,6 @@
1
1
  // src/agnostic/time/dates/format-date/index.ts
2
2
  function formatDate(date, format, locale = "en") {
3
- try {
4
- new Intl.DateTimeFormat(locale);
5
- } catch {
3
+ if (Intl.DateTimeFormat.supportedLocalesOf(locale).length === 0) {
6
4
  locale = "en";
7
5
  }
8
6
  const day = date.getDate();
@@ -13,23 +11,39 @@ function formatDate(date, format, locale = "en") {
13
11
  const minutes = date.getMinutes();
14
12
  const seconds = date.getSeconds();
15
13
  const isPM = hours >= 12;
16
- const shortDateNames = [...Array(7)].map((_, i) => new Intl.DateTimeFormat(locale, { weekday: "short" }).format(new Date(2023, 0, i + 1)));
17
- const dateNames = [...Array(7)].map((_, i) => new Intl.DateTimeFormat(locale, { weekday: "long" }).format(new Date(2023, 0, i + 1)));
18
- const shortMonthNames = [...Array(12)].map((_, i) => new Intl.DateTimeFormat(locale, { month: "short" }).format(new Date(2023, i, 1)));
19
- const monthNames = [...Array(12)].map((_, i) => new Intl.DateTimeFormat(locale, { month: "long" }).format(new Date(2023, i, 1)));
14
+ const shortDateNames = [...Array(7)].map((_, i) => new Intl.DateTimeFormat(
15
+ locale,
16
+ { weekday: "short" }
17
+ ).format(new Date(2023, 0, i + 1)));
18
+ const dateNames = [...Array(7)].map((_, i) => new Intl.DateTimeFormat(
19
+ locale,
20
+ { weekday: "long" }
21
+ ).format(new Date(2023, 0, i + 1)));
22
+ const shortMonthNames = [...Array(12)].map((_, i) => new Intl.DateTimeFormat(
23
+ locale,
24
+ { month: "short" }
25
+ ).format(new Date(2023, i, 1)));
26
+ const monthNames = [...Array(12)].map((_, i) => new Intl.DateTimeFormat(
27
+ locale,
28
+ { month: "long" }
29
+ ).format(new Date(2023, i, 1)));
20
30
  const replacements = {
21
31
  "DD": () => String(day).padStart(2, "0"),
22
32
  "D": () => String(day),
33
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
23
34
  "dd": () => dateNames[dayOfWeek],
35
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
24
36
  "d": () => shortDateNames[dayOfWeek],
25
37
  "MM": () => String(month + 1).padStart(2, "0"),
26
38
  "M": () => String(month + 1),
39
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
27
40
  "MMMM": () => monthNames[month],
41
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
28
42
  "MMM": () => shortMonthNames[month],
29
43
  "YYYY": () => String(year),
30
44
  "YY": () => String(year).slice(-2),
31
- "hh": () => String(hours % 12 || 12).padStart(2, "0"),
32
- "h": () => String(hours % 12 || 12),
45
+ "hh": () => String(hours % 12 !== 0 ? hours % 12 : 12).padStart(2, "0"),
46
+ "h": () => String(hours % 12 !== 0 ? hours % 12 : 12),
33
47
  "HH": () => String(hours).padStart(2, "0"),
34
48
  "H": () => String(hours),
35
49
  "mm": () => String(minutes).padStart(2, "0"),
@@ -19,21 +19,42 @@ export declare class Duration {
19
19
  * @param type - The unit of the duration, either long or short form.
20
20
  */
21
21
  constructor(value: number, type: DurationType | DurationTypeShort);
22
- toMilliseconds: () => number;
23
- toMs(): number;
22
+ toMilliseconds(): number;
23
+ toMs: () => number;
24
24
  toSeconds(): number;
25
+ toS: () => number;
26
+ toSec: () => number;
25
27
  toMinutes(): number;
28
+ toM: () => number;
29
+ toMin: () => number;
26
30
  toHours(): number;
31
+ toH: () => number;
27
32
  toDays(): number;
33
+ toD: () => number;
28
34
  toWeeks(): number;
35
+ toW: () => number;
29
36
  toMonths(): number;
37
+ toMth: () => number;
30
38
  toYear(): number;
39
+ toY: () => number;
40
+ toYr: () => number;
31
41
  }
32
42
  export declare function milliseconds(value: number): Duration;
43
+ export declare const ms: typeof milliseconds;
33
44
  export declare function seconds(value: number): Duration;
45
+ export declare const s: typeof seconds;
46
+ export declare const sec: typeof seconds;
34
47
  export declare function minutes(value: number): Duration;
48
+ export declare const m: typeof minutes;
49
+ export declare const min: typeof minutes;
35
50
  export declare function hours(value: number): Duration;
51
+ export declare const h: typeof hours;
36
52
  export declare function days(value: number): Duration;
53
+ export declare const d: typeof days;
37
54
  export declare function weeks(value: number): Duration;
55
+ export declare const w: typeof weeks;
38
56
  export declare function months(value: number): Duration;
57
+ export declare const mth: typeof months;
39
58
  export declare function years(value: number): Duration;
59
+ export declare const y: typeof years;
60
+ export declare const yr: typeof years;
@@ -10,7 +10,6 @@ var Duration = class {
10
10
  */
11
11
  constructor(value, type) {
12
12
  this.toMilliseconds = this.toMilliseconds.bind(this);
13
- this.toMs = this.toMs.bind(this);
14
13
  this.toSeconds = this.toSeconds.bind(this);
15
14
  this.toMinutes = this.toMinutes.bind(this);
16
15
  this.toHours = this.toHours.bind(this);
@@ -39,8 +38,8 @@ var Duration = class {
39
38
  this.type = "milliseconds";
40
39
  }
41
40
  }
42
- toMilliseconds = this.toMs;
43
- toMs() {
41
+ // [WIP] why only toMs and no other shorthands ?
42
+ toMilliseconds() {
44
43
  if (this.type === "milliseconds") return this.value;
45
44
  if (this.type === "seconds") return this.value * 1e3;
46
45
  if (this.type === "minutes") return this.value * 1e3 * 60;
@@ -51,60 +50,93 @@ var Duration = class {
51
50
  if (this.type === "years") return this.value * 1e3 * 60 * 60 * 24 * 365;
52
51
  return this.value;
53
52
  }
53
+ toMs = this.toMilliseconds.bind(this);
54
54
  toSeconds() {
55
55
  return this.toMs() / 1e3;
56
56
  }
57
+ toS = this.toSeconds.bind(this);
58
+ toSec = this.toSeconds.bind(this);
57
59
  toMinutes() {
58
60
  return this.toMs() / (1e3 * 60);
59
61
  }
62
+ toM = this.toMinutes.bind(this);
63
+ toMin = this.toMinutes.bind(this);
60
64
  toHours() {
61
65
  return this.toMs() / (1e3 * 60 * 60);
62
66
  }
67
+ toH = this.toHours.bind(this);
63
68
  toDays() {
64
69
  return this.toMs() / (1e3 * 60 * 60 * 24);
65
70
  }
71
+ toD = this.toDays.bind(this);
66
72
  toWeeks() {
67
73
  return this.toMs() / (1e3 * 60 * 60 * 24 * 7);
68
74
  }
75
+ toW = this.toWeeks.bind(this);
69
76
  toMonths() {
70
77
  return this.toMs() / (1e3 * 60 * 60 * 24 * 30);
71
78
  }
79
+ toMth = this.toMonths.bind(this);
72
80
  toYear() {
73
81
  return this.toMs() / (1e3 * 60 * 60 * 24 * 365);
74
82
  }
83
+ toY = this.toYear.bind(this);
84
+ toYr = this.toYear.bind(this);
75
85
  };
76
86
  function milliseconds(value) {
77
87
  return new Duration(value, "milliseconds");
78
88
  }
89
+ var ms = milliseconds;
79
90
  function seconds(value) {
80
91
  return new Duration(value, "seconds");
81
92
  }
93
+ var s = seconds;
94
+ var sec = seconds;
82
95
  function minutes(value) {
83
96
  return new Duration(value, "minutes");
84
97
  }
98
+ var m = minutes;
99
+ var min = minutes;
85
100
  function hours(value) {
86
101
  return new Duration(value, "hours");
87
102
  }
103
+ var h = hours;
88
104
  function days(value) {
89
105
  return new Duration(value, "days");
90
106
  }
107
+ var d = days;
91
108
  function weeks(value) {
92
109
  return new Duration(value, "weeks");
93
110
  }
111
+ var w = weeks;
94
112
  function months(value) {
95
113
  return new Duration(value, "months");
96
114
  }
115
+ var mth = months;
97
116
  function years(value) {
98
117
  return new Duration(value, "years");
99
118
  }
119
+ var y = years;
120
+ var yr = years;
100
121
  export {
101
122
  Duration,
123
+ d,
102
124
  days,
125
+ h,
103
126
  hours,
127
+ m,
104
128
  milliseconds,
129
+ min,
105
130
  minutes,
106
131
  months,
132
+ ms,
133
+ mth,
134
+ s,
135
+ sec,
107
136
  seconds,
137
+ w,
108
138
  weeks,
109
- years
139
+ y,
140
+ years,
141
+ yr
110
142
  };
@@ -1,5 +1,5 @@
1
1
  export * as duration from './duration/index.js'
2
+ export * as dates from './dates/index.js'
3
+ export * as wait from './wait/index.js'
2
4
  export * as timeout from './timeout/index.js'
3
5
  export * as transitions from './transitions/index.js'
4
- export * as wait from './wait/index.js'
5
- export * as dates from './dates/index.js'
@@ -1,5 +1,5 @@
1
1
  export * as duration from './duration/index.js'
2
+ export * as dates from './dates/index.js'
3
+ export * as wait from './wait/index.js'
2
4
  export * as timeout from './timeout/index.js'
3
5
  export * as transitions from './transitions/index.js'
4
- export * as wait from './wait/index.js'
5
- export * as dates from './dates/index.js'
@@ -1,7 +1,7 @@
1
1
  // src/agnostic/time/timeout/index.ts
2
- function timeout(timeoutMs, callback) {
2
+ async function timeout(timeoutMs, callback) {
3
3
  let hasRejected = false;
4
- return new Promise(async (resolve, reject) => {
4
+ return await new Promise(async (resolve, reject) => {
5
5
  const rejectTimeout = setTimeout(() => {
6
6
  reject(false);
7
7
  hasRejected = true;
@@ -54,16 +54,16 @@ export type EasingFunction = (progress: number) => number;
54
54
  */
55
55
  export type EasingDictionary = Record<string, EasingFunction>;
56
56
  /**
57
- * Performs a numeric transition from 0 to `to` over `durationMs` milliseconds.
57
+ * Performs a numeric transition from 0 to `steps` over `durationMs` milliseconds.
58
58
  * Invokes a callback at each step with the eased value and timestamp.
59
59
  *
60
- * @param to - The number of steps or increments for the transition.
60
+ * @param steps - The number of steps or increments for the transition.
61
61
  * @param durationMs - Total duration of the transition in milliseconds.
62
62
  * @param callbackOrEase - Either a callback function for each step or a predefined easing name.
63
63
  * @param callback - Optional callback if `callbackOrEase` is an easing name.
64
64
  * @returns A promise that resolves when the transition is complete.
65
65
  */
66
- export declare function transition(to: number, durationMs: number, callbackOrEase: Ease | Callback, callback?: Callback): Promise<void>;
66
+ export declare function transition(steps: number, durationMs: number, callbackOrEase: Ease | Callback, callback?: Callback): Promise<void>;
67
67
  /**
68
68
  * Predefined easing functions used internally by transitions.
69
69
  */
@@ -34,18 +34,18 @@ var Ease = /* @__PURE__ */ ((Ease2) => {
34
34
  Ease2["EASE_IN_OUT_BOUNCE"] = "ease-in-out-bounce";
35
35
  return Ease2;
36
36
  })(Ease || {});
37
- async function transition(to, durationMs, callbackOrEase, callback) {
37
+ async function transition(steps, durationMs, callbackOrEase, callback) {
38
38
  const ease = typeof callbackOrEase === "string" ? callbackOrEase : "linear" /* LINEAR */;
39
39
  const easing = easings[ease];
40
40
  if (easing === void 0) return;
41
41
  const actualCallback = callback ?? (typeof callbackOrEase === "function" ? callbackOrEase : void 0);
42
42
  if (actualCallback === void 0) return;
43
43
  const start = Date.now();
44
- const timeTable = new Array(to).fill(null).map((_, step) => {
45
- const progression = (step + 1) / to;
44
+ const timeTable = new Array(steps).fill(null).map((_, step) => {
45
+ const progression = (step + 1) / steps;
46
46
  const eased = easing(progression);
47
47
  const time = start + eased * durationMs;
48
- return { time, step: eased * to };
48
+ return { time, step: eased * steps };
49
49
  });
50
50
  for (const { time, step } of timeTable) {
51
51
  const now = Date.now();
@@ -2,6 +2,6 @@
2
2
  * Returns a promise that resolves after the specified duration in milliseconds.
3
3
  *
4
4
  * @param durationMs - Time to wait in milliseconds.
5
- * @returns A promise that resolves to `true` after the delay.
5
+ * @returns A promise that resolves to `void` after the delay.
6
6
  */
7
- export declare function wait(durationMs: number): Promise<unknown>;
7
+ export declare function wait(durationMs: number): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  // src/agnostic/time/wait/index.ts
2
2
  async function wait(durationMs) {
3
- return new Promise((resolve) => {
3
+ await new Promise((resolve) => {
4
4
  setTimeout(() => resolve(true), durationMs);
5
5
  });
6
6
  }
@@ -0,0 +1,45 @@
1
+ import { type ReactNode, type PropsWithChildren, type FunctionComponent } from 'react';
2
+ import type { WithClassName } from '../utils/types.js';
3
+ /**
4
+ * Props for the Disclaimer component.
5
+ *
6
+ * @property content - Content displayed inside the disclaimer panel.
7
+ * @property togglerContent - Content rendered inside the dismiss toggler.
8
+ * If not provided, the toggler is not rendered.
9
+ * @property isOn - Controls the visibility state. When defined, the component
10
+ * behaves as a controlled component.
11
+ * @property defaultIsOn - Default visibility state for uncontrolled mode.
12
+ * @property stateHandlers - Callbacks invoked after state changes.
13
+ * @property stateHandlers.toggled - Callback invoked after the disclaimer state changes.
14
+ * @property actionHandlers - Callbacks invoked before actions are committed.
15
+ * @property actionHandlers.dismissClick - Callback invoked before the disclaimer is dismissed.
16
+ * @property className - Optional additional class name(s) applied to the root element.
17
+ * @property children - Additional content rendered below the disclaimer panel.
18
+ */
19
+ export type Props = PropsWithChildren<WithClassName<{
20
+ content?: ReactNode;
21
+ togglerContent?: ReactNode;
22
+ isOn?: boolean;
23
+ defaultIsOn?: boolean;
24
+ stateHandlers?: {
25
+ toggled?: (isOn: boolean) => void;
26
+ };
27
+ actionHandlers?: {
28
+ dismissClick?: (prevIsOn: boolean) => void;
29
+ };
30
+ }>>;
31
+ /**
32
+ * Component that displays a dismissible disclaimer panel.
33
+ *
34
+ * Supports both controlled (`isOn` provided) and uncontrolled modes.
35
+ *
36
+ * @param props - Component properties.
37
+ * @see {@link Props}
38
+ *
39
+ * @remarks
40
+ * - In controlled mode, visibility is driven by `isOn` and internal state
41
+ * does not toggle automatically.
42
+ * - In uncontrolled mode, the component manages its own visibility state.
43
+ * - Applies `on` and `off` modifier classes depending on visibility state.
44
+ */
45
+ export declare const Disclaimer: FunctionComponent<Props>;
@@ -0,0 +1,70 @@
1
+ // src/components/Disclaimer/index.tsx
2
+ import {
3
+ useState,
4
+ useEffect,
5
+ useRef
6
+ } from "react";
7
+ import { clss } from "../../agnostic/css/clss/index.js";
8
+ import { mergeClassNames } from "../utils/index.js";
9
+ import { disclaimer as publicClassName } from "../public-classnames.js";
10
+ import cssModule from "./styles.module.css";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var Disclaimer = ({
13
+ content,
14
+ togglerContent,
15
+ isOn: isOnProp,
16
+ defaultIsOn: defaultIsOnProp,
17
+ stateHandlers,
18
+ actionHandlers,
19
+ children,
20
+ className
21
+ }) => {
22
+ const [internalIsOn, setInternalIsOn] = useState(isOnProp ?? defaultIsOnProp ?? true);
23
+ const isOn = isOnProp ?? internalIsOn;
24
+ const pIsOn = useRef(isOn);
25
+ useEffect(() => {
26
+ if (pIsOn.current === isOn) return;
27
+ stateHandlers?.toggled?.(isOn);
28
+ pIsOn.current = isOn;
29
+ }, [isOn]);
30
+ const handleDismissClick = () => {
31
+ actionHandlers?.dismissClick?.(isOn);
32
+ if (isOnProp !== void 0) return;
33
+ setInternalIsOn(false);
34
+ };
35
+ const c = clss(publicClassName, { cssModule });
36
+ const rootClss = mergeClassNames(
37
+ c(null, {
38
+ on: isOn,
39
+ off: !isOn
40
+ }),
41
+ className
42
+ );
43
+ const panelClss = c("panel");
44
+ const contentClss = c("content");
45
+ const btnClss = c("toggler");
46
+ const sensitiveClss = c("sensitive");
47
+ return /* @__PURE__ */ jsxs("div", { className: rootClss, children: [
48
+ /* @__PURE__ */ jsxs("div", { className: panelClss, children: [
49
+ content !== void 0 && /* @__PURE__ */ jsx(
50
+ "div",
51
+ {
52
+ className: contentClss,
53
+ children: content
54
+ }
55
+ ),
56
+ togglerContent !== void 0 && /* @__PURE__ */ jsx(
57
+ "div",
58
+ {
59
+ className: btnClss,
60
+ onClick: handleDismissClick,
61
+ children: togglerContent
62
+ }
63
+ )
64
+ ] }),
65
+ /* @__PURE__ */ jsx("div", { className: sensitiveClss, children })
66
+ ] });
67
+ };
68
+ export {
69
+ Disclaimer
70
+ };
@@ -0,0 +1,45 @@
1
+ import { type PropsWithChildren, type FunctionComponent, type ReactNode } from 'react';
2
+ import type { WithClassName } from '../utils/types.js';
3
+ /**
4
+ * Props for the Drawer component.
5
+ *
6
+ * @property openerContent - Content rendered inside the opener control.
7
+ * @property closerContent - Content rendered inside the closer control.
8
+ * @property initialIsOpened - Initial open state in uncontrolled mode.
9
+ * Ignored when `isOpened` is provided.
10
+ * @property isOpened - Controlled open state. When defined, the component
11
+ * behaves as a controlled component and internal state is ignored.
12
+ * @property stateHandlers - Callbacks invoked after the state changes
13
+ * @property stateHandlers.toggled - Callbacks invoked after the isOpened state has changed
14
+ * @property className - Additional class name(s) applied to the root element.
15
+ * @property children - Drawer content.
16
+ */
17
+ export type Props = PropsWithChildren<WithClassName<{
18
+ openerContent?: ReactNode;
19
+ closerContent?: ReactNode;
20
+ initialIsOpened?: boolean;
21
+ isOpened?: boolean;
22
+ stateHandlers?: {
23
+ toggled?: (isOpen: boolean) => void;
24
+ };
25
+ }>>;
26
+ /**
27
+ * Drawer component with optional controlled and uncontrolled behavior.
28
+ *
29
+ * @remarks
30
+ * - In controlled mode (`isOpened` defined), visibility is fully driven by the prop.
31
+ * - In uncontrolled mode, internal state is initialized from `initialIsOpened`.
32
+ * - The component measures its content using `ResizeObserverComponent`
33
+ * and exposes the dimensions:
34
+ * - As CSS custom properties:
35
+ * --{prefix}-content-height
36
+ * --{prefix}-content-height-px
37
+ * --{prefix}-content-width
38
+ * --{prefix}-content-width-px
39
+ * - As `data-content-width` and `data-content-height` attributes.
40
+ *
41
+ * CSS modifier classes:
42
+ * - `opened` when open
43
+ * - `closed` when closed
44
+ */
45
+ export declare const Drawer: FunctionComponent<Props>;