| 1 | import * as React from 'react';
|
| 2 | import { ComponentType, ReactElement } from 'react';
|
| 3 |
|
| 4 | |
| 5 | |
| 6 | |
| 7 |
|
| 8 | interface Future {
|
| 9 | }
|
| 10 | type MiddlewareEnabled = Future extends {
|
| 11 | unstable_middleware: infer T extends boolean;
|
| 12 | } ? T : false;
|
| 13 |
|
| 14 | |
| 15 | |
| 16 |
|
| 17 | declare enum Action {
|
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 |
|
| 25 | Pop = "POP",
|
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 |
|
| 31 | Push = "PUSH",
|
| 32 | |
| 33 | |
| 34 | |
| 35 |
|
| 36 | Replace = "REPLACE"
|
| 37 | }
|
| 38 | |
| 39 | |
| 40 |
|
| 41 | interface Path {
|
| 42 | |
| 43 | |
| 44 |
|
| 45 | pathname: string;
|
| 46 | |
| 47 | |
| 48 |
|
| 49 | search: string;
|
| 50 | |
| 51 | |
| 52 |
|
| 53 | hash: string;
|
| 54 | }
|
| 55 | |
| 56 | |
| 57 | |
| 58 |
|
| 59 | interface Location<State = any> extends Path {
|
| 60 | |
| 61 | |
| 62 |
|
| 63 | state: State;
|
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 |
|
| 70 | key: string;
|
| 71 | }
|
| 72 | |
| 73 | |
| 74 |
|
| 75 | interface Update {
|
| 76 | |
| 77 | |
| 78 |
|
| 79 | action: Action;
|
| 80 | |
| 81 | |
| 82 |
|
| 83 | location: Location;
|
| 84 | |
| 85 | |
| 86 |
|
| 87 | delta: number | null;
|
| 88 | }
|
| 89 | |
| 90 | |
| 91 |
|
| 92 | interface Listener {
|
| 93 | (update: Update): void;
|
| 94 | }
|
| 95 | |
| 96 | |
| 97 | |
| 98 |
|
| 99 | type To = string | Partial<Path>;
|
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 |
|
| 108 | interface History {
|
| 109 | |
| 110 | |
| 111 | |
| 112 |
|
| 113 | readonly action: Action;
|
| 114 | |
| 115 | |
| 116 |
|
| 117 | readonly location: Location;
|
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 |
|
| 124 | createHref(to: To): string;
|
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 |
|
| 130 | createURL(to: To): URL;
|
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 |
|
| 138 | encodeLocation(to: To): Path;
|
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | |
| 146 |
|
| 147 | push(to: To, state?: any): void;
|
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 |
|
| 155 | replace(to: To, state?: any): void;
|
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 |
|
| 162 | go(delta: number): void;
|
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 |
|
| 170 | listen(listener: Listener): () => void;
|
| 171 | }
|
| 172 | |
| 173 | |
| 174 | |
| 175 |
|
| 176 | type InitialEntry = string | Partial<Location>;
|
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 |
|
| 184 | interface BrowserHistory extends UrlHistory {
|
| 185 | }
|
| 186 | type BrowserHistoryOptions = UrlHistoryOptions;
|
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 |
|
| 194 | declare function createBrowserHistory(options?: BrowserHistoryOptions): BrowserHistory;
|
| 195 | |
| 196 | |
| 197 |
|
| 198 | declare function invariant(value: boolean, message?: string): asserts value;
|
| 199 | declare function invariant<T>(value: T | null | undefined, message?: string): asserts value is T;
|
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 |
|
| 205 | declare function createPath({ pathname, search, hash, }: Partial<Path>): string;
|
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 |
|
| 211 | declare function parsePath(path: string): Partial<Path>;
|
| 212 | interface UrlHistory extends History {
|
| 213 | }
|
| 214 | type UrlHistoryOptions = {
|
| 215 | window?: Window;
|
| 216 | v5Compat?: boolean;
|
| 217 | };
|
| 218 |
|
| 219 | type MaybePromise<T> = T | Promise<T>;
|
| 220 | |
| 221 | |
| 222 |
|
| 223 | interface RouteData {
|
| 224 | [routeId: string]: any;
|
| 225 | }
|
| 226 | type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
|
| 227 | type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
|
| 228 | |
| 229 | |
| 230 | |
| 231 |
|
| 232 | type HTMLFormMethod = LowerCaseFormMethod | UpperCaseFormMethod;
|
| 233 | |
| 234 | |
| 235 | |
| 236 |
|
| 237 | type FormMethod = UpperCaseFormMethod;
|
| 238 | type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain";
|
| 239 | type JsonObject = {
|
| 240 | [Key in string]: JsonValue;
|
| 241 | } & {
|
| 242 | [Key in string]?: JsonValue | undefined;
|
| 243 | };
|
| 244 | type JsonArray = JsonValue[] | readonly JsonValue[];
|
| 245 | type JsonPrimitive = string | number | boolean | null;
|
| 246 | type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 |
|
| 252 | type Submission = {
|
| 253 | formMethod: FormMethod;
|
| 254 | formAction: string;
|
| 255 | formEncType: FormEncType;
|
| 256 | formData: FormData;
|
| 257 | json: undefined;
|
| 258 | text: undefined;
|
| 259 | } | {
|
| 260 | formMethod: FormMethod;
|
| 261 | formAction: string;
|
| 262 | formEncType: FormEncType;
|
| 263 | formData: undefined;
|
| 264 | json: JsonValue;
|
| 265 | text: undefined;
|
| 266 | } | {
|
| 267 | formMethod: FormMethod;
|
| 268 | formAction: string;
|
| 269 | formEncType: FormEncType;
|
| 270 | formData: undefined;
|
| 271 | json: undefined;
|
| 272 | text: string;
|
| 273 | };
|
| 274 | interface unstable_RouterContext<T = unknown> {
|
| 275 | defaultValue?: T;
|
| 276 | }
|
| 277 | |
| 278 | |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 |
|
| 287 | declare function unstable_createContext<T>(defaultValue?: T): unstable_RouterContext<T>;
|
| 288 | |
| 289 | |
| 290 | |
| 291 |
|
| 292 | type unstable_InitialContext = Map<unstable_RouterContext, unknown>;
|
| 293 | |
| 294 | |
| 295 |
|
| 296 | declare class unstable_RouterContextProvider {
|
| 297 | #private;
|
| 298 | constructor(init?: unstable_InitialContext);
|
| 299 | get<T>(context: unstable_RouterContext<T>): T;
|
| 300 | set<C extends unstable_RouterContext>(context: C, value: C extends unstable_RouterContext<infer T> ? T : never): void;
|
| 301 | }
|
| 302 | type DefaultContext = MiddlewareEnabled extends true ? unstable_RouterContextProvider : any;
|
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 |
|
| 308 | interface DataFunctionArgs<Context> {
|
| 309 |
|
| 310 | request: Request;
|
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 |
|
| 325 | params: Params;
|
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 |
|
| 331 | context: Context;
|
| 332 | }
|
| 333 | |
| 334 | |
| 335 | |
| 336 |
|
| 337 | interface unstable_MiddlewareNextFunction<Result = unknown> {
|
| 338 | (): MaybePromise<Result>;
|
| 339 | }
|
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | |
| 345 |
|
| 346 | type unstable_MiddlewareFunction<Result = unknown> = (args: DataFunctionArgs<unstable_RouterContextProvider>, next: unstable_MiddlewareNextFunction<Result>) => MaybePromise<Result | void>;
|
| 347 | |
| 348 | |
| 349 |
|
| 350 | interface LoaderFunctionArgs<Context = DefaultContext> extends DataFunctionArgs<Context> {
|
| 351 | }
|
| 352 | |
| 353 | |
| 354 |
|
| 355 | interface ActionFunctionArgs<Context = DefaultContext> extends DataFunctionArgs<Context> {
|
| 356 | }
|
| 357 | |
| 358 | |
| 359 |
|
| 360 | type DataFunctionValue = unknown;
|
| 361 | type DataFunctionReturnValue = MaybePromise<DataFunctionValue>;
|
| 362 | |
| 363 | |
| 364 |
|
| 365 | type LoaderFunction<Context = DefaultContext> = {
|
| 366 | (args: LoaderFunctionArgs<Context>, handlerCtx?: unknown): DataFunctionReturnValue;
|
| 367 | } & {
|
| 368 | hydrate?: boolean;
|
| 369 | };
|
| 370 | |
| 371 | |
| 372 |
|
| 373 | interface ActionFunction<Context = DefaultContext> {
|
| 374 | (args: ActionFunctionArgs<Context>, handlerCtx?: unknown): DataFunctionReturnValue;
|
| 375 | }
|
| 376 | |
| 377 | |
| 378 |
|
| 379 | interface ShouldRevalidateFunctionArgs {
|
| 380 |
|
| 381 | currentUrl: URL;
|
| 382 |
|
| 383 | currentParams: AgnosticDataRouteMatch["params"];
|
| 384 |
|
| 385 | nextUrl: URL;
|
| 386 |
|
| 387 | nextParams: AgnosticDataRouteMatch["params"];
|
| 388 |
|
| 389 | formMethod?: Submission["formMethod"];
|
| 390 |
|
| 391 | formAction?: Submission["formAction"];
|
| 392 |
|
| 393 | formEncType?: Submission["formEncType"];
|
| 394 |
|
| 395 | text?: Submission["text"];
|
| 396 |
|
| 397 | formData?: Submission["formData"];
|
| 398 |
|
| 399 | json?: Submission["json"];
|
| 400 |
|
| 401 | actionStatus?: number;
|
| 402 | |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 |
|
| 420 | actionResult?: any;
|
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 |
|
| 430 | defaultShouldRevalidate: boolean;
|
| 431 | }
|
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 |
|
| 439 | interface ShouldRevalidateFunction {
|
| 440 | (args: ShouldRevalidateFunctionArgs): boolean;
|
| 441 | }
|
| 442 | interface DataStrategyMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
|
| 443 | |
| 444 | |
| 445 |
|
| 446 | _lazyPromises?: {
|
| 447 | middleware: Promise<void> | undefined;
|
| 448 | handler: Promise<void> | undefined;
|
| 449 | route: Promise<void> | undefined;
|
| 450 | };
|
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | |
| 469 | |
| 470 | |
| 471 |
|
| 472 | shouldLoad: boolean;
|
| 473 | unstable_shouldRevalidateArgs: ShouldRevalidateFunctionArgs | null;
|
| 474 | unstable_shouldCallHandler(defaultShouldRevalidate?: boolean): boolean;
|
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 |
|
| 489 | resolve: (handlerOverride?: (handler: (ctx?: unknown) => DataFunctionReturnValue) => DataFunctionReturnValue) => Promise<DataStrategyResult>;
|
| 490 | }
|
| 491 | interface DataStrategyFunctionArgs<Context = DefaultContext> extends DataFunctionArgs<Context> {
|
| 492 | |
| 493 | |
| 494 |
|
| 495 | matches: DataStrategyMatch[];
|
| 496 | unstable_runClientMiddleware: (cb: DataStrategyFunction<Context>) => Promise<Record<string, DataStrategyResult>>;
|
| 497 | |
| 498 | |
| 499 | |
| 500 |
|
| 501 | fetcherKey: string | null;
|
| 502 | }
|
| 503 | |
| 504 | |
| 505 |
|
| 506 | interface DataStrategyResult {
|
| 507 | type: "data" | "error";
|
| 508 | result: unknown;
|
| 509 | }
|
| 510 | interface DataStrategyFunction<Context = DefaultContext> {
|
| 511 | (args: DataStrategyFunctionArgs<Context>): Promise<Record<string, DataStrategyResult>>;
|
| 512 | }
|
| 513 | type AgnosticPatchRoutesOnNavigationFunctionArgs<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = {
|
| 514 | signal: AbortSignal;
|
| 515 | path: string;
|
| 516 | matches: M[];
|
| 517 | fetcherKey: string | undefined;
|
| 518 | patch: (routeId: string | null, children: O[]) => void;
|
| 519 | };
|
| 520 | type AgnosticPatchRoutesOnNavigationFunction<O extends AgnosticRouteObject = AgnosticRouteObject, M extends AgnosticRouteMatch = AgnosticRouteMatch> = (opts: AgnosticPatchRoutesOnNavigationFunctionArgs<O, M>) => MaybePromise<void>;
|
| 521 | |
| 522 | |
| 523 | |
| 524 |
|
| 525 | interface MapRoutePropertiesFunction {
|
| 526 | (route: AgnosticRouteObject): {
|
| 527 | hasErrorBoundary: boolean;
|
| 528 | } & Record<string, any>;
|
| 529 | }
|
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 |
|
| 535 | type UnsupportedLazyRouteObjectKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children";
|
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 |
|
| 541 | type UnsupportedLazyRouteFunctionKey = UnsupportedLazyRouteObjectKey | "unstable_middleware";
|
| 542 | |
| 543 | |
| 544 | |
| 545 |
|
| 546 | type LazyRouteObject<R extends AgnosticRouteObject> = {
|
| 547 | [K in keyof R as K extends UnsupportedLazyRouteObjectKey ? never : K]?: () => Promise<R[K] | null | undefined>;
|
| 548 | };
|
| 549 | |
| 550 | |
| 551 | |
| 552 |
|
| 553 | interface LazyRouteFunction<R extends AgnosticRouteObject> {
|
| 554 | (): Promise<Omit<R, UnsupportedLazyRouteFunctionKey> & Partial<Record<UnsupportedLazyRouteFunctionKey, never>>>;
|
| 555 | }
|
| 556 | type LazyRouteDefinition<R extends AgnosticRouteObject> = LazyRouteObject<R> | LazyRouteFunction<R>;
|
| 557 | |
| 558 | |
| 559 |
|
| 560 | type AgnosticBaseRouteObject = {
|
| 561 | caseSensitive?: boolean;
|
| 562 | path?: string;
|
| 563 | id?: string;
|
| 564 | unstable_middleware?: unstable_MiddlewareFunction[];
|
| 565 | loader?: LoaderFunction | boolean;
|
| 566 | action?: ActionFunction | boolean;
|
| 567 | hasErrorBoundary?: boolean;
|
| 568 | shouldRevalidate?: ShouldRevalidateFunction;
|
| 569 | handle?: any;
|
| 570 | lazy?: LazyRouteDefinition<AgnosticBaseRouteObject>;
|
| 571 | };
|
| 572 | |
| 573 | |
| 574 |
|
| 575 | type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {
|
| 576 | children?: undefined;
|
| 577 | index: true;
|
| 578 | };
|
| 579 | |
| 580 | |
| 581 |
|
| 582 | type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {
|
| 583 | children?: AgnosticRouteObject[];
|
| 584 | index?: false;
|
| 585 | };
|
| 586 | |
| 587 | |
| 588 | |
| 589 |
|
| 590 | type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
|
| 591 | type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
|
| 592 | id: string;
|
| 593 | };
|
| 594 | type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
|
| 595 | children?: AgnosticDataRouteObject[];
|
| 596 | id: string;
|
| 597 | };
|
| 598 | |
| 599 | |
| 600 |
|
| 601 | type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
|
| 602 | type RouteManifest<R = AgnosticDataRouteObject> = Record<string, R | undefined>;
|
| 603 | type Regex_az = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z";
|
| 604 | type Regez_AZ = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z";
|
| 605 | type Regex_09 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
| 606 | type Regex_w = Regex_az | Regez_AZ | Regex_09 | "_";
|
| 607 | type ParamChar = Regex_w | "-";
|
| 608 | type RegexMatchPlus<CharPattern extends string, T extends string> = T extends `${infer First}${infer Rest}` ? First extends CharPattern ? RegexMatchPlus<CharPattern, Rest> extends never ? First : `${First}${RegexMatchPlus<CharPattern, Rest>}` : never : never;
|
| 609 | type _PathParam<Path extends string> = Path extends `${infer L}/${infer R}` ? _PathParam<L> | _PathParam<R> : Path extends `:${infer Param}` ? Param extends `${infer Optional}?${string}` ? RegexMatchPlus<ParamChar, Optional> : RegexMatchPlus<ParamChar, Param> : never;
|
| 610 | type PathParam<Path extends string> = Path extends "*" | "/*" ? "*" : Path extends `${infer Rest}/*` ? "*" | _PathParam<Rest> : _PathParam<Path>;
|
| 611 | type ParamParseKey<Segment extends string> = [
|
| 612 | PathParam<Segment>
|
| 613 | ] extends [never] ? string : PathParam<Segment>;
|
| 614 | |
| 615 | |
| 616 |
|
| 617 | type Params<Key extends string = string> = {
|
| 618 | readonly [key in Key]: string | undefined;
|
| 619 | };
|
| 620 | |
| 621 | |
| 622 |
|
| 623 | interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
|
| 624 | |
| 625 | |
| 626 |
|
| 627 | params: Params<ParamKey>;
|
| 628 | |
| 629 | |
| 630 |
|
| 631 | pathname: string;
|
| 632 | |
| 633 | |
| 634 |
|
| 635 | pathnameBase: string;
|
| 636 | |
| 637 | |
| 638 |
|
| 639 | route: RouteObjectType;
|
| 640 | }
|
| 641 | interface AgnosticDataRouteMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
|
| 642 | }
|
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 |
|
| 648 | declare function matchRoutes<RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject>(routes: RouteObjectType[], locationArg: Partial<Location> | string, basename?: string): AgnosticRouteMatch<string, RouteObjectType>[] | null;
|
| 649 | interface UIMatch<Data = unknown, Handle = unknown> {
|
| 650 | id: string;
|
| 651 | pathname: string;
|
| 652 | |
| 653 | |
| 654 |
|
| 655 | params: AgnosticRouteMatch["params"];
|
| 656 |
|
| 657 | data: Data;
|
| 658 |
|
| 659 | handle: Handle;
|
| 660 | }
|
| 661 | |
| 662 | |
| 663 | |
| 664 | |
| 665 |
|
| 666 | declare function generatePath<Path extends string>(originalPath: Path, params?: {
|
| 667 | [key in PathParam<Path>]: string | null;
|
| 668 | }): string;
|
| 669 | |
| 670 | |
| 671 |
|
| 672 | interface PathPattern<Path extends string = string> {
|
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 |
|
| 678 | path: Path;
|
| 679 | |
| 680 | |
| 681 | |
| 682 |
|
| 683 | caseSensitive?: boolean;
|
| 684 | |
| 685 | |
| 686 |
|
| 687 | end?: boolean;
|
| 688 | }
|
| 689 | |
| 690 | |
| 691 |
|
| 692 | interface PathMatch<ParamKey extends string = string> {
|
| 693 | |
| 694 | |
| 695 |
|
| 696 | params: Params<ParamKey>;
|
| 697 | |
| 698 | |
| 699 |
|
| 700 | pathname: string;
|
| 701 | |
| 702 | |
| 703 |
|
| 704 | pathnameBase: string;
|
| 705 | |
| 706 | |
| 707 |
|
| 708 | pattern: PathPattern;
|
| 709 | }
|
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 |
|
| 716 | declare function matchPath<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path, pathname: string): PathMatch<ParamKey> | null;
|
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 |
|
| 722 | declare function resolvePath(to: To, fromPathname?: string): Path;
|
| 723 | declare class DataWithResponseInit<D> {
|
| 724 | type: string;
|
| 725 | data: D;
|
| 726 | init: ResponseInit | null;
|
| 727 | constructor(data: D, init?: ResponseInit);
|
| 728 | }
|
| 729 | |
| 730 | |
| 731 | |
| 732 | |
| 733 | |
| 734 |
|
| 735 | declare function data<D>(data: D, init?: number | ResponseInit): DataWithResponseInit<D>;
|
| 736 | type RedirectFunction = (url: string, init?: number | ResponseInit) => Response;
|
| 737 | |
| 738 | |
| 739 | |
| 740 | |
| 741 | |
| 742 |
|
| 743 | declare const redirect: RedirectFunction;
|
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | |
| 749 | |
| 750 |
|
| 751 | declare const redirectDocument: RedirectFunction;
|
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 |
|
| 760 | declare const replace: RedirectFunction;
|
| 761 | type ErrorResponse = {
|
| 762 | status: number;
|
| 763 | statusText: string;
|
| 764 | data: any;
|
| 765 | };
|
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 |
|
| 774 | declare class ErrorResponseImpl implements ErrorResponse {
|
| 775 | status: number;
|
| 776 | statusText: string;
|
| 777 | data: any;
|
| 778 | private error?;
|
| 779 | private internal;
|
| 780 | constructor(status: number, statusText: string | undefined, data: any, internal?: boolean);
|
| 781 | }
|
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | |
| 787 |
|
| 788 | declare function isRouteErrorResponse(error: any): error is ErrorResponse;
|
| 789 |
|
| 790 | |
| 791 | |
| 792 |
|
| 793 | interface Router {
|
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 |
|
| 800 | get basename(): RouterInit["basename"];
|
| 801 | |
| 802 | |
| 803 | |
| 804 | |
| 805 | |
| 806 |
|
| 807 | get future(): FutureConfig;
|
| 808 | |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 |
|
| 814 | get state(): RouterState;
|
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 |
|
| 821 | get routes(): AgnosticDataRouteObject[];
|
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 |
|
| 828 | get window(): RouterInit["window"];
|
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 |
|
| 837 | initialize(): Router;
|
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 |
|
| 846 | subscribe(fn: RouterSubscriber): () => void;
|
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 |
|
| 858 | enableScrollRestoration(savedScrollPositions: Record<string, number>, getScrollPosition: GetScrollPositionFunction, getKey?: GetScrollRestorationKeyFunction): () => void;
|
| 859 | |
| 860 | |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 |
|
| 866 | navigate(to: number): Promise<void>;
|
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 |
|
| 872 | navigate(to: To | null, opts?: RouterNavigateOptions): Promise<void>;
|
| 873 | |
| 874 | |
| 875 | |
| 876 | |
| 877 | |
| 878 | |
| 879 | |
| 880 | |
| 881 | |
| 882 | |
| 883 |
|
| 884 | fetch(key: string, routeId: string, href: string | null, opts?: RouterFetchOptions): Promise<void>;
|
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 |
|
| 891 | revalidate(): Promise<void>;
|
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 |
|
| 899 | createHref(location: Location | URL): string;
|
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 |
|
| 908 | encodeLocation(to: To): Path;
|
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 |
|
| 916 | getFetcher<TData = any>(key: string): Fetcher<TData>;
|
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 |
|
| 924 | deleteFetcher(key: string): void;
|
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 |
|
| 931 | dispose(): void;
|
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | |
| 938 | |
| 939 |
|
| 940 | getBlocker(key: string, fn: BlockerFunction): Blocker;
|
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | |
| 946 | |
| 947 |
|
| 948 | deleteBlocker(key: string): void;
|
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 |
|
| 961 | patchRoutes(routeId: string | null, children: AgnosticRouteObject[], unstable_allowElementMutations?: boolean): void;
|
| 962 | |
| 963 | |
| 964 | |
| 965 | |
| 966 | |
| 967 | |
| 968 |
|
| 969 | _internalSetRoutes(routes: AgnosticRouteObject[]): void;
|
| 970 | |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 |
|
| 976 | _internalSetStateDoNotUseOrYouWillBreakYourApp(state: Partial<RouterState>): void;
|
| 977 | |
| 978 | |
| 979 | |
| 980 | |
| 981 | |
| 982 |
|
| 983 | _internalFetchControllers: Map<string, AbortController>;
|
| 984 | }
|
| 985 | |
| 986 | |
| 987 | |
| 988 |
|
| 989 | interface RouterState {
|
| 990 | |
| 991 | |
| 992 |
|
| 993 | historyAction: Action;
|
| 994 | |
| 995 | |
| 996 |
|
| 997 | location: Location;
|
| 998 | |
| 999 | |
| 1000 |
|
| 1001 | matches: AgnosticDataRouteMatch[];
|
| 1002 | |
| 1003 | |
| 1004 |
|
| 1005 | initialized: boolean;
|
| 1006 | |
| 1007 | |
| 1008 | |
| 1009 | |
| 1010 | |
| 1011 |
|
| 1012 | restoreScrollPosition: number | false | null;
|
| 1013 | |
| 1014 | |
| 1015 | |
| 1016 |
|
| 1017 | preventScrollReset: boolean;
|
| 1018 | |
| 1019 | |
| 1020 |
|
| 1021 | navigation: Navigation;
|
| 1022 | |
| 1023 | |
| 1024 |
|
| 1025 | revalidation: RevalidationState;
|
| 1026 | |
| 1027 | |
| 1028 |
|
| 1029 | loaderData: RouteData;
|
| 1030 | |
| 1031 | |
| 1032 |
|
| 1033 | actionData: RouteData | null;
|
| 1034 | |
| 1035 | |
| 1036 |
|
| 1037 | errors: RouteData | null;
|
| 1038 | |
| 1039 | |
| 1040 |
|
| 1041 | fetchers: Map<string, Fetcher>;
|
| 1042 | |
| 1043 | |
| 1044 |
|
| 1045 | blockers: Map<string, Blocker>;
|
| 1046 | }
|
| 1047 | |
| 1048 | |
| 1049 |
|
| 1050 | type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
|
| 1051 | |
| 1052 | |
| 1053 |
|
| 1054 | interface FutureConfig {
|
| 1055 | unstable_middleware: boolean;
|
| 1056 | }
|
| 1057 | |
| 1058 | |
| 1059 |
|
| 1060 | interface RouterInit {
|
| 1061 | routes: AgnosticRouteObject[];
|
| 1062 | history: History;
|
| 1063 | basename?: string;
|
| 1064 | unstable_getContext?: () => MaybePromise<unstable_InitialContext>;
|
| 1065 | mapRouteProperties?: MapRoutePropertiesFunction;
|
| 1066 | future?: Partial<FutureConfig>;
|
| 1067 | hydrationRouteProperties?: string[];
|
| 1068 | hydrationData?: HydrationState;
|
| 1069 | window?: Window;
|
| 1070 | dataStrategy?: DataStrategyFunction;
|
| 1071 | patchRoutesOnNavigation?: AgnosticPatchRoutesOnNavigationFunction;
|
| 1072 | }
|
| 1073 | |
| 1074 | |
| 1075 |
|
| 1076 | interface StaticHandlerContext {
|
| 1077 | basename: Router["basename"];
|
| 1078 | location: RouterState["location"];
|
| 1079 | matches: RouterState["matches"];
|
| 1080 | loaderData: RouterState["loaderData"];
|
| 1081 | actionData: RouterState["actionData"];
|
| 1082 | errors: RouterState["errors"];
|
| 1083 | statusCode: number;
|
| 1084 | loaderHeaders: Record<string, Headers>;
|
| 1085 | actionHeaders: Record<string, Headers>;
|
| 1086 | _deepestRenderedBoundaryId?: string | null;
|
| 1087 | }
|
| 1088 | |
| 1089 | |
| 1090 |
|
| 1091 | interface StaticHandler {
|
| 1092 | dataRoutes: AgnosticDataRouteObject[];
|
| 1093 | query(request: Request, opts?: {
|
| 1094 | requestContext?: unknown;
|
| 1095 | filterMatchesToLoad?: (match: AgnosticDataRouteMatch) => boolean;
|
| 1096 | skipLoaderErrorBubbling?: boolean;
|
| 1097 | skipRevalidation?: boolean;
|
| 1098 | dataStrategy?: DataStrategyFunction<unknown>;
|
| 1099 | unstable_respond?: (staticContext: StaticHandlerContext) => MaybePromise<Response>;
|
| 1100 | unstable_stream?: (context: unstable_RouterContextProvider, query: (r: Request) => Promise<StaticHandlerContext | Response>) => MaybePromise<Response>;
|
| 1101 | }): Promise<StaticHandlerContext | Response>;
|
| 1102 | queryRoute(request: Request, opts?: {
|
| 1103 | routeId?: string;
|
| 1104 | requestContext?: unknown;
|
| 1105 | dataStrategy?: DataStrategyFunction<unknown>;
|
| 1106 | unstable_respond?: (res: Response) => MaybePromise<Response>;
|
| 1107 | }): Promise<any>;
|
| 1108 | }
|
| 1109 | type ViewTransitionOpts = {
|
| 1110 | currentLocation: Location;
|
| 1111 | nextLocation: Location;
|
| 1112 | };
|
| 1113 | |
| 1114 | |
| 1115 |
|
| 1116 | interface RouterSubscriber {
|
| 1117 | (state: RouterState, opts: {
|
| 1118 | deletedFetchers: string[];
|
| 1119 | viewTransitionOpts?: ViewTransitionOpts;
|
| 1120 | flushSync: boolean;
|
| 1121 | }): void;
|
| 1122 | }
|
| 1123 | |
| 1124 | |
| 1125 | |
| 1126 |
|
| 1127 | interface GetScrollRestorationKeyFunction {
|
| 1128 | (location: Location, matches: UIMatch[]): string | null;
|
| 1129 | }
|
| 1130 | |
| 1131 | |
| 1132 |
|
| 1133 | interface GetScrollPositionFunction {
|
| 1134 | (): number;
|
| 1135 | }
|
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | |
| 1143 |
|
| 1144 | type RelativeRoutingType = "route" | "path";
|
| 1145 | type BaseNavigateOrFetchOptions = {
|
| 1146 | preventScrollReset?: boolean;
|
| 1147 | relative?: RelativeRoutingType;
|
| 1148 | flushSync?: boolean;
|
| 1149 | };
|
| 1150 | type BaseNavigateOptions = BaseNavigateOrFetchOptions & {
|
| 1151 | replace?: boolean;
|
| 1152 | state?: any;
|
| 1153 | fromRouteId?: string;
|
| 1154 | viewTransition?: boolean;
|
| 1155 | };
|
| 1156 | type BaseSubmissionOptions = {
|
| 1157 | formMethod?: HTMLFormMethod;
|
| 1158 | formEncType?: FormEncType;
|
| 1159 | } & ({
|
| 1160 | formData: FormData;
|
| 1161 | body?: undefined;
|
| 1162 | } | {
|
| 1163 | formData?: undefined;
|
| 1164 | body: any;
|
| 1165 | });
|
| 1166 | |
| 1167 | |
| 1168 |
|
| 1169 | type LinkNavigateOptions = BaseNavigateOptions;
|
| 1170 | |
| 1171 | |
| 1172 |
|
| 1173 | type SubmissionNavigateOptions = BaseNavigateOptions & BaseSubmissionOptions;
|
| 1174 | |
| 1175 | |
| 1176 |
|
| 1177 | type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
|
| 1178 | |
| 1179 | |
| 1180 |
|
| 1181 | type LoadFetchOptions = BaseNavigateOrFetchOptions;
|
| 1182 | |
| 1183 | |
| 1184 |
|
| 1185 | type SubmitFetchOptions = BaseNavigateOrFetchOptions & BaseSubmissionOptions;
|
| 1186 | |
| 1187 | |
| 1188 |
|
| 1189 | type RouterFetchOptions = LoadFetchOptions | SubmitFetchOptions;
|
| 1190 | |
| 1191 | |
| 1192 |
|
| 1193 | type NavigationStates = {
|
| 1194 | Idle: {
|
| 1195 | state: "idle";
|
| 1196 | location: undefined;
|
| 1197 | formMethod: undefined;
|
| 1198 | formAction: undefined;
|
| 1199 | formEncType: undefined;
|
| 1200 | formData: undefined;
|
| 1201 | json: undefined;
|
| 1202 | text: undefined;
|
| 1203 | };
|
| 1204 | Loading: {
|
| 1205 | state: "loading";
|
| 1206 | location: Location;
|
| 1207 | formMethod: Submission["formMethod"] | undefined;
|
| 1208 | formAction: Submission["formAction"] | undefined;
|
| 1209 | formEncType: Submission["formEncType"] | undefined;
|
| 1210 | formData: Submission["formData"] | undefined;
|
| 1211 | json: Submission["json"] | undefined;
|
| 1212 | text: Submission["text"] | undefined;
|
| 1213 | };
|
| 1214 | Submitting: {
|
| 1215 | state: "submitting";
|
| 1216 | location: Location;
|
| 1217 | formMethod: Submission["formMethod"];
|
| 1218 | formAction: Submission["formAction"];
|
| 1219 | formEncType: Submission["formEncType"];
|
| 1220 | formData: Submission["formData"];
|
| 1221 | json: Submission["json"];
|
| 1222 | text: Submission["text"];
|
| 1223 | };
|
| 1224 | };
|
| 1225 | type Navigation = NavigationStates[keyof NavigationStates];
|
| 1226 | type RevalidationState = "idle" | "loading";
|
| 1227 | |
| 1228 | |
| 1229 |
|
| 1230 | type FetcherStates<TData = any> = {
|
| 1231 | |
| 1232 | |
| 1233 | |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 |
|
| 1238 | Idle: {
|
| 1239 | state: "idle";
|
| 1240 | formMethod: undefined;
|
| 1241 | formAction: undefined;
|
| 1242 | formEncType: undefined;
|
| 1243 | text: undefined;
|
| 1244 | formData: undefined;
|
| 1245 | json: undefined;
|
| 1246 | |
| 1247 | |
| 1248 |
|
| 1249 | data: TData | undefined;
|
| 1250 | };
|
| 1251 | |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | |
| 1260 | |
| 1261 | |
| 1262 |
|
| 1263 | Loading: {
|
| 1264 | state: "loading";
|
| 1265 | formMethod: Submission["formMethod"] | undefined;
|
| 1266 | formAction: Submission["formAction"] | undefined;
|
| 1267 | formEncType: Submission["formEncType"] | undefined;
|
| 1268 | text: Submission["text"] | undefined;
|
| 1269 | formData: Submission["formData"] | undefined;
|
| 1270 | json: Submission["json"] | undefined;
|
| 1271 | data: TData | undefined;
|
| 1272 | };
|
| 1273 | |
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 | |
| 1278 | |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | |
| 1290 |
|
| 1291 | Submitting: {
|
| 1292 | state: "submitting";
|
| 1293 | formMethod: Submission["formMethod"];
|
| 1294 | formAction: Submission["formAction"];
|
| 1295 | formEncType: Submission["formEncType"];
|
| 1296 | text: Submission["text"];
|
| 1297 | formData: Submission["formData"];
|
| 1298 | json: Submission["json"];
|
| 1299 | data: TData | undefined;
|
| 1300 | };
|
| 1301 | };
|
| 1302 | type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
|
| 1303 | interface BlockerBlocked {
|
| 1304 | state: "blocked";
|
| 1305 | reset: () => void;
|
| 1306 | proceed: () => void;
|
| 1307 | location: Location;
|
| 1308 | }
|
| 1309 | interface BlockerUnblocked {
|
| 1310 | state: "unblocked";
|
| 1311 | reset: undefined;
|
| 1312 | proceed: undefined;
|
| 1313 | location: undefined;
|
| 1314 | }
|
| 1315 | interface BlockerProceeding {
|
| 1316 | state: "proceeding";
|
| 1317 | reset: undefined;
|
| 1318 | proceed: undefined;
|
| 1319 | location: Location;
|
| 1320 | }
|
| 1321 | type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
|
| 1322 | type BlockerFunction = (args: {
|
| 1323 | currentLocation: Location;
|
| 1324 | nextLocation: Location;
|
| 1325 | historyAction: Action;
|
| 1326 | }) => boolean;
|
| 1327 | declare const IDLE_NAVIGATION: NavigationStates["Idle"];
|
| 1328 | declare const IDLE_FETCHER: FetcherStates["Idle"];
|
| 1329 | declare const IDLE_BLOCKER: BlockerUnblocked;
|
| 1330 | |
| 1331 | |
| 1332 |
|
| 1333 | declare function createRouter(init: RouterInit): Router;
|
| 1334 | interface CreateStaticHandlerOptions {
|
| 1335 | basename?: string;
|
| 1336 | mapRouteProperties?: MapRoutePropertiesFunction;
|
| 1337 | future?: {};
|
| 1338 | }
|
| 1339 |
|
| 1340 | interface IndexRouteObject {
|
| 1341 | caseSensitive?: AgnosticIndexRouteObject["caseSensitive"];
|
| 1342 | path?: AgnosticIndexRouteObject["path"];
|
| 1343 | id?: AgnosticIndexRouteObject["id"];
|
| 1344 | unstable_middleware?: AgnosticIndexRouteObject["unstable_middleware"];
|
| 1345 | loader?: AgnosticIndexRouteObject["loader"];
|
| 1346 | action?: AgnosticIndexRouteObject["action"];
|
| 1347 | hasErrorBoundary?: AgnosticIndexRouteObject["hasErrorBoundary"];
|
| 1348 | shouldRevalidate?: AgnosticIndexRouteObject["shouldRevalidate"];
|
| 1349 | handle?: AgnosticIndexRouteObject["handle"];
|
| 1350 | index: true;
|
| 1351 | children?: undefined;
|
| 1352 | element?: React.ReactNode | null;
|
| 1353 | hydrateFallbackElement?: React.ReactNode | null;
|
| 1354 | errorElement?: React.ReactNode | null;
|
| 1355 | Component?: React.ComponentType | null;
|
| 1356 | HydrateFallback?: React.ComponentType | null;
|
| 1357 | ErrorBoundary?: React.ComponentType | null;
|
| 1358 | lazy?: LazyRouteDefinition<RouteObject>;
|
| 1359 | }
|
| 1360 | interface NonIndexRouteObject {
|
| 1361 | caseSensitive?: AgnosticNonIndexRouteObject["caseSensitive"];
|
| 1362 | path?: AgnosticNonIndexRouteObject["path"];
|
| 1363 | id?: AgnosticNonIndexRouteObject["id"];
|
| 1364 | unstable_middleware?: AgnosticNonIndexRouteObject["unstable_middleware"];
|
| 1365 | loader?: AgnosticNonIndexRouteObject["loader"];
|
| 1366 | action?: AgnosticNonIndexRouteObject["action"];
|
| 1367 | hasErrorBoundary?: AgnosticNonIndexRouteObject["hasErrorBoundary"];
|
| 1368 | shouldRevalidate?: AgnosticNonIndexRouteObject["shouldRevalidate"];
|
| 1369 | handle?: AgnosticNonIndexRouteObject["handle"];
|
| 1370 | index?: false;
|
| 1371 | children?: RouteObject[];
|
| 1372 | element?: React.ReactNode | null;
|
| 1373 | hydrateFallbackElement?: React.ReactNode | null;
|
| 1374 | errorElement?: React.ReactNode | null;
|
| 1375 | Component?: React.ComponentType | null;
|
| 1376 | HydrateFallback?: React.ComponentType | null;
|
| 1377 | ErrorBoundary?: React.ComponentType | null;
|
| 1378 | lazy?: LazyRouteDefinition<RouteObject>;
|
| 1379 | }
|
| 1380 | type RouteObject = IndexRouteObject | NonIndexRouteObject;
|
| 1381 | type DataRouteObject = RouteObject & {
|
| 1382 | children?: DataRouteObject[];
|
| 1383 | id: string;
|
| 1384 | };
|
| 1385 | interface RouteMatch<ParamKey extends string = string, RouteObjectType extends RouteObject = RouteObject> extends AgnosticRouteMatch<ParamKey, RouteObjectType> {
|
| 1386 | }
|
| 1387 | interface DataRouteMatch extends RouteMatch<string, DataRouteObject> {
|
| 1388 | }
|
| 1389 | type PatchRoutesOnNavigationFunctionArgs = AgnosticPatchRoutesOnNavigationFunctionArgs<RouteObject, RouteMatch>;
|
| 1390 | type PatchRoutesOnNavigationFunction = AgnosticPatchRoutesOnNavigationFunction<RouteObject, RouteMatch>;
|
| 1391 | interface DataRouterContextObject extends Omit<NavigationContextObject, "future"> {
|
| 1392 | router: Router;
|
| 1393 | staticContext?: StaticHandlerContext;
|
| 1394 | }
|
| 1395 | declare const DataRouterContext: React.Context<DataRouterContextObject | null>;
|
| 1396 | declare const DataRouterStateContext: React.Context<RouterState | null>;
|
| 1397 | type ViewTransitionContextObject = {
|
| 1398 | isTransitioning: false;
|
| 1399 | } | {
|
| 1400 | isTransitioning: true;
|
| 1401 | flushSync: boolean;
|
| 1402 | currentLocation: Location;
|
| 1403 | nextLocation: Location;
|
| 1404 | };
|
| 1405 | declare const ViewTransitionContext: React.Context<ViewTransitionContextObject>;
|
| 1406 | type FetchersContextObject = Map<string, any>;
|
| 1407 | declare const FetchersContext: React.Context<FetchersContextObject>;
|
| 1408 | interface NavigateOptions {
|
| 1409 |
|
| 1410 | replace?: boolean;
|
| 1411 |
|
| 1412 | state?: any;
|
| 1413 |
|
| 1414 | preventScrollReset?: boolean;
|
| 1415 |
|
| 1416 | relative?: RelativeRoutingType;
|
| 1417 |
|
| 1418 | flushSync?: boolean;
|
| 1419 |
|
| 1420 | viewTransition?: boolean;
|
| 1421 | }
|
| 1422 | |
| 1423 | |
| 1424 | |
| 1425 | |
| 1426 | |
| 1427 | |
| 1428 | |
| 1429 | |
| 1430 |
|
| 1431 | interface Navigator {
|
| 1432 | createHref: History["createHref"];
|
| 1433 | encodeLocation?: History["encodeLocation"];
|
| 1434 | go: History["go"];
|
| 1435 | push(to: To, state?: any, opts?: NavigateOptions): void;
|
| 1436 | replace(to: To, state?: any, opts?: NavigateOptions): void;
|
| 1437 | }
|
| 1438 | interface NavigationContextObject {
|
| 1439 | basename: string;
|
| 1440 | navigator: Navigator;
|
| 1441 | static: boolean;
|
| 1442 | future: {};
|
| 1443 | }
|
| 1444 | declare const NavigationContext: React.Context<NavigationContextObject>;
|
| 1445 | interface LocationContextObject {
|
| 1446 | location: Location;
|
| 1447 | navigationType: Action;
|
| 1448 | }
|
| 1449 | declare const LocationContext: React.Context<LocationContextObject>;
|
| 1450 | interface RouteContextObject {
|
| 1451 | outlet: React.ReactElement | null;
|
| 1452 | matches: RouteMatch[];
|
| 1453 | isDataRoute: boolean;
|
| 1454 | }
|
| 1455 | declare const RouteContext: React.Context<RouteContextObject>;
|
| 1456 |
|
| 1457 | type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
| 1458 | type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
|
| 1459 | interface HtmlLinkProps {
|
| 1460 | |
| 1461 | |
| 1462 |
|
| 1463 | href?: string;
|
| 1464 | |
| 1465 | |
| 1466 |
|
| 1467 | crossOrigin?: "anonymous" | "use-credentials";
|
| 1468 | |
| 1469 | |
| 1470 |
|
| 1471 | rel: LiteralUnion<"alternate" | "dns-prefetch" | "icon" | "manifest" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "search" | "stylesheet", string>;
|
| 1472 | |
| 1473 | |
| 1474 |
|
| 1475 | media?: string;
|
| 1476 | |
| 1477 | |
| 1478 |
|
| 1479 | integrity?: string;
|
| 1480 | |
| 1481 | |
| 1482 |
|
| 1483 | hrefLang?: string;
|
| 1484 | |
| 1485 | |
| 1486 |
|
| 1487 | type?: string;
|
| 1488 | |
| 1489 | |
| 1490 |
|
| 1491 | referrerPolicy?: "" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
| 1492 | |
| 1493 | |
| 1494 |
|
| 1495 | sizes?: string;
|
| 1496 | |
| 1497 | |
| 1498 |
|
| 1499 | as?: LiteralUnion<"audio" | "audioworklet" | "document" | "embed" | "fetch" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "serviceworker" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt", string>;
|
| 1500 | |
| 1501 | |
| 1502 |
|
| 1503 | color?: string;
|
| 1504 | |
| 1505 | |
| 1506 |
|
| 1507 | disabled?: boolean;
|
| 1508 | |
| 1509 | |
| 1510 |
|
| 1511 | title?: string;
|
| 1512 | |
| 1513 | |
| 1514 | |
| 1515 |
|
| 1516 | imageSrcSet?: string;
|
| 1517 | |
| 1518 | |
| 1519 |
|
| 1520 | imageSizes?: string;
|
| 1521 | }
|
| 1522 | interface HtmlLinkPreloadImage extends HtmlLinkProps {
|
| 1523 | |
| 1524 | |
| 1525 |
|
| 1526 | rel: "preload";
|
| 1527 | |
| 1528 | |
| 1529 |
|
| 1530 | as: "image";
|
| 1531 | |
| 1532 | |
| 1533 |
|
| 1534 | href?: string;
|
| 1535 | |
| 1536 | |
| 1537 | |
| 1538 |
|
| 1539 | imageSrcSet: string;
|
| 1540 | |
| 1541 | |
| 1542 |
|
| 1543 | imageSizes?: string;
|
| 1544 | }
|
| 1545 | |
| 1546 | |
| 1547 | |
| 1548 | |
| 1549 |
|
| 1550 | type HtmlLinkDescriptor = (HtmlLinkProps & Pick<Required<HtmlLinkProps>, "href">) | (HtmlLinkPreloadImage & Pick<Required<HtmlLinkPreloadImage>, "imageSizes">) | (HtmlLinkPreloadImage & Pick<Required<HtmlLinkPreloadImage>, "href"> & {
|
| 1551 | imageSizes?: never;
|
| 1552 | });
|
| 1553 | interface PageLinkDescriptor extends Omit<HtmlLinkDescriptor, "href" | "rel" | "type" | "sizes" | "imageSrcSet" | "imageSizes" | "as" | "color" | "title"> {
|
| 1554 | |
| 1555 | |
| 1556 |
|
| 1557 | page: string;
|
| 1558 | }
|
| 1559 | type LinkDescriptor = HtmlLinkDescriptor | PageLinkDescriptor;
|
| 1560 |
|
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
| 1566 |
|
| 1567 | interface AppLoadContext {
|
| 1568 | [key: string]: unknown;
|
| 1569 | }
|
| 1570 |
|
| 1571 | type Serializable = undefined | null | boolean | string | symbol | number | Array<Serializable> | {
|
| 1572 | [key: PropertyKey]: Serializable;
|
| 1573 | } | bigint | Date | URL | RegExp | Error | Map<Serializable, Serializable> | Set<Serializable> | Promise<Serializable>;
|
| 1574 |
|
| 1575 | type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
|
| 1576 | type IsAny<T> = 0 extends 1 & T ? true : false;
|
| 1577 | type Func = (...args: any[]) => unknown;
|
| 1578 | type Pretty<T> = {
|
| 1579 | [K in keyof T]: T[K];
|
| 1580 | } & {};
|
| 1581 | type Normalize<T> = _Normalize<UnionKeys<T>, T>;
|
| 1582 | type _Normalize<Key extends keyof any, T> = T extends infer U ? Pretty<{
|
| 1583 | [K in Key as K extends keyof U ? undefined extends U[K] ? never : K : never]: K extends keyof U ? U[K] : never;
|
| 1584 | } & {
|
| 1585 | [K in Key as K extends keyof U ? undefined extends U[K] ? K : never : never]?: K extends keyof U ? U[K] : never;
|
| 1586 | } & {
|
| 1587 | [K in Key as K extends keyof U ? never : K]?: undefined;
|
| 1588 | }> : never;
|
| 1589 | type UnionKeys<T> = T extends any ? keyof T : never;
|
| 1590 |
|
| 1591 | type RouteModule$1 = {
|
| 1592 | meta?: Func;
|
| 1593 | links?: Func;
|
| 1594 | headers?: Func;
|
| 1595 | loader?: Func;
|
| 1596 | clientLoader?: Func;
|
| 1597 | action?: Func;
|
| 1598 | clientAction?: Func;
|
| 1599 | HydrateFallback?: Func;
|
| 1600 | default?: Func;
|
| 1601 | ErrorBoundary?: Func;
|
| 1602 | [key: string]: unknown;
|
| 1603 | };
|
| 1604 |
|
| 1605 | |
| 1606 | |
| 1607 | |
| 1608 | |
| 1609 | |
| 1610 |
|
| 1611 | type unstable_SerializesTo<T> = {
|
| 1612 | unstable__ReactRouter_SerializesTo: [T];
|
| 1613 | };
|
| 1614 |
|
| 1615 | type Serialize<T> = T extends unstable_SerializesTo<infer To> ? To : T extends Serializable ? T : T extends (...args: any[]) => unknown ? undefined : T extends Promise<infer U> ? Promise<Serialize<U>> : T extends Map<infer K, infer V> ? Map<Serialize<K>, Serialize<V>> : T extends Set<infer U> ? Set<Serialize<U>> : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [Serialize<F>, ...Serialize<R>] : T extends Array<infer U> ? Array<Serialize<U>> : T extends readonly unknown[] ? readonly Serialize<T[number]>[] : T extends Record<any, any> ? {
|
| 1616 | [K in keyof T]: Serialize<T[K]>;
|
| 1617 | } : undefined;
|
| 1618 | type VoidToUndefined<T> = Equal<T, void> extends true ? undefined : T;
|
| 1619 | type DataFrom<T> = IsAny<T> extends true ? undefined : T extends Func ? VoidToUndefined<Awaited<ReturnType<T>>> : undefined;
|
| 1620 | type ClientData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? U : T;
|
| 1621 | type ServerData<T> = T extends Response ? never : T extends DataWithResponseInit<infer U> ? Serialize<U> : Serialize<T>;
|
| 1622 | type ServerDataFrom<T> = ServerData<DataFrom<T>>;
|
| 1623 | type ClientDataFrom<T> = ClientData<DataFrom<T>>;
|
| 1624 | type ClientDataFunctionArgs<Params> = {
|
| 1625 | |
| 1626 | |
| 1627 | |
| 1628 | |
| 1629 |
|
| 1630 | request: Request;
|
| 1631 | |
| 1632 | |
| 1633 | |
| 1634 | |
| 1635 | |
| 1636 | |
| 1637 | |
| 1638 | |
| 1639 | |
| 1640 | |
| 1641 | |
| 1642 | |
| 1643 | |
| 1644 |
|
| 1645 | params: Params;
|
| 1646 | |
| 1647 | |
| 1648 | |
| 1649 | |
| 1650 | |
| 1651 | |
| 1652 | |
| 1653 |
|
| 1654 | context: unstable_RouterContextProvider;
|
| 1655 | };
|
| 1656 | type ServerDataFunctionArgs<Params> = {
|
| 1657 |
|
| 1658 | request: Request;
|
| 1659 | |
| 1660 | |
| 1661 | |
| 1662 | |
| 1663 | |
| 1664 | |
| 1665 | |
| 1666 | |
| 1667 | |
| 1668 | |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 |
|
| 1673 | params: Params;
|
| 1674 | |
| 1675 | |
| 1676 | |
| 1677 | |
| 1678 | |
| 1679 | |
| 1680 | |
| 1681 | |
| 1682 | |
| 1683 | |
| 1684 | |
| 1685 |
|
| 1686 | context: MiddlewareEnabled extends true ? unstable_RouterContextProvider : AppLoadContext;
|
| 1687 | };
|
| 1688 | type SerializeFrom<T> = T extends (...args: infer Args) => unknown ? Args extends [
|
| 1689 | ClientLoaderFunctionArgs | ClientActionFunctionArgs | ClientDataFunctionArgs<unknown>
|
| 1690 | ] ? ClientDataFrom<T> : ServerDataFrom<T> : T;
|
| 1691 | type IsDefined<T> = Equal<T, undefined> extends true ? false : true;
|
| 1692 | type IsHydrate<ClientLoader> = ClientLoader extends {
|
| 1693 | hydrate: true;
|
| 1694 | } ? true : ClientLoader extends {
|
| 1695 | hydrate: false;
|
| 1696 | } ? false : false;
|
| 1697 | type GetLoaderData<T extends RouteModule$1> = _DataLoaderData<ServerDataFrom<T["loader"]>, ClientDataFrom<T["clientLoader"]>, IsHydrate<T["clientLoader"]>, T extends {
|
| 1698 | HydrateFallback: Func;
|
| 1699 | } ? true : false>;
|
| 1700 | type _DataLoaderData<ServerLoaderData, ClientLoaderData, ClientLoaderHydrate extends boolean, HasHydrateFallback> = [
|
| 1701 | HasHydrateFallback,
|
| 1702 | ClientLoaderHydrate
|
| 1703 | ] extends [true, true] ? IsDefined<ClientLoaderData> extends true ? ClientLoaderData : undefined : [
|
| 1704 | IsDefined<ClientLoaderData>,
|
| 1705 | IsDefined<ServerLoaderData>
|
| 1706 | ] extends [true, true] ? ServerLoaderData | ClientLoaderData : IsDefined<ClientLoaderData> extends true ? ClientLoaderData : IsDefined<ServerLoaderData> extends true ? ServerLoaderData : undefined;
|
| 1707 | type GetActionData<T extends RouteModule$1> = _DataActionData<ServerDataFrom<T["action"]>, ClientDataFrom<T["clientAction"]>>;
|
| 1708 | type _DataActionData<ServerActionData, ClientActionData> = Awaited<[
|
| 1709 | IsDefined<ServerActionData>,
|
| 1710 | IsDefined<ClientActionData>
|
| 1711 | ] extends [true, true] ? ServerActionData | ClientActionData : IsDefined<ClientActionData> extends true ? ClientActionData : IsDefined<ServerActionData> extends true ? ServerActionData : undefined>;
|
| 1712 |
|
| 1713 | interface RouteModules {
|
| 1714 | [routeId: string]: RouteModule | undefined;
|
| 1715 | }
|
| 1716 | |
| 1717 | |
| 1718 |
|
| 1719 | interface RouteModule {
|
| 1720 | clientAction?: ClientActionFunction;
|
| 1721 | clientLoader?: ClientLoaderFunction;
|
| 1722 | unstable_clientMiddleware?: unstable_MiddlewareFunction<undefined>[];
|
| 1723 | ErrorBoundary?: ErrorBoundaryComponent;
|
| 1724 | HydrateFallback?: HydrateFallbackComponent;
|
| 1725 | Layout?: LayoutComponent;
|
| 1726 | default: RouteComponent;
|
| 1727 | handle?: RouteHandle;
|
| 1728 | links?: LinksFunction;
|
| 1729 | meta?: MetaFunction;
|
| 1730 | shouldRevalidate?: ShouldRevalidateFunction;
|
| 1731 | }
|
| 1732 | |
| 1733 | |
| 1734 |
|
| 1735 | interface ServerRouteModule extends RouteModule {
|
| 1736 | action?: ActionFunction;
|
| 1737 | headers?: HeadersFunction | {
|
| 1738 | [name: string]: string;
|
| 1739 | };
|
| 1740 | loader?: LoaderFunction;
|
| 1741 | unstable_middleware?: unstable_MiddlewareFunction<Response>[];
|
| 1742 | }
|
| 1743 | |
| 1744 | |
| 1745 |
|
| 1746 | type ClientActionFunction = (args: ClientActionFunctionArgs) => ReturnType<ActionFunction>;
|
| 1747 | |
| 1748 | |
| 1749 |
|
| 1750 | type ClientActionFunctionArgs = ActionFunctionArgs & {
|
| 1751 | serverAction: <T = unknown>() => Promise<SerializeFrom<T>>;
|
| 1752 | };
|
| 1753 | |
| 1754 | |
| 1755 |
|
| 1756 | type ClientLoaderFunction = ((args: ClientLoaderFunctionArgs) => ReturnType<LoaderFunction>) & {
|
| 1757 | hydrate?: boolean;
|
| 1758 | };
|
| 1759 | /**
|
| 1760 | * Arguments passed to a route `clientLoader` function
|
| 1761 | */
|
| 1762 | type ClientLoaderFunctionArgs = LoaderFunctionArgs & {
|
| 1763 | serverLoader: <T = unknown>() => Promise<SerializeFrom<T>>;
|
| 1764 | };
|
| 1765 | |
| 1766 | |
| 1767 |
|
| 1768 | type ErrorBoundaryComponent = ComponentType;
|
| 1769 | type HeadersArgs = {
|
| 1770 | loaderHeaders: Headers;
|
| 1771 | parentHeaders: Headers;
|
| 1772 | actionHeaders: Headers;
|
| 1773 | errorHeaders: Headers | undefined;
|
| 1774 | };
|
| 1775 | |
| 1776 | |
| 1777 | |
| 1778 |
|
| 1779 | interface HeadersFunction {
|
| 1780 | (args: HeadersArgs): Headers | HeadersInit;
|
| 1781 | }
|
| 1782 | |
| 1783 | |
| 1784 | |
| 1785 |
|
| 1786 | type HydrateFallbackComponent = ComponentType;
|
| 1787 | |
| 1788 | |
| 1789 | |
| 1790 | |
| 1791 |
|
| 1792 | type LayoutComponent = ComponentType<{
|
| 1793 | children: ReactElement<unknown, ErrorBoundaryComponent | HydrateFallbackComponent | RouteComponent>;
|
| 1794 | }>;
|
| 1795 | |
| 1796 | |
| 1797 | |
| 1798 | |
| 1799 | |
| 1800 |
|
| 1801 | interface LinksFunction {
|
| 1802 | (): LinkDescriptor[];
|
| 1803 | }
|
| 1804 | interface MetaMatch<RouteId extends string = string, Loader extends LoaderFunction | ClientLoaderFunction | unknown = unknown> {
|
| 1805 | id: RouteId;
|
| 1806 | pathname: DataRouteMatch["pathname"];
|
| 1807 | data: Loader extends LoaderFunction | ClientLoaderFunction ? SerializeFrom<Loader> : unknown;
|
| 1808 | handle?: RouteHandle;
|
| 1809 | params: DataRouteMatch["params"];
|
| 1810 | meta: MetaDescriptor[];
|
| 1811 | error?: unknown;
|
| 1812 | }
|
| 1813 | type MetaMatches<MatchLoaders extends Record<string, LoaderFunction | ClientLoaderFunction | unknown> = Record<string, unknown>> = Array<{
|
| 1814 | [K in keyof MatchLoaders]: MetaMatch<Exclude<K, number | symbol>, MatchLoaders[K]>;
|
| 1815 | }[keyof MatchLoaders]>;
|
| 1816 | interface MetaArgs<Loader extends LoaderFunction | ClientLoaderFunction | unknown = unknown, MatchLoaders extends Record<string, LoaderFunction | ClientLoaderFunction | unknown> = Record<string, unknown>> {
|
| 1817 | data: (Loader extends LoaderFunction | ClientLoaderFunction ? SerializeFrom<Loader> : unknown) | undefined;
|
| 1818 | params: Params;
|
| 1819 | location: Location;
|
| 1820 | matches: MetaMatches<MatchLoaders>;
|
| 1821 | error?: unknown;
|
| 1822 | }
|
| 1823 | |
| 1824 | |
| 1825 | |
| 1826 | |
| 1827 | |
| 1828 | |
| 1829 | |
| 1830 | |
| 1831 | |
| 1832 | |
| 1833 | |
| 1834 | |
| 1835 | |
| 1836 | |
| 1837 | |
| 1838 | |
| 1839 | |
| 1840 | |
| 1841 | |
| 1842 | |
| 1843 | |
| 1844 | |
| 1845 | |
| 1846 | |
| 1847 | |
| 1848 | |
| 1849 | |
| 1850 | |
| 1851 | |
| 1852 | |
| 1853 | |
| 1854 | |
| 1855 | |
| 1856 | |
| 1857 | |
| 1858 | |
| 1859 | |
| 1860 | |
| 1861 | |
| 1862 | |
| 1863 | |
| 1864 | |
| 1865 | |
| 1866 | |
| 1867 | |
| 1868 | |
| 1869 | |
| 1870 | |
| 1871 | |
| 1872 |
|
| 1873 | interface MetaFunction<Loader extends LoaderFunction | ClientLoaderFunction | unknown = unknown, MatchLoaders extends Record<string, LoaderFunction | ClientLoaderFunction | unknown> = Record<string, unknown>> {
|
| 1874 | (args: MetaArgs<Loader, MatchLoaders>): MetaDescriptor[] | undefined;
|
| 1875 | }
|
| 1876 | type MetaDescriptor = {
|
| 1877 | charSet: "utf-8";
|
| 1878 | } | {
|
| 1879 | title: string;
|
| 1880 | } | {
|
| 1881 | name: string;
|
| 1882 | content: string;
|
| 1883 | } | {
|
| 1884 | property: string;
|
| 1885 | content: string;
|
| 1886 | } | {
|
| 1887 | httpEquiv: string;
|
| 1888 | content: string;
|
| 1889 | } | {
|
| 1890 | "script:ld+json": LdJsonObject;
|
| 1891 | } | {
|
| 1892 | tagName: "meta" | "link";
|
| 1893 | [name: string]: string;
|
| 1894 | } | {
|
| 1895 | [name: string]: unknown;
|
| 1896 | };
|
| 1897 | type LdJsonObject = {
|
| 1898 | [Key in string]: LdJsonValue;
|
| 1899 | } & {
|
| 1900 | [Key in string]?: LdJsonValue | undefined;
|
| 1901 | };
|
| 1902 | type LdJsonArray = LdJsonValue[] | readonly LdJsonValue[];
|
| 1903 | type LdJsonPrimitive = string | number | boolean | null;
|
| 1904 | type LdJsonValue = LdJsonPrimitive | LdJsonObject | LdJsonArray;
|
| 1905 | |
| 1906 | |
| 1907 |
|
| 1908 | type RouteComponent = ComponentType<{}>;
|
| 1909 | |
| 1910 | |
| 1911 | |
| 1912 | |
| 1913 |
|
| 1914 | type RouteHandle = unknown;
|
| 1915 |
|
| 1916 | export { type GetScrollRestorationKeyFunction as $, Action as A, type BlockerFunction as B, type ClientDataFunctionArgs as C, type DataStrategyFunction as D, type unstable_InitialContext as E, type Equal as F, type GetLoaderData as G, type HydrationState as H, type InitialEntry as I, type ClientActionFunction as J, type ClientLoaderFunction as K, type LinkDescriptor as L, type MetaDescriptor as M, type Normalize as N, type HeadersFunction as O, type Pretty as P, type ShouldRevalidateFunction as Q, type RouteModule$1 as R, type ServerDataFunctionArgs as S, type To as T, type UIMatch as U, type RouterInit as V, type RouterState as W, type PatchRoutesOnNavigationFunction as X, type DataRouteObject as Y, type StaticHandler as Z, type GetScrollPositionFunction as _, type Location as a, type ServerRouteModule as a$, type StaticHandlerContext as a0, type Fetcher as a1, type NavigationStates as a2, type RouterSubscriber as a3, type RouterNavigateOptions as a4, type RouterFetchOptions as a5, type RevalidationState as a6, type ActionFunctionArgs as a7, type DataStrategyFunctionArgs as a8, type DataStrategyMatch as a9, replace as aA, resolvePath as aB, type DataRouteMatch as aC, type Navigator as aD, type PatchRoutesOnNavigationFunctionArgs as aE, type RouteMatch as aF, type ClientActionFunctionArgs as aG, type ClientLoaderFunctionArgs as aH, type HeadersArgs as aI, type MetaArgs as aJ, type PageLinkDescriptor as aK, type HtmlLinkDescriptor as aL, type Future as aM, type unstable_SerializesTo as aN, createBrowserHistory as aO, invariant as aP, createRouter as aQ, ErrorResponseImpl as aR, DataRouterContext as aS, DataRouterStateContext as aT, FetchersContext as aU, LocationContext as aV, NavigationContext as aW, RouteContext as aX, ViewTransitionContext as aY, type FutureConfig as aZ, type RouteManifest as a_, type DataStrategyResult as aa, DataWithResponseInit as ab, type ErrorResponse as ac, type FormEncType as ad, type FormMethod as ae, type HTMLFormMethod as af, type LazyRouteFunction as ag, type LoaderFunctionArgs as ah, type unstable_MiddlewareFunction as ai, type PathParam as aj, type RedirectFunction as ak, type unstable_RouterContext as al, type ShouldRevalidateFunctionArgs as am, unstable_createContext as an, createPath as ao, parsePath as ap, IDLE_NAVIGATION as aq, IDLE_FETCHER as ar, IDLE_BLOCKER as as, data as at, generatePath as au, isRouteErrorResponse as av, matchPath as aw, matchRoutes as ax, redirect as ay, redirectDocument as az, type ServerDataFrom as b, type History as b0, type CreateStaticHandlerOptions as b1, type GetActionData as c, type Router as d, type RouteModules as e, type NavigateOptions as f, type Blocker as g, type SerializeFrom as h, type RelativeRoutingType as i, type ParamParseKey as j, type Path as k, type PathPattern as l, type PathMatch as m, type Navigation as n, type Params as o, type RouteObject as p, type IndexRouteObject as q, type LoaderFunction as r, type ActionFunction as s, type MetaFunction as t, type unstable_MiddlewareNextFunction as u, type LinksFunction as v, type NonIndexRouteObject as w, type AppLoadContext as x, unstable_RouterContextProvider as y, type MiddlewareEnabled as z };
|