@saasmakers/ui 2.0.9 → 2.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.
@@ -89,7 +89,7 @@ async function onStartAuthentication() {
89
89
  }
90
90
  }
91
91
  catch (error) {
92
- if (isUserCancellation(error)) {
92
+ if (isSocialLoginCancellation(error)) {
93
93
  return
94
94
  }
95
95
 
@@ -0,0 +1,11 @@
1
+ export function isSocialLoginCancellation(error: unknown): boolean {
2
+ if (!error || typeof error !== 'object') {
3
+ return false
4
+ }
5
+
6
+ const candidate = error as { code?: string }
7
+
8
+ // @capgo/capacitor-social-login rejects user-dismissed sheets with this code on iOS and Android.
9
+ // The message is localized, so never match on it.
10
+ return candidate.code === 'USER_CANCELLED'
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",
@@ -12,9 +12,9 @@
12
12
  "types": "./app/types/global.d.ts",
13
13
  "default": "./nuxt.config.ts"
14
14
  },
15
- "./app/utils/errors": {
16
- "types": "./app/utils/errors.ts",
17
- "default": "./app/utils/errors.ts"
15
+ "./app/utils/auth": {
16
+ "types": "./app/utils/auth.ts",
17
+ "default": "./app/utils/auth.ts"
18
18
  }
19
19
  },
20
20
  "main": "nuxt.config.ts",
@@ -1,11 +0,0 @@
1
- export function isUserCancellation(error: unknown): boolean {
2
- if (!error || typeof error !== 'object') {
3
- return false
4
- }
5
-
6
- const candidate = error as { code?: string, name?: string }
7
-
8
- // Capacitor social-login rejects cancellations with this code on both iOS and Android.
9
- // The message is localized, so never match on it.
10
- return candidate.code === 'USER_CANCELLED' || candidate.name === 'AbortError'
11
- }