expo-router 5.0.2-preview.0 → 5.0.2-preview.2
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/build/ExpoRoot.js +18 -9
- package/build/ExpoRoot.js.map +1 -1
- package/build/LocationProvider.js +2 -3
- package/build/LocationProvider.js.map +1 -1
- package/build/Prefetch.d.ts +9 -0
- package/build/Prefetch.d.ts.map +1 -0
- package/build/Prefetch.js +19 -0
- package/build/Prefetch.js.map +1 -0
- package/build/Route.js +4 -4
- package/build/Route.js.map +1 -1
- package/build/doctor/index.js +1 -2
- package/build/doctor/index.js.map +1 -1
- package/build/exports.js +17 -7
- package/build/exports.js.map +1 -1
- package/build/fast-refresh.js.map +1 -1
- package/build/fork/NavigationContainer.d.ts +2 -7
- package/build/fork/NavigationContainer.d.ts.map +1 -1
- package/build/fork/NavigationContainer.js.map +1 -1
- package/build/fork/createMemoryHistory.d.ts.map +1 -1
- package/build/fork/createMemoryHistory.js +1 -2
- package/build/fork/createMemoryHistory.js.map +1 -1
- package/build/fork/extractPathFromURL.js +3 -4
- package/build/fork/extractPathFromURL.js.map +1 -1
- package/build/fork/findFocusedRoute.d.ts +1 -11
- package/build/fork/findFocusedRoute.d.ts.map +1 -1
- package/build/fork/findFocusedRoute.js +1 -2
- package/build/fork/findFocusedRoute.js.map +1 -1
- package/build/fork/getPathFromState-forks.d.ts.map +1 -1
- package/build/fork/getPathFromState-forks.js +24 -14
- package/build/fork/getPathFromState-forks.js.map +1 -1
- package/build/fork/getPathFromState.js +20 -11
- package/build/fork/getPathFromState.js.map +1 -1
- package/build/fork/getStateFromPath-forks.d.ts +4 -4
- package/build/fork/getStateFromPath-forks.d.ts.map +1 -1
- package/build/fork/getStateFromPath-forks.js +18 -19
- package/build/fork/getStateFromPath-forks.js.map +1 -1
- package/build/fork/getStateFromPath.js +18 -9
- package/build/fork/getStateFromPath.js.map +1 -1
- package/build/fork/native-stack/NativeStackView.js +1 -2
- package/build/fork/native-stack/NativeStackView.js.map +1 -1
- package/build/fork/native-stack/createNativeStackNavigator.js +18 -9
- package/build/fork/native-stack/createNativeStackNavigator.js.map +1 -1
- package/build/fork/useBackButton.d.ts +0 -1
- package/build/fork/useBackButton.d.ts.map +1 -1
- package/build/fork/useBackButton.js +1 -2
- package/build/fork/useBackButton.js.map +1 -1
- package/build/fork/useBackButton.native.js +18 -9
- package/build/fork/useBackButton.native.js.map +1 -1
- package/build/fork/useDocumentTitle.js +18 -9
- package/build/fork/useDocumentTitle.js.map +1 -1
- package/build/fork/useDocumentTitle.native.js +1 -2
- package/build/fork/useDocumentTitle.native.js.map +1 -1
- package/build/fork/useLinking.d.ts +3 -26
- package/build/fork/useLinking.d.ts.map +1 -1
- package/build/fork/useLinking.js +20 -10
- package/build/fork/useLinking.js.map +1 -1
- package/build/fork/useLinking.native.d.ts +6 -6
- package/build/fork/useLinking.native.js +19 -10
- package/build/fork/useLinking.native.js.map +1 -1
- package/build/fork/useThenable.js +18 -9
- package/build/fork/useThenable.js.map +1 -1
- package/build/fork/validatePathConfig.js +1 -1
- package/build/fork/validatePathConfig.js.map +1 -1
- package/build/getDevServer/index.js.map +1 -1
- package/build/getLinkingConfig.js +3 -3
- package/build/getLinkingConfig.js.map +1 -1
- package/build/getReactNavigationConfig.js +3 -4
- package/build/getReactNavigationConfig.js.map +1 -1
- package/build/getRoutes.js +3 -3
- package/build/getRoutes.js.map +1 -1
- package/build/getRoutesCore.js +6 -7
- package/build/getRoutesCore.js.map +1 -1
- package/build/getRoutesRedirects.d.ts +0 -1
- package/build/getRoutesRedirects.d.ts.map +1 -1
- package/build/getRoutesRedirects.js +3 -4
- package/build/getRoutesRedirects.js.map +1 -1
- package/build/getRoutesSSR.js +3 -3
- package/build/getRoutesSSR.js.map +1 -1
- package/build/getServerManifest.js +2 -3
- package/build/getServerManifest.js.map +1 -1
- package/build/global-state/routeInfo.js +18 -9
- package/build/global-state/routeInfo.js.map +1 -1
- package/build/global-state/router-store.d.ts +7 -6
- package/build/global-state/router-store.d.ts.map +1 -1
- package/build/global-state/router-store.js +24 -13
- package/build/global-state/router-store.js.map +1 -1
- package/build/global-state/routing.d.ts +1 -0
- package/build/global-state/routing.d.ts.map +1 -1
- package/build/global-state/routing.js +33 -20
- package/build/global-state/routing.js.map +1 -1
- package/build/global-state/serverLocationContext.d.ts +0 -1
- package/build/global-state/serverLocationContext.d.ts.map +1 -1
- package/build/global-state/sort-routes.js +1 -2
- package/build/global-state/sort-routes.js.map +1 -1
- package/build/head/ExpoHead.android.d.ts +1 -1
- package/build/head/ExpoHead.android.js +1 -2
- package/build/head/ExpoHead.android.js.map +1 -1
- package/build/head/ExpoHead.ios.js.map +1 -1
- package/build/head/ExpoHeadModule.js.map +1 -1
- package/build/head/url.js +2 -3
- package/build/head/url.js.map +1 -1
- package/build/hooks.d.ts.map +1 -1
- package/build/hooks.js +18 -18
- package/build/hooks.js.map +1 -1
- package/build/imperative-api.d.ts +4 -0
- package/build/imperative-api.d.ts.map +1 -1
- package/build/imperative-api.js +1 -0
- package/build/imperative-api.js.map +1 -1
- package/build/layouts/DrawerClient.d.ts +16 -17
- package/build/layouts/DrawerClient.d.ts.map +1 -1
- package/build/layouts/RootModal.d.ts +1 -2
- package/build/layouts/RootModal.d.ts.map +1 -1
- package/build/layouts/RootModal.js +2 -2
- package/build/layouts/RootModal.js.map +1 -1
- package/build/layouts/StackClient.d.ts +16 -16
- package/build/layouts/StackClient.d.ts.map +1 -1
- package/build/layouts/StackClient.js.map +1 -1
- package/build/layouts/TabsClient.d.ts +12 -12
- package/build/layouts/TabsClient.js.map +1 -1
- package/build/layouts/withLayoutContext.d.ts +2 -2
- package/build/layouts/withLayoutContext.d.ts.map +1 -1
- package/build/layouts/withLayoutContext.js +19 -10
- package/build/layouts/withLayoutContext.js.map +1 -1
- package/build/link/Link.d.ts.map +1 -1
- package/build/link/Link.js +10 -5
- package/build/link/Link.js.map +1 -1
- package/build/link/href.d.ts.map +1 -1
- package/build/link/href.js +2 -2
- package/build/link/href.js.map +1 -1
- package/build/link/linking.d.ts.map +1 -1
- package/build/link/linking.js +21 -11
- package/build/link/linking.js.map +1 -1
- package/build/link/useDomComponentNavigation.js +6 -7
- package/build/link/useDomComponentNavigation.js.map +1 -1
- package/build/link/useLinkHooks.d.ts +5 -0
- package/build/link/useLinkHooks.d.ts.map +1 -1
- package/build/link/useLinkHooks.js +2 -2
- package/build/link/useLinkHooks.js.map +1 -1
- package/build/link/useLinkToPathProps.d.ts.map +1 -1
- package/build/link/useLinkToPathProps.js +2 -3
- package/build/link/useLinkToPathProps.js.map +1 -1
- package/build/link/useLoadedNavigation.d.ts.map +1 -1
- package/build/link/useLoadedNavigation.js +2 -3
- package/build/link/useLoadedNavigation.js.map +1 -1
- package/build/loadStaticParamsAsync.js +3 -4
- package/build/loadStaticParamsAsync.js.map +1 -1
- package/build/matchers.js +14 -15
- package/build/matchers.js.map +1 -1
- package/build/onboard/Tutorial.js +1 -2
- package/build/onboard/Tutorial.js.map +1 -1
- package/build/onboard/createEntryFile.js +2 -3
- package/build/onboard/createEntryFile.js.map +1 -1
- package/build/qualified-entry.js +1 -2
- package/build/qualified-entry.js.map +1 -1
- package/build/renderRootComponent.js +18 -9
- package/build/renderRootComponent.js.map +1 -1
- package/build/routes-manifest.js +1 -2
- package/build/routes-manifest.js.map +1 -1
- package/build/rsc/entry.js +1 -2
- package/build/rsc/entry.js.map +1 -1
- package/build/rsc/exports.d.ts +0 -1
- package/build/rsc/exports.d.ts.map +1 -1
- package/build/rsc/exports.js +18 -18
- package/build/rsc/exports.js.map +1 -1
- package/build/rsc/middleware.js +2 -3
- package/build/rsc/middleware.js.map +1 -1
- package/build/rsc/path.d.ts.map +1 -1
- package/build/rsc/path.js.map +1 -1
- package/build/rsc/router/client.d.ts +7 -7
- package/build/rsc/router/client.d.ts.map +1 -1
- package/build/rsc/router/client.js +4 -4
- package/build/rsc/router/client.js.map +1 -1
- package/build/rsc/router/common.js +4 -4
- package/build/rsc/router/common.js.map +1 -1
- package/build/rsc/router/create-expo-pages.d.ts.map +1 -1
- package/build/rsc/router/create-expo-pages.js +1 -2
- package/build/rsc/router/create-expo-pages.js.map +1 -1
- package/build/rsc/router/create-pages.d.ts +1 -3
- package/build/rsc/router/create-pages.d.ts.map +1 -1
- package/build/rsc/router/create-pages.js +1 -2
- package/build/rsc/router/create-pages.js.map +1 -1
- package/build/rsc/router/defineRouter.js +2 -3
- package/build/rsc/router/defineRouter.js.map +1 -1
- package/build/rsc/router/errors.js.map +1 -1
- package/build/rsc/router/expo-definedRouter.d.ts +1 -1
- package/build/rsc/router/expo-definedRouter.js.map +1 -1
- package/build/rsc/router/fetch.js +1 -2
- package/build/rsc/router/fetch.js.map +1 -1
- package/build/rsc/router/host.d.ts +3 -3
- package/build/rsc/router/host.d.ts.map +1 -1
- package/build/rsc/router/host.js.map +1 -1
- package/build/rsc/router/noopRouter.d.ts +1 -1
- package/build/rsc/router/utils.d.ts.map +1 -1
- package/build/rsc/router/utils.js.map +1 -1
- package/build/rsc/rsc-renderer.js +1 -2
- package/build/rsc/rsc-renderer.js.map +1 -1
- package/build/rsc/server.d.ts.map +1 -1
- package/build/rsc/server.js +5 -5
- package/build/rsc/server.js.map +1 -1
- package/build/sortRoutes.d.ts.map +1 -1
- package/build/sortRoutes.js +2 -3
- package/build/sortRoutes.js.map +1 -1
- package/build/static/getRootComponent.js +1 -2
- package/build/static/getRootComponent.js.map +1 -1
- package/build/static/getServerManifest.js +2 -3
- package/build/static/getServerManifest.js.map +1 -1
- package/build/static/html.js +2 -3
- package/build/static/html.js.map +1 -1
- package/build/static/renderStaticContent.js +19 -9
- package/build/static/renderStaticContent.js.map +1 -1
- package/build/testing-library/context-stubs.d.ts +1 -2
- package/build/testing-library/context-stubs.d.ts.map +1 -1
- package/build/testing-library/context-stubs.js +3 -3
- package/build/testing-library/context-stubs.js.map +1 -1
- package/build/testing-library/index.d.ts.map +1 -1
- package/build/testing-library/index.js +2 -2
- package/build/testing-library/index.js.map +1 -1
- package/build/testing-library/mock-config.js +2 -3
- package/build/testing-library/mock-config.js.map +1 -1
- package/build/testing-library/mocks.js.map +1 -1
- package/build/testing-library/require-context-ponyfill.js +1 -1
- package/build/testing-library/require-context-ponyfill.js.map +1 -1
- package/build/typed-routes/generate.js +4 -5
- package/build/typed-routes/generate.js.map +1 -1
- package/build/typed-routes/index.d.ts.map +1 -1
- package/build/typed-routes/index.js +2 -2
- package/build/typed-routes/index.js.map +1 -1
- package/build/ui/Slot.d.ts +0 -1
- package/build/ui/Slot.d.ts.map +1 -1
- package/build/ui/TabContext.d.ts +47 -55
- package/build/ui/TabContext.d.ts.map +1 -1
- package/build/ui/TabList.js +2 -3
- package/build/ui/TabList.js.map +1 -1
- package/build/ui/TabRouter.d.ts +27 -27
- package/build/ui/TabRouter.d.ts.map +1 -1
- package/build/ui/TabRouter.js +18 -9
- package/build/ui/TabRouter.js.map +1 -1
- package/build/ui/TabSlot.js +4 -5
- package/build/ui/TabSlot.js.map +1 -1
- package/build/ui/TabTrigger.js +3 -4
- package/build/ui/TabTrigger.js.map +1 -1
- package/build/ui/Tabs.d.ts +73 -78
- package/build/ui/Tabs.d.ts.map +1 -1
- package/build/ui/Tabs.js +3 -4
- package/build/ui/Tabs.js.map +1 -1
- package/build/ui/common.d.ts +2 -3
- package/build/ui/common.d.ts.map +1 -1
- package/build/ui/common.js +3 -3
- package/build/ui/common.js.map +1 -1
- package/build/ui/useComponent.d.ts.map +1 -1
- package/build/ui/useComponent.js +1 -2
- package/build/ui/useComponent.js.map +1 -1
- package/build/useDeprecated.js +2 -3
- package/build/useDeprecated.js.map +1 -1
- package/build/useFocusEffect.js +18 -9
- package/build/useFocusEffect.js.map +1 -1
- package/build/useNavigation.js +1 -2
- package/build/useNavigation.js.map +1 -1
- package/build/useScreens.js +5 -6
- package/build/useScreens.js.map +1 -1
- package/build/utils/splash.js +5 -6
- package/build/utils/splash.js.map +1 -1
- package/build/utils/url.js +3 -4
- package/build/utils/url.js.map +1 -1
- package/build/views/EmptyRoute.js +1 -2
- package/build/views/EmptyRoute.js.map +1 -1
- package/build/views/ErrorBoundary.d.ts +0 -1
- package/build/views/ErrorBoundary.d.ts.map +1 -1
- package/build/views/ErrorBoundary.js +1 -2
- package/build/views/ErrorBoundary.js.map +1 -1
- package/build/views/Navigator.js +22 -12
- package/build/views/Navigator.js.map +1 -1
- package/build/views/Pressable.d.ts.map +1 -1
- package/build/views/Screen.js +1 -2
- package/build/views/Screen.js.map +1 -1
- package/build/views/Sitemap.js +2 -3
- package/build/views/Sitemap.js.map +1 -1
- package/build/views/SuspenseFallback.js +1 -2
- package/build/views/SuspenseFallback.js.map +1 -1
- package/build/views/Toast.js +3 -3
- package/build/views/Toast.js.map +1 -1
- package/build/views/Try.js +17 -7
- package/build/views/Try.js.map +1 -1
- package/build/views/Unmatched.js +1 -2
- package/build/views/Unmatched.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createEntryFileAsync = createEntryFileAsync;
|
|
4
|
+
exports.getAbsolutePath = getAbsolutePath;
|
|
4
5
|
const getDevServer_1 = require("../getDevServer");
|
|
5
6
|
/** Middleware for creating an entry file in the project. */
|
|
6
7
|
function createEntryFileAsync() {
|
|
@@ -21,11 +22,9 @@ function createEntryFileAsync() {
|
|
|
21
22
|
}),
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
|
-
exports.createEntryFileAsync = createEntryFileAsync;
|
|
25
25
|
function getAbsolutePath() {
|
|
26
26
|
return process.env.EXPO_ROUTER_ABS_APP_ROOT + '/index.js';
|
|
27
27
|
}
|
|
28
|
-
exports.getAbsolutePath = getAbsolutePath;
|
|
29
28
|
const TEMPLATE = `import { StyleSheet, Text, View } from "react-native";
|
|
30
29
|
|
|
31
30
|
export default function Page() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createEntryFile.js","sourceRoot":"","sources":["../../src/onboard/createEntryFile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createEntryFile.js","sourceRoot":"","sources":["../../src/onboard/createEntryFile.ts"],"names":[],"mappings":";;AAGA,oDAkBC;AAED,0CAEC;AAzBD,kDAA+C;AAE/C,4DAA4D;AAC5D,SAAgB,oBAAoB;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,gBAAgB;QAChB,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC/D,OAAO;IACT,CAAC;IAED,+CAA+C;IAC/C,OAAO,KAAK,CAAC,IAAA,2BAAY,GAAE,CAAC,GAAG,GAAG,aAAa,EAAE;QAC/C,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACnB,QAAQ,EAAE,QAAQ;YAClB,SAAS;YACT,IAAI,EAAE,gBAAgB;YACtB,MAAM;YACN,YAAY,EAAE,eAAe,EAAE;SAChC,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,eAAe;IAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,wBAAwB,GAAG,WAAW,CAAC;AAC5D,CAAC;AAED,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkChB,CAAC","sourcesContent":["import { getDevServer } from '../getDevServer';\n\n/** Middleware for creating an entry file in the project. */\nexport function createEntryFileAsync() {\n if (process.env.NODE_ENV === 'production') {\n // No dev server\n console.warn('createEntryFile() cannot be used in production');\n return;\n }\n\n // Pings middleware in the Expo CLI dev server.\n return fetch(getDevServer().url + '_expo/touch', {\n method: 'POST',\n body: JSON.stringify({\n contents: TEMPLATE,\n // Legacy\n path: './app/index.js',\n // New\n absolutePath: getAbsolutePath(),\n }),\n });\n}\n\nexport function getAbsolutePath() {\n return process.env.EXPO_ROUTER_ABS_APP_ROOT + '/index.js';\n}\n\nconst TEMPLATE = `import { StyleSheet, Text, View } from \"react-native\";\n\nexport default function Page() {\n return (\n <View style={styles.container}>\n <View style={styles.main}>\n <Text style={styles.title}>Hello World</Text>\n <Text style={styles.subtitle}>This is the first page of your app.</Text>\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n alignItems: \"center\",\n padding: 24,\n },\n main: {\n flex: 1,\n justifyContent: \"center\",\n maxWidth: 960,\n marginHorizontal: \"auto\",\n },\n title: {\n fontSize: 64,\n fontWeight: \"bold\",\n },\n subtitle: {\n fontSize: 36,\n color: \"#38434D\",\n },\n});\n`;\n"]}
|
package/build/qualified-entry.js
CHANGED
|
@@ -7,7 +7,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
8
|
};
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.App =
|
|
10
|
+
exports.App = App;
|
|
11
11
|
// This has to be the string "expo-router/_ctx" as we resolve the exact string to
|
|
12
12
|
// a different file in a custom resolver for bundle splitting in Node.js.
|
|
13
13
|
const _ctx_1 = require("expo-router/_ctx");
|
|
@@ -21,5 +21,4 @@ function App() {
|
|
|
21
21
|
<ExpoRoot_1.ExpoRoot context={_ctx_1.ctx}/>
|
|
22
22
|
</head_1.Head.Provider>);
|
|
23
23
|
}
|
|
24
|
-
exports.App = App;
|
|
25
24
|
//# sourceMappingURL=qualified-entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qualified-entry.js","sourceRoot":"","sources":["../src/qualified-entry.tsx"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,yFAAyF;AACzF,6FAA6F;AAC7F,2FAA2F
|
|
1
|
+
{"version":3,"file":"qualified-entry.js","sourceRoot":"","sources":["../src/qualified-entry.tsx"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,yFAAyF;AACzF,6FAA6F;AAC7F,2FAA2F;;;;;AAa3F,kBAMC;AAjBD,iFAAiF;AACjF,yEAAyE;AACzE,2CAAuC;AACvC,kDAA0B;AAE1B,yCAAsC;AACtC,iCAA8B;AAE9B,0BAAwB;AAExB,4DAA4D;AAC5D,SAAgB,GAAG;IACjB,OAAO,CACL,CAAC,WAAI,CAAC,QAAQ,CACZ;MAAA,CAAC,mBAAQ,CAAC,OAAO,CAAC,CAAC,UAAG,CAAC,EACzB;IAAA,EAAE,WAAI,CAAC,QAAQ,CAAC,CACjB,CAAC;AACJ,CAAC","sourcesContent":["// The entry component (one that uses context modules) cannot be in the same file as the\n// entry side-effects, otherwise they'll be updated when files are added/removed from the\n// app directory. This will cause a lot of unfortunate errors regarding HMR and Fast Refresh.\n// This is because Fast Refresh is sending the entire file containing an updated component.\n\n// This has to be the string \"expo-router/_ctx\" as we resolve the exact string to\n// a different file in a custom resolver for bundle splitting in Node.js.\nimport { ctx } from 'expo-router/_ctx';\nimport React from 'react';\n\nimport { ExpoRoot } from './ExpoRoot';\nimport { Head } from './head';\n\nimport './fast-refresh';\n\n// Must be exported or Fast Refresh won't update the context\nexport function App() {\n return (\n <Head.Provider>\n <ExpoRoot context={ctx} />\n </Head.Provider>\n );\n}\n"]}
|
|
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.renderRootComponent =
|
|
36
|
+
exports.renderRootComponent = renderRootComponent;
|
|
27
37
|
const expo_1 = require("expo");
|
|
28
38
|
const React = __importStar(require("react"));
|
|
29
39
|
const react_native_1 = require("react-native");
|
|
@@ -103,5 +113,4 @@ function renderRootComponent(Component) {
|
|
|
103
113
|
// TODO: Render a production-only error screen.
|
|
104
114
|
}
|
|
105
115
|
}
|
|
106
|
-
exports.renderRootComponent = renderRootComponent;
|
|
107
116
|
//# sourceMappingURL=renderRootComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderRootComponent.js","sourceRoot":"","sources":["../src/renderRootComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"renderRootComponent.js","sourceRoot":"","sources":["../src/renderRootComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,kDAwCC;AA5FD,+BAA6C;AAC7C,6CAA+B;AAC/B,+CAAoC;AAEpC,6DAA+C;AAE/C,SAAS,YAAY,CAAC,GAAQ;IAC5B,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,iBAAiB,EAAE,CAAC;QAC9D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OA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ACrD,CAAC;iBAAM,CAAC;gBACN,IAAA,4BAAqB,EAAC,SAAS,CAAC,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,uEAAuE;QACvE,YAAY,CAAC,SAAS,EAAE,CAAC;QAEzB,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAC9B,2CAA2C;QAC3C,mFAAmF;QACnF,yIAAyI;QACzI,+FAA+F;QAC/F,IAAA,4BAAqB,EAAC,GAAG,EAAE,CAAC,CAAC,mBAAI,CAAC,AAAD,EAAG,CAAC,CAAC;QAEtC,gFAAgF;QAChF,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;YAClC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QACpF,CAAC;QAED,+CAA+C;QAC/C,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,KAAK,CAAC;QACd,CAAC,CAAC,CAAC;QAEH,+CAA+C;IACjD,CAAC;AACH,CAAC","sourcesContent":["import { registerRootComponent } from 'expo';\nimport * as React from 'react';\nimport { View } from 'react-native';\n\nimport * as SplashScreen from './utils/splash';\n\nfunction isBaseObject(obj: any) {\n if (Object.prototype.toString.call(obj) !== '[object Object]') {\n return false;\n }\n const proto = Object.getPrototypeOf(obj);\n if (proto === null) {\n return true;\n }\n return proto === Object.prototype;\n}\n\nfunction isErrorShaped(error: any): error is Error {\n return (\n error &&\n typeof error === 'object' &&\n typeof error.name === 'string' &&\n typeof error.message === 'string'\n );\n}\n\n/**\n * After we throw this error, any number of tools could handle it.\n * This check ensures the error is always in a reason state before surfacing it to the runtime.\n */\nfunction convertError(error: any) {\n if (isErrorShaped(error)) {\n return error;\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (error == null) {\n return new Error('A null/undefined error was thrown.');\n }\n }\n\n if (isBaseObject(error)) {\n return new Error(JSON.stringify(error));\n }\n\n return new Error(String(error));\n}\n\n/**\n * Register and mount the root component using the predefined rendering\n * method. This function ensures the Splash Screen and errors are handled correctly.\n */\nexport function renderRootComponent(Component: React.ComponentType<any>) {\n try {\n // This must be delayed so the user has a chance to call it first.\n setTimeout(() => {\n SplashScreen._internal_preventAutoHideAsync?.();\n });\n\n React.startTransition(() => {\n if (process.env.NODE_ENV !== 'production') {\n const { withErrorOverlay } =\n require('@expo/metro-runtime/error-overlay') as typeof import('@expo/metro-runtime/error-overlay');\n registerRootComponent(withErrorOverlay(Component));\n } else {\n registerRootComponent(Component);\n }\n });\n } catch (e) {\n // Hide the splash screen if there was an error so the user can see it.\n SplashScreen.hideAsync();\n\n const error = convertError(e);\n // Prevent the app from throwing confusing:\n // ERROR Invariant Violation: \"main\" has not been registered. This can happen if:\n // * Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.\n // * A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.\n registerRootComponent(() => <View />);\n\n // Console is pretty useless on native, on web you get interactive stack traces.\n if (process.env.EXPO_OS === 'web') {\n console.error(error);\n console.error(`A runtime error has occurred while rendering the root component.`);\n }\n\n // Give React a tick to render before throwing.\n setTimeout(() => {\n throw error;\n });\n\n // TODO: Render a production-only error screen.\n }\n}\n"]}
|
package/build/routes-manifest.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRoutesManifest =
|
|
3
|
+
exports.createRoutesManifest = createRoutesManifest;
|
|
4
4
|
// This file runs in Node.js environments.
|
|
5
5
|
// no relative imports
|
|
6
6
|
const getRoutesSSR_1 = require("./getRoutesSSR");
|
|
@@ -27,5 +27,4 @@ function createRoutesManifest(paths, options) {
|
|
|
27
27
|
}
|
|
28
28
|
return (0, getServerManifest_1.getServerManifest)(routeTree);
|
|
29
29
|
}
|
|
30
|
-
exports.createRoutesManifest = createRoutesManifest;
|
|
31
30
|
//# sourceMappingURL=routes-manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-manifest.js","sourceRoot":"","sources":["../src/routes-manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes-manifest.js","sourceRoot":"","sources":["../src/routes-manifest.ts"],"names":[],"mappings":";;AAmCA,oDAkBC;AArDD,0CAA0C;AAC1C,sBAAsB;AACtB,iDAAyD;AACzD,2DAAwD;AAsBxD,SAAS,uBAAuB,CAAC,MAAgB,EAAE;IACjD,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,KAAI,CAAC,EAAE,CAAC,CAAC;IAElD,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE;QAC3C,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG;KACjB,CAAC,CAAC;IAEH,OAAO,aAA+B,CAAC;AACzC,CAAC;AAED,SAAgB,oBAAoB,CAClC,KAAe,EACf,OAAgB;IAEhB,mCAAmC;IACnC,MAAM,SAAS,GAAG,IAAA,wBAAS,EAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE;QAC1D,GAAG,OAAO;QACV,iBAAiB,EAAE,IAAI;QACvB,2BAA2B,EAAE,IAAI;QACjC,mBAAmB,EAAE,IAAI;QACzB,iBAAiB,EAAE,IAAI;QACvB,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAA,qCAAiB,EAAC,SAAS,CAAC,CAAC;AACtC,CAAC","sourcesContent":["// This file runs in Node.js environments.\n// no relative imports\nimport { type Options, getRoutes } from './getRoutesSSR';\nimport { getServerManifest } from './getServerManifest';\nimport { type RequireContext } from './types';\n\nexport { Options };\n\nexport type RouteInfo<TRegex = string> = {\n file: string;\n page: string;\n namedRegex: TRegex;\n routeKeys: Record<string, string>;\n permanent?: boolean;\n methods?: string[];\n};\n\nexport type ExpoRoutesManifestV1<TRegex = string> = {\n apiRoutes: RouteInfo<TRegex>[];\n htmlRoutes: RouteInfo<TRegex>[];\n notFoundRoutes: RouteInfo<TRegex>[];\n redirects: RouteInfo<TRegex>[];\n rewrites: RouteInfo<TRegex>[];\n};\n\nfunction createMockContextModule(map: string[] = []) {\n const contextModule = (key) => ({ default() {} });\n\n Object.defineProperty(contextModule, 'keys', {\n value: () => map,\n });\n\n return contextModule as RequireContext;\n}\n\nexport function createRoutesManifest(\n paths: string[],\n options: Options\n): ExpoRoutesManifestV1 | null {\n // TODO: Drop this part for Node.js\n const routeTree = getRoutes(createMockContextModule(paths), {\n ...options,\n preserveApiRoutes: true,\n preserveRedirectAndRewrites: true,\n ignoreRequireErrors: true,\n ignoreEntryPoints: true,\n platform: 'web',\n });\n\n if (!routeTree) {\n return null;\n }\n return getServerManifest(routeTree);\n}\n"]}
|
package/build/rsc/entry.js
CHANGED
|
@@ -10,7 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.App =
|
|
13
|
+
exports.App = App;
|
|
14
14
|
const react_1 = __importDefault(require("react"));
|
|
15
15
|
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
16
16
|
const client_1 = require("./router/client");
|
|
@@ -52,5 +52,4 @@ function App() {
|
|
|
52
52
|
</Try_1.Try>
|
|
53
53
|
</react_native_safe_area_context_1.SafeAreaProvider>);
|
|
54
54
|
}
|
|
55
|
-
exports.App = App;
|
|
56
55
|
//# sourceMappingURL=entry.js.map
|
package/build/rsc/entry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../src/rsc/entry.tsx"],"names":[],"mappings":"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AE,CAAC;YAC/C,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC,CAAC,EACF,CACH,CAAC;AACJ,CAAC;AAED,4DAA4D;AAC5D,SAAgB,GAAG;IACjB,OAAO,CACL,CAAC,iDAAgB,CACf;MAAA,CAAC,SAAG,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,CAC5B;QAAA,CAAC,eAAM,CAAC,AAAD,EACT;MAAA,EAAE,SAAG,CACP;IAAA,EAAE,iDAAgB,CAAC,CACpB,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Copyright © 2024 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use client';\n\nimport React from 'react';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\nimport { Router } from './router/client';\nimport { ErrorBoundary } from '../views/ErrorBoundary';\nimport { ErrorBoundaryProps, Try } from '../views/Try';\n\n// Add root error recovery.\nfunction RootErrorBoundary(props: ErrorBoundaryProps) {\n React.useEffect(() => {\n function refetchRoute() {\n if (props.error) {\n props.retry();\n }\n }\n // TODO: Only strip when not connected to a dev server.\n if (process.env.NODE_ENV === 'development') {\n globalThis.__EXPO_RSC_RELOAD_LISTENERS__ ||= [];\n const index = globalThis.__EXPO_RSC_RELOAD_LISTENERS__.indexOf(\n globalThis.__EXPO_REFETCH_ROUTE__\n );\n if (index !== -1) {\n globalThis.__EXPO_RSC_RELOAD_LISTENERS__.splice(index, 1, refetchRoute);\n } else {\n globalThis.__EXPO_RSC_RELOAD_LISTENERS__.unshift(refetchRoute);\n }\n globalThis.__EXPO_REFETCH_ROUTE__ = refetchRoute;\n }\n }, [props.error, props.retry]);\n\n return (\n <ErrorBoundary\n error={props.error}\n retry={() => {\n // TODO: Invalidate the cache automatically when the request fails.\n // Invalidate the fetch cache so we can retry the request.\n globalThis.__EXPO_REFETCH_ROUTE_NO_CACHE__?.();\n return props.retry();\n }}\n />\n );\n}\n\n// Must be exported or Fast Refresh won't update the context\nexport function App() {\n return (\n <SafeAreaProvider>\n <Try catch={RootErrorBoundary}>\n <Router />\n </Try>\n </SafeAreaProvider>\n );\n}\n"]}
|
package/build/rsc/exports.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/rsc/exports.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/rsc/exports.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,wBAAgB,WAAW,WAG1B;AAGD,wBAAgB,oBAAoB;;EAGnC;AAED,wBAAgB,qBAAqB;;EAGpC;AAED,wBAAgB,IAAI,gCAEnB;AAED,wBAAgB,KAAK,gCAGpB;AAED,wBAAgB,IAAI,gCAGnB;AAED,wBAAgB,SAAS,SAExB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,QAIhD;AAED,wBAAgB,QAAQ,SAEvB;AAED,wBAAgB,cAAc,SAE7B;AAED,wBAAgB,aAAa,SAE5B;AAED,wBAAgB,iBAAiB,SAEhC;AACD,wBAAgB,yBAAyB,SAExC;AAED,wBAAgB,WAAW,SAE1B;AACD,wBAAgB,iBAAiB,SAEhC;AACD,wBAAgB,sBAAsB,SAErC;AACD,wBAAgB,qBAAqB,SAEpC;AAED,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,eAAO,MAAM,MAAM,IASlB,CAAC"}
|
package/build/rsc/exports.js
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.router = exports.ErrorBoundary = exports.Unmatched = exports.useRouter = exports.
|
|
3
|
+
exports.router = exports.ErrorBoundary = exports.Unmatched = exports.useRouter = exports.Link = void 0;
|
|
4
|
+
exports.usePathname = usePathname;
|
|
5
|
+
exports.useLocalSearchParams = useLocalSearchParams;
|
|
6
|
+
exports.useGlobalSearchParams = useGlobalSearchParams;
|
|
7
|
+
exports.Slot = Slot;
|
|
8
|
+
exports.Stack = Stack;
|
|
9
|
+
exports.Tabs = Tabs;
|
|
10
|
+
exports.Navigator = Navigator;
|
|
11
|
+
exports.Redirect = Redirect;
|
|
12
|
+
exports.ExpoRoot = ExpoRoot;
|
|
13
|
+
exports.useFocusEffect = useFocusEffect;
|
|
14
|
+
exports.useNavigation = useNavigation;
|
|
15
|
+
exports.withLayoutContext = withLayoutContext;
|
|
16
|
+
exports.useNavigationContainerRef = useNavigationContainerRef;
|
|
17
|
+
exports.useSegments = useSegments;
|
|
18
|
+
exports.useRootNavigation = useRootNavigation;
|
|
19
|
+
exports.useRootNavigationState = useRootNavigationState;
|
|
20
|
+
exports.useUnstableGlobalHref = useUnstableGlobalHref;
|
|
4
21
|
const client_1 = require("./router/client");
|
|
5
22
|
Object.defineProperty(exports, "useRouter", { enumerable: true, get: function () { return client_1.useRouter_UNSTABLE; } });
|
|
6
23
|
const host_1 = require("./router/host");
|
|
@@ -10,36 +27,29 @@ function usePathname() {
|
|
|
10
27
|
const router = (0, client_1.useRouter_UNSTABLE)();
|
|
11
28
|
return router.path;
|
|
12
29
|
}
|
|
13
|
-
exports.usePathname = usePathname;
|
|
14
30
|
// TODO: This doesn't work the same as the classic version.
|
|
15
31
|
function useLocalSearchParams() {
|
|
16
32
|
const router = (0, client_1.useRouter_UNSTABLE)();
|
|
17
33
|
return Object.fromEntries([...new URLSearchParams(router.query).entries()]);
|
|
18
34
|
}
|
|
19
|
-
exports.useLocalSearchParams = useLocalSearchParams;
|
|
20
35
|
function useGlobalSearchParams() {
|
|
21
36
|
const router = (0, client_1.useRouter_UNSTABLE)();
|
|
22
37
|
return Object.fromEntries([...new URLSearchParams(router.query).entries()]);
|
|
23
38
|
}
|
|
24
|
-
exports.useGlobalSearchParams = useGlobalSearchParams;
|
|
25
39
|
function Slot() {
|
|
26
40
|
return <host_1.Children />;
|
|
27
41
|
}
|
|
28
|
-
exports.Slot = Slot;
|
|
29
42
|
function Stack() {
|
|
30
43
|
console.warn('Stack is not implemented in React Server Components yet');
|
|
31
44
|
return <host_1.Children />;
|
|
32
45
|
}
|
|
33
|
-
exports.Stack = Stack;
|
|
34
46
|
function Tabs() {
|
|
35
47
|
console.warn('Tabs is not implemented in React Server Components yet');
|
|
36
48
|
return <host_1.Children />;
|
|
37
49
|
}
|
|
38
|
-
exports.Tabs = Tabs;
|
|
39
50
|
function Navigator() {
|
|
40
51
|
throw new Error('Navigator is not implemented in React Server Components yet');
|
|
41
52
|
}
|
|
42
|
-
exports.Navigator = Navigator;
|
|
43
53
|
/**
|
|
44
54
|
* Redirects to the `href` as soon as the component is mounted.
|
|
45
55
|
*/
|
|
@@ -48,43 +58,33 @@ function Redirect({ href }) {
|
|
|
48
58
|
router.replace(href);
|
|
49
59
|
return null;
|
|
50
60
|
}
|
|
51
|
-
exports.Redirect = Redirect;
|
|
52
61
|
function ExpoRoot() {
|
|
53
62
|
throw new Error('ExpoRoot is not implemented in React Server Components yet');
|
|
54
63
|
}
|
|
55
|
-
exports.ExpoRoot = ExpoRoot;
|
|
56
64
|
function useFocusEffect() {
|
|
57
65
|
console.warn('useFocusEffect is not implemented in React Server Components yet');
|
|
58
66
|
}
|
|
59
|
-
exports.useFocusEffect = useFocusEffect;
|
|
60
67
|
function useNavigation() {
|
|
61
68
|
console.warn('useNavigation is not implemented in React Server Components yet');
|
|
62
69
|
}
|
|
63
|
-
exports.useNavigation = useNavigation;
|
|
64
70
|
function withLayoutContext() {
|
|
65
71
|
throw new Error('withLayoutContext is not implemented in React Server Components yet');
|
|
66
72
|
}
|
|
67
|
-
exports.withLayoutContext = withLayoutContext;
|
|
68
73
|
function useNavigationContainerRef() {
|
|
69
74
|
throw new Error('useNavigationContainerRef is not implemented in React Server Components yet');
|
|
70
75
|
}
|
|
71
|
-
exports.useNavigationContainerRef = useNavigationContainerRef;
|
|
72
76
|
function useSegments() {
|
|
73
77
|
throw new Error('useSegments is not implemented in React Server Components yet');
|
|
74
78
|
}
|
|
75
|
-
exports.useSegments = useSegments;
|
|
76
79
|
function useRootNavigation() {
|
|
77
80
|
throw new Error('useRootNavigation is not implemented in React Server Components yet');
|
|
78
81
|
}
|
|
79
|
-
exports.useRootNavigation = useRootNavigation;
|
|
80
82
|
function useRootNavigationState() {
|
|
81
83
|
throw new Error('useRootNavigationState is not implemented in React Server Components yet');
|
|
82
84
|
}
|
|
83
|
-
exports.useRootNavigationState = useRootNavigationState;
|
|
84
85
|
function useUnstableGlobalHref() {
|
|
85
86
|
throw new Error('useUnstableGlobalHref is not implemented in React Server Components yet');
|
|
86
87
|
}
|
|
87
|
-
exports.useUnstableGlobalHref = useUnstableGlobalHref;
|
|
88
88
|
// Expo Router Views
|
|
89
89
|
var Unmatched_1 = require("../views/Unmatched");
|
|
90
90
|
Object.defineProperty(exports, "Unmatched", { enumerable: true, get: function () { return Unmatched_1.Unmatched; } });
|
package/build/rsc/exports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/rsc/exports.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/rsc/exports.tsx"],"names":[],"mappings":";;;AAMA,kCAGC;AAGD,oDAGC;AAED,sDAGC;AAED,oBAEC;AAED,sBAGC;AAED,oBAGC;AAED,8BAEC;A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nimport { useRouter_UNSTABLE } from './router/client';\nimport { Children } from './router/host';\n\nexport { Link } from './router/client';\n\nexport function usePathname() {\n const router = useRouter_UNSTABLE();\n return router.path;\n}\n\n// TODO: This doesn't work the same as the classic version.\nexport function useLocalSearchParams() {\n const router = useRouter_UNSTABLE();\n return Object.fromEntries([...new URLSearchParams(router.query).entries()]);\n}\n\nexport function useGlobalSearchParams() {\n const router = useRouter_UNSTABLE();\n return Object.fromEntries([...new URLSearchParams(router.query).entries()]);\n}\n\nexport function Slot() {\n return <Children />;\n}\n\nexport function Stack() {\n console.warn('Stack is not implemented in React Server Components yet');\n return <Children />;\n}\n\nexport function Tabs() {\n console.warn('Tabs is not implemented in React Server Components yet');\n return <Children />;\n}\n\nexport function Navigator() {\n throw new Error('Navigator is not implemented in React Server Components yet');\n}\n\n/**\n * Redirects to the `href` as soon as the component is mounted.\n */\nexport function Redirect({ href }: { href: Href }) {\n const router = useRouter_UNSTABLE();\n router.replace(href);\n return null;\n}\n\nexport function ExpoRoot() {\n throw new Error('ExpoRoot is not implemented in React Server Components yet');\n}\n\nexport function useFocusEffect() {\n console.warn('useFocusEffect is not implemented in React Server Components yet');\n}\n\nexport function useNavigation() {\n console.warn('useNavigation is not implemented in React Server Components yet');\n}\n\nexport function withLayoutContext() {\n throw new Error('withLayoutContext is not implemented in React Server Components yet');\n}\nexport function useNavigationContainerRef() {\n throw new Error('useNavigationContainerRef is not implemented in React Server Components yet');\n}\n\nexport function useSegments() {\n throw new Error('useSegments is not implemented in React Server Components yet');\n}\nexport function useRootNavigation() {\n throw new Error('useRootNavigation is not implemented in React Server Components yet');\n}\nexport function useRootNavigationState() {\n throw new Error('useRootNavigationState is not implemented in React Server Components yet');\n}\nexport function useUnstableGlobalHref() {\n throw new Error('useUnstableGlobalHref is not implemented in React Server Components yet');\n}\n\nexport { useRouter_UNSTABLE as useRouter };\n\n// Expo Router Views\nexport { Unmatched } from '../views/Unmatched';\nexport { ErrorBoundaryProps } from '../views/Try';\nexport { ErrorBoundary } from '../views/ErrorBoundary';\n\nexport const router = new Proxy(\n {},\n {\n get(target, prop, receiver) {\n throw new Error(\n `The router object is not available in React Server Components. Use the useRouter hook instead.`\n );\n },\n }\n);\n\n// TODO:\n// export { Redirect } from './link/Link';\n"]}
|
package/build/rsc/middleware.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.renderRscWithImportsAsync = renderRscWithImportsAsync;
|
|
7
|
+
exports.renderRscAsync = renderRscAsync;
|
|
7
8
|
const expo_constants_1 = __importDefault(require("expo-constants"));
|
|
8
9
|
const _async_server_import_1 = require("expo-router/_async-server-import");
|
|
9
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -95,7 +96,6 @@ async function renderRscWithImportsAsync(distFolder, imports, { body, platform,
|
|
|
95
96
|
entries: entries,
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
|
-
exports.renderRscWithImportsAsync = renderRscWithImportsAsync;
|
|
99
99
|
async function renderRscAsync(distFolder, args) {
|
|
100
100
|
const platform = args.platform;
|
|
101
101
|
return renderRscWithImportsAsync(distFolder, {
|
|
@@ -106,5 +106,4 @@ async function renderRscAsync(distFolder, args) {
|
|
|
106
106
|
},
|
|
107
107
|
}, args);
|
|
108
108
|
}
|
|
109
|
-
exports.renderRscAsync = renderRscAsync;
|
|
110
109
|
//# sourceMappingURL=middleware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/rsc/middleware.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/rsc/middleware.ts"],"names":[],"mappings":";;;;;AAsFA,8DA2EC;AAED,wCAgBC;AA1KD,oEAAuC;AACv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ClB,CACF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,cAAc,CAClC,UAAkB,EAClB,IAAmB;IAEnB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,OAAO,yBAAyB,CAC9B,UAAU,EACV;QACE,MAAM,EAAE,GAAG,EAAE;YACX,mFAAmF;YACnF,MAAM,QAAQ,GAAG,aAAa,QAAQ,YAAY,CAAC;YACnD,OAAO,IAAA,wCAAiB,EAAC,QAAQ,CAAC,CAAC;QACrC,CAAC;KACF,EACD,IAAI,CACL,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Copyright © 2024 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n// This module is bundled with Metro in web/react-server mode and redirects to platform specific renderers.\nimport type { RenderRscArgs } from '@expo/server/build/middleware/rsc';\nimport Constants from 'expo-constants';\nimport { asyncServerImport } from 'expo-router/_async-server-import';\nimport path from 'node:path';\n\nimport { renderRsc } from './rsc-renderer';\n\nconst debug = require('debug')('expo:server:rsc-renderer');\n\n// Tracking the implementation in expo/cli's MetroBundlerDevServer\nconst rscRenderContext = new Map<string, any>();\n\nfunction getRscRenderContext(platform: string) {\n // NOTE(EvanBacon): We memoize this now that there's a persistent server storage cache for Server Actions.\n if (rscRenderContext.has(platform)) {\n return rscRenderContext.get(platform)!;\n }\n\n const context = {};\n\n rscRenderContext.set(platform, context);\n return context;\n}\n\nfunction interopDefault(mod: any) {\n if ('default' in mod && typeof mod.default === 'object' && mod.default) {\n const def = mod.default;\n if ('default' in def && typeof def.default === 'object' && def.default) {\n return def.default;\n }\n return mod.default;\n }\n return mod;\n}\n\nasync function getServerActionManifest(\n distFolder: string,\n platform: string\n): Promise<\n Record<\n // Input ID\n string,\n [\n // Metro ID\n string,\n // Chunk location.\n string,\n ]\n >\n> {\n const filePath = `../../rsc/${platform}/action-manifest.js`;\n return interopDefault(await asyncServerImport(filePath));\n}\n\nasync function getSSRManifest(\n distFolder: string,\n platform: string\n): Promise<\n Record<\n // Input ID\n string,\n [\n // Metro ID\n string,\n // Chunk location.\n string,\n ]\n >\n> {\n const filePath = `../../rsc/${platform}/ssr-manifest.js`;\n return interopDefault(await asyncServerImport(filePath));\n}\n\n// The import map allows us to use external modules from different bundling contexts.\ntype ImportMap = {\n router: () => Promise<typeof import('./router/expo-definedRouter')>;\n};\n\nexport async function renderRscWithImportsAsync(\n distFolder: string,\n imports: ImportMap,\n { body, platform, searchParams, config, method, input, contentType, headers }: RenderRscArgs\n): Promise<ReadableStream<any>> {\n globalThis.__expo_platform_header = platform;\n if (method === 'POST' && !body) {\n throw new Error('Server request must be provided when method is POST (server actions)');\n }\n\n const context = getRscRenderContext(platform);\n context['__expo_requestHeaders'] = headers;\n\n const router = await imports.router();\n const entries = router.default({\n redirects: Constants.expoConfig?.extra?.router?.redirects,\n rewrites: Constants.expoConfig?.extra?.router?.rewrites,\n });\n\n const ssrManifest = await getSSRManifest(distFolder, platform);\n const actionManifest = await getServerActionManifest(distFolder, platform);\n return renderRsc(\n {\n body: body ?? undefined,\n context,\n config,\n input,\n contentType,\n decodedBody: searchParams.get('x-expo-params'),\n },\n {\n isExporting: true,\n\n resolveClientEntry(file: string, isServer: boolean) {\n debug('resolveClientEntry', file, { isServer });\n\n if (isServer) {\n if (!(file in actionManifest)) {\n throw new Error(\n `Could not find file in server action manifest: ${file}. ${JSON.stringify(actionManifest)}`\n );\n }\n\n const [id, chunk] = actionManifest[file];\n return {\n id,\n chunks: chunk ? [chunk] : [],\n };\n }\n\n if (!(file in ssrManifest)) {\n throw new Error(`Could not find file in SSR manifest: ${file}`);\n }\n\n const [id, chunk] = ssrManifest[file];\n return {\n id,\n chunks: chunk ? [chunk] : [],\n };\n },\n async loadServerModuleRsc(file) {\n debug('loadServerModuleRsc', file);\n const filePath = path.join('../../../', file);\n const m = await asyncServerImport(filePath);\n\n // TODO: This is a hack to workaround a cloudflare/metro issue where there's an extra `default` wrapper.\n if (typeof caches !== 'undefined') {\n return m.default;\n }\n return m;\n },\n\n entries: entries!,\n }\n );\n}\n\nexport async function renderRscAsync(\n distFolder: string,\n args: RenderRscArgs\n): Promise<ReadableStream<any>> {\n const platform = args.platform;\n return renderRscWithImportsAsync(\n distFolder,\n {\n router: () => {\n // Assumes this file is saved to: `dist/server/_expo/functions/_flight/[...rsc].js`\n const filePath = `../../rsc/${platform}/router.js`;\n return asyncServerImport(filePath);\n },\n },\n args\n );\n}\n"]}
|
package/build/rsc/path.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/rsc/path.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/rsc/path.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,eAAO,MAAM,wBAAwB,GAAI,UAAU,MAAM,WAQxD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,WAK1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,WAAoC,CAAC;AAEvF,yDAAyD;AACzD,eAAO,MAAM,iBAAiB,GAAI,SAAS,MAAM,WAahD,CAAC;AAGF,eAAO,MAAM,QAAQ,GAAI,GAAG,OAAO,MAAM,EAAE,WAmB1C,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,UAAU,MAAM,WAGvC,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACxC,MAAM,MAAM,QAAQ,GAAG,SAAS,YA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AI,IAAI,KAAK,SAAS,EAAE;YACtB,OAAO,IAAI,CAAC;SACb;aAAM,IAAI,IAAI,KAAK,OAAO,EAAE;YAC3B,OAAO,SAAS,CAAC;SAClB;aAAM;YACL,OAAO,MAAM,CAAC;SACf;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACjC,CAAC,CAAC;AAXW,QAAA,WAAW,eAWtB","sourcesContent":["/**\n * Copyright © 2024 650 Industries.\n * Copyright © 2024 2023 Daishi Kato\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * https://github.com/dai-shi/waku/blob/32d52242c1450b5f5965860e671ff73c42da8bd0/packages/waku/src/lib/utils/path.ts#L1\n */\n\n// Terminology:\n// - filePath: posix-like file path, e.g. `/foo/bar.js` or `c:/foo/bar.js`\n// This is used by Vite.\n// - fileURL: file URL, e.g. `file:///foo/bar.js` or `file:///c:/foo/bar.js`\n// This is used by import().\n// - osPath: os dependent path, e.g. `/foo/bar.js` or `c:\\foo\\bar.js`\n// This is used by node:fs.\n\nconst ABSOLUTE_WIN32_PATH_REGEXP = /^\\/[a-zA-Z]:\\//;\n\nexport const encodeFilePathToAbsolute = (filePath: string) => {\n if (ABSOLUTE_WIN32_PATH_REGEXP.test(filePath)) {\n throw new Error('Unsupported absolute file path');\n }\n if (filePath.startsWith('/')) {\n return filePath;\n }\n return '/' + filePath;\n};\n\nexport const decodeFilePathFromAbsolute = (filePath: string) => {\n if (ABSOLUTE_WIN32_PATH_REGEXP.test(filePath)) {\n return filePath.slice(1);\n }\n return filePath;\n};\n\nexport const filePathToFileURL = (filePath: string) => 'file://' + encodeURI(filePath);\n\n/** Return the original \"osPath\" based on the file URL */\nexport const fileURLToFilePath = (fileURL: string) => {\n if (!fileURL.startsWith('file://')) {\n throw new Error('Not a file URL');\n }\n\n const filePath = decodeURI(fileURL.slice('file://'.length));\n\n // File URLs are always formatted in POSIX, using a leading `/` (URL pathname) separator.\n // On POSIX systems, this leading `/` is the root directory, which is valid for absolute file paths.\n // On UNIX systems, this leading `/` needs to be stripped, and the actual UNIX formatted path is returned - to match Metro's behavior\n return ABSOLUTE_WIN32_PATH_REGEXP.test(filePath)\n ? filePath.slice(1).replace(/\\//g, '\\\\')\n : filePath;\n};\n\n// for filePath\nexport const joinPath = (...paths: string[]) => {\n const isAbsolute = paths[0]?.startsWith('/');\n const items = ([] as string[]).concat(...paths.map((path) => path.split('/')));\n let i = 0;\n while (i < items.length) {\n if (items[i] === '.' || items[i] === '') {\n items.splice(i, 1);\n } else if (items[i] === '..') {\n if (i > 0) {\n items.splice(i - 1, 2);\n --i;\n } else {\n items.splice(i, 1);\n }\n } else {\n ++i;\n }\n }\n return (isAbsolute ? '/' : '') + items.join('/') || '.';\n};\n\nexport const extname = (filePath: string) => {\n const index = filePath.lastIndexOf('.');\n return index > 0 ? filePath.slice(index) : '';\n};\n\nexport type PathSpecItem =\n | { type: 'literal'; name: string }\n | { type: 'group'; name?: string }\n | { type: 'wildcard'; name?: string };\nexport type PathSpec = readonly PathSpecItem[];\n\nexport const parsePathWithSlug = (path: string): PathSpec =>\n path\n .split('/')\n .filter(Boolean)\n .map((name) => {\n let type: 'literal' | 'group' | 'wildcard' = 'literal';\n const isSlug = name.startsWith('[') && name.endsWith(']');\n if (isSlug) {\n type = 'group';\n name = name.slice(1, -1);\n }\n const isWildcard = name.startsWith('...');\n if (isWildcard) {\n type = 'wildcard';\n name = name.slice(3);\n }\n return { type, name };\n });\n\nexport const getPathMapping = (\n pathSpec: PathSpec,\n pathname: string\n): Record<string, string | string[]> | null => {\n const actual = pathname.split('/').filter(Boolean);\n if (pathSpec.length > actual.length) {\n return null;\n }\n const mapping: Record<string, string | string[]> = {};\n let wildcardStartIndex = -1;\n for (let i = 0; i < pathSpec.length; i++) {\n const { type, name } = pathSpec[i]!;\n if (type === 'literal') {\n if (name !== actual[i]) {\n return null;\n }\n } else if (type === 'wildcard') {\n wildcardStartIndex = i;\n break;\n } else if (name) {\n mapping[name] = actual[i]!;\n }\n }\n if (wildcardStartIndex === -1) {\n if (pathSpec.length !== actual.length) {\n return null;\n }\n return mapping;\n }\n let wildcardEndIndex = -1;\n for (let i = 0; i < pathSpec.length; i++) {\n const { type, name } = pathSpec[pathSpec.length - i - 1]!;\n if (type === 'literal') {\n if (name !== actual[actual.length - i - 1]) {\n return null;\n }\n } else if (type === 'wildcard') {\n wildcardEndIndex = actual.length - i - 1;\n break;\n } else if (name) {\n mapping[name] = actual[actual.length - i - 1]!;\n }\n }\n if (wildcardStartIndex === -1 || wildcardEndIndex === -1) {\n throw new Error('Invalid wildcard path');\n }\n const wildcardName = pathSpec[wildcardStartIndex]!.name;\n if (wildcardName) {\n mapping[wildcardName] = actual.slice(wildcardStartIndex, wildcardEndIndex + 1);\n }\n return mapping;\n};\n\n/**\n * Transform a path spec to a regular expression.\n */\nexport const path2regexp = (path: PathSpec) => {\n const parts = path.map(({ type, name }) => {\n if (type === 'literal') {\n return name;\n } else if (type === 'group') {\n return `([^/]+)`;\n } else {\n return `(.*)`;\n }\n });\n return `^/${parts.join('/')}$`;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../src/rsc/path.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,eAAe;AACf,0EAA0E;AAC1E,0BAA0B;AAC1B,4EAA4E;AAC5E,8BAA8B;AAC9B,qEAAqE;AACrE,6BAA6B;AAE7B,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAE7C,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC3D,IAAI,0BAA0B,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IACD,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,QAAQ,CAA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CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAE,CAAC;QACjD,CAAC;IACH,CAAC;IACD,IAAI,kBAAkB,KAAK,CAAC,CAAC,IAAI,gBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IACD,MAAM,YAAY,GAAG,QAAQ,CAAC,kBAAkB,CAAE,CAAC,IAAI,CAAC;IACxD,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,gBAAgB,GAAG,CAAC,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAnDW,QAAA,cAAc,kBAmDzB;AAEF;;GAEG;AACI,MAAM,WAAW,GAAG,CAAC,IAAc,EAAE,EAAE;IAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;QACxC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;YAC5B,OAAO,SAAS,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AACjC,CAAC,CAAC;AAXW,QAAA,WAAW,eAWtB","sourcesContent":["/**\n * Copyright © 2024 650 Industries.\n * Copyright © 2024 2023 Daishi Kato\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * https://github.com/dai-shi/waku/blob/32d52242c1450b5f5965860e671ff73c42da8bd0/packages/waku/src/lib/utils/path.ts#L1\n */\n\n// Terminology:\n// - filePath: posix-like file path, e.g. `/foo/bar.js` or `c:/foo/bar.js`\n// This is used by Vite.\n// - fileURL: file URL, e.g. `file:///foo/bar.js` or `file:///c:/foo/bar.js`\n// This is used by import().\n// - osPath: os dependent path, e.g. `/foo/bar.js` or `c:\\foo\\bar.js`\n// This is used by node:fs.\n\nconst ABSOLUTE_WIN32_PATH_REGEXP = /^\\/[a-zA-Z]:\\//;\n\nexport const encodeFilePathToAbsolute = (filePath: string) => {\n if (ABSOLUTE_WIN32_PATH_REGEXP.test(filePath)) {\n throw new Error('Unsupported absolute file path');\n }\n if (filePath.startsWith('/')) {\n return filePath;\n }\n return '/' + filePath;\n};\n\nexport const decodeFilePathFromAbsolute = (filePath: string) => {\n if (ABSOLUTE_WIN32_PATH_REGEXP.test(filePath)) {\n return filePath.slice(1);\n }\n return filePath;\n};\n\nexport const filePathToFileURL = (filePath: string) => 'file://' + encodeURI(filePath);\n\n/** Return the original \"osPath\" based on the file URL */\nexport const fileURLToFilePath = (fileURL: string) => {\n if (!fileURL.startsWith('file://')) {\n throw new Error('Not a file URL');\n }\n\n const filePath = decodeURI(fileURL.slice('file://'.length));\n\n // File URLs are always formatted in POSIX, using a leading `/` (URL pathname) separator.\n // On POSIX systems, this leading `/` is the root directory, which is valid for absolute file paths.\n // On UNIX systems, this leading `/` needs to be stripped, and the actual UNIX formatted path is returned - to match Metro's behavior\n return ABSOLUTE_WIN32_PATH_REGEXP.test(filePath)\n ? filePath.slice(1).replace(/\\//g, '\\\\')\n : filePath;\n};\n\n// for filePath\nexport const joinPath = (...paths: string[]) => {\n const isAbsolute = paths[0]?.startsWith('/');\n const items = ([] as string[]).concat(...paths.map((path) => path.split('/')));\n let i = 0;\n while (i < items.length) {\n if (items[i] === '.' || items[i] === '') {\n items.splice(i, 1);\n } else if (items[i] === '..') {\n if (i > 0) {\n items.splice(i - 1, 2);\n --i;\n } else {\n items.splice(i, 1);\n }\n } else {\n ++i;\n }\n }\n return (isAbsolute ? '/' : '') + items.join('/') || '.';\n};\n\nexport const extname = (filePath: string) => {\n const index = filePath.lastIndexOf('.');\n return index > 0 ? filePath.slice(index) : '';\n};\n\nexport type PathSpecItem =\n | { type: 'literal'; name: string }\n | { type: 'group'; name?: string }\n | { type: 'wildcard'; name?: string };\nexport type PathSpec = readonly PathSpecItem[];\n\nexport const parsePathWithSlug = (path: string): PathSpec =>\n path\n .split('/')\n .filter(Boolean)\n .map((name) => {\n let type: 'literal' | 'group' | 'wildcard' = 'literal';\n const isSlug = name.startsWith('[') && name.endsWith(']');\n if (isSlug) {\n type = 'group';\n name = name.slice(1, -1);\n }\n const isWildcard = name.startsWith('...');\n if (isWildcard) {\n type = 'wildcard';\n name = name.slice(3);\n }\n return { type, name };\n });\n\nexport const getPathMapping = (\n pathSpec: PathSpec,\n pathname: string\n): Record<string, string | string[]> | null => {\n const actual = pathname.split('/').filter(Boolean);\n if (pathSpec.length > actual.length) {\n return null;\n }\n const mapping: Record<string, string | string[]> = {};\n let wildcardStartIndex = -1;\n for (let i = 0; i < pathSpec.length; i++) {\n const { type, name } = pathSpec[i]!;\n if (type === 'literal') {\n if (name !== actual[i]) {\n return null;\n }\n } else if (type === 'wildcard') {\n wildcardStartIndex = i;\n break;\n } else if (name) {\n mapping[name] = actual[i]!;\n }\n }\n if (wildcardStartIndex === -1) {\n if (pathSpec.length !== actual.length) {\n return null;\n }\n return mapping;\n }\n let wildcardEndIndex = -1;\n for (let i = 0; i < pathSpec.length; i++) {\n const { type, name } = pathSpec[pathSpec.length - i - 1]!;\n if (type === 'literal') {\n if (name !== actual[actual.length - i - 1]) {\n return null;\n }\n } else if (type === 'wildcard') {\n wildcardEndIndex = actual.length - i - 1;\n break;\n } else if (name) {\n mapping[name] = actual[actual.length - i - 1]!;\n }\n }\n if (wildcardStartIndex === -1 || wildcardEndIndex === -1) {\n throw new Error('Invalid wildcard path');\n }\n const wildcardName = pathSpec[wildcardStartIndex]!.name;\n if (wildcardName) {\n mapping[wildcardName] = actual.slice(wildcardStartIndex, wildcardEndIndex + 1);\n }\n return mapping;\n};\n\n/**\n * Transform a path spec to a regular expression.\n */\nexport const path2regexp = (path: PathSpec) => {\n const parts = path.map(({ type, name }) => {\n if (type === 'literal') {\n return name;\n } else if (type === 'group') {\n return `([^/]+)`;\n } else {\n return `(.*)`;\n }\n });\n return `^/${parts.join('/')}$`;\n};\n"]}
|
|
@@ -30,22 +30,22 @@ type RouterData = [
|
|
|
30
30
|
export declare function Router({ routerData }: {
|
|
31
31
|
routerData?: RouterData | undefined;
|
|
32
32
|
}): import("react").FunctionComponentElement<Omit<{
|
|
33
|
-
initialInput?: string
|
|
33
|
+
initialInput?: string;
|
|
34
34
|
initialParams?: unknown;
|
|
35
35
|
fetchCache?: {
|
|
36
36
|
e?: [input: string, params: unknown, elements: Promise<Record<string, ReactNode>> & {
|
|
37
37
|
prev?: Record<string, ReactNode> | undefined;
|
|
38
|
-
}]
|
|
39
|
-
s?: (
|
|
38
|
+
}];
|
|
39
|
+
s?: (updater: (Promise<Record<string, ReactNode>> & {
|
|
40
40
|
prev?: Record<string, ReactNode> | undefined;
|
|
41
41
|
}) | ((prev: Promise<Record<string, ReactNode>> & {
|
|
42
42
|
prev?: Record<string, ReactNode> | undefined;
|
|
43
43
|
}) => Promise<Record<string, ReactNode>> & {
|
|
44
44
|
prev?: Record<string, ReactNode> | undefined;
|
|
45
|
-
})) => void
|
|
45
|
+
})) => void;
|
|
46
46
|
o?: ((data: unknown) => void) | undefined;
|
|
47
|
-
}
|
|
48
|
-
unstable_onFetchData?: (
|
|
47
|
+
};
|
|
48
|
+
unstable_onFetchData?: (data: unknown) => void;
|
|
49
49
|
children: ReactNode;
|
|
50
50
|
}, "children">>;
|
|
51
51
|
/**
|
|
@@ -56,7 +56,7 @@ export declare function ServerRouter({ children, route }: {
|
|
|
56
56
|
children: ReactNode;
|
|
57
57
|
route: RouteProps;
|
|
58
58
|
}): import("react").FunctionComponentElement<{
|
|
59
|
-
children?: ReactNode;
|
|
59
|
+
children?: ReactNode | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
export type LinkProps = ClassicLinkProps & {
|
|
62
62
|
href: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/rsc/router/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH,OAAO,KAAK,EAGV,SAAS,EAET,oBAAoB,EAGrB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGvF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AA+O3C,wBAAgB,kBAAkB,IAAI,qBAAqB,GACzD,UAAU,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAChC,CA4FF;AAoDD,KAAK,UAAU,GAAG,CAAC,SAAS;IAC1B,MAAM;IACN,SAAS;QACP,OAAO;QACP,MAAM,EAAE;KACT;CACF,CAAC,EAAE,CAAC;AAGL,KAAK,UAAU,GAAG;IAChB,UAAU,CAAC,EAAE,UAAU;IACvB,iBAAiB,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D,CAAC;AAIF,wBAAgB,MAAM,CAAC,EAAE,UAAgC,EAAE;;CAAA;;;;;;;;;;;;;;;;;;gBAU1D;AAKD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,UAAU,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AE,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE;;GAgB3F;AAED,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC;CAMd,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,CAAC;AAE1D,eAAO,MAAM,IAAI,EAA4C,aAAa,CAAC"}
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
'use client';
|
|
11
11
|
"use strict";
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Link =
|
|
13
|
+
exports.Link = void 0;
|
|
14
|
+
exports.useRouter_UNSTABLE = useRouter_UNSTABLE;
|
|
15
|
+
exports.Router = Router;
|
|
16
|
+
exports.ServerRouter = ServerRouter;
|
|
14
17
|
const react_slot_1 = require("@radix-ui/react-slot");
|
|
15
18
|
const react_1 = require("react");
|
|
16
19
|
const react_native_1 = require("react-native");
|
|
@@ -272,7 +275,6 @@ function useRouter_UNSTABLE() {
|
|
|
272
275
|
prefetch,
|
|
273
276
|
};
|
|
274
277
|
}
|
|
275
|
-
exports.useRouter_UNSTABLE = useRouter_UNSTABLE;
|
|
276
278
|
const RouterSlot = ({ route, routerData, cachedRef, id, fallback, children, }) => {
|
|
277
279
|
// const unstable_shouldRenderPrev = (_err: unknown) => {
|
|
278
280
|
// const shouldSkip = routerData[0];
|
|
@@ -309,7 +311,6 @@ function Router({ routerData = DEFAULT_ROUTER_DATA }) {
|
|
|
309
311
|
const unstable_onFetchData = () => { };
|
|
310
312
|
return (0, react_1.createElement)(host_js_1.Root, { initialInput, initialParams, unstable_onFetchData }, (0, react_1.createElement)(InnerRouter, { routerData }));
|
|
311
313
|
}
|
|
312
|
-
exports.Router = Router;
|
|
313
314
|
const notAvailableInServer = (name) => () => {
|
|
314
315
|
throw new Error(`${name} is not in the server`);
|
|
315
316
|
};
|
|
@@ -326,7 +327,6 @@ function ServerRouter({ children, route }) {
|
|
|
326
327
|
},
|
|
327
328
|
}, children));
|
|
328
329
|
}
|
|
329
|
-
exports.ServerRouter = ServerRouter;
|
|
330
330
|
exports.Link = (0, react_1.forwardRef)(ExpoRouterLink);
|
|
331
331
|
exports.Link.resolveHref = href_1.resolveHref;
|
|
332
332
|
function ExpoRouterLink({ href, replace, push,
|