@remix-run/router 1.0.2 → 1.0.3-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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # `@remix-run/router`
2
2
 
3
+ ## 1.0.3-pre.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix `createURL` in local file execution in Firefox ([#9464](https://github.com/remix-run/react-router/pull/9464))
8
+ - make url-encoding history-aware ([#9496](https://github.com/remix-run/react-router/pull/9496))
9
+
10
+ ## 1.0.3-pre.0
11
+
12
+ ### Patch Changes
13
+
14
+ - properly support `index` routes with a path in `useResolvedPath` ([#9486](https://github.com/remix-run/react-router/pull/9486))
15
+ - Fix hrefs generated for `createHashRouter` ([#9409](https://github.com/remix-run/react-router/pull/9409))
16
+ - fix encoding/matching issues with special chars ([#9477](https://github.com/remix-run/react-router/pull/9477))
17
+ - Ignore pathless layout routes when looking for proper submission `action` function ([#9455](https://github.com/remix-run/react-router/pull/9455))
18
+ - Support `basename` and relative routing in `loader`/`action` redirects ([#9447](https://github.com/remix-run/react-router/pull/9447))
19
+ - Add UMD build for `@remix-run/router` ([#9446](https://github.com/remix-run/react-router/pull/9446))
20
+ - Clean up response APIs for `unstable_createStaticHandler` `queryRoute` ([#9465](https://github.com/remix-run/react-router/pull/9465))
21
+ - Changes to static handler for incorporating into Remix ([#9482](https://github.com/remix-run/react-router/pull/9482))
22
+
3
23
  ## 1.0.2
4
24
 
5
25
  ### Patch Changes
@@ -24,6 +44,6 @@ For an overview of the features provided by `react-router`, we recommend you go
24
44
  For an overview of the features provided by `@remix-run/router`, please check out the [`README`][remix-router-readme].
25
45
 
26
46
  [rr-docs]: https://reactrouter.com/
27
- [rr-feature-overview]: https://reactrouter.com/en/v6.4.0/start/overview
28
- [rr-tutorial]: https://reactrouter.com/en/v6.4.0/start/tutorial
47
+ [rr-feature-overview]: https://reactrouter.com/en/6.4.0/start/overview
48
+ [rr-tutorial]: https://reactrouter.com/en/6.4.0/start/tutorial
29
49
  [remix-router-readme]: https://github.com/remix-run/react-router/blob/main/packages/router/README.md
package/dist/history.d.ts CHANGED
@@ -106,6 +106,14 @@ export interface History {
106
106
  * @param to - The destination URL
107
107
  */
108
108
  createHref(to: To): string;
109
+ /**
110
+ * Encode a location the same way window.history would do (no-op for memory
111
+ * history) so we ensure our PUSH/REPLAC e navigations for data routers
112
+ * behave the same as POP
113
+ *
114
+ * @param location The incoming location from router.navigate()
115
+ */
116
+ encodeLocation(location: Location): Location;
109
117
  /**
110
118
  * Pushes a new location onto the history stack, increasing its length by one.
111
119
  * If there were any entries in the stack after the current one, they are
@@ -218,6 +226,7 @@ export declare function createPath({ pathname, search, hash, }: Partial<Path>):
218
226
  * Parses a string URL path into its separate pathname, search, and hash components.
219
227
  */
220
228
  export declare function parsePath(path: string): Partial<Path>;
229
+ export declare function createURL(location: Location | string): URL;
221
230
  export interface UrlHistory extends History {
222
231
  }
223
232
  export declare type UrlHistoryOptions = {
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { convertRoutesToDataRoutes } from "./utils";
1
+ import { convertRoutesToDataRoutes, getPathContributingMatches } from "./utils";
2
2
  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
3
  export { AbortedDeferredError, ErrorResponse, defer, generatePath, getToPathname, invariant, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, redirect, resolvePath, resolveTo, stripBasename, warning, } from "./utils";
4
4
  export type { BrowserHistory, BrowserHistoryOptions, HashHistory, HashHistoryOptions, History, InitialEntry, Location, MemoryHistory, MemoryHistoryOptions, Path, To, } from "./history";
5
5
  export { Action, createBrowserHistory, createPath, createHashHistory, createMemoryHistory, parsePath, } from "./history";
6
6
  export * from "./router";
7
7
  /** @internal */
8
- export { convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes };
8
+ export { convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, };