@oxyhq/services 22.10.0 → 22.11.0
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/AvatarCameraBadge.js +42 -0
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +41 -19
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +640 -168
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +14 -0
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileSummaryCard.js +3 -23
- package/lib/commonjs/ui/components/ProfileSummaryCard.js.map +1 -1
- package/lib/commonjs/ui/components/SurfaceScreen.js +41 -5
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +78 -26
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +83 -23
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +73 -37
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +18 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js +129 -0
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -0
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +36 -48
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useReduceMotion.js +57 -0
- package/lib/commonjs/ui/hooks/useReduceMotion.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +22 -0
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +5 -6
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +1 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceNavStack.js +62 -15
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +38 -17
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaces.js +98 -21
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +281 -279
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +301 -0
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +194 -431
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +16 -48
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +63 -0
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +54 -41
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +44 -81
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/stores/resetSessionScopedStores.js +8 -3
- package/lib/commonjs/ui/stores/resetSessionScopedStores.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +11 -2
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +0 -79
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +40 -0
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -0
- package/lib/module/ui/components/OxyAccountDialogScreen.js +41 -19
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +642 -171
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +15 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/ProfileSummaryCard.js +2 -23
- package/lib/module/ui/components/ProfileSummaryCard.js.map +1 -1
- package/lib/module/ui/components/SurfaceScreen.js +43 -7
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js +78 -26
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +83 -25
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +74 -38
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +16 -0
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useFileQueries.js +120 -0
- package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -0
- package/lib/module/ui/hooks/useAvatarPicker.js +37 -49
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useReduceMotion.js +53 -0
- package/lib/module/ui/hooks/useReduceMotion.js.map +1 -0
- package/lib/module/ui/hooks/useSurfaceHeader.js +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +20 -0
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +6 -7
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +1 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceNavStack.js +62 -15
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -1
- package/lib/module/ui/navigation/surfaceRegistry.js +38 -17
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/module/ui/navigation/surfaces.js +97 -22
- package/lib/module/ui/navigation/surfaces.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +283 -281
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +298 -0
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +196 -433
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +17 -49
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +59 -0
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +54 -42
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +45 -81
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/stores/resetSessionScopedStores.js +8 -3
- package/lib/module/ui/stores/resetSessionScopedStores.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +11 -2
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +0 -78
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts +4 -0
- package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileSummaryCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +1 -4
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +71 -19
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +50 -0
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +15 -10
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts +14 -0
- package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +13 -0
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +4 -5
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +21 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +73 -13
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +42 -11
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +18 -5
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts +34 -0
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts +8 -1
- package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +2 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +0 -48
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts +4 -0
- package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +2 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileSummaryCard.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +1 -4
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +71 -19
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +50 -0
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +15 -10
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts +14 -0
- package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +13 -0
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +4 -5
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +21 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +73 -13
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +42 -11
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +18 -5
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts +34 -0
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
- package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts +8 -1
- package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +2 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -48
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +8 -4
- package/src/ui/components/AvatarCameraBadge.tsx +35 -0
- package/src/ui/components/OxyAccountDialogScreen.tsx +38 -15
- package/src/ui/components/OxyAuthChooser.tsx +722 -185
- package/src/ui/components/ProfileButton.tsx +16 -1
- package/src/ui/components/ProfileSummaryCard.tsx +2 -25
- package/src/ui/components/SurfaceScreen.tsx +48 -14
- package/src/ui/components/oxyAuthChooserStyles.ts +75 -23
- package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -84
- package/src/ui/components/photogrid/__tests__/chunkPhotos.test.ts +51 -0
- package/src/ui/context/OxyContext.tsx +74 -34
- package/src/ui/hooks/queries/queryKeys.ts +15 -0
- package/src/ui/hooks/queries/useFileQueries.ts +162 -0
- package/src/ui/hooks/useAvatarPicker.ts +38 -53
- package/src/ui/hooks/useReduceMotion.ts +58 -0
- package/src/ui/hooks/useSurfaceHeader.ts +2 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +55 -7
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +81 -0
- package/src/ui/navigation/accountDialogManager.ts +28 -0
- package/src/ui/navigation/bottomSheetManager.ts +6 -7
- package/src/ui/navigation/routes.ts +3 -1
- package/src/ui/navigation/surfaceNavStack.ts +72 -9
- package/src/ui/navigation/surfaceRegistry.ts +91 -17
- package/src/ui/navigation/surfaces.ts +108 -29
- package/src/ui/screens/AvatarCropScreen.tsx +336 -298
- package/src/ui/screens/ChangeAvatarScreen.tsx +359 -0
- package/src/ui/screens/FileManagementScreen.tsx +189 -432
- package/src/ui/screens/WelcomeNewUserScreen.tsx +18 -48
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +56 -0
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +56 -46
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +55 -71
- package/src/ui/stores/resetSessionScopedStores.ts +8 -3
- package/src/ui/types/navigation.ts +2 -0
- package/src/ui/utils/avatarUtils.ts +11 -2
- package/src/ui/utils/fileManagement.ts +1 -101
- package/lib/commonjs/ui/stores/fileStore.js +0 -153
- package/lib/commonjs/ui/stores/fileStore.js.map +0 -1
- package/lib/module/ui/stores/fileStore.js +0 -145
- package/lib/module/ui/stores/fileStore.js.map +0 -1
- package/lib/typescript/commonjs/ui/stores/fileStore.d.ts +0 -31
- package/lib/typescript/commonjs/ui/stores/fileStore.d.ts.map +0 -1
- package/lib/typescript/module/ui/stores/fileStore.d.ts +0 -31
- package/lib/typescript/module/ui/stores/fileStore.d.ts.map +0 -1
- package/src/ui/stores/fileStore.ts +0 -118
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Ionicons } from '@expo/vector-icons';
|
|
2
2
|
import type { AssetUploadInput, RNFileDescriptor } from '@oxyhq/core';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
|
-
import type { RouteName } from '../navigation/routes.js';
|
|
5
4
|
/**
|
|
6
5
|
* Extended File interface that includes a `uri` property for mobile preview support.
|
|
7
6
|
* React Native file pickers return URI-based references that need to be preserved
|
|
@@ -52,52 +51,5 @@ export declare function convertDocumentPickerAssetToFile(doc: PickerAsset, index
|
|
|
52
51
|
* Upload file raw - helper function for file uploads
|
|
53
52
|
*/
|
|
54
53
|
export declare function uploadFileRaw(file: AssetUploadInput, userId: string, oxyServices: any, visibility?: 'private' | 'public' | 'unlisted'): Promise<any>;
|
|
55
|
-
/**
|
|
56
|
-
* Configuration for creating an avatar picker handler
|
|
57
|
-
*/
|
|
58
|
-
export interface AvatarPickerConfig {
|
|
59
|
-
/** Navigation function from BaseScreenProps */
|
|
60
|
-
navigate?: (screen: RouteName, props?: Record<string, unknown>) => void;
|
|
61
|
-
/** OxyServices instance */
|
|
62
|
-
oxyServices: any;
|
|
63
|
-
/** TanStack Query mutation for updating profile */
|
|
64
|
-
updateProfileMutation: {
|
|
65
|
-
mutateAsync: (updates: {
|
|
66
|
-
avatar: string;
|
|
67
|
-
}) => Promise<unknown>;
|
|
68
|
-
};
|
|
69
|
-
/** Callback to update local avatar state */
|
|
70
|
-
onAvatarSelected?: (fileId: string) => void;
|
|
71
|
-
/** i18n translation function */
|
|
72
|
-
t: (key: string) => string | undefined;
|
|
73
|
-
/** Optional context name for logging (e.g., 'AccountSettings', 'WelcomeNewUser') */
|
|
74
|
-
contextName?: string;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Creates a reusable avatar picker handler function.
|
|
78
|
-
*
|
|
79
|
-
* This function navigates to the FileManagement screen and handles:
|
|
80
|
-
* - Image file validation
|
|
81
|
-
* - File visibility update to public
|
|
82
|
-
* - Profile avatar update via mutation
|
|
83
|
-
* - Success/error toast notifications
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```tsx
|
|
87
|
-
* const openAvatarPicker = createAvatarPickerHandler({
|
|
88
|
-
* navigate,
|
|
89
|
-
* oxyServices,
|
|
90
|
-
* updateProfileMutation,
|
|
91
|
-
* onAvatarSelected: setAvatarFileId,
|
|
92
|
-
* t,
|
|
93
|
-
* contextName: 'AccountSettings'
|
|
94
|
-
* });
|
|
95
|
-
*
|
|
96
|
-
* <TouchableOpacity onPress={openAvatarPicker}>
|
|
97
|
-
* <Text>Change Avatar</Text>
|
|
98
|
-
* </TouchableOpacity>
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export declare function createAvatarPickerHandler(config: AvatarPickerConfig): () => void;
|
|
102
54
|
export {};
|
|
103
55
|
//# sourceMappingURL=fileManagement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileManagement.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/fileManagement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"fileManagement.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/fileManagement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C;;;;GAIG;AACH,UAAU,WAAY,SAAQ,IAAI;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAO5E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CASxF;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gCAAgC,CAClD,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAAC,CA4DhD;AAED;;GAEG;AACH,wBAAsB,aAAa,CAC/B,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,EAEd,WAAW,EAAE,GAAG,EAChB,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,gBAGjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.11.0",
|
|
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",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@oxyhq/contracts": "0.17.0",
|
|
130
|
-
"@oxyhq/core": "^12.
|
|
130
|
+
"@oxyhq/core": "^12.10.1",
|
|
131
131
|
"@simplewebauthn/browser": "^13.3.0",
|
|
132
132
|
"color": "^4.2.3"
|
|
133
133
|
},
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@commitlint/cli": "^17.6.5",
|
|
137
137
|
"@commitlint/config-conventional": "^17.6.5",
|
|
138
138
|
"@expo/vector-icons": "^15.0.3",
|
|
139
|
-
"@oxyhq/core": "12.10.
|
|
139
|
+
"@oxyhq/core": "12.10.2",
|
|
140
140
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
141
141
|
"@react-native-community/netinfo": "^11.4.1",
|
|
142
142
|
"@react-native/babel-preset": "^0.86.0",
|
|
@@ -187,14 +187,15 @@
|
|
|
187
187
|
"@types/react": "*",
|
|
188
188
|
"@types/react-native": "*",
|
|
189
189
|
"expo": ">=56.0.0",
|
|
190
|
-
"expo-modules-core": "*",
|
|
191
190
|
"expo-document-picker": ">=56.0.0",
|
|
192
191
|
"expo-file-system": ">=56.0.0",
|
|
193
192
|
"expo-font": ">=13.0.0",
|
|
194
193
|
"expo-haptics": ">=56.0.0",
|
|
195
194
|
"expo-image": ">=2.0.0",
|
|
196
195
|
"expo-image-manipulator": ">=56.0.0",
|
|
196
|
+
"expo-image-picker": ">=56.0.0",
|
|
197
197
|
"expo-linear-gradient": ">=56.0.0",
|
|
198
|
+
"expo-modules-core": "*",
|
|
198
199
|
"nativewind": ">=5.0.0",
|
|
199
200
|
"react": ">=18.0.0",
|
|
200
201
|
"react-native": ">=0.85.0",
|
|
@@ -240,6 +241,9 @@
|
|
|
240
241
|
},
|
|
241
242
|
"@tanstack/query-sync-storage-persister": {
|
|
242
243
|
"optional": true
|
|
244
|
+
},
|
|
245
|
+
"expo-image-picker": {
|
|
246
|
+
"optional": true
|
|
243
247
|
}
|
|
244
248
|
},
|
|
245
249
|
"react-native-builder-bob": {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { View, type ViewStyle } from 'react-native';
|
|
3
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
4
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The camera overlay badge on a pressable avatar — the "tap to change your
|
|
8
|
+
* photo" affordance. Shared verbatim by {@link ProfileSummaryCard} (ManageAccount
|
|
9
|
+
* / EditProfile) and the account-menu hero avatar (`AccountsView`), so the badge
|
|
10
|
+
* reads identically everywhere. Renders as an absolutely-positioned bottom-right
|
|
11
|
+
* overlay; the caller wraps it (with the avatar) in a `position: relative`
|
|
12
|
+
* pressable.
|
|
13
|
+
*/
|
|
14
|
+
const badgeStyle: ViewStyle = {
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
right: 0,
|
|
17
|
+
bottom: 0,
|
|
18
|
+
width: 28,
|
|
19
|
+
height: 28,
|
|
20
|
+
borderRadius: 14,
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
borderWidth: 2,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const AvatarCameraBadge: React.FC = () => {
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
return (
|
|
29
|
+
<View style={badgeStyle} className="bg-fill-brand border-border-image">
|
|
30
|
+
<Ionicons name="camera" size={14} color={theme.colors.primaryForeground} />
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default AvatarCameraBadge;
|
|
@@ -28,10 +28,20 @@ import type { AccountDialogSnapshot } from '@oxyhq/core';
|
|
|
28
28
|
import { useOxy } from '../context/OxyContext';
|
|
29
29
|
import { useI18n } from '../hooks/useI18n';
|
|
30
30
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
31
|
+
import type { BaseScreenProps } from '../types/navigation';
|
|
32
|
+
import LogoText from './logo/LogoText';
|
|
31
33
|
import OxyAuthChooser from './OxyAuthChooser';
|
|
32
34
|
|
|
33
35
|
type Translate = ReturnType<typeof useI18n>['t'];
|
|
34
36
|
|
|
37
|
+
/**
|
|
38
|
+
* The account MENU's nav bar carries the Oxy wordmark instead of a title — the
|
|
39
|
+
* surface IS the Oxy account, so naming it in prose is redundant. A module-level
|
|
40
|
+
* element: it takes no props, so its identity is stable forever and the header's
|
|
41
|
+
* identity-compared slot never thrashes.
|
|
42
|
+
*/
|
|
43
|
+
const NAV_LOGO = <LogoText height={20} />;
|
|
44
|
+
|
|
35
45
|
/**
|
|
36
46
|
* The unified account dialog BODY — the header + `OxyAuthChooser` chooser.
|
|
37
47
|
*
|
|
@@ -45,7 +55,7 @@ type Translate = ReturnType<typeof useI18n>['t'];
|
|
|
45
55
|
* `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
|
|
46
56
|
* dismisses the surface and runs its exit animation.
|
|
47
57
|
*/
|
|
48
|
-
const OxyAccountDialogScreen: React.FC = () => {
|
|
58
|
+
const OxyAccountDialogScreen: React.FC<BaseScreenProps> = ({ canGoBack }) => {
|
|
49
59
|
const { accountDialogController: controller, closeAccountDialog } = useOxy();
|
|
50
60
|
const { t } = useI18n();
|
|
51
61
|
|
|
@@ -66,16 +76,25 @@ const OxyAccountDialogScreen: React.FC = () => {
|
|
|
66
76
|
const showBack =
|
|
67
77
|
view === 'qr' || view === 'signup' || (view === 'add' && snapshot.accounts.length > 0);
|
|
68
78
|
const goToAccounts = useCallback(() => controller?.setView('accounts'), [controller]);
|
|
69
|
-
|
|
79
|
+
// An ENTRY view (accounts / signin — no in-dialog back of its own) that is
|
|
80
|
+
// MORPHED into a host surface (ManageAccount → switcher) has a frame beneath it,
|
|
81
|
+
// so its back CLOSES the dialog and reshapes back to the host — routed through
|
|
82
|
+
// `closeAccountDialog` so the pop + state teardown stay in one place. Opened
|
|
83
|
+
// cold (detached) it is the root frame → `canGoBack` is false → no back.
|
|
84
|
+
const backsToHost = !showBack && (canGoBack?.() ?? false);
|
|
85
|
+
// The account MENU is branded, not titled: its nav bar carries the Oxy
|
|
86
|
+
// wordmark and no large title. The current account is named by the HERO block
|
|
87
|
+
// `OxyAuthChooser` renders under it (email + large avatar + greeting), never
|
|
88
|
+
// by the bar. Every OTHER view keeps the SHARED Dialog nav header the rest of
|
|
89
|
+
// the SDK uses — a large in-content title/subtitle that collapses into the bar
|
|
90
|
+
// on scroll — because their copy is informative.
|
|
91
|
+
const copy = view === 'accounts' ? null : headerCopy(view, snapshot.accounts.length, t);
|
|
70
92
|
|
|
71
|
-
// The account dialog uses the SHARED Dialog nav header like every other screen
|
|
72
|
-
// (the base): the large in-content title/subtitle that collapses into the nav
|
|
73
|
-
// bar on scroll (default `largeTitle`), its per-view copy, and a per-view back
|
|
74
|
-
// that returns to the account list (the Dialog renders the frosted back/close).
|
|
75
93
|
useSurfaceHeader({
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
94
|
+
titleContent: copy ? undefined : NAV_LOGO,
|
|
95
|
+
title: copy?.title,
|
|
96
|
+
subtitle: copy?.subtitle ?? undefined,
|
|
97
|
+
onBack: showBack ? goToAccounts : backsToHost ? closeAccountDialog : undefined,
|
|
79
98
|
});
|
|
80
99
|
|
|
81
100
|
if (!controller) {
|
|
@@ -94,16 +113,11 @@ const OxyAccountDialogScreen: React.FC = () => {
|
|
|
94
113
|
// ---------------------------------------------------------------------------
|
|
95
114
|
|
|
96
115
|
function headerCopy(
|
|
97
|
-
view: AccountDialogSnapshot['view'],
|
|
116
|
+
view: Exclude<AccountDialogSnapshot['view'], 'accounts'>,
|
|
98
117
|
accountCount: number,
|
|
99
118
|
t: Translate,
|
|
100
119
|
): { title: string; subtitle: string | null } {
|
|
101
120
|
switch (view) {
|
|
102
|
-
case 'accounts':
|
|
103
|
-
return {
|
|
104
|
-
title: t('accountSwitcher.sections.yourAccounts') || 'Your accounts',
|
|
105
|
-
subtitle: t('signin.chooser.subtitle') || 'Choose which account to continue with.',
|
|
106
|
-
};
|
|
107
121
|
case 'qr':
|
|
108
122
|
return {
|
|
109
123
|
title: t('accountSwitcher.scanTitle') || 'Sign in with Oxy',
|
|
@@ -138,10 +152,19 @@ const EMPTY_SNAPSHOT: AccountDialogSnapshot = {
|
|
|
138
152
|
commonsAvailability: 'unknown',
|
|
139
153
|
};
|
|
140
154
|
|
|
155
|
+
/**
|
|
156
|
+
* The screen gutter. In the Dialog's nav-header mode the surface adds NO content
|
|
157
|
+
* padding of its own — the large title and each screen own theirs — so this must
|
|
158
|
+
* match Bloom's own large-title gutter (`screen-margin`, 20px) for the body to
|
|
159
|
+
* line up with the title above it.
|
|
160
|
+
*/
|
|
161
|
+
const SCREEN_MARGIN = 20;
|
|
162
|
+
|
|
141
163
|
const styles = StyleSheet.create({
|
|
142
164
|
bodyContent: {
|
|
143
165
|
paddingTop: 4,
|
|
144
166
|
paddingBottom: 4,
|
|
167
|
+
paddingHorizontal: SCREEN_MARGIN,
|
|
145
168
|
},
|
|
146
169
|
});
|
|
147
170
|
|