react-router 0.0.0-experimental-e6fb6e074 → 0.0.0-experimental-2d7ec82d5

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +734 -18
  2. package/README.md +5 -14
  3. package/dist/development/chunk-JPPIU5KG.mjs +11511 -0
  4. package/dist/development/data-CQbyyGzl.d.mts +11 -0
  5. package/dist/development/data-CQbyyGzl.d.ts +11 -0
  6. package/dist/development/dom-export.d.mts +23 -0
  7. package/dist/development/dom-export.d.ts +23 -0
  8. package/dist/development/dom-export.js +6347 -0
  9. package/dist/development/dom-export.mjs +222 -0
  10. package/dist/development/fog-of-war-C5L_Yd5M.d.mts +1778 -0
  11. package/dist/development/fog-of-war-DrUCUQQ-.d.ts +1778 -0
  12. package/dist/development/index.d.mts +855 -0
  13. package/dist/development/index.d.ts +855 -0
  14. package/dist/development/index.js +11670 -0
  15. package/dist/development/index.mjs +263 -0
  16. package/dist/development/lib/types/route-module.d.mts +209 -0
  17. package/dist/development/lib/types/route-module.d.ts +209 -0
  18. package/dist/development/lib/types/route-module.js +28 -0
  19. package/dist/development/lib/types/route-module.mjs +10 -0
  20. package/dist/development/route-data-BIYebJr3.d.mts +1749 -0
  21. package/dist/development/route-data-BIYebJr3.d.ts +1749 -0
  22. package/dist/development/rsc-export.d.mts +1788 -0
  23. package/dist/development/rsc-export.d.ts +1788 -0
  24. package/dist/development/rsc-export.js +2784 -0
  25. package/dist/development/rsc-export.mjs +2749 -0
  26. package/dist/production/chunk-O34M5LIX.mjs +11511 -0
  27. package/dist/production/data-CQbyyGzl.d.mts +11 -0
  28. package/dist/production/data-CQbyyGzl.d.ts +11 -0
  29. package/dist/production/dom-export.d.mts +23 -0
  30. package/dist/production/dom-export.d.ts +23 -0
  31. package/dist/production/dom-export.js +6347 -0
  32. package/dist/production/dom-export.mjs +222 -0
  33. package/dist/production/fog-of-war-C5L_Yd5M.d.mts +1778 -0
  34. package/dist/production/fog-of-war-DrUCUQQ-.d.ts +1778 -0
  35. package/dist/production/index.d.mts +855 -0
  36. package/dist/production/index.d.ts +855 -0
  37. package/dist/production/index.js +11670 -0
  38. package/dist/production/index.mjs +263 -0
  39. package/dist/production/lib/types/route-module.d.mts +209 -0
  40. package/dist/production/lib/types/route-module.d.ts +209 -0
  41. package/dist/production/lib/types/route-module.js +28 -0
  42. package/dist/production/lib/types/route-module.mjs +10 -0
  43. package/dist/production/route-data-BIYebJr3.d.mts +1749 -0
  44. package/dist/production/route-data-BIYebJr3.d.ts +1749 -0
  45. package/dist/production/rsc-export.d.mts +1788 -0
  46. package/dist/production/rsc-export.d.ts +1788 -0
  47. package/dist/production/rsc-export.js +2784 -0
  48. package/dist/production/rsc-export.mjs +2749 -0
  49. package/package.json +111 -9
  50. package/dist/index.d.ts +0 -30
  51. package/dist/index.js +0 -1501
  52. package/dist/index.js.map +0 -1
  53. package/dist/lib/components.d.ts +0 -157
  54. package/dist/lib/context.d.ts +0 -102
  55. package/dist/lib/deprecations.d.ts +0 -4
  56. package/dist/lib/hooks.d.ts +0 -181
  57. package/dist/main.js +0 -19
  58. package/dist/react-router.development.js +0 -1397
  59. package/dist/react-router.development.js.map +0 -1
  60. package/dist/react-router.production.min.js +0 -12
  61. package/dist/react-router.production.min.js.map +0 -1
  62. package/dist/umd/react-router.development.js +0 -1624
  63. package/dist/umd/react-router.development.js.map +0 -1
  64. package/dist/umd/react-router.production.min.js +0 -12
  65. package/dist/umd/react-router.production.min.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router",
3
- "version": "0.0.0-experimental-e6fb6e074",
3
+ "version": "0.0.0-experimental-2d7ec82d5",
4
4
  "description": "Declarative routing for React",
5
5
  "keywords": [
6
6
  "react",
@@ -18,19 +18,116 @@
18
18
  "license": "MIT",
19
19
  "author": "Remix Software <hello@remix.run>",
20
20
  "sideEffects": false,
21
- "main": "./dist/main.js",
22
- "unpkg": "./dist/umd/react-router.production.min.js",
23
- "module": "./dist/index.js",
24
- "types": "./dist/index.d.ts",
21
+ "types": "./dist/development/index.d.ts",
22
+ "main": "./dist/development/index.js",
23
+ "module": "./dist/development/index.mjs",
24
+ "exports": {
25
+ ".": {
26
+ "node": {
27
+ "types": "./dist/development/index.d.ts",
28
+ "module": "./dist/development/index.mjs",
29
+ "module-sync": "./dist/development/index.mjs",
30
+ "default": "./dist/development/index.js"
31
+ },
32
+ "module": {
33
+ "types": "./dist/development/index.d.mts",
34
+ "default": "./dist/development/index.mjs"
35
+ },
36
+ "import": {
37
+ "types": "./dist/development/index.d.mts",
38
+ "default": "./dist/development/index.mjs"
39
+ },
40
+ "default": {
41
+ "types": "./dist/development/index.d.ts",
42
+ "default": "./dist/development/index.js"
43
+ }
44
+ },
45
+ "./route-module": {
46
+ "import": {
47
+ "types": "./dist/development/lib/types/route-module.d.mts"
48
+ },
49
+ "default": {
50
+ "types": "./dist/development/lib/types/route-module.d.ts"
51
+ }
52
+ },
53
+ "./dom": {
54
+ "node": {
55
+ "types": "./dist/development/dom-export.d.ts",
56
+ "module": "./dist/development/dom-export.mjs",
57
+ "module-sync": "./dist/development/dom-export.mjs",
58
+ "default": "./dist/development/dom-export.js"
59
+ },
60
+ "module": {
61
+ "types": "./dist/development/dom-export.d.mts",
62
+ "default": "./dist/development/dom-export.mjs"
63
+ },
64
+ "import": {
65
+ "types": "./dist/development/dom-export.d.mts",
66
+ "default": "./dist/development/dom-export.mjs"
67
+ },
68
+ "default": {
69
+ "types": "./dist/development/dom-export.d.ts",
70
+ "default": "./dist/development/dom-export.js"
71
+ }
72
+ },
73
+ "./rsc": {
74
+ "node": {
75
+ "types": "./dist/development/rsc-export.d.ts",
76
+ "module": "./dist/development/rsc-export.mjs",
77
+ "module-sync": "./dist/development/rsc-export.mjs",
78
+ "default": "./dist/development/rsc-export.js"
79
+ },
80
+ "module": {
81
+ "types": "./dist/development/rsc-export.d.mts",
82
+ "default": "./dist/development/rsc-export.mjs"
83
+ },
84
+ "import": {
85
+ "types": "./dist/development/rsc-export.d.mts",
86
+ "default": "./dist/development/rsc-export.mjs"
87
+ },
88
+ "default": {
89
+ "types": "./dist/development/rsc-export.d.ts",
90
+ "default": "./dist/development/rsc-export.js"
91
+ }
92
+ },
93
+ "./package.json": "./package.json"
94
+ },
95
+ "wireit": {
96
+ "build": {
97
+ "command": "rimraf dist && tsup && tsup --config tsup.config.rsc.ts",
98
+ "files": [
99
+ "lib/**",
100
+ "*.ts",
101
+ "tsconfig.json",
102
+ "package.json"
103
+ ],
104
+ "output": [
105
+ "dist/**"
106
+ ]
107
+ }
108
+ },
25
109
  "dependencies": {
26
- "@remix-run/router": "0.0.0-experimental-e6fb6e074"
110
+ "cookie": "^1.0.1",
111
+ "set-cookie-parser": "^2.6.0",
112
+ "turbo-stream": "2.4.0"
27
113
  },
28
114
  "devDependencies": {
115
+ "@types/set-cookie-parser": "^2.4.1",
29
116
  "react": "^18.2.0",
30
- "react-router-dom": "0.0.0-experimental-e6fb6e074"
117
+ "react-dom": "^18.2.0",
118
+ "rimraf": "^6.0.1",
119
+ "tsup": "^8.3.0",
120
+ "typescript": "^5.1.6",
121
+ "wireit": "0.14.9"
31
122
  },
32
123
  "peerDependencies": {
33
- "react": ">=16.8"
124
+ "react": ">=18",
125
+ "react-dom": ">=18"
126
+ },
127
+ "peerDependenciesMeta": {
128
+ "react-dom": {
129
+ "optional": true
130
+ }
34
131
  },
35
132
  "files": [
36
133
  "dist/",
@@ -39,6 +136,11 @@
39
136
  "README.md"
40
137
  ],
41
138
  "engines": {
42
- "node": ">=14.0.0"
139
+ "node": ">=20.0.0"
140
+ },
141
+ "scripts": {
142
+ "build": "wireit",
143
+ "watch": "tsup --watch & tsup --config tsup.config.rsc.ts --watch",
144
+ "typecheck": "tsc"
43
145
  }
44
146
  }
package/dist/index.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import type { ActionFunction, ActionFunctionArgs, AgnosticPatchRoutesOnNavigationFunction, AgnosticPatchRoutesOnNavigationFunctionArgs, Blocker, BlockerFunction, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, Fetcher, HydrationState, InitialEntry, JsonFunction, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, Navigation, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, RedirectFunction, RelativeRoutingType, Router as RemixRouter, FutureConfig as RouterFutureConfig, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch } from "@remix-run/router";
2
- import { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, resolvePath } from "@remix-run/router";
3
- import type { AwaitProps, FutureConfig, IndexRouteProps, LayoutRouteProps, MemoryRouterProps, NavigateProps, OutletProps, PathRouteProps, RouteProps, RouterProps, RouterProviderProps, RoutesProps } from "./lib/components";
4
- import { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, createRoutesFromChildren, renderMatches } from "./lib/components";
5
- import type { DataRouteMatch, DataRouteObject, IndexRouteObject, NavigateOptions, Navigator, NonIndexRouteObject, RouteMatch, RouteObject } from "./lib/context";
6
- import { DataRouterContext, DataRouterStateContext, LocationContext, NavigationContext, RouteContext } from "./lib/context";
7
- import type { NavigateFunction } from "./lib/hooks";
8
- import { useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteId, useRouteLoaderData, useRoutes, useRoutesImpl } from "./lib/hooks";
9
- import { logV6DeprecationWarnings } from "./lib/deprecations";
10
- type Hash = string;
11
- type Pathname = string;
12
- type Search = string;
13
- export type { ActionFunction, ActionFunctionArgs, AwaitProps, DataRouteMatch, DataRouteObject, DataStrategyFunction, DataStrategyFunctionArgs, DataStrategyMatch, DataStrategyResult, ErrorResponse, Fetcher, FutureConfig, Hash, IndexRouteObject, IndexRouteProps, JsonFunction, LayoutRouteProps, LazyRouteFunction, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, NonIndexRouteObject, OutletProps, ParamParseKey, Params, Path, PathMatch, PathParam, PathPattern, PathRouteProps, Pathname, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RouterProviderProps, RoutesProps, Search, ShouldRevalidateFunction, ShouldRevalidateFunctionArgs, To, UIMatch, Blocker, BlockerFunction, };
14
- export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, createPath, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, renderMatches, resolvePath, useBlocker, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, };
15
- export type PatchRoutesOnNavigationFunctionArgs = AgnosticPatchRoutesOnNavigationFunctionArgs<RouteObject, RouteMatch>;
16
- export type PatchRoutesOnNavigationFunction = AgnosticPatchRoutesOnNavigationFunction<RouteObject, RouteMatch>;
17
- declare function mapRouteProperties(route: RouteObject): Partial<RouteObject> & {
18
- hasErrorBoundary: boolean;
19
- };
20
- export declare function createMemoryRouter(routes: RouteObject[], opts?: {
21
- basename?: string;
22
- future?: Partial<Omit<RouterFutureConfig, "v7_prependBasename">>;
23
- hydrationData?: HydrationState;
24
- initialEntries?: InitialEntry[];
25
- initialIndex?: number;
26
- dataStrategy?: DataStrategyFunction;
27
- patchRoutesOnNavigation?: PatchRoutesOnNavigationFunction;
28
- }): RemixRouter;
29
- /** @internal */
30
- export { DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, mapRouteProperties as UNSAFE_mapRouteProperties, useRouteId as UNSAFE_useRouteId, useRoutesImpl as UNSAFE_useRoutesImpl, logV6DeprecationWarnings as UNSAFE_logV6DeprecationWarnings, };