@oxyhq/services 22.10.0 → 22.11.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/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 +71 -39
- 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 +71 -40
- 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 +11 -7
- 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 +73 -44
- 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
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.closeAccountDialog = closeAccountDialog;
|
|
7
|
+
exports.getAccountDialogConsumerHooks = getAccountDialogConsumerHooks;
|
|
7
8
|
exports.notifyAccountDialogVisibility = notifyAccountDialogVisibility;
|
|
8
9
|
exports.openAccountDialog = openAccountDialog;
|
|
10
|
+
exports.registerAccountDialogConsumerHooks = registerAccountDialogConsumerHooks;
|
|
9
11
|
exports.registerAccountDialogControls = registerAccountDialogControls;
|
|
10
12
|
exports.subscribeToAccountDialog = subscribeToAccountDialog;
|
|
11
13
|
/**
|
|
@@ -26,7 +28,14 @@ exports.subscribeToAccountDialog = subscribeToAccountDialog;
|
|
|
26
28
|
* are stack operations — this interface never carries visibility state.
|
|
27
29
|
*/
|
|
28
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Optional consumer overrides for account-dialog actions. `ProfileButton` (and
|
|
33
|
+
* similar hosts) register these while mounted so inbox/accounts can route
|
|
34
|
+
* "Manage" / "Add account" to app-local navigation instead of the SDK default.
|
|
35
|
+
*/
|
|
36
|
+
|
|
29
37
|
let controls = null;
|
|
38
|
+
let consumerHooks = null;
|
|
30
39
|
const visibilityListeners = new Set();
|
|
31
40
|
function registerAccountDialogControls(next) {
|
|
32
41
|
controls = next;
|
|
@@ -37,6 +46,19 @@ function registerAccountDialogControls(next) {
|
|
|
37
46
|
};
|
|
38
47
|
}
|
|
39
48
|
|
|
49
|
+
/** Register app-local manage/add/profile handlers for the account dialog. */
|
|
50
|
+
function registerAccountDialogConsumerHooks(next) {
|
|
51
|
+
consumerHooks = next;
|
|
52
|
+
return () => {
|
|
53
|
+
if (consumerHooks === next) {
|
|
54
|
+
consumerHooks = null;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function getAccountDialogConsumerHooks() {
|
|
59
|
+
return consumerHooks;
|
|
60
|
+
}
|
|
61
|
+
|
|
40
62
|
/** Open the account dialog on `view` (default `accounts`). No-op before mount. */
|
|
41
63
|
function openAccountDialog(view) {
|
|
42
64
|
controls?.open(view);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["controls","visibilityListeners","Set","registerAccountDialogControls","next","openAccountDialog","view","open","closeAccountDialog","close","notifyAccountDialogVisibility","visible","listener","subscribeToAccountDialog","add","delete"],"sourceRoot":"../../../../src","sources":["ui/navigation/accountDialogManager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["controls","consumerHooks","visibilityListeners","Set","registerAccountDialogControls","next","registerAccountDialogConsumerHooks","getAccountDialogConsumerHooks","openAccountDialog","view","open","closeAccountDialog","close","notifyAccountDialogVisibility","visible","listener","subscribeToAccountDialog","add","delete"],"sourceRoot":"../../../../src","sources":["ui/navigation/accountDialogManager.ts"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;;AAOA,IAAIA,QAAsC,GAAG,IAAI;AACjD,IAAIC,aAAgD,GAAG,IAAI;AAC3D,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAE1D,SAASC,6BAA6BA,CAACC,IAA2B,EAAc;EACrFL,QAAQ,GAAGK,IAAI;EACf,OAAO,MAAM;IACX,IAAIL,QAAQ,KAAKK,IAAI,EAAE;MACrBL,QAAQ,GAAG,IAAI;IACjB;EACF,CAAC;AACH;;AAEA;AACO,SAASM,kCAAkCA,CAChDD,IAAuC,EAC3B;EACZJ,aAAa,GAAGI,IAAI;EACpB,OAAO,MAAM;IACX,IAAIJ,aAAa,KAAKI,IAAI,EAAE;MAC1BJ,aAAa,GAAG,IAAI;IACtB;EACF,CAAC;AACH;AAEO,SAASM,6BAA6BA,CAAA,EAAsC;EACjF,OAAON,aAAa;AACtB;;AAEA;AACO,SAASO,iBAAiBA,CAACC,IAAwB,EAAQ;EAChET,QAAQ,EAAEU,IAAI,CAACD,IAAI,CAAC;AACtB;;AAEA;AACO,SAASE,kBAAkBA,CAAA,EAAS;EACzCX,QAAQ,EAAEY,KAAK,CAAC,CAAC;AACnB;;AAEA;AACO,SAASC,6BAA6BA,CAACC,OAAgB,EAAQ;EACpE,KAAK,MAAMC,QAAQ,IAAIb,mBAAmB,EAAE;IAC1Ca,QAAQ,CAACD,OAAO,CAAC;EACnB;AACF;;AAEA;AACO,SAASE,wBAAwBA,CAACD,QAAoC,EAAc;EACzFb,mBAAmB,CAACe,GAAG,CAACF,QAAQ,CAAC;EACjC,OAAO,MAAM;IACXb,mBAAmB,CAACgB,MAAM,CAACH,QAAQ,CAAC;EACtC,CAAC;AACH","ignoreList":[]}
|
|
@@ -20,11 +20,10 @@ var _surfaces = require("./surfaces.js");
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Open a bottom-sheet route.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* first one.
|
|
23
|
+
* Open a bottom-sheet route. By DEFAULT it drills into the top-most active
|
|
24
|
+
* surface — morphing it in place (every screen morphs). A NEW surface is stacked
|
|
25
|
+
* on top only when the target route declares `stacks` (reserved for genuine
|
|
26
|
+
* overlays — none today). Opening with no active surface presents the first one.
|
|
28
27
|
*
|
|
29
28
|
* `fullScreen` is accepted for signature compatibility and ignored — a route's
|
|
30
29
|
* surface is now derived from its registry config, not a per-call flag.
|
|
@@ -37,7 +36,7 @@ const showBottomSheet = screenOrConfig => {
|
|
|
37
36
|
return;
|
|
38
37
|
}
|
|
39
38
|
const top = (0, _surfaces.topRouteSurface)();
|
|
40
|
-
if (top &&
|
|
39
|
+
if (top && !(0, _surfaceRegistry.getSurfaceConfig)(screen, props).stacks) {
|
|
41
40
|
top.navigate(screen, props);
|
|
42
41
|
} else {
|
|
43
42
|
(0, _surfaces.presentRoute)(screen, props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_routes","require","_surfaceRegistry","_surfaces","showBottomSheet","screenOrConfig","screen","props","isValidRoute","__DEV__","console","warn","top","topRouteSurface","
|
|
1
|
+
{"version":3,"names":["_routes","require","_surfaceRegistry","_surfaces","showBottomSheet","screenOrConfig","screen","props","isValidRoute","__DEV__","console","warn","top","topRouteSurface","getSurfaceConfig","stacks","navigate","presentRoute","exports","closeBottomSheet","closeAllRouteSurfaces","goBack"],"sourceRoot":"../../../../src","sources":["ui/navigation/bottomSheetManager.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAC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AA,GAAAA,MAAA","ignoreList":[]}
|
|
@@ -50,6 +50,7 @@ const screenLoaders = {
|
|
|
50
50
|
CreateAccount: () => require('../screens/CreateAccountScreen').default,
|
|
51
51
|
AccountMembers: () => require('../screens/AccountMembersScreen').default,
|
|
52
52
|
AccountSettings: () => require('../screens/AccountSettingsScreen').default,
|
|
53
|
+
ChangeAvatar: () => require('../screens/ChangeAvatarScreen').default,
|
|
53
54
|
AvatarCrop: () => require('../screens/AvatarCropScreen').default,
|
|
54
55
|
Notifications: () => require('../screens/NotificationsScreen').default,
|
|
55
56
|
ConnectedApps: () => require('../screens/ConnectedAppsScreen').default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["screenLoaders","ManageAccount","require","default","AccountVerification","PaymentGateway","Profile","LanguageSelector","PrivacySettings","SearchSettings","FileManagement","HelpSupport","FAQ","Feedback","LegalDocuments","AppInfo","PremiumSubscription","WelcomeNewUser","UserLinks","HistoryView","SavesCollections","EditProfile","EditProfileField","LearnMoreUsernames","TrustCenter","TrustLeaderboard","TrustRewards","TrustRules","AboutTrust","TrustFAQ","FollowersList","FollowingList","CreateAccount","AccountMembers","AccountSettings","AvatarCrop","Notifications","ConnectedApps","Preferences","AccountDialog","screenCache","Map","getScreenComponent","routeName","has","get","loader","component","set","error","__DEV__","console","undefined","exports","isValidRoute"],"sourceRoot":"../../../../src","sources":["ui/navigation/routes.ts"],"mappings":";;;;;;AAGA;AACA;AACA;;AAEA;;
|
|
1
|
+
{"version":3,"names":["screenLoaders","ManageAccount","require","default","AccountVerification","PaymentGateway","Profile","LanguageSelector","PrivacySettings","SearchSettings","FileManagement","HelpSupport","FAQ","Feedback","LegalDocuments","AppInfo","PremiumSubscription","WelcomeNewUser","UserLinks","HistoryView","SavesCollections","EditProfile","EditProfileField","LearnMoreUsernames","TrustCenter","TrustLeaderboard","TrustRewards","TrustRules","AboutTrust","TrustFAQ","FollowersList","FollowingList","CreateAccount","AccountMembers","AccountSettings","ChangeAvatar","AvatarCrop","Notifications","ConnectedApps","Preferences","AccountDialog","screenCache","Map","getScreenComponent","routeName","has","get","loader","component","set","error","__DEV__","console","undefined","exports","isValidRoute"],"sourceRoot":"../../../../src","sources":["ui/navigation/routes.ts"],"mappings":";;;;;;AAGA;AACA;AACA;;AAEA;;AAuCuB;;AAEvB;AACA;AACA,MAAMA,aAAsE,GAAG;EAC3EC,aAAa,EAAEA,CAAA,KAAMC,OAAO,CAAC,gCAAgC,CAAC,CAACC,OAAO;EACtEC,mBAAmB,EAAEA,CAAA,KAAMF,OAAO,CAAC,sCAAsC,CAAC,CAACC,OAAO;EAClFE,cAAc,EAAEA,CAAA,KAAMH,OAAO,CAAC,iCAAiC,CAAC,CAACC,OAAO;EACxEG,OAAO,EAAEA,CAAA,KAAMJ,OAAO,CAAC,0BAA0B,CAAC,CAACC,OAAO;EAC1DI,gBAAgB,EAAEA,CAAA,KAAML,OAAO,CAAC,mCAAmC,CAAC,CAACC,OAAO;EAC5EK,eAAe,EAAEA,CAAA,KAAMN,OAAO,CAAC,kCAAkC,CAAC,CAACC,OAAO;EAC1EM,cAAc,EAAEA,CAAA,KAAMP,OAAO,CAAC,iCAAiC,CAAC,CAACC,OAAO;EACxEO,cAAc,EAAEA,CAAA,KAAMR,OAAO,CAAC,iCAAiC,CAAC,CAACC,OAAO;EACxEQ,WAAW,EAAEA,CAAA,KAAMT,OAAO,CAAC,8BAA8B,CAAC,CAACC,OAAO;EAClES,GAAG,EAAEA,CAAA,KAAMV,OAAO,CAAC,sBAAsB,CAAC,CAACC,OAAO;EAClDU,QAAQ,EAAEA,CAAA,KAAMX,OAAO,CAAC,2BAA2B,CAAC,CAACC,OAAO;EAC5DW,cAAc,EAAEA,CAAA,KAAMZ,OAAO,CAAC,iCAAiC,CAAC,CAACC,OAAO;EACxEY,OAAO,EAAEA,CAAA,KAAMb,OAAO,CAAC,0BAA0B,CAAC,CAACC,OAAO;EAC1Da,mBAAmB,EAAEA,CAAA,KAAMd,OAAO,CAAC,s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ACpB;EACJ;EAEA,OAAOA,SAAS;AACpB,CAAC;;AAED;AACA;AAAAC,OAAA,CAAAX,kBAAA,GAAAA,kBAAA;AACO,MAAMY,YAAY,GAAIX,SAAiB,IAA6B;EACvE,OAAOA,SAAS,IAAI5C,aAAa;AACrC,CAAC;AAACsD,OAAA,CAAAC,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -44,9 +44,46 @@ function createSurfaceNavStack(route, props) {
|
|
|
44
44
|
} = store.getState();
|
|
45
45
|
return frames[frames.length - 1];
|
|
46
46
|
};
|
|
47
|
+
|
|
48
|
+
// Result-bearing sub-flows currently running in this surface (the morphed-in
|
|
49
|
+
// avatar picker, and — NESTED within it — the "My Oxy files" media selector).
|
|
50
|
+
// A STACK: flows nest (ChangeAvatar → FileManagement → back to ChangeAvatar).
|
|
51
|
+
// Held OUTSIDE the store (resolvers are functions; flow presence must not
|
|
52
|
+
// re-render frames). Each flow's `returnLength` is the frame count BEFORE its
|
|
53
|
+
// entry frame was pushed, so settling pops back to exactly the frame that
|
|
54
|
+
// started it. `flowStack` is ordered outer → inner; the top is the innermost.
|
|
55
|
+
const flowStack = [];
|
|
56
|
+
const requestDismiss = result => {
|
|
57
|
+
// Dismissing the whole surface abandons EVERY pending sub-flow — settle each
|
|
58
|
+
// promise so an awaiting caller (the avatar picker) never hangs.
|
|
59
|
+
while (flowStack.length) flowStack.pop()?.resolve(undefined);
|
|
60
|
+
if (store.getState().closing) return;
|
|
61
|
+
store.setState({
|
|
62
|
+
closing: true,
|
|
63
|
+
closeResult: result
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const goBack = () => {
|
|
67
|
+
const {
|
|
68
|
+
frames
|
|
69
|
+
} = store.getState();
|
|
70
|
+
if (frames.length <= 1) return false;
|
|
71
|
+
const nextLength = frames.length - 1;
|
|
72
|
+
store.setState({
|
|
73
|
+
frames: frames.slice(0, -1)
|
|
74
|
+
});
|
|
75
|
+
// Backing out past a sub-flow's entry frame cancels it (resolve undefined).
|
|
76
|
+
// A single pop crosses at most one boundary, but loop for safety.
|
|
77
|
+
while (flowStack.length && nextLength <= flowStack[flowStack.length - 1].returnLength) {
|
|
78
|
+
flowStack.pop()?.resolve(undefined);
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
};
|
|
47
82
|
return {
|
|
48
83
|
store,
|
|
49
84
|
getTop,
|
|
85
|
+
requestDismiss,
|
|
86
|
+
goBack,
|
|
50
87
|
navigate(nextRoute, nextProps) {
|
|
51
88
|
store.setState(state => ({
|
|
52
89
|
frames: [...state.frames, makeFrame(nextRoute, nextProps)]
|
|
@@ -57,16 +94,6 @@ function createSurfaceNavStack(route, props) {
|
|
|
57
94
|
frames: [...state.frames.slice(0, -1), makeFrame(nextRoute, nextProps)]
|
|
58
95
|
}));
|
|
59
96
|
},
|
|
60
|
-
goBack() {
|
|
61
|
-
const {
|
|
62
|
-
frames
|
|
63
|
-
} = store.getState();
|
|
64
|
-
if (frames.length <= 1) return false;
|
|
65
|
-
store.setState({
|
|
66
|
-
frames: frames.slice(0, -1)
|
|
67
|
-
});
|
|
68
|
-
return true;
|
|
69
|
-
},
|
|
70
97
|
canGoBack() {
|
|
71
98
|
const {
|
|
72
99
|
frames
|
|
@@ -86,12 +113,32 @@ function createSurfaceNavStack(route, props) {
|
|
|
86
113
|
};
|
|
87
114
|
});
|
|
88
115
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
store.setState({
|
|
92
|
-
|
|
93
|
-
|
|
116
|
+
beginFlow(nextRoute, nextProps) {
|
|
117
|
+
const returnLength = store.getState().frames.length;
|
|
118
|
+
store.setState(state => ({
|
|
119
|
+
frames: [...state.frames, makeFrame(nextRoute, nextProps)]
|
|
120
|
+
}));
|
|
121
|
+
return new Promise(resolve => {
|
|
122
|
+
flowStack.push({
|
|
123
|
+
returnLength,
|
|
124
|
+
resolve
|
|
125
|
+
});
|
|
94
126
|
});
|
|
127
|
+
},
|
|
128
|
+
resolveFlowOrDismiss(result) {
|
|
129
|
+
const flow = flowStack.pop();
|
|
130
|
+
if (!flow) {
|
|
131
|
+
// No flow → this screen owns its surface; dismiss it as before.
|
|
132
|
+
requestDismiss(result);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
store.setState(state => ({
|
|
136
|
+
frames: state.frames.slice(0, flow.returnLength)
|
|
137
|
+
}));
|
|
138
|
+
flow.resolve(result);
|
|
139
|
+
},
|
|
140
|
+
abandonActiveFlow() {
|
|
141
|
+
while (flowStack.length) flowStack.pop()?.resolve(undefined);
|
|
95
142
|
}
|
|
96
143
|
};
|
|
97
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_vanilla","require","makeFrame","route","props","resolved","step","initialStep","createSurfaceNavStack","store","createStore","frames","closing","closeResult","undefined","getTop","getState","length","
|
|
1
|
+
{"version":3,"names":["_vanilla","require","makeFrame","route","props","resolved","step","initialStep","createSurfaceNavStack","store","createStore","frames","closing","closeResult","undefined","getTop","getState","length","flowStack","requestDismiss","result","pop","resolve","setState","goBack","nextLength","slice","returnLength","navigate","nextRoute","nextProps","state","replace","canGoBack","setStep","index","beginFlow","Promise","push","resolveFlowOrDismiss","flow","abandonActiveFlow"],"sourceRoot":"../../../../src","sources":["ui/navigation/surfaceNavStack.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAwDA,SAASC,SAASA,CAACC,KAAgB,EAAEC,KAA+B,EAAY;EAC9E,MAAMC,QAAQ,GAAGD,KAAK,IAAI,CAAC,CAAC;EAC5B,MAAME,IAAI,GAAG,OAAOD,QAAQ,CAACE,WAAW,KAAK,QAAQ,GAAGF,QAAQ,CAACE,WAAW,GAAG,CAAC;EAChF,OAAO;IAAEJ,KAAK;IAAEC,KAAK,EAAEC,QAAQ;IAAEC;EAAK,CAAC;AACzC;AAEO,SAASE,qBAAq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MAAM,CAACwB,KAAK,CAAC;UAAE7B;QAAK,CAAC;QAC1C,OAAO;UAAEK;QAAO,CAAC;MACnB,CAAC,CAAC;IACJ,CAAC;IACDyB,SAASA,CAACP,SAAS,EAAEC,SAAS,EAAE;MAC9B,MAAMH,YAAY,GAAGlB,KAAK,CAACO,QAAQ,CAAC,CAAC,CAACL,MAAM,CAACM,MAAM;MACnDR,KAAK,CAACc,QAAQ,CAAEQ,KAAK,KAAM;QAAEpB,MAAM,EAAE,CAAC,GAAGoB,KAAK,CAACpB,MAAM,EAAET,SAAS,CAAC2B,SAAS,EAAEC,SAAS,CAAC;MAAE,CAAC,CAAC,CAAC;MAC3F,OAAO,IAAIO,OAAO,CAAWf,OAAO,IAAK;QACvCJ,SAAS,CAACoB,IAAI,CAAC;UAAEX,YAAY;UAAEL;QAAQ,CAAC,CAAC;MAC3C,CAAC,CAAC;IACJ,CAAC;IACDiB,oBAAoBA,CAACnB,MAAM,EAAE;MAC3B,MAAMoB,IAAI,GAAGtB,SAAS,CAACG,GAAG,CAAC,CAAC;MAC5B,IAAI,CAACmB,IAAI,EAAE;QACT;QACArB,cAAc,CAACC,MAAM,CAAC;QACtB;MACF;MACAX,KAAK,CAACc,QAAQ,CAAEQ,KAAK,KAAM;QAAEpB,MAAM,EAAEoB,KAAK,CAACpB,MAAM,CAACe,KAAK,CAAC,CAAC,EAAEc,IAAI,CAACb,YAAY;MAAE,CAAC,CAAC,CAAC;MACjFa,IAAI,CAAClB,OAAO,CAACF,MAAM,CAAC;IACtB,CAAC;IACDqB,iBAAiBA,CAAA,EAAG;MAClB,OAAOvB,SAAS,CAACD,MAAM,EAAEC,SAAS,CAACG,GAAG,CAAC,CAAC,EAAEC,OAAO,CAACR,SAAS,CAAC;IAC9D;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -35,15 +35,18 @@ void _registryCoversRoutes;
|
|
|
35
35
|
* How a surface renders — the SDK's presentation taxonomy. Each value maps to a
|
|
36
36
|
* concrete Bloom `Dialog` placement/chrome in `surfaces.ts`:
|
|
37
37
|
*
|
|
38
|
-
* - `'sheet'` → responsive `{ base: 'bottom', md: 'center' }` (the default
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* - `'sheet'` → responsive `{ base: 'bottom', md: 'center' }` (the default,
|
|
39
|
+
* and — since every screen morphs — the presentation of EVERY
|
|
40
|
+
* route today: a bottom sheet on narrow, a centered card wide).
|
|
41
|
+
* - `'center'` → a plain centered modal at every width. Currently unused.
|
|
41
42
|
* - `'drawer'` → responsive `{ base: 'bottom', md: 'left' }` side drawer.
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* Currently unused.
|
|
44
|
+
* - `'fullScreen'` → a flush black-canvas surface (`contentPadding: 0`,
|
|
45
|
+
* programmatic-only dismiss). Currently unused: the flagship
|
|
46
|
+
* photo picker now MORPHS in place as a `sheet` (it paints its
|
|
47
|
+
* own black canvas + bar inside the themed panel), so nothing
|
|
48
|
+
* needs a stacked full-bleed surface. Retained for a future
|
|
49
|
+
* route that genuinely must be full-bleed.
|
|
47
50
|
*/
|
|
48
51
|
|
|
49
52
|
/**
|
|
@@ -63,13 +66,14 @@ const DEFAULT_SURFACE_CONFIG = {
|
|
|
63
66
|
presentation: 'sheet',
|
|
64
67
|
scrollable: true,
|
|
65
68
|
header: true,
|
|
69
|
+
morph: true,
|
|
70
|
+
stacks: false,
|
|
66
71
|
manualActivation: true,
|
|
67
72
|
dynamicBackdrop: true
|
|
68
73
|
};
|
|
69
74
|
|
|
70
75
|
/**
|
|
71
76
|
* Routes that render NO Dialog nav header — they own their chrome:
|
|
72
|
-
* - `AvatarCrop` — its own translucent Cancel / title / Done top bar.
|
|
73
77
|
* - `PaymentGateway` — the payment surface owns its controls.
|
|
74
78
|
* - `WelcomeNewUser` — a full-bleed onboarding wizard with its own step chrome.
|
|
75
79
|
* - `Profile` — a full profile view, no nav-header chrome.
|
|
@@ -78,8 +82,15 @@ const DEFAULT_SURFACE_CONFIG = {
|
|
|
78
82
|
* `AccountDialog` used to be here — it now uses the SHARED Dialog nav header like
|
|
79
83
|
* every other screen (its per-view title/subtitle + view-back go through
|
|
80
84
|
* `useSurfaceHeader`), so the account/sign-in surface no longer feels bespoke.
|
|
85
|
+
*
|
|
86
|
+
* `AvatarCrop` used to be here too, for its own translucent Cancel/title/Done
|
|
87
|
+
* bar. It is now reached ONLY by navigating within a `ChangeAvatar` surface, and
|
|
88
|
+
* the Dialog's `header` is fixed for a surface's whole life — a headerless frame
|
|
89
|
+
* inside a header-mode surface would stack two bars. So the crop declares its
|
|
90
|
+
* title + its "Use photo" action through `useSurfaceHeader` like every other
|
|
91
|
+
* screen, and keeps only its dark crop stage.
|
|
81
92
|
*/
|
|
82
|
-
const HEADERLESS_ROUTES = new Set(['
|
|
93
|
+
const HEADERLESS_ROUTES = new Set(['PaymentGateway', 'WelcomeNewUser', 'Profile']);
|
|
83
94
|
|
|
84
95
|
/**
|
|
85
96
|
* Predicate matching `FileManagementScreen`'s internal `isImageOnlyPicker`
|
|
@@ -113,19 +124,29 @@ const isFileManagementImageOnlyPicker = props => {
|
|
|
113
124
|
const OWN_SCROLL_CONTAINER_ROUTES = new Set(['FileManagement', 'ConnectedApps', 'TrustLeaderboard', 'FollowersList', 'FollowingList']);
|
|
114
125
|
|
|
115
126
|
/**
|
|
116
|
-
* Resolve the surface configuration for a route + props.
|
|
117
|
-
* responsive sheet
|
|
118
|
-
*
|
|
119
|
-
*
|
|
127
|
+
* Resolve the surface configuration for a route + props. Every route defaults to
|
|
128
|
+
* the responsive sheet and MORPHS in place when navigated to from within a surface
|
|
129
|
+
* (no route stacks — genuine overlays are Bloom-raw `surfaces.present`/`confirm`
|
|
130
|
+
* calls, outside this registry). The image-only FileManagement picker is a normal
|
|
131
|
+
* sheet that owns its own scroll + translucent bar (no Dialog nav header); every
|
|
132
|
+
* other own-scroller is marked `scrollable: false`.
|
|
120
133
|
*/
|
|
121
134
|
const getSurfaceConfig = (route, props) => {
|
|
122
135
|
if (route === 'FileManagement' && isFileManagementImageOnlyPicker(props)) {
|
|
123
|
-
// The
|
|
136
|
+
// The flagship photo picker MORPHS in place like every other screen. It is an
|
|
137
|
+
// own-scroller (`PhotoPickerView`'s FlatList) that paints its OWN full-bleed
|
|
138
|
+
// black canvas + translucent top bar INSIDE the themed panel, so it takes no
|
|
139
|
+
// Dialog nav header. It needs ROOM for the photo grid, so it declares an
|
|
140
|
+
// explicit LARGE morph target — the panel grows UP to a near-full-height,
|
|
141
|
+
// wider card on entry (and back down on pick→crop), the grid scrolling within.
|
|
124
142
|
return {
|
|
125
143
|
...DEFAULT_SURFACE_CONFIG,
|
|
126
|
-
presentation: 'fullScreen',
|
|
127
144
|
scrollable: false,
|
|
128
|
-
header: false
|
|
145
|
+
header: false,
|
|
146
|
+
frameSize: {
|
|
147
|
+
heightRatio: 0.9,
|
|
148
|
+
maxWidth: 640
|
|
149
|
+
}
|
|
129
150
|
};
|
|
130
151
|
}
|
|
131
152
|
if (HEADERLESS_ROUTES.has(route)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_registryCoversRoutes","DEFAULT_SURFACE_CONFIG","presentation","scrollable","header","manualActivation","dynamicBackdrop","HEADERLESS_ROUTES","Set","isFileManagementImageOnlyPicker","props","selectMode","disabled","disabledMimeTypes","Array","isArray","length","has","predicate","some","mt","blocksVideos","startsWith","blocksAudio","blocksDocs","OWN_SCROLL_CONTAINER_ROUTES","getSurfaceConfig","route","exports","getSurfacePresentation"],"sourceRoot":"../../../../src","sources":["ui/navigation/surfaceRegistry.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_registryCoversRoutes","DEFAULT_SURFACE_CONFIG","presentation","scrollable","header","morph","stacks","manualActivation","dynamicBackdrop","HEADERLESS_ROUTES","Set","isFileManagementImageOnlyPicker","props","selectMode","disabled","disabledMimeTypes","Array","isArray","length","has","predicate","some","mt","blocksVideos","startsWith","blocksAudio","blocksDocs","OWN_SCROLL_CONTAINER_ROUTES","getSurfaceConfig","route","frameSize","heightRatio","maxWidth","exports","getSurfacePresentation"],"sourceRoot":"../../../../src","sources":["ui/navigation/surfaceRegistry.ts"],"mappings":";;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAgEA;AACA;AACA;AACA;AACA;;AAMA,MAAMA,qBAA2C,GAAG,IAAI;AACxD,KAAKA,qBAAqB;;AAE1B;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoEA;AACA,MAAMC,sBAA0C,GAAG;EACjDC,YAAY,EAAE,OAAO;EACrBC,UAAU,EAAE,IAAI;EAChBC,MAAM,EAAE,IAAI;EACZC,KAAK,EAAE,IAAI;EACXC,MAAM,EAAE,KAAK;EACbC,gBAAgB,EAAE,IAAI;EACtBC,eAAe,EAAE;AACnB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAyC,GAAG,IAAIC,GAAG,CAAY,CACnE,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,CACV,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,+BAA+B,GAAIC,KAA8B,IAAc;EACnF,IAAI,CAACA,KAAK,CAACC,UAAU,EAAE,OAAO,KAAK;EACnC,MAAMC,QAAQ,GAAGF,KAAK,CAACG,iBAAiB;EACxC,IAAI,CAACC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,IAAIA,QAAQ,CAACI,MAAM,KAAK,CAAC,EAAE,OAAO,KAAK;EACnE,MAAMC,GAAG,GAAIC,SAAkC,IAC7CN,QAAQ,CAACO,IAAI,CAAEC,EAAE,IAAK,OAA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AAG,CAACU,KAAK,CAAC,EAAE;IAC1C;IACA;IACA,OAAO;MAAE,GAAG5B,sBAAsB;MAAEE,UAAU,EAAE;IAAM,CAAC;EACzD;EACA,OAAOF,sBAAsB;AAC/B,CAAC;;AAED;AAAAgC,OAAA,CAAAL,gBAAA,GAAAA,gBAAA;AACO,MAAMM,sBAAsB,GAAGA,CACpCL,KAAgB,EAChBjB,KAA8B,KACNgB,gBAAgB,CAACC,KAAK,EAAEjB,KAAK,CAAC,CAACV,YAAY;AAAC+B,OAAA,CAAAC,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -5,11 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.closeAllRouteSurfaces = closeAllRouteSurfaces;
|
|
7
7
|
exports.navigateWithinOrPresent = navigateWithinOrPresent;
|
|
8
|
+
exports.openWithinOrPresent = openWithinOrPresent;
|
|
8
9
|
exports.present = present;
|
|
9
10
|
exports.presentDetached = presentDetached;
|
|
10
11
|
exports.presentRoute = presentRoute;
|
|
11
12
|
exports.replaceWithinOrPresent = replaceWithinOrPresent;
|
|
12
13
|
exports.surfaces = void 0;
|
|
14
|
+
exports.topMorphableSurface = topMorphableSurface;
|
|
13
15
|
exports.topRouteSurface = topRouteSurface;
|
|
14
16
|
exports.useSurfaces = useSurfaces;
|
|
15
17
|
var _react = require("react");
|
|
@@ -61,6 +63,11 @@ function bloomOptionsFor(config) {
|
|
|
61
63
|
// Threaded onto every placement so a route that owns its own scroll container
|
|
62
64
|
// (`scrollable: false`) opts out of the Dialog's internal ScrollView.
|
|
63
65
|
const scrollable = config.scrollable;
|
|
66
|
+
// Surface-level morph opt-out (the DEPTH axis is untouched — this only governs
|
|
67
|
+
// whether the panel reshapes when the content is swapped in place). Each frame
|
|
68
|
+
// additionally declares its own opt-out through `useDialogFrame` in
|
|
69
|
+
// `SurfaceScreen`, so a surface can morph for most routes and not for one.
|
|
70
|
+
const morph = config.morph;
|
|
64
71
|
// Nav-header mode marker: turns on the Dialog's OWN sticky gradient nav bar +
|
|
65
72
|
// large collapsing title over its scroll content. The title/subtitle/action
|
|
66
73
|
// slots are contributed at runtime by the mounted screen via `useSurfaceHeader`
|
|
@@ -74,6 +81,7 @@ function bloomOptionsFor(config) {
|
|
|
74
81
|
placement: 'center',
|
|
75
82
|
scrollable,
|
|
76
83
|
header,
|
|
84
|
+
morph,
|
|
77
85
|
...SDK_SURFACE_CHROME
|
|
78
86
|
};
|
|
79
87
|
case 'drawer':
|
|
@@ -84,6 +92,7 @@ function bloomOptionsFor(config) {
|
|
|
84
92
|
},
|
|
85
93
|
scrollable,
|
|
86
94
|
header,
|
|
95
|
+
morph,
|
|
87
96
|
...SDK_SURFACE_CHROME
|
|
88
97
|
};
|
|
89
98
|
case 'fullScreen':
|
|
@@ -97,6 +106,7 @@ function bloomOptionsFor(config) {
|
|
|
97
106
|
maxHeightRatio: 0.9,
|
|
98
107
|
dismissOnBackdrop: false,
|
|
99
108
|
scrollable,
|
|
109
|
+
morph,
|
|
100
110
|
style: FULLSCREEN_SURFACE_STYLE,
|
|
101
111
|
panelStyle: FULLSCREEN_SURFACE_STYLE
|
|
102
112
|
};
|
|
@@ -105,6 +115,7 @@ function bloomOptionsFor(config) {
|
|
|
105
115
|
placement: SHEET_PLACEMENT,
|
|
106
116
|
scrollable,
|
|
107
117
|
header,
|
|
118
|
+
morph,
|
|
108
119
|
...SDK_SURFACE_CHROME
|
|
109
120
|
};
|
|
110
121
|
}
|
|
@@ -121,6 +132,8 @@ function bloomOptionsFor(config) {
|
|
|
121
132
|
* The type-erased handle the `showBottomSheet` adapter needs from a tracked
|
|
122
133
|
* surface: what it hosts, and how to drive/dismiss it. Kept result-type-free so
|
|
123
134
|
* the (generic) `SurfaceInstance<K>` never has to be widened into a shared array.
|
|
135
|
+
* Exported so `OxyContext` can hold the surface it MORPHS the account dialog into
|
|
136
|
+
* (see {@link topRouteSurface}).
|
|
124
137
|
*/
|
|
125
138
|
|
|
126
139
|
/**
|
|
@@ -130,6 +143,17 @@ function bloomOptionsFor(config) {
|
|
|
130
143
|
* navigable base. Entries self-remove when their surface is dismissed.
|
|
131
144
|
*/
|
|
132
145
|
const activeRouteSurfaces = [];
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The frontmost DETACHED surface (the AccountDialog), while open. Detached
|
|
149
|
+
* surfaces are kept OUT of `activeRouteSurfaces` so `closeAllRouteSurfaces` never
|
|
150
|
+
* touches them — but the AccountDialog IS a valid morph target: a result-bearing
|
|
151
|
+
* flow opened from within it (the account-menu hero avatar → `ChangeAvatar`) must
|
|
152
|
+
* morph INTO it, not stack a new surface behind it. Invariant: whenever set, this
|
|
153
|
+
* surface is frontmost — every account-menu action that opens a tracked surface
|
|
154
|
+
* (Manage, Help, …) dismisses the dialog FIRST, so the two never overlap.
|
|
155
|
+
*/
|
|
156
|
+
let detachedFrontSurface = null;
|
|
133
157
|
function presentInternal(route, props, opts, track) {
|
|
134
158
|
const navStack = (0, _surfaceNavStack.createSurfaceNavStack)(route, props);
|
|
135
159
|
const config = (0, _surfaceRegistry.getSurfaceConfig)(route, props);
|
|
@@ -141,12 +165,10 @@ function presentInternal(route, props, opts, track) {
|
|
|
141
165
|
const result = _surfaces.surfaces.present(surface => /*#__PURE__*/(0, _react.createElement)(_SurfaceScreen.default, {
|
|
142
166
|
navStack,
|
|
143
167
|
surface,
|
|
144
|
-
presentation: config.presentation,
|
|
145
168
|
dismissOnBackdrop: bloomOpts.dismissOnBackdrop ?? true
|
|
146
169
|
}), bloomOpts);
|
|
147
170
|
const instance = {
|
|
148
171
|
route,
|
|
149
|
-
presentation: config.presentation,
|
|
150
172
|
navigate: (nextRoute, nextProps) => {
|
|
151
173
|
const top = navStack.getTop();
|
|
152
174
|
if (top.route === nextRoute) navStack.replace(nextRoute, nextProps);else navStack.navigate(nextRoute, nextProps);
|
|
@@ -155,22 +177,35 @@ function presentInternal(route, props, opts, track) {
|
|
|
155
177
|
goBack: () => navStack.goBack(),
|
|
156
178
|
canGoBack: () => navStack.canGoBack(),
|
|
157
179
|
setStep: step => navStack.setStep(step),
|
|
180
|
+
beginFlow: (nextRoute, nextProps) => navStack.beginFlow(nextRoute, nextProps),
|
|
158
181
|
dismiss: dismissResult => navStack.requestDismiss(dismissResult),
|
|
159
182
|
result
|
|
160
183
|
};
|
|
184
|
+
|
|
185
|
+
// If the surface is torn down (backdrop, `closeAll`, host unmount) while a
|
|
186
|
+
// result-bearing sub-flow is still open, settle that flow so an awaiting caller
|
|
187
|
+
// never hangs. Runs for tracked and detached surfaces alike.
|
|
188
|
+
result.finally(() => navStack.abandonActiveFlow());
|
|
189
|
+
const tracked = {
|
|
190
|
+
route: instance.route,
|
|
191
|
+
navigate: instance.navigate,
|
|
192
|
+
goBack: instance.goBack,
|
|
193
|
+
beginFlow: instance.beginFlow,
|
|
194
|
+
dismiss: () => instance.dismiss()
|
|
195
|
+
};
|
|
161
196
|
if (track) {
|
|
162
|
-
const tracked = {
|
|
163
|
-
route: instance.route,
|
|
164
|
-
presentation: instance.presentation,
|
|
165
|
-
navigate: instance.navigate,
|
|
166
|
-
goBack: instance.goBack,
|
|
167
|
-
dismiss: () => instance.dismiss()
|
|
168
|
-
};
|
|
169
197
|
activeRouteSurfaces.push(tracked);
|
|
170
198
|
result.finally(() => {
|
|
171
199
|
const index = activeRouteSurfaces.indexOf(tracked);
|
|
172
200
|
if (index >= 0) activeRouteSurfaces.splice(index, 1);
|
|
173
201
|
});
|
|
202
|
+
} else {
|
|
203
|
+
// Detached (the AccountDialog): NOT in the closeAll lineage, but recorded as
|
|
204
|
+
// the frontmost morph target so a flow opened from within it morphs IN.
|
|
205
|
+
detachedFrontSurface = tracked;
|
|
206
|
+
result.finally(() => {
|
|
207
|
+
if (detachedFrontSurface === tracked) detachedFrontSurface = null;
|
|
208
|
+
});
|
|
174
209
|
}
|
|
175
210
|
return instance;
|
|
176
211
|
}
|
|
@@ -204,6 +239,16 @@ function topRouteSurface() {
|
|
|
204
239
|
return activeRouteSurfaces[activeRouteSurfaces.length - 1];
|
|
205
240
|
}
|
|
206
241
|
|
|
242
|
+
/**
|
|
243
|
+
* The frontmost surface a result-bearing flow should morph INTO: the detached
|
|
244
|
+
* AccountDialog if open (it sits on top of everything), else the top tracked
|
|
245
|
+
* route surface. Used by {@link openWithinOrPresent} so the account-menu hero
|
|
246
|
+
* avatar morphs the dialog into `ChangeAvatar` instead of stacking a new surface.
|
|
247
|
+
*/
|
|
248
|
+
function topMorphableSurface() {
|
|
249
|
+
return detachedFrontSurface ?? topRouteSurface();
|
|
250
|
+
}
|
|
251
|
+
|
|
207
252
|
/**
|
|
208
253
|
* Dismiss every active route surface (the whole `showBottomSheet` session). The
|
|
209
254
|
* AccountDialog is untracked, so it is untouched. Iterates a snapshot because
|
|
@@ -214,27 +259,59 @@ function closeAllRouteSurfaces() {
|
|
|
214
259
|
}
|
|
215
260
|
|
|
216
261
|
/**
|
|
217
|
-
* Drill in from a screen
|
|
218
|
-
*
|
|
219
|
-
*
|
|
262
|
+
* Drill in from a screen. From inside a surface the DEFAULT is to navigate WITHIN
|
|
263
|
+
* it — the panel MORPHS from the current frame's size to the next's. EVERY screen
|
|
264
|
+
* morphs; a NEW surface is stacked on top ONLY when the target route declares
|
|
265
|
+
* `stacks` (reserved for genuine overlays — none today, since action sheets /
|
|
266
|
+
* confirms / prompts are Bloom-raw `surfaces.present` calls outside this
|
|
267
|
+
* registry). A stacked surface gets its own backdrop + entry animation; dismissing
|
|
268
|
+
* it unwinds back to the surface that opened it.
|
|
220
269
|
*/
|
|
221
|
-
function navigateWithinOrPresent(
|
|
270
|
+
function navigateWithinOrPresent(navStack, route, props) {
|
|
222
271
|
const nextProps = props ?? {};
|
|
223
|
-
if ((0, _surfaceRegistry.
|
|
224
|
-
navStack.navigate(route, nextProps);
|
|
225
|
-
} else {
|
|
272
|
+
if ((0, _surfaceRegistry.getSurfaceConfig)(route, nextProps).stacks) {
|
|
226
273
|
presentRoute(route, nextProps);
|
|
274
|
+
} else {
|
|
275
|
+
navStack.navigate(route, nextProps);
|
|
227
276
|
}
|
|
228
277
|
}
|
|
229
278
|
|
|
230
|
-
/** Replace variant of {@link navigateWithinOrPresent}. */
|
|
231
|
-
function replaceWithinOrPresent(
|
|
279
|
+
/** Replace variant of {@link navigateWithinOrPresent} (swaps the top frame). */
|
|
280
|
+
function replaceWithinOrPresent(navStack, route, props) {
|
|
232
281
|
const nextProps = props ?? {};
|
|
233
|
-
if ((0, _surfaceRegistry.
|
|
234
|
-
navStack.replace(route, nextProps);
|
|
235
|
-
} else {
|
|
282
|
+
if ((0, _surfaceRegistry.getSurfaceConfig)(route, nextProps).stacks) {
|
|
236
283
|
presentRoute(route, nextProps);
|
|
284
|
+
} else {
|
|
285
|
+
navStack.replace(route, nextProps);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Open a result-bearing route the SAME way a drill-in navigates (the morph-by-
|
|
291
|
+
* default rule), but returning the route's dismissal RESULT to the caller.
|
|
292
|
+
*
|
|
293
|
+
* When a surface is already open and the target morphs into it (the default —
|
|
294
|
+
* anything not marked `stacks`), it runs as a SUB-FLOW inside that surface: the
|
|
295
|
+
* panel morphs from the current screen into the target, and the promise resolves
|
|
296
|
+
* with the target's `dismiss(result)` (or `undefined` when cancelled), popping
|
|
297
|
+
* back to the caller's frame WITHOUT closing the host. Otherwise (no surface, or a
|
|
298
|
+
* route that stacks) it presents a fresh surface and resolves with its dismissal —
|
|
299
|
+
* identical to the historical `present(route).result`.
|
|
300
|
+
*
|
|
301
|
+
* The entry seam for the avatar picker AND its nested "My Oxy files" media
|
|
302
|
+
* selector: each awaits its result whether it morphed into the caller's surface
|
|
303
|
+
* or opened cold, with no morph-vs-present branch of its own.
|
|
304
|
+
*/
|
|
305
|
+
function openWithinOrPresent(route, props) {
|
|
306
|
+
const nextProps = props ?? {};
|
|
307
|
+
const host = topMorphableSurface();
|
|
308
|
+
if (host && !(0, _surfaceRegistry.getSurfaceConfig)(route, nextProps).stacks) {
|
|
309
|
+
// Morph: run as a sub-flow inside the host. The erased `Promise<unknown>` is
|
|
310
|
+
// narrowed to this route's result at the typed boundary (the sub-flow resolves
|
|
311
|
+
// with exactly the value a descendant screen passes to `dismiss(result)`).
|
|
312
|
+
return host.beginFlow(route, nextProps);
|
|
237
313
|
}
|
|
314
|
+
return present(route, props).result;
|
|
238
315
|
}
|
|
239
316
|
|
|
240
317
|
/**
|