@umituz/react-native-design-system 2.8.46 → 2.9.1
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/package.json +1 -1
- package/src/image/infrastructure/utils/filters/ColorAdjustmentFilters.ts +9 -6
- package/src/image/infrastructure/utils/filters/FilterHelpers.ts +3 -1
- package/src/image/infrastructure/utils/validation/mime-type-validator.ts +2 -2
- package/src/infinite-scroll/domain/utils/pagination-utils.ts +1 -1
- package/src/onboarding/presentation/components/OnboardingScreenContent.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, and onboarding utilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -13,9 +13,12 @@ export class ColorAdjustmentFilters {
|
|
|
13
13
|
const adjustment = brightness * 2.55;
|
|
14
14
|
|
|
15
15
|
for (let i = 0; i < result.length; i += 4) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
const r = result[i] ?? 0;
|
|
17
|
+
const g = result[i + 1] ?? 0;
|
|
18
|
+
const b = result[i + 2] ?? 0;
|
|
19
|
+
result[i] = Math.min(255, Math.max(0, r + adjustment));
|
|
20
|
+
result[i + 1] = Math.min(255, Math.max(0, g + adjustment));
|
|
21
|
+
result[i + 2] = Math.min(255, Math.max(0, b + adjustment));
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
return result;
|
|
@@ -49,9 +52,9 @@ export class ColorAdjustmentFilters {
|
|
|
49
52
|
const adjustment = 1 + (saturation / 100);
|
|
50
53
|
|
|
51
54
|
for (let i = 0; i < result.length; i += 4) {
|
|
52
|
-
const r = result[i];
|
|
53
|
-
const g = result[i + 1];
|
|
54
|
-
const b = result[i + 2];
|
|
55
|
+
const r = result[i] ?? 0;
|
|
56
|
+
const g = result[i + 1] ?? 0;
|
|
57
|
+
const b = result[i + 2] ?? 0;
|
|
55
58
|
|
|
56
59
|
const gray = 0.299 * r + 0.587 * g + 0.114 * b;
|
|
57
60
|
|
|
@@ -13,7 +13,9 @@ export class FilterHelpers {
|
|
|
13
13
|
const result = new Uint8ClampedArray(originalData.length);
|
|
14
14
|
|
|
15
15
|
for (let i = 0; i < originalData.length; i++) {
|
|
16
|
-
|
|
16
|
+
const original = originalData[i] ?? 0;
|
|
17
|
+
const processed = processedData[i] ?? 0;
|
|
18
|
+
result[i] = original * (1 - intensity) + processed * intensity;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
return result;
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
*/
|
|
15
15
|
export function getFileExtension(uri: string): string | null {
|
|
16
16
|
const match = uri.match(/\.([a-z0-9]+)(?:\?|$)/i);
|
|
17
|
-
return match
|
|
17
|
+
return match?.[1]?.toLowerCase() ?? null;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -33,7 +33,7 @@ export function getMimeTypeFromExtension(uri: string): string | null {
|
|
|
33
33
|
*/
|
|
34
34
|
export function getMimeTypeFromDataUrl(dataUrl: string): string | null {
|
|
35
35
|
const match = dataUrl.match(/^data:([^;]+);/);
|
|
36
|
-
return match
|
|
36
|
+
return match?.[1] ?? null;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|