react-router 0.0.0-experimental-e16afd9b7 → 0.0.0-experimental-52e9b8eb3
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 +8 -0
- package/README.md +10 -1
- package/dist/index.d.ts +16 -33
- package/dist/index.js +1114 -9501
- package/dist/index.js.map +1 -1
- package/dist/lib/components.d.ts +19 -189
- package/dist/lib/context.d.ts +4 -4
- package/dist/lib/hooks.d.ts +17 -46
- package/dist/main.js +1 -1
- package/dist/react-router.development.js +1152 -10370
- package/dist/react-router.development.js.map +1 -1
- package/dist/react-router.production.min.js +2 -2
- package/dist/react-router.production.min.js.map +1 -1
- package/dist/umd/react-router.development.js +1259 -10541
- package/dist/umd/react-router.development.js.map +1 -1
- package/dist/umd/react-router.production.min.js +2 -2
- package/dist/umd/react-router.production.min.js.map +1 -1
- package/package.json +4 -19
- package/dist/lib/dom/dom.d.ts +0 -104
- package/dist/lib/dom/global.d.ts +0 -38
- package/dist/lib/dom/lib.d.ts +0 -572
- package/dist/lib/dom/server.d.ts +0 -32
- package/dist/lib/dom/ssr/browser.d.ts +0 -3
- package/dist/lib/dom/ssr/components.d.ts +0 -94
- package/dist/lib/dom/ssr/create-remix-stub.d.ts +0 -56
- package/dist/lib/dom/ssr/data.d.ts +0 -7
- package/dist/lib/dom/ssr/errorBoundaries.d.ts +0 -33
- package/dist/lib/dom/ssr/errors.d.ts +0 -2
- package/dist/lib/dom/ssr/fallback.d.ts +0 -2
- package/dist/lib/dom/ssr/invariant.d.ts +0 -2
- package/dist/lib/dom/ssr/links.d.ts +0 -126
- package/dist/lib/dom/ssr/markup.d.ts +0 -5
- package/dist/lib/dom/ssr/routeModules.d.ts +0 -141
- package/dist/lib/dom/ssr/routes.d.ts +0 -32
- package/dist/lib/dom/ssr/server.d.ts +0 -13
- package/dist/lib/dom/ssr/single-fetch.d.ts +0 -37
- package/dist/lib/router/history.d.ts +0 -249
- package/dist/lib/router/index.d.ts +0 -9
- package/dist/lib/router/router.d.ts +0 -521
- package/dist/lib/router/utils.d.ts +0 -520
- package/dist/rsc.js +0 -1641
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-router",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-52e9b8eb3",
|
|
4
4
|
"description": "Declarative routing for React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -22,30 +22,15 @@
|
|
|
22
22
|
"unpkg": "./dist/umd/react-router.production.min.js",
|
|
23
23
|
"module": "./dist/index.js",
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"react-server": "./dist/rsc.js",
|
|
29
|
-
"module": "./dist/index.js",
|
|
30
|
-
"default": "./dist/main.js"
|
|
31
|
-
},
|
|
32
|
-
"./package.json": "./package.json"
|
|
33
|
-
},
|
|
34
25
|
"dependencies": {
|
|
35
|
-
"
|
|
26
|
+
"@remix-run/router": "0.0.0-experimental-52e9b8eb3"
|
|
36
27
|
},
|
|
37
28
|
"devDependencies": {
|
|
38
29
|
"react": "^18.2.0",
|
|
39
|
-
"react-dom": "
|
|
30
|
+
"react-router-dom": "0.0.0-experimental-52e9b8eb3"
|
|
40
31
|
},
|
|
41
32
|
"peerDependencies": {
|
|
42
|
-
"react": ">=16.8"
|
|
43
|
-
"react-dom": ">=16.8"
|
|
44
|
-
},
|
|
45
|
-
"peerDependenciesMeta": {
|
|
46
|
-
"react-dom": {
|
|
47
|
-
"optional": true
|
|
48
|
-
}
|
|
33
|
+
"react": ">=16.8"
|
|
49
34
|
},
|
|
50
35
|
"files": [
|
|
51
36
|
"dist/",
|
package/dist/lib/dom/dom.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { FormEncType, HTMLFormMethod, RelativeRoutingType } from "../router";
|
|
2
|
-
export declare const defaultMethod: HTMLFormMethod;
|
|
3
|
-
export declare function isHtmlElement(object: any): object is HTMLElement;
|
|
4
|
-
export declare function isButtonElement(object: any): object is HTMLButtonElement;
|
|
5
|
-
export declare function isFormElement(object: any): object is HTMLFormElement;
|
|
6
|
-
export declare function isInputElement(object: any): object is HTMLInputElement;
|
|
7
|
-
type LimitedMouseEvent = Pick<MouseEvent, "button" | "metaKey" | "altKey" | "ctrlKey" | "shiftKey">;
|
|
8
|
-
export declare function shouldProcessLinkClick(event: LimitedMouseEvent, target?: string): boolean;
|
|
9
|
-
export type ParamKeyValuePair = [string, string];
|
|
10
|
-
export type URLSearchParamsInit = string | ParamKeyValuePair[] | Record<string, string | string[]> | URLSearchParams;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a URLSearchParams object using the given initializer.
|
|
13
|
-
*
|
|
14
|
-
* This is identical to `new URLSearchParams(init)` except it also
|
|
15
|
-
* supports arrays as values in the object form of the initializer
|
|
16
|
-
* instead of just strings. This is convenient when you need multiple
|
|
17
|
-
* values for a given key, but don't want to use an array initializer.
|
|
18
|
-
*
|
|
19
|
-
* For example, instead of:
|
|
20
|
-
*
|
|
21
|
-
* let searchParams = new URLSearchParams([
|
|
22
|
-
* ['sort', 'name'],
|
|
23
|
-
* ['sort', 'price']
|
|
24
|
-
* ]);
|
|
25
|
-
*
|
|
26
|
-
* you can do:
|
|
27
|
-
*
|
|
28
|
-
* let searchParams = createSearchParams({
|
|
29
|
-
* sort: ['name', 'price']
|
|
30
|
-
* });
|
|
31
|
-
*/
|
|
32
|
-
export declare function createSearchParams(init?: URLSearchParamsInit): URLSearchParams;
|
|
33
|
-
export declare function getSearchParamsForLocation(locationSearch: string, defaultSearchParams: URLSearchParams | null): URLSearchParams;
|
|
34
|
-
type JsonObject = {
|
|
35
|
-
[Key in string]: JsonValue;
|
|
36
|
-
} & {
|
|
37
|
-
[Key in string]?: JsonValue | undefined;
|
|
38
|
-
};
|
|
39
|
-
type JsonArray = JsonValue[] | readonly JsonValue[];
|
|
40
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
41
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
42
|
-
export type SubmitTarget = HTMLFormElement | HTMLButtonElement | HTMLInputElement | FormData | URLSearchParams | JsonValue | null;
|
|
43
|
-
export interface SubmitOptions {
|
|
44
|
-
/**
|
|
45
|
-
* The HTTP method used to submit the form. Overrides `<form method>`.
|
|
46
|
-
* Defaults to "GET".
|
|
47
|
-
*/
|
|
48
|
-
method?: HTMLFormMethod;
|
|
49
|
-
/**
|
|
50
|
-
* The action URL path used to submit the form. Overrides `<form action>`.
|
|
51
|
-
* Defaults to the path of the current route.
|
|
52
|
-
*/
|
|
53
|
-
action?: string;
|
|
54
|
-
/**
|
|
55
|
-
* The encoding used to submit the form. Overrides `<form encType>`.
|
|
56
|
-
* Defaults to "application/x-www-form-urlencoded".
|
|
57
|
-
*/
|
|
58
|
-
encType?: FormEncType;
|
|
59
|
-
/**
|
|
60
|
-
* Indicate a specific fetcherKey to use when using navigate=false
|
|
61
|
-
*/
|
|
62
|
-
fetcherKey?: string;
|
|
63
|
-
/**
|
|
64
|
-
* navigate=false will use a fetcher instead of a navigation
|
|
65
|
-
*/
|
|
66
|
-
navigate?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Set `true` to replace the current entry in the browser's history stack
|
|
69
|
-
* instead of creating a new one (i.e. stay on "the same page"). Defaults
|
|
70
|
-
* to `false`.
|
|
71
|
-
*/
|
|
72
|
-
replace?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* State object to add to the history stack entry for this navigation
|
|
75
|
-
*/
|
|
76
|
-
state?: any;
|
|
77
|
-
/**
|
|
78
|
-
* Determines whether the form action is relative to the route hierarchy or
|
|
79
|
-
* the pathname. Use this if you want to opt out of navigating the route
|
|
80
|
-
* hierarchy and want to instead route based on /-delimited URL segments
|
|
81
|
-
*/
|
|
82
|
-
relative?: RelativeRoutingType;
|
|
83
|
-
/**
|
|
84
|
-
* In browser-based environments, prevent resetting scroll after this
|
|
85
|
-
* navigation when using the <ScrollRestoration> component
|
|
86
|
-
*/
|
|
87
|
-
preventScrollReset?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Enable flushSync for this navigation's state updates
|
|
90
|
-
*/
|
|
91
|
-
unstable_flushSync?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Enable view transitions on this submission navigation
|
|
94
|
-
*/
|
|
95
|
-
unstable_viewTransition?: boolean;
|
|
96
|
-
}
|
|
97
|
-
export declare function getFormSubmissionInfo(target: SubmitTarget, basename: string): {
|
|
98
|
-
action: string | null;
|
|
99
|
-
method: string;
|
|
100
|
-
encType: string;
|
|
101
|
-
formData: FormData | undefined;
|
|
102
|
-
body: any;
|
|
103
|
-
};
|
|
104
|
-
export {};
|
package/dist/lib/dom/global.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { HydrationState, Router as RemixRouter } from "../router";
|
|
2
|
-
import type { ViewTransition } from "./lib";
|
|
3
|
-
import type { AssetsManifest, FutureConfig as RemixFutureConfig } from "./ssr/entry";
|
|
4
|
-
import type { RouteModules } from "./ssr/routeModules";
|
|
5
|
-
export type WindowRemixContext = {
|
|
6
|
-
url: string;
|
|
7
|
-
basename?: string;
|
|
8
|
-
state: HydrationState;
|
|
9
|
-
criticalCss?: string;
|
|
10
|
-
future: RemixFutureConfig;
|
|
11
|
-
isSpaMode: boolean;
|
|
12
|
-
stream: ReadableStream<Uint8Array> | undefined;
|
|
13
|
-
streamController: ReadableStreamDefaultController<Uint8Array>;
|
|
14
|
-
streamAction?: ReadableStream<Uint8Array> | undefined;
|
|
15
|
-
streamControllerAction?: ReadableStreamDefaultController<Uint8Array>;
|
|
16
|
-
a?: number;
|
|
17
|
-
dev?: {
|
|
18
|
-
port?: number;
|
|
19
|
-
hmrRuntime?: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
declare global {
|
|
23
|
-
var __staticRouterHydrationData: HydrationState | undefined;
|
|
24
|
-
var __reactRouterVersion: string;
|
|
25
|
-
interface Document {
|
|
26
|
-
startViewTransition(cb: () => Promise<void> | void): ViewTransition;
|
|
27
|
-
}
|
|
28
|
-
var __remixContext: WindowRemixContext | undefined;
|
|
29
|
-
var __remixManifest: AssetsManifest | undefined;
|
|
30
|
-
var __remixRouteModules: RouteModules | undefined;
|
|
31
|
-
var __remixRouter: RemixRouter | undefined;
|
|
32
|
-
var __remixRevalidation: number | undefined;
|
|
33
|
-
var __remixClearCriticalCss: (() => void) | undefined;
|
|
34
|
-
var $RefreshRuntime$: {
|
|
35
|
-
performReactRefresh: () => void;
|
|
36
|
-
} | undefined;
|
|
37
|
-
}
|
|
38
|
-
export {};
|