@design-edito/tools 0.2.15 → 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 (245) hide show
  1. package/agnostic/arrays/index.js +10 -10
  2. package/agnostic/arrays/random-pick/index.js +6 -6
  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 +10 -10
  31. package/agnostic/css/styles-set/index.js +8 -8
  32. package/agnostic/errors/index.js +2 -2
  33. package/agnostic/html/hyper-json/cast/index.js +6 -6
  34. package/agnostic/html/hyper-json/index.js +7 -7
  35. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +6 -6
  36. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +6 -6
  37. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +6 -6
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +6 -6
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +6 -6
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +6 -6
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +6 -6
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +6 -6
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +6 -6
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +6 -6
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +6 -6
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +6 -6
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +6 -6
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +6 -6
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +6 -6
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +6 -6
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +6 -6
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +6 -6
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +6 -6
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +6 -6
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +6 -6
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +6 -6
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +6 -6
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +6 -6
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +6 -6
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +6 -6
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +6 -6
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +6 -6
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +6 -6
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +6 -6
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +6 -6
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +6 -6
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +6 -6
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +6 -6
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +6 -6
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +6 -6
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +6 -6
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +6 -6
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +6 -6
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +6 -6
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +6 -6
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +6 -6
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +6 -6
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +6 -6
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +6 -6
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +6 -6
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +6 -6
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +6 -6
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +6 -6
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +6 -6
  85. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +6 -6
  86. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +6 -6
  87. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +6 -6
  88. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +6 -6
  89. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +6 -6
  90. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +6 -6
  91. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +6 -6
  92. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +6 -6
  93. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +6 -6
  94. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +6 -6
  95. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +6 -6
  96. package/agnostic/html/hyper-json/tree/index.js +6 -6
  97. package/agnostic/html/hyper-json/utils/index.js +6 -6
  98. package/agnostic/html/index.js +22 -22
  99. package/agnostic/html/sanitize/index.js +6 -6
  100. package/agnostic/html/selector-to-element/index.js +6 -6
  101. package/agnostic/html/string-to-nodes/index.js +7 -7
  102. package/agnostic/index.d.ts +1 -1
  103. package/agnostic/misc/assert/index.js +3 -3
  104. package/agnostic/misc/crossenv/index.js +2 -2
  105. package/agnostic/misc/index.js +25 -25
  106. package/agnostic/misc/lorem-ipsum/index.js +13 -13
  107. package/agnostic/numbers/index.js +6 -6
  108. package/agnostic/objects/index.js +15 -15
  109. package/agnostic/random/index.js +2 -2
  110. package/agnostic/strings/index.js +11 -11
  111. package/agnostic/time/index.js +6 -6
  112. package/chunks/chunk-2EHYEUX4.js +21 -0
  113. package/chunks/chunk-5LK2YLTK.js +21 -0
  114. package/chunks/chunk-65NTXENV.js +157 -0
  115. package/chunks/{chunk-XDITZ5QN.js → chunk-AF2NAJS2.js} +2 -2
  116. package/chunks/chunk-ALMK24GK.js +0 -0
  117. package/chunks/chunk-BKIF2ELV.js +47 -0
  118. package/chunks/{chunk-B446JIN3.js → chunk-C7SRAQMW.js} +1 -1
  119. package/chunks/{chunk-36CTYZYA.js → chunk-CQEDNACN.js} +2 -2
  120. package/chunks/chunk-D7SXHHU3.js +47 -0
  121. package/chunks/{chunk-IWDIKDYR.js → chunk-E33DCHHS.js} +13 -13
  122. package/chunks/{chunk-WAMSK4A3.js → chunk-E4FJHD5R.js} +1 -1
  123. package/chunks/chunk-GUBFCOBT.js +98 -0
  124. package/chunks/{chunk-Q6DUKZU6.js → chunk-I2HTBYNO.js} +6 -6
  125. package/chunks/chunk-IDXUS2IO.js +296 -0
  126. package/chunks/chunk-JHUOMGOX.js +81 -0
  127. package/chunks/{chunk-EDJ3TVNV.js → chunk-KDOMQ4LM.js} +15 -6
  128. package/chunks/chunk-MN4FVOU2.js +28 -0
  129. package/chunks/{chunk-2M33FCDG.js → chunk-O7VFJHQX.js} +11 -5
  130. package/chunks/{chunk-2UAVBQI5.js → chunk-OD2XVVE2.js} +4 -4
  131. package/chunks/{chunk-CHUOCTRP.js → chunk-P2H6PV4O.js} +2 -2
  132. package/chunks/chunk-P4YT4RBG.js +51 -0
  133. package/chunks/{chunk-CYUEPBUN.js → chunk-PX4DPCZM.js} +2 -2
  134. package/chunks/{chunk-YIZODJC7.js → chunk-QRS3G3YD.js} +5 -5
  135. package/chunks/{chunk-FQ4UTWMP.js → chunk-QTA7ZEVX.js} +3 -1
  136. package/chunks/chunk-QW34TQCS.js +48 -0
  137. package/chunks/{chunk-HMAK6VAF.js → chunk-RBCZWVQH.js} +11 -5
  138. package/chunks/{chunk-JWF5EKM2.js → chunk-RDQJSWRC.js} +1 -1
  139. package/chunks/{chunk-AI6AGF4I.js → chunk-S7637BQZ.js} +8 -5
  140. package/chunks/{chunk-GVQVGFAA.js → chunk-TQXFC6OS.js} +4 -4
  141. package/chunks/chunk-UG5EMKGN.js +265 -0
  142. package/chunks/chunk-VA67YLZL.js +26 -0
  143. package/chunks/{chunk-TSZAQ3RQ.js → chunk-VKNQ7MVZ.js} +86 -87
  144. package/chunks/{chunk-SA2IY5LN.js → chunk-X5HMM3LD.js} +1 -1
  145. package/chunks/chunk-XAYMIITK.js +103 -0
  146. package/chunks/chunk-YZVZKBVJ.js +631 -0
  147. package/chunks/chunk-ZJ63OCMA.js +207 -0
  148. package/node/@aws-s3/index.js +8 -8
  149. package/node/@aws-s3/storage/directory/index.js +7 -7
  150. package/node/@aws-s3/storage/file/index.js +10 -10
  151. package/node/@aws-s3/storage/index.js +10 -10
  152. package/node/@google-cloud/index.js +11 -11
  153. package/node/@google-cloud/storage/bucket/index.js +4 -4
  154. package/node/@google-cloud/storage/directory/index.js +7 -7
  155. package/node/@google-cloud/storage/file/index.js +14 -14
  156. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +2 -2
  157. package/node/@google-cloud/storage/index.js +13 -13
  158. package/node/cloud-storage/index.js +26 -26
  159. package/node/cloud-storage/operations/index.js +36 -36
  160. package/node/encryption/index.js +3 -3
  161. package/node/files/index.js +3 -3
  162. package/node/ftps/directory/index.js +7 -7
  163. package/node/ftps/file/index.js +10 -10
  164. package/node/ftps/index.js +9 -9
  165. package/node/images/create/index.d.ts +3 -0
  166. package/node/images/create/index.js +23 -0
  167. package/node/images/format/index.d.ts +17 -51
  168. package/node/images/format/index.js +30 -4
  169. package/node/images/index.d.ts +4 -2
  170. package/node/images/index.js +41 -21
  171. package/node/images/metadata/index.d.ts +3 -0
  172. package/node/images/metadata/index.js +23 -0
  173. package/node/images/transform/index.d.ts +2 -97
  174. package/node/images/transform/index.js +27 -16
  175. package/node/images/transform/operations/blur/index.d.ts +1 -3
  176. package/node/images/transform/operations/brighten/index.d.ts +1 -3
  177. package/node/images/transform/operations/extend/index.d.ts +1 -8
  178. package/node/images/transform/operations/extend/index.js +17 -2
  179. package/node/images/transform/operations/extract/index.d.ts +1 -6
  180. package/node/images/transform/operations/flatten/index.d.ts +1 -3
  181. package/node/images/transform/operations/flatten/index.js +17 -2
  182. package/node/images/transform/operations/hue/index.d.ts +1 -3
  183. package/node/images/transform/operations/level/index.d.ts +1 -4
  184. package/node/images/transform/operations/lighten/index.d.ts +1 -3
  185. package/node/images/transform/operations/normalize/index.d.ts +1 -4
  186. package/node/images/transform/operations/overlay/index.d.ts +5 -0
  187. package/node/images/transform/operations/overlay/index.js +27 -0
  188. package/node/images/transform/operations/resize/index.d.ts +1 -11
  189. package/node/images/transform/operations/resize/index.js +17 -2
  190. package/node/images/transform/operations/rotate/index.d.ts +1 -4
  191. package/node/images/transform/operations/rotate/index.js +17 -2
  192. package/node/images/transform/operations/saturate/index.d.ts +1 -3
  193. package/node/images/transform/operations/saturate/index.js +1 -1
  194. package/node/images/types.d.ts +252 -0
  195. package/node/images/utils/index.d.ts +7 -0
  196. package/node/images/utils/index.js +28 -0
  197. package/node/sftp/directory/index.js +7 -7
  198. package/node/sftp/file/index.js +10 -10
  199. package/node/sftp/index.js +9 -9
  200. package/package.json +1 -1
  201. package/agnostic/colors/complement-color/index.d.ts +0 -1
  202. package/agnostic/colors/complement-color/index.js +0 -7
  203. package/agnostic/colors/hex-to-rgb/index.d.ts +0 -1
  204. package/agnostic/colors/hex-to-rgb/index.js +0 -7
  205. package/agnostic/colors/hsl-to-rgb/index.d.ts +0 -1
  206. package/agnostic/colors/hsl-to-rgb/index.js +0 -7
  207. package/agnostic/colors/lighten-color/index.d.ts +0 -2
  208. package/agnostic/colors/lighten-color/index.js +0 -11
  209. package/agnostic/colors/rgb-to-hex/index.d.ts +0 -1
  210. package/agnostic/colors/rgb-to-hex/index.js +0 -7
  211. package/agnostic/colors/rgb-to-hsl/index.d.ts +0 -1
  212. package/agnostic/colors/rgb-to-hsl/index.js +0 -7
  213. package/agnostic/colors/saturate-color/index.d.ts +0 -2
  214. package/agnostic/colors/saturate-color/index.js +0 -11
  215. package/chunks/chunk-2POD3TAX.js +0 -11
  216. package/chunks/chunk-2TJCB6IM.js +0 -12
  217. package/chunks/chunk-7EDDWSWS.js +0 -123
  218. package/chunks/chunk-FAXNZG5C.js +0 -10
  219. package/chunks/chunk-IFQA5PWI.js +0 -112
  220. package/chunks/chunk-MB7HWF22.js +0 -23
  221. package/chunks/chunk-MFYNJMVM.js +0 -18
  222. package/chunks/chunk-NYVARFI7.js +0 -20
  223. package/chunks/chunk-QLC3A6PC.js +0 -17
  224. package/chunks/chunk-U57Q62IN.js +0 -23
  225. package/chunks/chunk-YVLJKJV2.js +0 -17
  226. package/node/images/get-metadata/index.d.ts +0 -4
  227. package/node/images/get-metadata/index.js +0 -7
  228. package/node/images/transform/operations/composite/index.d.ts +0 -7
  229. package/node/images/transform/operations/composite/index.js +0 -12
  230. package/node/images/transform/utils/index.d.ts +0 -2
  231. package/node/images/transform/utils/index.js +0 -8
  232. package/chunks/{chunk-WH6BPDAC.js → chunk-2KT7AKRW.js} +3 -3
  233. package/chunks/{chunk-JSW6R3ZH.js → chunk-6QFELK4E.js} +9 -9
  234. package/chunks/{chunk-LAVXHKKR.js → chunk-73FF7HWQ.js} +9 -9
  235. package/chunks/{chunk-74CFPDKM.js → chunk-A7K5DUP7.js} +6 -6
  236. package/chunks/{chunk-7KSMK42F.js → chunk-CNMP2GU4.js} +6 -6
  237. package/chunks/{chunk-DEQWCMAL.js → chunk-EXPVRDPR.js} +9 -9
  238. package/chunks/{chunk-UFKH5WD2.js → chunk-FR5H2OCV.js} +3 -3
  239. package/chunks/{chunk-G5RRNREY.js → chunk-LSZVKXDZ.js} +3 -3
  240. package/chunks/{chunk-QCMBG5LN.js → chunk-MLLP7YSK.js} +13 -13
  241. package/chunks/{chunk-IOJTC6CN.js → chunk-PJSPZGT2.js} +15 -15
  242. package/chunks/{chunk-OVG5RGI3.js → chunk-S32K7POB.js} +4 -4
  243. package/chunks/{chunk-UXEKCYL7.js → chunk-UEAMPAHK.js} +3 -3
  244. package/chunks/{chunk-AIC5YAJU.js → chunk-X5F6XGEP.js} +6 -6
  245. package/chunks/{chunk-4OK2UH4M.js → chunk-ZBAKY6DB.js} +6 -6
@@ -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
- directory_exports
3
- } from "./chunk-4OK2UH4M.js";
4
1
  import {
5
2
  file_exports
6
- } from "./chunk-LAVXHKKR.js";
3
+ } from "./chunk-73FF7HWQ.js";
4
+ import {
5
+ directory_exports
6
+ } from "./chunk-ZBAKY6DB.js";
7
7
  import {
8
8
  __export
9
9
  } from "./chunk-WSFCRVEQ.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Crossenv
3
- } from "./chunk-UFKH5WD2.js";
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,9 +1,9 @@
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-CHUOCTRP.js";
6
+ } from "./chunk-P2H6PV4O.js";
7
7
 
8
8
  // src/agnostic/css/styles-set/index.tsx
9
9
  import { Component } from "react";
@@ -1,12 +1,12 @@
1
+ import {
2
+ directory_exports
3
+ } from "./chunk-X5F6XGEP.js";
1
4
  import {
2
5
  file_exports
3
- } from "./chunk-IWDIKDYR.js";
6
+ } from "./chunk-E33DCHHS.js";
4
7
  import {
5
8
  bucket_exports
6
- } from "./chunk-UXEKCYL7.js";
7
- import {
8
- directory_exports
9
- } from "./chunk-AIC5YAJU.js";
9
+ } from "./chunk-UEAMPAHK.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 {
@@ -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
+ };