1 | import { R as RouteModules, a as Router, D as DataStrategyFunction, A as ActionFunction, L as LoaderFunction, C as ClientActionFunction, b as ClientLoaderFunction, c as LinksFunction, M as MetaFunction, d as RouteManifest, e as LoaderFunctionArgs, f as ActionFunctionArgs, T as To, g as RelativeRoutingType, h as Location, i as Action, P as ParamParseKey, j as Path, k as PathPattern, l as PathMatch, N as NavigateOptions, m as Params, n as RouteObject, o as Navigation, p as RevalidationState, U as UIMatch, S as SerializeFrom, B as BlockerFunction, q as Blocker, r as StaticHandlerContext, s as StaticHandler, F as FutureConfig$1, t as CreateStaticHandlerOptions$1, I as InitialEntry, H as HydrationState, u as IndexRouteObject, v as NonIndexRouteObject, w as RouterState } from './route-data-DuV3tXo2.js';
|
2 | export { ap as ClientActionFunctionArgs, aq as ClientLoaderFunctionArgs, aj as DataRouteMatch, ak as DataRouteObject, Q as DataStrategyFunctionArgs, V as DataStrategyMatch, W as DataStrategyResult, Y as ErrorResponse, y as Fetcher, Z as FormEncType, _ as FormMethod, G as GetScrollPositionFunction, x as GetScrollRestorationKeyFunction, $ as HTMLFormMethod, au as HtmlLinkDescriptor, a9 as IDLE_BLOCKER, a8 as IDLE_FETCHER, a7 as IDLE_NAVIGATION, a0 as LazyRouteFunction, av as LinkDescriptor, ar as MetaArgs, as as MetaDescriptor, z as NavigationStates, al as Navigator, at as PageLinkDescriptor, am as PatchRoutesOnNavigationFunction, an as PatchRoutesOnNavigationFunctionArgs, a1 as PathParam, a2 as RedirectFunction, ao as RouteMatch, O as RouterFetchOptions, E as RouterInit, K as RouterNavigateOptions, J as RouterSubscriber, a3 as ShouldRevalidateFunction, a4 as ShouldRevalidateFunctionArgs, aA as UNSAFE_DataRouterContext, aB as UNSAFE_DataRouterStateContext, X as UNSAFE_DataWithResponseInit, az as UNSAFE_ErrorResponseImpl, aC as UNSAFE_FetchersContext, aD as UNSAFE_LocationContext, aE as UNSAFE_NavigationContext, aF as UNSAFE_RouteContext, aG as UNSAFE_ViewTransitionContext, aw as UNSAFE_createBrowserHistory, ay as UNSAFE_createRouter, ax as UNSAFE_invariant, a5 as createPath, aa as data, ab as generatePath, ac as isRouteErrorResponse, ad as matchPath, ae as matchRoutes, a6 as parsePath, af as redirect, ag as redirectDocument, ah as replace, ai as resolvePath } from './route-data-DuV3tXo2.js';
|
3 | import { A as AssetsManifest, a as Route, F as FutureConfig, E as EntryContext } from './fog-of-war-CbNQuoo8.js';
|
4 | export { f as Await, b as AwaitProps, G as BrowserRouter, B as BrowserRouterProps, u as FetcherFormProps, y as FetcherSubmitFunction, a3 as FetcherSubmitOptions, z as FetcherWithComponents, U as Form, v as FormProps, J as HashRouter, H as HashRouterProps, p as HistoryRouterProps, I as IndexRouteProps, L as LayoutRouteProps, K as Link, q as LinkProps, aa as Links, g as MemoryRouter, M as MemoryRouterProps, a9 as Meta, T as NavLink, s as NavLinkProps, t as NavLinkRenderProps, h as Navigate, N as NavigateProps, i as Outlet, O as OutletProps, a4 as ParamKeyValuePair, P as PathRouteProps, ac as PrefetchPageLinks, j as Route, c as RouteProps, k as Router, d as RouterProps, l as RouterProvider, R as RouterProviderProps, m as Routes, e as RoutesProps, ab as Scripts, ad as ScriptsProps, V as ScrollRestoration, S as ScrollRestorationProps, w as SetURLSearchParams, x as SubmitFunction, a5 as SubmitOptions, a7 as SubmitTarget, af as UNSAFE_FrameworkContext, ai as UNSAFE_createClientRoutes, aj as UNSAFE_createClientRoutesWithHMRRevalidationOptOut, ag as UNSAFE_getPatchRoutesOnNavigationFunction, ae as UNSAFE_mapRouteProperties, ak as UNSAFE_shouldHydrateRouteLoader, ah as UNSAFE_useFogOFWarDiscovery, al as UNSAFE_useScrollRestoration, a6 as URLSearchParamsInit, C as createBrowserRouter, D as createHashRouter, n as createMemoryRouter, o as createRoutesFromChildren, o as createRoutesFromElements, a8 as createSearchParams, r as renderMatches, Q as unstable_HistoryRouter, a1 as unstable_usePrompt, a0 as useBeforeUnload, _ as useFetcher, $ as useFetchers, Z as useFormAction, W as useLinkClickHandler, X as useSearchParams, Y as useSubmit, a2 as useViewTransitionState } from './fog-of-war-CbNQuoo8.js';
|
5 | import * as React from 'react';
|
6 | import { ReactElement } from 'react';
|
7 | import { ParseOptions, SerializeOptions } from 'cookie';
|
8 | export { ParseOptions as CookieParseOptions, SerializeOptions as CookieSerializeOptions } from 'cookie';
|
9 | import { A as AppLoadContext$1 } from './data-CQbyyGzl.js';
|
10 |
|
11 | declare const SingleFetchRedirectSymbol: unique symbol;
|
12 | declare function getSingleFetchDataStrategy(manifest: AssetsManifest, routeModules: RouteModules, getRouter: () => Router): DataStrategyFunction;
|
13 | declare function decodeViaTurboStream(body: ReadableStream<Uint8Array>, global: Window | typeof globalThis): Promise<{
|
14 | done: Promise<undefined>;
|
15 | value: unknown;
|
16 | }>;
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | declare enum ServerMode {
|
22 | Development = "development",
|
23 | Production = "production",
|
24 | Test = "test"
|
25 | }
|
26 |
|
27 | type HeadersArgs = {
|
28 | loaderHeaders: Headers;
|
29 | parentHeaders: Headers;
|
30 | actionHeaders: Headers;
|
31 | errorHeaders: Headers | undefined;
|
32 | };
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | interface HeadersFunction {
|
38 | (args: HeadersArgs): Headers | HeadersInit;
|
39 | }
|
40 |
|
41 |
|
42 |
|
43 | type RouteHandle = unknown;
|
44 | interface EntryRouteModule {
|
45 | clientAction?: ClientActionFunction;
|
46 | clientLoader?: ClientLoaderFunction;
|
47 | ErrorBoundary?: any;
|
48 | HydrateFallback?: any;
|
49 | Layout?: any;
|
50 | default: any;
|
51 | handle?: RouteHandle;
|
52 | links?: LinksFunction;
|
53 | meta?: MetaFunction;
|
54 | }
|
55 | interface ServerRouteModule extends EntryRouteModule {
|
56 | action?: ActionFunction;
|
57 | headers?: HeadersFunction | {
|
58 | [name: string]: string;
|
59 | };
|
60 | loader?: LoaderFunction;
|
61 | }
|
62 |
|
63 | type ServerRouteManifest = RouteManifest<Omit<ServerRoute, "children">>;
|
64 | interface ServerRoute extends Route {
|
65 | children: ServerRoute[];
|
66 | module: ServerRouteModule;
|
67 | }
|
68 |
|
69 | /**
|
70 | * The output of the compiler for the server build.
|
71 | */
|
72 | interface ServerBuild {
|
73 | entry: {
|
74 | module: ServerEntryModule;
|
75 | };
|
76 | routes: ServerRouteManifest;
|
77 | assets: AssetsManifest;
|
78 | basename?: string;
|
79 | publicPath: string;
|
80 | assetsBuildDirectory: string;
|
81 | future: FutureConfig;
|
82 | isSpaMode: boolean;
|
83 | }
|
84 | interface HandleDocumentRequestFunction {
|
85 | (request: Request, responseStatusCode: number, responseHeaders: Headers, context: EntryContext, loadContext: AppLoadContext$1): Promise<Response> | Response;
|
86 | }
|
87 | interface HandleDataRequestFunction {
|
88 | (response: Response, args: LoaderFunctionArgs | ActionFunctionArgs): Promise<Response> | Response;
|
89 | }
|
90 | interface HandleErrorFunction {
|
91 | (error: unknown, args: LoaderFunctionArgs | ActionFunctionArgs): void;
|
92 | }
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | interface ServerEntryModule {
|
98 | default: HandleDocumentRequestFunction;
|
99 | handleDataRequest?: HandleDataRequestFunction;
|
100 | handleError?: HandleErrorFunction;
|
101 | streamTimeout?: number;
|
102 | }
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | declare function useHref(to: To, { relative }?: {
|
119 | relative?: RelativeRoutingType;
|
120 | }): string;
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 | declare function useInRouterContext(): boolean;
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 | declare function useLocation(): Location;
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 | declare function useNavigationType(): Action;
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 | declare function useMatch<ParamKey extends ParamParseKey<Path>, Path extends string>(pattern: PathPattern<Path> | Path): PathMatch<ParamKey> | null;
|
167 |
|
168 |
|
169 |
|
170 | interface NavigateFunction {
|
171 | (to: To, options?: NavigateOptions): void | Promise<void>;
|
172 | (delta: number): void | Promise<void>;
|
173 | }
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
|
194 |
|
195 |
|
196 | declare function useNavigate(): NavigateFunction;
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 | declare function useOutletContext<Context = unknown>(): Context;
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 | declare function useOutlet(context?: unknown): React.ReactElement | null;
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 | declare function useParams<ParamsOrKey extends string | Record<string, string | undefined> = string>(): Readonly<[
|
227 | ParamsOrKey
|
228 | ] extends [string] ? Params<ParamsOrKey> : Partial<ParamsOrKey>>;
|
229 |
|
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 |
|
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 | declare function useResolvedPath(to: To, { relative }?: {
|
247 | relative?: RelativeRoutingType;
|
248 | }): Path;
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 | declare function useRoutes(routes: RouteObject[], locationArg?: Partial<Location> | string): React.ReactElement | null;
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 | declare function useNavigation(): Navigation;
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 | declare function useRevalidator(): {
|
324 | revalidate(): Promise<void>;
|
325 | state: RevalidationState;
|
326 | };
|
327 |
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 | declare function useMatches(): UIMatch[];
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 | declare function useLoaderData<T = any>(): SerializeFrom<T>;
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 |
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 | declare function useRouteLoaderData<T = any>(routeId: string): SerializeFrom<T> | undefined;
|
381 |
|
382 |
|
383 |
|
384 |
|
385 |
|
386 |
|
387 |
|
388 |
|
389 |
|
390 |
|
391 |
|
392 |
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 | declare function useActionData<T = any>(): SerializeFrom<T> | undefined;
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 | declare function useRouteError(): unknown;
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 | declare function useAsyncValue(): unknown;
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 | declare function useAsyncError(): unknown;
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 | declare function useBlocker(shouldBlock: boolean | BlockerFunction): Blocker;
|
470 |
|
471 | interface StaticRouterProps {
|
472 | basename?: string;
|
473 | children?: React.ReactNode;
|
474 | location: Partial<Location> | string;
|
475 | }
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 | declare function StaticRouter({ basename, children, location: locationProp, }: StaticRouterProps): React.JSX.Element;
|
483 | interface StaticRouterProviderProps {
|
484 | context: StaticHandlerContext;
|
485 | router: Router;
|
486 | hydrate?: boolean;
|
487 | nonce?: string;
|
488 | }
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 | declare function StaticRouterProvider({ context, router, hydrate, nonce, }: StaticRouterProviderProps): React.JSX.Element;
|
496 | type CreateStaticHandlerOptions = Omit<CreateStaticHandlerOptions$1, "mapRouteProperties">;
|
497 |
|
498 |
|
499 |
|
500 | declare function createStaticHandler(routes: RouteObject[], opts?: CreateStaticHandlerOptions): StaticHandler;
|
501 |
|
502 |
|
503 |
|
504 | declare function createStaticRouter(routes: RouteObject[], context: StaticHandlerContext, opts?: {
|
505 | future?: Partial<FutureConfig$1>;
|
506 | }): Router;
|
507 |
|
508 | interface ServerRouterProps {
|
509 | context: EntryContext;
|
510 | url: string | URL;
|
511 | abortDelay?: number;
|
512 | nonce?: string;
|
513 | }
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 | declare function ServerRouter({ context, url, abortDelay, nonce, }: ServerRouterProps): ReactElement;
|
522 |
|
523 | interface StubIndexRouteObject extends Omit<IndexRouteObject, "loader" | "action" | "element" | "errorElement" | "children"> {
|
524 | loader?: LoaderFunction;
|
525 | action?: ActionFunction;
|
526 | children?: StubRouteObject[];
|
527 | meta?: MetaFunction;
|
528 | links?: LinksFunction;
|
529 | }
|
530 | interface StubNonIndexRouteObject extends Omit<NonIndexRouteObject, "loader" | "action" | "element" | "errorElement" | "children"> {
|
531 | loader?: LoaderFunction;
|
532 | action?: ActionFunction;
|
533 | children?: StubRouteObject[];
|
534 | meta?: MetaFunction;
|
535 | links?: LinksFunction;
|
536 | }
|
537 | type StubRouteObject = StubIndexRouteObject | StubNonIndexRouteObject;
|
538 | interface AppLoadContext {
|
539 | [key: string]: unknown;
|
540 | }
|
541 | interface RoutesTestStubProps {
|
542 | |
543 |
|
544 |
|
545 |
|
546 |
|
547 |
|
548 | initialEntries?: InitialEntry[];
|
549 | |
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 |
|
556 | initialIndex?: number;
|
557 | |
558 |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 |
|
564 | hydrationData?: HydrationState;
|
565 | |
566 |
|
567 |
|
568 | future?: Partial<FutureConfig>;
|
569 | }
|
570 |
|
571 |
|
572 |
|
573 | declare function createRoutesStub(routes: StubRouteObject[], context?: AppLoadContext): ({ initialEntries, initialIndex, hydrationData, future, }: RoutesTestStubProps) => React.JSX.Element;
|
574 |
|
575 | interface CookieSignatureOptions {
|
576 | |
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 | secrets?: string[];
|
585 | }
|
586 | type CookieOptions = ParseOptions & SerializeOptions & CookieSignatureOptions;
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 | interface Cookie {
|
598 | |
599 |
|
600 |
|
601 | readonly name: string;
|
602 | |
603 |
|
604 |
|
605 | readonly isSigned: boolean;
|
606 | |
607 |
|
608 |
|
609 |
|
610 |
|
611 |
|
612 | readonly expires?: Date;
|
613 | |
614 |
|
615 |
|
616 |
|
617 | parse(cookieHeader: string | null, options?: ParseOptions): Promise<any>;
|
618 | |
619 |
|
620 |
|
621 |
|
622 | serialize(value: any, options?: SerializeOptions): Promise<string>;
|
623 | }
|
624 |
|
625 |
|
626 |
|
627 | declare const createCookie: (name: string, cookieOptions?: CookieOptions) => Cookie;
|
628 | type IsCookieFunction = (object: any) => object is Cookie;
|
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 | declare const isCookie: IsCookieFunction;
|
635 |
|
636 | type RequestHandler = (request: Request, loadContext?: AppLoadContext$1) => Promise<Response>;
|
637 | type CreateRequestHandlerFunction = (build: ServerBuild | (() => ServerBuild | Promise<ServerBuild>), mode?: string) => RequestHandler;
|
638 | declare const createRequestHandler: CreateRequestHandlerFunction;
|
639 |
|
640 |
|
641 |
|
642 |
|
643 | interface SessionData {
|
644 | [name: string]: any;
|
645 | }
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 | interface Session<Data = SessionData, FlashData = Data> {
|
652 | |
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 | readonly id: string;
|
659 | |
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 | readonly data: FlashSessionData<Data, FlashData>;
|
666 | |
667 |
|
668 |
|
669 |
|
670 | has(name: (keyof Data | keyof FlashData) & string): boolean;
|
671 | |
672 |
|
673 |
|
674 | get<Key extends (keyof Data | keyof FlashData) & string>(name: Key): (Key extends keyof Data ? Data[Key] : undefined) | (Key extends keyof FlashData ? FlashData[Key] : undefined) | undefined;
|
675 | |
676 |
|
677 |
|
678 | set<Key extends keyof Data & string>(name: Key, value: Data[Key]): void;
|
679 | |
680 |
|
681 |
|
682 |
|
683 | flash<Key extends keyof FlashData & string>(name: Key, value: FlashData[Key]): void;
|
684 | |
685 |
|
686 |
|
687 | unset(name: keyof Data & string): void;
|
688 | }
|
689 | type FlashSessionData<Data, FlashData> = Partial<Data & {
|
690 | [Key in keyof FlashData as FlashDataKey<Key & string>]: FlashData[Key];
|
691 | }>;
|
692 | type FlashDataKey<Key extends string> = `__flash_${Key}__`;
|
693 | type CreateSessionFunction = <Data = SessionData, FlashData = Data>(initialData?: Data, id?: string) => Session<Data, FlashData>;
|
694 |
|
695 |
|
696 |
|
697 |
|
698 |
|
699 |
|
700 |
|
701 |
|
702 | declare const createSession: CreateSessionFunction;
|
703 | type IsSessionFunction = (object: any) => object is Session;
|
704 |
|
705 |
|
706 |
|
707 |
|
708 |
|
709 | declare const isSession: IsSessionFunction;
|
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 |
|
717 | interface SessionStorage<Data = SessionData, FlashData = Data> {
|
718 | |
719 |
|
720 |
|
721 |
|
722 |
|
723 | getSession: (cookieHeader?: string | null, options?: ParseOptions) => Promise<Session<Data, FlashData>>;
|
724 | |
725 |
|
726 |
|
727 |
|
728 | commitSession: (session: Session<Data, FlashData>, options?: SerializeOptions) => Promise<string>;
|
729 | |
730 |
|
731 |
|
732 |
|
733 | destroySession: (session: Session<Data, FlashData>, options?: SerializeOptions) => Promise<string>;
|
734 | }
|
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 |
|
741 |
|
742 |
|
743 |
|
744 | interface SessionIdStorageStrategy<Data = SessionData, FlashData = Data> {
|
745 | |
746 |
|
747 |
|
748 |
|
749 | cookie?: Cookie | (CookieOptions & {
|
750 | name?: string;
|
751 | });
|
752 | |
753 |
|
754 |
|
755 | createData: (data: FlashSessionData<Data, FlashData>, expires?: Date) => Promise<string>;
|
756 | |
757 |
|
758 |
|
759 | readData: (id: string) => Promise<FlashSessionData<Data, FlashData> | null>;
|
760 | |
761 |
|
762 |
|
763 | updateData: (id: string, data: FlashSessionData<Data, FlashData>, expires?: Date) => Promise<void>;
|
764 | |
765 |
|
766 |
|
767 | deleteData: (id: string) => Promise<void>;
|
768 | }
|
769 |
|
770 |
|
771 |
|
772 |
|
773 |
|
774 |
|
775 | declare function createSessionStorage<Data = SessionData, FlashData = Data>({ cookie: cookieArg, createData, readData, updateData, deleteData, }: SessionIdStorageStrategy<Data, FlashData>): SessionStorage<Data, FlashData>;
|
776 |
|
777 | interface CookieSessionStorageOptions {
|
778 | |
779 |
|
780 |
|
781 |
|
782 | cookie?: SessionIdStorageStrategy["cookie"];
|
783 | }
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 |
|
792 |
|
793 | declare function createCookieSessionStorage<Data = SessionData, FlashData = Data>({ cookie: cookieArg }?: CookieSessionStorageOptions): SessionStorage<Data, FlashData>;
|
794 |
|
795 | interface MemorySessionStorageOptions {
|
796 | |
797 |
|
798 |
|
799 |
|
800 | cookie?: SessionIdStorageStrategy["cookie"];
|
801 | }
|
802 |
|
803 |
|
804 |
|
805 |
|
806 |
|
807 |
|
808 |
|
809 | declare function createMemorySessionStorage<Data = SessionData, FlashData = Data>({ cookie }?: MemorySessionStorageOptions): SessionStorage<Data, FlashData>;
|
810 |
|
811 | type DevServerHooks = {
|
812 | getCriticalCss?: (build: ServerBuild, pathname: string) => Promise<string | undefined>;
|
813 | processRequestError?: (error: unknown) => void;
|
814 | };
|
815 | declare function setDevServerHooks(devServerHooks: DevServerHooks): void;
|
816 |
|
817 | declare function deserializeErrors(errors: RouterState["errors"]): RouterState["errors"];
|
818 |
|
819 | type RemixErrorBoundaryProps = React.PropsWithChildren<{
|
820 | location: Location;
|
821 | isOutsideRemixApp?: boolean;
|
822 | error?: Error;
|
823 | }>;
|
824 | type RemixErrorBoundaryState = {
|
825 | error: null | Error;
|
826 | location: Location;
|
827 | };
|
828 | declare class RemixErrorBoundary extends React.Component<RemixErrorBoundaryProps, RemixErrorBoundaryState> {
|
829 | constructor(props: RemixErrorBoundaryProps);
|
830 | static getDerivedStateFromError(error: Error): {
|
831 | error: Error;
|
832 | };
|
833 | static getDerivedStateFromProps(props: RemixErrorBoundaryProps, state: RemixErrorBoundaryState): {
|
834 | error: Error | null;
|
835 | location: Location<any>;
|
836 | };
|
837 | render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
838 | }
|
839 |
|
840 | export { ActionFunction, ActionFunctionArgs, AppLoadContext$1 as AppLoadContext, Blocker, BlockerFunction, ClientActionFunction, ClientLoaderFunction, type Cookie, type CookieOptions, type CookieSignatureOptions, type CreateRequestHandlerFunction, Router as DataRouter, DataStrategyFunction, EntryContext, type FlashSessionData, type HandleDataRequestFunction, type HandleDocumentRequestFunction, type HandleErrorFunction, type HeadersArgs, type HeadersFunction, HydrationState, IndexRouteObject, InitialEntry, type IsCookieFunction, type IsSessionFunction, LinksFunction, LoaderFunction, LoaderFunctionArgs, Location, MetaFunction, type NavigateFunction, NavigateOptions, Navigation, Action as NavigationType, NonIndexRouteObject, ParamParseKey, Params, Path, PathMatch, PathPattern, RelativeRoutingType, type RequestHandler, RevalidationState, RouteObject, RouterState, type RoutesTestStubProps, type ServerBuild, type ServerEntryModule, ServerRouter, type ServerRouterProps, type Session, type SessionData, type SessionIdStorageStrategy, type SessionStorage, StaticHandler, StaticHandlerContext, StaticRouter, type StaticRouterProps, StaticRouterProvider, type StaticRouterProviderProps, To, UIMatch, AssetsManifest as UNSAFE_AssetsManifest, RemixErrorBoundary as UNSAFE_RemixErrorBoundary, RouteModules as UNSAFE_RouteModules, ServerMode as UNSAFE_ServerMode, SingleFetchRedirectSymbol as UNSAFE_SingleFetchRedirectSymbol, decodeViaTurboStream as UNSAFE_decodeViaTurboStream, deserializeErrors as UNSAFE_deserializeErrors, getSingleFetchDataStrategy as UNSAFE_getSingleFetchDataStrategy, createCookie, createCookieSessionStorage, createMemorySessionStorage, createRequestHandler, createRoutesStub, createSession, createSessionStorage, createStaticHandler, createStaticRouter, isCookie, isSession, setDevServerHooks as unstable_setDevServerHooks, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };
|