@design-edito/tools 0.3.9 → 0.3.10

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 (321) hide show
  1. package/agnostic/arrays/index.d.ts +1 -1
  2. package/agnostic/arrays/index.js +1 -1
  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 +2 -1
  25. package/agnostic/css/clss/index.js +2 -2
  26. package/agnostic/css/generate-nice-color/index.js +1 -0
  27. package/agnostic/css/index.d.ts +2 -2
  28. package/agnostic/css/index.js +2 -2
  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/register/index.js +4 -2
  32. package/agnostic/html/get-node-ancestors/index.js +1 -1
  33. package/agnostic/html/get-position-inside-parent/index.js +1 -1
  34. package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
  35. package/agnostic/html/hyper-json/method/index.d.ts +2 -2
  36. package/agnostic/html/hyper-json/serialize/index.d.ts +1 -1
  37. package/agnostic/html/hyper-json/serialize/index.js +1 -1
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.d.ts +1 -1
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.d.ts +1 -1
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.d.ts +1 -1
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.d.ts +1 -1
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +1 -1
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.d.ts +1 -1
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.d.ts +1 -1
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -2
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.d.ts +1 -1
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.d.ts +1 -1
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.d.ts +1 -1
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -2
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/hjparse/index.d.ts +1 -1
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/hjstringify/index.d.ts +1 -1
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.d.ts +1 -1
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/index.d.ts +16 -16
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/index.js +16 -16
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.d.ts +1 -1
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.d.ts +1 -1
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.d.ts +1 -1
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.d.ts +2 -2
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +1 -1
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.d.ts +1 -1
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.d.ts +1 -1
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.d.ts +1 -1
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.d.ts +1 -1
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.d.ts +1 -1
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.d.ts +2 -2
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.d.ts +1 -1
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +2 -2
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +7 -4
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.d.ts +1 -1
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.d.ts +1 -1
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.d.ts +1 -1
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +2 -2
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +7 -4
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.d.ts +1 -1
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +9 -9
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.d.ts +2 -2
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.d.ts +1 -1
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.d.ts +1 -1
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.d.ts +1 -1
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +1 -1
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.d.ts +1 -1
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.d.ts +1 -1
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.d.ts +1 -1
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.d.ts +1 -1
  85. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.d.ts +1 -1
  86. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.d.ts +1 -1
  87. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.d.ts +1 -1
  88. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.d.ts +1 -1
  89. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +0 -1
  90. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +1 -1
  91. package/agnostic/html/hyper-json/smart-tags/index.d.ts +1 -1
  92. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.d.ts +1 -1
  93. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.d.ts +1 -1
  94. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.d.ts +1 -1
  95. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.d.ts +1 -1
  96. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.d.ts +1 -1
  97. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +1 -1
  98. package/agnostic/html/hyper-json/smart-tags/isolated/index.d.ts +4 -4
  99. package/agnostic/html/hyper-json/smart-tags/isolated/index.js +4 -4
  100. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.d.ts +1 -1
  101. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.d.ts +1 -1
  102. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.d.ts +1 -1
  103. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.d.ts +1 -1
  104. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +3 -1
  105. package/agnostic/html/hyper-json/transformer/index.d.ts +2 -2
  106. package/agnostic/html/hyper-json/transformer/index.js +6 -9
  107. package/agnostic/html/hyper-json/tree/index.d.ts +1 -1
  108. package/agnostic/html/hyper-json/tree/index.js +14 -10
  109. package/agnostic/html/hyper-json/types/index.d.ts +9 -13
  110. package/agnostic/html/hyper-json/utils/index.d.ts +7 -7
  111. package/agnostic/html/hyper-json/utils/index.js +1 -1
  112. package/agnostic/html/index.d.ts +1 -1
  113. package/agnostic/html/index.js +1 -1
  114. package/agnostic/html/placeholders/index.d.ts +1 -1
  115. package/agnostic/html/selector-to-element/index.js +1 -1
  116. package/agnostic/index.d.ts +6 -6
  117. package/agnostic/index.js +6 -6
  118. package/agnostic/misc/assert/index.d.ts +2 -2
  119. package/agnostic/misc/assert/index.js +4 -4
  120. package/agnostic/misc/cast/index.d.ts +1 -1
  121. package/agnostic/misc/connection/index.js +0 -1
  122. package/agnostic/misc/crawler/index.d.ts +2 -2
  123. package/agnostic/misc/crossenv/detect-runtime/index.js +4 -4
  124. package/agnostic/misc/crossenv/window/index.d.ts +1 -1
  125. package/agnostic/misc/crossenv/window/index.js +2 -2
  126. package/agnostic/misc/data-size/index.js +2 -2
  127. package/agnostic/misc/index.d.ts +5 -5
  128. package/agnostic/misc/index.js +5 -5
  129. package/agnostic/misc/is-constructor-function/index.d.ts +1 -1
  130. package/agnostic/misc/logs/index.d.ts +1 -1
  131. package/agnostic/misc/logs/index.js +1 -1
  132. package/agnostic/misc/logs/logger/index.d.ts +1 -1
  133. package/agnostic/misc/outcome/index.d.ts +7 -7
  134. package/agnostic/numbers/approximate-rational/index.js +4 -2
  135. package/agnostic/numbers/index.d.ts +3 -3
  136. package/agnostic/numbers/index.js +3 -3
  137. package/agnostic/objects/deep-get-property/index.js +2 -2
  138. package/agnostic/objects/flatten-getters/index.js +2 -1
  139. package/agnostic/objects/index.d.ts +4 -3
  140. package/agnostic/objects/index.js +4 -3
  141. package/agnostic/objects/record-format/index.js +1 -0
  142. package/agnostic/objects/sort-keys/index.d.ts +11 -0
  143. package/agnostic/objects/sort-keys/index.js +12 -0
  144. package/agnostic/objects/sort-keys/index.test.d.ts +1 -0
  145. package/agnostic/optim/memoize/index.js +1 -1
  146. package/agnostic/optim/throttle-debounce/index.d.ts +12 -10
  147. package/agnostic/optim/throttle-debounce/index.js +2 -2
  148. package/agnostic/optim/throttle-debounce/types.d.ts +1 -1
  149. package/agnostic/random/index.d.ts +1 -1
  150. package/agnostic/random/index.js +1 -1
  151. package/agnostic/random/random/index.js +1 -1
  152. package/agnostic/sanitization/html/index.js +7 -7
  153. package/agnostic/sanitization/index.d.ts +2 -2
  154. package/agnostic/sanitization/index.js +2 -2
  155. package/agnostic/sanitization/types.d.ts +2 -6
  156. package/agnostic/strings/char-codes/index.d.ts +5 -5
  157. package/agnostic/strings/char-codes/index.js +2 -2
  158. package/agnostic/strings/index.d.ts +2 -2
  159. package/agnostic/strings/index.js +2 -2
  160. package/agnostic/strings/matches/index.d.ts +2 -2
  161. package/agnostic/time/dates/format-date/index.js +23 -9
  162. package/agnostic/time/duration/index.d.ts +23 -2
  163. package/agnostic/time/duration/index.js +36 -4
  164. package/agnostic/time/index.d.ts +2 -2
  165. package/agnostic/time/index.js +2 -2
  166. package/agnostic/time/timeout/index.js +2 -2
  167. package/agnostic/time/wait/index.d.ts +2 -2
  168. package/agnostic/time/wait/index.js +1 -1
  169. package/components/EventListener/index.d.ts +2 -2
  170. package/components/EventListener/index.js +8 -8
  171. package/components/Input/index.d.ts +2 -2
  172. package/components/IntersectionObserver/index.d.ts +2 -2
  173. package/index.d.ts +1 -1
  174. package/index.js +1 -1
  175. package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +2 -2
  176. package/node/@aws-s3/storage/directory/copy-dir/index.js +3 -3
  177. package/node/@aws-s3/storage/directory/list/index.d.ts +2 -2
  178. package/node/@aws-s3/storage/directory/list/index.js +1 -1
  179. package/node/@aws-s3/storage/directory/move-dir/index.d.ts +3 -3
  180. package/node/@aws-s3/storage/directory/move-dir/index.js +3 -3
  181. package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +2 -2
  182. package/node/@aws-s3/storage/directory/remove-dir/index.js +4 -4
  183. package/node/@aws-s3/storage/file/copy/index.d.ts +1 -1
  184. package/node/@aws-s3/storage/file/download/index.d.ts +3 -3
  185. package/node/@aws-s3/storage/file/exists/index.d.ts +2 -2
  186. package/node/@aws-s3/storage/file/exists/index.js +1 -2
  187. package/node/@aws-s3/storage/file/index.d.ts +3 -3
  188. package/node/@aws-s3/storage/file/index.js +3 -3
  189. package/node/@aws-s3/storage/file/move/index.d.ts +2 -2
  190. package/node/@aws-s3/storage/file/remove/index.d.ts +1 -1
  191. package/node/@aws-s3/storage/file/stat/index.d.ts +1 -1
  192. package/node/@aws-s3/storage/file/upload/index.d.ts +2 -2
  193. package/node/@aws-s3/storage/index.d.ts +1 -1
  194. package/node/@aws-s3/storage/index.js +1 -1
  195. package/node/@express/@multer/index.d.ts +1 -1
  196. package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +1 -1
  197. package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +1 -1
  198. package/node/@google-cloud/storage/directory/index.d.ts +1 -1
  199. package/node/@google-cloud/storage/directory/index.js +1 -1
  200. package/node/@google-cloud/storage/directory/list/index.d.ts +1 -1
  201. package/node/@google-cloud/storage/directory/move-dir/index.d.ts +1 -1
  202. package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +1 -1
  203. package/node/@google-cloud/storage/file/copy/index.d.ts +2 -2
  204. package/node/@google-cloud/storage/file/download/index.d.ts +2 -2
  205. package/node/@google-cloud/storage/file/exists/index.d.ts +1 -1
  206. package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +1 -1
  207. package/node/@google-cloud/storage/file/get-metadata/index.d.ts +1 -1
  208. package/node/@google-cloud/storage/file/get-permissions/index.d.ts +1 -1
  209. package/node/@google-cloud/storage/file/index.d.ts +4 -4
  210. package/node/@google-cloud/storage/file/index.js +4 -4
  211. package/node/@google-cloud/storage/file/move/index.d.ts +1 -1
  212. package/node/@google-cloud/storage/file/remove/index.d.ts +1 -1
  213. package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +4 -4
  214. package/node/@google-cloud/storage/file/stat/index.d.ts +1 -1
  215. package/node/@google-cloud/storage/file/stat/index.js +2 -2
  216. package/node/@google-cloud/storage/file/update-metadata/index.d.ts +1 -1
  217. package/node/@google-cloud/storage/file/upload/index.d.ts +2 -2
  218. package/node/@google-cloud/storage/index.d.ts +1 -1
  219. package/node/@google-cloud/storage/index.js +1 -1
  220. package/node/cloud-storage/operations/copy-dir/index.d.ts +8 -8
  221. package/node/cloud-storage/operations/copy-dir/index.js +4 -4
  222. package/node/cloud-storage/operations/copy-file/index.d.ts +8 -8
  223. package/node/cloud-storage/operations/copy-file/index.js +4 -4
  224. package/node/cloud-storage/operations/download-file/index.d.ts +9 -9
  225. package/node/cloud-storage/operations/download-file/index.js +4 -4
  226. package/node/cloud-storage/operations/exists-file/index.d.ts +6 -6
  227. package/node/cloud-storage/operations/exists-file/index.js +4 -4
  228. package/node/cloud-storage/operations/index.d.ts +2 -2
  229. package/node/cloud-storage/operations/index.js +2 -2
  230. package/node/cloud-storage/operations/list-dir/index.d.ts +6 -6
  231. package/node/cloud-storage/operations/list-dir/index.js +4 -4
  232. package/node/cloud-storage/operations/move-dir/index.d.ts +8 -8
  233. package/node/cloud-storage/operations/move-dir/index.js +4 -4
  234. package/node/cloud-storage/operations/move-file/index.d.ts +8 -8
  235. package/node/cloud-storage/operations/move-file/index.js +4 -4
  236. package/node/cloud-storage/operations/remove-dir/index.d.ts +8 -8
  237. package/node/cloud-storage/operations/remove-dir/index.js +4 -4
  238. package/node/cloud-storage/operations/remove-file/index.d.ts +8 -8
  239. package/node/cloud-storage/operations/remove-file/index.js +4 -4
  240. package/node/cloud-storage/operations/stat-file/index.d.ts +8 -8
  241. package/node/cloud-storage/operations/stat-file/index.js +4 -4
  242. package/node/cloud-storage/operations/upload-file/index.d.ts +9 -9
  243. package/node/cloud-storage/operations/upload-file/index.js +4 -4
  244. package/node/files/index.d.ts +1 -1
  245. package/node/files/index.js +1 -1
  246. package/node/files/read-write/index.js +1 -1
  247. package/node/files/subpaths/index.d.ts +3 -3
  248. package/node/files/subpaths/index.js +6 -6
  249. package/node/ftps/directory/copy-dir/index.d.ts +1 -1
  250. package/node/ftps/directory/copy-dir/index.js +1 -1
  251. package/node/ftps/directory/list/index.d.ts +1 -1
  252. package/node/ftps/directory/move-dir/index.d.ts +1 -1
  253. package/node/ftps/directory/move-dir/index.js +1 -3
  254. package/node/ftps/directory/remove-dir/index.d.ts +2 -2
  255. package/node/ftps/file/copy/index.d.ts +1 -1
  256. package/node/ftps/file/copy/index.js +1 -1
  257. package/node/ftps/file/download/index.d.ts +2 -2
  258. package/node/ftps/file/exists/index.d.ts +2 -2
  259. package/node/ftps/file/exists/index.js +1 -1
  260. package/node/ftps/file/index.d.ts +2 -2
  261. package/node/ftps/file/index.js +2 -2
  262. package/node/ftps/file/move/index.d.ts +3 -3
  263. package/node/ftps/file/move/index.js +1 -1
  264. package/node/ftps/file/remove/index.d.ts +1 -1
  265. package/node/ftps/file/stat/index.d.ts +1 -1
  266. package/node/ftps/file/stat/index.js +2 -2
  267. package/node/ftps/file/upload/index.d.ts +2 -2
  268. package/node/images/format/index.d.ts +1 -1
  269. package/node/images/format/index.js +9 -9
  270. package/node/images/index.d.ts +2 -2
  271. package/node/images/index.js +2 -2
  272. package/node/images/metadata/index.d.ts +1 -1
  273. package/node/images/metadata/index.js +1 -1
  274. package/node/images/transform/index.d.ts +2 -2
  275. package/node/images/transform/index.js +26 -21
  276. package/node/images/transform/operations/blur/index.d.ts +1 -1
  277. package/node/images/transform/operations/brighten/index.d.ts +1 -1
  278. package/node/images/transform/operations/extend/index.d.ts +1 -1
  279. package/node/images/transform/operations/extract/index.d.ts +1 -1
  280. package/node/images/transform/operations/flatten/index.d.ts +1 -1
  281. package/node/images/transform/operations/flatten/index.js +1 -1
  282. package/node/images/transform/operations/flip/index.d.ts +1 -1
  283. package/node/images/transform/operations/flop/index.d.ts +1 -1
  284. package/node/images/transform/operations/hue/index.d.ts +1 -1
  285. package/node/images/transform/operations/index.d.ts +5 -5
  286. package/node/images/transform/operations/index.js +5 -5
  287. package/node/images/transform/operations/level/index.d.ts +1 -1
  288. package/node/images/transform/operations/lighten/index.d.ts +1 -1
  289. package/node/images/transform/operations/normalize/index.d.ts +1 -1
  290. package/node/images/transform/operations/overlay/index.js +1 -1
  291. package/node/images/transform/operations/resize/index.d.ts +1 -1
  292. package/node/images/transform/operations/rotate/index.d.ts +1 -1
  293. package/node/images/transform/operations/saturate/index.d.ts +1 -1
  294. package/node/index.d.ts +3 -3
  295. package/node/index.js +3 -3
  296. package/node/process/prompt-continue/index.js +1 -1
  297. package/node/process/spawner/index.d.ts +1 -9
  298. package/node/process/spawner/index.js +10 -8
  299. package/node/sftp/directory/copy-dir/index.d.ts +2 -1
  300. package/node/sftp/directory/copy-dir/index.js +2 -2
  301. package/node/sftp/directory/index.d.ts +1 -1
  302. package/node/sftp/directory/index.js +1 -1
  303. package/node/sftp/directory/list/index.d.ts +1 -1
  304. package/node/sftp/directory/move-dir/index.d.ts +1 -1
  305. package/node/sftp/directory/move-dir/index.js +2 -4
  306. package/node/sftp/directory/remove-dir/index.d.ts +2 -2
  307. package/node/sftp/file/copy/index.d.ts +2 -1
  308. package/node/sftp/file/copy/index.js +2 -2
  309. package/node/sftp/file/download/index.d.ts +3 -3
  310. package/node/sftp/file/exists/index.d.ts +1 -1
  311. package/node/sftp/file/index.d.ts +3 -3
  312. package/node/sftp/file/index.js +3 -3
  313. package/node/sftp/file/move/index.d.ts +3 -3
  314. package/node/sftp/file/move/index.js +3 -5
  315. package/node/sftp/file/remove/index.d.ts +1 -1
  316. package/node/sftp/file/remove/index.js +1 -1
  317. package/node/sftp/file/stat/index.d.ts +1 -1
  318. package/node/sftp/file/stat/index.js +1 -1
  319. package/node/sftp/file/upload/index.d.ts +3 -2
  320. package/node/sftp/file/upload/index.js +1 -1
  321. package/package.json +1244 -10
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const tonull: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, [], null>];
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const tonumber: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, [], number>];
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const torecord: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, [], Types.Tree.RestingRecordValue>];
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const toref: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, [], Types.Tree.RestingValue>];
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const tostring: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, [], string>];
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const totext: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, [], Text>];
@@ -1,4 +1,4 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  type Main = Element | NodeListOf<Element | Text>;
3
3
  type Args = [
4
4
  selector: string | Text,
@@ -69,7 +69,6 @@ var transformselected = SmartTags.makeSmartTag({
69
69
  insertNode(Cast.toText(replacer), "after", selected);
70
70
  selected.remove();
71
71
  }
72
- transformedChecked.payload;
73
72
  }
74
73
  if (main instanceof Element) return makeSuccess(mainClone);
75
74
  const safeChildren = Array.from(mainClone.childNodes).filter((e) => e instanceof Element || e instanceof Text);
@@ -10,7 +10,7 @@ var trim = SmartTags.makeSmartTag({
10
10
  mainValueCheck: (m) => Utils.Tree.TypeChecks.typeCheck(m, "string", "text"),
11
11
  argsValueCheck: (a) => Utils.SmartTags.expectEmptyArgs(a),
12
12
  func: (main) => {
13
- return typeof main === "string" ? Outcome.makeSuccess(main.trim()) : Outcome.makeSuccess(Cast.toText(`${main}`.trim()));
13
+ return typeof main === "string" ? Outcome.makeSuccess(main.trim()) : Outcome.makeSuccess(Cast.toText((main.textContent ?? "").trim()));
14
14
  }
15
15
  });
16
16
  export {
@@ -1,4 +1,4 @@
1
- import { Types } from '../types/index.js';
1
+ import { type Types } from '../types/index.js';
2
2
  export declare namespace SmartTags {
3
3
  function makeSmartTag<Main extends Types.Tree.RestingValue = Types.Tree.RestingValue, Args extends Types.Tree.RestingArrayValue = Types.Tree.RestingArrayValue, Output extends Types.Tree.RestingValue = Types.Tree.RestingValue>(descriptor: Types.SmartTags.Descriptor<Main, Args, Output>): [string, Types.SmartTags.SmartTag<Main, Args, Output>];
4
4
  }
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const any: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, Types.Tree.RestingArrayValue, Types.Tree.RestingValue>];
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const array: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, Types.Tree.RestingArrayValue, Types.Tree.RestingArrayValue>];
@@ -1,4 +1,4 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  type Main = string | Text;
3
3
  export declare const get: [string, Types.SmartTags.SmartTag<Main, [], Types.Tree.RestingValue>];
4
4
  export {};
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const global: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, Types.Tree.RestingArrayValue, Types.Tree.RestingRecordValue>];
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const guess: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, Types.Tree.RestingArrayValue, Types.Tree.RestingValue>];
@@ -20,7 +20,7 @@ var guess = SmartTags.makeSmartTag({
20
20
  const strCoalesced = Cast.toString(coalesced);
21
21
  if (strCoalesced.trim().toLowerCase() === "true") return makeSuccess2(true);
22
22
  if (strCoalesced.trim().toLowerCase() === "false") return makeSuccess2(false);
23
- if (strCoalesced.trim().toLowerCase().match(/^\s*-?\s*(\d+(\.\d*)?|\.\d+)\s*$/)) return makeSuccess2(parseFloat(strCoalesced));
23
+ if (strCoalesced.trim().toLowerCase().match(/^\s*-?\s*(\d+(\.\d*)?|\.\d+)\s*$/) !== null) return makeSuccess2(parseFloat(strCoalesced));
24
24
  if (strCoalesced.trim().toLowerCase() === "null") return makeSuccess2(null);
25
25
  try {
26
26
  const parsed = JSON.parse(strCoalesced);
@@ -1,14 +1,14 @@
1
+ export * as any from './any/index.js'
1
2
  export * as array from './array/index.js'
2
3
  export * as element from './element/index.js'
3
- export * as boolean from './boolean/index.js'
4
4
  export * as get from './get/index.js'
5
5
  export * as global from './global/index.js'
6
6
  export * as guess from './guess/index.js'
7
- export * as nodelist from './nodelist/index.js'
8
- export * as any from './any/index.js'
9
- export * as number from './number/index.js'
7
+ export * as boolean from './boolean/index.js'
10
8
  export * as null from './null/index.js'
9
+ export * as nodelist from './nodelist/index.js'
11
10
  export * as record from './record/index.js'
12
11
  export * as ref from './ref/index.js'
12
+ export * as number from './number/index.js'
13
13
  export * as text from './text/index.js'
14
14
  export * as string from './string/index.js'
@@ -1,14 +1,14 @@
1
+ export * as any from './any/index.js'
1
2
  export * as array from './array/index.js'
2
3
  export * as element from './element/index.js'
3
- export * as boolean from './boolean/index.js'
4
4
  export * as get from './get/index.js'
5
5
  export * as global from './global/index.js'
6
6
  export * as guess from './guess/index.js'
7
- export * as nodelist from './nodelist/index.js'
8
- export * as any from './any/index.js'
9
- export * as number from './number/index.js'
7
+ export * as boolean from './boolean/index.js'
10
8
  export * as null from './null/index.js'
9
+ export * as nodelist from './nodelist/index.js'
11
10
  export * as record from './record/index.js'
12
11
  export * as ref from './ref/index.js'
12
+ export * as number from './number/index.js'
13
13
  export * as text from './text/index.js'
14
14
  export * as string from './string/index.js'
@@ -1,4 +1,4 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  type Output = NodeListOf<Element | Text>;
3
3
  export declare const nodelist: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, Types.Tree.RestingArrayValue, Output>];
4
4
  export {};
@@ -1,2 +1,2 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  export declare const nullFunc: [string, Types.SmartTags.SmartTag<Types.Tree.RestingValue, Types.Tree.RestingArrayValue, null>];
@@ -1,4 +1,4 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  type Args = Types.Tree.RestingRecordValue[];
3
3
  export declare const record: [string, Types.SmartTags.SmartTag<Types.Tree.RestingRecordValue, Args, Types.Tree.RestingRecordValue>];
4
4
  export {};
@@ -1,4 +1,4 @@
1
- import { Types } from '../../../types/index.js';
1
+ import { type Types } from '../../../types/index.js';
2
2
  type Main = string | Text;
3
3
  type Args = [];
4
4
  type Output = Types.Tree.RestingValue;
@@ -12,7 +12,9 @@ var text = SmartTags.makeSmartTag({
12
12
  func: (main, args) => {
13
13
  const all = [main, ...args];
14
14
  const reduced = all.reduce((reduced2, curr) => {
15
- return Cast.toText(`${reduced2}${Cast.toText(curr)}`);
15
+ const red = reduced2.textContent ?? "";
16
+ const cur = Cast.toText(curr).textContent ?? "";
17
+ return Cast.toText(`${red}${cur}`);
16
18
  }, Cast.toText(""));
17
19
  return Outcome.makeSuccess(reduced);
18
20
  }
@@ -1,7 +1,7 @@
1
1
  import * as Outcome from '../../../misc/outcome/index.js';
2
2
  import { Method } from '../method/index.js';
3
- import { Tree as TreeNamespace } from '../tree/index.js';
4
- import { Types } from '../types/index.js';
3
+ import { type Tree as TreeNamespace } from '../tree/index.js';
4
+ import { type Types } from '../types/index.js';
5
5
  export declare class Transformer<Main extends Types.Tree.RestingValue = Types.Tree.RestingValue, Args extends Types.Tree.RestingArrayValue = Types.Tree.RestingArrayValue, Output extends Types.Tree.RestingValue = Types.Tree.RestingValue> {
6
6
  name: string;
7
7
  mode: Types.Tree.Mode;
@@ -32,7 +32,6 @@ var Transformer = class _Transformer {
32
32
  let argsValue;
33
33
  if (mode === "isolation") {
34
34
  if (Array.isArray(innerValue)) {
35
- innerValue;
36
35
  mainValue = innerValue.at(0) ?? [];
37
36
  argsValue = innerValue.slice(1);
38
37
  } else {
@@ -84,14 +83,12 @@ var Transformer = class _Transformer {
84
83
  };
85
84
  }
86
85
  apply(outerValue) {
87
- const {
88
- getMainAndArgsValue,
89
- typeChecks,
90
- makeMainValueError,
91
- makeArgsValueError,
92
- makeTransformationError,
93
- func
94
- } = this;
86
+ const getMainAndArgsValue = this.getMainAndArgsValue.bind(this);
87
+ const makeMainValueError = this.makeMainValueError.bind(this);
88
+ const makeArgsValueError = this.makeArgsValueError.bind(this);
89
+ const makeTransformationError = this.makeTransformationError.bind(this);
90
+ const func = this.func.bind(this);
91
+ const { typeChecks } = this;
95
92
  const { mainValue, argsValue } = getMainAndArgsValue(outerValue);
96
93
  const mainChecked = typeChecks.mainValue(mainValue);
97
94
  if (!mainChecked.success) return Outcome.makeFailure(makeMainValueError(
@@ -1,4 +1,4 @@
1
- import { Types } from '../types/index.js';
1
+ import { type Types } from '../types/index.js';
2
2
  export declare namespace Tree {
3
3
  class Tree {
4
4
  readonly node: Element | Text;
@@ -136,7 +136,12 @@ var Tree;
136
136
  this.pathFromParent = null;
137
137
  this.root = this;
138
138
  }
139
- this.path = this.isRoot ? [] : [...this.parent.path, this.pathFromParent];
139
+ const thisPath = [];
140
+ if (!this.isRoot) {
141
+ thisPath.push(...this.parent?.path ?? []);
142
+ if (this.pathFromParent !== null) thisPath.push(this.pathFromParent);
143
+ }
144
+ this.path = thisPath;
140
145
  this.pathString = `/${this.path.join("/")}`;
141
146
  this.attributes = node instanceof Element ? Array.from(node.attributes) : null;
142
147
  if (node instanceof Element) {
@@ -265,7 +270,7 @@ var Tree;
265
270
  if (child instanceof Element) return [...reduced, child];
266
271
  const lastReducedItem = reduced[reduced.length - 1];
267
272
  if (lastReducedItem instanceof Element) return [...reduced, child];
268
- const lastReducedTrimmed = trimEnd(lastReducedItem.textContent ?? "");
273
+ const lastReducedTrimmed = trimEnd(lastReducedItem?.textContent ?? "");
269
274
  const childTrimmed = trimStart(child.textContent ?? "");
270
275
  const merged = document.createTextNode(`${lastReducedTrimmed}${childTrimmed}`);
271
276
  const returned = [...reduced];
@@ -344,14 +349,14 @@ var Tree;
344
349
  if (isRoot && mode === "coalescion") throw new Error(`The root node cannot be used in coalescion mode @ ${this.pathString}`);
345
350
  }
346
351
  computeValue() {
352
+ const performSafetyChecks = this.performSafetyChecks.bind(this);
347
353
  const {
348
354
  isolationInitType,
349
355
  subtrees,
350
356
  node,
351
357
  smartTagData,
352
358
  isMethod,
353
- mode,
354
- performSafetyChecks
359
+ mode
355
360
  } = this;
356
361
  performSafetyChecks();
357
362
  const { Text } = Window.get();
@@ -383,7 +388,8 @@ var Tree;
383
388
  return transformer;
384
389
  }
385
390
  enforceEvaluation() {
386
- const { isPreserved, node, computeValue, isLiteral, attributes } = this;
391
+ const { isPreserved, node, isLiteral, attributes } = this;
392
+ const computeValue = this.computeValue.bind(this);
387
393
  const { Element } = Window.get();
388
394
  if (isPreserved) return Utils.clone(node);
389
395
  const evaluated = computeValue();
@@ -404,11 +410,9 @@ var Tree;
404
410
  }
405
411
  evaluate() {
406
412
  const start = Date.now();
407
- const {
408
- getCachedValue,
409
- setCachedValue,
410
- enforceEvaluation
411
- } = this;
413
+ const getCachedValue = this.getCachedValue.bind(this);
414
+ const setCachedValue = this.setCachedValue.bind(this);
415
+ const enforceEvaluation = this.enforceEvaluation.bind(this);
412
416
  const cached = getCachedValue();
413
417
  if (cached !== void 0) return cached;
414
418
  const evaluated = enforceEvaluation();
@@ -1,8 +1,8 @@
1
- import * as Outcome from '../../../misc/outcome/index.js';
2
- import { Logger } from '../../../misc/logs/logger/index.js';
3
- import { Tree as TreeNamespace } from '../tree/index.js';
4
- import { Transformer } from '../transformer/index.js';
5
- import { Method } from '../method/index.js';
1
+ import type * as Outcome from '../../../misc/outcome/index.js';
2
+ import { type Logger } from '../../../misc/logs/logger/index.js';
3
+ import { type Tree as TreeNamespace } from '../tree/index.js';
4
+ import { type Transformer } from '../transformer/index.js';
5
+ import { type Method } from '../method/index.js';
6
6
  export declare namespace Types {
7
7
  namespace Transformations {
8
8
  type FunctionMainValueFailure = {
@@ -60,9 +60,7 @@ export declare namespace Types {
60
60
  };
61
61
  type Value = RestingValue | TransformerValue;
62
62
  type RestingArrayValue = RestingValue[];
63
- type RestingRecordValue = {
64
- [k: string]: RestingValue;
65
- };
63
+ type RestingRecordValue = Record<string, RestingValue>;
66
64
  type ValuesTypesNamesIndex = {
67
65
  null: null;
68
66
  boolean: boolean;
@@ -104,15 +102,13 @@ export declare namespace Types {
104
102
  value: string;
105
103
  } | {
106
104
  type: 'nodelist';
107
- value: Array<Serialized>;
105
+ value: Serialized[];
108
106
  } | {
109
107
  type: 'array';
110
- value: Array<Serialized>;
108
+ value: Serialized[];
111
109
  } | {
112
110
  type: 'record';
113
- value: {
114
- [k: string]: Serialized;
115
- };
111
+ value: Record<string, Serialized>;
116
112
  } | {
117
113
  type: 'transformer';
118
114
  value: Transformer;
@@ -6,14 +6,14 @@ export declare namespace Utils {
6
6
  const toHyperJson: (value: Types.Tree.Value) => Element | Text;
7
7
  namespace Transformations {
8
8
  namespace TypeChecks {
9
- function getType<T extends unknown>(value: T): T extends Types.Tree.Value ? Types.Tree.ValueTypeName : Types.Tree.ValueTypeName | undefined;
9
+ function getType<T>(value: T): T extends Types.Tree.Value ? Types.Tree.ValueTypeName : Types.Tree.ValueTypeName | undefined;
10
10
  const everyTypeName: Types.Tree.ValueTypeName[];
11
11
  function singleTypeCheck<K extends Types.Tree.ValueTypeName>(value: unknown, type: K): value is Types.Tree.ValueTypeFromNames<[K]>;
12
- function typeCheck<K extends Array<Types.Tree.ValueTypeName>>(value: unknown, ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>, {
12
+ function typeCheck<K extends Types.Tree.ValueTypeName[]>(value: unknown, ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>, {
13
13
  expected: string;
14
14
  found: string;
15
15
  }>;
16
- function typeCheckMany<K extends Array<Types.Tree.ValueTypeName>>(values: unknown[], ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>[], {
16
+ function typeCheckMany<K extends Types.Tree.ValueTypeName[]>(values: unknown[], ...types: K): Outcome.Either<Array<Types.Tree.ValueTypeFromNames<K>>, {
17
17
  position: number;
18
18
  expected: string;
19
19
  found: string;
@@ -24,19 +24,19 @@ export declare namespace Utils {
24
24
  function mergeNodes(nodes: Element[]): Element;
25
25
  function getInitialValueFromTypeName(name: Exclude<Types.Tree.ValueTypeName, 'transformer' | 'method'>): Types.Tree.RestingValue;
26
26
  namespace TypeChecks {
27
- function getType<T extends unknown>(value: T): T extends Types.Tree.Value ? Types.Tree.ValueTypeName : Types.Tree.ValueTypeName | undefined;
27
+ function getType<T>(value: T): T extends Types.Tree.Value ? Types.Tree.ValueTypeName : Types.Tree.ValueTypeName | undefined;
28
28
  const everyTypeName: Types.Tree.ValueTypeName[];
29
29
  function singleTypeCheck<K extends Types.Tree.ValueTypeName>(value: unknown, type: K): value is Types.Tree.ValueTypeFromNames<[K]>;
30
- function typeCheck<K extends Array<Types.Tree.ValueTypeName>>(value: unknown, ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>, {
30
+ function typeCheck<K extends Types.Tree.ValueTypeName[]>(value: unknown, ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>, {
31
31
  expected: string;
32
32
  found: string;
33
33
  }>;
34
- function typeCheckMany<K extends Array<Types.Tree.ValueTypeName>>(values: unknown[], ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>[], {
34
+ function typeCheckMany<K extends Types.Tree.ValueTypeName[]>(values: unknown[], ...types: K): Outcome.Either<Array<Types.Tree.ValueTypeFromNames<K>>, {
35
35
  position: number;
36
36
  expected: string;
37
37
  found: string;
38
38
  }>;
39
- function typeCheckManyWithLength<K extends Array<Types.Tree.ValueTypeName>>(values: unknown[], minLength?: number, maxLength?: number, ...types: K): Outcome.Either<Types.Tree.ValueTypeFromNames<K>[], {
39
+ function typeCheckManyWithLength<K extends Types.Tree.ValueTypeName[]>(values: unknown[], minLength?: number, maxLength?: number, ...types: K): Outcome.Either<Array<Types.Tree.ValueTypeFromNames<K>>, {
40
40
  position: number;
41
41
  expected: string;
42
42
  found: string;
@@ -262,7 +262,7 @@ var Utils;
262
262
  else {
263
263
  const childKey = childData.key;
264
264
  const alreadyMerged = mergedChildren.find((dat) => dat.key === childKey);
265
- if (alreadyMerged) return;
265
+ if (alreadyMerged !== void 0) return;
266
266
  const toMerge = allChildren.filter((dat) => dat.key === childKey);
267
267
  if (toMerge.length === 0) return;
268
268
  const merged = mergeNodes(toMerge.map((dat) => dat.node));
@@ -1,8 +1,8 @@
1
1
  export * as getNodeAncestors from './get-node-ancestors/index.js'
2
+ export * as getPositionInsideParent from './get-position-inside-parent/index.js'
2
3
  export * as hyperJson from './hyper-json/index.js'
3
4
  export * as insertNode from './insert-node/index.js'
4
5
  export * as placeholders from './placeholders/index.js'
5
6
  export * as replaceInElement from './replace-in-element/index.js'
6
7
  export * as selectorToElement from './selector-to-element/index.js'
7
- export * as getPositionInsideParent from './get-position-inside-parent/index.js'
8
8
  export * as stringToNodes from './string-to-nodes/index.js'
@@ -1,8 +1,8 @@
1
1
  export * as getNodeAncestors from './get-node-ancestors/index.js'
2
+ export * as getPositionInsideParent from './get-position-inside-parent/index.js'
2
3
  export * as hyperJson from './hyper-json/index.js'
3
4
  export * as insertNode from './insert-node/index.js'
4
5
  export * as placeholders from './placeholders/index.js'
5
6
  export * as replaceInElement from './replace-in-element/index.js'
6
7
  export * as selectorToElement from './selector-to-element/index.js'
7
- export * as getPositionInsideParent from './get-position-inside-parent/index.js'
8
8
  export * as stringToNodes from './string-to-nodes/index.js'
@@ -1,6 +1,6 @@
1
1
  export declare const EightKiloByteOfLoremIpsumSentences: string[];
2
2
  export declare const generateSentence: () => string | undefined;
3
- export declare const generateSentences: (amount?: number) => (string | undefined)[];
3
+ export declare const generateSentences: (amount?: number) => Array<string | undefined>;
4
4
  export declare const generateTitle: () => string;
5
5
  export declare const generateIntertitle: () => string;
6
6
  export declare const generateParagraph: () => string;
@@ -10,7 +10,7 @@ function selectorToElement(selector) {
10
10
  const matchedClasses = selector.match(classRegexp) ?? [];
11
11
  const matchedAttrs = selector.match(attributeRegexp) ?? [];
12
12
  const tag = matchedTags[matchedTags.length - 1] ?? "div";
13
- const id = matchedIds.length > 0 ? matchedIds[matchedIds.length - 1]?.replace(/^#/, "") : null;
13
+ const id = matchedIds.length > 0 ? matchedIds[matchedIds.length - 1]?.replace(/^#/, "") ?? null : null;
14
14
  const classes = matchedClasses.map((matchedClass) => matchedClass.replace(/^\./, ""));
15
15
  const attributes = matchedAttrs.map((matchedAttr) => matchedAttr.replace(/^\[/, "").replace(/\]$/, "").split("="));
16
16
  const element = Window.get().document.createElement(tag);
@@ -1,16 +1,16 @@
1
1
  export * as arrays from './arrays/index.js'
2
- export * as booleans from './booleans/index.js'
3
2
  export * as colors from './colors/index.js'
3
+ export * as booleans from './booleans/index.js'
4
+ export * as css from './css/index.js'
4
5
  export * as html from './html/index.js'
5
- export * as errors from './errors/index.js'
6
6
  export * as misc from './misc/index.js'
7
- export * as css from './css/index.js'
7
+ export * as errors from './errors/index.js'
8
8
  export * as objects from './objects/index.js'
9
9
  export * as optim from './optim/index.js'
10
10
  export * as random from './random/index.js'
11
- export * as regexps from './regexps/index.js'
12
11
  export * as sanitization from './sanitization/index.js'
13
- export * as numbers from './numbers/index.js'
12
+ export * as strings from './strings/index.js'
14
13
  export * as time from './time/index.js'
15
14
  export * as typescript from './typescript/index.js'
16
- export * as strings from './strings/index.js'
15
+ export * as regexps from './regexps/index.js'
16
+ export * as numbers from './numbers/index.js'
package/agnostic/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  export * as arrays from './arrays/index.js'
2
- export * as booleans from './booleans/index.js'
3
2
  export * as colors from './colors/index.js'
3
+ export * as booleans from './booleans/index.js'
4
+ export * as css from './css/index.js'
4
5
  export * as html from './html/index.js'
5
- export * as errors from './errors/index.js'
6
6
  export * as misc from './misc/index.js'
7
- export * as css from './css/index.js'
7
+ export * as errors from './errors/index.js'
8
8
  export * as objects from './objects/index.js'
9
9
  export * as optim from './optim/index.js'
10
10
  export * as random from './random/index.js'
11
- export * as regexps from './regexps/index.js'
12
11
  export * as sanitization from './sanitization/index.js'
13
- export * as numbers from './numbers/index.js'
12
+ export * as strings from './strings/index.js'
14
13
  export * as time from './time/index.js'
15
14
  export * as typescript from './typescript/index.js'
16
- export * as strings from './strings/index.js'
15
+ export * as regexps from './regexps/index.js'
16
+ export * as numbers from './numbers/index.js'
@@ -1,5 +1,5 @@
1
1
  import * as Outcome from '../outcome/index.js';
2
2
  type Assertion = (() => boolean) | (() => Promise<boolean>) | boolean;
3
- export declare function assert(label: string, assertion: Assertion | Array<Assertion> | Map<string, Assertion> | Record<string, Assertion>): Promise<Outcome.Either<string, string>>;
4
- export declare function assertVerbose(label: string, assertion: Assertion | Array<Assertion> | Map<string, Assertion>): Promise<void | Outcome.Success<string>>;
3
+ export declare function assert(label: string, assertion: Assertion | Assertion[] | Map<string, Assertion> | Record<string, Assertion>): Promise<Outcome.Either<string, string>>;
4
+ export declare function assertVerbose(label: string, assertion: Assertion | Assertion[] | Map<string, Assertion>): Promise<undefined | Outcome.Success<string>>;
5
5
  export {};
@@ -16,7 +16,7 @@ async function assert(label, assertion) {
16
16
  else if (typeof assertion === "function") {
17
17
  try {
18
18
  const result = await assertion();
19
- if (result === false) return Outcome.makeFailure(label);
19
+ if (!result) return Outcome.makeFailure(label);
20
20
  else return Outcome.makeSuccess(label);
21
21
  } catch (err) {
22
22
  const errStr = unknownToString(err);
@@ -31,14 +31,14 @@ async function assert(label, assertion) {
31
31
  } else {
32
32
  assertions = Object.entries(assertion);
33
33
  }
34
- const allAsserted = await Promise.all(assertions.map(([innerLabel, innerAssertion]) => {
34
+ const allAsserted = await Promise.all(assertions.map(async ([innerLabel, innerAssertion]) => {
35
35
  const fullLabel = `${label} / ${innerLabel}`;
36
36
  const asserted = assert(fullLabel, innerAssertion);
37
- return asserted;
37
+ return await asserted;
38
38
  }));
39
39
  const allSuccess = allAsserted.every((asserted) => asserted.success);
40
40
  if (allSuccess) return Outcome.makeSuccess(allAsserted.map((e) => e.payload).join("\n"));
41
- const failures = allAsserted.filter((asserted) => asserted.success === false);
41
+ const failures = allAsserted.filter((asserted) => !asserted.success);
42
42
  const failuresStr = failures.map((failure) => failure.error).join("\n ");
43
43
  return Outcome.makeFailure(failuresStr);
44
44
  }
@@ -47,7 +47,7 @@ export declare function toNull(_value: unknown): null;
47
47
  * @param {unknown} value - The value to convert.
48
48
  * @returns {Array<unknown>} The array representation of the input.
49
49
  */
50
- export declare function toArray(value: unknown): Array<unknown>;
50
+ export declare function toArray(value: unknown): unknown[];
51
51
  /**
52
52
  * Converts a value to an array of numbers.
53
53
  *
@@ -15,7 +15,6 @@ function isConnection(unk) {
15
15
  if (!isType(unk.type)) return false;
16
16
  if (!("effectiveType" in unk)) return false;
17
17
  if (!isEffectiveType(unk.effectiveType)) return false;
18
- unk;
19
18
  return true;
20
19
  }
21
20
  function getConnection() {
@@ -30,7 +30,7 @@ export type Processor<T> = (url: string, content: T, hooks: {
30
30
  *
31
31
  * @template T - The type of content returned by the fetcher.
32
32
  */
33
- export type Options<T extends any> = {
33
+ export type Options<T> = {
34
34
  /** Maximum number of URLs to process. */
35
35
  limit: number;
36
36
  /** Optional delay between processing URLs, in milliseconds, or a function returning the delay. */
@@ -86,4 +86,4 @@ export type Crawler = {
86
86
  * console.log('Total processed:', crawler.processed.size);
87
87
  * ```
88
88
  */
89
- export declare function create<T extends any>(options: Options<T>): Crawler;
89
+ export declare function create<T>(options: Options<T>): Crawler;
@@ -1,11 +1,11 @@
1
1
  // src/agnostic/misc/crossenv/detect-runtime/index.ts
2
2
  import { RuntimeName } from "../types.js";
3
3
  function detectRuntime() {
4
- if (typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined") return RuntimeName.NODE;
5
- if (typeof window !== "undefined" && typeof window.document !== "undefined") return RuntimeName.BROWSER;
4
+ if (typeof process?.versions?.node !== "undefined") return RuntimeName.NODE;
5
+ if (typeof window?.document !== "undefined") return RuntimeName.BROWSER;
6
6
  if (typeof Deno !== "undefined") return RuntimeName.DENO;
7
- if (typeof process !== "undefined" && typeof navigator.userAgent === "string" && /ReactNative/.test(navigator.userAgent)) return RuntimeName.REACT_NATIVE;
8
- if (typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.version.electron !== "undefined") return RuntimeName.ELECTRON;
7
+ if (typeof process !== "undefined" && typeof navigator.userAgent === "string" && navigator.userAgent.includes("ReactNative")) return RuntimeName.REACT_NATIVE;
8
+ if (typeof process?.versions !== "undefined" && typeof process.version.electron !== "undefined") return RuntimeName.ELECTRON;
9
9
  if (typeof self !== "undefined" && typeof self.addEventListener === "function" && typeof Headers !== "undefined") return RuntimeName.CLOUDFLARE;
10
10
  if (typeof AWS !== "undefined" && typeof AWS.Lambda !== "undefined") return RuntimeName.AWS_LAMBDA;
11
11
  return null;
@@ -1,4 +1,4 @@
1
- import { MinimalWindow } from '../types.js';
1
+ import { type MinimalWindow } from '../types.js';
2
2
  /**
3
3
  * Checks whether a `window` object exists in the current environment.
4
4
  *
@@ -2,14 +2,14 @@
2
2
  function exists() {
3
3
  return typeof globalThis !== "undefined" && "window" in globalThis;
4
4
  }
5
- var _window = exists() ? globalThis["window"] ?? null : null;
5
+ var _window = exists() ? globalThis.window ?? null : null;
6
6
  function set(customWindow) {
7
7
  _window = customWindow;
8
8
  return customWindow;
9
9
  }
10
10
  function unset() {
11
11
  if (exists()) {
12
- _window = globalThis["window"];
12
+ _window = globalThis.window;
13
13
  } else {
14
14
  _window = null;
15
15
  }