@dynamic-labs/utils 0.19.0-alpha.11 → 0.19.0-alpha.12
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/CHANGELOG.md +14 -0
- package/package.json +3 -3
- package/src/index.cjs +1 -0
- package/src/index.js +1 -1
- package/src/isMobile.cjs +9 -0
- package/src/isMobile.d.ts +1 -0
- package/src/isMobile.js +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
## [0.19.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.11...v0.19.0-alpha.12) (2023-10-03)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* filter wallet list for wallets which have not been connected ([#3499](https://github.com/dynamic-labs/DynamicAuth/issues/3499)) ([10e531f](https://github.com/dynamic-labs/DynamicAuth/commit/10e531f0836b029ab43713b9b2c7ecf273a4018c))
|
|
8
|
+
* passkey flow copies should be fully editable ([#3504](https://github.com/dynamic-labs/DynamicAuth/issues/3504)) ([390392c](https://github.com/dynamic-labs/DynamicAuth/commit/390392cc5c95afd0226f29a72560c295fa2be391))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove useEffect in useSetWalletConnectorVerifiedCredentials to avoid race conditions ([#3495](https://github.com/dynamic-labs/DynamicAuth/issues/3495)) ([aa17676](https://github.com/dynamic-labs/DynamicAuth/commit/aa176761f324806000317db1f683d545ec642619))
|
|
14
|
+
* show android touch id icon for those with it available on passkey intro ([#3503](https://github.com/dynamic-labs/DynamicAuth/issues/3503)) ([4017f16](https://github.com/dynamic-labs/DynamicAuth/commit/4017f16fe0b0ceeb03f064ac9e9d34b71764b242))
|
|
15
|
+
|
|
2
16
|
## [0.19.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.10...v0.19.0-alpha.11) (2023-10-02)
|
|
3
17
|
|
|
4
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "0.19.0-alpha.
|
|
3
|
+
"version": "0.19.0-alpha.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"viem": "^1.5.3"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dynamic-labs/logger": "0.19.0-alpha.
|
|
33
|
-
"@dynamic-labs/types": "0.19.0-alpha.
|
|
32
|
+
"@dynamic-labs/logger": "0.19.0-alpha.12",
|
|
33
|
+
"@dynamic-labs/types": "0.19.0-alpha.12"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/src/index.cjs
CHANGED
|
@@ -54,6 +54,7 @@ exports.UserHasAccountWithEmailError = UserHasAccountWithEmailError.UserHasAccou
|
|
|
54
54
|
exports.SocialAccountAlreadyExistsError = SocialAccountAlreadyExistsError.SocialAccountAlreadyExistsError;
|
|
55
55
|
exports.CancellablePromise = CancellablePromise.CancellablePromise;
|
|
56
56
|
exports.isFunction = isFunction.isFunction;
|
|
57
|
+
exports.getAndroidVersion = isMobile.getAndroidVersion;
|
|
57
58
|
exports.isAndroid = isMobile.isAndroid;
|
|
58
59
|
exports.isIOS = isMobile.isIOS;
|
|
59
60
|
exports.isIPad = isMobile.isIPad;
|
package/src/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export { UserHasAccountWithEmailError } from './errors/UserHasAccountWithEmailEr
|
|
|
18
18
|
export { SocialAccountAlreadyExistsError } from './errors/SocialAccountAlreadyExistsError.js';
|
|
19
19
|
export { CancellablePromise } from './CancellablePromise/CancellablePromise.js';
|
|
20
20
|
export { isFunction } from './isFunction/isFunction.js';
|
|
21
|
-
export { isAndroid, isIOS, isIPad, isIPhone, isIPhone8OrEarlier, isLegacySafari, isMobile, isSamsungBrowser, isWindows } from './isMobile.js';
|
|
21
|
+
export { getAndroidVersion, isAndroid, isIOS, isIPad, isIPhone, isIPhone8OrEarlier, isLegacySafari, isMobile, isSamsungBrowser, isWindows } from './isMobile.js';
|
|
22
22
|
export { getItemAsync, removeItemAsync, setItemAsync } from './localStorageAsync.js';
|
|
23
23
|
export { bufferToBase64 } from './bufferToBase64.js';
|
|
24
24
|
export { last } from './last.js';
|
package/src/isMobile.cjs
CHANGED
|
@@ -114,7 +114,16 @@ const iPhoneLegacyRegex = [
|
|
|
114
114
|
regex: /(?:MDCR_|ICRU_|Apple-)?(?:iPh(?:one)?10[C,_]25|8PLUS)$/,
|
|
115
115
|
},
|
|
116
116
|
];
|
|
117
|
+
const getAndroidVersion = () => {
|
|
118
|
+
const androidVersionMatch = navigator.userAgent.match(/Android (\d+(\.\d+)?)/);
|
|
119
|
+
if (!androidVersionMatch) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const androidVersion = parseFloat(androidVersionMatch[1]);
|
|
123
|
+
return androidVersion;
|
|
124
|
+
};
|
|
117
125
|
|
|
126
|
+
exports.getAndroidVersion = getAndroidVersion;
|
|
118
127
|
exports.isAndroid = isAndroid;
|
|
119
128
|
exports.isIOS = isIOS;
|
|
120
129
|
exports.isIPad = isIPad;
|
package/src/isMobile.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export declare const isAndroid: () => boolean;
|
|
|
15
15
|
export declare const isLegacySafari: () => boolean;
|
|
16
16
|
export declare const isSamsungBrowser: () => boolean;
|
|
17
17
|
export declare const isWindows: () => boolean;
|
|
18
|
+
export declare const getAndroidVersion: () => number | undefined;
|
package/src/isMobile.js
CHANGED
|
@@ -110,5 +110,13 @@ const iPhoneLegacyRegex = [
|
|
|
110
110
|
regex: /(?:MDCR_|ICRU_|Apple-)?(?:iPh(?:one)?10[C,_]25|8PLUS)$/,
|
|
111
111
|
},
|
|
112
112
|
];
|
|
113
|
+
const getAndroidVersion = () => {
|
|
114
|
+
const androidVersionMatch = navigator.userAgent.match(/Android (\d+(\.\d+)?)/);
|
|
115
|
+
if (!androidVersionMatch) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const androidVersion = parseFloat(androidVersionMatch[1]);
|
|
119
|
+
return androidVersion;
|
|
120
|
+
};
|
|
113
121
|
|
|
114
|
-
export { isAndroid, isIOS, isIPad, isIPhone, isIPhone8OrEarlier, isLegacySafari, isMobile, isSamsungBrowser, isWindows };
|
|
122
|
+
export { getAndroidVersion, isAndroid, isIOS, isIPad, isIPhone, isIPhone8OrEarlier, isLegacySafari, isMobile, isSamsungBrowser, isWindows };
|