@tradly/asset 1.0.9 → 1.0.10
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.
|
@@ -25,11 +25,11 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } // Helper: compr
|
|
|
25
25
|
var compressImage = function compressImage(file) {
|
|
26
26
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
27
27
|
_ref$maxWidth = _ref.maxWidth,
|
|
28
|
-
maxWidth = _ref$maxWidth === void 0 ?
|
|
28
|
+
maxWidth = _ref$maxWidth === void 0 ? 1600 : _ref$maxWidth,
|
|
29
29
|
_ref$maxHeight = _ref.maxHeight,
|
|
30
|
-
maxHeight = _ref$maxHeight === void 0 ?
|
|
30
|
+
maxHeight = _ref$maxHeight === void 0 ? 1600 : _ref$maxHeight,
|
|
31
31
|
_ref$quality = _ref.quality,
|
|
32
|
-
quality = _ref$quality === void 0 ? 0.
|
|
32
|
+
quality = _ref$quality === void 0 ? 0.9 : _ref$quality,
|
|
33
33
|
_ref$convertPngToJpeg = _ref.convertPngToJpeg,
|
|
34
34
|
convertPngToJpeg = _ref$convertPngToJpeg === void 0 ? false : _ref$convertPngToJpeg;
|
|
35
35
|
console.log("compressImage", file, maxWidth, maxHeight, quality, convertPngToJpeg);
|
|
@@ -137,9 +137,9 @@ var FileUpload = function FileUpload(_ref2) {
|
|
|
137
137
|
_context.n = 2;
|
|
138
138
|
return Promise.all(fileList.map(function (file) {
|
|
139
139
|
return compressImage(file, {
|
|
140
|
-
maxWidth:
|
|
141
|
-
maxHeight:
|
|
142
|
-
quality: 0.
|
|
140
|
+
maxWidth: 1600,
|
|
141
|
+
maxHeight: 1600,
|
|
142
|
+
quality: 0.9
|
|
143
143
|
});
|
|
144
144
|
}));
|
|
145
145
|
case 2:
|
|
@@ -19,11 +19,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
19
19
|
var compressImage = function compressImage(file) {
|
|
20
20
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
21
21
|
_ref$maxWidth = _ref.maxWidth,
|
|
22
|
-
maxWidth = _ref$maxWidth === void 0 ?
|
|
22
|
+
maxWidth = _ref$maxWidth === void 0 ? 1600 : _ref$maxWidth,
|
|
23
23
|
_ref$maxHeight = _ref.maxHeight,
|
|
24
|
-
maxHeight = _ref$maxHeight === void 0 ?
|
|
24
|
+
maxHeight = _ref$maxHeight === void 0 ? 1600 : _ref$maxHeight,
|
|
25
25
|
_ref$quality = _ref.quality,
|
|
26
|
-
quality = _ref$quality === void 0 ? 0.
|
|
26
|
+
quality = _ref$quality === void 0 ? 0.9 : _ref$quality,
|
|
27
27
|
_ref$convertPngToJpeg = _ref.convertPngToJpeg,
|
|
28
28
|
convertPngToJpeg = _ref$convertPngToJpeg === void 0 ? false : _ref$convertPngToJpeg;
|
|
29
29
|
console.log("compressImage", file, maxWidth, maxHeight, quality, convertPngToJpeg);
|
|
@@ -131,9 +131,9 @@ var FileUpload = function FileUpload(_ref2) {
|
|
|
131
131
|
_context.n = 2;
|
|
132
132
|
return Promise.all(fileList.map(function (file) {
|
|
133
133
|
return compressImage(file, {
|
|
134
|
-
maxWidth:
|
|
135
|
-
maxHeight:
|
|
136
|
-
quality: 0.
|
|
134
|
+
maxWidth: 1600,
|
|
135
|
+
maxHeight: 1600,
|
|
136
|
+
quality: 0.9
|
|
137
137
|
});
|
|
138
138
|
}));
|
|
139
139
|
case 2:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradly/asset",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "A reusable media gallery component for uploading and selecting images, videos, and files with Tradly authentication",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|