react-router 6.4.4 → 6.4.5-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.
@@ -6,7 +6,7 @@ import type { NavigateOptions, RouteMatch, RouteObject, RelativeRoutingType } fr
6
6
  * Returns the full href for the given "to" value. This is useful for building
7
7
  * custom links that are also accessible and preserve right-click behavior.
8
8
  *
9
- * @see https://reactrouter.com/docs/en/v6/hooks/use-href
9
+ * @see https://reactrouter.com/hooks/use-href
10
10
  */
11
11
  export declare function useHref(to: To, { relative }?: {
12
12
  relative?: RelativeRoutingType;
@@ -14,7 +14,7 @@ export declare function useHref(to: To, { relative }?: {
14
14
  /**
15
15
  * Returns true if this component is a descendant of a <Router>.
16
16
  *
17
- * @see https://reactrouter.com/docs/en/v6/hooks/use-in-router-context
17
+ * @see https://reactrouter.com/hooks/use-in-router-context
18
18
  */
19
19
  export declare function useInRouterContext(): boolean;
20
20
  /**
@@ -25,14 +25,14 @@ export declare function useInRouterContext(): boolean;
25
25
  * "routing" in your app, and we'd like to know what your use case is. We may
26
26
  * be able to provide something higher-level to better suit your needs.
27
27
  *
28
- * @see https://reactrouter.com/docs/en/v6/hooks/use-location
28
+ * @see https://reactrouter.com/hooks/use-location
29
29
  */
30
30
  export declare function useLocation(): Location;
31
31
  /**
32
32
  * Returns the current navigation action which describes how the router came to
33
33
  * the current location, either by a pop, push, or replace on the history stack.
34
34
  *
35
- * @see https://reactrouter.com/docs/en/v6/hooks/use-navigation-type
35
+ * @see https://reactrouter.com/hooks/use-navigation-type
36
36
  */
37
37
  export declare function useNavigationType(): NavigationType;
38
38
  /**
@@ -40,7 +40,7 @@ export declare function useNavigationType(): NavigationType;
40
40
  * This is useful for components that need to know "active" state, e.g.
41
41
  * <NavLink>.
42
42
  *
43
- * @see https://reactrouter.com/docs/en/v6/hooks/use-match
43
+ * @see https://reactrouter.com/hooks/use-match
44
44
  */
45
45
  export declare function useMatch<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path): PathMatch<ParamKey> | null;
46
46
  /**
@@ -54,27 +54,27 @@ export interface NavigateFunction {
54
54
  * Returns an imperative method for changing the location. Used by <Link>s, but
55
55
  * may also be used by other elements to change the location.
56
56
  *
57
- * @see https://reactrouter.com/docs/en/v6/hooks/use-navigate
57
+ * @see https://reactrouter.com/hooks/use-navigate
58
58
  */
59
59
  export declare function useNavigate(): NavigateFunction;
60
60
  /**
61
61
  * Returns the context (if provided) for the child route at this level of the route
62
62
  * hierarchy.
63
- * @see https://reactrouter.com/docs/en/v6/hooks/use-outlet-context
63
+ * @see https://reactrouter.com/hooks/use-outlet-context
64
64
  */
65
65
  export declare function useOutletContext<Context = unknown>(): Context;
66
66
  /**
67
67
  * Returns the element for the child route at this level of the route
68
68
  * hierarchy. Used internally by <Outlet> to render child routes.
69
69
  *
70
- * @see https://reactrouter.com/docs/en/v6/hooks/use-outlet
70
+ * @see https://reactrouter.com/hooks/use-outlet
71
71
  */
72
72
  export declare function useOutlet(context?: unknown): React.ReactElement | null;
73
73
  /**
74
74
  * Returns an object of key/value pairs of the dynamic params from the current
75
75
  * URL that were matched by the route path.
76
76
  *
77
- * @see https://reactrouter.com/docs/en/v6/hooks/use-params
77
+ * @see https://reactrouter.com/hooks/use-params
78
78
  */
79
79
  export declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
80
80
  ParamsOrKey
@@ -82,7 +82,7 @@ export declare function useParams<ParamsOrKey extends string | Record<string, st
82
82
  /**
83
83
  * Resolves the pathname of the given `to` value against the current location.
84
84
  *
85
- * @see https://reactrouter.com/docs/en/v6/hooks/use-resolved-path
85
+ * @see https://reactrouter.com/hooks/use-resolved-path
86
86
  */
87
87
  export declare function useResolvedPath(to: To, { relative }?: {
88
88
  relative?: RelativeRoutingType;
@@ -93,7 +93,7 @@ export declare function useResolvedPath(to: To, { relative }?: {
93
93
  * elements in the tree must render an <Outlet> to render their child route's
94
94
  * element.
95
95
  *
96
- * @see https://reactrouter.com/docs/en/v6/hooks/use-routes
96
+ * @see https://reactrouter.com/hooks/use-routes
97
97
  */
98
98
  export declare function useRoutes(routes: RouteObject[], locationArg?: Partial<Location> | string): React.ReactElement | null;
99
99
  declare type RenderErrorBoundaryProps = React.PropsWithChildren<{
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.4.4
2
+ * React Router v6.4.5-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v6.4.4
2
+ * React Router v6.4.5-pre.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -245,7 +245,7 @@ const RouteErrorContext = /*#__PURE__*/React.createContext(null);
245
245
  * Returns the full href for the given "to" value. This is useful for building
246
246
  * custom links that are also accessible and preserve right-click behavior.
247
247
  *
248
- * @see https://reactrouter.com/docs/en/v6/hooks/use-href
248
+ * @see https://reactrouter.com/hooks/use-href
249
249
  */
250
250
 
251
251
  function useHref(to, {
@@ -283,7 +283,7 @@ function useHref(to, {
283
283
  /**
284
284
  * Returns true if this component is a descendant of a <Router>.
285
285
  *
286
- * @see https://reactrouter.com/docs/en/v6/hooks/use-in-router-context
286
+ * @see https://reactrouter.com/hooks/use-in-router-context
287
287
  */
288
288
 
289
289
  function useInRouterContext() {
@@ -297,7 +297,7 @@ function useInRouterContext() {
297
297
  * "routing" in your app, and we'd like to know what your use case is. We may
298
298
  * be able to provide something higher-level to better suit your needs.
299
299
  *
300
- * @see https://reactrouter.com/docs/en/v6/hooks/use-location
300
+ * @see https://reactrouter.com/hooks/use-location
301
301
  */
302
302
 
303
303
  function useLocation() {
@@ -310,7 +310,7 @@ function useLocation() {
310
310
  * Returns the current navigation action which describes how the router came to
311
311
  * the current location, either by a pop, push, or replace on the history stack.
312
312
  *
313
- * @see https://reactrouter.com/docs/en/v6/hooks/use-navigation-type
313
+ * @see https://reactrouter.com/hooks/use-navigation-type
314
314
  */
315
315
 
316
316
  function useNavigationType() {
@@ -321,7 +321,7 @@ function useNavigationType() {
321
321
  * This is useful for components that need to know "active" state, e.g.
322
322
  * <NavLink>.
323
323
  *
324
- * @see https://reactrouter.com/docs/en/v6/hooks/use-match
324
+ * @see https://reactrouter.com/hooks/use-match
325
325
  */
326
326
 
327
327
  function useMatch(pattern) {
@@ -337,7 +337,7 @@ function useMatch(pattern) {
337
337
  * Returns an imperative method for changing the location. Used by <Link>s, but
338
338
  * may also be used by other elements to change the location.
339
339
  *
340
- * @see https://reactrouter.com/docs/en/v6/hooks/use-navigate
340
+ * @see https://reactrouter.com/hooks/use-navigate
341
341
  */
342
342
 
343
343
  function useNavigate() {
@@ -385,7 +385,7 @@ const OutletContext = /*#__PURE__*/React.createContext(null);
385
385
  /**
386
386
  * Returns the context (if provided) for the child route at this level of the route
387
387
  * hierarchy.
388
- * @see https://reactrouter.com/docs/en/v6/hooks/use-outlet-context
388
+ * @see https://reactrouter.com/hooks/use-outlet-context
389
389
  */
390
390
 
391
391
  function useOutletContext() {
@@ -395,7 +395,7 @@ function useOutletContext() {
395
395
  * Returns the element for the child route at this level of the route
396
396
  * hierarchy. Used internally by <Outlet> to render child routes.
397
397
  *
398
- * @see https://reactrouter.com/docs/en/v6/hooks/use-outlet
398
+ * @see https://reactrouter.com/hooks/use-outlet
399
399
  */
400
400
 
401
401
  function useOutlet(context) {
@@ -413,7 +413,7 @@ function useOutlet(context) {
413
413
  * Returns an object of key/value pairs of the dynamic params from the current
414
414
  * URL that were matched by the route path.
415
415
  *
416
- * @see https://reactrouter.com/docs/en/v6/hooks/use-params
416
+ * @see https://reactrouter.com/hooks/use-params
417
417
  */
418
418
 
419
419
  function useParams() {
@@ -426,7 +426,7 @@ function useParams() {
426
426
  /**
427
427
  * Resolves the pathname of the given `to` value against the current location.
428
428
  *
429
- * @see https://reactrouter.com/docs/en/v6/hooks/use-resolved-path
429
+ * @see https://reactrouter.com/hooks/use-resolved-path
430
430
  */
431
431
 
432
432
  function useResolvedPath(to, {
@@ -447,7 +447,7 @@ function useResolvedPath(to, {
447
447
  * elements in the tree must render an <Outlet> to render their child route's
448
448
  * element.
449
449
  *
450
- * @see https://reactrouter.com/docs/en/v6/hooks/use-routes
450
+ * @see https://reactrouter.com/hooks/use-routes
451
451
  */
452
452
 
453
453
  function useRoutes(routes, locationArg) {
@@ -705,7 +705,7 @@ var DataRouterStateHook;
705
705
  })(DataRouterStateHook || (DataRouterStateHook = {}));
706
706
 
707
707
  function getDataRouterConsoleError(hookName) {
708
- return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
708
+ return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;
709
709
  }
710
710
 
711
711
  function useDataRouterContext(hookName) {
@@ -896,7 +896,7 @@ function RouterProvider({
896
896
  /**
897
897
  * A <Router> that stores all entries in memory.
898
898
  *
899
- * @see https://reactrouter.com/docs/en/v6/routers/memory-router
899
+ * @see https://reactrouter.com/router-components/memory-router
900
900
  */
901
901
 
902
902
  function MemoryRouter({
@@ -936,7 +936,7 @@ function MemoryRouter({
936
936
  * able to use hooks. In functional components, we recommend you use the
937
937
  * `useNavigate` hook instead.
938
938
  *
939
- * @see https://reactrouter.com/docs/en/v6/components/navigate
939
+ * @see https://reactrouter.com/components/navigate
940
940
  */
941
941
 
942
942
  function Navigate({
@@ -970,7 +970,7 @@ function Navigate({
970
970
  /**
971
971
  * Renders the child route's element, if there is one.
972
972
  *
973
- * @see https://reactrouter.com/docs/en/v6/components/outlet
973
+ * @see https://reactrouter.com/components/outlet
974
974
  */
975
975
 
976
976
  function Outlet(props) {
@@ -979,7 +979,7 @@ function Outlet(props) {
979
979
  /**
980
980
  * Declares an element that should be rendered at a certain URL path.
981
981
  *
982
- * @see https://reactrouter.com/docs/en/v6/components/route
982
+ * @see https://reactrouter.com/components/route
983
983
  */
984
984
 
985
985
  function Route(_props) {
@@ -992,7 +992,7 @@ function Route(_props) {
992
992
  * router that is more specific to your environment such as a <BrowserRouter>
993
993
  * in web browsers or a <StaticRouter> for server rendering.
994
994
  *
995
- * @see https://reactrouter.com/docs/en/v6/routers/router
995
+ * @see https://reactrouter.com/router-components/router
996
996
  */
997
997
 
998
998
  function Router({
@@ -1059,7 +1059,7 @@ function Router({
1059
1059
  * A container for a nested tree of <Route> elements that renders the branch
1060
1060
  * that best matches the current location.
1061
1061
  *
1062
- * @see https://reactrouter.com/docs/en/v6/components/routes
1062
+ * @see https://reactrouter.com/components/routes
1063
1063
  */
1064
1064
 
1065
1065
  function Routes({
@@ -1220,7 +1220,7 @@ function ResolveAwait({
1220
1220
  * either a `<Route>` element or an array of them. Used internally by
1221
1221
  * `<Routes>` to create a route config from its children.
1222
1222
  *
1223
- * @see https://reactrouter.com/docs/en/v6/utils/create-routes-from-children
1223
+ * @see https://reactrouter.com/utils/create-routes-from-children
1224
1224
  */
1225
1225
 
1226
1226