@oxyhq/services 10.2.9 → 10.2.11
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/commonjs/ui/components/ActingAsBanner.js +2 -1
- package/lib/commonjs/ui/components/ActingAsBanner.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +19 -10
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +38 -122
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +9 -7
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceAccounts.js +20 -25
- package/lib/commonjs/ui/hooks/useDeviceAccounts.js.map +1 -1
- package/lib/commonjs/ui/hooks/useProfileEditing.js +19 -10
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +1 -2
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +52 -4
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +1 -2
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +11 -13
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +2 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +2 -2
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +2 -2
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +2 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +2 -2
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +1 -2
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +2 -2
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +2 -2
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +2 -2
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +4 -3
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +3 -4
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +2 -2
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +2 -2
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +2 -2
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/components/ActingAsBanner.js +2 -1
- package/lib/module/ui/components/ActingAsBanner.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +19 -10
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +38 -122
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +9 -7
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceAccounts.js +20 -25
- package/lib/module/ui/hooks/useDeviceAccounts.js.map +1 -1
- package/lib/module/ui/hooks/useProfileEditing.js +19 -10
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +52 -4
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +10 -11
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +5 -4
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +2 -3
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +1 -1
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/ActingAsBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts +5 -3
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +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 +52 -6
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceAccounts.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +22 -18
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/authStore.d.ts +2 -10
- package/lib/typescript/commonjs/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +0 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts +2 -1
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ActingAsBanner.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts +5 -3
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +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 +52 -6
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceAccounts.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +22 -18
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/authStore.d.ts +2 -10
- package/lib/typescript/module/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +0 -1
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts +2 -1
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/ui/components/ActingAsBanner.tsx +2 -4
- package/src/ui/components/StepBasedScreen.tsx +37 -22
- package/src/ui/context/hooks/useAuthOperations.ts +51 -144
- package/src/ui/hooks/mutations/useAccountMutations.ts +9 -8
- package/src/ui/hooks/useDeviceAccounts.ts +20 -24
- package/src/ui/hooks/useProfileEditing.ts +43 -30
- package/src/ui/screens/AppInfoScreen.tsx +1 -1
- package/src/ui/screens/AvatarCropScreen.tsx +67 -4
- package/src/ui/screens/ConnectedAppsScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +24 -14
- package/src/ui/screens/FeedbackScreen.tsx +1 -1
- package/src/ui/screens/HelpSupportScreen.tsx +1 -1
- package/src/ui/screens/HistoryViewScreen.tsx +1 -1
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +1 -1
- package/src/ui/screens/NotificationsScreen.tsx +1 -1
- package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
- package/src/ui/screens/PreferencesScreen.tsx +1 -1
- package/src/ui/screens/ProfileScreen.tsx +4 -4
- package/src/ui/screens/SavesCollectionsScreen.tsx +3 -6
- package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustFAQScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/stores/authStore.ts +4 -13
- package/src/ui/types/navigation.ts +0 -4
- package/src/ui/utils/avatarUtils.ts +3 -2
- package/lib/commonjs/ui/styles/spacing.js +0 -68
- package/lib/commonjs/ui/styles/spacing.js.map +0 -1
- package/lib/commonjs/ui/utils/themeUtils.js +0 -37
- package/lib/commonjs/ui/utils/themeUtils.js.map +0 -1
- package/lib/module/ui/styles/spacing.js +0 -16
- package/lib/module/ui/styles/spacing.js.map +0 -1
- package/lib/module/ui/utils/themeUtils.js +0 -13
- package/lib/module/ui/utils/themeUtils.js.map +0 -1
- package/lib/typescript/commonjs/ui/styles/spacing.d.ts +0 -13
- package/lib/typescript/commonjs/ui/styles/spacing.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts +0 -11
- package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts.map +0 -1
- package/lib/typescript/module/ui/styles/spacing.d.ts +0 -13
- package/lib/typescript/module/ui/styles/spacing.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/themeUtils.d.ts +0 -11
- package/lib/typescript/module/ui/utils/themeUtils.d.ts.map +0 -1
- package/src/ui/styles/spacing.ts +0 -22
- package/src/ui/utils/themeUtils.ts +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,iBAAiB,EAC1B,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActingAsBanner.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ActingAsBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;;
|
|
1
|
+
{"version":3,"file":"ActingAsBanner.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ActingAsBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;;AAgIvC,wBAA0C"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { OxyServices } from '@oxyhq/core';
|
|
2
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
3
|
-
import type { RouteName } from '../
|
|
4
|
+
import type { RouteName } from '../navigation/routes';
|
|
5
|
+
type StepComponentProps = BaseScreenProps & Record<string, unknown>;
|
|
4
6
|
export interface StepConfig {
|
|
5
7
|
id: string;
|
|
6
|
-
component: React.ComponentType<
|
|
8
|
+
component: React.ComponentType<StepComponentProps>;
|
|
7
9
|
props?: Record<string, unknown>;
|
|
8
10
|
canProceed?: (stepData?: unknown) => boolean;
|
|
9
11
|
onEnter?: () => void;
|
|
@@ -18,7 +20,7 @@ export interface StepBasedScreenProps extends Omit<BaseScreenProps, 'navigate'>
|
|
|
18
20
|
onComplete?: (stepData: unknown[]) => void;
|
|
19
21
|
stepData?: unknown[];
|
|
20
22
|
navigate: (screen: RouteName, props?: Record<string, unknown>) => void;
|
|
21
|
-
oxyServices:
|
|
23
|
+
oxyServices: OxyServices;
|
|
22
24
|
getNavigationProps?: () => Record<string, unknown>;
|
|
23
25
|
}
|
|
24
26
|
declare const StepBasedScreen: React.FC<StepBasedScreenProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepBasedScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/StepBasedScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StepBasedScreen.d.ts","s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,KAAK,IAAI,CAAC;IACvE,WAAW,EAAE,WAAW,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtD;AA4DD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2XnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -36,5 +36,5 @@ export interface UseAuthOperationsResult {
|
|
|
36
36
|
* Authentication operations using public key cryptography.
|
|
37
37
|
* Accepts public key as parameter - identity management is handled by the app layer.
|
|
38
38
|
*/
|
|
39
|
-
export declare const useAuthOperations: ({ oxyServices,
|
|
39
|
+
export declare const useAuthOperations: ({ oxyServices, sessions, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, switchSession, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
|
|
40
40
|
//# sourceMappingURL=useAuthOperations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuthOperations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useAuthOperations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAIvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"useAuthOperations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useAuthOperations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AA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AE,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IAClD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,uBAAuB;IACtC,uCAAuC;IACvC,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,kCAAkC;IAClC,MAAM,EAAE,CAAC,eAAe,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,+BAA+B;IAC/B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAMD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,4PAiB/B,wBAAwB,KAAG,uBA4P7B,CAAC"}
|
|
@@ -2,7 +2,51 @@ import type { AssetUploadInput, NotificationPreferences, PrivacySettings, User,
|
|
|
2
2
|
/**
|
|
3
3
|
* Update user profile with optimistic updates and offline queue support
|
|
4
4
|
*/
|
|
5
|
-
export declare const useUpdateProfile: () => import("@tanstack/react-query").UseMutationResult<User, Error,
|
|
5
|
+
export declare const useUpdateProfile: () => import("@tanstack/react-query").UseMutationResult<User, Error, import("zod").objectOutputType<{
|
|
6
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
7
|
+
first: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
|
+
last: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
10
|
+
first?: string | undefined;
|
|
11
|
+
last?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
first?: string | undefined;
|
|
14
|
+
last?: string | undefined;
|
|
15
|
+
}>>;
|
|
16
|
+
username: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
+
avatar: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
color: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
20
|
+
bio: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
+
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
|
+
locations: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnknown, "many">>;
|
|
24
|
+
links: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
25
|
+
linksMetadata: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
26
|
+
url: import("zod").ZodString;
|
|
27
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
32
|
+
url: string;
|
|
33
|
+
id?: string | undefined;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
title?: string | undefined;
|
|
36
|
+
image?: string | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
url: string;
|
|
39
|
+
id?: string | undefined;
|
|
40
|
+
description?: string | undefined;
|
|
41
|
+
title?: string | undefined;
|
|
42
|
+
image?: string | undefined;
|
|
43
|
+
}>, "many">>;
|
|
44
|
+
language: import("zod").ZodOptional<import("zod").ZodString>;
|
|
45
|
+
accountExpiresAfterInactivityDays: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
|
|
46
|
+
notificationPreferences: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
47
|
+
userPreferences: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
48
|
+
privacySettings: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
49
|
+
}, import("zod").ZodTypeAny, "passthrough">, {
|
|
6
50
|
previousUser: User | undefined;
|
|
7
51
|
}>;
|
|
8
52
|
/**
|
|
@@ -117,19 +161,21 @@ export declare const useUpdateAccountSettings: () => {
|
|
|
117
161
|
publicKey: string;
|
|
118
162
|
username: string;
|
|
119
163
|
email?: string;
|
|
120
|
-
avatar?: string;
|
|
121
|
-
color?: string;
|
|
122
|
-
name
|
|
164
|
+
avatar?: string | null;
|
|
165
|
+
color?: string | null;
|
|
166
|
+
name: import("@oxyhq/contracts").UserNameResponse;
|
|
123
167
|
bio?: string;
|
|
124
168
|
location?: string;
|
|
125
169
|
website?: string;
|
|
126
170
|
createdAt?: string;
|
|
127
171
|
updatedAt?: string;
|
|
128
|
-
links?:
|
|
172
|
+
links?: string[];
|
|
173
|
+
linksMetadata?: Array<{
|
|
174
|
+
url: string;
|
|
129
175
|
title?: string;
|
|
130
176
|
description?: string;
|
|
131
177
|
image?: string;
|
|
132
|
-
|
|
178
|
+
id?: string;
|
|
133
179
|
}>;
|
|
134
180
|
_count?: {
|
|
135
181
|
followers?: number;
|
|
@@ -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;
|
|
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;AAerB;;GAEG;AACH,eAAO,MAAM,gBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,iBAAiB,IAAI,uBAAuB,CA4J3D"}
|
|
@@ -1,36 +1,40 @@
|
|
|
1
|
+
interface ProfileLocation {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
coordinates?: {
|
|
6
|
+
lat: number;
|
|
7
|
+
lon: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
interface ProfileLinkMetadata {
|
|
11
|
+
url: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
image?: string;
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
1
17
|
export interface ProfileUpdateData {
|
|
2
|
-
|
|
18
|
+
firstName?: string;
|
|
3
19
|
lastName?: string;
|
|
4
20
|
username?: string;
|
|
5
21
|
email?: string;
|
|
6
22
|
bio?: string;
|
|
7
23
|
location?: string;
|
|
8
|
-
locations?:
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
coordinates?: {
|
|
13
|
-
lat: number;
|
|
14
|
-
lon: number;
|
|
15
|
-
};
|
|
16
|
-
}>;
|
|
24
|
+
locations?: ProfileLocation[];
|
|
17
25
|
links?: string[];
|
|
18
|
-
linksMetadata?:
|
|
19
|
-
url: string;
|
|
20
|
-
title?: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
image?: string;
|
|
23
|
-
id: string;
|
|
24
|
-
}>;
|
|
26
|
+
linksMetadata?: ProfileLinkMetadata[];
|
|
25
27
|
avatar?: string;
|
|
26
28
|
}
|
|
29
|
+
type ProfileFieldValue = string | ProfileLocation[] | ProfileLinkMetadata[];
|
|
27
30
|
/**
|
|
28
31
|
* Hook for managing profile editing operations
|
|
29
32
|
* Provides functions to update profile fields and handle saving
|
|
30
33
|
*/
|
|
31
34
|
export declare const useProfileEditing: () => {
|
|
32
35
|
saveProfile: (updates: ProfileUpdateData) => Promise<boolean>;
|
|
33
|
-
updateField: (field: string, value:
|
|
36
|
+
updateField: (field: string, value: ProfileFieldValue) => Promise<boolean>;
|
|
34
37
|
isSaving: boolean;
|
|
35
38
|
};
|
|
39
|
+
export {};
|
|
36
40
|
//# sourceMappingURL=useProfileEditing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProfileEditing.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useProfileEditing.ts"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"useProfileEditing.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useProfileEditing.ts"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AAED,UAAU,mBAAmB;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,KAAK,iBAAiB,GAAG,MAAM,GAAG,eAAe,EAAE,GAAG,mBAAmB,EAAE,CAAC;AAU5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;2BAMsB,iBAAiB;yBAqDnB,MAAM,SAAS,iBAAiB;;CAyCjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarCropScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AvatarCropScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4B/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC7B,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,IAAI,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC1D,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"AvatarCropScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AvatarCropScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4B/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC7B,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,IAAI,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC1D,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAkND,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA60BrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAczE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAU3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACtB,aAAa,GACb,UAAU,GACV,OAAO,GACP,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AAmBd,UAAU,2BAA4B,SAAQ,eAAe;IACzD,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;;
|
|
1
|
+
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAczE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAU3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACtB,aAAa,GACb,UAAU,GACV,OAAO,GACP,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AAmBd,UAAU,2BAA4B,SAAQ,eAAe;IACzD,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;;AA+nBD,wBAAkD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SavesCollectionsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/SavesCollectionsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"SavesCollectionsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/SavesCollectionsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAmN3D,wBAAkD"}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import type { User } from '@oxyhq/core';
|
|
2
|
-
type LegacyUserIdentity = Partial<Omit<User, 'id' | 'publicKey' | 'username'>> & {
|
|
3
|
-
id?: string;
|
|
4
|
-
_id: string;
|
|
5
|
-
publicKey: string;
|
|
6
|
-
username: string;
|
|
7
|
-
};
|
|
8
|
-
type AuthStoreUserInput = User | LegacyUserIdentity;
|
|
9
2
|
export interface AuthState {
|
|
10
3
|
user: User | null;
|
|
11
4
|
isAuthenticated: boolean;
|
|
12
5
|
isLoading: boolean;
|
|
13
6
|
error: string | null;
|
|
14
7
|
lastUserFetch: number | null;
|
|
15
|
-
loginSuccess: (user:
|
|
8
|
+
loginSuccess: (user: User) => void;
|
|
16
9
|
loginFailure: (error: string) => void;
|
|
17
10
|
logout: () => void;
|
|
18
11
|
fetchUser: (oxyServices: {
|
|
19
12
|
getCurrentUser: () => Promise<User>;
|
|
20
13
|
}, forceRefresh?: boolean) => Promise<void>;
|
|
21
|
-
setUser: (user:
|
|
14
|
+
setUser: (user: User) => void;
|
|
22
15
|
}
|
|
23
16
|
export declare const useAuthStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AuthState>>;
|
|
24
|
-
export {};
|
|
25
17
|
//# sourceMappingURL=authStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,
|
|
1
|
+
{"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,WAAW,EAAE;QAAE,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3G,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,wEA0CtB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ReactNode, RefObject } from 'react';
|
|
2
2
|
import type { QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import type { RouteName } from '../navigation/routes';
|
|
4
|
-
export type { RouteName };
|
|
5
4
|
export interface StepController {
|
|
6
5
|
canGoBack: () => boolean;
|
|
7
6
|
goBack: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAItD,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAA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,EAAE,WAAW,CAAC;CAC7B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OxyServices, User } from '@oxyhq/core';
|
|
2
|
+
import type { UserProfileUpdate } from '@oxyhq/contracts';
|
|
2
3
|
import type { QueryClient } from '@tanstack/react-query';
|
|
3
4
|
/**
|
|
4
5
|
* Refreshes avatar in accountStore with cache-busted URL to force image reload.
|
|
@@ -19,5 +20,5 @@ export declare function refreshAvatarInStore(sessionId: string, avatarFileId: st
|
|
|
19
20
|
* @param syncSession - Optional function to sync session/refresh token when auth errors occur
|
|
20
21
|
* @returns Promise that resolves with updated user data
|
|
21
22
|
*/
|
|
22
|
-
export declare function updateProfileWithAvatar(updates:
|
|
23
|
+
export declare function updateProfileWithAvatar(updates: UserProfileUpdate, oxyServices: OxyServices, activeSessionId: string | null, queryClient: QueryClient, syncSession?: () => Promise<User>): Promise<User>;
|
|
23
24
|
//# sourceMappingURL=avatarUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,iBAAiB,EAC1B,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.11",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"@lottiefiles/dotlottie-react": "^0.13.5",
|
|
110
|
+
"@oxyhq/contracts": "^0.1.1",
|
|
110
111
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
111
112
|
"@types/react": "*",
|
|
112
113
|
"copyfiles": "^2.4.1",
|
|
@@ -160,7 +161,7 @@
|
|
|
160
161
|
"peerDependencies": {
|
|
161
162
|
"@expo/vector-icons": "^15.0.3",
|
|
162
163
|
"@oxyhq/bloom": ">=0.5.0",
|
|
163
|
-
"@oxyhq/core": "^3.4.
|
|
164
|
+
"@oxyhq/core": "^3.4.17",
|
|
164
165
|
"@react-native-community/netinfo": "^11.4.1",
|
|
165
166
|
"@tanstack/query-async-storage-persister": "^5.100",
|
|
166
167
|
"@tanstack/query-sync-storage-persister": "^5.100",
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
11
11
|
import { useOxy } from '../context/OxyContext';
|
|
12
|
+
import { getAccountDisplayName } from '@oxyhq/core';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* ActingAsBanner - Shows a subtle banner when the user is acting as a managed account.
|
|
@@ -33,10 +34,7 @@ const ActingAsBanner: React.FC = () => {
|
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
const displayName =
|
|
37
|
-
typeof activeAccount.name === 'object'
|
|
38
|
-
? activeAccount.name.full || activeAccount.name.first || activeAccount.username
|
|
39
|
-
: activeAccount.name || activeAccount.username;
|
|
37
|
+
const displayName = getAccountDisplayName(activeAccount);
|
|
40
38
|
|
|
41
39
|
const handlePress = () => {
|
|
42
40
|
showBottomSheet?.('ManageAccount');
|
|
@@ -13,20 +13,31 @@ import Animated, {
|
|
|
13
13
|
} from 'react-native-reanimated';
|
|
14
14
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
15
15
|
import type { ThemeColors } from '@oxyhq/bloom/theme';
|
|
16
|
+
import type { OxyServices } from '@oxyhq/core';
|
|
16
17
|
import { createAuthStyles } from '../styles/authStyles';
|
|
17
18
|
import type { BaseScreenProps, StepController } from '../types/navigation';
|
|
18
|
-
import type { RouteName } from '../
|
|
19
|
+
import type { RouteName } from '../navigation/routes';
|
|
19
20
|
import { screenContentStyle } from '../constants/spacing';
|
|
20
21
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
type StepStyles = Record<string, unknown> & {
|
|
24
|
+
stepContainer: ViewStyle;
|
|
25
|
+
progressContainer: ViewStyle;
|
|
26
|
+
progressDot: ViewStyle;
|
|
27
|
+
};
|
|
28
|
+
type StepComponentProps = BaseScreenProps & Record<string, unknown>;
|
|
29
|
+
|
|
30
|
+
function isVoidCallback(value: unknown): value is () => void {
|
|
31
|
+
return typeof value === 'function';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function isAuthenticatedCallback(value: unknown): value is (payload?: unknown) => void {
|
|
35
|
+
return typeof value === 'function';
|
|
36
|
+
}
|
|
25
37
|
|
|
26
38
|
export interface StepConfig {
|
|
27
39
|
id: string;
|
|
28
|
-
|
|
29
|
-
component: React.ComponentType<any>;
|
|
40
|
+
component: React.ComponentType<StepComponentProps>;
|
|
30
41
|
props?: Record<string, unknown>;
|
|
31
42
|
canProceed?: (stepData?: unknown) => boolean;
|
|
32
43
|
onEnter?: () => void;
|
|
@@ -42,8 +53,7 @@ export interface StepBasedScreenProps extends Omit<BaseScreenProps, 'navigate'>
|
|
|
42
53
|
onComplete?: (stepData: unknown[]) => void;
|
|
43
54
|
stepData?: unknown[];
|
|
44
55
|
navigate: (screen: RouteName, props?: Record<string, unknown>) => void;
|
|
45
|
-
|
|
46
|
-
oxyServices: any;
|
|
56
|
+
oxyServices: OxyServices;
|
|
47
57
|
getNavigationProps?: () => Record<string, unknown>;
|
|
48
58
|
}
|
|
49
59
|
|
|
@@ -153,7 +163,7 @@ const StepBasedScreen: React.FC<StepBasedScreenProps> = ({
|
|
|
153
163
|
secondaryText: colors.textSecondary,
|
|
154
164
|
}), [colors]);
|
|
155
165
|
const insets = useSafeAreaInsets();
|
|
156
|
-
const styles = useMemo(() => ({
|
|
166
|
+
const styles = useMemo<StepStyles>(() => ({
|
|
157
167
|
...createAuthStyles(authColors, themeString),
|
|
158
168
|
// Additional styles for step components
|
|
159
169
|
modernHeader: {
|
|
@@ -222,7 +232,7 @@ const StepBasedScreen: React.FC<StepBasedScreenProps> = ({
|
|
|
222
232
|
},
|
|
223
233
|
progressContainer: {
|
|
224
234
|
flexDirection: 'row' as const,
|
|
225
|
-
width: '100%',
|
|
235
|
+
width: '100%' as const,
|
|
226
236
|
justifyContent: 'center' as const,
|
|
227
237
|
marginTop: 24, // Space for bottom sheet handle (~20px) + small buffer
|
|
228
238
|
marginBottom: 0, // BottomSheet handles all bottom spacing
|
|
@@ -410,15 +420,26 @@ const StepBasedScreen: React.FC<StepBasedScreenProps> = ({
|
|
|
410
420
|
[currentStep, updateStepData]
|
|
411
421
|
);
|
|
412
422
|
|
|
413
|
-
const
|
|
423
|
+
const normalizedTheme = typeof theme === 'string' ? theme : undefined;
|
|
424
|
+
const normalizedGoBack = isVoidCallback(goBack) ? goBack : undefined;
|
|
425
|
+
const normalizedOnAuthenticated = isAuthenticatedCallback(onAuthenticated) ? onAuthenticated : undefined;
|
|
426
|
+
|
|
427
|
+
const baseStepProps = useMemo<BaseScreenProps>(() => ({
|
|
428
|
+
theme: normalizedTheme,
|
|
429
|
+
navigate,
|
|
430
|
+
goBack: normalizedGoBack,
|
|
431
|
+
onAuthenticated: normalizedOnAuthenticated,
|
|
432
|
+
}), [normalizedTheme, navigate, normalizedGoBack, normalizedOnAuthenticated]);
|
|
433
|
+
|
|
434
|
+
const stepProps = useMemo<StepComponentProps>(() => ({
|
|
414
435
|
...currentStepConfig?.props,
|
|
436
|
+
// Step data - spread before base props so navigation/auth props remain stable.
|
|
437
|
+
...(state.stepData[currentStep] as Record<string, unknown> | undefined),
|
|
438
|
+
|
|
415
439
|
// Common props
|
|
440
|
+
...baseStepProps,
|
|
416
441
|
colors,
|
|
417
442
|
styles,
|
|
418
|
-
theme,
|
|
419
|
-
navigate,
|
|
420
|
-
goBack,
|
|
421
|
-
onAuthenticated,
|
|
422
443
|
oxyServices,
|
|
423
444
|
|
|
424
445
|
// Step navigation
|
|
@@ -428,20 +449,14 @@ const StepBasedScreen: React.FC<StepBasedScreenProps> = ({
|
|
|
428
449
|
currentStep: currentStep,
|
|
429
450
|
totalSteps: steps.length,
|
|
430
451
|
|
|
431
|
-
// Step data - spread the step data properties directly as props
|
|
432
|
-
...(state.stepData[currentStep] as Record<string, unknown> | undefined),
|
|
433
|
-
|
|
434
452
|
// Step data management
|
|
435
453
|
updateStepData: updateCurrentStepData,
|
|
436
454
|
allStepData: state.stepData,
|
|
437
455
|
}), [
|
|
438
456
|
currentStepConfig?.props,
|
|
457
|
+
baseStepProps,
|
|
439
458
|
colors,
|
|
440
459
|
styles,
|
|
441
|
-
theme,
|
|
442
|
-
navigate,
|
|
443
|
-
goBack,
|
|
444
|
-
onAuthenticated,
|
|
445
460
|
oxyServices,
|
|
446
461
|
nextStep,
|
|
447
462
|
prevStep,
|