expo-router 4.0.0-preview.12 → 4.0.0-preview.14
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/assets/error.png +0 -0
- package/assets/file.png +0 -0
- package/assets/forward.png +0 -0
- package/assets/logotype.png +0 -0
- package/assets/pkg.png +0 -0
- package/assets/sitemap.png +0 -0
- package/build/ExpoRoot.js +2 -2
- package/build/ExpoRoot.js.map +1 -1
- package/build/exports.d.ts +1 -1
- package/build/exports.d.ts.map +1 -1
- package/build/exports.js +24 -2
- package/build/exports.js.map +1 -1
- package/build/global-state/router-store.d.ts.map +1 -1
- package/build/global-state/router-store.js +1 -2
- package/build/global-state/router-store.js.map +1 -1
- package/build/layouts/Drawer.d.ts +2 -142
- package/build/layouts/Drawer.d.ts.map +1 -1
- package/build/layouts/Drawer.js +8 -5
- package/build/layouts/Drawer.js.map +1 -1
- package/build/layouts/DrawerClient.d.ts +144 -0
- package/build/layouts/DrawerClient.d.ts.map +1 -0
- package/build/layouts/DrawerClient.js +10 -0
- package/build/layouts/DrawerClient.js.map +1 -0
- package/build/layouts/Stack.d.ts +2 -126
- package/build/layouts/Stack.d.ts.map +1 -1
- package/build/layouts/Stack.js +8 -6
- package/build/layouts/Stack.js.map +1 -1
- package/build/layouts/StackClient.d.ts +128 -0
- package/build/layouts/StackClient.d.ts.map +1 -0
- package/build/layouts/StackClient.js +10 -0
- package/build/layouts/StackClient.js.map +1 -0
- package/build/layouts/Tabs.d.ts +2 -134
- package/build/layouts/Tabs.d.ts.map +1 -1
- package/build/layouts/Tabs.js +5 -37
- package/build/layouts/Tabs.js.map +1 -1
- package/build/layouts/TabsClient.d.ts +136 -0
- package/build/layouts/TabsClient.d.ts.map +1 -0
- package/build/layouts/TabsClient.js +44 -0
- package/build/layouts/TabsClient.js.map +1 -0
- package/build/onboard/Tutorial.d.ts.map +1 -1
- package/build/onboard/Tutorial.js +140 -86
- package/build/onboard/Tutorial.js.map +1 -1
- package/build/renderRootComponent.d.ts.map +1 -1
- package/build/renderRootComponent.js +1 -2
- package/build/renderRootComponent.js.map +1 -1
- package/build/rsc/middleware.d.ts +1 -1
- package/build/rsc/middleware.d.ts.map +1 -1
- package/build/rsc/middleware.js +2 -1
- package/build/rsc/middleware.js.map +1 -1
- package/build/rsc/server.d.ts +3 -0
- package/build/rsc/server.d.ts.map +1 -1
- package/build/rsc/server.js +19 -1
- package/build/rsc/server.js.map +1 -1
- package/build/ui/TabContext.d.ts +3 -2
- package/build/ui/TabContext.d.ts.map +1 -1
- package/build/ui/TabContext.js.map +1 -1
- package/build/ui/TabList.d.ts +3 -3
- package/build/ui/TabList.js +2 -2
- package/build/ui/TabList.js.map +1 -1
- package/build/ui/TabSlot.d.ts +28 -14
- package/build/ui/TabSlot.d.ts.map +1 -1
- package/build/ui/TabSlot.js +9 -7
- package/build/ui/TabSlot.js.map +1 -1
- package/build/ui/TabTrigger.d.ts +22 -9
- package/build/ui/TabTrigger.d.ts.map +1 -1
- package/build/ui/TabTrigger.js +6 -4
- package/build/ui/TabTrigger.js.map +1 -1
- package/build/ui/Tabs.d.ts +16 -23
- package/build/ui/Tabs.d.ts.map +1 -1
- package/build/ui/Tabs.js +15 -10
- package/build/ui/Tabs.js.map +1 -1
- package/build/utils/splash.d.ts +6 -0
- package/build/utils/splash.d.ts.map +1 -0
- package/build/utils/splash.js +51 -0
- package/build/utils/splash.js.map +1 -0
- package/build/views/Sitemap.d.ts.map +1 -1
- package/build/views/Sitemap.js +93 -46
- package/build/views/Sitemap.js.map +1 -1
- package/build/views/Splash.d.ts +1 -1
- package/build/views/Splash.d.ts.map +1 -1
- package/build/views/Splash.js +3 -13
- package/build/views/Splash.js.map +1 -1
- package/build/views/Try.d.ts.map +1 -1
- package/build/views/Try.js +1 -1
- package/build/views/Try.js.map +1 -1
- package/package.json +8 -9
- package/rsc/headers.d.ts +3 -0
- package/rsc/headers.js +5 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports._internal_maybeHideAsync = exports._internal_preventAutoHideAsync = exports.preventAutoHideAsync = exports.hideAsync = exports.hide = void 0;
|
|
4
|
+
const expo_1 = require("expo");
|
|
5
|
+
const SplashModule = (0, expo_1.requireOptionalNativeModule)('ExpoSplashScreen');
|
|
6
|
+
let _initializedErrorHandler = false;
|
|
7
|
+
function hide() {
|
|
8
|
+
if (!SplashModule) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
SplashModule.hide();
|
|
12
|
+
}
|
|
13
|
+
exports.hide = hide;
|
|
14
|
+
async function hideAsync() {
|
|
15
|
+
hide();
|
|
16
|
+
}
|
|
17
|
+
exports.hideAsync = hideAsync;
|
|
18
|
+
async function preventAutoHideAsync() {
|
|
19
|
+
if (!SplashModule) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
return SplashModule.preventAutoHideAsync();
|
|
23
|
+
}
|
|
24
|
+
exports.preventAutoHideAsync = preventAutoHideAsync;
|
|
25
|
+
async function _internal_preventAutoHideAsync() {
|
|
26
|
+
if (!SplashModule) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
if (!_initializedErrorHandler) {
|
|
30
|
+
// Append error handling to ensure any uncaught exceptions result in the splash screen being hidden.
|
|
31
|
+
// This prevents the splash screen from floating over error screens.
|
|
32
|
+
if (ErrorUtils?.getGlobalHandler) {
|
|
33
|
+
const originalHandler = ErrorUtils.getGlobalHandler();
|
|
34
|
+
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
35
|
+
hide();
|
|
36
|
+
originalHandler(error, isFatal);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
_initializedErrorHandler = true;
|
|
40
|
+
}
|
|
41
|
+
return SplashModule.internalPreventAutoHideAsync();
|
|
42
|
+
}
|
|
43
|
+
exports._internal_preventAutoHideAsync = _internal_preventAutoHideAsync;
|
|
44
|
+
async function _internal_maybeHideAsync() {
|
|
45
|
+
if (!SplashModule) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return SplashModule.internalMaybeHideAsync();
|
|
49
|
+
}
|
|
50
|
+
exports._internal_maybeHideAsync = _internal_maybeHideAsync;
|
|
51
|
+
//# sourceMappingURL=splash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splash.js","sourceRoot":"","sources":["../../src/utils/splash.ts"],"names":[],"mappings":";;;AAAA,+BAAmD;AAEnD,MAAM,YAAY,GAAG,IAAA,kCAA2B,EAAC,kBAAkB,CAAC,CAAC;AAErE,IAAI,wBAAwB,GAAG,KAAK,CAAC;AAErC,SAAgB,IAAI;IAClB,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,YAAY,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAND,oBAMC;AAEM,KAAK,UAAU,SAAS;IAC7B,IAAI,EAAE,CAAC;AACT,CAAC;AAFD,8BAEC;AAEM,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO;KACR;IAED,OAAO,YAAY,CAAC,oBAAoB,EAAE,CAAC;AAC7C,CAAC;AAND,oDAMC;AAEM,KAAK,UAAU,8BAA8B;IAClD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,KAAK,CAAC;KACd;IAED,IAAI,CAAC,wBAAwB,EAAE;QAC7B,oGAAoG;QACpG,oEAAoE;QACpE,IAAI,UAAU,EAAE,gBAAgB,EAAE;YAChC,MAAM,eAAe,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;YACtD,UAAU,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;gBAC7C,IAAI,EAAE,CAAC;gBACP,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;SACJ;QAED,wBAAwB,GAAG,IAAI,CAAC;KACjC;IAED,OAAO,YAAY,CAAC,4BAA4B,EAAE,CAAC;AACrD,CAAC;AApBD,wEAoBC;AAEM,KAAK,UAAU,wBAAwB;IAC5C,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,YAAY,CAAC,sBAAsB,EAAE,CAAC;AAC/C,CAAC;AAND,4DAMC","sourcesContent":["import { requireOptionalNativeModule } from 'expo';\n\nconst SplashModule = requireOptionalNativeModule('ExpoSplashScreen');\n\nlet _initializedErrorHandler = false;\n\nexport function hide() {\n if (!SplashModule) {\n return;\n }\n\n SplashModule.hide();\n}\n\nexport async function hideAsync(): Promise<void> {\n hide();\n}\n\nexport async function preventAutoHideAsync() {\n if (!SplashModule) {\n return;\n }\n\n return SplashModule.preventAutoHideAsync();\n}\n\nexport async function _internal_preventAutoHideAsync(): Promise<boolean> {\n if (!SplashModule) {\n return false;\n }\n\n if (!_initializedErrorHandler) {\n // Append error handling to ensure any uncaught exceptions result in the splash screen being hidden.\n // This prevents the splash screen from floating over error screens.\n if (ErrorUtils?.getGlobalHandler) {\n const originalHandler = ErrorUtils.getGlobalHandler();\n ErrorUtils.setGlobalHandler((error, isFatal) => {\n hide();\n originalHandler(error, isFatal);\n });\n }\n\n _initializedErrorHandler = true;\n }\n\n return SplashModule.internalPreventAutoHideAsync();\n}\n\nexport async function _internal_maybeHideAsync() {\n if (!SplashModule) {\n return false;\n }\n\n return SplashModule.internalMaybeHideAsync();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sitemap.d.ts","sourceRoot":"","sources":["../../src/views/Sitemap.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Sitemap.d.ts","sourceRoot":"","sources":["../../src/views/Sitemap.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,wBAAgB,aAAa,IAAI,4BAA4B,CAiC5D;AAED,wBAAgB,OAAO,sBAStB"}
|
package/build/views/Sitemap.js
CHANGED
|
@@ -15,11 +15,10 @@ const imperative_api_1 = require("../imperative-api");
|
|
|
15
15
|
const Link_1 = require("../link/Link");
|
|
16
16
|
const matchers_1 = require("../matchers");
|
|
17
17
|
const statusbar_1 = require("../utils/statusbar");
|
|
18
|
-
const INDENT =
|
|
18
|
+
const INDENT = 20;
|
|
19
19
|
function getNavOptions() {
|
|
20
20
|
return {
|
|
21
21
|
title: 'sitemap',
|
|
22
|
-
headerShown: false,
|
|
23
22
|
presentation: 'modal',
|
|
24
23
|
headerLargeTitle: false,
|
|
25
24
|
headerTitleStyle: {
|
|
@@ -34,40 +33,36 @@ function getNavOptions() {
|
|
|
34
33
|
// @ts-expect-error: mistyped
|
|
35
34
|
borderBottomColor: '#323232',
|
|
36
35
|
},
|
|
36
|
+
header: () => {
|
|
37
|
+
const WrapperElement = react_native_1.Platform.OS === 'android' ? react_native_safe_area_context_1.SafeAreaView : react_native_1.View;
|
|
38
|
+
return (<WrapperElement style={styles.header}>
|
|
39
|
+
<react_native_1.View style={styles.headerContent}>
|
|
40
|
+
<react_native_1.View style={styles.headerIcon}>
|
|
41
|
+
<SitemapIcon />
|
|
42
|
+
</react_native_1.View>
|
|
43
|
+
<react_native_1.Text role="heading" aria-level={1} style={styles.title}>
|
|
44
|
+
Sitemap
|
|
45
|
+
</react_native_1.Text>
|
|
46
|
+
</react_native_1.View>
|
|
47
|
+
</WrapperElement>);
|
|
48
|
+
},
|
|
37
49
|
};
|
|
38
50
|
}
|
|
39
51
|
exports.getNavOptions = getNavOptions;
|
|
40
52
|
function Sitemap() {
|
|
41
|
-
const { top, bottom } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
|
|
42
|
-
const { width } = (0, react_native_1.useWindowDimensions)();
|
|
43
53
|
return (<react_native_1.View style={styles.container}>
|
|
44
54
|
{!statusbar_1.hasViewControllerBasedStatusBarAppearance && <react_native_1.StatusBar barStyle="light-content"/>}
|
|
45
|
-
<react_native_1.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
minWidth: Math.min(960, width * 0.9),
|
|
49
|
-
},
|
|
50
|
-
]}>
|
|
51
|
-
<react_native_1.ScrollView contentContainerStyle={[
|
|
52
|
-
styles.scroll,
|
|
53
|
-
{
|
|
54
|
-
paddingTop: top + 12,
|
|
55
|
-
paddingBottom: bottom + 12,
|
|
56
|
-
},
|
|
57
|
-
]} style={{ flex: 1 }}>
|
|
58
|
-
<FileSystemView />
|
|
59
|
-
</react_native_1.ScrollView>
|
|
60
|
-
</react_native_1.View>
|
|
55
|
+
<react_native_1.ScrollView contentContainerStyle={styles.scroll}>
|
|
56
|
+
<FileSystemView />
|
|
57
|
+
</react_native_1.ScrollView>
|
|
61
58
|
</react_native_1.View>);
|
|
62
59
|
}
|
|
63
60
|
exports.Sitemap = Sitemap;
|
|
64
61
|
function FileSystemView() {
|
|
65
62
|
const routes = (0, router_store_1.useExpoRouter)().getSortedRoutes();
|
|
66
|
-
return (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</react_native_1.View>))}
|
|
70
|
-
</>);
|
|
63
|
+
return routes.map((route) => (<react_native_1.View key={route.contextKey} style={styles.itemContainer}>
|
|
64
|
+
<FileItem route={route}/>
|
|
65
|
+
</react_native_1.View>));
|
|
71
66
|
}
|
|
72
67
|
function FileItem({ route, level = 0, parents = [], isInitial = false, }) {
|
|
73
68
|
const disabled = route.children.length > 0;
|
|
@@ -75,13 +70,13 @@ function FileItem({ route, level = 0, parents = [], isInitial = false, }) {
|
|
|
75
70
|
const href = react_1.default.useMemo(() => {
|
|
76
71
|
return ('/' +
|
|
77
72
|
segments
|
|
78
|
-
.map((
|
|
73
|
+
.map((segment) => {
|
|
79
74
|
// add an extra layer of entropy to the url for deep dynamic routes
|
|
80
|
-
if ((0, matchers_1.matchDeepDynamicRouteName)(
|
|
81
|
-
return
|
|
75
|
+
if ((0, matchers_1.matchDeepDynamicRouteName)(segment)) {
|
|
76
|
+
return segment + '/' + Date.now();
|
|
82
77
|
}
|
|
83
78
|
// index must be erased but groups can be preserved.
|
|
84
|
-
return
|
|
79
|
+
return segment === 'index' ? '' : segment;
|
|
85
80
|
})
|
|
86
81
|
.filter(Boolean)
|
|
87
82
|
.join('/'));
|
|
@@ -92,10 +87,10 @@ function FileItem({ route, level = 0, parents = [], isInitial = false, }) {
|
|
|
92
87
|
if (route.contextKey.match(/_layout\.[jt]sx?$/)) {
|
|
93
88
|
return segments[segments.length - 2] + '/' + segments[segments.length - 1];
|
|
94
89
|
}
|
|
95
|
-
const
|
|
90
|
+
const routeSegmentsCount = route.route.split('/').length;
|
|
96
91
|
// Join the segment count in reverse order
|
|
97
92
|
// This presents files without layout routes as children with all relevant segments.
|
|
98
|
-
return segments.slice(-
|
|
93
|
+
return segments.slice(-routeSegmentsCount).join('/');
|
|
99
94
|
}, [route]);
|
|
100
95
|
const info = isInitial ? 'Initial' : route.generated ? 'Virtual' : '';
|
|
101
96
|
return (<>
|
|
@@ -104,17 +99,17 @@ function FileItem({ route, level = 0, parents = [], isInitial = false, }) {
|
|
|
104
99
|
// Ensure the modal pops
|
|
105
100
|
imperative_api_1.router.back();
|
|
106
101
|
}
|
|
107
|
-
}}
|
|
102
|
+
}} disabled={disabled} asChild
|
|
108
103
|
// Ensure we replace the history so you can't go back to this page.
|
|
109
104
|
replace>
|
|
110
|
-
<Pressable_1.Pressable
|
|
105
|
+
<Pressable_1.Pressable>
|
|
111
106
|
{({ pressed, hovered }) => (<react_native_1.View style={[
|
|
112
107
|
styles.itemPressable,
|
|
113
108
|
{
|
|
114
109
|
paddingLeft: INDENT + level * INDENT,
|
|
115
|
-
backgroundColor: hovered ? '
|
|
110
|
+
backgroundColor: hovered ? '#202425' : 'transparent',
|
|
116
111
|
},
|
|
117
|
-
pressed && { backgroundColor: '#
|
|
112
|
+
pressed && { backgroundColor: '#26292b' },
|
|
118
113
|
disabled && { opacity: 0.4 },
|
|
119
114
|
]}>
|
|
120
115
|
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
@@ -141,27 +136,70 @@ function PkgIcon() {
|
|
|
141
136
|
function ForwardIcon() {
|
|
142
137
|
return <react_native_1.Image style={styles.image} source={require('expo-router/assets/forward.png')}/>;
|
|
143
138
|
}
|
|
139
|
+
function SitemapIcon() {
|
|
140
|
+
return <react_native_1.Image style={styles.image} source={require('expo-router/assets/sitemap.png')}/>;
|
|
141
|
+
}
|
|
144
142
|
const styles = react_native_1.StyleSheet.create({
|
|
145
143
|
container: {
|
|
146
144
|
backgroundColor: 'black',
|
|
147
145
|
flex: 1,
|
|
148
146
|
alignItems: 'stretch',
|
|
149
147
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
header: {
|
|
149
|
+
backgroundColor: '#151718',
|
|
150
|
+
paddingVertical: 16,
|
|
151
|
+
borderBottomWidth: 1,
|
|
152
|
+
borderColor: '#313538',
|
|
153
|
+
shadowColor: '#000',
|
|
154
|
+
shadowOffset: {
|
|
155
|
+
width: 0,
|
|
156
|
+
height: 3,
|
|
157
|
+
},
|
|
158
|
+
shadowOpacity: 0.33,
|
|
159
|
+
shadowRadius: 3,
|
|
160
|
+
elevation: 8,
|
|
161
|
+
},
|
|
162
|
+
headerContent: {
|
|
163
|
+
flexDirection: 'row',
|
|
164
|
+
alignItems: 'center',
|
|
165
|
+
gap: 14,
|
|
166
|
+
paddingHorizontal: '5%',
|
|
167
|
+
...react_native_1.Platform.select({
|
|
168
|
+
web: {
|
|
169
|
+
width: '100%',
|
|
170
|
+
maxWidth: 960,
|
|
171
|
+
marginHorizontal: 'auto',
|
|
172
|
+
},
|
|
173
|
+
}),
|
|
174
|
+
},
|
|
175
|
+
title: {
|
|
176
|
+
color: 'white',
|
|
177
|
+
fontSize: 28,
|
|
178
|
+
fontWeight: 'bold',
|
|
154
179
|
},
|
|
155
180
|
scroll: {
|
|
156
|
-
paddingHorizontal:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
181
|
+
paddingHorizontal: '5%',
|
|
182
|
+
paddingVertical: 16,
|
|
183
|
+
...react_native_1.Platform.select({
|
|
184
|
+
ios: {
|
|
185
|
+
paddingBottom: 24,
|
|
186
|
+
},
|
|
187
|
+
web: {
|
|
188
|
+
width: '100%',
|
|
189
|
+
maxWidth: 960,
|
|
190
|
+
marginHorizontal: 'auto',
|
|
191
|
+
paddingBottom: 24,
|
|
192
|
+
},
|
|
193
|
+
default: {
|
|
194
|
+
paddingBottom: 12,
|
|
195
|
+
},
|
|
196
|
+
}),
|
|
160
197
|
},
|
|
161
198
|
itemContainer: {
|
|
162
199
|
borderWidth: 1,
|
|
163
|
-
borderColor: '#
|
|
164
|
-
|
|
200
|
+
borderColor: '#313538',
|
|
201
|
+
backgroundColor: '#151718',
|
|
202
|
+
borderRadius: 12,
|
|
165
203
|
marginBottom: 12,
|
|
166
204
|
overflow: 'hidden',
|
|
167
205
|
},
|
|
@@ -179,6 +217,15 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
179
217
|
},
|
|
180
218
|
filename: { color: 'white', fontSize: 20, marginLeft: 12 },
|
|
181
219
|
virtual: { textAlign: 'right', color: 'white' },
|
|
182
|
-
image: { width: 24, height: 24, resizeMode: 'contain' },
|
|
220
|
+
image: { width: 24, height: 24, resizeMode: 'contain', opacity: 0.6 },
|
|
221
|
+
headerIcon: {
|
|
222
|
+
width: 40,
|
|
223
|
+
height: 40,
|
|
224
|
+
backgroundColor: '#202425',
|
|
225
|
+
borderRadius: 8,
|
|
226
|
+
flexDirection: 'row',
|
|
227
|
+
alignItems: 'center',
|
|
228
|
+
justifyContent: 'center',
|
|
229
|
+
},
|
|
183
230
|
});
|
|
184
231
|
//# sourceMappingURL=Sitemap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sitemap.js","sourceRoot":"","s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AAE,EAAE;IAC1D,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAC/C,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;CACxD,CAAC,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n'use client';\n\nimport { NativeStackNavigationOptions } from '@react-navigation/native-stack';\nimport React from 'react';\nimport {\n Image,\n StyleSheet,\n Text,\n View,\n ScrollView,\n Platform,\n StatusBar,\n useWindowDimensions,\n} from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Pressable } from './Pressable';\nimport { RouteNode } from '../Route';\nimport { useExpoRouter } from '../global-state/router-store';\nimport { router } from '../imperative-api';\nimport { Link } from '../link/Link';\nimport { matchDeepDynamicRouteName } from '../matchers';\nimport { hasViewControllerBasedStatusBarAppearance } from '../utils/statusbar';\n\nconst INDENT = 24;\n\nexport function getNavOptions(): NativeStackNavigationOptions {\n return {\n title: 'sitemap',\n headerShown: false,\n presentation: 'modal',\n headerLargeTitle: false,\n headerTitleStyle: {\n color: 'white',\n },\n headerTintColor: 'white',\n headerLargeTitleStyle: {\n color: 'white',\n },\n headerStyle: {\n backgroundColor: 'black',\n // @ts-expect-error: mistyped\n borderBottomColor: '#323232',\n },\n };\n}\n\nexport function Sitemap() {\n const { top, bottom } = useSafeAreaInsets();\n const { width } = useWindowDimensions();\n return (\n <View style={styles.container}>\n {!hasViewControllerBasedStatusBarAppearance && <StatusBar barStyle=\"light-content\" />}\n <View\n style={[\n styles.main,\n {\n minWidth: Math.min(960, width * 0.9),\n },\n ]}>\n <ScrollView\n contentContainerStyle={[\n styles.scroll,\n {\n paddingTop: top + 12,\n paddingBottom: bottom + 12,\n },\n ]}\n style={{ flex: 1 }}>\n <FileSystemView />\n </ScrollView>\n </View>\n </View>\n );\n}\n\nfunction FileSystemView() {\n const routes = useExpoRouter().getSortedRoutes();\n\n return (\n <>\n {routes.map((child) => (\n <View key={child.contextKey} style={styles.itemContainer}>\n <FileItem route={child} />\n </View>\n ))}\n </>\n );\n}\n\nfunction FileItem({\n route,\n level = 0,\n parents = [],\n isInitial = false,\n}: {\n route: RouteNode;\n level?: number;\n parents?: string[];\n isInitial?: boolean;\n}) {\n const disabled = route.children.length > 0;\n\n const segments = React.useMemo(\n () => [...parents, ...route.route.split('/')],\n [parents, route.route]\n );\n\n const href = React.useMemo(() => {\n return (\n '/' +\n segments\n .map((v) => {\n // add an extra layer of entropy to the url for deep dynamic routes\n if (matchDeepDynamicRouteName(v)) {\n return v + '/' + Date.now();\n }\n // index must be erased but groups can be preserved.\n return v === 'index' ? '' : v;\n })\n .filter(Boolean)\n .join('/')\n );\n }, [segments, route.route]);\n\n const filename = React.useMemo(() => {\n const segments = route.contextKey.split('/');\n // join last two segments for layout routes\n if (route.contextKey.match(/_layout\\.[jt]sx?$/)) {\n return segments[segments.length - 2] + '/' + segments[segments.length - 1];\n }\n\n const segmentCount = route.route.split('/').length;\n\n // Join the segment count in reverse order\n // This presents files without layout routes as children with all relevant segments.\n return segments.slice(-segmentCount).join('/');\n }, [route]);\n\n const info = isInitial ? 'Initial' : route.generated ? 'Virtual' : '';\n\n return (\n <>\n {!route.internal && (\n <Link\n accessibilityLabel={route.contextKey}\n href={href}\n onPress={() => {\n if (Platform.OS !== 'web' && router.canGoBack()) {\n // Ensure the modal pops\n router.back();\n }\n }}\n style={{ flex: 1, display: 'flex' }}\n disabled={disabled}\n asChild\n // Ensure we replace the history so you can't go back to this page.\n replace>\n <Pressable style={{ flex: 1 }}>\n {({ pressed, hovered }) => (\n <View\n style={[\n styles.itemPressable,\n {\n paddingLeft: INDENT + level * INDENT,\n backgroundColor: hovered ? 'rgba(255,255,255,0.1)' : 'transparent',\n },\n pressed && { backgroundColor: '#323232' },\n disabled && { opacity: 0.4 },\n ]}>\n <View style={{ flexDirection: 'row', alignItems: 'center' }}>\n {route.children.length ? <PkgIcon /> : <FileIcon />}\n <Text style={styles.filename}>{filename}</Text>\n </View>\n\n <View style={{ flexDirection: 'row', alignItems: 'center' }}>\n {!!info && (\n <Text style={[styles.virtual, !disabled && { marginRight: 8 }]}>{info}</Text>\n )}\n {!disabled && <ForwardIcon />}\n </View>\n </View>\n )}\n </Pressable>\n </Link>\n )}\n {route.children.map((child) => (\n <FileItem\n key={child.contextKey}\n route={child}\n isInitial={route.initialRouteName === child.route}\n parents={segments}\n level={level + (route.generated ? 0 : 1)}\n />\n ))}\n </>\n );\n}\n\nfunction FileIcon() {\n return <Image style={styles.image} source={require('expo-router/assets/file.png')} />;\n}\n\nfunction PkgIcon() {\n return <Image style={styles.image} source={require('expo-router/assets/pkg.png')} />;\n}\n\nfunction ForwardIcon() {\n return <Image style={styles.image} source={require('expo-router/assets/forward.png')} />;\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: 'black',\n flex: 1,\n alignItems: 'stretch',\n },\n main: {\n marginHorizontal: 'auto',\n flex: 1,\n\n alignItems: 'stretch',\n },\n scroll: {\n paddingHorizontal: 12,\n // flex: 1,\n // paddingTop: top + 12,\n alignItems: 'stretch',\n },\n itemContainer: {\n borderWidth: 1,\n borderColor: '#323232',\n borderRadius: 19,\n marginBottom: 12,\n overflow: 'hidden',\n },\n itemPressable: {\n paddingHorizontal: INDENT,\n paddingVertical: 16,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n ...Platform.select({\n web: {\n transitionDuration: '100ms',\n },\n }),\n },\n filename: { color: 'white', fontSize: 20, marginLeft: 12 },\n virtual: { textAlign: 'right', color: 'white' },\n image: { width: 24, height: 24, resizeMode: 'contain' },\n});\n"]}
|
|
1
|
+
{"version":3,"file":"Sitemap.js","sourceRoot":"","sources":["../../src/views/Sitemap.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,YAAY,CAAC;;;;;;;AAGb,kDAA0B;AAC1B,+CAA8F;AAC9F,mFAA8D;AAE9D,2CAAwC;AA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right © 2024 650 Industries.\n'use client';\n\nimport { NativeStackNavigationOptions } from '@react-navigation/native-stack';\nimport React from 'react';\nimport { Image, StyleSheet, Text, View, ScrollView, Platform, StatusBar } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { Pressable } from './Pressable';\nimport { RouteNode } from '../Route';\nimport { useExpoRouter } from '../global-state/router-store';\nimport { router } from '../imperative-api';\nimport { Link } from '../link/Link';\nimport { matchDeepDynamicRouteName } from '../matchers';\nimport { hasViewControllerBasedStatusBarAppearance } from '../utils/statusbar';\n\nconst INDENT = 20;\n\nexport function getNavOptions(): NativeStackNavigationOptions {\n return {\n title: 'sitemap',\n presentation: 'modal',\n headerLargeTitle: false,\n headerTitleStyle: {\n color: 'white',\n },\n headerTintColor: 'white',\n headerLargeTitleStyle: {\n color: 'white',\n },\n headerStyle: {\n backgroundColor: 'black',\n // @ts-expect-error: mistyped\n borderBottomColor: '#323232',\n },\n header: () => {\n const WrapperElement = Platform.OS === 'android' ? SafeAreaView : View;\n return (\n <WrapperElement style={styles.header}>\n <View style={styles.headerContent}>\n <View style={styles.headerIcon}>\n <SitemapIcon />\n </View>\n <Text role=\"heading\" aria-level={1} style={styles.title}>\n Sitemap\n </Text>\n </View>\n </WrapperElement>\n );\n },\n };\n}\n\nexport function Sitemap() {\n return (\n <View style={styles.container}>\n {!hasViewControllerBasedStatusBarAppearance && <StatusBar barStyle=\"light-content\" />}\n <ScrollView contentContainerStyle={styles.scroll}>\n <FileSystemView />\n </ScrollView>\n </View>\n );\n}\n\nfunction FileSystemView() {\n const routes = useExpoRouter().getSortedRoutes();\n return routes.map((route) => (\n <View key={route.contextKey} style={styles.itemContainer}>\n <FileItem route={route} />\n </View>\n ));\n}\n\nfunction FileItem({\n route,\n level = 0,\n parents = [],\n isInitial = false,\n}: {\n route: RouteNode;\n level?: number;\n parents?: string[];\n isInitial?: boolean;\n}) {\n const disabled = route.children.length > 0;\n\n const segments = React.useMemo(\n () => [...parents, ...route.route.split('/')],\n [parents, route.route]\n );\n\n const href = React.useMemo(() => {\n return (\n '/' +\n segments\n .map((segment) => {\n // add an extra layer of entropy to the url for deep dynamic routes\n if (matchDeepDynamicRouteName(segment)) {\n return segment + '/' + Date.now();\n }\n // index must be erased but groups can be preserved.\n return segment === 'index' ? '' : segment;\n })\n .filter(Boolean)\n .join('/')\n );\n }, [segments, route.route]);\n\n const filename = React.useMemo(() => {\n const segments = route.contextKey.split('/');\n // join last two segments for layout routes\n if (route.contextKey.match(/_layout\\.[jt]sx?$/)) {\n return segments[segments.length - 2] + '/' + segments[segments.length - 1];\n }\n\n const routeSegmentsCount = route.route.split('/').length;\n\n // Join the segment count in reverse order\n // This presents files without layout routes as children with all relevant segments.\n return segments.slice(-routeSegmentsCount).join('/');\n }, [route]);\n\n const info = isInitial ? 'Initial' : route.generated ? 'Virtual' : '';\n\n return (\n <>\n {!route.internal && (\n <Link\n accessibilityLabel={route.contextKey}\n href={href}\n onPress={() => {\n if (Platform.OS !== 'web' && router.canGoBack()) {\n // Ensure the modal pops\n router.back();\n }\n }}\n disabled={disabled}\n asChild\n // Ensure we replace the history so you can't go back to this page.\n replace>\n <Pressable>\n {({ pressed, hovered }) => (\n <View\n style={[\n styles.itemPressable,\n {\n paddingLeft: INDENT + level * INDENT,\n backgroundColor: hovered ? '#202425' : 'transparent',\n },\n pressed && { backgroundColor: '#26292b' },\n disabled && { opacity: 0.4 },\n ]}>\n <View style={{ flexDirection: 'row', alignItems: 'center' }}>\n {route.children.length ? <PkgIcon /> : <FileIcon />}\n <Text style={styles.filename}>{filename}</Text>\n </View>\n\n <View style={{ flexDirection: 'row', alignItems: 'center' }}>\n {!!info && (\n <Text style={[styles.virtual, !disabled && { marginRight: 8 }]}>{info}</Text>\n )}\n {!disabled && <ForwardIcon />}\n </View>\n </View>\n )}\n </Pressable>\n </Link>\n )}\n {route.children.map((child) => (\n <FileItem\n key={child.contextKey}\n route={child}\n isInitial={route.initialRouteName === child.route}\n parents={segments}\n level={level + (route.generated ? 0 : 1)}\n />\n ))}\n </>\n );\n}\n\nfunction FileIcon() {\n return <Image style={styles.image} source={require('expo-router/assets/file.png')} />;\n}\n\nfunction PkgIcon() {\n return <Image style={styles.image} source={require('expo-router/assets/pkg.png')} />;\n}\n\nfunction ForwardIcon() {\n return <Image style={styles.image} source={require('expo-router/assets/forward.png')} />;\n}\n\nfunction SitemapIcon() {\n return <Image style={styles.image} source={require('expo-router/assets/sitemap.png')} />;\n}\n\nconst styles = StyleSheet.create({\n container: {\n backgroundColor: 'black',\n flex: 1,\n alignItems: 'stretch',\n },\n header: {\n backgroundColor: '#151718',\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderColor: '#313538',\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 3,\n },\n shadowOpacity: 0.33,\n shadowRadius: 3,\n elevation: 8,\n },\n headerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 14,\n paddingHorizontal: '5%',\n ...Platform.select({\n web: {\n width: '100%',\n maxWidth: 960,\n marginHorizontal: 'auto',\n },\n }),\n },\n title: {\n color: 'white',\n fontSize: 28,\n fontWeight: 'bold',\n },\n scroll: {\n paddingHorizontal: '5%',\n paddingVertical: 16,\n ...Platform.select({\n ios: {\n paddingBottom: 24,\n },\n web: {\n width: '100%',\n maxWidth: 960,\n marginHorizontal: 'auto',\n paddingBottom: 24,\n },\n default: {\n paddingBottom: 12,\n },\n }),\n },\n itemContainer: {\n borderWidth: 1,\n borderColor: '#313538',\n backgroundColor: '#151718',\n borderRadius: 12,\n marginBottom: 12,\n overflow: 'hidden',\n },\n itemPressable: {\n paddingHorizontal: INDENT,\n paddingVertical: 16,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n ...Platform.select({\n web: {\n transitionDuration: '100ms',\n },\n }),\n },\n filename: { color: 'white', fontSize: 20, marginLeft: 12 },\n virtual: { textAlign: 'right', color: 'white' },\n image: { width: 24, height: 24, resizeMode: 'contain', opacity: 0.6 },\n headerIcon: {\n width: 40,\n height: 40,\n backgroundColor: '#202425',\n borderRadius: 8,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n"]}
|
package/build/views/Splash.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export *
|
|
1
|
+
export * from '../utils/splash';
|
|
2
2
|
//# sourceMappingURL=Splash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Splash.d.ts","sourceRoot":"","sources":["../../src/views/Splash.tsx"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"Splash.d.ts","sourceRoot":"","sources":["../../src/views/Splash.tsx"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC"}
|
package/build/views/Splash.js
CHANGED
|
@@ -11,19 +11,9 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
11
11
|
if (k2 === undefined) k2 = k;
|
|
12
12
|
o[k2] = m[k];
|
|
13
13
|
}));
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
25
16
|
};
|
|
26
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports
|
|
28
|
-
exports.SplashScreen = __importStar(require("expo-splash-screen"));
|
|
18
|
+
__exportStar(require("../utils/splash"), exports);
|
|
29
19
|
//# sourceMappingURL=Splash.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Splash.js","sourceRoot":"","sources":["../../src/views/Splash.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"Splash.js","sourceRoot":"","sources":["../../src/views/Splash.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;AACb,kDAAgC","sourcesContent":["'use client';\nexport * from '../utils/splash';\n"]}
|
package/build/views/Try.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Try.d.ts","sourceRoot":"","sources":["../../src/views/Try.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Try.d.ts","sourceRoot":"","sources":["../../src/views/Try.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKrF,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,wFAAwF;IACxF,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,iCAAiC;IACjC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAGF,qBAAa,GAAI,SAAQ,SAAS,CAChC,iBAAiB,CAAC;IAChB,KAAK,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC1C,CAAC,EACF;IAAE,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAClB;IACC,KAAK;;MAAwB;IAE7B,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK;;;IAY5C,KAAK,sBAMH;IAEF,MAAM;CAQP"}
|
package/build/views/Try.js
CHANGED
|
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.Try = void 0;
|
|
28
|
-
const SplashScreen = __importStar(require("expo-splash-screen"));
|
|
29
28
|
const react_1 = __importStar(require("react"));
|
|
29
|
+
const SplashScreen = __importStar(require("./Splash"));
|
|
30
30
|
const errors_1 = require("../rsc/router/errors");
|
|
31
31
|
// No way to access `getDerivedStateFromError` from a function component afaict.
|
|
32
32
|
class Try extends react_1.Component {
|
package/build/views/Try.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Try.js","sourceRoot":"","sources":["../../src/views/Try.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb
|
|
1
|
+
{"version":3,"file":"Try.js","sourceRoot":"","sources":["../../src/views/Try.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEb,+CAAqF;AAErF,uDAAyC;AACzC,iDAAwD;AAUxD,gFAAgF;AAChF,MAAa,GAAI,SAAQ,iBAKxB;IACC,KAAK,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAE7B,MAAM,CAAC,wBAAwB,CAAC,KAAY;QAC1C,mDAAmD;QACnD,YAAY,CAAC,SAAS,EAAE,CAAC;QAEzB,IAAI,OAAO,IAAI,KAAK,YAAY,yBAAgB,EAAE;YAChD,0BAA0B;YAC1B,OAAO,IAAI,CAAC;SACb;QAED,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,KAAK,GAAG,GAAG,EAAE;QACX,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;YACnC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE;gBACvC,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC7B,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtD,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,QAAQ,CAAC;SACjB;QACD,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAG,CAAC;IAC5D,CAAC;CACF;AApCD,kBAoCC","sourcesContent":["'use client';\n\nimport React, { Component, type ComponentType, type PropsWithChildren } from 'react';\n\nimport * as SplashScreen from './Splash';\nimport { MetroServerError } from '../rsc/router/errors';\n\n/** Props passed to a page's `ErrorBoundary` export. */\nexport type ErrorBoundaryProps = {\n /** A function that will re-render the route component by clearing the `error` state. */\n retry: () => Promise<void>;\n /** The error that was thrown. */\n error: Error;\n};\n\n// No way to access `getDerivedStateFromError` from a function component afaict.\nexport class Try extends Component<\n PropsWithChildren<{\n catch: ComponentType<ErrorBoundaryProps>;\n }>,\n { error?: Error }\n> {\n state = { error: undefined };\n\n static getDerivedStateFromError(error: Error) {\n // Force hide the splash screen if an error occurs.\n SplashScreen.hideAsync();\n\n if (__DEV__ && error instanceof MetroServerError) {\n // Throw up to the LogBox.\n return null;\n }\n\n return { error };\n }\n\n retry = () => {\n return new Promise<void>((resolve) => {\n this.setState({ error: undefined }, () => {\n resolve();\n });\n });\n };\n\n render() {\n const { error } = this.state;\n const { catch: ErrorBoundary, children } = this.props;\n if (!error) {\n return children;\n }\n return <ErrorBoundary error={error} retry={this.retry} />;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "4.0.0-preview.
|
|
3
|
+
"version": "4.0.0-preview.14",
|
|
4
4
|
"description": "Expo Router is a file-based router for React Native and web applications.",
|
|
5
5
|
"author": "650 Industries, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"expo"
|
|
74
74
|
],
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@react-navigation/drawer": "7.0.0
|
|
76
|
+
"@react-navigation/drawer": "7.0.0",
|
|
77
77
|
"expo": "*",
|
|
78
78
|
"expo-constants": "*",
|
|
79
79
|
"expo-linking": "*",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@react-navigation/drawer": "7.0.0
|
|
96
|
+
"@react-navigation/drawer": "7.0.0",
|
|
97
97
|
"@testing-library/jest-native": "^5.4.2",
|
|
98
98
|
"@testing-library/react": "^15.0.7",
|
|
99
99
|
"@testing-library/react-native": "^12.5.1",
|
|
@@ -102,18 +102,17 @@
|
|
|
102
102
|
"tsd": "^0.28.1"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@expo/metro-runtime": "4.0.0-preview.
|
|
105
|
+
"@expo/metro-runtime": "4.0.0-preview.2",
|
|
106
106
|
"@expo/server": "^0.5.0-preview.0",
|
|
107
107
|
"@radix-ui/react-slot": "1.0.1",
|
|
108
|
-
"@react-navigation/bottom-tabs": "7.0.0
|
|
109
|
-
"@react-navigation/native": "7.0.0
|
|
110
|
-
"@react-navigation/native-stack": "7.0.0
|
|
108
|
+
"@react-navigation/bottom-tabs": "7.0.0",
|
|
109
|
+
"@react-navigation/native": "7.0.0",
|
|
110
|
+
"@react-navigation/native-stack": "7.0.0",
|
|
111
111
|
"client-only": "^0.0.1",
|
|
112
|
-
"expo-splash-screen": "0.29.1",
|
|
113
112
|
"react-helmet-async": "^1.3.0",
|
|
114
113
|
"react-native-helmet-async": "2.0.4",
|
|
115
114
|
"schema-utils": "^4.0.1",
|
|
116
115
|
"server-only": "^0.0.1"
|
|
117
116
|
},
|
|
118
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "c0899e56c5be08b0142f06f05aa7bac8d6bc18b8"
|
|
119
118
|
}
|
package/rsc/headers.d.ts
ADDED