@oxyhq/services 22.8.6 → 22.9.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/OxyAccountDialog.js +30 -39
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -29
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/SurfaceScreen.js +146 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +3 -3
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +32 -1
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +38 -56
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -57
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceNavStack.js +98 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +108 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaces.js +219 -0
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +8 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +60 -3
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +14 -17
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/shared.js +13 -1
- package/lib/commonjs/ui/screens/fileManagement/shared.js.map +1 -1
- package/lib/commonjs/ui/types/surfaceScreen.js +6 -0
- package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAccountDialog.js +31 -40
- package/lib/module/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +10 -30
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/SurfaceScreen.js +141 -0
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
- package/lib/module/ui/components/fileManagement/UploadPreview.js +3 -3
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +32 -1
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +37 -53
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -56
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceNavStack.js +95 -0
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/module/ui/navigation/surfaceRegistry.js +102 -0
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/module/ui/navigation/surfaces.js +207 -0
- package/lib/module/ui/navigation/surfaces.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +8 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +60 -3
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +14 -18
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/shared.js +12 -0
- package/lib/module/ui/screens/fileManagement/shared.js.map +1 -1
- package/lib/module/ui/types/surfaceScreen.js +4 -0
- package/lib/module/ui/types/surfaceScreen.js.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +29 -27
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +24 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +3 -10
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +117 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts +7 -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 +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/shared.d.ts +4 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +29 -27
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +24 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +3 -10
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +117 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts +7 -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 +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/shared.d.ts +4 -0
- package/lib/typescript/module/ui/screens/fileManagement/shared.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/ui/components/OxyAccountDialog.tsx +32 -38
- package/src/ui/components/OxyProvider.tsx +12 -34
- package/src/ui/components/SurfaceScreen.tsx +166 -0
- package/src/ui/components/fileManagement/UploadPreview.tsx +8 -16
- package/src/ui/context/OxyContext.tsx +27 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +39 -0
- package/src/ui/navigation/bottomSheetManager.ts +46 -73
- package/src/ui/navigation/routes.ts +7 -106
- package/src/ui/navigation/surfaceNavStack.ts +110 -0
- package/src/ui/navigation/surfaceRegistry.ts +174 -0
- package/src/ui/navigation/surfaces.ts +244 -0
- package/src/ui/screens/FileManagementScreen.tsx +8 -1
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +69 -7
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +16 -18
- package/src/ui/screens/fileManagement/shared.ts +23 -0
- package/src/ui/types/surfaceScreen.ts +38 -0
- package/lib/commonjs/ui/components/BottomSheet.js +0 -49
- package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/module/ui/components/BottomSheet.js +0 -45
- package/lib/module/ui/components/BottomSheet.js.map +0 -1
- package/lib/module/ui/components/BottomSheetRouter.js +0 -292
- package/lib/module/ui/components/BottomSheetRouter.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +0 -1
- package/src/ui/components/BottomSheet.tsx +0 -48
- package/src/ui/components/BottomSheetRouter.tsx +0 -310
- package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getSurfacePresentation = exports.getSurfaceConfig = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* The SDK's typed surface registry — the contract layer the SDK stacks on top of
|
|
9
|
+
* Bloom's content-agnostic surface stack (`@oxyhq/bloom/surfaces`). One entry per
|
|
10
|
+
* route describing its `props` (what the presenter must pass) and its `result`
|
|
11
|
+
* (what awaiting `present()` resolves with). Hand-maintained, contract-first:
|
|
12
|
+
* adding a route here is the single edit that types it end to end.
|
|
13
|
+
*
|
|
14
|
+
* For P1 most routes keep permissive `Record<string, unknown>` props + a `void`
|
|
15
|
+
* result — the historical grab-bag `showBottomSheet`/`navigate` props are
|
|
16
|
+
* unchanged. Later phases tighten individual routes without changing this shape.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/** One registry entry: the props a route is presented with + its dismissal result. */
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Compile-time guard: the registry keys must be EXACTLY the route names. If a new
|
|
23
|
+
* `RouteName` is added without a registry entry (or vice-versa) this alias
|
|
24
|
+
* resolves to `never` and the `satisfies` assertion below fails to type-check.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
const _registryCoversRoutes = true;
|
|
28
|
+
void _registryCoversRoutes;
|
|
29
|
+
|
|
30
|
+
/** Typed props a route is presented with. */
|
|
31
|
+
|
|
32
|
+
/** What awaiting a route's `present()` resolves with when it is dismissed. */
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* How a surface renders — the SDK's presentation taxonomy. Each value maps to a
|
|
36
|
+
* concrete Bloom `Dialog` placement/chrome in `surfaces.ts`:
|
|
37
|
+
*
|
|
38
|
+
* - `'sheet'` → responsive `{ base: 'bottom', md: 'center' }` (the default:
|
|
39
|
+
* a bottom sheet on narrow viewports, a centered card on wide).
|
|
40
|
+
* - `'center'` → a plain centered modal at every width.
|
|
41
|
+
* - `'drawer'` → responsive `{ base: 'bottom', md: 'left' }` side drawer.
|
|
42
|
+
* - `'fullScreen'` → approximated with the shared `Dialog`: a full-height sheet /
|
|
43
|
+
* large centered card, flush (`contentPadding: 0`) content, a
|
|
44
|
+
* black canvas and programmatic-only dismiss (the flagship
|
|
45
|
+
* image picker). A real Bloom `'fullScreen'` placement is a
|
|
46
|
+
* follow-up if the approximation reads wrong on device.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Per-route surface configuration. Merges the historical `SheetRouteConfig`
|
|
51
|
+
* knobs with the new {@link SurfacePresentation}.
|
|
52
|
+
*
|
|
53
|
+
* NOTE: `scrollable` / `manualActivation` / `dynamicBackdrop` / `handleComponent`
|
|
54
|
+
* describe the in-tree bottom-sheet's pan + scroll behaviour. On Bloom's `Dialog`
|
|
55
|
+
* surface those concerns are now owned by the shared `DialogBottomSheet` (it opts
|
|
56
|
+
* pure custom children OUT of its internal ScrollView and manages the pan itself),
|
|
57
|
+
* so for P1 these fields are informational — reserved for a future Bloom
|
|
58
|
+
* bottom-placement passthrough. `presentation` (+ `scrollable` for the picker's
|
|
59
|
+
* flush layout) is what actually drives the surface today.
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
/** Defaults shared across all routes — the canonical responsive "sheet". */
|
|
63
|
+
const DEFAULT_SURFACE_CONFIG = {
|
|
64
|
+
presentation: 'sheet',
|
|
65
|
+
scrollable: true,
|
|
66
|
+
manualActivation: true,
|
|
67
|
+
dynamicBackdrop: true
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Predicate matching `FileManagementScreen`'s internal `isImageOnlyPicker`
|
|
72
|
+
* derivation. When the consumer restricts to image MIME types (no videos, no
|
|
73
|
+
* audio, no documents), FileManagement renders the flagship `PhotoPickerView`,
|
|
74
|
+
* which owns its own FlatList and reads best as a full-bleed picker. Kept in sync
|
|
75
|
+
* with `FileManagementScreen` — both check the same disabled MIME type families.
|
|
76
|
+
*/
|
|
77
|
+
const isFileManagementImageOnlyPicker = props => {
|
|
78
|
+
if (!props.selectMode) return false;
|
|
79
|
+
const disabled = props.disabledMimeTypes;
|
|
80
|
+
if (!Array.isArray(disabled) || disabled.length === 0) return false;
|
|
81
|
+
const has = predicate => disabled.some(mt => typeof mt === 'string' && predicate(mt));
|
|
82
|
+
const blocksVideos = has(mt => mt === 'video/' || mt.startsWith('video/'));
|
|
83
|
+
const blocksAudio = has(mt => mt === 'audio/' || mt.startsWith('audio/'));
|
|
84
|
+
const blocksDocs = has(mt => mt === 'application/pdf' || mt === 'application/' || mt.startsWith('application/'));
|
|
85
|
+
return blocksVideos && blocksAudio && blocksDocs;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Resolve the surface configuration for a route + props. Defaults to the
|
|
90
|
+
* responsive sheet; the image-only FileManagement picker upgrades to a full-bleed
|
|
91
|
+
* `'fullScreen'` surface that owns its own scrolling.
|
|
92
|
+
*/
|
|
93
|
+
const getSurfaceConfig = (route, props) => {
|
|
94
|
+
if (route === 'FileManagement' && isFileManagementImageOnlyPicker(props)) {
|
|
95
|
+
return {
|
|
96
|
+
...DEFAULT_SURFACE_CONFIG,
|
|
97
|
+
presentation: 'fullScreen',
|
|
98
|
+
scrollable: false
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return DEFAULT_SURFACE_CONFIG;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/** Convenience: just the presentation taxonomy for a route + props. */
|
|
105
|
+
exports.getSurfaceConfig = getSurfaceConfig;
|
|
106
|
+
const getSurfacePresentation = (route, props) => getSurfaceConfig(route, props).presentation;
|
|
107
|
+
exports.getSurfacePresentation = getSurfacePresentation;
|
|
108
|
+
//# sourceMappingURL=surfaceRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_registryCoversRoutes","DEFAULT_SURFACE_CONFIG","presentation","scrollable","manualActivation","dynamicBackdrop","isFileManagementImageOnlyPicker","props","selectMode","disabled","disabledMimeTypes","Array","isArray","length","has","predicate","some","mt","blocksVideos","startsWith","blocksAudio","blocksDocs","getSurfaceConfig","route","exports","getSurfacePresentation"],"sourceRoot":"../../../../src","sources":["ui/navigation/surfaceRegistry.ts"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AA+CA;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;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiBA;AACA,MAAMC,sBAA0C,GAAG;EACjDC,YAAY,EAAE,OAAO;EACrBC,UAAU,EAAE,IAAI;EAChBC,gBAAgB,EAAE,IAAI;EACtBC,eAAe,EAAE;AACnB,CAAC;;AAED;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,CA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@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.closeAllRouteSurfaces = closeAllRouteSurfaces;
|
|
7
|
+
exports.navigateWithinOrPresent = navigateWithinOrPresent;
|
|
8
|
+
exports.present = present;
|
|
9
|
+
exports.presentDetached = presentDetached;
|
|
10
|
+
exports.presentRoute = presentRoute;
|
|
11
|
+
exports.replaceWithinOrPresent = replaceWithinOrPresent;
|
|
12
|
+
exports.surfaces = void 0;
|
|
13
|
+
exports.topRouteSurface = topRouteSurface;
|
|
14
|
+
exports.useSurfaces = useSurfaces;
|
|
15
|
+
var _react = require("react");
|
|
16
|
+
var _surfaces = require("@oxyhq/bloom/surfaces");
|
|
17
|
+
var _SurfaceScreen = _interopRequireDefault(require("../components/SurfaceScreen.js"));
|
|
18
|
+
var _surfaceRegistry = require("./surfaceRegistry.js");
|
|
19
|
+
var _surfaceNavStack = require("./surfaceNavStack.js");
|
|
20
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
+
/**
|
|
22
|
+
* The SDK's typed surface API — a route registry layered on top of Bloom's
|
|
23
|
+
* content-agnostic surface stack (`@oxyhq/bloom/surfaces`).
|
|
24
|
+
*
|
|
25
|
+
* `present(route)` opens a NEW Bloom surface (the DEPTH axis) whose content is a
|
|
26
|
+
* {@link SurfaceScreen} driven by the route's own {@link SurfaceNavStack} (the
|
|
27
|
+
* NAV-WITHIN axis). Navigating within that surface mutates its nav stack and
|
|
28
|
+
* re-renders the SAME Bloom surface; presenting stacks another surface on top.
|
|
29
|
+
*
|
|
30
|
+
* Bloom coordinates z-order / backdrop / dismiss across every surface (SDK's and
|
|
31
|
+
* apps'), so nothing clashes.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/** Responsive "sheet": bottom sheet on narrow, centered card on wide. */
|
|
35
|
+
const SHEET_PLACEMENT = {
|
|
36
|
+
base: 'bottom',
|
|
37
|
+
md: 'center'
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** Full-bleed black canvas for the `'fullScreen'` approximation (image picker). */
|
|
41
|
+
const FULLSCREEN_SURFACE_STYLE = {
|
|
42
|
+
backgroundColor: '#000000',
|
|
43
|
+
overflow: 'hidden'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Map a route's presentation taxonomy onto concrete Bloom `Dialog` options. */
|
|
47
|
+
function bloomOptionsFor(config) {
|
|
48
|
+
switch (config.presentation) {
|
|
49
|
+
case 'center':
|
|
50
|
+
return {
|
|
51
|
+
placement: 'center'
|
|
52
|
+
};
|
|
53
|
+
case 'drawer':
|
|
54
|
+
return {
|
|
55
|
+
placement: {
|
|
56
|
+
base: 'bottom',
|
|
57
|
+
md: 'left'
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
case 'fullScreen':
|
|
61
|
+
// Approximate a full-screen surface with the shared `Dialog`: a tall
|
|
62
|
+
// sheet / large centered card, flush content, a black canvas and
|
|
63
|
+
// programmatic-only dismiss — matching the shipped image-picker Dialog.
|
|
64
|
+
return {
|
|
65
|
+
placement: SHEET_PLACEMENT,
|
|
66
|
+
contentPadding: 0,
|
|
67
|
+
maxWidth: 640,
|
|
68
|
+
maxHeightRatio: 0.9,
|
|
69
|
+
dismissOnBackdrop: false,
|
|
70
|
+
style: FULLSCREEN_SURFACE_STYLE,
|
|
71
|
+
panelStyle: FULLSCREEN_SURFACE_STYLE
|
|
72
|
+
};
|
|
73
|
+
default:
|
|
74
|
+
return {
|
|
75
|
+
placement: SHEET_PLACEMENT
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A live handle to a presented SDK surface. Exposes DEPTH controls (`dismiss`,
|
|
82
|
+
* `result`) and NAV-WITHIN controls (`navigate`/`replace`/`goBack`/`setStep`) that
|
|
83
|
+
* drive this surface's own nav stack. Held by the `showBottomSheet` adapter (base
|
|
84
|
+
* surface) and by `OxyContext` (the AccountDialog surface).
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The type-erased handle the `showBottomSheet` adapter needs from a tracked
|
|
89
|
+
* surface: what it hosts, and how to drive/dismiss it. Kept result-type-free so
|
|
90
|
+
* the (generic) `SurfaceInstance<K>` never has to be widened into a shared array.
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Active SDK "route" surfaces (the `showBottomSheet` lineage), bottom → top.
|
|
95
|
+
* `present`/`presentRoute` register here; `presentDetached` (AccountDialog) does
|
|
96
|
+
* NOT, so the base-sheet navigation logic never treats the account modal as a
|
|
97
|
+
* navigable base. Entries self-remove when their surface is dismissed.
|
|
98
|
+
*/
|
|
99
|
+
const activeRouteSurfaces = [];
|
|
100
|
+
function presentInternal(route, props, opts, track) {
|
|
101
|
+
const navStack = (0, _surfaceNavStack.createSurfaceNavStack)(route, props);
|
|
102
|
+
const config = (0, _surfaceRegistry.getSurfaceConfig)(route, props);
|
|
103
|
+
const bloomOpts = {
|
|
104
|
+
label: route,
|
|
105
|
+
...bloomOptionsFor(config),
|
|
106
|
+
...opts
|
|
107
|
+
};
|
|
108
|
+
const result = _surfaces.surfaces.present(surface => /*#__PURE__*/(0, _react.createElement)(_SurfaceScreen.default, {
|
|
109
|
+
navStack,
|
|
110
|
+
surface,
|
|
111
|
+
presentation: config.presentation
|
|
112
|
+
}), bloomOpts);
|
|
113
|
+
const instance = {
|
|
114
|
+
route,
|
|
115
|
+
presentation: config.presentation,
|
|
116
|
+
navigate: (nextRoute, nextProps) => navStack.navigate(nextRoute, nextProps),
|
|
117
|
+
replace: (nextRoute, nextProps) => navStack.replace(nextRoute, nextProps),
|
|
118
|
+
goBack: () => navStack.goBack(),
|
|
119
|
+
canGoBack: () => navStack.canGoBack(),
|
|
120
|
+
setStep: step => navStack.setStep(step),
|
|
121
|
+
dismiss: dismissResult => navStack.requestDismiss(dismissResult),
|
|
122
|
+
result
|
|
123
|
+
};
|
|
124
|
+
if (track) {
|
|
125
|
+
const tracked = {
|
|
126
|
+
route: instance.route,
|
|
127
|
+
presentation: instance.presentation,
|
|
128
|
+
navigate: instance.navigate,
|
|
129
|
+
goBack: instance.goBack,
|
|
130
|
+
dismiss: () => instance.dismiss()
|
|
131
|
+
};
|
|
132
|
+
activeRouteSurfaces.push(tracked);
|
|
133
|
+
result.finally(() => {
|
|
134
|
+
const index = activeRouteSurfaces.indexOf(tracked);
|
|
135
|
+
if (index >= 0) activeRouteSurfaces.splice(index, 1);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return instance;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Present a NEW route surface on top of the stack (the DEPTH axis). Resolves with
|
|
143
|
+
* the value the surface is dismissed with. Registered in the route-surface stack.
|
|
144
|
+
*/
|
|
145
|
+
function present(route, props, opts) {
|
|
146
|
+
return presentInternal(route, props ?? {}, opts, true);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Present a surface that is NOT part of the `showBottomSheet` base-navigation
|
|
151
|
+
* lineage (the AccountDialog modal). Otherwise identical to {@link present}.
|
|
152
|
+
*/
|
|
153
|
+
function presentDetached(route, props, opts) {
|
|
154
|
+
return presentInternal(route, props ?? {}, opts, false);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Untyped present for the adapter, the nav helpers, and the `SurfaceScreen`
|
|
159
|
+
* binding (where the route is a runtime value and its props are already erased).
|
|
160
|
+
*/
|
|
161
|
+
function presentRoute(route, props) {
|
|
162
|
+
return presentInternal(route, props ?? {}, undefined, true);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** The top-most active route surface, or `undefined` when none are open. */
|
|
166
|
+
function topRouteSurface() {
|
|
167
|
+
return activeRouteSurfaces[activeRouteSurfaces.length - 1];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Dismiss every active route surface (the whole `showBottomSheet` session). The
|
|
172
|
+
* AccountDialog is untracked, so it is untouched. Iterates a snapshot because
|
|
173
|
+
* `dismiss` mutates `activeRouteSurfaces` asynchronously as surfaces settle.
|
|
174
|
+
*/
|
|
175
|
+
function closeAllRouteSurfaces() {
|
|
176
|
+
for (const instance of [...activeRouteSurfaces].reverse()) instance.dismiss();
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Drill in from a screen: navigate WITHIN the current surface when the target's
|
|
181
|
+
* presentation matches, else present the target as a NEW surface on top (so a
|
|
182
|
+
* sheet screen opening the full-bleed picker gets the right chrome).
|
|
183
|
+
*/
|
|
184
|
+
function navigateWithinOrPresent(currentPresentation, navStack, route, props) {
|
|
185
|
+
const nextProps = props ?? {};
|
|
186
|
+
if ((0, _surfaceRegistry.getSurfacePresentation)(route, nextProps) === currentPresentation) {
|
|
187
|
+
navStack.navigate(route, nextProps);
|
|
188
|
+
} else {
|
|
189
|
+
presentRoute(route, nextProps);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/** Replace variant of {@link navigateWithinOrPresent}. */
|
|
194
|
+
function replaceWithinOrPresent(currentPresentation, navStack, route, props) {
|
|
195
|
+
const nextProps = props ?? {};
|
|
196
|
+
if ((0, _surfaceRegistry.getSurfacePresentation)(route, nextProps) === currentPresentation) {
|
|
197
|
+
navStack.replace(route, nextProps);
|
|
198
|
+
} else {
|
|
199
|
+
presentRoute(route, nextProps);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* The SDK's imperative surface API (a module singleton). `present` is the typed
|
|
205
|
+
* route presenter; `dismissAll` unwinds the whole session. Not yet exported from
|
|
206
|
+
* the package root — the public `surfaces`/`useSurfaces` API lands in a later
|
|
207
|
+
* phase; for P1 the internal adapters (`showBottomSheet`, `openAccountDialog`)
|
|
208
|
+
* are the only public entry points.
|
|
209
|
+
*/
|
|
210
|
+
const surfaces = exports.surfaces = {
|
|
211
|
+
present: (route, props, opts) => present(route, props, opts).result,
|
|
212
|
+
dismissAll: closeAllRouteSurfaces
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
/** Hook form of {@link surfaces} (stable singleton). */
|
|
216
|
+
function useSurfaces() {
|
|
217
|
+
return surfaces;
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=surfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_surfaces","_SurfaceScreen","_interopRequireDefault","_surfaceRegistry","_surfaceNavStack","e","__esModule","default","SHEET_PLACEMENT","base","md","FULLSCREEN_SURFACE_STYLE","backgroundColor","overflow","bloomOptionsFor","config","presentation","placement","contentPadding","maxWidth","maxHeightRatio","dismissOnBackdrop","style","panelStyle","activeRouteSurfaces","presentInternal","route","props","opts","track","navStack","createSurfaceNavStack","getSurfaceConfig","bloomOpts","label","result","bloomSurfaces","present","surface","createElement","SurfaceScreen","instance","navigate","nextRoute","nextProps","replace","goBack","canGoBack","setStep","step","dismiss","dismissResult","requestDismiss","tracked","push","finally","index","indexOf","splice","presentDetached","presentRoute","undefined","topRouteSurface","length","closeAllRouteSurfaces","reverse","navigateWithinOrPresent","currentPresentation","getSurfacePresentation","replaceWithinOrPresent","surfaces","exports","dismissAll","useSurfaces"],"sourceRoot":"../../../../src","sources":["ui/navigation/surfaces.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,gBAAA,GAAAJ,OAAA;AAQA,IAAAK,gBAAA,GAAAL,OAAA;AAAgF,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhF;A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AC1C,KAAK,EAAEkB,SAAS,CAAC,KAAKuB,mBAAmB,EAAE;IACpErC,QAAQ,CAACY,QAAQ,CAAChB,KAAK,EAAEkB,SAAS,CAAC;EACrC,CAAC,MAAM;IACLgB,YAAY,CAAClC,KAAK,EAAEkB,SAAS,CAAC;EAChC;AACF;;AAEA;AACO,SAASyB,sBAAsBA,CACpCF,mBAAwC,EACxCrC,QAAyB,EACzBJ,KAAgB,EAChBC,KAA+B,EACzB;EACN,MAAMiB,SAAS,GAAGjB,KAAK,IAAI,CAAC,CAAC;EAC7B,IAAI,IAAAyC,uCAAsB,EAAC1C,KAAK,EAAEkB,SAAS,CAAC,KAAKuB,mBAAmB,EAAE;IACpErC,QAAQ,CAACe,OAAO,CAACnB,KAAK,EAAEkB,SAAS,CAAC;EACpC,CAAC,MAAM;IACLgB,YAAY,CAAClC,KAAK,EAAEkB,SAAS,CAAC;EAChC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM0B,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG;EACtBjC,OAAO,EAAEA,CAAsBX,KAAQ,EAAEC,KAAuB,EAAEC,IAAqB,KACrFS,OAAO,CAACX,KAAK,EAAEC,KAAK,EAAEC,IAAI,CAAC,CAACO,MAAM;EACpCqC,UAAU,EAAER;AACd,CAAU;;AAEV;AACO,SAASS,WAAWA,CAAA,EAAoB;EAC7C,OAAOH,QAAQ;AACjB","ignoreList":[]}
|
|
@@ -1166,7 +1166,13 @@ const FileManagementScreen = ({
|
|
|
1166
1166
|
// this is pure layout: the top chrome (header / controls / search) plus a
|
|
1167
1167
|
// photo grid of shimmering tiles sized with the same 3-per-row geometry the
|
|
1168
1168
|
// real photo grid uses. No hand-rolled `Animated` shimmer.
|
|
1169
|
-
|
|
1169
|
+
//
|
|
1170
|
+
// The image-only picker owns its OWN loading skeleton (rendered by
|
|
1171
|
+
// `PhotoPickerView` when its photo list is still loading), so it inherits the
|
|
1172
|
+
// picker's placement-aware container width / columns / tile size and the
|
|
1173
|
+
// Dialog-vs-bottom-sheet sizing. Skipping the browse chrome here is what keeps
|
|
1174
|
+
// the picker from flashing the wrong (file-manager) skeleton inside the Dialog.
|
|
1175
|
+
if (loading && !isImageOnlyPicker) {
|
|
1170
1176
|
const GRID_PADDING = 10;
|
|
1171
1177
|
const TILE_GAP = 4;
|
|
1172
1178
|
const GRID_COLUMNS = 3;
|
|
@@ -1272,6 +1278,7 @@ const FileManagementScreen = ({
|
|
|
1272
1278
|
uploadProgress: uploadProgress,
|
|
1273
1279
|
hasMore: paging.hasMore,
|
|
1274
1280
|
loadingMore: paging.loadingMore,
|
|
1281
|
+
loading: loading,
|
|
1275
1282
|
reduceMotion: reduceMotion,
|
|
1276
1283
|
getThumbUrl: thumbSourceFor,
|
|
1277
1284
|
primaryColor: colors.primary,
|