@design-edito/tools 0.2.14 → 0.2.16

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 (423) hide show
  1. package/agnostic/arrays/index.d.ts +5 -5
  2. package/agnostic/arrays/index.js +7 -7
  3. package/agnostic/arrays/is-array-of/index.d.ts +1 -1
  4. package/agnostic/arrays/random-pick/index.js +4 -4
  5. package/agnostic/booleans/index.d.ts +1 -1
  6. package/agnostic/booleans/is-falsy/index.d.ts +1 -1
  7. package/agnostic/colors/channels/index.d.ts +5 -0
  8. package/agnostic/colors/channels/index.js +18 -0
  9. package/agnostic/colors/contrast/index.d.ts +2 -0
  10. package/agnostic/colors/contrast/index.js +13 -0
  11. package/agnostic/colors/convert/index.d.ts +20 -0
  12. package/agnostic/colors/convert/index.js +45 -0
  13. package/agnostic/colors/distance/index.d.ts +2 -0
  14. package/agnostic/colors/distance/index.js +12 -0
  15. package/agnostic/colors/grayscale/index.d.ts +2 -0
  16. package/agnostic/colors/grayscale/index.js +12 -0
  17. package/agnostic/colors/index.d.ts +14 -16
  18. package/agnostic/colors/index.js +95 -27
  19. package/agnostic/colors/invert/index.d.ts +2 -0
  20. package/agnostic/colors/invert/index.js +12 -0
  21. package/agnostic/colors/lerp/index.d.ts +2 -0
  22. package/agnostic/colors/lerp/index.js +12 -0
  23. package/agnostic/colors/luminance/index.d.ts +2 -0
  24. package/agnostic/colors/luminance/index.js +12 -0
  25. package/agnostic/colors/palette/index.d.ts +2 -0
  26. package/agnostic/colors/palette/index.js +14 -0
  27. package/agnostic/colors/rotate/index.d.ts +2 -0
  28. package/agnostic/colors/rotate/index.js +13 -0
  29. package/agnostic/colors/tidy/index.d.ts +2 -0
  30. package/agnostic/colors/tidy/index.js +11 -0
  31. package/agnostic/colors/typechecks/index.d.ts +11 -0
  32. package/agnostic/colors/typechecks/index.js +26 -0
  33. package/agnostic/colors/types.d.ts +82 -0
  34. package/agnostic/css/bem/index.d.ts +2 -2
  35. package/agnostic/css/index.d.ts +3 -3
  36. package/agnostic/css/index.js +6 -6
  37. package/agnostic/css/styles-set/index.js +6 -6
  38. package/agnostic/errors/index.d.ts +2 -2
  39. package/agnostic/errors/index.js +2 -2
  40. package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
  41. package/agnostic/html/hyper-json/cast/index.js +4 -4
  42. package/agnostic/html/hyper-json/index.d.ts +8 -8
  43. package/agnostic/html/hyper-json/index.js +5 -5
  44. package/agnostic/html/hyper-json/method/index.d.ts +2 -2
  45. package/agnostic/html/hyper-json/serialize/index.d.ts +1 -1
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.d.ts +1 -1
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +4 -4
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.d.ts +1 -1
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +4 -4
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.d.ts +1 -1
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +4 -4
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.d.ts +1 -1
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +4 -4
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.d.ts +1 -1
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +4 -4
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.d.ts +1 -1
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +4 -4
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.d.ts +1 -1
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +4 -4
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.d.ts +1 -1
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +4 -4
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.d.ts +1 -1
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +4 -4
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.d.ts +1 -1
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +4 -4
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.d.ts +1 -1
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +4 -4
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.d.ts +1 -1
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +4 -4
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.d.ts +1 -1
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +4 -4
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.d.ts +1 -1
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +4 -4
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.d.ts +1 -1
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +4 -4
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.d.ts +1 -1
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +4 -4
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.d.ts +1 -1
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +4 -4
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.d.ts +1 -1
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +4 -4
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.d.ts +1 -1
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +4 -4
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.d.ts +1 -1
  85. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +4 -4
  86. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.d.ts +1 -1
  87. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +4 -4
  88. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.d.ts +1 -1
  89. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +4 -4
  90. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.d.ts +1 -1
  91. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +4 -4
  92. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.d.ts +1 -1
  93. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +4 -4
  94. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.d.ts +1 -1
  95. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +4 -4
  96. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.d.ts +1 -1
  97. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +4 -4
  98. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +1 -1
  99. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +4 -4
  100. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.d.ts +1 -1
  101. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +4 -4
  102. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.d.ts +1 -1
  103. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +4 -4
  104. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.d.ts +1 -1
  105. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +4 -4
  106. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.d.ts +1 -1
  107. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +4 -4
  108. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.d.ts +1 -1
  109. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +4 -4
  110. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +1 -1
  111. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +4 -4
  112. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.d.ts +1 -1
  113. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +4 -4
  114. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.d.ts +1 -1
  115. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +4 -4
  116. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.d.ts +1 -1
  117. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +4 -4
  118. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.d.ts +1 -1
  119. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +4 -4
  120. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.d.ts +1 -1
  121. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +4 -4
  122. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.d.ts +1 -1
  123. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +4 -4
  124. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +1 -1
  125. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +4 -4
  126. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.d.ts +1 -1
  127. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +4 -4
  128. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.d.ts +1 -1
  129. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +4 -4
  130. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.d.ts +1 -1
  131. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +4 -4
  132. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.d.ts +1 -1
  133. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +4 -4
  134. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.d.ts +1 -1
  135. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +4 -4
  136. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.d.ts +1 -1
  137. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +4 -4
  138. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.d.ts +1 -1
  139. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +4 -4
  140. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.d.ts +1 -1
  141. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +4 -4
  142. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.d.ts +1 -1
  143. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +4 -4
  144. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.d.ts +1 -1
  145. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +4 -4
  146. package/agnostic/html/hyper-json/smart-tags/index.d.ts +1 -1
  147. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.d.ts +1 -1
  148. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.d.ts +1 -1
  149. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.d.ts +1 -1
  150. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +4 -4
  151. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.d.ts +1 -1
  152. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +4 -4
  153. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.d.ts +1 -1
  154. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +4 -4
  155. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.d.ts +1 -1
  156. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +4 -4
  157. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.d.ts +1 -1
  158. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +4 -4
  159. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.d.ts +1 -1
  160. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +4 -4
  161. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.d.ts +1 -1
  162. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.d.ts +1 -1
  163. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +4 -4
  164. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.d.ts +1 -1
  165. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +4 -4
  166. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.d.ts +1 -1
  167. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +4 -4
  168. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.d.ts +1 -1
  169. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +4 -4
  170. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.d.ts +1 -1
  171. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +4 -4
  172. package/agnostic/html/hyper-json/transformer/index.d.ts +4 -4
  173. package/agnostic/html/hyper-json/tree/index.d.ts +1 -1
  174. package/agnostic/html/hyper-json/tree/index.js +4 -4
  175. package/agnostic/html/hyper-json/types/index.d.ts +5 -5
  176. package/agnostic/html/hyper-json/utils/index.d.ts +2 -2
  177. package/agnostic/html/hyper-json/utils/index.js +4 -4
  178. package/agnostic/html/index.d.ts +8 -8
  179. package/agnostic/html/index.js +18 -18
  180. package/agnostic/html/sanitize/index.js +4 -4
  181. package/agnostic/html/selector-to-element/index.js +4 -4
  182. package/agnostic/html/string-to-nodes/index.d.ts +1 -1
  183. package/agnostic/html/string-to-nodes/index.js +5 -5
  184. package/agnostic/index.d.ts +12 -12
  185. package/agnostic/misc/assert/index.d.ts +1 -1
  186. package/agnostic/misc/assert/index.js +3 -3
  187. package/agnostic/misc/crossenv/detect-runtime/index.d.ts +1 -1
  188. package/agnostic/misc/crossenv/index.d.ts +3 -3
  189. package/agnostic/misc/crossenv/window/index.d.ts +1 -1
  190. package/agnostic/misc/index.d.ts +11 -11
  191. package/agnostic/misc/index.js +19 -19
  192. package/agnostic/misc/logs/index.d.ts +2 -2
  193. package/agnostic/misc/lorem-ipsum/index.js +10 -10
  194. package/agnostic/numbers/index.d.ts +5 -5
  195. package/agnostic/numbers/index.js +6 -6
  196. package/agnostic/objects/enums/index.d.ts +1 -1
  197. package/agnostic/objects/index.d.ts +8 -8
  198. package/agnostic/objects/index.js +4 -4
  199. package/agnostic/optim/index.d.ts +2 -2
  200. package/agnostic/random/index.d.ts +3 -3
  201. package/agnostic/random/index.js +2 -2
  202. package/agnostic/strings/index.d.ts +7 -7
  203. package/agnostic/strings/index.js +13 -13
  204. package/agnostic/strings/parse-table/index.d.ts +1 -1
  205. package/agnostic/time/dates/index.d.ts +1 -1
  206. package/agnostic/time/index.d.ts +5 -5
  207. package/agnostic/time/index.js +6 -6
  208. package/chunks/chunk-2EHYEUX4.js +21 -0
  209. package/chunks/chunk-5LK2YLTK.js +21 -0
  210. package/chunks/chunk-65NTXENV.js +157 -0
  211. package/chunks/{chunk-6EJIBLPQ.js → chunk-73FF7HWQ.js} +9 -9
  212. package/chunks/{chunk-HMZMKLMR.js → chunk-AF2NAJS2.js} +2 -2
  213. package/chunks/chunk-ALMK24GK.js +0 -0
  214. package/chunks/chunk-BKIF2ELV.js +47 -0
  215. package/chunks/{chunk-AQBJ6HNB.js → chunk-C7SRAQMW.js} +1 -1
  216. package/chunks/{chunk-ZBBU2P4D.js → chunk-CQEDNACN.js} +2 -2
  217. package/chunks/chunk-D7SXHHU3.js +47 -0
  218. package/chunks/{chunk-GU34O65H.js → chunk-E33DCHHS.js} +15 -15
  219. package/chunks/{chunk-WAMSK4A3.js → chunk-E4FJHD5R.js} +1 -1
  220. package/chunks/chunk-GUBFCOBT.js +98 -0
  221. package/chunks/{chunk-5TRAENM3.js → chunk-I2HTBYNO.js} +1 -1
  222. package/chunks/chunk-IDXUS2IO.js +296 -0
  223. package/chunks/chunk-JHUOMGOX.js +81 -0
  224. package/chunks/{chunk-EDJ3TVNV.js → chunk-KDOMQ4LM.js} +15 -6
  225. package/chunks/chunk-MN4FVOU2.js +28 -0
  226. package/chunks/{chunk-2M33FCDG.js → chunk-O7VFJHQX.js} +11 -5
  227. package/chunks/{chunk-KRDVV6K3.js → chunk-OD2XVVE2.js} +3 -3
  228. package/chunks/{chunk-TIER4TF4.js → chunk-P2H6PV4O.js} +1 -1
  229. package/chunks/chunk-P4YT4RBG.js +51 -0
  230. package/chunks/{chunk-C5BQQUAG.js → chunk-PJSPZGT2.js} +12 -12
  231. package/chunks/{chunk-PLIJVLAB.js → chunk-PX4DPCZM.js} +5 -3
  232. package/chunks/{chunk-DWCRT664.js → chunk-QRS3G3YD.js} +3 -3
  233. package/chunks/{chunk-FQ4UTWMP.js → chunk-QTA7ZEVX.js} +3 -1
  234. package/chunks/chunk-QW34TQCS.js +48 -0
  235. package/chunks/{chunk-HMAK6VAF.js → chunk-RBCZWVQH.js} +11 -5
  236. package/chunks/{chunk-XB3EGDBI.js → chunk-RDQJSWRC.js} +1 -1
  237. package/chunks/{chunk-AI6AGF4I.js → chunk-S7637BQZ.js} +8 -5
  238. package/chunks/{chunk-3TA4CDWX.js → chunk-TQXFC6OS.js} +4 -4
  239. package/chunks/chunk-UG5EMKGN.js +265 -0
  240. package/chunks/chunk-VA67YLZL.js +26 -0
  241. package/chunks/{chunk-DEW6LPOS.js → chunk-VKNQ7MVZ.js} +90 -91
  242. package/chunks/{chunk-3TKBCG7Y.js → chunk-WV5N7ESL.js} +4 -1
  243. package/chunks/{chunk-SKBOSWM2.js → chunk-X5HMM3LD.js} +1 -1
  244. package/chunks/chunk-XAYMIITK.js +103 -0
  245. package/chunks/{chunk-H4LW6FP3.js → chunk-Y4THX4AN.js} +1 -1
  246. package/chunks/chunk-YZVZKBVJ.js +631 -0
  247. package/chunks/chunk-ZJ63OCMA.js +207 -0
  248. package/components/index.d.ts +1 -1
  249. package/node/@aws-s3/index.d.ts +1 -1
  250. package/node/@aws-s3/index.js +7 -7
  251. package/node/@aws-s3/storage/directory/copy-dir/index.d.ts +1 -1
  252. package/node/@aws-s3/storage/directory/index.d.ts +4 -4
  253. package/node/@aws-s3/storage/directory/list/index.d.ts +1 -1
  254. package/node/@aws-s3/storage/directory/move-dir/index.d.ts +1 -1
  255. package/node/@aws-s3/storage/directory/remove-dir/index.d.ts +1 -1
  256. package/node/@aws-s3/storage/file/copy/index.d.ts +1 -1
  257. package/node/@aws-s3/storage/file/download/index.d.ts +1 -1
  258. package/node/@aws-s3/storage/file/exists/index.d.ts +1 -1
  259. package/node/@aws-s3/storage/file/index.d.ts +7 -7
  260. package/node/@aws-s3/storage/file/index.js +10 -10
  261. package/node/@aws-s3/storage/file/move/index.d.ts +1 -1
  262. package/node/@aws-s3/storage/file/remove/index.d.ts +1 -1
  263. package/node/@aws-s3/storage/file/remove/index.js +1 -1
  264. package/node/@aws-s3/storage/file/stat/index.d.ts +1 -1
  265. package/node/@aws-s3/storage/file/upload/index.d.ts +1 -1
  266. package/node/@aws-s3/storage/index.d.ts +2 -2
  267. package/node/@aws-s3/storage/index.js +9 -9
  268. package/node/@design-edito/index.d.ts +1 -1
  269. package/node/@express/@multer/index.d.ts +1 -1
  270. package/node/@express/index.d.ts +1 -1
  271. package/node/@google-cloud/index.d.ts +1 -1
  272. package/node/@google-cloud/index.js +11 -11
  273. package/node/@google-cloud/storage/bucket/get-metadata/index.d.ts +1 -1
  274. package/node/@google-cloud/storage/bucket/index.d.ts +4 -4
  275. package/node/@google-cloud/storage/directory/copy-dir/index.d.ts +1 -1
  276. package/node/@google-cloud/storage/directory/index.d.ts +4 -4
  277. package/node/@google-cloud/storage/directory/list/index.d.ts +1 -1
  278. package/node/@google-cloud/storage/directory/move-dir/index.d.ts +1 -1
  279. package/node/@google-cloud/storage/directory/remove-dir/index.d.ts +1 -1
  280. package/node/@google-cloud/storage/file/copy/index.d.ts +1 -1
  281. package/node/@google-cloud/storage/file/download/index.d.ts +1 -1
  282. package/node/@google-cloud/storage/file/exists/index.d.ts +1 -1
  283. package/node/@google-cloud/storage/file/generate-signed-url/index.d.ts +1 -1
  284. package/node/@google-cloud/storage/file/get-metadata/index.d.ts +1 -1
  285. package/node/@google-cloud/storage/file/get-permissions/index.d.ts +1 -1
  286. package/node/@google-cloud/storage/file/index.d.ts +12 -12
  287. package/node/@google-cloud/storage/file/index.js +16 -16
  288. package/node/@google-cloud/storage/file/move/index.d.ts +1 -1
  289. package/node/@google-cloud/storage/file/remove/index.d.ts +1 -1
  290. package/node/@google-cloud/storage/file/revoke-signed-urls/index.d.ts +4 -4
  291. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +2 -2
  292. package/node/@google-cloud/storage/file/stat/index.d.ts +1 -1
  293. package/node/@google-cloud/storage/file/update-metadata/index.d.ts +1 -1
  294. package/node/@google-cloud/storage/file/upload/index.d.ts +1 -1
  295. package/node/@google-cloud/storage/index.d.ts +3 -3
  296. package/node/@google-cloud/storage/index.js +13 -13
  297. package/node/cloud-storage/index.d.ts +2 -2
  298. package/node/cloud-storage/index.js +23 -23
  299. package/node/cloud-storage/operations/copy-dir/index.d.ts +6 -6
  300. package/node/cloud-storage/operations/copy-file/index.d.ts +6 -6
  301. package/node/cloud-storage/operations/download-file/index.d.ts +6 -6
  302. package/node/cloud-storage/operations/exists-file/index.d.ts +4 -4
  303. package/node/cloud-storage/operations/index.d.ts +11 -11
  304. package/node/cloud-storage/operations/index.js +30 -30
  305. package/node/cloud-storage/operations/list-dir/index.d.ts +4 -4
  306. package/node/cloud-storage/operations/move-dir/index.d.ts +6 -6
  307. package/node/cloud-storage/operations/move-file/index.d.ts +6 -6
  308. package/node/cloud-storage/operations/remove-dir/index.d.ts +6 -6
  309. package/node/cloud-storage/operations/remove-file/index.d.ts +6 -6
  310. package/node/cloud-storage/operations/remove-file/index.js +2 -2
  311. package/node/cloud-storage/operations/stat-file/index.d.ts +6 -6
  312. package/node/cloud-storage/operations/upload-file/index.d.ts +6 -6
  313. package/node/encryption/@aes-256-gcm/buffer/index.d.ts +1 -1
  314. package/node/encryption/@aes-256-gcm/index.d.ts +2 -2
  315. package/node/encryption/@aes-256-gcm/uint8-array/index.d.ts +1 -1
  316. package/node/encryption/index.d.ts +2 -2
  317. package/node/encryption/index.js +3 -3
  318. package/node/files/index.d.ts +3 -3
  319. package/node/ftps/directory/copy-dir/index.d.ts +1 -1
  320. package/node/ftps/directory/index.d.ts +4 -4
  321. package/node/ftps/directory/list/index.d.ts +1 -1
  322. package/node/ftps/directory/move-dir/index.d.ts +1 -1
  323. package/node/ftps/directory/remove-dir/index.d.ts +1 -1
  324. package/node/ftps/file/copy/index.d.ts +1 -1
  325. package/node/ftps/file/download/index.d.ts +1 -1
  326. package/node/ftps/file/exists/index.d.ts +1 -1
  327. package/node/ftps/file/index.d.ts +7 -7
  328. package/node/ftps/file/index.js +9 -9
  329. package/node/ftps/file/move/index.d.ts +1 -1
  330. package/node/ftps/file/remove/index.d.ts +1 -1
  331. package/node/ftps/file/stat/index.d.ts +1 -1
  332. package/node/ftps/file/upload/index.d.ts +1 -1
  333. package/node/ftps/index.d.ts +2 -2
  334. package/node/ftps/index.js +7 -7
  335. package/node/images/create/index.d.ts +3 -0
  336. package/node/images/create/index.js +23 -0
  337. package/node/images/format/index.d.ts +18 -52
  338. package/node/images/format/index.js +30 -4
  339. package/node/images/index.d.ts +6 -4
  340. package/node/images/index.js +41 -21
  341. package/node/images/metadata/index.d.ts +3 -0
  342. package/node/images/metadata/index.js +23 -0
  343. package/node/images/transform/index.d.ts +3 -98
  344. package/node/images/transform/index.js +27 -16
  345. package/node/images/transform/operations/blur/index.d.ts +2 -4
  346. package/node/images/transform/operations/brighten/index.d.ts +2 -4
  347. package/node/images/transform/operations/extend/index.d.ts +2 -9
  348. package/node/images/transform/operations/extend/index.js +17 -2
  349. package/node/images/transform/operations/extract/index.d.ts +2 -7
  350. package/node/images/transform/operations/flatten/index.d.ts +2 -4
  351. package/node/images/transform/operations/flatten/index.js +17 -2
  352. package/node/images/transform/operations/hue/index.d.ts +2 -4
  353. package/node/images/transform/operations/level/index.d.ts +2 -5
  354. package/node/images/transform/operations/lighten/index.d.ts +2 -4
  355. package/node/images/transform/operations/normalize/index.d.ts +2 -5
  356. package/node/images/transform/operations/overlay/index.d.ts +5 -0
  357. package/node/images/transform/operations/overlay/index.js +27 -0
  358. package/node/images/transform/operations/resize/index.d.ts +2 -12
  359. package/node/images/transform/operations/resize/index.js +17 -2
  360. package/node/images/transform/operations/rotate/index.d.ts +2 -5
  361. package/node/images/transform/operations/rotate/index.js +17 -2
  362. package/node/images/transform/operations/saturate/index.d.ts +2 -4
  363. package/node/images/transform/operations/saturate/index.js +1 -1
  364. package/node/images/types.d.ts +252 -0
  365. package/node/images/utils/index.d.ts +7 -0
  366. package/node/images/utils/index.js +28 -0
  367. package/node/index.d.ts +11 -11
  368. package/node/process/index.d.ts +1 -1
  369. package/node/sftp/directory/copy-dir/index.d.ts +1 -1
  370. package/node/sftp/directory/index.d.ts +4 -4
  371. package/node/sftp/directory/list/index.d.ts +1 -1
  372. package/node/sftp/directory/move-dir/index.d.ts +1 -1
  373. package/node/sftp/directory/remove-dir/index.d.ts +1 -1
  374. package/node/sftp/file/copy/index.d.ts +1 -1
  375. package/node/sftp/file/download/index.d.ts +1 -1
  376. package/node/sftp/file/exists/index.d.ts +1 -1
  377. package/node/sftp/file/index.d.ts +7 -7
  378. package/node/sftp/file/index.js +9 -9
  379. package/node/sftp/file/move/index.d.ts +1 -1
  380. package/node/sftp/file/remove/index.d.ts +1 -1
  381. package/node/sftp/file/stat/index.d.ts +1 -1
  382. package/node/sftp/file/upload/index.d.ts +1 -1
  383. package/node/sftp/index.d.ts +2 -2
  384. package/node/sftp/index.js +7 -7
  385. package/package.json +1 -1
  386. package/shared/errors/index.d.ts +1 -1
  387. package/agnostic/colors/complement-color/index.d.ts +0 -1
  388. package/agnostic/colors/complement-color/index.js +0 -7
  389. package/agnostic/colors/hex-to-rgb/index.d.ts +0 -1
  390. package/agnostic/colors/hex-to-rgb/index.js +0 -7
  391. package/agnostic/colors/hsl-to-rgb/index.d.ts +0 -1
  392. package/agnostic/colors/hsl-to-rgb/index.js +0 -7
  393. package/agnostic/colors/lighten-color/index.d.ts +0 -2
  394. package/agnostic/colors/lighten-color/index.js +0 -11
  395. package/agnostic/colors/rgb-to-hex/index.d.ts +0 -1
  396. package/agnostic/colors/rgb-to-hex/index.js +0 -7
  397. package/agnostic/colors/rgb-to-hsl/index.d.ts +0 -1
  398. package/agnostic/colors/rgb-to-hsl/index.js +0 -7
  399. package/agnostic/colors/saturate-color/index.d.ts +0 -2
  400. package/agnostic/colors/saturate-color/index.js +0 -11
  401. package/chunks/chunk-2POD3TAX.js +0 -11
  402. package/chunks/chunk-2TJCB6IM.js +0 -12
  403. package/chunks/chunk-7EDDWSWS.js +0 -123
  404. package/chunks/chunk-FAXNZG5C.js +0 -10
  405. package/chunks/chunk-IFQA5PWI.js +0 -112
  406. package/chunks/chunk-MB7HWF22.js +0 -23
  407. package/chunks/chunk-MFYNJMVM.js +0 -18
  408. package/chunks/chunk-NYVARFI7.js +0 -20
  409. package/chunks/chunk-QLC3A6PC.js +0 -17
  410. package/chunks/chunk-U57Q62IN.js +0 -23
  411. package/chunks/chunk-YVLJKJV2.js +0 -17
  412. package/node/images/get-metadata/index.d.ts +0 -4
  413. package/node/images/get-metadata/index.js +0 -7
  414. package/node/images/transform/operations/composite/index.d.ts +0 -7
  415. package/node/images/transform/operations/composite/index.js +0 -12
  416. package/node/images/transform/utils/index.d.ts +0 -2
  417. package/node/images/transform/utils/index.js +0 -8
  418. package/chunks/{chunk-WH6BPDAC.js → chunk-2KT7AKRW.js} +3 -3
  419. package/chunks/{chunk-S5MTHWQ7.js → chunk-6QFELK4E.js} +8 -8
  420. package/chunks/{chunk-LEYJ4I5W.js → chunk-EXPVRDPR.js} +8 -8
  421. package/chunks/{chunk-ZPDKBMUH.js → chunk-LSZVKXDZ.js} +3 -3
  422. package/chunks/{chunk-NRABY36Z.js → chunk-MLLP7YSK.js} +9 -9
  423. package/chunks/{chunk-OVG5RGI3.js → chunk-S32K7POB.js} +4 -4
@@ -0,0 +1,296 @@
1
+ import {
2
+ zod_default
3
+ } from "./chunk-DZ2T5DTY.js";
4
+ import {
5
+ toSharpColor,
6
+ toSharpInstance
7
+ } from "./chunk-BKIF2ELV.js";
8
+ import {
9
+ Outcome
10
+ } from "./chunk-JMU5PDBD.js";
11
+ import {
12
+ clamp
13
+ } from "./chunk-OSAXBA7G.js";
14
+ import {
15
+ isColor
16
+ } from "./chunk-UG5EMKGN.js";
17
+ import {
18
+ __export
19
+ } from "./chunk-WSFCRVEQ.js";
20
+
21
+ // src/node/images/format/index.ts
22
+ var format_exports = {};
23
+ __export(format_exports, {
24
+ format: () => format,
25
+ isFormatAvifOptions: () => isFormatAvifOptions,
26
+ isFormatCommonOptions: () => isFormatCommonOptions,
27
+ isFormatHeifOptions: () => isFormatHeifOptions,
28
+ isFormatJpgOptions: () => isFormatJpgOptions,
29
+ isFormatOptions: () => isFormatOptions,
30
+ isFormatPngOptions: () => isFormatPngOptions,
31
+ isFormatTiffOptions: () => isFormatTiffOptions,
32
+ isFormatWebpOptions: () => isFormatWebpOptions,
33
+ toAvif: () => toAvif,
34
+ toHeif: () => toHeif,
35
+ toHeight: () => toHeight,
36
+ toJpg: () => toJpg,
37
+ toPng: () => toPng,
38
+ toSharpAvifOptions: () => toSharpAvifOptions,
39
+ toSharpHeifOptions: () => toSharpHeifOptions,
40
+ toSharpJpegOptions: () => toSharpJpegOptions,
41
+ toSharpPngOptions: () => toSharpPngOptions,
42
+ toSharpResizeOptions: () => toSharpResizeOptions,
43
+ toSharpTiffOptions: () => toSharpTiffOptions,
44
+ toSharpWebpOptions: () => toSharpWebpOptions,
45
+ toTiff: () => toTiff,
46
+ toWebp: () => toWebp,
47
+ toWidth: () => toWidth
48
+ });
49
+ var formatCommonOptionsSchema = zod_default.object({
50
+ width: zod_default.number().optional(),
51
+ height: zod_default.number().optional(),
52
+ fit: zod_default.enum(["contain", "cover", "fill", "inside", "outside"]).optional(),
53
+ position: zod_default.union([zod_default.number(), zod_default.string()]).optional(),
54
+ background: zod_default.custom(isColor).optional(),
55
+ kernel: zod_default.enum(["nearest", "cubic", "mitchell", "lanczos2", "lanczos3", "mks2013", "mks2021"]).optional(),
56
+ withoutEnlargement: zod_default.boolean().optional(),
57
+ withoutReduction: zod_default.boolean().optional(),
58
+ fastShrinkOnLoad: zod_default.boolean().optional()
59
+ });
60
+ var formatJpgOptionsSchema = formatCommonOptionsSchema.extend({
61
+ type: zod_default.union([zod_default.literal("jpg"), zod_default.literal("jpeg")]),
62
+ quality: zod_default.number().optional(),
63
+ force: zod_default.boolean().optional(),
64
+ progressive: zod_default.boolean().optional(),
65
+ chromaSubsampling: zod_default.string().optional(),
66
+ trellisQuantisation: zod_default.boolean().optional(),
67
+ overshootDeringing: zod_default.boolean().optional(),
68
+ optimizeScans: zod_default.boolean().optional(),
69
+ optimizeCoding: zod_default.boolean().optional(),
70
+ quantizationTable: zod_default.number().optional(),
71
+ mozjpeg: zod_default.boolean().optional()
72
+ });
73
+ var formatPngOptionsSchema = formatCommonOptionsSchema.extend({
74
+ type: zod_default.literal("png"),
75
+ quality: zod_default.number().optional(),
76
+ force: zod_default.boolean().optional(),
77
+ progressive: zod_default.boolean().optional(),
78
+ compressionLevel: zod_default.number().min(0).max(9).optional(),
79
+ adaptiveFiltering: zod_default.boolean().optional(),
80
+ effort: zod_default.number().min(1).max(10).optional(),
81
+ palette: zod_default.boolean().optional(),
82
+ colors: zod_default.number().min(1).max(256).optional(),
83
+ dither: zod_default.number().min(0).max(1).optional()
84
+ });
85
+ var formatWebpOptionsSchema = formatCommonOptionsSchema.extend({
86
+ type: zod_default.literal("webp"),
87
+ quality: zod_default.number().optional(),
88
+ force: zod_default.boolean().optional(),
89
+ alphaQuality: zod_default.number().optional(),
90
+ lossless: zod_default.boolean().optional(),
91
+ nearLossless: zod_default.boolean().optional(),
92
+ smartSubsample: zod_default.boolean().optional(),
93
+ smartDeblock: zod_default.boolean().optional(),
94
+ effort: zod_default.number().optional(),
95
+ minSize: zod_default.boolean().optional(),
96
+ mixed: zod_default.boolean().optional(),
97
+ preset: zod_default.enum(["default", "picture", "photo", "drawing", "icon", "text"]).optional(),
98
+ loop: zod_default.number().optional(),
99
+ delay: zod_default.union([zod_default.number(), zod_default.array(zod_default.number())]).optional()
100
+ });
101
+ var formatAvifOptionsSchema = formatCommonOptionsSchema.extend({
102
+ type: zod_default.literal("avif"),
103
+ quality: zod_default.number().optional(),
104
+ force: zod_default.boolean().optional(),
105
+ lossless: zod_default.boolean().optional(),
106
+ effort: zod_default.number().optional(),
107
+ chromaSubsampling: zod_default.string().optional(),
108
+ bitdepth: zod_default.union([zod_default.literal(8), zod_default.literal(10), zod_default.literal(12)]).optional()
109
+ });
110
+ var formatTiffOptionsSchema = formatCommonOptionsSchema.extend({
111
+ type: zod_default.literal("tiff"),
112
+ quality: zod_default.number().optional(),
113
+ compression: zod_default.enum(["none", "jpeg", "deflate", "packbits", "ccittfax4", "lzw", "webp", "zstd", "jp2k"]).optional(),
114
+ force: zod_default.boolean().optional(),
115
+ predictor: zod_default.enum(["none", "horizontal", "float"]).optional(),
116
+ pyramid: zod_default.boolean().optional(),
117
+ tile: zod_default.boolean().optional(),
118
+ tileWidth: zod_default.number().optional(),
119
+ tileHeight: zod_default.number().optional(),
120
+ xres: zod_default.number().optional(),
121
+ yres: zod_default.number().optional(),
122
+ bitdepth: zod_default.union([zod_default.literal(1), zod_default.literal(2), zod_default.literal(4), zod_default.literal(8)]).optional(),
123
+ miniswhite: zod_default.boolean().optional(),
124
+ resolutionUnit: zod_default.enum(["inch", "cm"]).optional()
125
+ });
126
+ var formatHeifOptionsSchema = formatCommonOptionsSchema.extend({
127
+ type: zod_default.literal("heif"),
128
+ quality: zod_default.number().optional(),
129
+ force: zod_default.boolean().optional(),
130
+ compression: zod_default.enum(["av1", "hevc"]).optional(),
131
+ lossless: zod_default.boolean().optional(),
132
+ effort: zod_default.number().optional(),
133
+ chromaSubsampling: zod_default.string().optional(),
134
+ bitdepth: zod_default.union([zod_default.literal(8), zod_default.literal(10), zod_default.literal(12)]).optional()
135
+ });
136
+ var formatKeepOptionsSchema = formatCommonOptionsSchema;
137
+ var formatOptionsSchema = zod_default.union([
138
+ formatJpgOptionsSchema,
139
+ formatPngOptionsSchema,
140
+ formatWebpOptionsSchema,
141
+ formatAvifOptionsSchema,
142
+ formatTiffOptionsSchema,
143
+ formatHeifOptionsSchema,
144
+ formatKeepOptionsSchema
145
+ ]);
146
+ var isFormatCommonOptions = (options) => formatCommonOptionsSchema.safeParse(options).success;
147
+ var isFormatJpgOptions = (options) => formatJpgOptionsSchema.safeParse(options).success;
148
+ var isFormatPngOptions = (options) => formatPngOptionsSchema.safeParse(options).success;
149
+ var isFormatWebpOptions = (options) => formatWebpOptionsSchema.safeParse(options).success;
150
+ var isFormatAvifOptions = (options) => formatAvifOptionsSchema.safeParse(options).success;
151
+ var isFormatTiffOptions = (options) => formatTiffOptionsSchema.safeParse(options).success;
152
+ var isFormatHeifOptions = (options) => formatHeifOptionsSchema.safeParse(options).success;
153
+ var isFormatOptions = (options) => formatOptionsSchema.safeParse(options).success;
154
+ var toSharpResizeOptions = (options) => {
155
+ return {
156
+ width: options.width,
157
+ height: options.height,
158
+ fit: options.fit,
159
+ position: options.position,
160
+ background: options.background ? toSharpColor(options.background) : void 0,
161
+ kernel: options.kernel,
162
+ withoutEnlargement: options.withoutEnlargement,
163
+ withoutReduction: options.withoutReduction,
164
+ fastShrinkOnLoad: options.fastShrinkOnLoad
165
+ };
166
+ };
167
+ var toSharpJpegOptions = (options) => {
168
+ return {
169
+ quality: options.quality,
170
+ force: options.force,
171
+ progressive: options.progressive,
172
+ chromaSubsampling: options.chromaSubsampling,
173
+ trellisQuantisation: options.trellisQuantisation,
174
+ overshootDeringing: options.overshootDeringing,
175
+ optimizeScans: options.optimizeScans,
176
+ optimizeCoding: options.optimizeCoding,
177
+ quantizationTable: options.quantizationTable,
178
+ mozjpeg: options.mozjpeg
179
+ };
180
+ };
181
+ var toSharpPngOptions = (options) => {
182
+ return {
183
+ quality: options.quality,
184
+ force: options.force,
185
+ progressive: options.progressive,
186
+ compressionLevel: options.compressionLevel,
187
+ adaptiveFiltering: options.adaptiveFiltering,
188
+ effort: options.effort,
189
+ palette: options.palette,
190
+ colors: options.colors,
191
+ dither: options.dither
192
+ };
193
+ };
194
+ var toSharpWebpOptions = (options) => {
195
+ return {
196
+ quality: options.quality,
197
+ loop: options.loop,
198
+ delay: options.delay,
199
+ force: options.force,
200
+ alphaQuality: options.alphaQuality,
201
+ lossless: options.lossless,
202
+ nearLossless: options.nearLossless,
203
+ smartSubsample: options.smartSubsample,
204
+ smartDeblock: options.smartDeblock,
205
+ effort: options.effort,
206
+ minSize: options.minSize,
207
+ mixed: options.mixed,
208
+ preset: options.preset
209
+ };
210
+ };
211
+ var toSharpAvifOptions = (options) => {
212
+ return {
213
+ force: options.force,
214
+ quality: options.quality,
215
+ lossless: options.lossless,
216
+ effort: options.effort,
217
+ chromaSubsampling: options.chromaSubsampling,
218
+ bitdepth: options.bitdepth
219
+ };
220
+ };
221
+ var toSharpTiffOptions = (options) => {
222
+ return {
223
+ force: options.force,
224
+ quality: options.quality,
225
+ compression: options.compression,
226
+ predictor: options.predictor,
227
+ pyramid: options.pyramid,
228
+ tile: options.tile,
229
+ tileWidth: options.tileWidth,
230
+ tileHeight: options.tileHeight,
231
+ xres: options.xres,
232
+ yres: options.yres,
233
+ bitdepth: options.bitdepth,
234
+ miniswhite: options.miniswhite,
235
+ resolutionUnit: options.resolutionUnit
236
+ };
237
+ };
238
+ var toSharpHeifOptions = (options) => {
239
+ return {
240
+ force: options.force,
241
+ quality: options.quality,
242
+ compression: options.compression,
243
+ lossless: options.lossless,
244
+ effort: options.effort,
245
+ chromaSubsampling: options.chromaSubsampling,
246
+ bitdepth: options.bitdepth
247
+ };
248
+ };
249
+ async function format(input, options) {
250
+ const sharpInstance = await toSharpInstance(input);
251
+ const resizeOptions = toSharpResizeOptions(options);
252
+ const resizedInstance = sharpInstance.resize(resizeOptions);
253
+ if (isFormatJpgOptions(options)) return Outcome.makeSuccess(await resizedInstance.jpeg(toSharpJpegOptions(options)).toBuffer());
254
+ if (isFormatPngOptions(options)) return Outcome.makeSuccess(await resizedInstance.png(toSharpPngOptions(options)).toBuffer());
255
+ if (isFormatWebpOptions(options)) return Outcome.makeSuccess(await resizedInstance.webp(toSharpWebpOptions(options)).toBuffer());
256
+ if (isFormatAvifOptions(options)) return Outcome.makeSuccess(await resizedInstance.avif(toSharpAvifOptions(options)).toBuffer());
257
+ if (isFormatTiffOptions(options)) return Outcome.makeSuccess(await resizedInstance.tiff(toSharpTiffOptions(options)).toBuffer());
258
+ if (isFormatHeifOptions(options)) return Outcome.makeSuccess(await resizedInstance.heif(toSharpHeifOptions(options)).toBuffer());
259
+ return Outcome.makeSuccess(await resizedInstance.toBuffer());
260
+ }
261
+ var toWidth = async (input, width) => (await toSharpInstance(input)).resize({ width }).toBuffer();
262
+ var toHeight = async (input, height) => (await toSharpInstance(input)).resize({ height }).toBuffer();
263
+ var toJpg = async (input, quality) => (await toSharpInstance(input)).jpeg({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
264
+ var toPng = async (input, quality, compressionLevel) => (await toSharpInstance(input)).png({ quality: clamp(quality ?? 100, 1, 100), compressionLevel }).toBuffer();
265
+ var toWebp = async (input, quality) => (await toSharpInstance(input)).webp({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
266
+ var toAvif = async (input, quality) => (await toSharpInstance(input)).avif({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
267
+ var toTiff = async (input, quality, compression) => (await toSharpInstance(input)).tiff({ quality: clamp(quality ?? 100, 1, 100), compression }).toBuffer();
268
+ var toHeif = async (input, quality) => (await toSharpInstance(input)).heif({ quality: clamp(quality ?? 100, 1, 100) }).toBuffer();
269
+
270
+ export {
271
+ isFormatCommonOptions,
272
+ isFormatJpgOptions,
273
+ isFormatPngOptions,
274
+ isFormatWebpOptions,
275
+ isFormatAvifOptions,
276
+ isFormatTiffOptions,
277
+ isFormatHeifOptions,
278
+ isFormatOptions,
279
+ toSharpResizeOptions,
280
+ toSharpJpegOptions,
281
+ toSharpPngOptions,
282
+ toSharpWebpOptions,
283
+ toSharpAvifOptions,
284
+ toSharpTiffOptions,
285
+ toSharpHeifOptions,
286
+ format,
287
+ toWidth,
288
+ toHeight,
289
+ toJpg,
290
+ toPng,
291
+ toWebp,
292
+ toAvif,
293
+ toTiff,
294
+ toHeif,
295
+ format_exports
296
+ };
@@ -0,0 +1,81 @@
1
+ import {
2
+ zod_default
3
+ } from "./chunk-DZ2T5DTY.js";
4
+ import {
5
+ isDuckTypedSharpInstance
6
+ } from "./chunk-BKIF2ELV.js";
7
+ import {
8
+ Outcome
9
+ } from "./chunk-JMU5PDBD.js";
10
+
11
+ // src/node/images/transform/operations/overlay/index.ts
12
+ function isOverlayOperationParams(obj) {
13
+ const schema = zod_default.object({
14
+ input: zod_default.custom(isDuckTypedSharpInstance),
15
+ top: zod_default.number().optional(),
16
+ left: zod_default.number().optional(),
17
+ tile: zod_default.boolean().optional(),
18
+ premultiplied: zod_default.boolean().optional(),
19
+ density: zod_default.number().optional(),
20
+ animated: zod_default.boolean().optional(),
21
+ autoOrient: zod_default.boolean().optional(),
22
+ ignoreIcc: zod_default.boolean().optional(),
23
+ pages: zod_default.number().optional(),
24
+ page: zod_default.number().optional(),
25
+ blend: zod_default.enum([
26
+ "clear",
27
+ "source",
28
+ "over",
29
+ "in",
30
+ "out",
31
+ "atop",
32
+ "dest",
33
+ "dest-over",
34
+ "dest-in",
35
+ "dest-out",
36
+ "dest-atop",
37
+ "xor",
38
+ "add",
39
+ "saturate",
40
+ "multiply",
41
+ "screen",
42
+ "overlay",
43
+ "darken",
44
+ "lighten",
45
+ "color-dodge",
46
+ "colour-dodge",
47
+ "color-burn",
48
+ "colour-burn",
49
+ "hard-light",
50
+ "soft-light",
51
+ "difference",
52
+ "exclusion"
53
+ ]).optional(),
54
+ gravity: zod_default.enum([
55
+ "north",
56
+ "northeast",
57
+ "southeast",
58
+ "south",
59
+ "southwest",
60
+ "west",
61
+ "northwest",
62
+ "east",
63
+ "center",
64
+ "centre"
65
+ ]).optional()
66
+ });
67
+ const result = schema.safeParse(obj);
68
+ if (!result.success) return Outcome.makeFailure(result.error.message);
69
+ return Outcome.makeSuccess(result.data);
70
+ }
71
+ async function overlay(sharpInstance, params) {
72
+ return sharpInstance.composite([{
73
+ ...params,
74
+ input: await params.input.toBuffer()
75
+ }]);
76
+ }
77
+
78
+ export {
79
+ isOverlayOperationParams,
80
+ overlay
81
+ };
@@ -1,12 +1,15 @@
1
- import {
2
- isSharpColor
3
- } from "./chunk-MFYNJMVM.js";
4
1
  import {
5
2
  zod_default
6
3
  } from "./chunk-DZ2T5DTY.js";
4
+ import {
5
+ toSharpColor
6
+ } from "./chunk-BKIF2ELV.js";
7
7
  import {
8
8
  Outcome
9
9
  } from "./chunk-JMU5PDBD.js";
10
+ import {
11
+ isColor
12
+ } from "./chunk-UG5EMKGN.js";
10
13
 
11
14
  // src/node/images/transform/operations/resize/index.ts
12
15
  function isResizeOperationParams(obj) {
@@ -24,13 +27,16 @@ function isResizeOperationParams(obj) {
24
27
  zod_default.number(),
25
28
  zod_default.string()
26
29
  ]).optional(),
27
- background: zod_default.custom((val) => isSharpColor(val)).optional(),
30
+ background: zod_default.custom(isColor).optional(),
28
31
  kernel: zod_default.enum([
29
32
  "nearest",
30
33
  "cubic",
34
+ "linear",
31
35
  "mitchell",
32
36
  "lanczos2",
33
- "lanczos3"
37
+ "lanczos3",
38
+ "mks2013",
39
+ "mks2021"
34
40
  ]).optional(),
35
41
  withoutEnlargement: zod_default.boolean().optional(),
36
42
  withoutReduction: zod_default.boolean().optional(),
@@ -41,7 +47,10 @@ function isResizeOperationParams(obj) {
41
47
  return Outcome.makeSuccess(result.data);
42
48
  }
43
49
  async function resize(sharpInstance, params) {
44
- return sharpInstance.resize(params);
50
+ return sharpInstance.resize({
51
+ ...params,
52
+ background: params.background !== void 0 ? toSharpColor(params.background) : void 0
53
+ });
45
54
  }
46
55
 
47
56
  export {
@@ -0,0 +1,28 @@
1
+ import {
2
+ luminance
3
+ } from "./chunk-VA67YLZL.js";
4
+ import {
5
+ toRgb
6
+ } from "./chunk-YZVZKBVJ.js";
7
+
8
+ // src/agnostic/colors/contrast/index.ts
9
+ function contrastWcag(c1, c2) {
10
+ const L1 = luminance(c1, "rgb");
11
+ const L2 = luminance(c2, "rgb");
12
+ const lighter = Math.max(L1, L2);
13
+ const darker = Math.min(L1, L2);
14
+ const numerator = lighter + 0.05;
15
+ const denominator = darker + 0.05;
16
+ const ratio = numerator / denominator;
17
+ return ratio;
18
+ }
19
+ function contrast(c1, c2, method = "wcag") {
20
+ switch (method) {
21
+ case "wcag":
22
+ return contrastWcag(toRgb(c1), toRgb(c2));
23
+ }
24
+ }
25
+
26
+ export {
27
+ contrast
28
+ };
@@ -1,24 +1,30 @@
1
- import {
2
- isSharpColor
3
- } from "./chunk-MFYNJMVM.js";
4
1
  import {
5
2
  zod_default
6
3
  } from "./chunk-DZ2T5DTY.js";
4
+ import {
5
+ toSharpColor
6
+ } from "./chunk-BKIF2ELV.js";
7
7
  import {
8
8
  Outcome
9
9
  } from "./chunk-JMU5PDBD.js";
10
+ import {
11
+ isColor
12
+ } from "./chunk-UG5EMKGN.js";
10
13
 
11
14
  // src/node/images/transform/operations/flatten/index.ts
12
15
  function isFlattenOperationParams(obj) {
13
16
  const schema = zod_default.object({
14
- background: zod_default.custom((val) => isSharpColor(val)).optional()
17
+ background: zod_default.custom(isColor).optional()
15
18
  });
16
19
  const result = schema.safeParse(obj);
17
20
  if (!result.success) return Outcome.makeFailure(result.error.message);
18
21
  return Outcome.makeSuccess(result.data);
19
22
  }
20
23
  async function flatten(sharpInstance, params) {
21
- return sharpInstance.flatten(params);
24
+ const inputBg = params.background;
25
+ const rgbBackground = inputBg !== void 0 ? toSharpColor(inputBg) : void 0;
26
+ const background = rgbBackground !== void 0 ? rgbBackground : void 0;
27
+ return sharpInstance.flatten({ background });
22
28
  }
23
29
 
24
30
  export {
@@ -1,9 +1,9 @@
1
+ import {
2
+ file_exports
3
+ } from "./chunk-73FF7HWQ.js";
1
4
  import {
2
5
  directory_exports
3
6
  } from "./chunk-ZBAKY6DB.js";
4
- import {
5
- file_exports
6
- } from "./chunk-6EJIBLPQ.js";
7
7
  import {
8
8
  __export
9
9
  } from "./chunk-WSFCRVEQ.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-FR5H2OCV.js";
4
4
  import {
5
5
  Errors
6
- } from "./chunk-WH6BPDAC.js";
6
+ } from "./chunk-2KT7AKRW.js";
7
7
 
8
8
  // src/shared/errors/index.ts
9
9
  var register = Errors.Register.from({
@@ -0,0 +1,51 @@
1
+ import {
2
+ toLab
3
+ } from "./chunk-YZVZKBVJ.js";
4
+
5
+ // src/agnostic/colors/distance/index.ts
6
+ function distanceCiede2000(c1, c2) {
7
+ const deg2rad = (deg) => Math.PI / 180 * deg;
8
+ const rad2deg = (rad) => 180 / Math.PI * rad;
9
+ const C1 = Math.sqrt(c1.a * c1.a + c1.b * c1.b);
10
+ const C2 = Math.sqrt(c2.a * c2.a + c2.b * c2.b);
11
+ const meanC = (C1 + C2) / 2;
12
+ const meanC7 = Math.pow(meanC, 7);
13
+ const G = 0.5 * (1 - Math.sqrt(meanC7 / (meanC7 + Math.pow(25, 7))));
14
+ const a1p = (1 + G) * c1.a;
15
+ const a2p = (1 + G) * c2.a;
16
+ const C1p = Math.sqrt(a1p * a1p + c1.b * c1.b);
17
+ const C2p = Math.sqrt(a2p * a2p + c2.b * c2.b);
18
+ const h1p = Math.atan2(c1.b, a1p);
19
+ const h2p = Math.atan2(c2.b, a2p);
20
+ const dLp = c2.l - c1.l;
21
+ const dCp = C2p - C1p;
22
+ let dhp = h2p - h1p;
23
+ if (dhp > Math.PI) dhp -= 2 * Math.PI;
24
+ if (dhp < -Math.PI) dhp += 2 * Math.PI;
25
+ const dHp = 2 * Math.sqrt(C1p * C2p) * Math.sin(dhp / 2);
26
+ const meanLp = (c1.l + c2.l) / 2;
27
+ let meanHp = (h1p + h2p) / 2;
28
+ if (Math.abs(h1p - h2p) > Math.PI) {
29
+ meanHp += Math.PI;
30
+ }
31
+ const T = 1 - 0.17 * Math.cos(meanHp - deg2rad(30)) + 0.24 * Math.cos(2 * meanHp) + 0.32 * Math.cos(3 * meanHp + deg2rad(6)) - 0.2 * Math.cos(4 * meanHp - deg2rad(63));
32
+ const SL = 1 + 0.015 * (meanLp - 50) * (meanLp - 50) / Math.sqrt(20 + (meanLp - 50) * (meanLp - 50));
33
+ const SC = 1 + 0.045 * meanC;
34
+ const SH = 1 + 0.015 * meanC * T;
35
+ const deltaTheta = deg2rad(60) * Math.exp(-((rad2deg(meanHp) - 275) / 25) * ((rad2deg(meanHp) - 275) / 25));
36
+ const RC = Math.sqrt(Math.pow(meanC, 7) / (Math.pow(meanC, 7) + Math.pow(25, 7)));
37
+ const RT = -2 * RC * Math.sin(deltaTheta);
38
+ return Math.sqrt(
39
+ dLp / SL * (dLp / SL) + dCp / SC * (dCp / SC) + dHp / SH * (dHp / SH) + RT * (dCp / SC) * (dHp / SH)
40
+ );
41
+ }
42
+ function distance(c1, c2, method = "ciede2000") {
43
+ switch (method) {
44
+ case "ciede2000":
45
+ return distanceCiede2000(toLab(c1), toLab(c2));
46
+ }
47
+ }
48
+
49
+ export {
50
+ distance
51
+ };
@@ -1,3 +1,12 @@
1
+ import {
2
+ upload_file_exports
3
+ } from "./chunk-NOLQR5RW.js";
4
+ import {
5
+ download_file_exports
6
+ } from "./chunk-EOTOFHUR.js";
7
+ import {
8
+ exists_file_exports
9
+ } from "./chunk-24ZUWYIR.js";
1
10
  import {
2
11
  list_dir_exports
3
12
  } from "./chunk-DPQRXSZH.js";
@@ -7,15 +16,12 @@ import {
7
16
  import {
8
17
  remove_dir_exports
9
18
  } from "./chunk-CA3UPHYO.js";
10
- import {
11
- download_file_exports
12
- } from "./chunk-EOTOFHUR.js";
13
19
  import {
14
20
  remove_file_exports
15
- } from "./chunk-H4LW6FP3.js";
21
+ } from "./chunk-Y4THX4AN.js";
16
22
  import {
17
- upload_file_exports
18
- } from "./chunk-NOLQR5RW.js";
23
+ move_file_exports
24
+ } from "./chunk-646R6BQZ.js";
19
25
  import {
20
26
  stat_file_exports
21
27
  } from "./chunk-UK4HNSEJ.js";
@@ -25,12 +31,6 @@ import {
25
31
  import {
26
32
  copy_file_exports
27
33
  } from "./chunk-OA7Y2A5T.js";
28
- import {
29
- exists_file_exports
30
- } from "./chunk-24ZUWYIR.js";
31
- import {
32
- move_file_exports
33
- } from "./chunk-646R6BQZ.js";
34
34
  import {
35
35
  __export
36
36
  } from "./chunk-WSFCRVEQ.js";
@@ -1,13 +1,15 @@
1
1
  import {
2
2
  Random
3
- } from "./chunk-OVG5RGI3.js";
3
+ } from "./chunk-S32K7POB.js";
4
4
  import {
5
5
  register
6
- } from "./chunk-TIER4TF4.js";
6
+ } from "./chunk-P2H6PV4O.js";
7
7
 
8
8
  // src/agnostic/css/styles-set/index.tsx
9
9
  import { Component } from "react";
10
- import { createRoot as reactCreateRoot } from "react-dom/client";
10
+ import {
11
+ createRoot as reactCreateRoot
12
+ } from "react-dom/client";
11
13
  import { Fragment, jsx } from "react/jsx-runtime";
12
14
  var StylesSet = class _StylesSet {
13
15
  static defaultPrivateIDAttribute = "data-styleset-private-id";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  directory_exports
3
3
  } from "./chunk-X5F6XGEP.js";
4
+ import {
5
+ file_exports
6
+ } from "./chunk-E33DCHHS.js";
4
7
  import {
5
8
  bucket_exports
6
9
  } from "./chunk-UEAMPAHK.js";
7
- import {
8
- file_exports
9
- } from "./chunk-GU34O65H.js";
10
10
  import {
11
11
  __export
12
12
  } from "./chunk-WSFCRVEQ.js";
@@ -15,7 +15,9 @@ function isSaturateOperationParams(obj) {
15
15
  return Outcome.makeSuccess(result.data);
16
16
  }
17
17
  async function saturate(sharpInstance, params) {
18
- return sharpInstance.modulate({ saturation: params.saturation });
18
+ return sharpInstance.modulate({
19
+ saturation: params.saturation
20
+ });
19
21
  }
20
22
 
21
23
  export {