@design-edito/tools 0.1.53 → 0.1.54

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 (239) 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/css/bem/index.js +1 -1
  10. package/agnostic/css/generate-nice-color/index.js +1 -1
  11. package/agnostic/css/index.js +9 -9
  12. package/agnostic/css/is-valid-css-class-name/index.js +1 -1
  13. package/agnostic/css/styles-set/index.js +7 -7
  14. package/agnostic/errors/index.js +1 -1
  15. package/agnostic/errors/register/index.js +1 -1
  16. package/agnostic/errors/unknown-to-string/index.js +1 -1
  17. package/agnostic/html/get-node-ancestors/index.js +1 -1
  18. package/agnostic/html/get-position-inside-parent/index.js +1 -1
  19. package/agnostic/html/hyper-json/cast/index.js +5 -5
  20. package/agnostic/html/hyper-json/index.js +6 -6
  21. package/agnostic/html/hyper-json/method/index.js +1 -1
  22. package/agnostic/html/hyper-json/serialize/index.js +1 -1
  23. package/agnostic/html/hyper-json/smart-tags/coalesced/add/index.js +5 -5
  24. package/agnostic/html/hyper-json/smart-tags/coalesced/addclass/index.js +5 -5
  25. package/agnostic/html/hyper-json/smart-tags/coalesced/and/index.js +5 -5
  26. package/agnostic/html/hyper-json/smart-tags/coalesced/append/index.js +5 -5
  27. package/agnostic/html/hyper-json/smart-tags/coalesced/at/index.js +5 -5
  28. package/agnostic/html/hyper-json/smart-tags/coalesced/call/index.js +5 -5
  29. package/agnostic/html/hyper-json/smart-tags/coalesced/clone/index.js +5 -5
  30. package/agnostic/html/hyper-json/smart-tags/coalesced/deleteproperties/index.js +5 -5
  31. package/agnostic/html/hyper-json/smart-tags/coalesced/equals/index.js +5 -5
  32. package/agnostic/html/hyper-json/smart-tags/coalesced/getattribute/index.js +5 -5
  33. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperties/index.js +5 -5
  34. package/agnostic/html/hyper-json/smart-tags/coalesced/getproperty/index.js +5 -5
  35. package/agnostic/html/hyper-json/smart-tags/coalesced/if/index.js +5 -5
  36. package/agnostic/html/hyper-json/smart-tags/coalesced/initialize/index.js +5 -5
  37. package/agnostic/html/hyper-json/smart-tags/coalesced/join/index.js +5 -5
  38. package/agnostic/html/hyper-json/smart-tags/coalesced/length/index.js +5 -5
  39. package/agnostic/html/hyper-json/smart-tags/coalesced/map/index.js +5 -5
  40. package/agnostic/html/hyper-json/smart-tags/coalesced/negate/index.js +5 -5
  41. package/agnostic/html/hyper-json/smart-tags/coalesced/notrailing/index.js +5 -5
  42. package/agnostic/html/hyper-json/smart-tags/coalesced/or/index.js +5 -5
  43. package/agnostic/html/hyper-json/smart-tags/coalesced/pickrandom/index.js +5 -5
  44. package/agnostic/html/hyper-json/smart-tags/coalesced/populate/index.js +5 -5
  45. package/agnostic/html/hyper-json/smart-tags/coalesced/print/index.js +5 -5
  46. package/agnostic/html/hyper-json/smart-tags/coalesced/push/index.js +5 -5
  47. package/agnostic/html/hyper-json/smart-tags/coalesced/pusheach/index.js +5 -5
  48. package/agnostic/html/hyper-json/smart-tags/coalesced/recordtoarray/index.js +5 -5
  49. package/agnostic/html/hyper-json/smart-tags/coalesced/removeattribute/index.js +5 -5
  50. package/agnostic/html/hyper-json/smart-tags/coalesced/removeclass/index.js +5 -5
  51. package/agnostic/html/hyper-json/smart-tags/coalesced/renameproperty/index.js +5 -5
  52. package/agnostic/html/hyper-json/smart-tags/coalesced/replace/index.js +5 -5
  53. package/agnostic/html/hyper-json/smart-tags/coalesced/select/index.js +5 -5
  54. package/agnostic/html/hyper-json/smart-tags/coalesced/set/index.js +5 -5
  55. package/agnostic/html/hyper-json/smart-tags/coalesced/setattribute/index.js +5 -5
  56. package/agnostic/html/hyper-json/smart-tags/coalesced/setproperty/index.js +5 -5
  57. package/agnostic/html/hyper-json/smart-tags/coalesced/sorton/index.js +5 -5
  58. package/agnostic/html/hyper-json/smart-tags/coalesced/split/index.js +5 -5
  59. package/agnostic/html/hyper-json/smart-tags/coalesced/spread/index.js +5 -5
  60. package/agnostic/html/hyper-json/smart-tags/coalesced/toarray/index.js +5 -5
  61. package/agnostic/html/hyper-json/smart-tags/coalesced/toboolean/index.js +5 -5
  62. package/agnostic/html/hyper-json/smart-tags/coalesced/toelement/index.js +5 -5
  63. package/agnostic/html/hyper-json/smart-tags/coalesced/toggleclass/index.js +5 -5
  64. package/agnostic/html/hyper-json/smart-tags/coalesced/tonodelist/index.js +5 -5
  65. package/agnostic/html/hyper-json/smart-tags/coalesced/tonull/index.js +5 -5
  66. package/agnostic/html/hyper-json/smart-tags/coalesced/tonumber/index.js +5 -5
  67. package/agnostic/html/hyper-json/smart-tags/coalesced/torecord/index.js +5 -5
  68. package/agnostic/html/hyper-json/smart-tags/coalesced/toref/index.js +5 -5
  69. package/agnostic/html/hyper-json/smart-tags/coalesced/tostring/index.js +5 -5
  70. package/agnostic/html/hyper-json/smart-tags/coalesced/totext/index.js +5 -5
  71. package/agnostic/html/hyper-json/smart-tags/coalesced/transformselected/index.js +5 -5
  72. package/agnostic/html/hyper-json/smart-tags/coalesced/trim/index.js +5 -5
  73. package/agnostic/html/hyper-json/smart-tags/index.js +1 -1
  74. package/agnostic/html/hyper-json/smart-tags/isolated/any/index.js +1 -1
  75. package/agnostic/html/hyper-json/smart-tags/isolated/array/index.js +1 -1
  76. package/agnostic/html/hyper-json/smart-tags/isolated/boolean/index.js +5 -5
  77. package/agnostic/html/hyper-json/smart-tags/isolated/element/index.js +5 -5
  78. package/agnostic/html/hyper-json/smart-tags/isolated/get/index.js +5 -5
  79. package/agnostic/html/hyper-json/smart-tags/isolated/global/index.js +5 -5
  80. package/agnostic/html/hyper-json/smart-tags/isolated/guess/index.js +5 -5
  81. package/agnostic/html/hyper-json/smart-tags/isolated/nodelist/index.js +5 -5
  82. package/agnostic/html/hyper-json/smart-tags/isolated/null/index.js +1 -1
  83. package/agnostic/html/hyper-json/smart-tags/isolated/number/index.js +5 -5
  84. package/agnostic/html/hyper-json/smart-tags/isolated/record/index.js +5 -5
  85. package/agnostic/html/hyper-json/smart-tags/isolated/ref/index.js +5 -5
  86. package/agnostic/html/hyper-json/smart-tags/isolated/string/index.js +5 -5
  87. package/agnostic/html/hyper-json/smart-tags/isolated/text/index.js +5 -5
  88. package/agnostic/html/hyper-json/transformer/index.js +1 -1
  89. package/agnostic/html/hyper-json/tree/index.js +5 -5
  90. package/agnostic/html/hyper-json/types/index.js +1 -1
  91. package/agnostic/html/hyper-json/utils/index.js +5 -5
  92. package/agnostic/html/index.js +19 -19
  93. package/agnostic/html/insert-node/index.js +1 -1
  94. package/agnostic/html/placeholders/index.js +1 -1
  95. package/agnostic/html/replace-in-element/index.js +1 -1
  96. package/agnostic/html/sanitize/index.js +5 -5
  97. package/agnostic/html/selector-to-element/index.js +5 -5
  98. package/agnostic/html/string-to-nodes/index.js +6 -6
  99. package/agnostic/misc/assert/index.js +1 -1
  100. package/agnostic/misc/cast/index.js +1 -1
  101. package/agnostic/misc/crawler/index.js +1 -1
  102. package/agnostic/misc/crossenv/detect-runtime/index.js +1 -1
  103. package/agnostic/misc/crossenv/index.js +3 -3
  104. package/agnostic/misc/crossenv/types/index.js +1 -1
  105. package/agnostic/misc/crossenv/window/index.js +1 -1
  106. package/agnostic/misc/data-size/index.js +1 -1
  107. package/agnostic/misc/elo/index.js +1 -1
  108. package/agnostic/misc/get-current-downlink/index.js +1 -1
  109. package/agnostic/misc/index.js +28 -28
  110. package/agnostic/misc/is-constructor-function/index.js +1 -1
  111. package/agnostic/misc/is-nullish/index.js +1 -1
  112. package/agnostic/misc/logs/index.js +3 -3
  113. package/agnostic/misc/logs/logger/index.js +1 -1
  114. package/agnostic/misc/logs/make-text-block/index.js +1 -1
  115. package/agnostic/misc/logs/styles/index.js +1 -1
  116. package/agnostic/misc/lorem-ipsum/index.js +13 -13
  117. package/agnostic/misc/outcome/index.js +1 -1
  118. package/agnostic/numbers/absolute-modulo/index.js +1 -1
  119. package/agnostic/numbers/clamp/index.js +1 -1
  120. package/agnostic/numbers/index.js +5 -5
  121. package/agnostic/numbers/interpolate/index.js +1 -1
  122. package/agnostic/numbers/responsive-harmonics/index.js +1 -1
  123. package/agnostic/numbers/round/index.js +1 -1
  124. package/agnostic/objects/deep-get-property/index.js +1 -1
  125. package/agnostic/objects/enums/index.js +1 -1
  126. package/agnostic/objects/enums/is-in-enum/index.js +1 -1
  127. package/agnostic/objects/flatten-getters/index.js +1 -1
  128. package/agnostic/objects/index.js +13 -13
  129. package/agnostic/objects/is-object/index.js +1 -1
  130. package/agnostic/objects/is-record/index.js +1 -1
  131. package/agnostic/objects/record-format/index.js +1 -1
  132. package/agnostic/objects/record-map/index.js +1 -1
  133. package/agnostic/objects/validation/index.js +1 -1
  134. package/agnostic/optim/index.js +1 -1
  135. package/agnostic/optim/memoize/index.js +1 -1
  136. package/agnostic/optim/throttle-debounce/index.js +1 -1
  137. package/agnostic/random/hex-char/index.js +1 -1
  138. package/agnostic/random/index.js +3 -3
  139. package/agnostic/random/random/index.js +1 -1
  140. package/agnostic/random/uuid/index.js +1 -1
  141. package/agnostic/regexps/index.js +1 -1
  142. package/agnostic/strings/char-codes/index.js +1 -1
  143. package/agnostic/strings/index.js +7 -7
  144. package/agnostic/strings/matches/index.js +1 -1
  145. package/agnostic/strings/normalize-indent/index.js +1 -1
  146. package/agnostic/strings/replace-all/index.js +1 -1
  147. package/agnostic/strings/to-alphanum/index.js +1 -1
  148. package/agnostic/strings/trim/index.js +1 -1
  149. package/agnostic/time/dates/format-date/index.js +1 -1
  150. package/agnostic/time/dates/index.js +1 -1
  151. package/agnostic/time/duration/index.js +1 -1
  152. package/agnostic/time/index.js +4 -4
  153. package/agnostic/time/timeout/index.js +1 -1
  154. package/agnostic/time/transitions/index.js +1 -1
  155. package/agnostic/time/wait/index.js +1 -1
  156. package/chunks/chunk-35W7XRC3.js +173 -0
  157. package/chunks/chunk-3GTGE66Y.js +32 -0
  158. package/chunks/chunk-422KBDRV.js +203 -0
  159. package/chunks/chunk-4OH2EX3D.js +191 -0
  160. package/chunks/chunk-4WOYAD35.js +31 -0
  161. package/chunks/chunk-5JMTDJWX.js +37 -0
  162. package/chunks/chunk-5RGHYFQH.js +70 -0
  163. package/chunks/chunk-5VHFXWFM.js +31 -0
  164. package/chunks/chunk-6DA4S65P.js +37 -0
  165. package/chunks/chunk-7DDXALPH.js +49 -0
  166. package/chunks/chunk-7YSTZ7GY.js +31 -0
  167. package/chunks/chunk-A4FSJC46.js +58 -0
  168. package/chunks/chunk-BNNAZPI2.js +191 -0
  169. package/chunks/chunk-BONBND7I.js +239 -0
  170. package/chunks/chunk-EM37BFXO.js +35 -0
  171. package/chunks/chunk-ERAFJXWH.js +20 -0
  172. package/chunks/chunk-FEFY3V6P.js +31 -0
  173. package/chunks/chunk-FJTOFK3C.js +203 -0
  174. package/chunks/chunk-G66DWXF3.js +31 -0
  175. package/chunks/chunk-GP44TBRI.js +39 -0
  176. package/chunks/chunk-HTNLTDQT.js +28 -0
  177. package/chunks/chunk-I66DPQN2.js +31 -0
  178. package/chunks/chunk-JBDWHJ4Q.js +31 -0
  179. package/chunks/chunk-JJWKHBXD.js +68 -0
  180. package/chunks/chunk-MOA6JFUQ.js +2369 -0
  181. package/chunks/chunk-MUYZV5F3.js +2369 -0
  182. package/chunks/chunk-N4BZJOGW.js +56 -0
  183. package/chunks/chunk-N4LMP4UM.js +31 -0
  184. package/chunks/chunk-Q7HA7IAA.js +20 -0
  185. package/chunks/chunk-QTTNO4T6.js +37 -0
  186. package/chunks/chunk-QVIRBFMQ.js +31 -0
  187. package/chunks/chunk-ROJZUEYL.js +37 -0
  188. package/chunks/chunk-SPMF4X5X.js +31 -0
  189. package/chunks/chunk-UVSTFYSD.js +28 -0
  190. package/chunks/chunk-VQEP2EQF.js +100 -0
  191. package/chunks/chunk-VV72XGJJ.js +58 -0
  192. package/chunks/chunk-VXSOUAUT.js +100 -0
  193. package/chunks/chunk-W6BFU7Y5.js +56 -0
  194. package/chunks/chunk-WOGRENMM.js +31 -0
  195. package/chunks/chunk-X5FAZBWL.js +130 -0
  196. package/chunks/chunk-YMRAUWRW.js +20 -0
  197. package/chunks/chunk-ZNA7SWFK.js +29 -0
  198. package/components/Comp/index.js +1 -1
  199. package/node/@design-edito/index.js +6 -6
  200. package/node/@design-edito/thumbnails/colors/index.js +2 -2
  201. package/node/@design-edito/thumbnails/common/index.js +2 -2
  202. package/node/@design-edito/thumbnails/easings/index.js +2 -2
  203. package/node/@design-edito/thumbnails/index.js +6 -6
  204. package/node/@design-edito/thumbnails/layout/index.js +4 -4
  205. package/node/@express/@multer/index.js +2 -3
  206. package/node/@express/index.js +2 -3
  207. package/node/@google-cloud/index.js +17 -17
  208. package/node/@google-cloud/storage/bucket/get-metadata/index.js +2 -2
  209. package/node/@google-cloud/storage/bucket/index.js +6 -6
  210. package/node/@google-cloud/storage/bucket/list/index.js +2 -2
  211. package/node/@google-cloud/storage/file/copy/index.js +2 -2
  212. package/node/@google-cloud/storage/file/download/index.js +2 -2
  213. package/node/@google-cloud/storage/file/erase/index.js +2 -2
  214. package/node/@google-cloud/storage/file/exists/index.js +2 -2
  215. package/node/@google-cloud/storage/file/generate-signed-url/index.js +2 -2
  216. package/node/@google-cloud/storage/file/get-metadata/index.js +2 -2
  217. package/node/@google-cloud/storage/file/get-permissions/index.js +2 -2
  218. package/node/@google-cloud/storage/file/index.js +21 -21
  219. package/node/@google-cloud/storage/file/move/index.js +2 -2
  220. package/node/@google-cloud/storage/file/revoke-signed-urls/index.js +5 -5
  221. package/node/@google-cloud/storage/file/update-metadata/index.js +2 -2
  222. package/node/@google-cloud/storage/file/upload/index.js +2 -2
  223. package/node/@google-cloud/storage/index.js +17 -17
  224. package/node/encryption/buffer/index.js +1 -1
  225. package/node/encryption/generate-key/index.js +1 -1
  226. package/node/encryption/index.js +1 -1
  227. package/node/encryption/uint8-array/index.js +1 -1
  228. package/node/files/index.js +4 -4
  229. package/node/files/is-in-directory/index.js +1 -1
  230. package/node/files/read-write/index.js +1 -1
  231. package/node/files/subpaths/index.js +1 -1
  232. package/node/images/exports/index.js +2 -4
  233. package/node/images/index.js +10 -12
  234. package/node/images/prepare/index.js +10 -12
  235. package/node/images/transform/area-composition/index.js +7 -8
  236. package/node/images/transform/index.js +8 -9
  237. package/node/process/index.js +1 -1
  238. package/node/process/on-exit/index.js +1 -1
  239. package/package.json +2 -4
@@ -0,0 +1,191 @@
1
+ import {
2
+ Random
3
+ } from "./chunk-S32K7POB.js";
4
+ import {
5
+ Arrays
6
+ } from "./chunk-FEFY3V6P.js";
7
+
8
+ // src/agnostic/misc/lorem-ipsum/index.ts
9
+ var LoremIpsum;
10
+ ((LoremIpsum2) => {
11
+ LoremIpsum2.words = [
12
+ "a",
13
+ "ac",
14
+ "accumsan",
15
+ "adipiscing",
16
+ "aenean",
17
+ "aliquam",
18
+ "aliquet",
19
+ "amet",
20
+ "ante",
21
+ "arcu",
22
+ "at",
23
+ "auctor",
24
+ "augue",
25
+ "bibendum",
26
+ "blandit",
27
+ "condimentum",
28
+ "consectetur",
29
+ "consequat",
30
+ "convallis",
31
+ "cras",
32
+ "curabitur",
33
+ "cursus",
34
+ "dapibus",
35
+ "diam",
36
+ "dictum",
37
+ "dictumst",
38
+ "dignissim",
39
+ "dolor",
40
+ "donec",
41
+ "dui",
42
+ "duis",
43
+ "efficitur",
44
+ "egestas",
45
+ "eget",
46
+ "eleifend",
47
+ "elementum",
48
+ "elit",
49
+ "enim",
50
+ "erat",
51
+ "eros",
52
+ "est",
53
+ "et",
54
+ "eu",
55
+ "euismod",
56
+ "ex",
57
+ "facilisis",
58
+ "faucibus",
59
+ "felis",
60
+ "feugiat",
61
+ "finibus",
62
+ "fringilla",
63
+ "fusce",
64
+ "gravida",
65
+ "habitasse",
66
+ "hac",
67
+ "hendrerit",
68
+ "iaculis",
69
+ "id",
70
+ "imperdiet",
71
+ "in",
72
+ "integer",
73
+ "interdum",
74
+ "ipsum",
75
+ "justo",
76
+ "lacinia",
77
+ "lacus",
78
+ "laoreet",
79
+ "lectus",
80
+ "leo",
81
+ "libero",
82
+ "ligula",
83
+ "lobortis",
84
+ "lorem",
85
+ "luctus",
86
+ "maecenas",
87
+ "magna",
88
+ "malesuada",
89
+ "massa",
90
+ "mattis",
91
+ "mauris",
92
+ "maximus",
93
+ "metus",
94
+ "mi",
95
+ "molestie",
96
+ "mollis",
97
+ "morbi",
98
+ "nam",
99
+ "nec",
100
+ "neque",
101
+ "nibh",
102
+ "nisi",
103
+ "nisl",
104
+ "non",
105
+ "nulla",
106
+ "nullam",
107
+ "nunc",
108
+ "odio",
109
+ "orci",
110
+ "ornare",
111
+ "pellentesque",
112
+ "pharetra",
113
+ "phasellus",
114
+ "placerat",
115
+ "platea",
116
+ "porta",
117
+ "porttitor",
118
+ "posuere",
119
+ "praesent",
120
+ "pulvinar",
121
+ "purus",
122
+ "quam",
123
+ "quis",
124
+ "quisque",
125
+ "risus",
126
+ "rutrum",
127
+ "sagittis",
128
+ "sapien",
129
+ "sed",
130
+ "sem",
131
+ "semper",
132
+ "sit",
133
+ "sodales",
134
+ "sollicitudin",
135
+ "suscipit",
136
+ "suspendisse",
137
+ "tellus",
138
+ "tempor",
139
+ "tempus",
140
+ "tincidunt",
141
+ "tortor",
142
+ "tristique",
143
+ "turpis",
144
+ "ultrices",
145
+ "ultricies",
146
+ "urna",
147
+ "ut",
148
+ "vehicula",
149
+ "vel",
150
+ "velit",
151
+ "venenatis",
152
+ "vestibulum",
153
+ "vitae",
154
+ "vivamus",
155
+ "viverra",
156
+ "volutpat",
157
+ "vulputate"
158
+ ];
159
+ LoremIpsum2.generateSentence = (wordCount) => {
160
+ const resultArr = [];
161
+ let currentWordCound = wordCount;
162
+ for (let i = 0; i < currentWordCound; i++) {
163
+ const picked = Arrays.randomPick(LoremIpsum2.words);
164
+ if (typeof picked === "string") resultArr.push(picked);
165
+ else {
166
+ currentWordCound += 1;
167
+ }
168
+ }
169
+ const [firstWord, ...otherWords] = resultArr;
170
+ if (firstWord === void 0) return "";
171
+ const capFirstLetter = firstWord?.charAt(0).toUpperCase();
172
+ const restOfFirstWord = firstWord?.slice(1);
173
+ const sentence = [
174
+ `${capFirstLetter}${restOfFirstWord}`,
175
+ ...otherWords
176
+ ].join(" ");
177
+ return `${sentence}.`;
178
+ };
179
+ LoremIpsum2.generateSentences = (sentencesCount, maxSentenceLength = 12, minSentenceLength = 4) => {
180
+ const sentences = [];
181
+ for (let i = 0; i < sentencesCount; i++) {
182
+ const length = Random.randomInt(maxSentenceLength, minSentenceLength) ?? 8;
183
+ sentences.push((0, LoremIpsum2.generateSentence)(length));
184
+ }
185
+ return sentences;
186
+ };
187
+ })(LoremIpsum || (LoremIpsum = {}));
188
+
189
+ export {
190
+ LoremIpsum
191
+ };
@@ -0,0 +1,31 @@
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-WSFCRVEQ.js";
10
+
11
+ // src/node/@google-cloud/storage/file/upload/index.ts
12
+ var upload_exports = {};
13
+ __export(upload_exports, {
14
+ upload: () => upload
15
+ });
16
+ async function upload(filebuffer, destinationPath, bucket, options) {
17
+ const { fileOptions, saveOptions } = options ?? {};
18
+ try {
19
+ const file = bucket.file(destinationPath, fileOptions);
20
+ await file.save(filebuffer, saveOptions);
21
+ return Outcome.makeSuccess(true);
22
+ } catch (err) {
23
+ const errStr = unknownToString(err);
24
+ return Outcome.makeFailure(errStr);
25
+ }
26
+ }
27
+
28
+ export {
29
+ upload,
30
+ upload_exports
31
+ };
@@ -0,0 +1,37 @@
1
+ import {
2
+ Cast,
3
+ Tree,
4
+ Utils
5
+ } from "./chunk-MOA6JFUQ.js";
6
+ import {
7
+ Types
8
+ } from "./chunk-XEQ2PBT2.js";
9
+ import {
10
+ SmartTags
11
+ } from "./chunk-UT2J62LH.js";
12
+ import {
13
+ Serialize
14
+ } from "./chunk-SXRWMH3U.js";
15
+ import {
16
+ Transformer
17
+ } from "./chunk-BKO7GLC2.js";
18
+ import {
19
+ Method
20
+ } from "./chunk-RW7VAKJW.js";
21
+
22
+ // src/agnostic/html/hyper-json/index.ts
23
+ var HyperJson;
24
+ ((HyperJson2) => {
25
+ HyperJson2.Cast = Cast;
26
+ HyperJson2.Method = Method;
27
+ HyperJson2.Serialize = Serialize;
28
+ HyperJson2.SmartTags = SmartTags;
29
+ HyperJson2.Transformer = Transformer;
30
+ HyperJson2.Tree = Tree;
31
+ HyperJson2.Types = Types;
32
+ HyperJson2.Utils = Utils;
33
+ })(HyperJson || (HyperJson = {}));
34
+
35
+ export {
36
+ HyperJson
37
+ };
@@ -0,0 +1,70 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-WSFCRVEQ.js";
4
+
5
+ // src/node/images/exports/index.ts
6
+ var exports_exports = {};
7
+ __export(exports_exports, {
8
+ exportZipBuffer: () => exportZipBuffer,
9
+ prepareExport: () => prepareExport
10
+ });
11
+ import archiver from "archiver";
12
+ import sharp from "sharp";
13
+ import { Writable } from "stream";
14
+ async function prepareExport(imageBuffer, outputOptions) {
15
+ const resizedSharp = sharp(imageBuffer).resize({
16
+ width: outputOptions.width,
17
+ height: outputOptions.height,
18
+ fit: sharp.fit.cover
19
+ });
20
+ const qualitiedSharp = setSharpQuality(resizedSharp, outputOptions.quality, outputOptions.format);
21
+ return await qualitiedSharp.toBuffer();
22
+ }
23
+ function exportZipBuffer(zipSources, zipDirectoryName) {
24
+ return new Promise(async (resolve, reject) => {
25
+ const archive = archiver("zip", {
26
+ zlib: { level: 9 }
27
+ // Sets the compression level.
28
+ });
29
+ if (zipDirectoryName) {
30
+ archive.directory(zipDirectoryName + "/", false);
31
+ }
32
+ zipSources.forEach((zipSource) => {
33
+ const fileName = zipDirectoryName ? `${zipDirectoryName}/${zipSource.name}` : zipSource.name;
34
+ archive.append(zipSource.buffer, { name: fileName });
35
+ });
36
+ const bufferZip = await toBuffer(archive);
37
+ resolve(bufferZip);
38
+ });
39
+ }
40
+ async function toBuffer(archive) {
41
+ const chunks = [];
42
+ const writable = new Writable();
43
+ writable._write = (chunk, encoding, callback) => {
44
+ chunks.push(chunk);
45
+ callback();
46
+ };
47
+ archive.pipe(writable);
48
+ await archive.finalize();
49
+ return Buffer.concat(chunks);
50
+ }
51
+ function setSharpQuality(sharp2, quality, format) {
52
+ switch (format) {
53
+ case "png":
54
+ return sharp2.png({ quality });
55
+ case "jpeg":
56
+ return sharp2.jpeg({ quality });
57
+ case "webp":
58
+ return sharp2.webp({ quality });
59
+ case "avif":
60
+ return sharp2.avif({ quality });
61
+ default:
62
+ return sharp2;
63
+ }
64
+ }
65
+
66
+ export {
67
+ prepareExport,
68
+ exportZipBuffer,
69
+ exports_exports
70
+ };
@@ -0,0 +1,31 @@
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-WSFCRVEQ.js";
10
+
11
+ // src/node/@google-cloud/storage/file/exists/index.ts
12
+ var exists_exports = {};
13
+ __export(exists_exports, {
14
+ exists: () => exists
15
+ });
16
+ async function exists(bucket, sourcePath, options) {
17
+ const { fileOptions, existsOptions } = options ?? {};
18
+ try {
19
+ const file = bucket.file(sourcePath, fileOptions);
20
+ const [exists2] = await file.exists(existsOptions);
21
+ return Outcome.makeSuccess(exists2);
22
+ } catch (err) {
23
+ const errStr = unknownToString(err);
24
+ return Outcome.makeFailure(errStr);
25
+ }
26
+ }
27
+
28
+ export {
29
+ exists,
30
+ exists_exports
31
+ };
@@ -0,0 +1,37 @@
1
+ import {
2
+ Cast,
3
+ Tree,
4
+ Utils
5
+ } from "./chunk-MUYZV5F3.js";
6
+ import {
7
+ Types
8
+ } from "./chunk-XEQ2PBT2.js";
9
+ import {
10
+ SmartTags
11
+ } from "./chunk-UT2J62LH.js";
12
+ import {
13
+ Serialize
14
+ } from "./chunk-SXRWMH3U.js";
15
+ import {
16
+ Transformer
17
+ } from "./chunk-BKO7GLC2.js";
18
+ import {
19
+ Method
20
+ } from "./chunk-RW7VAKJW.js";
21
+
22
+ // src/agnostic/html/hyper-json/index.ts
23
+ var HyperJson;
24
+ ((HyperJson2) => {
25
+ HyperJson2.Cast = Cast;
26
+ HyperJson2.Method = Method;
27
+ HyperJson2.Serialize = Serialize;
28
+ HyperJson2.SmartTags = SmartTags;
29
+ HyperJson2.Transformer = Transformer;
30
+ HyperJson2.Tree = Tree;
31
+ HyperJson2.Types = Types;
32
+ HyperJson2.Utils = Utils;
33
+ })(HyperJson || (HyperJson = {}));
34
+
35
+ export {
36
+ HyperJson
37
+ };
@@ -0,0 +1,49 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-WSFCRVEQ.js";
4
+
5
+ // src/node/@design-edito/thumbnails/common/index.ts
6
+ var common_exports = {};
7
+ __export(common_exports, {
8
+ clampNumber: () => clampNumber,
9
+ getArrayMax: () => getArrayMax,
10
+ randomInt: () => randomInt,
11
+ randomIntRange: () => randomIntRange,
12
+ shuffleArray: () => shuffleArray
13
+ });
14
+ function randomInt(max) {
15
+ return Math.floor(Math.random() * max);
16
+ }
17
+ function randomIntRange(min, max) {
18
+ const minCeiled = Math.ceil(min);
19
+ const maxFloored = Math.floor(max);
20
+ return Math.floor(Math.random() * (maxFloored - minCeiled) + minCeiled);
21
+ }
22
+ function shuffleArray(array) {
23
+ return [...array].sort((a, b) => 0.5 - Math.random());
24
+ }
25
+ function clampNumber(val, min, max) {
26
+ return Math.max(min, Math.min(val, max));
27
+ }
28
+ function getArrayMax(array) {
29
+ if (!array.length || !array[0]) {
30
+ return;
31
+ }
32
+ let max = array[0];
33
+ for (let i = 0; i < array.length; i++) {
34
+ const current = array[i];
35
+ if (current !== void 0 && current > max) {
36
+ max = current;
37
+ }
38
+ }
39
+ return max;
40
+ }
41
+
42
+ export {
43
+ randomInt,
44
+ randomIntRange,
45
+ shuffleArray,
46
+ clampNumber,
47
+ getArrayMax,
48
+ common_exports
49
+ };
@@ -0,0 +1,31 @@
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-WSFCRVEQ.js";
10
+
11
+ // src/node/@google-cloud/storage/bucket/list/index.ts
12
+ var list_exports = {};
13
+ __export(list_exports, {
14
+ list: () => list
15
+ });
16
+ async function list(bucket, options) {
17
+ const { getFileOptions } = options ?? {};
18
+ try {
19
+ const [files] = await bucket.getFiles(getFileOptions);
20
+ const fileNames = files.map((file) => file.name);
21
+ return Outcome.makeSuccess(fileNames);
22
+ } catch (err) {
23
+ const errStr = unknownToString(err);
24
+ return Outcome.makeFailure(errStr);
25
+ }
26
+ }
27
+
28
+ export {
29
+ list,
30
+ list_exports
31
+ };
@@ -0,0 +1,58 @@
1
+ import {
2
+ areaCompose
3
+ } from "./chunk-FJTOFK3C.js";
4
+ import {
5
+ __export
6
+ } from "./chunk-WSFCRVEQ.js";
7
+
8
+ // src/node/images/transform/index.ts
9
+ var transform_exports = {};
10
+ __export(transform_exports, {
11
+ isOperation: () => isOperation,
12
+ transformImage: () => transformImage
13
+ });
14
+ import sharp from "sharp";
15
+ async function transformImage(imageBuffer, operations, maxDimensions) {
16
+ const imageSharp = sharp(imageBuffer);
17
+ let imageSharped = imageSharp;
18
+ for await (const operation of operations) {
19
+ if (isOperation(operation)) {
20
+ imageSharped = await applyOperation(imageSharped, operation, maxDimensions);
21
+ }
22
+ }
23
+ return await imageSharped.toBuffer();
24
+ }
25
+ function isOperation(operation) {
26
+ return true;
27
+ }
28
+ async function applyOperation(imageSharp, operation, maxDimensions) {
29
+ switch (operation.name) {
30
+ case "rotate":
31
+ return imageSharp.rotate(operation.params.angle);
32
+ case "resize":
33
+ return imageSharp.resize({
34
+ width: operation.params.width,
35
+ height: operation.params.height,
36
+ fit: operation.params.fit || "cover",
37
+ background: { r: 255, g: 255, b: 255, alpha: 0 }
38
+ });
39
+ /* Adds a transparent background (necessary for png) */
40
+ case "area-composition":
41
+ const composedImage = await areaCompose(imageSharp, {
42
+ ...operation.params,
43
+ dimensions: {
44
+ w: maxDimensions.width,
45
+ h: maxDimensions.height
46
+ }
47
+ });
48
+ return composedImage;
49
+ default:
50
+ return imageSharp;
51
+ }
52
+ }
53
+
54
+ export {
55
+ transformImage,
56
+ isOperation,
57
+ transform_exports
58
+ };