react-native-ui-lib 9.0.4 → 9.1.0-snapshot.8039
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/lib/android/src/main/java/com/wix/reactnativeuilib/dynamicfont/DynamicFontModule.java
CHANGED
|
@@ -132,8 +132,8 @@ public class DynamicFontModule extends ReactContextBaseJavaModule {
|
|
|
132
132
|
cacheFile.delete();
|
|
133
133
|
} catch(Exception e) {
|
|
134
134
|
callback.invoke(e.getMessage());
|
|
135
|
-
|
|
136
|
-
callback.invoke(null, name);
|
|
135
|
+
return;
|
|
137
136
|
}
|
|
137
|
+
callback.invoke(null, name);
|
|
138
138
|
}
|
|
139
139
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-ui-lib",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.1.0-snapshot.8039",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"types": "src/index.d.ts",
|
|
6
6
|
"author": "Ethan Sharabi <ethan.shar@gmail.com>",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"react-native-redash": "^12.0.3",
|
|
40
40
|
"semver": "^5.5.0",
|
|
41
41
|
"tinycolor2": "^1.4.2",
|
|
42
|
-
"url-parse": "^1.2.0",
|
|
43
42
|
"wix-react-native-text-size": "1.0.9"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
@@ -71,7 +70,6 @@
|
|
|
71
70
|
"@types/react": "19.0.0",
|
|
72
71
|
"@types/react-test-renderer": "19.0.0",
|
|
73
72
|
"@types/tinycolor2": "^1.4.2",
|
|
74
|
-
"@types/url-parse": "^1.4.3",
|
|
75
73
|
"@welldone-software/why-did-you-render": "^3.2.1",
|
|
76
74
|
"babel-plugin-lodash": "^3.3.4",
|
|
77
75
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
@@ -102,15 +100,15 @@
|
|
|
102
100
|
"setimmediate": "^1.0.5",
|
|
103
101
|
"shell-utils": "^1.0.10",
|
|
104
102
|
"typescript": "5.0.4",
|
|
105
|
-
"uilib-native": "5.1.2"
|
|
103
|
+
"uilib-native": "5.1.2-snapshot.8039"
|
|
106
104
|
},
|
|
107
105
|
"peerDependencies": {
|
|
108
106
|
"react": ">=19.0.0",
|
|
109
107
|
"react-native": ">=0.77.3",
|
|
110
108
|
"react-native-gesture-handler": ">=2.24.0",
|
|
111
109
|
"react-native-reanimated": ">=3.19.4",
|
|
112
|
-
"react-native-
|
|
113
|
-
"uilib-native": "
|
|
110
|
+
"react-native-ui-lib": "*",
|
|
111
|
+
"uilib-native": "5.1.0-snapshot.7635"
|
|
114
112
|
},
|
|
115
113
|
"jest": {
|
|
116
114
|
"preset": "react-native",
|
|
@@ -12,5 +12,5 @@ export declare function getValidColorString(text?: string): {
|
|
|
12
12
|
valid: boolean;
|
|
13
13
|
hex?: undefined;
|
|
14
14
|
};
|
|
15
|
-
export declare function getHexString(color: HSLColor):
|
|
15
|
+
export declare function getHexString(color: HSLColor): string;
|
|
16
16
|
export declare function getTextColor(color: string): string;
|
|
@@ -2,7 +2,7 @@ export declare function getInitialsTypography(size: number): import("react-nativ
|
|
|
2
2
|
export declare function hashStringToNumber(str?: string): number;
|
|
3
3
|
export declare function getAvatarColors(): string[];
|
|
4
4
|
export declare function getColorById(id: string, avatarColors?: string[]): string;
|
|
5
|
-
export declare function getInitials(name?: string, limit?: number):
|
|
5
|
+
export declare function getInitials(name?: string, limit?: number): string;
|
|
6
6
|
export declare function getBackgroundColor(name?: string, avatarColors?: string[], hashFunction?: (name?: string) => number, defaultColor?: string): string | undefined;
|
|
7
7
|
export declare function isGravatarUrl(url: string): boolean;
|
|
8
8
|
export declare function isBlankGravatarUrl(url: string): boolean;
|
|
@@ -6,7 +6,6 @@ import _filter from "lodash/filter";
|
|
|
6
6
|
import _split from "lodash/split";
|
|
7
7
|
import _flow from "lodash/flow";
|
|
8
8
|
import _isString from "lodash/isString";
|
|
9
|
-
import URL from 'url-parse';
|
|
10
9
|
import Colors from "../style/colors";
|
|
11
10
|
import { Typography } from "../style";
|
|
12
11
|
export function getInitialsTypography(size) {
|
|
@@ -76,22 +75,22 @@ export function getBackgroundColor(name, avatarColors, hashFunction, defaultColo
|
|
|
76
75
|
return avatarColors[index];
|
|
77
76
|
}
|
|
78
77
|
export function isGravatarUrl(url) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
try {
|
|
79
|
+
const {
|
|
80
|
+
hostname,
|
|
81
|
+
pathname
|
|
82
|
+
} = new URL(url);
|
|
83
|
+
return _split(hostname, '.').includes('gravatar') && pathname.startsWith('/avatar/');
|
|
84
|
+
} catch {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
84
87
|
}
|
|
85
88
|
export function isBlankGravatarUrl(url) {
|
|
86
89
|
return isGravatarUrl(url) && _endsWith(url, '?d=blank');
|
|
87
90
|
}
|
|
88
91
|
export function patchGravatarUrl(gravatarUrl) {
|
|
89
|
-
const url = new URL(gravatarUrl
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} = url;
|
|
93
|
-
query.d = '404';
|
|
94
|
-
delete query.default;
|
|
95
|
-
url.set('query', query);
|
|
92
|
+
const url = new URL(gravatarUrl);
|
|
93
|
+
url.searchParams.set('d', '404');
|
|
94
|
+
url.searchParams.delete('default');
|
|
96
95
|
return url.toString();
|
|
97
96
|
}
|