@design-edito/tools 0.2.15 → 0.2.17

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 (264) hide show
  1. package/agnostic/arrays/index.js +8 -8
  2. package/agnostic/arrays/random-pick/index.js +4 -4
  3. package/agnostic/colors/channels/index.d.ts +5 -0
  4. package/agnostic/colors/channels/index.js +18 -0
  5. package/agnostic/colors/contrast/index.d.ts +2 -0
  6. package/agnostic/colors/contrast/index.js +13 -0
  7. package/agnostic/colors/convert/index.d.ts +20 -0
  8. package/agnostic/colors/convert/index.js +45 -0
  9. package/agnostic/colors/distance/index.d.ts +2 -0
  10. package/agnostic/colors/distance/index.js +12 -0
  11. package/agnostic/colors/grayscale/index.d.ts +2 -0
  12. package/agnostic/colors/grayscale/index.js +12 -0
  13. package/agnostic/colors/index.d.ts +14 -16
  14. package/agnostic/colors/index.js +95 -27
  15. package/agnostic/colors/invert/index.d.ts +2 -0
  16. package/agnostic/colors/invert/index.js +12 -0
  17. package/agnostic/colors/lerp/index.d.ts +2 -0
  18. package/agnostic/colors/lerp/index.js +12 -0
  19. package/agnostic/colors/luminance/index.d.ts +2 -0
  20. package/agnostic/colors/luminance/index.js +12 -0
  21. package/agnostic/colors/palette/index.d.ts +2 -0
  22. package/agnostic/colors/palette/index.js +14 -0
  23. package/agnostic/colors/rotate/index.d.ts +2 -0
  24. package/agnostic/colors/rotate/index.js +13 -0
  25. package/agnostic/colors/tidy/index.d.ts +2 -0
  26. package/agnostic/colors/tidy/index.js +11 -0
  27. package/agnostic/colors/typechecks/index.d.ts +11 -0
  28. package/agnostic/colors/typechecks/index.js +26 -0
  29. package/agnostic/colors/types.d.ts +82 -0
  30. package/agnostic/css/index.js +12 -12
  31. package/agnostic/css/styles-set/index.js +6 -6
  32. package/agnostic/html/hyper-json/cast/index.js +7 -7
  33. package/agnostic/html/hyper-json/index.js +8 -8
  34. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +7 -7
  35. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +7 -7
  36. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +7 -7
  37. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +7 -7
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +7 -7
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +7 -7
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +7 -7
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +7 -7
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +7 -7
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +7 -7
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +7 -7
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +7 -7
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +7 -7
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +7 -7
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +7 -7
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +7 -7
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +7 -7
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +7 -7
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +7 -7
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +7 -7
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +7 -7
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +7 -7
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +7 -7
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +7 -7
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +7 -7
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +7 -7
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +7 -7
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +7 -7
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +7 -7
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +7 -7
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +7 -7
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +7 -7
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +7 -7
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +7 -7
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +7 -7
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +7 -7
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +7 -7
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +7 -7
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +7 -7
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +7 -7
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +7 -7
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +7 -7
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +7 -7
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +7 -7
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +7 -7
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +7 -7
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +7 -7
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +7 -7
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +7 -7
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +7 -7
  84. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +7 -7
  85. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +7 -7
  86. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +7 -7
  87. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +7 -7
  88. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +7 -7
  89. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +7 -7
  90. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +7 -7
  91. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +7 -7
  92. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +7 -7
  93. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +7 -7
  94. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +7 -7
  95. package/agnostic/html/hyper-json/tree/index.js +7 -7
  96. package/agnostic/html/hyper-json/utils/index.js +7 -7
  97. package/agnostic/html/index.js +21 -21
  98. package/agnostic/html/sanitize/index.js +4 -4
  99. package/agnostic/html/selector-to-element/index.js +4 -4
  100. package/agnostic/html/string-to-nodes/index.js +5 -5
  101. package/agnostic/index.d.ts +1 -1
  102. package/agnostic/misc/crossenv/index.js +2 -2
  103. package/agnostic/misc/index.js +27 -27
  104. package/agnostic/misc/logs/index.js +2 -2
  105. package/agnostic/misc/lorem-ipsum/index.js +11 -11
  106. package/agnostic/numbers/index.js +9 -9
  107. package/agnostic/objects/index.js +8 -8
  108. package/agnostic/random/index.js +2 -2
  109. package/agnostic/strings/index.js +7 -7
  110. package/agnostic/time/index.js +6 -6
  111. package/chunks/chunk-2EHYEUX4.js +21 -0
  112. package/chunks/chunk-5LK2YLTK.js +21 -0
  113. package/chunks/chunk-65NTXENV.js +157 -0
  114. package/chunks/chunk-ALMK24GK.js +0 -0
  115. package/chunks/{chunk-B446JIN3.js → chunk-AQBJ6HNB.js} +1 -1
  116. package/chunks/chunk-BKIF2ELV.js +47 -0
  117. package/chunks/chunk-D7SXHHU3.js +47 -0
  118. package/chunks/chunk-GUBFCOBT.js +98 -0
  119. package/chunks/{chunk-XDITZ5QN.js → chunk-HONCMQHQ.js} +2 -2
  120. package/chunks/{chunk-YIZODJC7.js → chunk-IAOZM4EN.js} +5 -5
  121. package/chunks/chunk-IDXUS2IO.js +296 -0
  122. package/chunks/chunk-ISUDTAMN.js +101 -0
  123. package/chunks/{chunk-GVQVGFAA.js → chunk-J4WGYUFY.js} +4 -4
  124. package/chunks/{chunk-Q6DUKZU6.js → chunk-JJ7DN7NN.js} +7 -7
  125. package/chunks/{chunk-EDJ3TVNV.js → chunk-KDOMQ4LM.js} +15 -6
  126. package/chunks/{chunk-TSZAQ3RQ.js → chunk-L5VJAZVW.js} +90 -91
  127. package/chunks/chunk-MN4FVOU2.js +28 -0
  128. package/chunks/{chunk-IOJTC6CN.js → chunk-O7VEAOGY.js} +22 -22
  129. package/chunks/{chunk-2M33FCDG.js → chunk-O7VFJHQX.js} +11 -5
  130. package/chunks/chunk-P4YT4RBG.js +51 -0
  131. package/chunks/{chunk-2UAVBQI5.js → chunk-QJXJT5JS.js} +4 -4
  132. package/chunks/{chunk-FQ4UTWMP.js → chunk-QTA7ZEVX.js} +3 -1
  133. package/chunks/chunk-QW34TQCS.js +48 -0
  134. package/chunks/{chunk-HMAK6VAF.js → chunk-RBCZWVQH.js} +11 -5
  135. package/chunks/{chunk-IWDIKDYR.js → chunk-RBH5MYJ7.js} +17 -17
  136. package/chunks/{chunk-AI6AGF4I.js → chunk-S7637BQZ.js} +8 -5
  137. package/chunks/{chunk-SA2IY5LN.js → chunk-SKBOSWM2.js} +1 -1
  138. package/chunks/{chunk-CYUEPBUN.js → chunk-STW5RKR7.js} +2 -2
  139. package/chunks/{chunk-CHUOCTRP.js → chunk-TIER4TF4.js} +1 -1
  140. package/chunks/chunk-UG5EMKGN.js +265 -0
  141. package/chunks/chunk-VA67YLZL.js +26 -0
  142. package/chunks/chunk-XAYMIITK.js +103 -0
  143. package/chunks/{chunk-JWF5EKM2.js → chunk-XB3EGDBI.js} +1 -1
  144. package/chunks/chunk-YZVZKBVJ.js +631 -0
  145. package/chunks/{chunk-36CTYZYA.js → chunk-ZBBU2P4D.js} +2 -2
  146. package/chunks/chunk-ZJ63OCMA.js +207 -0
  147. package/node/@aws-s3/index.js +9 -9
  148. package/node/@aws-s3/storage/directory/index.js +7 -7
  149. package/node/@aws-s3/storage/file/index.js +13 -13
  150. package/node/@aws-s3/storage/index.js +11 -11
  151. package/node/@google-cloud/index.js +14 -14
  152. package/node/@google-cloud/storage/bucket/index.js +4 -4
  153. package/node/@google-cloud/storage/directory/index.js +7 -7
  154. package/node/@google-cloud/storage/file/index.js +18 -18
  155. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +2 -2
  156. package/node/@google-cloud/storage/index.js +16 -16
  157. package/node/cloud-storage/index.js +41 -41
  158. package/node/cloud-storage/operations/copy-dir/index.js +2 -2
  159. package/node/cloud-storage/operations/copy-file/index.js +2 -2
  160. package/node/cloud-storage/operations/download-file/index.js +2 -2
  161. package/node/cloud-storage/operations/exists-file/index.js +2 -2
  162. package/node/cloud-storage/operations/index.js +53 -53
  163. package/node/cloud-storage/operations/list-dir/index.js +2 -2
  164. package/node/cloud-storage/operations/move-dir/index.js +2 -2
  165. package/node/cloud-storage/operations/move-file/index.js +2 -2
  166. package/node/cloud-storage/operations/remove-dir/index.js +2 -2
  167. package/node/cloud-storage/operations/remove-file/index.js +2 -2
  168. package/node/cloud-storage/operations/stat-file/index.js +2 -2
  169. package/node/cloud-storage/operations/upload-file/index.js +2 -2
  170. package/node/encryption/index.js +3 -3
  171. package/node/ftps/directory/index.js +7 -7
  172. package/node/ftps/file/index.js +13 -13
  173. package/node/ftps/index.js +10 -10
  174. package/node/images/create/index.d.ts +3 -0
  175. package/node/images/create/index.js +23 -0
  176. package/node/images/format/index.d.ts +17 -51
  177. package/node/images/format/index.js +30 -4
  178. package/node/images/index.d.ts +4 -2
  179. package/node/images/index.js +41 -21
  180. package/node/images/metadata/index.d.ts +3 -0
  181. package/node/images/metadata/index.js +23 -0
  182. package/node/images/transform/index.d.ts +2 -97
  183. package/node/images/transform/index.js +27 -16
  184. package/node/images/transform/operations/blur/index.d.ts +1 -3
  185. package/node/images/transform/operations/brighten/index.d.ts +1 -3
  186. package/node/images/transform/operations/extend/index.d.ts +1 -8
  187. package/node/images/transform/operations/extend/index.js +17 -2
  188. package/node/images/transform/operations/extract/index.d.ts +1 -6
  189. package/node/images/transform/operations/flatten/index.d.ts +1 -3
  190. package/node/images/transform/operations/flatten/index.js +17 -2
  191. package/node/images/transform/operations/hue/index.d.ts +1 -3
  192. package/node/images/transform/operations/level/index.d.ts +1 -4
  193. package/node/images/transform/operations/lighten/index.d.ts +1 -3
  194. package/node/images/transform/operations/normalize/index.d.ts +1 -4
  195. package/node/images/transform/operations/overlay/index.d.ts +5 -0
  196. package/node/images/transform/operations/overlay/index.js +27 -0
  197. package/node/images/transform/operations/resize/index.d.ts +1 -11
  198. package/node/images/transform/operations/resize/index.js +17 -2
  199. package/node/images/transform/operations/rotate/index.d.ts +1 -4
  200. package/node/images/transform/operations/rotate/index.js +17 -2
  201. package/node/images/transform/operations/saturate/index.d.ts +1 -3
  202. package/node/images/transform/operations/saturate/index.js +1 -1
  203. package/node/images/types.d.ts +252 -0
  204. package/node/images/utils/index.d.ts +7 -0
  205. package/node/images/utils/index.js +28 -0
  206. package/node/sftp/directory/index.js +7 -7
  207. package/node/sftp/file/index.js +13 -13
  208. package/node/sftp/index.js +10 -10
  209. package/package.json +1 -1
  210. package/agnostic/colors/complement-color/index.d.ts +0 -1
  211. package/agnostic/colors/complement-color/index.js +0 -7
  212. package/agnostic/colors/hex-to-rgb/index.d.ts +0 -1
  213. package/agnostic/colors/hex-to-rgb/index.js +0 -7
  214. package/agnostic/colors/hsl-to-rgb/index.d.ts +0 -1
  215. package/agnostic/colors/hsl-to-rgb/index.js +0 -7
  216. package/agnostic/colors/lighten-color/index.d.ts +0 -2
  217. package/agnostic/colors/lighten-color/index.js +0 -11
  218. package/agnostic/colors/rgb-to-hex/index.d.ts +0 -1
  219. package/agnostic/colors/rgb-to-hex/index.js +0 -7
  220. package/agnostic/colors/rgb-to-hsl/index.d.ts +0 -1
  221. package/agnostic/colors/rgb-to-hsl/index.js +0 -7
  222. package/agnostic/colors/saturate-color/index.d.ts +0 -2
  223. package/agnostic/colors/saturate-color/index.js +0 -11
  224. package/chunks/chunk-2POD3TAX.js +0 -11
  225. package/chunks/chunk-2TJCB6IM.js +0 -12
  226. package/chunks/chunk-7EDDWSWS.js +0 -123
  227. package/chunks/chunk-FAXNZG5C.js +0 -10
  228. package/chunks/chunk-IFQA5PWI.js +0 -112
  229. package/chunks/chunk-MB7HWF22.js +0 -23
  230. package/chunks/chunk-MFYNJMVM.js +0 -18
  231. package/chunks/chunk-NYVARFI7.js +0 -20
  232. package/chunks/chunk-QLC3A6PC.js +0 -17
  233. package/chunks/chunk-U57Q62IN.js +0 -23
  234. package/chunks/chunk-YVLJKJV2.js +0 -17
  235. package/node/images/get-metadata/index.d.ts +0 -4
  236. package/node/images/get-metadata/index.js +0 -7
  237. package/node/images/transform/operations/composite/index.d.ts +0 -7
  238. package/node/images/transform/operations/composite/index.js +0 -12
  239. package/node/images/transform/utils/index.d.ts +0 -2
  240. package/node/images/transform/utils/index.js +0 -8
  241. package/chunks/{chunk-LAVXHKKR.js → chunk-2DW5MV3U.js} +12 -12
  242. package/chunks/{chunk-QCMBG5LN.js → chunk-7SZXDQVJ.js} +16 -16
  243. package/chunks/{chunk-74CFPDKM.js → chunk-A7K5DUP7.js} +6 -6
  244. package/chunks/{chunk-DEQWCMAL.js → chunk-ASCJDM27.js} +12 -12
  245. package/chunks/{chunk-646R6BQZ.js → chunk-CGITTQIW.js} +3 -3
  246. package/chunks/{chunk-7KSMK42F.js → chunk-CNMP2GU4.js} +6 -6
  247. package/chunks/{chunk-EOTOFHUR.js → chunk-D7PZ7633.js} +3 -3
  248. package/chunks/{chunk-UFKH5WD2.js → chunk-FR5H2OCV.js} +3 -3
  249. package/chunks/{chunk-FS6LRTDK.js → chunk-HX5PHI2P.js} +3 -3
  250. package/chunks/{chunk-CA3UPHYO.js → chunk-JNQPNZTB.js} +3 -3
  251. package/chunks/{chunk-G5RRNREY.js → chunk-LSZVKXDZ.js} +3 -3
  252. package/chunks/{chunk-MJQF3YZO.js → chunk-QN3UAKIU.js} +3 -3
  253. package/chunks/{chunk-DPQRXSZH.js → chunk-RXBMGIPJ.js} +3 -3
  254. package/chunks/{chunk-OVG5RGI3.js → chunk-S32K7POB.js} +4 -4
  255. package/chunks/{chunk-Y4THX4AN.js → chunk-TFZOOTCF.js} +3 -3
  256. package/chunks/{chunk-UXEKCYL7.js → chunk-UEAMPAHK.js} +3 -3
  257. package/chunks/{chunk-24ZUWYIR.js → chunk-UX2O74SG.js} +3 -3
  258. package/chunks/{chunk-AIC5YAJU.js → chunk-X5F6XGEP.js} +6 -6
  259. package/chunks/{chunk-JSW6R3ZH.js → chunk-X5VXP4GS.js} +12 -12
  260. package/chunks/{chunk-OA7Y2A5T.js → chunk-XNWEMAIP.js} +3 -3
  261. package/chunks/{chunk-UK4HNSEJ.js → chunk-YVWQXQTE.js} +3 -3
  262. package/chunks/{chunk-4OK2UH4M.js → chunk-ZBAKY6DB.js} +6 -6
  263. package/chunks/{chunk-6NLNUGBI.js → chunk-ZQY2MR66.js} +3 -3
  264. package/chunks/{chunk-NOLQR5RW.js → chunk-ZUQEHFGL.js} +3 -3
@@ -1,64 +1,70 @@
1
- import {
2
- isSaturateOperationParams,
3
- saturate
4
- } from "./chunk-FQ4UTWMP.js";
5
- import {
6
- flop
7
- } from "./chunk-YA2YCZUF.js";
8
- import {
9
- flip
10
- } from "./chunk-WNDMYNDU.js";
11
1
  import {
12
2
  hue,
13
3
  isHueOperationParams
14
4
  } from "./chunk-QSU3CVGF.js";
15
- import {
16
- isLevelOperationParams,
17
- level
18
- } from "./chunk-2HJPX7E3.js";
19
5
  import {
20
6
  isNormalizeOperationParams,
21
7
  normalize
22
8
  } from "./chunk-3G6FOHII.js";
23
9
  import {
24
- isResizeOperationParams,
25
- resize
26
- } from "./chunk-EDJ3TVNV.js";
10
+ isLightenOperationParams,
11
+ lighten
12
+ } from "./chunk-RHKFMXM3.js";
13
+ import {
14
+ isOverlayOperationParams,
15
+ overlay
16
+ } from "./chunk-ISUDTAMN.js";
27
17
  import {
28
18
  isRotateOperationParams,
29
19
  rotate
30
- } from "./chunk-AI6AGF4I.js";
20
+ } from "./chunk-S7637BQZ.js";
31
21
  import {
32
- isLightenOperationParams,
33
- lighten
34
- } from "./chunk-RHKFMXM3.js";
22
+ isResizeOperationParams,
23
+ resize
24
+ } from "./chunk-KDOMQ4LM.js";
35
25
  import {
36
- blur,
37
- isBlurOperationParams
38
- } from "./chunk-P26Y7YUA.js";
26
+ isSaturateOperationParams,
27
+ saturate
28
+ } from "./chunk-QTA7ZEVX.js";
39
29
  import {
40
30
  brighten,
41
31
  isBrightenOperationParams
42
32
  } from "./chunk-SRXNICSE.js";
43
33
  import {
44
- composite,
45
- isCompositeOperationParams
46
- } from "./chunk-IFQA5PWI.js";
34
+ blur,
35
+ isBlurOperationParams
36
+ } from "./chunk-P26Y7YUA.js";
47
37
  import {
48
38
  extend,
49
39
  isExtendOperationParams
50
- } from "./chunk-HMAK6VAF.js";
40
+ } from "./chunk-RBCZWVQH.js";
51
41
  import {
52
42
  flatten,
53
43
  isFlattenOperationParams
54
- } from "./chunk-2M33FCDG.js";
44
+ } from "./chunk-O7VFJHQX.js";
55
45
  import {
56
46
  extract,
57
47
  isExtractOperationParams
58
48
  } from "./chunk-HFZGH6V2.js";
49
+ import {
50
+ flip
51
+ } from "./chunk-WNDMYNDU.js";
52
+ import {
53
+ flop
54
+ } from "./chunk-YA2YCZUF.js";
55
+ import {
56
+ isLevelOperationParams,
57
+ level
58
+ } from "./chunk-2HJPX7E3.js";
59
+ import {
60
+ toSharpInstance
61
+ } from "./chunk-BKIF2ELV.js";
59
62
  import {
60
63
  Outcome
61
64
  } from "./chunk-JMU5PDBD.js";
65
+ import {
66
+ isNonNullObject
67
+ } from "./chunk-HQLRJ7XW.js";
62
68
  import {
63
69
  unknownToString
64
70
  } from "./chunk-FENXVJYO.js";
@@ -69,16 +75,19 @@ import {
69
75
  // src/node/images/transform/index.ts
70
76
  var transform_exports = {};
71
77
  __export(transform_exports, {
72
- OpName: () => OpName,
73
- TransformErrCodes: () => TransformErrCodes,
74
78
  isOperationDescriptor: () => isOperationDescriptor,
75
79
  transform: () => transform
76
80
  });
77
- import sharp from "sharp";
81
+
82
+ // src/node/images/types.ts
83
+ var types_exports = {};
84
+ __export(types_exports, {
85
+ OpName: () => OpName,
86
+ TransformErrCodes: () => TransformErrCodes
87
+ });
78
88
  var OpName = /* @__PURE__ */ ((OpName2) => {
79
89
  OpName2["BLUR"] = "blur";
80
90
  OpName2["BRIGHTEN"] = "brighten";
81
- OpName2["COMPOSITE"] = "composite";
82
91
  OpName2["EXTEND"] = "extend";
83
92
  OpName2["EXTRACT"] = "extract";
84
93
  OpName2["FLATTEN"] = "flatten";
@@ -88,13 +97,39 @@ var OpName = /* @__PURE__ */ ((OpName2) => {
88
97
  OpName2["LEVEL"] = "level";
89
98
  OpName2["LIGHTEN"] = "lighten";
90
99
  OpName2["NORMALIZE"] = "normalize";
100
+ OpName2["OVERLAY"] = "overlay";
91
101
  OpName2["RESIZE"] = "resize";
92
102
  OpName2["ROTATE"] = "rotate";
93
103
  OpName2["SATURATE"] = "saturate";
94
104
  return OpName2;
95
105
  })(OpName || {});
106
+ var TransformErrCodes = /* @__PURE__ */ ((TransformErrCodes2) => {
107
+ TransformErrCodes2["PROCESS_TIMEOUT"] = "process-timeout";
108
+ TransformErrCodes2["OP_TIMEOUT"] = "op-timeout";
109
+ TransformErrCodes2["WIDTH_LIMIT_EXCEEDED"] = "width-limit-exceeded";
110
+ TransformErrCodes2["HEIGHT_LIMIT_EXCEEDED"] = "height-limit-exceeded";
111
+ TransformErrCodes2["UNKNOWN_ERROR"] = "unknown-error";
112
+ return TransformErrCodes2;
113
+ })(TransformErrCodes || {});
114
+
115
+ // src/node/images/transform/index.ts
116
+ var validators = {
117
+ ["blur" /* BLUR */]: isBlurOperationParams,
118
+ ["brighten" /* BRIGHTEN */]: isBrightenOperationParams,
119
+ ["extend" /* EXTEND */]: isExtendOperationParams,
120
+ ["extract" /* EXTRACT */]: isExtractOperationParams,
121
+ ["flatten" /* FLATTEN */]: isFlattenOperationParams,
122
+ ["hue" /* HUE */]: isHueOperationParams,
123
+ ["level" /* LEVEL */]: isLevelOperationParams,
124
+ ["lighten" /* LIGHTEN */]: isLightenOperationParams,
125
+ ["normalize" /* NORMALIZE */]: isNormalizeOperationParams,
126
+ ["overlay" /* OVERLAY */]: isOverlayOperationParams,
127
+ ["resize" /* RESIZE */]: isResizeOperationParams,
128
+ ["rotate" /* ROTATE */]: isRotateOperationParams,
129
+ ["saturate" /* SATURATE */]: isSaturateOperationParams
130
+ };
96
131
  function isOperationDescriptor(obj) {
97
- if (typeof obj !== "object" || obj === null) return Outcome.makeFailure("Invalid operation descriptor");
132
+ if (!isNonNullObject(obj)) return Outcome.makeFailure("Invalid operation descriptor");
98
133
  if (!("name" in obj) || typeof obj.name !== "string") return Outcome.makeFailure("Field named 'name' in operation descriptor is required and must be a string");
99
134
  const name = obj.name;
100
135
  const validateOperation = (validatorFn) => {
@@ -102,51 +137,23 @@ function isOperationDescriptor(obj) {
102
137
  if (result.success) return Outcome.makeSuccess({ name: obj.name, ...result.payload });
103
138
  return Outcome.makeFailure(result.error);
104
139
  };
105
- const validators = {
106
- ["blur" /* BLUR */]: isBlurOperationParams,
107
- ["brighten" /* BRIGHTEN */]: isBrightenOperationParams,
108
- ["extend" /* EXTEND */]: isExtendOperationParams,
109
- ["extract" /* EXTRACT */]: isExtractOperationParams,
110
- ["flatten" /* FLATTEN */]: isFlattenOperationParams,
111
- ["hue" /* HUE */]: isHueOperationParams,
112
- ["level" /* LEVEL */]: isLevelOperationParams,
113
- ["lighten" /* LIGHTEN */]: isLightenOperationParams,
114
- ["normalize" /* NORMALIZE */]: isNormalizeOperationParams,
115
- ["resize" /* RESIZE */]: isResizeOperationParams,
116
- ["rotate" /* ROTATE */]: isRotateOperationParams,
117
- ["saturate" /* SATURATE */]: isSaturateOperationParams,
118
- ["composite" /* COMPOSITE */]: isCompositeOperationParams
119
- };
120
140
  const simpleOperations = /* @__PURE__ */ new Set(["flip" /* FLIP */, "flop" /* FLOP */]);
121
141
  if (simpleOperations.has(name)) return Outcome.makeSuccess({ name });
122
142
  const validator = validators[name];
123
143
  if (validator) return validateOperation(validator);
124
144
  return Outcome.makeFailure("Invalid operation descriptor");
125
145
  }
126
- var TransformErrCodes = /* @__PURE__ */ ((TransformErrCodes2) => {
127
- TransformErrCodes2["PROCESS_TIMEOUT"] = "process-timeout";
128
- TransformErrCodes2["OP_TIMEOUT"] = "op-timeout";
129
- TransformErrCodes2["WIDTH_LIMIT_EXCEEDED"] = "width-limit-exceeded";
130
- TransformErrCodes2["HEIGHT_LIMIT_EXCEEDED"] = "height-limit-exceeded";
131
- TransformErrCodes2["UNKNOWN_ERROR"] = "unknown-error";
132
- return TransformErrCodes2;
133
- })(TransformErrCodes || {});
134
146
  async function transform(input, operationsSequence, limits) {
135
- if (typeof input === "object" && "create" in input && input.create !== null) {
136
- return transformSharpInstance(sharp(input), operationsSequence, limits);
137
- }
138
- if (Buffer.isBuffer(input)) return transformBuffer(input, operationsSequence, limits);
139
- return transformSharpInstance(input, operationsSequence, limits);
140
- }
141
- async function transformSharpInstance(sharpInstance, operationsSequence, limits) {
147
+ let sharpInstance = await toSharpInstance(input);
142
148
  const start = Date.now();
143
- const deadline = limits?.timeoutMs ? start + limits.timeoutMs : void 0;
149
+ const deadline = limits?.timeoutMs !== void 0 ? start + limits.timeoutMs : void 0;
144
150
  const runWithOpTimeout = async (op) => {
145
- if (!limits?.opTimeoutMs) return op();
146
- const opTimeout = new Promise(
147
- (resolve) => setTimeout(() => resolve("op-timeout" /* OP_TIMEOUT */), limits.opTimeoutMs)
148
- );
149
- return Promise.race([op(), opTimeout]);
151
+ return limits?.opTimeoutMs === void 0 ? op() : Promise.race([op(), new Promise(
152
+ (resolve) => setTimeout(
153
+ () => resolve("op-timeout" /* OP_TIMEOUT */),
154
+ limits.opTimeoutMs
155
+ )
156
+ )]);
150
157
  };
151
158
  for (const operation of operationsSequence) {
152
159
  if (deadline !== void 0 && Date.now() > deadline) return Outcome.makeFailure({
@@ -179,14 +186,14 @@ async function transformSharpInstance(sharpInstance, operationsSequence, limits)
179
186
  return lighten(sharpInstance, operation);
180
187
  case "normalize" /* NORMALIZE */:
181
188
  return normalize(sharpInstance, operation);
189
+ case "overlay" /* OVERLAY */:
190
+ return overlay(sharpInstance, operation);
182
191
  case "resize" /* RESIZE */:
183
192
  return resize(sharpInstance, operation);
184
193
  case "rotate" /* ROTATE */:
185
194
  return rotate(sharpInstance, operation);
186
195
  case "saturate" /* SATURATE */:
187
196
  return saturate(sharpInstance, operation);
188
- case "composite" /* COMPOSITE */:
189
- return composite(sharpInstance, operation);
190
197
  default:
191
198
  return sharpInstance;
192
199
  }
@@ -204,21 +211,18 @@ async function transformSharpInstance(sharpInstance, operationsSequence, limits)
204
211
  else {
205
212
  sharpInstance = result;
206
213
  }
207
- if (limits && (operation.name === "resize" /* RESIZE */ || operation.name === "extend" /* EXTEND */ || operation.name === "extract" /* EXTRACT */ || operation.name === "rotate" /* ROTATE */)) {
214
+ if (limits === void 0) continue;
215
+ if (operation.name === "resize" /* RESIZE */ || operation.name === "extend" /* EXTEND */ || operation.name === "extract" /* EXTRACT */ || operation.name === "rotate" /* ROTATE */) {
208
216
  try {
209
217
  const meta = await sharpInstance.metadata();
210
- if (limits.width !== void 0 && meta.width && meta.width > limits.width) {
211
- return Outcome.makeFailure({
212
- code: "width-limit-exceeded" /* WIDTH_LIMIT_EXCEEDED */,
213
- details: `Image width exceeded the limit (${meta.width}px)`
214
- });
215
- }
216
- if (limits.height !== void 0 && meta.height && meta.height > limits.height) {
217
- return Outcome.makeFailure({
218
- code: "height-limit-exceeded" /* HEIGHT_LIMIT_EXCEEDED */,
219
- details: `Image height exceeded the limit (${meta.height}px)`
220
- });
221
- }
218
+ if (limits.width !== void 0 && meta.width && meta.width > limits.width) return Outcome.makeFailure({
219
+ code: "width-limit-exceeded" /* WIDTH_LIMIT_EXCEEDED */,
220
+ details: `Image width exceeded the limit (${meta.width}px)`
221
+ });
222
+ if (limits.height !== void 0 && meta.height && meta.height > limits.height) return Outcome.makeFailure({
223
+ code: "height-limit-exceeded" /* HEIGHT_LIMIT_EXCEEDED */,
224
+ details: `Image height exceeded the limit (${meta.height}px)`
225
+ });
222
226
  } catch (err) {
223
227
  return Outcome.makeFailure({
224
228
  code: "unknown-error" /* UNKNOWN_ERROR */,
@@ -229,15 +233,10 @@ async function transformSharpInstance(sharpInstance, operationsSequence, limits)
229
233
  }
230
234
  return Outcome.makeSuccess(sharpInstance);
231
235
  }
232
- async function transformBuffer(fileBuffer, operationsSequence, limits) {
233
- const sharpInstance = sharp(fileBuffer);
234
- return transformSharpInstance(sharpInstance, operationsSequence, limits);
235
- }
236
236
 
237
237
  export {
238
- OpName,
238
+ types_exports,
239
239
  isOperationDescriptor,
240
- TransformErrCodes,
241
240
  transform,
242
241
  transform_exports
243
242
  };
@@ -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,36 +1,36 @@
1
1
  import {
2
- remove_dir_exports
3
- } from "./chunk-CA3UPHYO.js";
4
- import {
5
- remove_file_exports
6
- } from "./chunk-Y4THX4AN.js";
2
+ upload_file_exports
3
+ } from "./chunk-ZUQEHFGL.js";
7
4
  import {
8
- stat_file_exports
9
- } from "./chunk-UK4HNSEJ.js";
5
+ exists_file_exports
6
+ } from "./chunk-UX2O74SG.js";
10
7
  import {
11
- upload_file_exports
12
- } from "./chunk-NOLQR5RW.js";
8
+ list_dir_exports
9
+ } from "./chunk-RXBMGIPJ.js";
13
10
  import {
14
- copy_dir_exports
15
- } from "./chunk-6NLNUGBI.js";
11
+ move_dir_exports
12
+ } from "./chunk-HX5PHI2P.js";
16
13
  import {
17
14
  download_file_exports
18
- } from "./chunk-EOTOFHUR.js";
15
+ } from "./chunk-D7PZ7633.js";
19
16
  import {
20
- copy_file_exports
21
- } from "./chunk-OA7Y2A5T.js";
17
+ move_file_exports
18
+ } from "./chunk-CGITTQIW.js";
22
19
  import {
23
- exists_file_exports
24
- } from "./chunk-24ZUWYIR.js";
20
+ remove_file_exports
21
+ } from "./chunk-TFZOOTCF.js";
25
22
  import {
26
- list_dir_exports
27
- } from "./chunk-DPQRXSZH.js";
23
+ stat_file_exports
24
+ } from "./chunk-YVWQXQTE.js";
28
25
  import {
29
- move_dir_exports
30
- } from "./chunk-FS6LRTDK.js";
26
+ remove_dir_exports
27
+ } from "./chunk-JNQPNZTB.js";
31
28
  import {
32
- move_file_exports
33
- } from "./chunk-646R6BQZ.js";
29
+ copy_dir_exports
30
+ } from "./chunk-ZQY2MR66.js";
31
+ import {
32
+ copy_file_exports
33
+ } from "./chunk-XNWEMAIP.js";
34
34
  import {
35
35
  __export
36
36
  } from "./chunk-WSFCRVEQ.js";
@@ -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 {
@@ -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,9 +1,9 @@
1
- import {
2
- directory_exports
3
- } from "./chunk-4OK2UH4M.js";
4
1
  import {
5
2
  file_exports
6
- } from "./chunk-LAVXHKKR.js";
3
+ } from "./chunk-2DW5MV3U.js";
4
+ import {
5
+ directory_exports
6
+ } from "./chunk-ZBAKY6DB.js";
7
7
  import {
8
8
  __export
9
9
  } 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 {
@@ -0,0 +1,48 @@
1
+ import {
2
+ addChannel
3
+ } from "./chunk-ZJ63OCMA.js";
4
+ import {
5
+ viaLab,
6
+ viaLch
7
+ } from "./chunk-YZVZKBVJ.js";
8
+ import {
9
+ absoluteModulo
10
+ } from "./chunk-DNIOWD7K.js";
11
+
12
+ // src/agnostic/colors/rotate/index.ts
13
+ function rotateHsl(color, degrees) {
14
+ return addChannel(color, "hue", degrees);
15
+ }
16
+ function rotateLab(color, degrees) {
17
+ return viaLab(color, (lab) => {
18
+ const hue = Math.atan2(lab.b, lab.a) * (180 / Math.PI);
19
+ const chroma = Math.sqrt(lab.a ** 2 + lab.b ** 2);
20
+ const newHue = absoluteModulo(hue + degrees, 360);
21
+ const rad = newHue * (Math.PI / 180);
22
+ return {
23
+ ...lab,
24
+ a: chroma * Math.cos(rad),
25
+ b: chroma * Math.sin(rad)
26
+ };
27
+ });
28
+ }
29
+ function rotateLch(color, degrees) {
30
+ return viaLch(color, (lch) => ({
31
+ ...lch,
32
+ h: absoluteModulo(lch.h + degrees, 360)
33
+ }));
34
+ }
35
+ function rotate(color, degrees, method = "hsl") {
36
+ switch (method) {
37
+ case "hsl":
38
+ return rotateHsl(color, degrees);
39
+ case "lab":
40
+ return rotateLab(color, degrees);
41
+ case "lch":
42
+ return rotateLch(color, degrees);
43
+ }
44
+ }
45
+
46
+ export {
47
+ rotate
48
+ };
@@ -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/extend/index.ts
12
15
  function isExtendOperationParams(obj) {
@@ -16,14 +19,17 @@ function isExtendOperationParams(obj) {
16
19
  top: zod_default.number().optional(),
17
20
  bottom: zod_default.number().optional(),
18
21
  extendWith: zod_default.optional(zod_default.enum(["background", "copy", "repeat", "mirror"])),
19
- background: zod_default.custom((val) => isSharpColor(val)).optional()
22
+ background: zod_default.custom(isColor).optional()
20
23
  });
21
24
  const result = schema.safeParse(obj);
22
25
  if (!result.success) return Outcome.makeFailure(result.error.message);
23
26
  return Outcome.makeSuccess(result.data);
24
27
  }
25
28
  async function extend(sharpInstance, params) {
26
- return sharpInstance.extend(params);
29
+ return sharpInstance.extend({
30
+ ...params,
31
+ background: params.background !== void 0 ? toSharpColor(params.background) : void 0
32
+ });
27
33
  }
28
34
 
29
35
  export {
@@ -1,39 +1,39 @@
1
+ import {
2
+ get_permissions_exports
3
+ } from "./chunk-YKPA3MQL.js";
1
4
  import {
2
5
  revoke_signed_urls_exports
3
- } from "./chunk-G5RRNREY.js";
6
+ } from "./chunk-LSZVKXDZ.js";
4
7
  import {
5
8
  update_metadata_exports
6
9
  } from "./chunk-HWVEI3RH.js";
10
+ import {
11
+ get_metadata_exports
12
+ } from "./chunk-42K3MQQ5.js";
7
13
  import {
8
14
  generate_signed_url_exports
9
15
  } from "./chunk-PAIUCLVK.js";
10
16
  import {
11
- get_metadata_exports
12
- } from "./chunk-42K3MQQ5.js";
17
+ upload_exports
18
+ } from "./chunk-FB3GNE2B.js";
13
19
  import {
14
- get_permissions_exports
15
- } from "./chunk-YKPA3MQL.js";
20
+ exists_exports
21
+ } from "./chunk-5VHFXWFM.js";
22
+ import {
23
+ download_exports
24
+ } from "./chunk-2JH4TCT2.js";
25
+ import {
26
+ move_exports
27
+ } from "./chunk-6IYUA43Q.js";
16
28
  import {
17
29
  remove_exports
18
30
  } from "./chunk-7J7CYOXU.js";
19
31
  import {
20
32
  stat_exports
21
33
  } from "./chunk-W3RXHN5I.js";
22
- import {
23
- upload_exports
24
- } from "./chunk-FB3GNE2B.js";
25
- import {
26
- download_exports
27
- } from "./chunk-2JH4TCT2.js";
28
34
  import {
29
35
  copy_exports
30
36
  } from "./chunk-CWZFRUBS.js";
31
- import {
32
- exists_exports
33
- } from "./chunk-5VHFXWFM.js";
34
- import {
35
- move_exports
36
- } from "./chunk-6IYUA43Q.js";
37
37
  import {
38
38
  __export
39
39
  } from "./chunk-WSFCRVEQ.js";
@@ -1,18 +1,21 @@
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/rotate/index.ts
12
15
  function isRotateOperationParams(obj) {
13
16
  const schema = zod_default.object({
14
17
  angleDeg: zod_default.number().optional(),
15
- background: zod_default.custom((val) => isSharpColor(val)).optional()
18
+ background: zod_default.custom(isColor).optional()
16
19
  });
17
20
  const result = schema.safeParse(obj);
18
21
  if (!result.success) return Outcome.makeFailure(result.error.message);
@@ -20,7 +23,7 @@ function isRotateOperationParams(obj) {
20
23
  }
21
24
  async function rotate(sharpInstance, params) {
22
25
  return sharpInstance.rotate(params.angleDeg, {
23
- background: params.background
26
+ background: params.background !== void 0 ? toSharpColor(params.background) : void 0
24
27
  });
25
28
  }
26
29
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  register
3
- } from "./chunk-CHUOCTRP.js";
3
+ } from "./chunk-TIER4TF4.js";
4
4
 
5
5
  // src/agnostic/html/selector-to-element/index.ts
6
6
  function selectorToElement(selector, documentObj) {