@oxyhq/services 10.2.0 → 10.2.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/README.md +2 -2
- package/lib/commonjs/index.js +10 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenu.js +297 -226
- package/lib/commonjs/ui/components/AccountMenu.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +11 -12
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/accountMenuRows.js +18 -30
- package/lib/commonjs/ui/components/accountMenuRows.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +33 -65
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +7 -13
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +9 -39
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceAccounts.js +285 -0
- package/lib/commonjs/ui/hooks/useDeviceAccounts.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js +5 -6
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +4 -5
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -7
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +6 -7
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +18 -20
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +4 -4
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/{karma/KarmaAboutScreen.js → trust/TrustAboutScreen.js} +11 -11
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/{karma/KarmaCenterScreen.js → trust/TrustCenterScreen.js} +91 -41
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/{karma/KarmaFAQScreen.js → trust/TrustFAQScreen.js} +11 -11
- package/lib/commonjs/ui/screens/{karma/KarmaFAQScreen.js.map → trust/TrustFAQScreen.js.map} +1 -1
- package/lib/commonjs/ui/screens/{karma/KarmaLeaderboardScreen.js → trust/TrustLeaderboardScreen.js} +63 -42
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/{karma/KarmaRewardsScreen.js → trust/TrustRewardsScreen.js} +54 -54
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/{karma/KarmaRulesScreen.js → trust/TrustRulesScreen.js} +45 -16
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/trust/trustTier.js +23 -0
- package/lib/commonjs/ui/screens/trust/trustTier.js.map +1 -0
- package/lib/commonjs/utils/deviceFlowSignIn.js +12 -10
- package/lib/commonjs/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AccountMenu.js +297 -226
- package/lib/module/ui/components/AccountMenu.js.map +1 -1
- package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +1 -1
- package/lib/module/ui/components/SignInModal.js +11 -12
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/accountMenuRows.js +18 -30
- package/lib/module/ui/components/accountMenuRows.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +33 -65
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +7 -13
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +9 -39
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceAccounts.js +281 -0
- package/lib/module/ui/hooks/useDeviceAccounts.js.map +1 -0
- package/lib/module/ui/hooks/useSessionManagement.js +5 -6
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +4 -5
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/hooks/useWebSSO.js +1 -1
- package/lib/module/ui/navigation/routes.js +7 -7
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +6 -7
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +18 -20
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +4 -4
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/{karma/KarmaAboutScreen.js → trust/TrustAboutScreen.js} +11 -11
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -0
- package/lib/module/ui/screens/{karma/KarmaCenterScreen.js → trust/TrustCenterScreen.js} +92 -42
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -0
- package/lib/module/ui/screens/{karma/KarmaFAQScreen.js → trust/TrustFAQScreen.js} +11 -11
- package/lib/module/ui/screens/{karma/KarmaFAQScreen.js.map → trust/TrustFAQScreen.js.map} +1 -1
- package/lib/module/ui/screens/{karma/KarmaLeaderboardScreen.js → trust/TrustLeaderboardScreen.js} +63 -42
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -0
- package/lib/module/ui/screens/{karma/KarmaRewardsScreen.js → trust/TrustRewardsScreen.js} +54 -54
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -0
- package/lib/module/ui/screens/{karma/KarmaRulesScreen.js → trust/TrustRulesScreen.js} +45 -16
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -0
- package/lib/module/ui/screens/trust/trustTier.js +19 -0
- package/lib/module/ui/screens/trust/trustTier.js.map +1 -0
- package/lib/module/utils/deviceFlowSignIn.js +13 -10
- package/lib/module/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +30 -10
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts +19 -12
- package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +3 -3
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +1 -7
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +3 -7
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceAccounts.d.ts +133 -0
- package/lib/typescript/commonjs/ui/hooks/useDeviceAccounts.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts +5 -0
- package/lib/typescript/commonjs/ui/screens/{karma/KarmaAboutScreen.d.ts.map → trust/TrustAboutScreen.d.ts.map} +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts +5 -0
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -0
- package/lib/typescript/{module/ui/screens/karma/KarmaFAQScreen.d.ts → commonjs/ui/screens/trust/TrustFAQScreen.d.ts} +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts +5 -0
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts +5 -0
- package/lib/typescript/commonjs/ui/screens/{karma/KarmaRewardsScreen.d.ts.map → trust/TrustRewardsScreen.d.ts.map} +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts +5 -0
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +9 -0
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +1 -1
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +11 -9
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountMenu.d.ts +30 -10
- package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/accountMenuRows.d.ts +19 -12
- package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +3 -3
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +1 -7
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +3 -7
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceAccounts.d.ts +133 -0
- package/lib/typescript/module/ui/hooks/useDeviceAccounts.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +5 -0
- package/lib/typescript/module/ui/screens/{karma/KarmaAboutScreen.d.ts.map → trust/TrustAboutScreen.d.ts.map} +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts +5 -0
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -0
- package/lib/typescript/{commonjs/ui/screens/karma/KarmaFAQScreen.d.ts → module/ui/screens/trust/TrustFAQScreen.d.ts} +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts +5 -0
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts +5 -0
- package/lib/typescript/module/ui/screens/{karma/KarmaRewardsScreen.d.ts.map → trust/TrustRewardsScreen.d.ts.map} +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts +5 -0
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +9 -0
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -0
- package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +11 -9
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +10 -1
- package/src/ui/components/AccountMenu.tsx +311 -253
- package/src/ui/components/AccountMenuButton.tsx +2 -2
- package/src/ui/components/OxySignInButton.tsx +1 -1
- package/src/ui/components/SignInModal.tsx +13 -14
- package/src/ui/components/accountMenuRows.ts +28 -40
- package/src/ui/context/OxyContext.tsx +43 -61
- package/src/ui/context/hooks/useAuthOperations.ts +7 -13
- package/src/ui/hooks/useAuth.ts +11 -48
- package/src/ui/hooks/useDeviceAccounts.ts +348 -0
- package/src/ui/hooks/useSessionManagement.ts +5 -14
- package/src/ui/hooks/useSessionSocket.ts +4 -5
- package/src/ui/hooks/useWebSSO.ts +1 -1
- package/src/ui/navigation/routes.ts +13 -13
- package/src/ui/screens/OxyAuthScreen.tsx +6 -7
- package/src/ui/screens/ProfileScreen.tsx +15 -17
- package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -2
- package/src/ui/screens/{karma/KarmaAboutScreen.tsx → trust/TrustAboutScreen.tsx} +15 -15
- package/src/ui/screens/{karma/KarmaCenterScreen.tsx → trust/TrustCenterScreen.tsx} +87 -41
- package/src/ui/screens/{karma/KarmaFAQScreen.tsx → trust/TrustFAQScreen.tsx} +10 -10
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +101 -0
- package/src/ui/screens/{karma/KarmaRewardsScreen.tsx → trust/TrustRewardsScreen.tsx} +54 -54
- package/src/ui/screens/{karma/KarmaRulesScreen.tsx → trust/TrustRulesScreen.tsx} +27 -13
- package/src/ui/screens/trust/trustTier.ts +20 -0
- package/src/ui/types/navigation.ts +1 -2
- package/src/utils/__tests__/deviceFlowSignIn.test.ts +2 -3
- package/src/utils/deviceFlowSignIn.ts +18 -12
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +0 -88
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DeviceAccount, DeviceAccountUser } from '../hooks/useDeviceAccounts';
|
|
2
2
|
export interface AccountRow {
|
|
3
3
|
sessionId: string;
|
|
4
|
+
/** Device-local refresh-cookie slot index (web silent-switch). */
|
|
5
|
+
authuser?: number;
|
|
4
6
|
isActive: boolean;
|
|
5
7
|
displayName: string;
|
|
6
8
|
secondary: string | null;
|
|
7
9
|
avatarUri?: string;
|
|
8
|
-
user:
|
|
10
|
+
user: DeviceAccountUser | null;
|
|
9
11
|
}
|
|
10
12
|
export interface BuildAccountRowsInput {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Per-device account entries from {@link useDeviceAccounts}. Each entry
|
|
15
|
+
* already carries real per-account `displayName` / `email` / `avatarUrl` /
|
|
16
|
+
* `color`, so EVERY row (not just the active one) renders full identity.
|
|
17
|
+
*/
|
|
18
|
+
accounts: DeviceAccount[];
|
|
16
19
|
}
|
|
17
20
|
/**
|
|
18
21
|
* Pure builder for `AccountMenu` rows. Extracted so the multi-account display
|
|
19
22
|
* logic can be unit-tested without rendering React Native.
|
|
20
23
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
24
|
+
* Maps each {@link DeviceAccount} (sourced from `useDeviceAccounts()`, which
|
|
25
|
+
* hydrates EVERY account with real name/email/avatar/color from the shared
|
|
26
|
+
* apex `refresh-all` path or the local fallback) into an `AccountRow`.
|
|
27
|
+
*
|
|
28
|
+
* `secondary` is the account's real email when present; otherwise it falls
|
|
29
|
+
* back to the `@handle` line. A missing email is NEVER synthesized into a fake
|
|
30
|
+
* `username@oxy.so` — the device-account layer already resolved `email` to the
|
|
31
|
+
* real value or the `@handle` fallback.
|
|
25
32
|
*/
|
|
26
|
-
export declare function buildAccountRows({
|
|
33
|
+
export declare function buildAccountRows({ accounts, }: BuildAccountRowsInput): AccountRow[];
|
|
27
34
|
//# sourceMappingURL=accountMenuRows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountMenuRows.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/accountMenuRows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"accountMenuRows.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/accountMenuRows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,MAAM,WAAW,UAAU;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,QAAQ,GACX,EAAE,qBAAqB,GAAG,UAAU,EAAE,CAUtC"}
|
|
@@ -39,10 +39,10 @@ export interface OxyContextState {
|
|
|
39
39
|
getPublicKey: () => Promise<string | null>;
|
|
40
40
|
signIn: (publicKey: string, deviceName?: string) => Promise<User>;
|
|
41
41
|
/**
|
|
42
|
-
* Handle session
|
|
43
|
-
* Updates auth state, persists session to storage
|
|
42
|
+
* Handle a session returned by web SSO.
|
|
43
|
+
* Updates auth state, persists session metadata to storage.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
handleWebSession: (session: SessionLoginResponse) => Promise<void>;
|
|
46
46
|
logout: (targetSessionId?: string) => Promise<void>;
|
|
47
47
|
logoutAll: () => Promise<void>;
|
|
48
48
|
switchSession: (sessionId: string) => Promise<User>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,cAA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IACpD,+BAA+B;IAC/B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAMD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,qQAkB/B,wBAAwB,KAAG,uBAmV7B,CAAC"}
|
|
@@ -119,14 +119,8 @@ export declare const useUpdateAccountSettings: () => {
|
|
|
119
119
|
email?: string;
|
|
120
120
|
avatar?: string;
|
|
121
121
|
color?: string;
|
|
122
|
-
name?:
|
|
123
|
-
first?: string;
|
|
124
|
-
last?: string;
|
|
125
|
-
full?: string;
|
|
126
|
-
[key: string]: unknown;
|
|
127
|
-
};
|
|
122
|
+
name?: import("@oxyhq/contracts").UserNameResponse;
|
|
128
123
|
bio?: string;
|
|
129
|
-
karma?: number;
|
|
130
124
|
location?: string;
|
|
131
125
|
website?: string;
|
|
132
126
|
createdAt?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAcrB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EA6F5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAMQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA4EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;sBAoFf,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BAQpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBARnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BAQpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBARnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BAQpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBARnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BAQpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAcrB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EA6F5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAMQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA4EtF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,UAAU,8BAA8B;IACtC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAClC;;;;OAIG;IACH,WAAW,EAAE,IAAI,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB;sBAoFf,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BAQpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBARnD,OAAO,CAAC,eAAe,CAAC,KAAG,IAAI;2BAQpB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;sBARnD,OAAO,CAAC,eA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E,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;EAmD5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;EA+CpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,uFAoBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;iBACrB,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAS5C,CAAC"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* Cross-domain SSO:
|
|
21
21
|
* - Web: Automatic via FedCM (Chrome 108+, Safari 16.4+)
|
|
22
22
|
* - Native: Automatic via shared Keychain/Account Manager
|
|
23
|
-
* - Manual sign-in: signIn()
|
|
23
|
+
* - Manual sign-in: signIn() redirects to the IdP (web) or opens the auth sheet (native)
|
|
24
24
|
*/
|
|
25
25
|
import { useOxy } from '../context/OxyContext';
|
|
26
26
|
import type { User } from '@oxyhq/core';
|
|
@@ -50,16 +50,12 @@ export interface AuthState {
|
|
|
50
50
|
export interface AuthActions {
|
|
51
51
|
/**
|
|
52
52
|
* Sign in
|
|
53
|
-
* - Web:
|
|
53
|
+
* - Web: Redirects to auth.oxy.so (no public key needed)
|
|
54
54
|
* - Native: Uses cryptographic identity from keychain
|
|
55
55
|
*
|
|
56
56
|
* @param publicKey - Native: identity public key. Ignored on web.
|
|
57
|
-
* @param preOpenedPopup - Web only: a popup the caller already opened
|
|
58
|
-
* SYNCHRONOUSLY on the raw click via `oxyServices.openBlankPopup()`. This
|
|
59
|
-
* keeps Chrome's user-activation alive across any prior `await` and is
|
|
60
|
-
* the only reliable way to avoid the popup blocker on cross-domain flows.
|
|
61
57
|
*/
|
|
62
|
-
signIn: (publicKey?: string
|
|
58
|
+
signIn: (publicKey?: string) => Promise<User>;
|
|
63
59
|
/**
|
|
64
60
|
* Sign out current session
|
|
65
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAElB,oCAAoC;IACpC,eAAe,EAAE,OAAO,CAAC;IAEzB,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAC;IAEnB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;OASG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB,oCAAoC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAElB,oCAAoC;IACpC,eAAe,EAAE,OAAO,CAAC;IAEzB,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAC;IAEnB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;OASG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB,oCAAoC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhC;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,EAAE,WAAW;IAC3D,6DAA6D;IAC7D,WAAW,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;IACtD,0EAA0E;IAC1E,eAAe,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC9D,0CAA0C;IAC1C,gBAAgB,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;CACjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,IAAI,aAAa,CA6GvC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { RefreshAllAccountUser, User } from '@oxyhq/core';
|
|
2
|
+
/**
|
|
3
|
+
* The per-account user shape carried by a {@link DeviceAccount}. Either:
|
|
4
|
+
* - the minimal projection returned by `POST /auth/refresh-all`
|
|
5
|
+
* ({@link RefreshAllAccountUser}, the shared apex path), or
|
|
6
|
+
* - the SDK's canonical {@link User} document (the active row on the local
|
|
7
|
+
* fallback path, which already has the full user loaded in `useOxy()`).
|
|
8
|
+
*
|
|
9
|
+
* Both satisfy `getAccountDisplayName`'s `DisplayNameUserShape`, so display
|
|
10
|
+
* resolution is uniform across paths.
|
|
11
|
+
*/
|
|
12
|
+
export type DeviceAccountUser = RefreshAllAccountUser | User;
|
|
13
|
+
/**
|
|
14
|
+
* One signed-in account on this device, fully hydrated for the account
|
|
15
|
+
* chooser. Unlike the old `AccountMenu` behaviour (which only carried the
|
|
16
|
+
* ACTIVE session's user), EVERY entry here carries real per-account
|
|
17
|
+
* `displayName` / `email` / `avatarUrl` / `color`.
|
|
18
|
+
*/
|
|
19
|
+
export interface DeviceAccount {
|
|
20
|
+
/** Session id used to switch to this account on native. */
|
|
21
|
+
sessionId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Device-local refresh-cookie slot index (0..N-1), present only on the
|
|
24
|
+
* shared apex path. Web silent-switch (`refreshTokenViaCookie({ authuser }`)
|
|
25
|
+
* keys off this; absent on the local fallback and on native.
|
|
26
|
+
*/
|
|
27
|
+
authuser?: number;
|
|
28
|
+
/** Whether this account is the currently-active session. */
|
|
29
|
+
isCurrent: boolean;
|
|
30
|
+
/** Friendly display name (never blank — falls back to a handle/sentinel). */
|
|
31
|
+
displayName: string;
|
|
32
|
+
/**
|
|
33
|
+
* Real account email, or `null` when the account genuinely has none.
|
|
34
|
+
* NEVER a synthesized `username@oxy.so` — a missing email stays `null` and
|
|
35
|
+
* the UI falls back to the `@handle` secondary line.
|
|
36
|
+
*/
|
|
37
|
+
email: string | null;
|
|
38
|
+
/** Resolved avatar thumbnail URL, or `undefined` when the account has no avatar. */
|
|
39
|
+
avatarUrl?: string;
|
|
40
|
+
/** Account's preferred Bloom color preset, or `null` when unset. */
|
|
41
|
+
color: string | null;
|
|
42
|
+
/** The underlying per-account user payload (shared projection or full User). */
|
|
43
|
+
user: DeviceAccountUser;
|
|
44
|
+
}
|
|
45
|
+
export interface UseDeviceAccountsResult {
|
|
46
|
+
/** Every account signed in on this device, current one(s) flagged `isCurrent`. */
|
|
47
|
+
accounts: DeviceAccount[];
|
|
48
|
+
/** True until the first detection settles. */
|
|
49
|
+
isLoading: boolean;
|
|
50
|
+
/** The currently-active session id (mirrors `useOxy().activeSessionId`). */
|
|
51
|
+
currentSessionId: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* `true` when the list came from the shared apex path
|
|
54
|
+
* (`refreshAllSessions()` returned >0 accounts — the cross-domain SSO cookie
|
|
55
|
+
* set on `*.oxy.so`). `false` when it came from the local `useOxy()`
|
|
56
|
+
* fallback (native, or cross-domain web where the apex cookie is absent).
|
|
57
|
+
*/
|
|
58
|
+
fromSharedApex: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Resolve which entries are the current account, robustly.
|
|
62
|
+
*
|
|
63
|
+
* Primary signal: `entry.sessionId === activeSessionId`. On the web shared-apex
|
|
64
|
+
* path, `refreshAllSessions()` returns SERVER-side session ids that may not
|
|
65
|
+
* equal the locally-stored `activeSessionId` (a different storage namespace /
|
|
66
|
+
* server perspective), so a pure `sessionId` match can flag NO row as current —
|
|
67
|
+
* the bug that surfaced as "Not signed in" even while authenticated.
|
|
68
|
+
*
|
|
69
|
+
* Fallbacks, applied only when the `sessionId` match found nothing AND the user
|
|
70
|
+
* is authenticated:
|
|
71
|
+
* 1. Match the live `user.id` against each entry's per-account user id.
|
|
72
|
+
* 2. If still nothing and there is exactly one account, mark that one current.
|
|
73
|
+
*
|
|
74
|
+
* At most ONE entry is ever marked current.
|
|
75
|
+
*
|
|
76
|
+
* Pure & side-effect free so it is unit-testable without rendering React.
|
|
77
|
+
*/
|
|
78
|
+
export declare function markCurrentAccount(accounts: DeviceAccount[], activeSessionId: string | null | undefined, liveUserId: string | null | undefined, isAuthenticated: boolean): DeviceAccount[];
|
|
79
|
+
/**
|
|
80
|
+
* Resolve every account signed in on this device for the unified account
|
|
81
|
+
* switcher, with real per-account name / email / avatar / color.
|
|
82
|
+
*
|
|
83
|
+
* ## Data sources (web vs native)
|
|
84
|
+
*
|
|
85
|
+
* - **Web on a `*.oxy.so` host** → `oxyServices.refreshAllSessions()` returns
|
|
86
|
+
* the full apex device-account list (identical to what `auth.oxy.so` sees,
|
|
87
|
+
* because the `Domain=oxy.so` refresh cookies reach `api.oxy.so`). Used
|
|
88
|
+
* directly — this is the `fromSharedApex: true` path.
|
|
89
|
+
* - **Cross-domain web (non-`oxy.so` apex)** OR **native (no browser cookies)**
|
|
90
|
+
* → `refreshAllSessions()` yields `{ accounts: [] }` (the apex cookies never
|
|
91
|
+
* reach the request: cross-domain by `Domain`, native by having no cookie
|
|
92
|
+
* jar at all; a 401 is also normalised to `{ accounts: [] }` inside the
|
|
93
|
+
* core mixin). In that case we FALL BACK to the SDK's local multi-account
|
|
94
|
+
* list from `useOxy()` (`sessions` + `activeSessionId` + the active `user`).
|
|
95
|
+
* This is the `fromSharedApex: false` path.
|
|
96
|
+
*
|
|
97
|
+
* The fallback decision is purely data-driven: **if `refreshAllSessions()`
|
|
98
|
+
* returns >0 accounts, use the shared path; otherwise fall back to local
|
|
99
|
+
* `useOxy()` sessions.** No host sniffing is needed — the cookie scoping does
|
|
100
|
+
* the discrimination for us, and the same code path works on native (where the
|
|
101
|
+
* fetch returns `{ accounts: [] }`).
|
|
102
|
+
*
|
|
103
|
+
* ## Why React Query (not a `useRef`/`useState` start-once like the auth app)
|
|
104
|
+
*
|
|
105
|
+
* The auth app's `use-device-accounts.ts` hand-rolls a `startedRef` because it
|
|
106
|
+
* has no React Query. The SDK does. `refreshAllSessions()` ROTATES single-use
|
|
107
|
+
* refresh cookies on every call, so it must run AT MOST ONCE per page load:
|
|
108
|
+
* we model that with `staleTime: Infinity` + `gcTime: Infinity` +
|
|
109
|
+
* `refetchOnWindowFocus/Reconnect/Mount: false` + `retry: false`. React Query
|
|
110
|
+
* dedupes concurrent mounts and caches the single result for the page's
|
|
111
|
+
* lifetime — the exact "run once" guarantee the auth app documents, but
|
|
112
|
+
* without the manual ref/state machinery.
|
|
113
|
+
*
|
|
114
|
+
* ## Validation note (intentionally NO zod re-parse)
|
|
115
|
+
*
|
|
116
|
+
* The auth app's hook calls `fetch` directly, so IT must `safeParse` the wire
|
|
117
|
+
* response with `@oxyhq/contracts`. This hook calls
|
|
118
|
+
* `oxyServices.refreshAllSessions()`, whose core mixin ALREADY validates and
|
|
119
|
+
* normalises the wire response (skips entries missing required fields,
|
|
120
|
+
* normalises `authuser` null→0, builds the `RefreshAllAccountUser` shape) — the
|
|
121
|
+
* mixin is the single source of truth. Re-validating the SDK's own already-typed
|
|
122
|
+
* output here would be redundant double-validation, so we do not re-parse.
|
|
123
|
+
*
|
|
124
|
+
* ## Error handling
|
|
125
|
+
*
|
|
126
|
+
* `refreshAllSessions()` already maps 401/404/abort to `{ accounts: [] }`
|
|
127
|
+
* internally. Any OTHER failure (network, 5xx) propagates as a thrown error and
|
|
128
|
+
* is surfaced by React Query (`query.isError`) — never swallowed. Callers that
|
|
129
|
+
* don't care can ignore it; the hook still returns the local fallback list so
|
|
130
|
+
* the chooser stays usable.
|
|
131
|
+
*/
|
|
132
|
+
export declare function useDeviceAccounts(): UseDeviceAccountsResult;
|
|
133
|
+
//# sourceMappingURL=useDeviceAccounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeviceAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useDeviceAccounts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACR,qBAAqB,EACrB,IAAI,EAEP,MAAM,aAAa,CAAC;AAKrB;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GAAG,IAAI,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAC;IACnB,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,gFAAgF;IAChF,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Ac,EACd,eAAe,EACf,gBAAgB,GACjB,EAAE,qBAAqB,QAoLvB"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* without relying on third-party cookies.
|
|
9
9
|
*
|
|
10
10
|
* For browsers without FedCM support, users will need to click a sign-in button
|
|
11
|
-
* which triggers
|
|
11
|
+
* which triggers redirect authentication.
|
|
12
12
|
*
|
|
13
13
|
* This is called automatically by OxyContext on web platforms.
|
|
14
14
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import type { BaseScreenProps } from '../types/navigation';
|
|
3
|
-
export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfileField' | 'LearnMoreUsernames' | '
|
|
3
|
+
export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfileField' | 'LearnMoreUsernames' | 'TrustCenter' | 'TrustLeaderboard' | 'TrustRewards' | 'TrustRules' | 'AboutTrust' | 'TrustFAQ' | 'FollowersList' | 'FollowingList' | 'CreateManagedAccount' | 'AvatarCrop' | 'Notifications' | 'ConnectedApps' | 'Preferences';
|
|
4
4
|
export declare const getScreenComponent: (routeName: RouteName) => ComponentType<BaseScreenProps> | undefined;
|
|
5
5
|
export declare const isValidRoute: (routeName: string) => routeName is RouteName;
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA2F3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA2F3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgb5C,CAAC;AA6FF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D,UAAU,kBAAmB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAYD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D,UAAU,kBAAmB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAYD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgU/C,CAAC;AA2FF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"TrustAboutScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustAboutScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAK9D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsC/C,CAAC;AAoBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrustCenterScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustCenterScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAW9D,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgKhD,CAAC;AA6HF,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import type { BaseScreenProps } from '../../types/navigation';
|
|
3
3
|
declare const _default: React.NamedExoticComponent<BaseScreenProps>;
|
|
4
4
|
export default _default;
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=TrustFAQScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrustFAQScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustFAQScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;;AAuK9D,wBAA0C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrustLeaderboardScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustLeaderboardScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQ9D,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkErD,CAAC;AAsBF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"TrustRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAuB9D,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+YjD,CAAC;AAyMF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrustRulesScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRulesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAM9D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuD/C,CAAC;AAsBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TrustTier } from '@oxyhq/core';
|
|
2
|
+
type Translate = (key: string, vars?: Record<string, string | number>) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a human-readable label for a trust tier, preferring the localized
|
|
5
|
+
* `trust.tiers.<tier>` key and falling back to the canonical English label.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getTrustTierLabel(tier: TrustTier, t: Translate): string;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=trustTier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trustTier.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/trustTier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;AAWjF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAEvE"}
|
|
@@ -31,7 +31,7 @@ export interface OxyProviderProps {
|
|
|
31
31
|
storageKeyPrefix?: string;
|
|
32
32
|
/**
|
|
33
33
|
* The app's Oxy OAuth client id / ApplicationCredential publicKey.
|
|
34
|
-
* Required for the cross-app device sign-in flow: the QR /
|
|
34
|
+
* Required for the cross-app device sign-in flow: the QR / approval-window
|
|
35
35
|
* sign-in registers a device-flow session via `POST /auth/session/create`,
|
|
36
36
|
* which now identifies the requesting app by this real registered
|
|
37
37
|
* client id. The central Oxy auth experience resolves and renders the
|
|
@@ -10,15 +10,16 @@
|
|
|
10
10
|
* token via `claimSessionByToken` — the device-flow equivalent of OAuth's
|
|
11
11
|
* code-for-token exchange (RFC 8628 §3.4).
|
|
12
12
|
*
|
|
13
|
-
* Skipping the claim leaves the SDK with NO bearer token
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* authorization..." forever. The web `SignInModal` already claimed first; the
|
|
18
|
-
* native `OxyAuthScreen` did not. Consolidating the claim→switch sequence here
|
|
19
|
-
* keeps both paths identical and unit-testable, and prevents future drift.
|
|
13
|
+
* Skipping the claim leaves the SDK with NO bearer token: the session is
|
|
14
|
+
* authorized server-side but the app never becomes authenticated and the UI
|
|
15
|
+
* sits "Waiting for authorization..." forever. Consolidating the claim→switch
|
|
16
|
+
* sequence here keeps native and web identical and unit-testable.
|
|
20
17
|
*/
|
|
21
|
-
import type
|
|
18
|
+
import { type User } from '@oxyhq/core';
|
|
19
|
+
interface DeviceFlowClaimResult {
|
|
20
|
+
accessToken?: string;
|
|
21
|
+
sessionId?: string;
|
|
22
|
+
}
|
|
22
23
|
/**
|
|
23
24
|
* The minimal `OxyServices` surface this orchestration needs. Kept as a
|
|
24
25
|
* structural type (rather than importing the full client) so the helper is
|
|
@@ -31,7 +32,7 @@ export interface DeviceFlowClient {
|
|
|
31
32
|
* token, planting them on the client. Single-use; replay is rejected by the
|
|
32
33
|
* API. No bearer required — the high-entropy `sessionToken` IS the credential.
|
|
33
34
|
*/
|
|
34
|
-
claimSessionByToken: (sessionToken: string) => Promise<
|
|
35
|
+
claimSessionByToken: (sessionToken: string) => Promise<DeviceFlowClaimResult | undefined>;
|
|
35
36
|
}
|
|
36
37
|
export interface CompleteDeviceFlowSignInOptions {
|
|
37
38
|
/** The OxyServices client (or any object exposing `claimSessionByToken`). */
|
|
@@ -58,4 +59,5 @@ export interface CompleteDeviceFlowSignInOptions {
|
|
|
58
59
|
* Throws if either the claim or the switch fails; callers surface a retry UI.
|
|
59
60
|
*/
|
|
60
61
|
export declare function completeDeviceFlowSignIn({ oxyServices, sessionId, sessionToken, switchSession, }: CompleteDeviceFlowSignInOptions): Promise<User>;
|
|
62
|
+
export {};
|
|
61
63
|
//# sourceMappingURL=deviceFlowSignIn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceFlowSignIn.d.ts","sourceRoot":"","sources":["../../../../src/utils/deviceFlowSignIn.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deviceFlowSignIn.d.ts","sourceRoot":"","sources":["../../../../src/utils/deviceFlowSignIn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEpD,UAAU,qBAAqB;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,mBAAmB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAC;CAC3F;AAED,MAAM,WAAW,+BAA+B;IAC9C,6EAA6E;IAC7E,WAAW,EAAE,gBAAgB,CAAC;IAC9B,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,WAAW,EACX,SAAS,EACT,YAAY,EACZ,aAAa,GACd,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC,CAWjD"}
|
|
@@ -59,9 +59,11 @@ export { LogoIcon } from './ui/components/logo/LogoIcon';
|
|
|
59
59
|
export { LogoText } from './ui/components/logo/LogoText';
|
|
60
60
|
export { default as ActingAsBanner } from './ui/components/ActingAsBanner';
|
|
61
61
|
export { default as AccountMenu } from './ui/components/AccountMenu';
|
|
62
|
-
export type { AccountMenuProps } from './ui/components/AccountMenu';
|
|
62
|
+
export type { AccountMenuProps, AccountMenuAnchor } from './ui/components/AccountMenu';
|
|
63
63
|
export { default as AccountMenuButton } from './ui/components/AccountMenuButton';
|
|
64
64
|
export type { AccountMenuButtonProps } from './ui/components/AccountMenuButton';
|
|
65
|
+
export { useDeviceAccounts } from './ui/hooks/useDeviceAccounts';
|
|
66
|
+
export type { DeviceAccount, DeviceAccountUser, UseDeviceAccountsResult, } from './ui/hooks/useDeviceAccounts';
|
|
65
67
|
export { default as ManageAccountScreen } from './ui/screens/ManageAccountScreen';
|
|
66
68
|
export { default as NotificationsScreen } from './ui/screens/NotificationsScreen';
|
|
67
69
|
export { default as PreferencesScreen } from './ui/screens/PreferencesScreen';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AASH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKhF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAKxD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACH,aAAa,EACb,SAAS,IAAI,cAAc,EAC3B,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B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AwB,CAAC;AAKxD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Web-only anchor for the popover panel. Each field anchors the panel against
|
|
4
|
+
* one viewport edge, so the popover can be placed against ANY corner: a
|
|
5
|
+
* top-right avatar chip opens downward/right-aligned (`{ top, right }`), while a
|
|
6
|
+
* bottom-left account button opens upward/left-aligned (`{ bottom, left }`).
|
|
7
|
+
*
|
|
8
|
+
* Callers MUST supply at most one vertical edge (`top` XOR `bottom`) and at most
|
|
9
|
+
* one horizontal edge (`left` XOR `right`). The panel has a fixed width and
|
|
10
|
+
* `maxHeight`, so a single vertical + single horizontal edge fully positions it.
|
|
11
|
+
* Supplying both opposite edges (e.g. `top` AND `bottom`) would stretch the
|
|
12
|
+
* panel on RN-Web and is unsupported.
|
|
13
|
+
*/
|
|
14
|
+
export interface AccountMenuAnchor {
|
|
15
|
+
/** Distance from the viewport top, when anchoring the panel's TOP edge. */
|
|
16
|
+
top?: number;
|
|
17
|
+
/** Distance from the viewport bottom, when anchoring the panel's BOTTOM edge (opens upward). */
|
|
18
|
+
bottom?: number;
|
|
19
|
+
/** Distance from the viewport left, when anchoring the panel's LEFT edge. */
|
|
20
|
+
left?: number;
|
|
21
|
+
/** Distance from the viewport right, when anchoring the panel's RIGHT edge. */
|
|
22
|
+
right?: number;
|
|
23
|
+
}
|
|
2
24
|
export interface AccountMenuProps {
|
|
3
25
|
open: boolean;
|
|
4
26
|
onClose: () => void;
|
|
5
27
|
onNavigateManage: () => void;
|
|
6
28
|
onAddAccount: () => void;
|
|
7
|
-
/** Optional anchor
|
|
8
|
-
anchor?:
|
|
9
|
-
top: number;
|
|
10
|
-
right: number;
|
|
11
|
-
} | null;
|
|
29
|
+
/** Optional anchor (web only). Native ignores this and uses bottom-sheet style. */
|
|
30
|
+
anchor?: AccountMenuAnchor | null;
|
|
12
31
|
}
|
|
13
32
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
33
|
+
* Unified, canonical account switcher for the Oxy ecosystem. Gmail-style: the
|
|
34
|
+
* accounts list sits at the top (current account first, with a checkmark), then
|
|
35
|
+
* "Add another account", "Manage account", and the sign-out actions.
|
|
16
36
|
*
|
|
17
|
-
* Reads everything it needs from `useOxy()` — never
|
|
18
|
-
* props. Renders as a popover anchored to the trigger on
|
|
19
|
-
* full-width bottom-sheet style modal on native.
|
|
37
|
+
* Reads everything it needs from `useOxy()` / `useDeviceAccounts()` — never
|
|
38
|
+
* receives a session via props. Renders as a popover anchored to the trigger on
|
|
39
|
+
* web, and as a full-width bottom-sheet style modal on native.
|
|
20
40
|
*/
|
|
21
41
|
declare const AccountMenu: React.FC<AccountMenuProps>;
|
|
22
42
|
export default AccountMenu;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountMenu.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/AccountMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AccountMenu.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/AccountMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBAAiB;IAC9B,2EAA2E;IAC3E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,mFAAmF;IACnF,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACrC;AAQD;;;;;;;;GAQG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+Z3C,CAAC;AAwGF,eAAe,WAAW,CAAC"}
|