@remix-run/router 1.16.1 → 1.17.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 +9 -0
- package/dist/index.d.ts +1 -1
- package/dist/router.cjs.js +467 -80
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.d.ts +11 -1
- package/dist/router.js +457 -76
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +467 -80
- 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 +9 -1
- package/index.ts +1 -0
- package/package.json +1 -1
- package/router.ts +586 -73
- package/utils.ts +51 -8
package/dist/utils.d.ts
CHANGED
|
@@ -200,6 +200,13 @@ export interface DataStrategyFunctionArgs<Context = any> extends DataFunctionArg
|
|
|
200
200
|
export interface DataStrategyFunction {
|
|
201
201
|
(args: DataStrategyFunctionArgs): Promise<HandlerResult[]>;
|
|
202
202
|
}
|
|
203
|
+
export interface AgnosticPatchRoutesOnMissFunction<M extends AgnosticRouteMatch = AgnosticRouteMatch> {
|
|
204
|
+
(opts: {
|
|
205
|
+
path: string;
|
|
206
|
+
matches: M[];
|
|
207
|
+
patch: (routeId: string | null, children: AgnosticRouteObject[]) => void;
|
|
208
|
+
}): void | Promise<void>;
|
|
209
|
+
}
|
|
203
210
|
/**
|
|
204
211
|
* Function provided by the framework-aware layers to set any framework-specific
|
|
205
212
|
* properties from framework-agnostic properties
|
|
@@ -314,13 +321,14 @@ export interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjec
|
|
|
314
321
|
}
|
|
315
322
|
export interface AgnosticDataRouteMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
|
|
316
323
|
}
|
|
317
|
-
export declare function convertRoutesToDataRoutes(routes: AgnosticRouteObject[], mapRouteProperties: MapRoutePropertiesFunction, parentPath?:
|
|
324
|
+
export declare function convertRoutesToDataRoutes(routes: AgnosticRouteObject[], mapRouteProperties: MapRoutePropertiesFunction, parentPath?: string[], manifest?: RouteManifest): AgnosticDataRouteObject[];
|
|
318
325
|
/**
|
|
319
326
|
* Matches the given routes to a location and returns the match data.
|
|
320
327
|
*
|
|
321
328
|
* @see https://reactrouter.com/utils/match-routes
|
|
322
329
|
*/
|
|
323
330
|
export declare function matchRoutes<RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject>(routes: RouteObjectType[], locationArg: Partial<Location> | string, basename?: string): AgnosticRouteMatch<string, RouteObjectType>[] | null;
|
|
331
|
+
export declare function matchRoutesImpl<RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject>(routes: RouteObjectType[], locationArg: Partial<Location> | string, basename: string, allowPartial: boolean): AgnosticRouteMatch<string, RouteObjectType>[] | null;
|
|
324
332
|
export interface UIMatch<Data = unknown, Handle = unknown> {
|
|
325
333
|
id: string;
|
|
326
334
|
pathname: string;
|
package/index.ts
CHANGED