@remix-run/router 1.2.1 → 1.3.0-pre.1
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 +18 -0
- package/dist/history.d.ts +6 -1
- package/dist/index.d.ts +1 -2
- package/dist/router.cjs.js +177 -90
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.d.ts +3 -0
- package/dist/router.js +176 -91
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +177 -90
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/dist/utils.d.ts +14 -7
- package/history.ts +33 -23
- package/index.ts +3 -3
- package/package.json +1 -1
- package/router.ts +95 -39
- package/utils.ts +88 -42
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# `@remix-run/router`
|
|
2
2
|
|
|
3
|
+
## 1.3.0-pre.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix scroll reset if a submission redirects ([#9886](https://github.com/remix-run/react-router/pull/9886))
|
|
8
|
+
|
|
9
|
+
## 1.3.0-pre.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Expose deferred information from createStaticHandler ([#9760](https://github.com/remix-run/react-router/pull/9760))
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Improved absolute redirect url detection in actions/loaders ([#9829](https://github.com/remix-run/react-router/pull/9829))
|
|
18
|
+
- Fix URL creation with memory histories ([#9814](https://github.com/remix-run/react-router/pull/9814))
|
|
19
|
+
- Fix `generatePath` when optional params are present ([#9764](https://github.com/remix-run/react-router/pull/9764))
|
|
20
|
+
|
|
3
21
|
## 1.2.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/history.d.ts
CHANGED
|
@@ -106,6 +106,12 @@ export interface History {
|
|
|
106
106
|
* @param to - The destination URL
|
|
107
107
|
*/
|
|
108
108
|
createHref(to: To): string;
|
|
109
|
+
/**
|
|
110
|
+
* Returns a URL for the given `to` value
|
|
111
|
+
*
|
|
112
|
+
* @param to - The destination URL
|
|
113
|
+
*/
|
|
114
|
+
createURL(to: To): URL;
|
|
109
115
|
/**
|
|
110
116
|
* Encode a location the same way window.history would do (no-op for memory
|
|
111
117
|
* history) so we ensure our PUSH/REPLACE navigations for data routers
|
|
@@ -231,7 +237,6 @@ export declare function createPath({ pathname, search, hash, }: Partial<Path>):
|
|
|
231
237
|
* Parses a string URL path into its separate pathname, search, and hash components.
|
|
232
238
|
*/
|
|
233
239
|
export declare function parsePath(path: string): Partial<Path>;
|
|
234
|
-
export declare function createClientSideURL(location: Location | string): URL;
|
|
235
240
|
export interface UrlHistory extends History {
|
|
236
241
|
}
|
|
237
242
|
export declare type UrlHistoryOptions = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { convertRoutesToDataRoutes, getPathContributingMatches } from "./utils";
|
|
2
1
|
export type { ActionFunction, ActionFunctionArgs, AgnosticDataIndexRouteObject, AgnosticDataNonIndexRouteObject, AgnosticDataRouteMatch, AgnosticDataRouteObject, AgnosticIndexRouteObject, AgnosticNonIndexRouteObject, AgnosticRouteMatch, AgnosticRouteObject, TrackedPromise, FormEncType, FormMethod, JsonFunction, LoaderFunction, LoaderFunctionArgs, ParamParseKey, Params, PathMatch, PathPattern, RedirectFunction, ShouldRevalidateFunction, Submission, } from "./utils";
|
|
3
2
|
export { AbortedDeferredError, ErrorResponse, defer, generatePath, getToPathname, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, resolvePath, resolveTo, stripBasename, warning, } from "./utils";
|
|
4
3
|
export type { BrowserHistory, BrowserHistoryOptions, HashHistory, HashHistoryOptions, History, InitialEntry, Location, MemoryHistory, MemoryHistoryOptions, Path, To, } from "./history";
|
|
5
4
|
export { Action, createBrowserHistory, createPath, createHashHistory, createMemoryHistory, invariant, parsePath, } from "./history";
|
|
6
5
|
export * from "./router";
|
|
7
6
|
/** @internal */
|
|
8
|
-
export { convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, };
|
|
7
|
+
export { DeferredData as UNSAFE_DeferredData, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, } from "./utils";
|