@scalemule/sdk 0.0.1 → 0.0.2
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.
- package/dist/index.d.mts +788 -4
- package/dist/index.d.ts +788 -4
- package/dist/index.js +747 -189
- package/dist/index.mjs +740 -177
- package/dist/{upload-compression-CWKEDQYS.mjs → upload-compression-VOUJRAIM.mjs} +2 -13
- package/package.json +1 -1
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
// src/services/upload-compression.ts
|
|
2
2
|
var MIN_COMPRESS_SIZE = 100 * 1024;
|
|
3
|
-
var COMPRESSIBLE_TYPES = /* @__PURE__ */ new Set([
|
|
4
|
-
|
|
5
|
-
"image/jpg",
|
|
6
|
-
"image/png",
|
|
7
|
-
"image/bmp",
|
|
8
|
-
"image/tiff"
|
|
9
|
-
]);
|
|
10
|
-
var SKIP_TYPES = /* @__PURE__ */ new Set([
|
|
11
|
-
"image/gif",
|
|
12
|
-
"image/svg+xml",
|
|
13
|
-
"image/webp",
|
|
14
|
-
"image/avif"
|
|
15
|
-
]);
|
|
3
|
+
var COMPRESSIBLE_TYPES = /* @__PURE__ */ new Set(["image/jpeg", "image/jpg", "image/png", "image/bmp", "image/tiff"]);
|
|
4
|
+
var SKIP_TYPES = /* @__PURE__ */ new Set(["image/gif", "image/svg+xml", "image/webp", "image/avif"]);
|
|
16
5
|
var NETWORK_PROFILES = {
|
|
17
6
|
"slow-2g": { maxWidth: 1280, maxHeight: 1280, quality: 0.6, maxSizeMB: 0.5 },
|
|
18
7
|
"2g": { maxWidth: 1600, maxHeight: 1600, quality: 0.65, maxSizeMB: 1 },
|