react-router-native 6.20.1 → 6.21.0-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,145 @@
1
1
  # `react-router-native`
2
2
 
3
+ ## 6.21.0-pre.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add a new `future.v7_relativeSplatPath` flag to implenent a breaking bug fix to relative routing when inside a splat route. ([#11087](https://github.com/remix-run/react-router/pull/11087))
8
+
9
+ This fix was originally added in [#10983](https://github.com/remix-run/react-router/issues/10983) and was later reverted in [#11078](https://github.com/remix-run/react-router/issues/110788) because it was determined that a large number of existing applications were relying on the buggy behavior (see [#11052](https://github.com/remix-run/react-router/issues/11052))
10
+
11
+ **The Bug**
12
+ The buggy behavior is that without this flag, the default behavior when resolving relative paths is to _ignore_ any splat (`*`) portion of the current route path.
13
+
14
+ **The Background**
15
+ This decision was originally made thinking that it would make the concept of nested different sections of your apps in `<Routes>` easier if relative routing would _replace_ the current splat:
16
+
17
+ ```jsx
18
+ <BrowserRouter>
19
+ <Routes>
20
+ <Route path="/" element={<Home />} />
21
+ <Route path="dashboard/*" element={<Dashboard />} />
22
+ </Routes>
23
+ </BrowserRouter>
24
+ ```
25
+
26
+ Any paths like `/dashboard`, `/dashboard/team`, `/dashboard/projects` will match the `Dashboard` route. The dashboard component itself can then render nested `<Routes>`:
27
+
28
+ ```jsx
29
+ function Dashboard() {
30
+ return (
31
+ <div>
32
+ <h2>Dashboard</h2>
33
+ <nav>
34
+ <Link to="/">Dashboard Home</Link>
35
+ <Link to="team">Team</Link>
36
+ <Link to="projects">Projects</Link>
37
+ </nav>
38
+
39
+ <Routes>
40
+ <Route path="/" element={<DashboardHome />} />
41
+ <Route path="team" element={<DashboardTeam />} />
42
+ <Route path="projects" element={<DashboardProjects />} />
43
+ </Routes>
44
+ </div>
45
+ );
46
+ }
47
+ ```
48
+
49
+ Now, all links and route paths are relative to the router above them. This makes code splitting and compartmentalizing your app really easy. You could render the `Dashboard` as its own independent app, or embed it into your large app without making any changes to it.
50
+
51
+ **The Problem**
52
+
53
+ The problem is that this concept of ignoring part of a pth breaks a lot of other assumptions in React Router - namely that `"."` always means the current location pathname for that route. When we ignore the splat portion, we start getting invalid paths when using `"."`:
54
+
55
+ ```jsx
56
+ // If we are on URL /dashboard/team, and we want to link to /dashboard/team:
57
+ function DashboardTeam() {
58
+ // ❌ This is broken and results in <a href="/dashboard">
59
+ return <Link to=".">A broken link to the Current URL</Link>;
60
+
61
+ // ✅ This is fixed but super unintuitive since we're already at /dashboard/team!
62
+ return <Link to="./team">A broken link to the Current URL</Link>;
63
+ }
64
+ ```
65
+
66
+ We've also introduced an issue that we can no longer move our `DashboardTeam` component around our route hierarchy easily - since it behaves differently if we're underneath a non-splat route, such as `/dashboard/:widget`. Now, our `"."` links will, properly point to ourself _inclusive of the dynamic param value_ so behavior will break from it's corresponding usage in a `/dashboard/*` route.
67
+
68
+ Even worse, consider a nested splat route configuration:
69
+
70
+ ```jsx
71
+ <BrowserRouter>
72
+ <Routes>
73
+ <Route path="dashboard">
74
+ <Route path="*" element={<Dashboard />} />
75
+ </Route>
76
+ </Routes>
77
+ </BrowserRouter>
78
+ ```
79
+
80
+ Now, a `<Link to=".">` and a `<Link to="..">` inside the `Dashboard` component go to the same place! That is definitely not correct!
81
+
82
+ Another common issue arose in Data Routers (and Remix) where any `<Form>` should post to it's own route `action` if you the user doesn't specify a form action:
83
+
84
+ ```jsx
85
+ let router = createBrowserRouter({
86
+ path: "/dashboard",
87
+ children: [
88
+ {
89
+ path: "*",
90
+ action: dashboardAction,
91
+ Component() {
92
+ // ❌ This form is broken! It throws a 405 error when it submits because
93
+ // it tries to submit to /dashboard (without the splat value) and the parent
94
+ // `/dashboard` route doesn't have an action
95
+ return <Form method="post">...</Form>;
96
+ },
97
+ },
98
+ ],
99
+ });
100
+ ```
101
+
102
+ This is just a compounded issue from the above because the default location for a `Form` to submit to is itself (`"."`) - and if we ignore the splat portion, that now resolves to the parent route.
103
+
104
+ **The Solution**
105
+ If you are leveraging this behavior, it's recommended to enable the future flag, move your splat to it's own route, and leverage `../` for any links to "sibling" pages:
106
+
107
+ ```jsx
108
+ <BrowserRouter>
109
+ <Routes>
110
+ <Route path="dashboard">
111
+ <Route path="*" element={<Dashboard />} />
112
+ </Route>
113
+ </Routes>
114
+ </BrowserRouter>
115
+
116
+ function Dashboard() {
117
+ return (
118
+ <div>
119
+ <h2>Dashboard</h2>
120
+ <nav>
121
+ <Link to="..">Dashboard Home</Link>
122
+ <Link to="../team">Team</Link>
123
+ <Link to="../projects">Projects</Link>
124
+ </nav>
125
+
126
+ <Routes>
127
+ <Route path="/" element={<DashboardHome />} />
128
+ <Route path="team" element={<DashboardTeam />} />
129
+ <Route path="projects" element={<DashboardProjects />} />
130
+ </Router>
131
+ </div>
132
+ );
133
+ }
134
+ ```
135
+
136
+ This way, `.` means "the full current pathname for my route" in all cases (including static, dynamic, and splat routes) and `..` always means "my parents pathname".
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies:
141
+ - `react-router@6.21.0-pre.0`
142
+
3
143
  ## 6.20.1
4
144
 
5
145
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import type { GestureResponderEvent, TouchableHighlightProps } from "react-native";
3
3
  import type { To, MemoryRouterProps, NavigateOptions, RelativeRoutingType } from "react-router";
4
4
  import URLSearchParams from "@ungap/url-search-params";
5
- export type { ActionFunction, ActionFunctionArgs, AwaitProps, unstable_Blocker, unstable_BlockerFunction, DataRouteMatch, DataRouteObject, ErrorResponse, Fetcher, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LazyRouteFunction, LayoutRouteProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, Params, ParamParseKey, Path, PathMatch, Pathname, PathParam, PathPattern, PathRouteProps, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, } from "react-router";
5
+ export type { ActionFunction, ActionFunctionArgs, AwaitProps, unstable_Blocker, unstable_BlockerFunction, DataRouteMatch, DataRouteObject, ErrorResponse, Fetcher, FutureConfig, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LazyRouteFunction, LayoutRouteProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, Params, ParamParseKey, Path, PathMatch, Pathname, PathParam, PathPattern, PathRouteProps, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, } from "react-router";
6
6
  export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, isRouteErrorResponse, generatePath, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, } from "react-router";
7
7
  /** @internal */
8
8
  export { UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_NavigationContext, UNSAFE_LocationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, } from "react-router";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router Native v6.20.1
2
+ * React Router Native v6.21.0-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type {\n GestureResponderEvent,\n TouchableHighlightProps,\n} from \"react-native\";\nimport { BackHandler, Linking, TouchableHighlight } from \"react-native\";\nimport type {\n To,\n MemoryRouterProps,\n NavigateOptions,\n RelativeRoutingType,\n} from \"react-router\";\nimport { MemoryRouter, useLocation, useNavigate } from \"react-router\";\n\nimport URLSearchParams from \"@ungap/url-search-params\";\n\n////////////////////////////////////////////////////////////////////////////////\n// RE-EXPORTS\n////////////////////////////////////////////////////////////////////////////////\n\n// Note: Keep in sync with react-router exports!\nexport type {\n ActionFunction,\n ActionFunctionArgs,\n AwaitProps,\n unstable_Blocker,\n unstable_BlockerFunction,\n DataRouteMatch,\n DataRouteObject,\n ErrorResponse,\n Fetcher,\n Hash,\n IndexRouteObject,\n IndexRouteProps,\n JsonFunction,\n LazyRouteFunction,\n LayoutRouteProps,\n LoaderFunction,\n LoaderFunctionArgs,\n Location,\n MemoryRouterProps,\n NavigateFunction,\n NavigateOptions,\n NavigateProps,\n Navigation,\n Navigator,\n NonIndexRouteObject,\n OutletProps,\n Params,\n ParamParseKey,\n Path,\n PathMatch,\n Pathname,\n PathParam,\n PathPattern,\n PathRouteProps,\n RedirectFunction,\n RelativeRoutingType,\n RouteMatch,\n RouteObject,\n RouteProps,\n RouterProps,\n RouterProviderProps,\n RoutesProps,\n Search,\n ShouldRevalidateFunction,\n ShouldRevalidateFunctionArgs,\n To,\n UIMatch,\n} from \"react-router\";\nexport {\n AbortedDeferredError,\n Await,\n MemoryRouter,\n Navigate,\n NavigationType,\n Outlet,\n Route,\n Router,\n RouterProvider,\n Routes,\n createMemoryRouter,\n createPath,\n createRoutesFromChildren,\n createRoutesFromElements,\n defer,\n isRouteErrorResponse,\n generatePath,\n json,\n matchPath,\n matchRoutes,\n parsePath,\n redirect,\n redirectDocument,\n renderMatches,\n resolvePath,\n useActionData,\n useAsyncError,\n useAsyncValue,\n useBlocker,\n useHref,\n useInRouterContext,\n useLoaderData,\n useLocation,\n useMatch,\n useMatches,\n useNavigate,\n useNavigation,\n useNavigationType,\n useOutlet,\n useOutletContext,\n useParams,\n useResolvedPath,\n useRevalidator,\n useRouteError,\n useRouteLoaderData,\n useRoutes,\n} from \"react-router\";\n\n///////////////////////////////////////////////////////////////////////////////\n// DANGER! PLEASE READ ME!\n// We provide these exports as an escape hatch in the event that you need any\n// routing data that we don't provide an explicit API for. With that said, we\n// want to cover your use case if we can, so if you feel the need to use these\n// we want to hear from you. Let us know what you're building and we'll do our\n// best to make sure we can support you!\n//\n// We consider these exports an implementation detail and do not guarantee\n// against any breaking changes, regardless of the semver release. Use with\n// extreme caution and only if you understand the consequences. Godspeed.\n///////////////////////////////////////////////////////////////////////////////\n\n/** @internal */\nexport {\n UNSAFE_DataRouterContext,\n UNSAFE_DataRouterStateContext,\n UNSAFE_NavigationContext,\n UNSAFE_LocationContext,\n UNSAFE_RouteContext,\n UNSAFE_useRouteId,\n} from \"react-router\";\n\n////////////////////////////////////////////////////////////////////////////////\n// COMPONENTS\n////////////////////////////////////////////////////////////////////////////////\n\nexport interface NativeRouterProps extends MemoryRouterProps {}\n\n/**\n * A `<Router>` that runs on React Native.\n */\nexport function NativeRouter(props: NativeRouterProps) {\n return <MemoryRouter {...props} />;\n}\n\nexport interface LinkProps extends TouchableHighlightProps {\n children?: React.ReactNode;\n onPress?: (event: GestureResponderEvent) => void;\n relative?: RelativeRoutingType;\n replace?: boolean;\n state?: any;\n to: To;\n}\n\n/**\n * A `<TouchableHighlight>` that navigates to a different URL when touched.\n */\nexport function Link({\n onPress,\n relative,\n replace = false,\n state,\n to,\n ...rest\n}: LinkProps) {\n let internalOnPress = useLinkPressHandler(to, { replace, state, relative });\n function handlePress(event: GestureResponderEvent) {\n if (onPress) onPress(event);\n if (!event.defaultPrevented) {\n internalOnPress(event);\n }\n }\n\n return <TouchableHighlight {...rest} onPress={handlePress} />;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// HOOKS\n////////////////////////////////////////////////////////////////////////////////\n\nconst HardwareBackPressEventType = \"hardwareBackPress\";\nconst URLEventType = \"url\";\n\n/**\n * Handles the press behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same press behavior we\n * use in our exported `<Link>`.\n */\nexport function useLinkPressHandler(\n to: To,\n {\n replace,\n state,\n relative,\n }: {\n replace?: boolean;\n state?: any;\n relative?: RelativeRoutingType;\n } = {}\n): (event: GestureResponderEvent) => void {\n let navigate = useNavigate();\n return function handlePress() {\n navigate(to, { replace, state, relative });\n };\n}\n\n/**\n * Enables support for the hardware back button on Android.\n */\nexport function useHardwareBackButton() {\n React.useEffect(() => {\n function handleHardwardBackPress() {\n return undefined;\n // TODO: The implementation will be something like this\n // if (history.index === 0) {\n // return false; // home screen\n // } else {\n // history.back();\n // return true;\n // }\n }\n\n BackHandler.addEventListener(\n HardwareBackPressEventType,\n handleHardwardBackPress\n );\n\n return () => {\n BackHandler.removeEventListener(\n HardwareBackPressEventType,\n handleHardwardBackPress\n );\n };\n }, []);\n}\n\nexport { useHardwareBackButton as useAndroidBackButton };\n\n/**\n * Enables deep linking, both on the initial app launch and for\n * subsequent incoming links.\n */\nexport function useDeepLinking() {\n let navigate = useNavigate();\n\n // Get the initial URL\n React.useEffect(() => {\n let current = true;\n\n Linking.getInitialURL().then((url) => {\n if (current) {\n if (url) navigate(trimScheme(url));\n }\n });\n\n return () => {\n current = false;\n };\n }, [navigate]);\n\n // Listen for URL changes\n React.useEffect(() => {\n function handleURLChange(event: { url: string }) {\n navigate(trimScheme(event.url));\n }\n\n Linking.addEventListener(URLEventType, handleURLChange);\n\n return () => {\n Linking.removeEventListener(URLEventType, handleURLChange);\n };\n }, [navigate]);\n}\n\nfunction trimScheme(url: string) {\n return url.replace(/^.*?:\\/\\//, \"\");\n}\n\n/**\n * A convenient wrapper for accessing individual query parameters via the\n * URLSearchParams interface.\n */\nexport function useSearchParams(\n defaultInit?: URLSearchParamsInit\n): [URLSearchParams, SetURLSearchParams] {\n let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = React.useRef(false);\n\n let location = useLocation();\n let searchParams = React.useMemo(() => {\n let searchParams = createSearchParams(location.search);\n\n if (!hasSetSearchParamsRef.current) {\n for (let key of defaultSearchParamsRef.current.keys()) {\n if (!searchParams.has(key)) {\n defaultSearchParamsRef.current.getAll(key).forEach((value) => {\n searchParams.append(key, value);\n });\n }\n }\n }\n\n return searchParams;\n }, [location.search]);\n\n let navigate = useNavigate();\n let setSearchParams = React.useCallback<SetURLSearchParams>(\n (nextInit, navigateOpts) => {\n const newSearchParams = createSearchParams(\n typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit\n );\n hasSetSearchParamsRef.current = true;\n navigate(\"?\" + newSearchParams, navigateOpts);\n },\n [navigate, searchParams]\n );\n\n return [searchParams, setSearchParams];\n}\n\nexport type SetURLSearchParams = (\n nextInit?:\n | URLSearchParamsInit\n | ((prev: URLSearchParams) => URLSearchParamsInit),\n navigateOpts?: NavigateOptions\n) => void;\n\nexport type ParamKeyValuePair = [string, string];\n\nexport type URLSearchParamsInit =\n | string\n | ParamKeyValuePair[]\n | Record<string, string | string[]>\n | URLSearchParams;\n\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don't want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * ['sort', 'name'],\n * ['sort', 'price']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: ['name', 'price']\n * });\n */\nexport function createSearchParams(\n init: URLSearchParamsInit = \"\"\n): URLSearchParams {\n return new URLSearchParams(\n typeof init === \"string\" ||\n Array.isArray(init) ||\n init instanceof URLSearchParams\n ? init\n : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(\n Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]\n );\n }, [] as ParamKeyValuePair[])\n );\n}\n"],"names":["NativeRouter","props","React","createElement","MemoryRouter","Object","assign","Link","_ref","onPress","relative","_ref$replace","replace","state","to","rest","_objectWithoutProperties","_excluded","internalOnPress","useLinkPressHandler","handlePress","event","defaultPrevented","TouchableHighlight","HardwareBackPressEventType","URLEventType","_ref2","arguments","length","undefined","navigate","useNavigate","useHardwareBackButton","useEffect","handleHardwardBackPress","BackHandler","addEventListener","removeEventListener","useDeepLinking","current","Linking","getInitialURL","then","url","trimScheme","handleURLChange","useSearchParams","defaultInit","defaultSearchParamsRef","useRef","createSearchParams","hasSetSearchParamsRef","location","useLocation","searchParams","useMemo","search","_loop","key","has","getAll","forEach","value","append","keys","setSearchParams","useCallback","nextInit","navigateOpts","newSearchParams","init","URLSearchParams","Array","isArray","reduce","memo","concat","map","v"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4DAuJM,SAAUA,YAAYA,CAACC,KAAwB,CAAA,CACnD,OAAOC,KAAC,CAAAC,aAAA,CAAAC,YAAY,CAAAC,MAAA,CAAAC,MAAA,CAAKL,EAAAA,CAAAA,KAAK,EAAI,CACpC,UAcgBM,IAAIA,CAAAC,IAAA,CAOR,CANV,IAAAC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CACPC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,YAAA,CAAAH,IAAA,CACRI,OAAO,CAAPA,OAAO,CAAAD,YAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,YAAA,CACfE,KAAK,CAAAL,IAAA,CAALK,KAAK,CACLC,EAAE,CAAAN,IAAA,CAAFM,EAAE,CACCC,IAAI,CAAAC,wBAAA,CAAAR,IAAA,CAAAS,SAAA,CAEP,CAAA,IAAIC,eAAe,CAAGC,mBAAmB,CAACL,EAAE,CAAE,CAAEF,OAAO,CAAPA,OAAO,CAAEC,KAAK,CAALA,KAAK,CAAE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A,CAA4B,CAAA,CAAA,CAAA,EAAE,CAE9B,OAAW,IAAA4C,eAAe,CACxB,OAAOD,IAAI,GAAK,QAAQ,EACxBE,KAAK,CAACC,OAAO,CAACH,IAAI,CAAC,EACnBA,IAAI,YAAYC,eAAe,CAC3BD,IAAI,CACJjE,MAAM,CAAC2D,IAAI,CAACM,IAAI,CAAC,CAACI,MAAM,CAAC,SAACC,IAAI,CAAEjB,GAAG,CAAI,CACrC,IAAII,KAAK,CAAGQ,IAAI,CAACZ,GAAG,CAAC,CACrB,OAAOiB,IAAI,CAACC,MAAM,CAChBJ,KAAK,CAACC,OAAO,CAACX,KAAK,CAAC,CAAGA,KAAK,CAACe,GAAG,CAAC,SAACC,CAAC,CAAK,CAAA,OAAA,CAACpB,GAAG,CAAEoB,CAAC,CAAC,CAAA,CAAA,CAAC,CAAG,CAAC,CAACpB,GAAG,CAAEI,KAAK,CAAC,CAAC,CACnE,CACH,CAAC,CAAE,EAAyB,CAAC,CAClC,CACH;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../index.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type {\n GestureResponderEvent,\n TouchableHighlightProps,\n} from \"react-native\";\nimport { BackHandler, Linking, TouchableHighlight } from \"react-native\";\nimport type {\n To,\n MemoryRouterProps,\n NavigateOptions,\n RelativeRoutingType,\n} from \"react-router\";\nimport { MemoryRouter, useLocation, useNavigate } from \"react-router\";\n\nimport URLSearchParams from \"@ungap/url-search-params\";\n\n////////////////////////////////////////////////////////////////////////////////\n// RE-EXPORTS\n////////////////////////////////////////////////////////////////////////////////\n\n// Note: Keep in sync with react-router exports!\nexport type {\n ActionFunction,\n ActionFunctionArgs,\n AwaitProps,\n unstable_Blocker,\n unstable_BlockerFunction,\n DataRouteMatch,\n DataRouteObject,\n ErrorResponse,\n Fetcher,\n FutureConfig,\n Hash,\n IndexRouteObject,\n IndexRouteProps,\n JsonFunction,\n LazyRouteFunction,\n LayoutRouteProps,\n LoaderFunction,\n LoaderFunctionArgs,\n Location,\n MemoryRouterProps,\n NavigateFunction,\n NavigateOptions,\n NavigateProps,\n Navigation,\n Navigator,\n NonIndexRouteObject,\n OutletProps,\n Params,\n ParamParseKey,\n Path,\n PathMatch,\n Pathname,\n PathParam,\n PathPattern,\n PathRouteProps,\n RedirectFunction,\n RelativeRoutingType,\n RouteMatch,\n RouteObject,\n RouteProps,\n RouterProps,\n RouterProviderProps,\n RoutesProps,\n Search,\n ShouldRevalidateFunction,\n ShouldRevalidateFunctionArgs,\n To,\n UIMatch,\n} from \"react-router\";\nexport {\n AbortedDeferredError,\n Await,\n MemoryRouter,\n Navigate,\n NavigationType,\n Outlet,\n Route,\n Router,\n RouterProvider,\n Routes,\n createMemoryRouter,\n createPath,\n createRoutesFromChildren,\n createRoutesFromElements,\n defer,\n isRouteErrorResponse,\n generatePath,\n json,\n matchPath,\n matchRoutes,\n parsePath,\n redirect,\n redirectDocument,\n renderMatches,\n resolvePath,\n useActionData,\n useAsyncError,\n useAsyncValue,\n useBlocker,\n useHref,\n useInRouterContext,\n useLoaderData,\n useLocation,\n useMatch,\n useMatches,\n useNavigate,\n useNavigation,\n useNavigationType,\n useOutlet,\n useOutletContext,\n useParams,\n useResolvedPath,\n useRevalidator,\n useRouteError,\n useRouteLoaderData,\n useRoutes,\n} from \"react-router\";\n\n///////////////////////////////////////////////////////////////////////////////\n// DANGER! PLEASE READ ME!\n// We provide these exports as an escape hatch in the event that you need any\n// routing data that we don't provide an explicit API for. With that said, we\n// want to cover your use case if we can, so if you feel the need to use these\n// we want to hear from you. Let us know what you're building and we'll do our\n// best to make sure we can support you!\n//\n// We consider these exports an implementation detail and do not guarantee\n// against any breaking changes, regardless of the semver release. Use with\n// extreme caution and only if you understand the consequences. Godspeed.\n///////////////////////////////////////////////////////////////////////////////\n\n/** @internal */\nexport {\n UNSAFE_DataRouterContext,\n UNSAFE_DataRouterStateContext,\n UNSAFE_NavigationContext,\n UNSAFE_LocationContext,\n UNSAFE_RouteContext,\n UNSAFE_useRouteId,\n} from \"react-router\";\n\n////////////////////////////////////////////////////////////////////////////////\n// COMPONENTS\n////////////////////////////////////////////////////////////////////////////////\n\nexport interface NativeRouterProps extends MemoryRouterProps {}\n\n/**\n * A `<Router>` that runs on React Native.\n */\nexport function NativeRouter(props: NativeRouterProps) {\n return <MemoryRouter {...props} />;\n}\n\nexport interface LinkProps extends TouchableHighlightProps {\n children?: React.ReactNode;\n onPress?: (event: GestureResponderEvent) => void;\n relative?: RelativeRoutingType;\n replace?: boolean;\n state?: any;\n to: To;\n}\n\n/**\n * A `<TouchableHighlight>` that navigates to a different URL when touched.\n */\nexport function Link({\n onPress,\n relative,\n replace = false,\n state,\n to,\n ...rest\n}: LinkProps) {\n let internalOnPress = useLinkPressHandler(to, { replace, state, relative });\n function handlePress(event: GestureResponderEvent) {\n if (onPress) onPress(event);\n if (!event.defaultPrevented) {\n internalOnPress(event);\n }\n }\n\n return <TouchableHighlight {...rest} onPress={handlePress} />;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// HOOKS\n////////////////////////////////////////////////////////////////////////////////\n\nconst HardwareBackPressEventType = \"hardwareBackPress\";\nconst URLEventType = \"url\";\n\n/**\n * Handles the press behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same press behavior we\n * use in our exported `<Link>`.\n */\nexport function useLinkPressHandler(\n to: To,\n {\n replace,\n state,\n relative,\n }: {\n replace?: boolean;\n state?: any;\n relative?: RelativeRoutingType;\n } = {}\n): (event: GestureResponderEvent) => void {\n let navigate = useNavigate();\n return function handlePress() {\n navigate(to, { replace, state, relative });\n };\n}\n\n/**\n * Enables support for the hardware back button on Android.\n */\nexport function useHardwareBackButton() {\n React.useEffect(() => {\n function handleHardwardBackPress() {\n return undefined;\n // TODO: The implementation will be something like this\n // if (history.index === 0) {\n // return false; // home screen\n // } else {\n // history.back();\n // return true;\n // }\n }\n\n BackHandler.addEventListener(\n HardwareBackPressEventType,\n handleHardwardBackPress\n );\n\n return () => {\n BackHandler.removeEventListener(\n HardwareBackPressEventType,\n handleHardwardBackPress\n );\n };\n }, []);\n}\n\nexport { useHardwareBackButton as useAndroidBackButton };\n\n/**\n * Enables deep linking, both on the initial app launch and for\n * subsequent incoming links.\n */\nexport function useDeepLinking() {\n let navigate = useNavigate();\n\n // Get the initial URL\n React.useEffect(() => {\n let current = true;\n\n Linking.getInitialURL().then((url) => {\n if (current) {\n if (url) navigate(trimScheme(url));\n }\n });\n\n return () => {\n current = false;\n };\n }, [navigate]);\n\n // Listen for URL changes\n React.useEffect(() => {\n function handleURLChange(event: { url: string }) {\n navigate(trimScheme(event.url));\n }\n\n Linking.addEventListener(URLEventType, handleURLChange);\n\n return () => {\n Linking.removeEventListener(URLEventType, handleURLChange);\n };\n }, [navigate]);\n}\n\nfunction trimScheme(url: string) {\n return url.replace(/^.*?:\\/\\//, \"\");\n}\n\n/**\n * A convenient wrapper for accessing individual query parameters via the\n * URLSearchParams interface.\n */\nexport function useSearchParams(\n defaultInit?: URLSearchParamsInit\n): [URLSearchParams, SetURLSearchParams] {\n let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = React.useRef(false);\n\n let location = useLocation();\n let searchParams = React.useMemo(() => {\n let searchParams = createSearchParams(location.search);\n\n if (!hasSetSearchParamsRef.current) {\n for (let key of defaultSearchParamsRef.current.keys()) {\n if (!searchParams.has(key)) {\n defaultSearchParamsRef.current.getAll(key).forEach((value) => {\n searchParams.append(key, value);\n });\n }\n }\n }\n\n return searchParams;\n }, [location.search]);\n\n let navigate = useNavigate();\n let setSearchParams = React.useCallback<SetURLSearchParams>(\n (nextInit, navigateOpts) => {\n const newSearchParams = createSearchParams(\n typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit\n );\n hasSetSearchParamsRef.current = true;\n navigate(\"?\" + newSearchParams, navigateOpts);\n },\n [navigate, searchParams]\n );\n\n return [searchParams, setSearchParams];\n}\n\nexport type SetURLSearchParams = (\n nextInit?:\n | URLSearchParamsInit\n | ((prev: URLSearchParams) => URLSearchParamsInit),\n navigateOpts?: NavigateOptions\n) => void;\n\nexport type ParamKeyValuePair = [string, string];\n\nexport type URLSearchParamsInit =\n | string\n | ParamKeyValuePair[]\n | Record<string, string | string[]>\n | URLSearchParams;\n\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don't want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * ['sort', 'name'],\n * ['sort', 'price']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: ['name', 'price']\n * });\n */\nexport function createSearchParams(\n init: URLSearchParamsInit = \"\"\n): URLSearchParams {\n return new URLSearchParams(\n typeof init === \"string\" ||\n Array.isArray(init) ||\n init instanceof URLSearchParams\n ? init\n : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(\n Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]\n );\n }, [] as ParamKeyValuePair[])\n );\n}\n"],"names":["NativeRouter","props","React","createElement","MemoryRouter","Object","assign","Link","_ref","onPress","relative","_ref$replace","replace","state","to","rest","_objectWithoutProperties","_excluded","internalOnPress","useLinkPressHandler","handlePress","event","defaultPrevented","TouchableHighlight","HardwareBackPressEventType","URLEventType","_ref2","arguments","length","undefined","navigate","useNavigate","useHardwareBackButton","useEffect","handleHardwardBackPress","BackHandler","addEventListener","removeEventListener","useDeepLinking","current","Linking","getInitialURL","then","url","trimScheme","handleURLChange","useSearchParams","defaultInit","defaultSearchParamsRef","useRef","createSearchParams","hasSetSearchParamsRef","location","useLocation","searchParams","useMemo","search","_loop","key","has","getAll","forEach","value","append","keys","setSearchParams","useCallback","nextInit","navigateOpts","newSearchParams","init","URLSearchParams","Array","isArray","reduce","memo","concat","map","v"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4DAwJM,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;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router-native",
3
- "version": "6.20.1",
3
+ "version": "6.21.0-pre.0",
4
4
  "description": "Declarative routing for React Native applications",
5
5
  "keywords": [
6
6
  "react",
@@ -22,7 +22,7 @@
22
22
  "types": "./dist/index.d.ts",
23
23
  "dependencies": {
24
24
  "@ungap/url-search-params": "^0.2.2",
25
- "react-router": "6.20.1"
25
+ "react-router": "6.21.0-pre.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "react": "^18.2.0",