@idealyst/navigation 1.0.63 → 1.0.65
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idealyst/navigation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Cross-platform navigation library for React and React Native",
|
|
5
5
|
"readme": "README.md",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"publish:npm": "npm publish"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@idealyst/components": "^1.0.
|
|
42
|
-
"@idealyst/theme": "^1.0.
|
|
41
|
+
"@idealyst/components": "^1.0.65",
|
|
42
|
+
"@idealyst/theme": "^1.0.65",
|
|
43
43
|
"@react-navigation/bottom-tabs": "^7.0.0",
|
|
44
44
|
"@react-navigation/drawer": "^7.0.0",
|
|
45
45
|
"@react-navigation/native": "^7.0.0",
|
|
@@ -5,7 +5,6 @@ import { DatePickerExamples } from "../../../datepicker/src/examples";
|
|
|
5
5
|
import { Button, Divider, Screen, Text, View } from "../../../components/src";
|
|
6
6
|
import { useNavigator } from "../context";
|
|
7
7
|
import { UnistylesRuntime } from 'react-native-unistyles';
|
|
8
|
-
import { GeneralLayout } from '../layouts/GeneralLayout';
|
|
9
8
|
import { NavigatorParam, RouteParam } from '../routing';
|
|
10
9
|
import { getNextTheme, getThemeDisplayName, isHighContrastTheme } from './unistyles';
|
|
11
10
|
|
|
@@ -238,32 +237,6 @@ const HomeScreen = () => {
|
|
|
238
237
|
)
|
|
239
238
|
};
|
|
240
239
|
|
|
241
|
-
const WrappedGeneralLayout = (props: any) => {
|
|
242
|
-
|
|
243
|
-
const navigator = useNavigator();
|
|
244
|
-
|
|
245
|
-
return (
|
|
246
|
-
<GeneralLayout
|
|
247
|
-
header={{
|
|
248
|
-
content: <Text style={{ marginHorizontal: 'auto' }} color="inverse">Stack Router Demo App</Text>,
|
|
249
|
-
}}
|
|
250
|
-
sidebar={{
|
|
251
|
-
enabled: true,
|
|
252
|
-
collapsible: true,
|
|
253
|
-
position: 'left',
|
|
254
|
-
initiallyExpanded: false,
|
|
255
|
-
content: <Button onPress={() => {
|
|
256
|
-
navigator.navigate({
|
|
257
|
-
path: "/",
|
|
258
|
-
vars: {},
|
|
259
|
-
});
|
|
260
|
-
}}>Home</Button>,
|
|
261
|
-
}}
|
|
262
|
-
{...props}>
|
|
263
|
-
</GeneralLayout>
|
|
264
|
-
)
|
|
265
|
-
}
|
|
266
|
-
|
|
267
240
|
const StackRouter: NavigatorParam = {
|
|
268
241
|
path: "/",
|
|
269
242
|
type: 'navigator',
|
package/src/layouts/index.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export * from './GeneralLayout';
|
|
2
|
-
export * from './TabBarLayout';
|
|
3
1
|
export { DefaultTabLayout } from './DefaultTabLayout'
|
|
4
2
|
export { DefaultStackLayout } from './DefaultStackLayout'
|
|
5
3
|
export type { TabLayoutProps, StackLayoutProps, TabLayoutComponent, StackLayoutComponent } from '../routing/types'
|
|
@@ -13,7 +13,9 @@ import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
|
|
13
13
|
export const buildNavigator = (params: NavigatorParam, parentPath = '') => {
|
|
14
14
|
const NavigatorType = getNavigatorType(params);
|
|
15
15
|
return () => (
|
|
16
|
-
<NavigatorType.Navigator
|
|
16
|
+
<NavigatorType.Navigator options={{
|
|
17
|
+
headerShown: params.options?.headerShown
|
|
18
|
+
}}>
|
|
17
19
|
{params.routes.map((child) => buildScreen(child, NavigatorType))}
|
|
18
20
|
</NavigatorType.Navigator>
|
|
19
21
|
)
|