@niibase/bottom-sheet-manager 1.2.0 → 1.4.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/README.md +414 -69
- package/lib/commonjs/events.js +100 -15
- package/lib/commonjs/events.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager.js +153 -35
- package/lib/commonjs/manager.js.map +1 -1
- package/lib/commonjs/provider.js +92 -54
- package/lib/commonjs/provider.js.map +1 -1
- package/lib/commonjs/router/index.js +80 -21
- package/lib/commonjs/router/index.js.map +1 -1
- package/lib/commonjs/router/router.js +137 -12
- package/lib/commonjs/router/router.js.map +1 -1
- package/lib/commonjs/router/view.js +93 -126
- package/lib/commonjs/router/view.js.map +1 -1
- package/lib/commonjs/sheet.js +122 -98
- package/lib/commonjs/sheet.js.map +1 -1
- package/lib/module/events.js +100 -15
- package/lib/module/events.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager.js +154 -35
- package/lib/module/manager.js.map +1 -1
- package/lib/module/provider.js +87 -50
- package/lib/module/provider.js.map +1 -1
- package/lib/module/router/index.js +66 -19
- package/lib/module/router/index.js.map +1 -1
- package/lib/module/router/router.js +135 -11
- package/lib/module/router/router.js.map +1 -1
- package/lib/module/router/view.js +92 -126
- package/lib/module/router/view.js.map +1 -1
- package/lib/module/sheet.js +124 -100
- package/lib/module/sheet.js.map +1 -1
- package/lib/typescript/events.d.ts +46 -12
- package/lib/typescript/events.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/manager.d.ts +73 -7
- package/lib/typescript/manager.d.ts.map +1 -1
- package/lib/typescript/provider.d.ts +22 -16
- package/lib/typescript/provider.d.ts.map +1 -1
- package/lib/typescript/router/index.d.ts +47 -17
- package/lib/typescript/router/index.d.ts.map +1 -1
- package/lib/typescript/router/router.d.ts +44 -5
- package/lib/typescript/router/router.d.ts.map +1 -1
- package/lib/typescript/router/types.d.ts +142 -32
- package/lib/typescript/router/types.d.ts.map +1 -1
- package/lib/typescript/router/view.d.ts +3 -3
- package/lib/typescript/router/view.d.ts.map +1 -1
- package/lib/typescript/sheet.d.ts +1 -1
- package/lib/typescript/sheet.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +52 -21
- package/lib/typescript/types.d.ts.map +1 -1
- package/package.json +14 -15
- package/src/events.ts +118 -27
- package/src/index.ts +2 -1
- package/src/manager.ts +209 -42
- package/src/provider.tsx +144 -71
- package/src/router/index.tsx +77 -33
- package/src/router/router.ts +188 -15
- package/src/router/types.ts +172 -57
- package/src/router/view.tsx +111 -213
- package/src/sheet.tsx +192 -124
- package/src/types.ts +51 -24
|
@@ -3,28 +3,67 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.BottomSheetActions = void 0;
|
|
7
|
-
exports.BottomSheetRouter = BottomSheetRouter;
|
|
6
|
+
exports.useBottomSheetNavigation = exports.BottomSheetRouter = exports.BottomSheetActions = void 0;
|
|
8
7
|
var _native = require("@react-navigation/native");
|
|
9
8
|
var _nonSecure = require("nanoid/non-secure");
|
|
10
9
|
const BottomSheetActions = exports.BottomSheetActions = {
|
|
11
10
|
..._native.StackActions,
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Snap the bottom sheet to a specific index.
|
|
13
|
+
*/
|
|
14
|
+
snapTo: index => ({
|
|
15
|
+
type: "SNAP_TO",
|
|
16
|
+
index
|
|
17
|
+
}),
|
|
18
|
+
/**
|
|
19
|
+
* Dismiss the current bottom sheet.
|
|
20
|
+
*/
|
|
21
|
+
dismiss: () => ({
|
|
22
|
+
type: "DISMISS"
|
|
23
|
+
}),
|
|
24
|
+
/**
|
|
25
|
+
* Remove the sheet from navigation state after dismiss animation completes.
|
|
26
|
+
*/
|
|
27
|
+
remove: () => ({
|
|
28
|
+
type: "REMOVE"
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Ensures the base route (first screen) exists in the navigation state.
|
|
34
|
+
* This is important because the first screen is the main content,
|
|
35
|
+
* and subsequent screens are rendered as bottom sheets.
|
|
36
|
+
*/
|
|
37
|
+
const ensureBaseRoute = (state, baseRouteName, routeParamList) => {
|
|
38
|
+
if (!baseRouteName) {
|
|
39
|
+
return state;
|
|
40
|
+
}
|
|
41
|
+
const hasBaseRoute = state.routes.some(r => r.name === baseRouteName);
|
|
42
|
+
if (!hasBaseRoute) {
|
|
43
|
+
const baseRoute = {
|
|
44
|
+
key: `${baseRouteName}-${(0, _nonSecure.nanoid)()}`,
|
|
45
|
+
name: baseRouteName,
|
|
46
|
+
params: routeParamList?.[baseRouteName]
|
|
47
|
+
};
|
|
13
48
|
return {
|
|
14
|
-
|
|
15
|
-
index
|
|
49
|
+
...state,
|
|
50
|
+
index: state.routes.length,
|
|
51
|
+
routes: [baseRoute, ...state.routes]
|
|
16
52
|
};
|
|
17
53
|
}
|
|
54
|
+
return state;
|
|
18
55
|
};
|
|
19
|
-
|
|
56
|
+
const BottomSheetRouter = routerOptions => {
|
|
20
57
|
const baseRouter = (0, _native.StackRouter)(routerOptions);
|
|
21
58
|
return {
|
|
22
59
|
...baseRouter,
|
|
23
60
|
type: "bottom-sheet",
|
|
24
61
|
getInitialState(options) {
|
|
25
62
|
const state = baseRouter.getInitialState(options);
|
|
63
|
+
const baseRouteName = routerOptions.initialRouteName ?? options.routeNames[0];
|
|
64
|
+
const stateWithBaseRoute = ensureBaseRoute(state, baseRouteName, options.routeParamList);
|
|
26
65
|
return {
|
|
27
|
-
...
|
|
66
|
+
...stateWithBaseRoute,
|
|
28
67
|
stale: false,
|
|
29
68
|
type: "bottom-sheet",
|
|
30
69
|
key: `bottom-sheet-${(0, _nonSecure.nanoid)()}`
|
|
@@ -34,15 +73,76 @@ function BottomSheetRouter(routerOptions) {
|
|
|
34
73
|
switch (action.type) {
|
|
35
74
|
case "SNAP_TO":
|
|
36
75
|
{
|
|
37
|
-
const
|
|
76
|
+
const routeIndex = action.target === state.key && action.source ? state.routes.findIndex(r => r.key === action.source) : state.index;
|
|
38
77
|
return {
|
|
39
78
|
...state,
|
|
40
|
-
routes: state.routes.map((route, i) => i ===
|
|
79
|
+
routes: state.routes.map((route, i) => i === routeIndex ? {
|
|
41
80
|
...route,
|
|
42
|
-
snapToIndex: action.index
|
|
81
|
+
snapToIndex: action.index,
|
|
82
|
+
snapToKey: (route.snapToKey ?? 0) + 1
|
|
43
83
|
} : route)
|
|
44
84
|
};
|
|
45
85
|
}
|
|
86
|
+
case "GO_BACK":
|
|
87
|
+
case "DISMISS":
|
|
88
|
+
{
|
|
89
|
+
return this.getStateForAction(state, _native.StackActions.pop(1), options);
|
|
90
|
+
}
|
|
91
|
+
case "POP":
|
|
92
|
+
{
|
|
93
|
+
// Only base screen remains - let parent navigator handle it
|
|
94
|
+
if (state.routes.length <= 1) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const count = "payload" in action && typeof action.payload?.count === "number" ? action.payload.count : 1;
|
|
98
|
+
|
|
99
|
+
// Calculate how many routes we can actually pop (don't pop base screen)
|
|
100
|
+
const maxPopCount = state.routes.length - 1;
|
|
101
|
+
const actualCount = Math.min(count, maxPopCount);
|
|
102
|
+
|
|
103
|
+
// Base screen - let parent navigator handle it
|
|
104
|
+
if (actualCount <= 0) {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Target index is the route we want to stay on (land on after pop)
|
|
109
|
+
// closingIndex is the first route to be dismissed (the one after target)
|
|
110
|
+
const targetIndex = state.routes.length - 1 - actualCount;
|
|
111
|
+
const closingIndex = targetIndex + 1;
|
|
112
|
+
|
|
113
|
+
// Mark only the bottom-most route to pop as closing
|
|
114
|
+
// The sheet's dismiss() will handle dismissing sheets above it first
|
|
115
|
+
return {
|
|
116
|
+
...state,
|
|
117
|
+
index: closingIndex,
|
|
118
|
+
routes: state.routes.map((route, i) => i === closingIndex ? {
|
|
119
|
+
...route,
|
|
120
|
+
closing: true
|
|
121
|
+
} : route)
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
case "POP_TO_TOP":
|
|
125
|
+
{
|
|
126
|
+
const popCount = state.routes.length - 1;
|
|
127
|
+
return this.getStateForAction(state, _native.StackActions.pop(popCount), options);
|
|
128
|
+
}
|
|
129
|
+
case "REMOVE":
|
|
130
|
+
{
|
|
131
|
+
// Actually remove the closing route and all routes above it
|
|
132
|
+
const routeKey = action.source;
|
|
133
|
+
const routeIndex = routeKey ? state.routes.findIndex(r => r.key === routeKey) : state.routes.findIndex(r => r.closing);
|
|
134
|
+
if (routeIndex === -1) {
|
|
135
|
+
return state;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Remove the route and all routes above it (they were dismissed together)
|
|
139
|
+
const routes = state.routes.filter((_, i) => i < routeIndex);
|
|
140
|
+
return {
|
|
141
|
+
...state,
|
|
142
|
+
index: Math.min(state.index, routes.length - 1),
|
|
143
|
+
routes
|
|
144
|
+
};
|
|
145
|
+
}
|
|
46
146
|
default:
|
|
47
147
|
return baseRouter.getStateForAction(state, action, options);
|
|
48
148
|
}
|
|
@@ -60,13 +160,38 @@ function BottomSheetRouter(routerOptions) {
|
|
|
60
160
|
routeParamList,
|
|
61
161
|
routeGetIdList
|
|
62
162
|
});
|
|
163
|
+
const baseRouteName = routerOptions.initialRouteName ?? routeNames[0];
|
|
164
|
+
const stateWithBaseRoute = ensureBaseRoute(state, baseRouteName, routeParamList);
|
|
63
165
|
return {
|
|
64
|
-
...
|
|
166
|
+
...stateWithBaseRoute,
|
|
65
167
|
type: "bottom-sheet",
|
|
66
168
|
key: `bottom-sheet-${(0, _nonSecure.nanoid)()}`
|
|
67
169
|
};
|
|
68
170
|
},
|
|
69
171
|
actionCreators: BottomSheetActions
|
|
70
172
|
};
|
|
71
|
-
}
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Hook to access BottomSheet navigation with the snapTo helper.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```tsx
|
|
180
|
+
* function MySheet() {
|
|
181
|
+
* const navigation = useBottomSheetNavigation();
|
|
182
|
+
*
|
|
183
|
+
* // Snap to a specific index
|
|
184
|
+
* const handleExpand = () => {
|
|
185
|
+
* navigation.snapTo(1); // Snap to second index
|
|
186
|
+
* };
|
|
187
|
+
*
|
|
188
|
+
* return (
|
|
189
|
+
* <Button title="Expand" onPress={handleExpand} />
|
|
190
|
+
* );
|
|
191
|
+
* }
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
exports.BottomSheetRouter = BottomSheetRouter;
|
|
195
|
+
const useBottomSheetNavigation = () => (0, _native.useNavigation)();
|
|
196
|
+
exports.useBottomSheetNavigation = useBottomSheetNavigation;
|
|
72
197
|
//# sourceMappingURL=router.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_native","require","_nonSecure","BottomSheetActions","exports","StackActions","snapTo","index","type","BottomSheetRouter","routerOptions","baseRouter","StackRouter","getInitialState","options","
|
|
1
|
+
{"version":3,"names":["_native","require","_nonSecure","BottomSheetActions","exports","StackActions","snapTo","index","type","dismiss","remove","ensureBaseRoute","state","baseRouteName","routeParamList","hasBaseRoute","routes","some","r","name","baseRoute","key","nanoid","params","length","BottomSheetRouter","routerOptions","baseRouter","StackRouter","getInitialState","options","initialRouteName","routeNames","stateWithBaseRoute","stale","getStateForAction","action","routeIndex","target","source","findIndex","map","route","i","snapToIndex","snapToKey","pop","count","payload","maxPopCount","actualCount","Math","min","targetIndex","closingIndex","closing","popCount","routeKey","filter","_","getRehydratedState","partialState","routeGetIdList","actionCreators","useBottomSheetNavigation","useNavigation"],"sourceRoot":"../../../src","sources":["router/router.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAUA,I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AC;IACL,CAAC;IAEDyC,cAAc,EAAE5D;EACpB,CAAC;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlBAC,OAAA,CAAAqB,iBAAA,GAAAA,iBAAA;AAmBO,MAAMuC,wBAAwB,GAAGA,CAAA,KAGpC,IAAAC,qBAAa,EAA+B,CAAC;AAAC7D,OAAA,CAAA4D,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -4,177 +4,144 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BottomSheetView = BottomSheetView;
|
|
7
|
-
var
|
|
7
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
8
8
|
var _native = require("@react-navigation/native");
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
10
|
+
var _router = require("./router");
|
|
11
|
+
var _sheet = _interopRequireDefault(require("../sheet"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
14
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
-
function
|
|
16
|
-
index,
|
|
17
|
-
navigation,
|
|
18
|
-
clickThrough,
|
|
19
|
-
iosModalSheetTypeOfAnimation,
|
|
20
|
-
opacity,
|
|
15
|
+
function BottomSheetScreen({
|
|
21
16
|
children,
|
|
17
|
+
navigation,
|
|
18
|
+
route,
|
|
22
19
|
...props
|
|
23
20
|
}) {
|
|
24
21
|
const ref = React.useRef(null);
|
|
25
|
-
const
|
|
22
|
+
const lastSnapIndexRef = React.useRef(route.snapToIndex ?? props.index ?? 0);
|
|
26
23
|
|
|
27
|
-
//
|
|
28
|
-
React.useEffect(() => {
|
|
29
|
-
ref.current?.present();
|
|
30
|
-
}, []);
|
|
31
|
-
const isMounted = React.useRef(true);
|
|
24
|
+
// Handle route closing state
|
|
32
25
|
React.useEffect(() => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
}, []);
|
|
26
|
+
if (route.closing) {
|
|
27
|
+
ref.current?.close();
|
|
28
|
+
}
|
|
29
|
+
}, [route.closing]);
|
|
30
|
+
|
|
31
|
+
// Handle snap point changes from navigation actions
|
|
37
32
|
React.useEffect(() => {
|
|
38
|
-
if (
|
|
39
|
-
ref.current?.snapToIndex(
|
|
33
|
+
if (route.snapToIndex != null && route.snapToIndex !== lastSnapIndexRef.current) {
|
|
34
|
+
ref.current?.snapToIndex(route.snapToIndex);
|
|
35
|
+
lastSnapIndexRef.current = route.snapToIndex;
|
|
40
36
|
}
|
|
41
|
-
}, [
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
}, [route.snapToIndex, route.snapToKey]);
|
|
38
|
+
const handleChange = React.useCallback((newIndex, position, type) => {
|
|
39
|
+
navigation.emit({
|
|
40
|
+
type: "sheetOnChange",
|
|
41
|
+
target: route.key,
|
|
42
|
+
data: {
|
|
43
|
+
index: newIndex,
|
|
44
|
+
position,
|
|
45
|
+
type
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const currentIndex = lastSnapIndexRef.current;
|
|
49
|
+
lastSnapIndexRef.current = newIndex;
|
|
45
50
|
if (newIndex >= 0 && newIndex !== currentIndex) {
|
|
46
|
-
navigation.snapTo(newIndex);
|
|
47
|
-
}
|
|
48
|
-
}, [navigation]);
|
|
49
|
-
const onDismiss = React.useCallback(() => {
|
|
50
|
-
// BottomSheetModal will call onDismiss on unmount, be we do not want that since
|
|
51
|
-
// we already popped the screen.
|
|
52
|
-
if (isMounted.current) {
|
|
53
|
-
navigation.goBack();
|
|
51
|
+
navigation.dispatch(_router.BottomSheetActions.snapTo(newIndex));
|
|
54
52
|
}
|
|
55
53
|
}, [navigation]);
|
|
56
|
-
return /*#__PURE__*/React.createElement(
|
|
54
|
+
return /*#__PURE__*/React.createElement(_sheet.default, _extends({
|
|
57
55
|
ref: ref,
|
|
58
|
-
|
|
59
|
-
onChange: onChange,
|
|
60
|
-
index: index,
|
|
61
|
-
backdropComponent: props => /*#__PURE__*/React.createElement(_bottomSheet.BottomSheetBackdrop, _extends({}, props, {
|
|
62
|
-
appearsOnIndex: 0,
|
|
63
|
-
disappearsOnIndex: -1,
|
|
64
|
-
enableTouchThrough: !!clickThrough,
|
|
65
|
-
opacity: opacity || 0.45
|
|
66
|
-
}))
|
|
56
|
+
onChange: handleChange
|
|
67
57
|
}, props), children);
|
|
68
58
|
}
|
|
69
|
-
const DEFAULT_SNAP_POINTS = ["66%"];
|
|
70
59
|
function BottomSheetView({
|
|
71
60
|
state,
|
|
61
|
+
navigation,
|
|
72
62
|
descriptors
|
|
73
63
|
}) {
|
|
74
64
|
const {
|
|
75
65
|
colors
|
|
76
66
|
} = (0, _native.useTheme)();
|
|
77
67
|
const {
|
|
78
|
-
|
|
68
|
+
bottom,
|
|
69
|
+
left,
|
|
70
|
+
right
|
|
79
71
|
} = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
80
72
|
const themeBackgroundStyle = React.useMemo(() => ({
|
|
73
|
+
borderCurve: "continuous",
|
|
81
74
|
backgroundColor: colors.card
|
|
82
75
|
}), [colors.card]);
|
|
83
76
|
const themeHandleIndicatorStyle = React.useMemo(() => ({
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
width: 50
|
|
77
|
+
borderCurve: "continuous",
|
|
78
|
+
backgroundColor: colors.border
|
|
87
79
|
}), [colors.border]);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
flex: 1,
|
|
97
|
-
transform: [{
|
|
98
|
-
scaleX: (0, _reactNativeReanimated.withSpring)((0, _reactNativeReanimated.interpolate)(isFullScreen.value, [0, 1], [1, 0.92]), {
|
|
99
|
-
damping: 15,
|
|
100
|
-
stiffness: 100
|
|
101
|
-
})
|
|
102
|
-
}, {
|
|
103
|
-
translateY: (0, _reactNativeReanimated.withSpring)((0, _reactNativeReanimated.interpolate)(isFullScreen.value, [0, 1], [0, top + 5]), {
|
|
104
|
-
damping: 15,
|
|
105
|
-
stiffness: 100
|
|
106
|
-
})
|
|
107
|
-
}]
|
|
108
|
-
}));
|
|
109
|
-
|
|
110
|
-
// Since background color is white, we need to set status bar to light
|
|
111
|
-
const setStatusBar = _reactNative.StatusBar.setBarStyle;
|
|
112
|
-
(0, _reactNativeReanimated.useAnimatedReaction)(() => isFullScreen.value, currentValue => {
|
|
113
|
-
"worklet";
|
|
114
|
-
|
|
115
|
-
if (currentValue > -1) {
|
|
116
|
-
(0, _reactNativeReanimated.runOnJS)(setStatusBar)(currentValue >= 0.5 ? "light-content" : "default");
|
|
117
|
-
}
|
|
118
|
-
}, []);
|
|
119
|
-
|
|
120
|
-
// Avoid rendering provider if we only have one screen.
|
|
121
|
-
const shouldRenderProvider = React.useRef(false);
|
|
122
|
-
shouldRenderProvider.current = shouldRenderProvider.current || state.routes.length > 1;
|
|
123
|
-
const firstRoute = state.routes[0];
|
|
124
|
-
if (!firstRoute) {
|
|
125
|
-
// no routes at all, probably shouldn't happen, but let's be defensive
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
const firstDescriptor = descriptors[firstRoute.key];
|
|
129
|
-
if (!firstDescriptor) {
|
|
130
|
-
// if we don't have a descriptor for the first route, bail out
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_reactNativeReanimated.default.View, {
|
|
134
|
-
style: colorStyle
|
|
135
|
-
}, /*#__PURE__*/React.createElement(_reactNativeReanimated.default.View, {
|
|
136
|
-
style: animatedStyle
|
|
137
|
-
}, firstDescriptor.render?.())), shouldRenderProvider.current && /*#__PURE__*/React.createElement(_bottomSheet.BottomSheetModalProvider, null, state.routes.slice(1).map(route => {
|
|
80
|
+
const defaultStyle = React.useMemo(() => ({
|
|
81
|
+
paddingBottom: bottom,
|
|
82
|
+
paddingLeft: left,
|
|
83
|
+
paddingRight: right
|
|
84
|
+
}), [bottom, left, right]);
|
|
85
|
+
const [baseRoute, ...sheetRoutes] = state.routes;
|
|
86
|
+
const baseDescriptor = baseRoute ? descriptors[baseRoute.key] : null;
|
|
87
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, baseDescriptor?.render(), sheetRoutes.map(route => {
|
|
138
88
|
const descriptor = descriptors[route.key];
|
|
139
89
|
if (!descriptor) return null;
|
|
140
90
|
const {
|
|
141
91
|
options,
|
|
142
|
-
navigation,
|
|
143
92
|
render
|
|
144
93
|
} = descriptor;
|
|
145
94
|
const {
|
|
146
|
-
index,
|
|
147
|
-
|
|
148
|
-
handleStyle,
|
|
95
|
+
index = 0,
|
|
96
|
+
style,
|
|
149
97
|
backgroundStyle,
|
|
150
98
|
handleIndicatorStyle,
|
|
151
|
-
|
|
152
|
-
...
|
|
99
|
+
handleStyle,
|
|
100
|
+
...props
|
|
153
101
|
} = options;
|
|
154
|
-
return /*#__PURE__*/React.createElement(
|
|
155
|
-
key: route.key
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
,
|
|
159
|
-
index: Math.min(route.snapToIndex ?? index ?? 0, !!snapPoints ? snapPoints.length - 1 : 0),
|
|
160
|
-
snapPoints: !snapPoints && !enableDynamicSizing ? DEFAULT_SNAP_POINTS : snapPoints,
|
|
161
|
-
onAnimate: (_, to) => {
|
|
162
|
-
// @ts-ignore TODO: Fix types
|
|
163
|
-
isFullScreen.value = ["%100", "100%"].includes(snapPoints?.[to]) ? 1 : 0;
|
|
164
|
-
},
|
|
165
|
-
animationConfigs: {
|
|
166
|
-
duration: 300,
|
|
167
|
-
easing: _reactNativeReanimated.Easing.bezier(0.25, 0.1, 0.25, 1)
|
|
168
|
-
},
|
|
169
|
-
topInset: top + 18,
|
|
102
|
+
return /*#__PURE__*/React.createElement(BottomSheetScreen, _extends({
|
|
103
|
+
key: route.key,
|
|
104
|
+
id: route.key,
|
|
105
|
+
route: route,
|
|
106
|
+
index: index,
|
|
170
107
|
navigation: navigation,
|
|
171
|
-
|
|
108
|
+
style: [defaultStyle, style],
|
|
172
109
|
backgroundStyle: [themeBackgroundStyle, backgroundStyle],
|
|
173
110
|
handleIndicatorStyle: [themeHandleIndicatorStyle, handleIndicatorStyle],
|
|
174
111
|
handleStyle: [themeBackgroundStyle, {
|
|
175
|
-
borderRadius:
|
|
176
|
-
}, handleStyle]
|
|
177
|
-
|
|
178
|
-
|
|
112
|
+
borderRadius: 24
|
|
113
|
+
}, handleStyle],
|
|
114
|
+
onClose: data => {
|
|
115
|
+
navigation.dispatch({
|
|
116
|
+
..._router.BottomSheetActions.remove(),
|
|
117
|
+
source: route.key
|
|
118
|
+
});
|
|
119
|
+
navigation.emit({
|
|
120
|
+
type: "sheetDismiss",
|
|
121
|
+
target: route.key,
|
|
122
|
+
data
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
onBeforeShow: data => {
|
|
126
|
+
navigation.emit({
|
|
127
|
+
type: "sheetPresent",
|
|
128
|
+
target: route.key,
|
|
129
|
+
data
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
onAnimate: (fromIndex, toIndex, fromPosition, toPosition) => {
|
|
133
|
+
navigation.emit({
|
|
134
|
+
type: "sheetOnAnimate",
|
|
135
|
+
target: route.key,
|
|
136
|
+
data: {
|
|
137
|
+
fromIndex,
|
|
138
|
+
toIndex,
|
|
139
|
+
fromPosition,
|
|
140
|
+
toPosition
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}, props), render());
|
|
145
|
+
}));
|
|
179
146
|
}
|
|
180
147
|
//# sourceMappingURL=view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_reactNativeSafeAreaContext","require","_native","React","_interopRequireWildcard","_router","_sheet","_interopRequireDefault","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","BottomSheetScreen","children","navigation","route","props","ref","useRef","lastSnapIndexRef","snapToIndex","index","useEffect","closing","current","close","snapToKey","handleChange","useCallback","newIndex","position","type","emit","target","key","data","currentIndex","dispatch","BottomSheetActions","snapTo","createElement","onChange","BottomSheetView","state","descriptors","colors","useTheme","bottom","left","right","useSafeAreaInsets","themeBackgroundStyle","useMemo","borderCurve","backgroundColor","card","themeHandleIndicatorStyle","border","defaultStyle","paddingBottom","paddingLeft","paddingRight","baseRoute","sheetRoutes","routes","baseDescriptor","Fragment","render","map","descriptor","options","style","backgroundStyle","handleIndicatorStyle","handleStyle","id","borderRadius","onClose","remove","source","onBeforeShow","onAnimate","fromIndex","toIndex","fromPosition","toPosition"],"sourceRoot":"../../../src","sources":["router/view.tsx"],"mappings":";;;;;;AAAA,IAAAA,2BAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AASA,IAAAI,OAAA,GAAAJ,OAAA;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