@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/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?: number[], manifest?: RouteManifest): AgnosticDataRouteObject[];
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
@@ -23,6 +23,7 @@ export type {
23
23
  LoaderFunctionArgs,
24
24
  ParamParseKey,
25
25
  Params,
26
+ AgnosticPatchRoutesOnMissFunction as unstable_AgnosticPatchRoutesOnMissFunction,
26
27
  PathMatch,
27
28
  PathParam,
28
29
  PathPattern,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix-run/router",
3
- "version": "1.16.1",
3
+ "version": "1.17.0",
4
4
  "description": "Nested/Data-driven/Framework-agnostic Routing",
5
5
  "keywords": [
6
6
  "remix",