@design-edito/tools 0.1.64 → 0.1.66

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 (458) hide show
  1. package/agnostic/arrays/find-duplicates/index.js +1 -1
  2. package/agnostic/arrays/index.js +8 -8
  3. package/agnostic/arrays/is-array-of/index.js +1 -1
  4. package/agnostic/arrays/make/index.js +1 -1
  5. package/agnostic/arrays/random-pick/index.js +5 -5
  6. package/agnostic/arrays/shuffle/index.js +1 -1
  7. package/agnostic/booleans/index.js +1 -1
  8. package/agnostic/booleans/is-falsy/index.js +1 -1
  9. package/agnostic/colors/complement-color/index.d.ts +1 -0
  10. package/agnostic/colors/complement-color/index.js +7 -0
  11. package/agnostic/colors/hex-to-rgb/index.d.ts +1 -0
  12. package/agnostic/colors/hex-to-rgb/index.js +7 -0
  13. package/agnostic/colors/hsl-to-rgb/index.d.ts +1 -0
  14. package/agnostic/colors/hsl-to-rgb/index.js +7 -0
  15. package/agnostic/colors/index.d.ts +16 -0
  16. package/agnostic/colors/index.js +37 -0
  17. package/agnostic/colors/lighten-color/index.d.ts +2 -0
  18. package/agnostic/colors/lighten-color/index.js +11 -0
  19. package/agnostic/colors/rgb-to-hex/index.d.ts +1 -0
  20. package/agnostic/colors/rgb-to-hex/index.js +7 -0
  21. package/agnostic/colors/rgb-to-hsl/index.d.ts +1 -0
  22. package/agnostic/colors/rgb-to-hsl/index.js +7 -0
  23. package/agnostic/colors/saturate-color/index.d.ts +2 -0
  24. package/agnostic/colors/saturate-color/index.js +11 -0
  25. package/agnostic/css/bem/index.js +1 -1
  26. package/agnostic/css/generate-nice-color/index.js +1 -1
  27. package/agnostic/css/index.js +12 -12
  28. package/agnostic/css/is-valid-css-class-name/index.js +1 -1
  29. package/agnostic/css/styles-set/index.js +5 -5
  30. package/agnostic/errors/index.js +3 -3
  31. package/agnostic/errors/register/index.js +1 -1
  32. package/agnostic/errors/unknown-to-string/index.js +1 -1
  33. package/agnostic/html/get-node-ancestors/index.js +1 -1
  34. package/agnostic/html/get-position-inside-parent/index.js +1 -1
  35. package/agnostic/html/hyper-json/cast/index.d.ts +1 -1
  36. package/agnostic/html/hyper-json/cast/index.js +5 -5
  37. package/agnostic/html/hyper-json/index.js +6 -6
  38. package/agnostic/html/hyper-json/method/index.js +1 -1
  39. package/agnostic/html/hyper-json/serialize/index.js +1 -1
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +5 -5
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.d.ts +3 -1
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +5 -5
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +5 -5
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +5 -5
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +5 -5
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +5 -5
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +5 -5
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -5
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +5 -5
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +5 -5
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +5 -5
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -5
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +5 -5
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +5 -5
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +5 -5
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +5 -5
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +5 -5
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +5 -5
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +5 -5
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +5 -5
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +5 -5
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +5 -5
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +5 -5
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +5 -5
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +5 -5
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +5 -5
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.d.ts +2 -2
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +5 -5
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.d.ts +3 -1
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +5 -5
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +5 -5
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +5 -5
  73. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +5 -5
  74. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +5 -5
  75. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.d.ts +2 -2
  76. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +5 -5
  77. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +5 -5
  78. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +5 -5
  79. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +5 -5
  80. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +5 -5
  81. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +5 -5
  82. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +5 -5
  83. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.d.ts +3 -1
  84. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +5 -5
  85. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.d.ts +3 -1
  86. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +5 -5
  87. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +5 -5
  88. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +5 -5
  89. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +5 -5
  90. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +5 -5
  91. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +5 -5
  92. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +5 -5
  93. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +5 -5
  94. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +5 -5
  95. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +5 -5
  96. package/agnostic/html/hyper-json/smart-tags/index.js +1 -1
  97. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +1 -1
  98. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +1 -1
  99. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +5 -5
  100. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +5 -5
  101. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +5 -5
  102. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +5 -5
  103. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +5 -5
  104. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +5 -5
  105. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +1 -1
  106. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +5 -5
  107. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +5 -5
  108. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +5 -5
  109. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +5 -5
  110. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +5 -5
  111. package/agnostic/html/hyper-json/transformer/index.js +1 -1
  112. package/agnostic/html/hyper-json/tree/index.js +5 -5
  113. package/agnostic/html/hyper-json/types/index.js +1 -1
  114. package/agnostic/html/hyper-json/utils/index.d.ts +5 -0
  115. package/agnostic/html/hyper-json/utils/index.js +5 -5
  116. package/agnostic/html/index.js +17 -17
  117. package/agnostic/html/insert-node/index.js +1 -1
  118. package/agnostic/html/placeholders/index.js +1 -1
  119. package/agnostic/html/replace-in-element/index.js +1 -1
  120. package/agnostic/html/sanitize/index.js +5 -5
  121. package/agnostic/html/selector-to-element/index.js +5 -5
  122. package/agnostic/html/string-to-nodes/index.js +6 -6
  123. package/agnostic/index.d.ts +2 -0
  124. package/agnostic/misc/assert/index.js +4 -4
  125. package/agnostic/misc/cast/index.js +1 -1
  126. package/agnostic/misc/crawler/index.js +1 -1
  127. package/agnostic/misc/crossenv/detect-runtime/index.js +1 -1
  128. package/agnostic/misc/crossenv/index.js +1 -1
  129. package/agnostic/misc/crossenv/types/index.js +1 -1
  130. package/agnostic/misc/crossenv/window/index.js +1 -1
  131. package/agnostic/misc/data-size/index.js +2 -2
  132. package/agnostic/misc/elo/index.js +1 -1
  133. package/agnostic/misc/get-current-downlink/index.js +1 -1
  134. package/agnostic/misc/index.js +18 -18
  135. package/agnostic/misc/is-constructor-function/index.js +1 -1
  136. package/agnostic/misc/is-nullish/index.js +1 -1
  137. package/agnostic/misc/logs/index.js +1 -1
  138. package/agnostic/misc/logs/logger/index.js +1 -1
  139. package/agnostic/misc/logs/make-text-block/index.js +1 -1
  140. package/agnostic/misc/logs/styles/index.js +1 -1
  141. package/agnostic/misc/lorem-ipsum/index.js +9 -9
  142. package/agnostic/misc/outcome/index.js +1 -1
  143. package/agnostic/numbers/absolute-modulo/index.js +1 -1
  144. package/agnostic/numbers/clamp/index.js +1 -1
  145. package/agnostic/numbers/index.js +5 -5
  146. package/agnostic/numbers/interpolate/index.js +1 -1
  147. package/agnostic/numbers/responsive-harmonics/index.js +1 -1
  148. package/agnostic/numbers/round/index.js +1 -1
  149. package/agnostic/objects/deep-get-property/index.js +1 -1
  150. package/agnostic/objects/enums/index.js +1 -1
  151. package/agnostic/objects/enums/is-in-enum/index.js +1 -1
  152. package/agnostic/objects/flatten-getters/index.js +1 -1
  153. package/agnostic/objects/index.js +9 -9
  154. package/agnostic/objects/is-object/index.js +1 -1
  155. package/agnostic/objects/is-record/index.js +1 -1
  156. package/agnostic/objects/record-format/index.js +1 -1
  157. package/agnostic/objects/record-map/index.js +1 -1
  158. package/agnostic/objects/validation/index.js +1 -1
  159. package/agnostic/optim/index.js +4 -4
  160. package/agnostic/optim/memoize/index.js +1 -1
  161. package/agnostic/optim/throttle-debounce/index.js +1 -1
  162. package/agnostic/random/hex-char/index.js +1 -1
  163. package/agnostic/random/index.js +1 -1
  164. package/agnostic/random/random/index.js +1 -1
  165. package/agnostic/random/uuid/index.js +1 -1
  166. package/agnostic/regexps/index.js +1 -1
  167. package/agnostic/sanitization/index.d.ts +3 -0
  168. package/agnostic/sanitization/index.js +1311 -0
  169. package/agnostic/strings/char-codes/index.js +1 -1
  170. package/agnostic/strings/index.js +6 -6
  171. package/agnostic/strings/matches/index.js +1 -1
  172. package/agnostic/strings/normalize-indent/index.js +1 -1
  173. package/agnostic/strings/replace-all/index.js +1 -1
  174. package/agnostic/strings/to-alphanum/index.js +1 -1
  175. package/agnostic/strings/trim/index.js +1 -1
  176. package/agnostic/time/dates/format-date/index.js +1 -1
  177. package/agnostic/time/dates/index.js +1 -1
  178. package/agnostic/time/duration/index.js +1 -1
  179. package/agnostic/time/index.js +6 -6
  180. package/agnostic/time/timeout/index.js +1 -1
  181. package/agnostic/time/transitions/index.js +1 -1
  182. package/agnostic/time/wait/index.js +1 -1
  183. package/chunks/chunk-26QQ56SS.js +36 -0
  184. package/chunks/chunk-2H5RIOJO.js +16 -0
  185. package/chunks/chunk-2KT7AKRW.js +17 -0
  186. package/chunks/chunk-2POD3TAX.js +11 -0
  187. package/chunks/chunk-2TJCB6IM.js +12 -0
  188. package/chunks/chunk-334MFRHI.js +56 -0
  189. package/chunks/chunk-33YK4WOA.js +18 -0
  190. package/chunks/chunk-3KN4IIQU.js +23 -0
  191. package/chunks/chunk-3LAWRHHB.js +23 -0
  192. package/chunks/chunk-3UM5CZA5.js +18 -0
  193. package/chunks/chunk-3XNFVOJF.js +20 -0
  194. package/chunks/chunk-45WKBXSF.js +39 -0
  195. package/chunks/chunk-4TGRV2AB.js +18 -0
  196. package/chunks/chunk-4WZEYD3R.js +56 -0
  197. package/chunks/chunk-5GBYBDYQ.js +36 -0
  198. package/chunks/chunk-5JNJVGDX.js +20 -0
  199. package/chunks/chunk-5SWBMXLR.js +98 -0
  200. package/chunks/chunk-5TRAENM3.js +31 -0
  201. package/chunks/chunk-662SOZWA.js +19 -0
  202. package/chunks/chunk-6EIF24H5.js +35 -0
  203. package/chunks/chunk-6HPXM6ED.js +20 -0
  204. package/chunks/chunk-6IZ5HUJJ.js +21 -0
  205. package/chunks/chunk-76QORXDC.js +19 -0
  206. package/chunks/chunk-7BCQCDGQ.js +31 -0
  207. package/chunks/chunk-7FJKDVBE.js +49 -0
  208. package/chunks/chunk-7KCMLH6B.js +22 -0
  209. package/chunks/chunk-7Z7CKAOH.js +98 -0
  210. package/chunks/chunk-ADTQQNIQ.js +47 -0
  211. package/chunks/chunk-AMXIZUFB.js +16 -0
  212. package/chunks/chunk-AWVQJNGX.js +101 -0
  213. package/chunks/chunk-AZOSX3LU.js +191 -0
  214. package/chunks/chunk-BANYGSW4.js +20 -0
  215. package/chunks/chunk-BGZ5OVVN.js +20 -0
  216. package/chunks/chunk-BWXVJB4I.js +20 -0
  217. package/chunks/chunk-C3ZKLONL.js +21 -0
  218. package/chunks/chunk-C7SRAQMW.js +29 -0
  219. package/chunks/chunk-CM6AHRTS.js +16 -0
  220. package/chunks/chunk-CP454IJD.js +231 -0
  221. package/chunks/chunk-CQEDNACN.js +28 -0
  222. package/chunks/chunk-CSZFW4R5.js +69 -0
  223. package/chunks/chunk-CYIUZX2T.js +31 -0
  224. package/chunks/chunk-D33KC6NN.js +18 -0
  225. package/chunks/chunk-D47ZPEUU.js +22 -0
  226. package/chunks/chunk-DEQ5N53D.js +21 -0
  227. package/chunks/chunk-E3GK7YZ7.js +65 -0
  228. package/chunks/chunk-E4FJHD5R.js +67 -0
  229. package/chunks/chunk-E7J4E6OB.js +65 -0
  230. package/chunks/chunk-EA4L7AGZ.js +48 -0
  231. package/chunks/chunk-FAXNZG5C.js +10 -0
  232. package/chunks/chunk-FCLAFRIW.js +177 -0
  233. package/chunks/chunk-FMRPJBUC.js +20 -0
  234. package/chunks/chunk-FTT6ZCCS.js +29 -0
  235. package/chunks/chunk-G2M3VECP.js +20 -0
  236. package/chunks/chunk-G3HAKMUB.js +79 -0
  237. package/chunks/chunk-GCHQD7MH.js +63 -0
  238. package/chunks/chunk-GXICX4F6.js +31 -0
  239. package/chunks/chunk-H73SGDQI.js +20 -0
  240. package/chunks/chunk-H7LDIXVY.js +48 -0
  241. package/chunks/chunk-HALUZA2X.js +16 -0
  242. package/chunks/chunk-HDK7W7GS.js +20 -0
  243. package/chunks/chunk-HUC2IRGW.js +205 -0
  244. package/chunks/chunk-IARWH6LC.js +34 -0
  245. package/chunks/chunk-IJAFLBHD.js +16 -0
  246. package/chunks/chunk-JBSS64SA.js +6 -0
  247. package/chunks/chunk-JBZR6R5B.js +15 -0
  248. package/chunks/chunk-JRYI4VBX.js +22 -0
  249. package/chunks/chunk-KFMYB672.js +31 -0
  250. package/chunks/chunk-KN23H4CI.js +20 -0
  251. package/chunks/chunk-LNSDOGTR.js +63 -0
  252. package/chunks/chunk-LOAOXFA2.js +2369 -0
  253. package/chunks/chunk-LOY7C5BP.js +151 -0
  254. package/chunks/chunk-LSOHLSF5.js +32 -0
  255. package/chunks/chunk-MAE5XZGF.js +37 -0
  256. package/chunks/chunk-MB7HWF22.js +23 -0
  257. package/chunks/chunk-MFWKY3DT.js +32 -0
  258. package/chunks/chunk-MOBGB2PH.js +54 -0
  259. package/chunks/chunk-MOVLLUDL.js +25 -0
  260. package/chunks/chunk-MTGZYBK2.js +129 -0
  261. package/chunks/chunk-MV2LDBDF.js +164 -0
  262. package/chunks/chunk-MVNQWIVH.js +151 -0
  263. package/chunks/chunk-MXGGOCLX.js +56 -0
  264. package/chunks/chunk-MZZOFFFT.js +21 -0
  265. package/chunks/chunk-NA3M6VUU.js +20 -0
  266. package/chunks/chunk-NAP2XNYN.js +23 -0
  267. package/chunks/chunk-NZLE2WMY.js +35 -0
  268. package/chunks/chunk-O7UEQQ6H.js +49 -0
  269. package/chunks/chunk-OCM3RLO6.js +73 -0
  270. package/chunks/chunk-OPU4CANL.js +35 -0
  271. package/chunks/chunk-OSZ4BWDE.js +32 -0
  272. package/chunks/chunk-OUJTDMHK.js +16 -0
  273. package/chunks/chunk-OWCPJD6O.js +16 -0
  274. package/chunks/chunk-P2H6PV4O.js +26 -0
  275. package/chunks/chunk-P5OGBBGM.js +37 -0
  276. package/chunks/chunk-PENYZ6S7.js +31 -0
  277. package/chunks/chunk-PEUWFUEZ.js +98 -0
  278. package/chunks/chunk-PSP2DKDH.js +151 -0
  279. package/chunks/chunk-PXRLKO5Y.js +23 -0
  280. package/chunks/chunk-QAE3OWOI.js +79 -0
  281. package/chunks/chunk-QLC3A6PC.js +17 -0
  282. package/chunks/chunk-QUDIXNB2.js +18 -0
  283. package/chunks/chunk-RCWLMVSZ.js +164 -0
  284. package/chunks/chunk-RDQJSWRC.js +127 -0
  285. package/chunks/chunk-RGGOIE34.js +20 -0
  286. package/chunks/chunk-RLTBF5FT.js +23 -0
  287. package/chunks/chunk-RPWYARS3.js +18 -0
  288. package/chunks/chunk-RVZ32GPI.js +55 -0
  289. package/chunks/chunk-S2PB2PLY.js +191 -0
  290. package/chunks/chunk-SC54OKBX.js +43 -0
  291. package/chunks/chunk-SJFY537W.js +84 -0
  292. package/chunks/chunk-SNRRHDIZ.js +31 -0
  293. package/chunks/chunk-SZQHLC4K.js +31 -0
  294. package/chunks/chunk-T2T5BYTW.js +18 -0
  295. package/chunks/chunk-T55QIYYV.js +32 -0
  296. package/chunks/chunk-TXGV4KJD.js +31 -0
  297. package/chunks/chunk-U57Q62IN.js +23 -0
  298. package/chunks/chunk-U7CF7IDN.js +35 -0
  299. package/chunks/chunk-U7R6TPHR.js +15 -0
  300. package/chunks/chunk-UNHNZAVP.js +18 -0
  301. package/chunks/chunk-UUSZJMJB.js +37 -0
  302. package/chunks/chunk-V4S34MIM.js +32 -0
  303. package/chunks/chunk-VHAGPTVR.js +37 -0
  304. package/chunks/chunk-VQUF2TSY.js +191 -0
  305. package/chunks/chunk-W6JPRXQ4.js +16 -0
  306. package/chunks/chunk-WLGIDY6A.js +2456 -0
  307. package/chunks/chunk-WMSE5GRO.js +63 -0
  308. package/chunks/chunk-WR64YJNW.js +20 -0
  309. package/chunks/chunk-WRRA3BN4.js +31 -0
  310. package/chunks/chunk-WU3JQC7W.js +164 -0
  311. package/chunks/chunk-X244JGZD.js +69 -0
  312. package/chunks/chunk-X5HMM3LD.js +35 -0
  313. package/chunks/chunk-XEAHMN2T.js +4063 -0
  314. package/chunks/chunk-XF5QBETN.js +48 -0
  315. package/chunks/chunk-XJ23DJY4.js +173 -0
  316. package/chunks/chunk-XN44EWRS.js +21 -0
  317. package/chunks/chunk-XSVBWVVC.js +20 -0
  318. package/chunks/chunk-XZ7II65Z.js +31 -0
  319. package/chunks/chunk-YCSC7QNV.js +30 -0
  320. package/chunks/chunk-YE67BQQN.js +4072 -0
  321. package/chunks/chunk-YEYXAV23.js +16 -0
  322. package/chunks/chunk-YLKBLE6G.js +30 -0
  323. package/chunks/chunk-YRQ7LODK.js +177 -0
  324. package/chunks/chunk-YVLJKJV2.js +17 -0
  325. package/chunks/chunk-YW5ASSIQ.js +31 -0
  326. package/chunks/chunk-YXJXNTCV.js +65 -0
  327. package/chunks/chunk-YYA5VRE4.js +177 -0
  328. package/chunks/chunk-Z4PVE6SR.js +21 -0
  329. package/chunks/chunk-ZMMNN3QA.js +16 -0
  330. package/chunks/chunk-ZRWVPWQC.js +36 -0
  331. package/chunks/chunk-ZZH6RUS3.js +48 -0
  332. package/components/Comp/index.js +1 -1
  333. package/node/@aws-s3/index.js +5 -5
  334. package/node/@aws-s3/storage/file/download/index.js +2 -2
  335. package/node/@aws-s3/storage/file/index.js +4 -4
  336. package/node/@aws-s3/storage/file/upload/index.js +2 -2
  337. package/node/@aws-s3/storage/index.js +5 -5
  338. package/node/@design-edito/index.js +2 -7
  339. package/node/@design-edito/thumbnails/index.d.ts +1 -5
  340. package/node/@design-edito/thumbnails/index.js +1 -20
  341. package/node/@express/@multer/index.js +2 -2
  342. package/node/@express/index.js +2 -2
  343. package/node/@google-cloud/index.js +17 -17
  344. package/node/@google-cloud/storage/bucket/get-metadata/index.js +2 -2
  345. package/node/@google-cloud/storage/bucket/index.js +4 -4
  346. package/node/@google-cloud/storage/bucket/list/index.js +2 -2
  347. package/node/@google-cloud/storage/file/copy/index.js +2 -2
  348. package/node/@google-cloud/storage/file/download/index.js +2 -2
  349. package/node/@google-cloud/storage/file/erase/index.js +2 -2
  350. package/node/@google-cloud/storage/file/exists/index.js +2 -2
  351. package/node/@google-cloud/storage/file/generate-signed-url/index.js +2 -2
  352. package/node/@google-cloud/storage/file/get-metadata/index.js +2 -2
  353. package/node/@google-cloud/storage/file/get-permissions/index.js +2 -2
  354. package/node/@google-cloud/storage/file/index.js +21 -21
  355. package/node/@google-cloud/storage/file/move/index.js +2 -2
  356. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +5 -5
  357. package/node/@google-cloud/storage/file/update-metadata/index.js +2 -2
  358. package/node/@google-cloud/storage/file/upload/index.js +2 -2
  359. package/node/@google-cloud/storage/index.js +19 -19
  360. package/node/cloud-storage/client/index.js +3 -3
  361. package/node/cloud-storage/credentials/index.js +2 -2
  362. package/node/cloud-storage/endpoint/index.js +2 -2
  363. package/node/cloud-storage/index.js +19 -19
  364. package/node/cloud-storage/operations/download/index.js +7 -7
  365. package/node/cloud-storage/operations/index.js +13 -13
  366. package/node/cloud-storage/operations/upload/index.js +7 -7
  367. package/node/encryption/@aes-256-gcm/buffer/index.js +3 -3
  368. package/node/encryption/@aes-256-gcm/index.js +4 -4
  369. package/node/encryption/@aes-256-gcm/uint8-array/index.js +2 -2
  370. package/node/encryption/index.js +5 -5
  371. package/node/encryption/key/index.js +2 -2
  372. package/node/files/index.js +4 -4
  373. package/node/files/is-in-directory/index.js +1 -1
  374. package/node/files/read-write/index.js +1 -1
  375. package/node/files/subpaths/index.js +1 -1
  376. package/node/ftps/file/download/index.js +2 -2
  377. package/node/ftps/file/index.js +4 -4
  378. package/node/ftps/file/upload/index.js +2 -2
  379. package/node/ftps/index.js +4 -4
  380. package/node/images/format/index.d.ts +52 -0
  381. package/node/images/format/index.js +27 -0
  382. package/node/images/index.d.ts +1 -1
  383. package/node/images/index.js +50 -17
  384. package/node/images/prepare/index.d.ts +11 -4
  385. package/node/images/prepare/index.js +50 -15
  386. package/node/images/transform/_utils/color-schema/index.d.ts +3 -0
  387. package/node/images/transform/_utils/color-schema/index.js +8 -0
  388. package/node/images/transform/_utils/operation-names/index.d.ts +20 -0
  389. package/node/images/transform/_utils/operation-names/index.js +7 -0
  390. package/node/images/transform/_utils/positions/index.d.ts +33 -0
  391. package/node/images/transform/_utils/positions/index.js +10 -0
  392. package/node/images/transform/blur/index.d.ts +10 -0
  393. package/node/images/transform/blur/index.js +9 -0
  394. package/node/images/transform/brighten/index.d.ts +8 -0
  395. package/node/images/transform/brighten/index.js +9 -0
  396. package/node/images/transform/compose/index.d.ts +38 -0
  397. package/node/images/transform/compose/index.js +11 -0
  398. package/node/images/transform/extend/index.d.ts +16 -0
  399. package/node/images/transform/extend/index.js +10 -0
  400. package/node/images/transform/extract/index.d.ts +13 -0
  401. package/node/images/transform/extract/index.js +9 -0
  402. package/node/images/transform/flatten/index.d.ts +11 -0
  403. package/node/images/transform/flatten/index.js +10 -0
  404. package/node/images/transform/flip/index.d.ts +10 -0
  405. package/node/images/transform/flip/index.js +9 -0
  406. package/node/images/transform/flop/index.d.ts +10 -0
  407. package/node/images/transform/flop/index.js +9 -0
  408. package/node/images/transform/frame/backgrounds/create-line-background/index.d.ts +155 -0
  409. package/node/images/transform/frame/backgrounds/create-line-background/index.js +10 -0
  410. package/node/images/transform/frame/backgrounds/create-tile-background/index.d.ts +106 -0
  411. package/node/images/transform/frame/backgrounds/create-tile-background/index.js +10 -0
  412. package/node/images/transform/frame/index.d.ts +44 -0
  413. package/node/images/transform/frame/index.js +13 -0
  414. package/node/images/transform/hue-rotate/index.d.ts +8 -0
  415. package/node/images/transform/hue-rotate/index.js +9 -0
  416. package/node/images/transform/index.d.ts +24 -6
  417. package/node/images/transform/index.js +52 -15
  418. package/node/images/transform/lighten/index.d.ts +8 -0
  419. package/node/images/transform/lighten/index.js +9 -0
  420. package/node/images/transform/lineate-levels/index.d.ts +11 -0
  421. package/node/images/transform/lineate-levels/index.js +9 -0
  422. package/node/images/transform/modulate/index.d.ts +13 -0
  423. package/node/images/transform/modulate/index.js +9 -0
  424. package/node/images/transform/normalize/index.d.ts +11 -0
  425. package/node/images/transform/normalize/index.js +9 -0
  426. package/node/images/transform/operations/_utils/compose/index.d.ts +3 -0
  427. package/node/images/transform/operations/_utils/compose/index.js +8 -0
  428. package/node/images/transform/operations/_utils/frame/backgrounds/create-line-background/index.d.ts +6 -0
  429. package/node/images/transform/operations/_utils/frame/backgrounds/create-line-background/index.js +12 -0
  430. package/node/images/transform/operations/_utils/frame/backgrounds/create-tile-background/index.d.ts +14 -0
  431. package/node/images/transform/operations/_utils/frame/backgrounds/create-tile-background/index.js +14 -0
  432. package/node/images/transform/operations/_utils/frame/create-color-palette/index.d.ts +11 -0
  433. package/node/images/transform/operations/_utils/frame/create-color-palette/index.js +17 -0
  434. package/node/images/transform/operations/_utils/frame/extract-colors-from-image/index.d.ts +10 -0
  435. package/node/images/transform/operations/_utils/frame/extract-colors-from-image/index.js +11 -0
  436. package/node/images/transform/operations/_utils/frame/index.d.ts +7 -0
  437. package/node/images/transform/operations/_utils/frame/index.js +24 -0
  438. package/node/images/transform/operations/_utils/positions/index.d.ts +16 -0
  439. package/node/images/transform/operations/_utils/positions/index.js +11 -0
  440. package/node/images/transform/operations/_utils/scale/index.d.ts +3 -0
  441. package/node/images/transform/operations/_utils/scale/index.js +7 -0
  442. package/node/images/transform/operations/index.d.ts +0 -207
  443. package/node/images/transform/operations/index.js +0 -21
  444. package/node/images/transform/resize/index.d.ts +16 -0
  445. package/node/images/transform/resize/index.js +10 -0
  446. package/node/images/transform/rotate/index.d.ts +9 -0
  447. package/node/images/transform/rotate/index.js +9 -0
  448. package/node/images/transform/saturate/index.d.ts +8 -0
  449. package/node/images/transform/saturate/index.js +9 -0
  450. package/node/images/transform/scale/index.d.ts +13 -0
  451. package/node/images/transform/scale/index.js +10 -0
  452. package/node/process/index.js +1 -1
  453. package/node/process/on-exit/index.js +1 -1
  454. package/node/sftp/file/download/index.js +2 -2
  455. package/node/sftp/file/index.js +4 -4
  456. package/node/sftp/file/upload/index.js +2 -2
  457. package/node/sftp/index.js +4 -4
  458. package/package.json +12 -12
@@ -0,0 +1,151 @@
1
+ import {
2
+ formatImage
3
+ } from "./chunk-SJFY537W.js";
4
+ import {
5
+ transform
6
+ } from "./chunk-YYA5VRE4.js";
7
+ import {
8
+ __export
9
+ } from "./chunk-NZLE2WMY.js";
10
+
11
+ // src/node/images/prepare/index.ts
12
+ var prepare_exports = {};
13
+ __export(prepare_exports, {
14
+ MAX_NB_OUTPUTS: () => MAX_NB_OUTPUTS,
15
+ OUTPUT_ZIP_FOLDER: () => OUTPUT_ZIP_FOLDER,
16
+ exportZipBuffer: () => exportZipBuffer,
17
+ prepareImage: () => prepareImage
18
+ });
19
+ import sharp from "sharp";
20
+ import { Writable } from "node:stream";
21
+ import archiver from "archiver";
22
+ var MAX_NB_OUTPUTS = 50;
23
+ var OUTPUT_ZIP_FOLDER = "./output-zips";
24
+ async function prepareImage(imageBuffer, customOptions) {
25
+ const sharpImage = sharp(imageBuffer);
26
+ const sharpImageMetadata = await sharpImage.metadata();
27
+ const imageBufferMetadata = {
28
+ width: sharpImageMetadata.width ?? 0,
29
+ height: sharpImageMetadata.height ?? 0,
30
+ format: sharpImageMetadata.format || "png"
31
+ };
32
+ const options = getOptions(imageBufferMetadata, customOptions);
33
+ const nbOutputs = options.qualities.length * (options.ratios.length + 1) * (options.widths.length + 1) * (options.heights.length + 1);
34
+ if (nbOutputs > MAX_NB_OUTPUTS) throw Error("Nb output exceeds supported max nb output");
35
+ let transformedBuffer = imageBuffer;
36
+ try {
37
+ transformedBuffer = await transform(imageBuffer, options.inputOperations, options.checkValidOperations);
38
+ } catch (e) {
39
+ console.log("Images:Prepare:Transform:Buffer:Error", { e });
40
+ }
41
+ const transformedBufferMetadata = await sharp(transformedBuffer).metadata();
42
+ const exportsBuffers = [
43
+ {
44
+ buffer: imageBuffer,
45
+ name: generateFileName({
46
+ ...imageBufferMetadata,
47
+ quality: 100,
48
+ suffix: "original",
49
+ prefix: options.name
50
+ })
51
+ },
52
+ {
53
+ buffer: transformedBuffer,
54
+ name: generateFileName({
55
+ width: transformedBufferMetadata.width || 0,
56
+ height: transformedBufferMetadata.height || 0,
57
+ format: transformedBufferMetadata.format || "png",
58
+ quality: 100,
59
+ suffix: "transformed-unresized",
60
+ prefix: options.name
61
+ })
62
+ }
63
+ ];
64
+ for (const width of options.widths) {
65
+ for (const height of options.heights) {
66
+ for (const quality of options.qualities) {
67
+ for (const format of options.formats) {
68
+ const exportBuffer = await formatImage(transformedBuffer, {
69
+ format,
70
+ quality,
71
+ width,
72
+ height
73
+ });
74
+ exportsBuffers.push({
75
+ buffer: exportBuffer,
76
+ name: generateFileName({
77
+ width,
78
+ height,
79
+ quality,
80
+ format,
81
+ prefix: options.name
82
+ })
83
+ });
84
+ }
85
+ }
86
+ }
87
+ }
88
+ console.log("Images:Transform:Export:ZIP", generateZipName(options.name));
89
+ const zipBuffer = exportZipBuffer(exportsBuffers, generateZipName(options.name));
90
+ return zipBuffer;
91
+ }
92
+ function exportZipBuffer(zipSources, zipDirectoryName) {
93
+ return new Promise(async (resolve) => {
94
+ const archive = archiver("zip", { zlib: { level: 9 } });
95
+ if (zipDirectoryName) {
96
+ archive.directory(zipDirectoryName + "/", false);
97
+ }
98
+ zipSources.forEach((zipSource) => {
99
+ const fileName = zipDirectoryName ? `${zipDirectoryName}/${zipSource.name}` : zipSource.name;
100
+ archive.append(zipSource.buffer, { name: fileName });
101
+ });
102
+ const chunks = [];
103
+ const writable = new Writable();
104
+ writable._write = (chunk, _enc, callback) => {
105
+ chunks.push(chunk);
106
+ callback();
107
+ };
108
+ archive.pipe(writable);
109
+ await archive.finalize();
110
+ const bufferZip = Buffer.concat(chunks);
111
+ resolve(bufferZip);
112
+ });
113
+ }
114
+ function getOptions(imageBufferMetadata, options) {
115
+ return {
116
+ center: [0.5, 0.5],
117
+ qualities: [100],
118
+ inputOperations: [],
119
+ ...options,
120
+ checkValidOperations: options?.checkValidOperations ?? false,
121
+ name: options?.name ?? "",
122
+ formats: [imageBufferMetadata.format, ...options?.formats ? options.formats : []],
123
+ ratios: [...options?.ratios ? options.ratios : []],
124
+ widths: [imageBufferMetadata.width, ...options?.widths ? options.widths : []],
125
+ heights: [imageBufferMetadata.height, ...options?.heights ? options.heights : []]
126
+ };
127
+ }
128
+ function generateZipName(name = "") {
129
+ const date = /* @__PURE__ */ new Date();
130
+ return `${name}_image-exports_${date.toLocaleDateString()}_${date.toLocaleTimeString()}_${date.getTime()}`.replace(/\/|:/g, "-").replace(/ /g, "").trim();
131
+ }
132
+ function generateFileName({
133
+ width,
134
+ height,
135
+ quality,
136
+ format,
137
+ suffix,
138
+ prefix
139
+ }) {
140
+ prefix = prefix ? `${prefix}_` : "image-formats_";
141
+ suffix = `${suffix ? `_${suffix}` : ""}.${format}`;
142
+ return `${prefix}${width}x${height}_Q${quality}${suffix}`;
143
+ }
144
+
145
+ export {
146
+ MAX_NB_OUTPUTS,
147
+ OUTPUT_ZIP_FOLDER,
148
+ prepareImage,
149
+ exportZipBuffer,
150
+ prepare_exports
151
+ };
@@ -0,0 +1,56 @@
1
+ import {
2
+ exists_exports
3
+ } from "./chunk-TXGV4KJD.js";
4
+ import {
5
+ get_permissions_exports
6
+ } from "./chunk-GXICX4F6.js";
7
+ import {
8
+ generate_signed_url_exports
9
+ } from "./chunk-OPU4CANL.js";
10
+ import {
11
+ revoke_signed_urls_exports
12
+ } from "./chunk-P5OGBBGM.js";
13
+ import {
14
+ erase_exports
15
+ } from "./chunk-7BCQCDGQ.js";
16
+ import {
17
+ move_exports
18
+ } from "./chunk-T55QIYYV.js";
19
+ import {
20
+ get_metadata_exports
21
+ } from "./chunk-KFMYB672.js";
22
+ import {
23
+ update_metadata_exports
24
+ } from "./chunk-YW5ASSIQ.js";
25
+ import {
26
+ copy_exports
27
+ } from "./chunk-SZQHLC4K.js";
28
+ import {
29
+ upload_exports
30
+ } from "./chunk-7FJKDVBE.js";
31
+ import {
32
+ download_exports
33
+ } from "./chunk-IARWH6LC.js";
34
+ import {
35
+ __export
36
+ } from "./chunk-NZLE2WMY.js";
37
+
38
+ // src/node/@google-cloud/storage/file/index.ts
39
+ var file_exports = {};
40
+ __export(file_exports, {
41
+ Copy: () => copy_exports,
42
+ Download: () => download_exports,
43
+ Erase: () => erase_exports,
44
+ Exists: () => exists_exports,
45
+ GenerateSignedUrl: () => generate_signed_url_exports,
46
+ GetMetaData: () => get_metadata_exports,
47
+ GetPermissions: () => get_permissions_exports,
48
+ Move: () => move_exports,
49
+ RevokeSignedUrls: () => revoke_signed_urls_exports,
50
+ UpdateMetadata: () => update_metadata_exports,
51
+ Upload: () => upload_exports
52
+ });
53
+
54
+ export {
55
+ file_exports
56
+ };
@@ -0,0 +1,21 @@
1
+ import {
2
+ colorSchema
3
+ } from "./chunk-JBZR6R5B.js";
4
+ import {
5
+ z
6
+ } from "./chunk-XEAHMN2T.js";
7
+ import {
8
+ OperationNames
9
+ } from "./chunk-MOVLLUDL.js";
10
+
11
+ // src/node/images/transform/flatten/index.ts
12
+ var flattenSchema = z.object({
13
+ name: z.literal(OperationNames.Flatten),
14
+ params: z.object({
15
+ background: colorSchema
16
+ })
17
+ });
18
+
19
+ export {
20
+ flattenSchema
21
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ download_exports
3
+ } from "./chunk-V4S34MIM.js";
4
+ import {
5
+ upload_exports
6
+ } from "./chunk-45WKBXSF.js";
7
+ import {
8
+ __export
9
+ } from "./chunk-NZLE2WMY.js";
10
+
11
+ // src/node/sftp/file/index.ts
12
+ var file_exports = {};
13
+ __export(file_exports, {
14
+ Download: () => download_exports,
15
+ Upload: () => upload_exports
16
+ });
17
+
18
+ export {
19
+ file_exports
20
+ };
@@ -0,0 +1,23 @@
1
+ import {
2
+ colorSchema
3
+ } from "./chunk-U7R6TPHR.js";
4
+ import {
5
+ OperationNames
6
+ } from "./chunk-MOVLLUDL.js";
7
+ import {
8
+ esm_default
9
+ } from "./chunk-YE67BQQN.js";
10
+
11
+ // src/node/images/transform/scale/index.ts
12
+ var scaleSchema = esm_default.object({
13
+ name: esm_default.literal(OperationNames.Scale),
14
+ params: esm_default.object({
15
+ xRatio: esm_default.optional(esm_default.number().min(0).max(1)),
16
+ yRatio: esm_default.optional(esm_default.number().min(0).max(1)),
17
+ background: colorSchema
18
+ })
19
+ });
20
+
21
+ export {
22
+ scaleSchema
23
+ };
@@ -0,0 +1,35 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+
31
+ export {
32
+ __commonJS,
33
+ __export,
34
+ __toESM
35
+ };
@@ -0,0 +1,49 @@
1
+ import {
2
+ Outcome
3
+ } from "./chunk-JMU5PDBD.js";
4
+ import {
5
+ unknownToString
6
+ } from "./chunk-FENXVJYO.js";
7
+ import {
8
+ __export
9
+ } from "./chunk-NZLE2WMY.js";
10
+
11
+ // src/node/@aws-s3/storage/file/upload/index.ts
12
+ var upload_exports = {};
13
+ __export(upload_exports, {
14
+ upload: () => upload
15
+ });
16
+ async function upload(fileStream, targetPath, bucketName, s3, options) {
17
+ const {
18
+ uploadSettings,
19
+ fileMetadata,
20
+ overwrite = false
21
+ } = options ?? {};
22
+ if (!overwrite) {
23
+ try {
24
+ const fileLookup = await s3.headObject({ Bucket: bucketName, Key: targetPath }).promise();
25
+ if (fileLookup.Metadata !== void 0) return Outcome.makeFailure(`File already exists at ${targetPath}.`);
26
+ } catch (err) {
27
+ const errStr = unknownToString(err);
28
+ return Outcome.makeFailure(errStr);
29
+ }
30
+ }
31
+ const params = {
32
+ ...fileMetadata,
33
+ Bucket: bucketName,
34
+ Key: targetPath,
35
+ Body: fileStream
36
+ };
37
+ try {
38
+ await s3.upload(params, uploadSettings).promise();
39
+ return Outcome.makeSuccess(true);
40
+ } catch (err) {
41
+ const errStr = unknownToString(err);
42
+ return Outcome.makeFailure(errStr);
43
+ }
44
+ }
45
+
46
+ export {
47
+ upload,
48
+ upload_exports
49
+ };
@@ -0,0 +1,73 @@
1
+ // src/node/images/transform/operations/_utils/positions/index.ts
2
+ function getRelativePxPositionsInWrapperFor(inputDimensions, wrapperDimensions, positions) {
3
+ const outputPositions = {
4
+ x: 0,
5
+ y: 0
6
+ };
7
+ if (positions === void 0) {
8
+ return outputPositions;
9
+ }
10
+ if (positions.top) {
11
+ outputPositions.y = calcPosition(positions.top, wrapperDimensions.heightPx);
12
+ }
13
+ if (positions.bottom) {
14
+ outputPositions.y = wrapperDimensions.heightPx - (calcPosition(positions.bottom, wrapperDimensions.heightPx) + inputDimensions.heightPx);
15
+ }
16
+ if (positions.left) {
17
+ outputPositions.x = calcPosition(positions.left, wrapperDimensions.widthPx);
18
+ }
19
+ if (positions.right) {
20
+ outputPositions.x = wrapperDimensions.widthPx - (calcPosition(positions.right, wrapperDimensions.widthPx) + inputDimensions.widthPx);
21
+ }
22
+ if (positions.translateX) {
23
+ outputPositions.x = outputPositions.x + calcPosition(positions.translateX, inputDimensions.widthPx);
24
+ }
25
+ if (positions.translateY) {
26
+ outputPositions.y = outputPositions.y + calcPosition(positions.translateY, inputDimensions.heightPx);
27
+ }
28
+ const boundX = outputPositions.x + inputDimensions.widthPx;
29
+ if (boundX > wrapperDimensions.widthPx) {
30
+ outputPositions.x = outputPositions.x - (boundX - wrapperDimensions.widthPx);
31
+ }
32
+ const boundY = outputPositions.y + inputDimensions.heightPx;
33
+ if (boundY > wrapperDimensions.heightPx) {
34
+ outputPositions.y = outputPositions.y - (boundY - wrapperDimensions.heightPx);
35
+ }
36
+ outputPositions.x = Math.max(outputPositions.x, 0);
37
+ outputPositions.y = Math.max(outputPositions.y, 0);
38
+ return outputPositions;
39
+ }
40
+ function calcPosition(position, wrapperDimensions) {
41
+ const interpretedPosition = interpretPosition(position);
42
+ if (interpretedPosition.unit === "%") {
43
+ return Math.round(wrapperDimensions * (interpretedPosition.value / 100));
44
+ }
45
+ return interpretedPosition.value;
46
+ }
47
+ function interpretPosition(position) {
48
+ const interpretedPosition = {
49
+ value: 0,
50
+ unit: "px"
51
+ };
52
+ if (typeof position === "number") {
53
+ interpretedPosition.value = position;
54
+ }
55
+ if (typeof position === "string") {
56
+ const matchedPosition = position.replace(/\s+/g, "").match(/(-\d+|\d+)([%]|[px])?/);
57
+ if (matchedPosition) {
58
+ if (matchedPosition[1]) {
59
+ interpretedPosition.value = Number(matchedPosition[1]);
60
+ }
61
+ if (matchedPosition[2]) {
62
+ interpretedPosition.unit = matchedPosition[2];
63
+ }
64
+ }
65
+ }
66
+ return interpretedPosition;
67
+ }
68
+
69
+ export {
70
+ getRelativePxPositionsInWrapperFor,
71
+ calcPosition,
72
+ interpretPosition
73
+ };
@@ -0,0 +1,35 @@
1
+ import {
2
+ Outcome
3
+ } from "./chunk-JMU5PDBD.js";
4
+ import {
5
+ unknownToString
6
+ } from "./chunk-FENXVJYO.js";
7
+ import {
8
+ __export
9
+ } from "./chunk-NZLE2WMY.js";
10
+
11
+ // src/node/@google-cloud/storage/file/generate-signed-url/index.ts
12
+ var generate_signed_url_exports = {};
13
+ __export(generate_signed_url_exports, {
14
+ generateSignedUrl: () => generateSignedUrl
15
+ });
16
+ async function generateSignedUrl(sourcePath, bucket, action, expiresOn, options) {
17
+ const { fileOptions, getSignedUrlOptions } = options ?? {};
18
+ try {
19
+ const file = bucket.file(sourcePath, fileOptions);
20
+ const [url] = await file.getSignedUrl({
21
+ action,
22
+ expires: expiresOn,
23
+ ...getSignedUrlOptions
24
+ });
25
+ return Outcome.makeSuccess(url);
26
+ } catch (err) {
27
+ const errStr = unknownToString(err);
28
+ return Outcome.makeFailure(errStr);
29
+ }
30
+ }
31
+
32
+ export {
33
+ generateSignedUrl,
34
+ generate_signed_url_exports
35
+ };
@@ -0,0 +1,32 @@
1
+ import {
2
+ colorSchema
3
+ } from "./chunk-JBZR6R5B.js";
4
+ import {
5
+ z
6
+ } from "./chunk-XEAHMN2T.js";
7
+ import {
8
+ OperationNames
9
+ } from "./chunk-MOVLLUDL.js";
10
+
11
+ // src/node/images/transform/resize/index.ts
12
+ var resizeSchema = z.object({
13
+ name: z.literal(OperationNames.Resize),
14
+ params: z.object({
15
+ width: z.number().min(0),
16
+ height: z.number().min(0),
17
+ options: z.object({
18
+ background: z.optional(colorSchema),
19
+ fit: z.enum([
20
+ "contain",
21
+ "cover",
22
+ "fill",
23
+ "inside",
24
+ "outside"
25
+ ]).optional()
26
+ }).optional()
27
+ })
28
+ });
29
+
30
+ export {
31
+ resizeSchema
32
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ z
3
+ } from "./chunk-XEAHMN2T.js";
4
+ import {
5
+ OperationNames
6
+ } from "./chunk-MOVLLUDL.js";
7
+
8
+ // src/node/images/transform/brighten/index.ts
9
+ var brightenSchema = z.object({
10
+ name: z.literal(OperationNames.Brighten),
11
+ params: z.number().min(0)
12
+ });
13
+
14
+ export {
15
+ brightenSchema
16
+ };
@@ -0,0 +1,16 @@
1
+ import {
2
+ z
3
+ } from "./chunk-XEAHMN2T.js";
4
+ import {
5
+ OperationNames
6
+ } from "./chunk-MOVLLUDL.js";
7
+
8
+ // src/node/images/transform/hue-rotate/index.ts
9
+ var hueRotateSchema = z.object({
10
+ name: z.literal(OperationNames.HueRotate),
11
+ params: z.number().min(0).max(360)
12
+ });
13
+
14
+ export {
15
+ hueRotateSchema
16
+ };
@@ -0,0 +1,26 @@
1
+ import {
2
+ Crossenv
3
+ } from "./chunk-FR5H2OCV.js";
4
+ import {
5
+ Errors
6
+ } from "./chunk-2KT7AKRW.js";
7
+
8
+ // src/shared/errors/index.ts
9
+ var register = Errors.Register.from({
10
+ ["no-window-document-on-runtime" /* NO_DOCUMENT */]: {
11
+ message: `Runtime '${Crossenv.detectRuntime()}' does not provide a Document object, cannot complete.`,
12
+ detailsMaker: () => void 0
13
+ },
14
+ ["no-window-document-on-runtime-please-provide" /* NO_DOCUMENT_PLEASE_PROVIDE */]: {
15
+ message: `Please provide a Document object since none are found on runtime '${Crossenv.detectRuntime()}'`,
16
+ detailsMaker: (tips) => tips
17
+ },
18
+ ["impossible-to-pick-in-array" /* IMPOSSIBLE_TO_PICK_IN_ARRAY */]: {
19
+ message: "Impossible to pick",
20
+ detailsMaker: (array) => array.length === 0 ? "Array cannot be empty" : "Too many exclusions"
21
+ }
22
+ });
23
+
24
+ export {
25
+ register
26
+ };
@@ -0,0 +1,37 @@
1
+ import {
2
+ erase
3
+ } from "./chunk-7BCQCDGQ.js";
4
+ import {
5
+ upload
6
+ } from "./chunk-7FJKDVBE.js";
7
+ import {
8
+ download
9
+ } from "./chunk-IARWH6LC.js";
10
+ import {
11
+ Outcome
12
+ } from "./chunk-JMU5PDBD.js";
13
+ import {
14
+ __export
15
+ } from "./chunk-NZLE2WMY.js";
16
+
17
+ // src/node/@google-cloud/storage/file/revoke-signed-urls/index.ts
18
+ var revoke_signed_urls_exports = {};
19
+ __export(revoke_signed_urls_exports, {
20
+ revokeSignedUrls: () => revokeSignedUrls
21
+ });
22
+ async function revokeSignedUrls(sourcePath, bucket, options) {
23
+ const { downloadOptions, eraseOptions, uploadOptions } = options ?? {};
24
+ const downloadAttempt = await download(sourcePath, bucket, downloadOptions);
25
+ if (!downloadAttempt.success) return downloadAttempt;
26
+ const deletionAttempt = await erase(sourcePath, bucket, eraseOptions);
27
+ if (!deletionAttempt.success) return deletionAttempt;
28
+ const downloaded = downloadAttempt.payload;
29
+ const reuploadAttempt = await upload(downloaded, sourcePath, bucket, uploadOptions);
30
+ if (!reuploadAttempt.success) return reuploadAttempt;
31
+ return Outcome.makeSuccess(true);
32
+ }
33
+
34
+ export {
35
+ revokeSignedUrls,
36
+ revoke_signed_urls_exports
37
+ };
@@ -0,0 +1,31 @@
1
+ import {
2
+ shuffle
3
+ } from "./chunk-VJJIYJMY.js";
4
+ import {
5
+ findDuplicates
6
+ } from "./chunk-YS6WMSWC.js";
7
+ import {
8
+ isArrayOf
9
+ } from "./chunk-6RGDWX4A.js";
10
+ import {
11
+ make
12
+ } from "./chunk-RLAZR3NL.js";
13
+ import {
14
+ randomPick,
15
+ randomPickMany
16
+ } from "./chunk-C7SRAQMW.js";
17
+
18
+ // src/agnostic/arrays/index.tsx
19
+ var Arrays;
20
+ ((Arrays2) => {
21
+ Arrays2.findDuplicates = findDuplicates;
22
+ Arrays2.isArrayOf = isArrayOf;
23
+ Arrays2.make = make;
24
+ Arrays2.randomPick = randomPick;
25
+ Arrays2.randomPickMany = randomPickMany;
26
+ Arrays2.shuffle = shuffle;
27
+ })(Arrays || (Arrays = {}));
28
+
29
+ export {
30
+ Arrays
31
+ };