@shuvi/router-react 1.0.0-rc.13 → 1.0.0-rc.14
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/esm/Link.d.ts +0 -2
- package/esm/Link.js +0 -3
- package/esm/contexts.d.ts +4 -5
- package/esm/hooks.d.ts +4 -5
- package/lib/Link.d.ts +0 -2
- package/lib/Link.js +0 -3
- package/lib/contexts.d.ts +4 -5
- package/lib/hooks.d.ts +4 -5
- package/package.json +4 -4
package/esm/Link.d.ts
CHANGED
package/esm/Link.js
CHANGED
|
@@ -72,12 +72,9 @@ export const Link = React.forwardRef(function LinkWithRef(_a, ref) {
|
|
|
72
72
|
if (__DEV__) {
|
|
73
73
|
Link.displayName = 'Link';
|
|
74
74
|
Link.propTypes = {
|
|
75
|
-
onClick: PropTypes.func,
|
|
76
75
|
replace: PropTypes.bool,
|
|
77
76
|
state: PropTypes.object,
|
|
78
77
|
target: PropTypes.string,
|
|
79
|
-
prefetch: PropTypes.bool,
|
|
80
|
-
onMouseEnter: PropTypes.func,
|
|
81
78
|
// @ts-ignore proptypes's bug?
|
|
82
79
|
to: PropTypes.oneOfType([
|
|
83
80
|
PropTypes.string,
|
package/esm/contexts.d.ts
CHANGED
|
@@ -3,12 +3,11 @@ import { IRoute } from '@shuvi/router';
|
|
|
3
3
|
import { IRouterContextObject, IRouteContextObject } from './types';
|
|
4
4
|
export declare const RouterContext: React.Context<IRouterContextObject>;
|
|
5
5
|
export declare const RouteContext: React.Context<IRoute<{
|
|
6
|
-
|
|
7
|
-
children?: any[] | undefined;
|
|
6
|
+
path: string;
|
|
8
7
|
component?: any;
|
|
9
|
-
|
|
8
|
+
children?: any[] | undefined;
|
|
10
9
|
props?: import("@shuvi/router").IRouteComponentProps | undefined;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
redirect?: string | undefined;
|
|
11
|
+
caseSensitive?: boolean | undefined;
|
|
13
12
|
}>>;
|
|
14
13
|
export declare const MatchedRouteContext: React.Context<IRouteContextObject<{}>>;
|
package/esm/hooks.d.ts
CHANGED
|
@@ -4,13 +4,12 @@ import { INavigateFunction, IRouteContextObject } from './types';
|
|
|
4
4
|
* is just point `router.current` object
|
|
5
5
|
*/
|
|
6
6
|
export declare function useCurrentRoute(): import("@shuvi/router").IRoute<{
|
|
7
|
-
|
|
8
|
-
children?: any[] | undefined;
|
|
7
|
+
path: string;
|
|
9
8
|
component?: any;
|
|
10
|
-
|
|
9
|
+
children?: any[] | undefined;
|
|
11
10
|
props?: import("@shuvi/router").IRouteComponentProps | undefined;
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
redirect?: string | undefined;
|
|
12
|
+
caseSensitive?: boolean | undefined;
|
|
14
13
|
}>;
|
|
15
14
|
/**
|
|
16
15
|
* Blocks all navigation attempts. This is useful for preventing the page from
|
package/lib/Link.d.ts
CHANGED
package/lib/Link.js
CHANGED
|
@@ -75,12 +75,9 @@ exports.Link = React.forwardRef(function LinkWithRef(_a, ref) {
|
|
|
75
75
|
if (constants_1.__DEV__) {
|
|
76
76
|
exports.Link.displayName = 'Link';
|
|
77
77
|
exports.Link.propTypes = {
|
|
78
|
-
onClick: PropTypes.func,
|
|
79
78
|
replace: PropTypes.bool,
|
|
80
79
|
state: PropTypes.object,
|
|
81
80
|
target: PropTypes.string,
|
|
82
|
-
prefetch: PropTypes.bool,
|
|
83
|
-
onMouseEnter: PropTypes.func,
|
|
84
81
|
// @ts-ignore proptypes's bug?
|
|
85
82
|
to: PropTypes.oneOfType([
|
|
86
83
|
PropTypes.string,
|
package/lib/contexts.d.ts
CHANGED
|
@@ -3,12 +3,11 @@ import { IRoute } from '@shuvi/router';
|
|
|
3
3
|
import { IRouterContextObject, IRouteContextObject } from './types';
|
|
4
4
|
export declare const RouterContext: React.Context<IRouterContextObject>;
|
|
5
5
|
export declare const RouteContext: React.Context<IRoute<{
|
|
6
|
-
|
|
7
|
-
children?: any[] | undefined;
|
|
6
|
+
path: string;
|
|
8
7
|
component?: any;
|
|
9
|
-
|
|
8
|
+
children?: any[] | undefined;
|
|
10
9
|
props?: import("@shuvi/router").IRouteComponentProps | undefined;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
redirect?: string | undefined;
|
|
11
|
+
caseSensitive?: boolean | undefined;
|
|
13
12
|
}>>;
|
|
14
13
|
export declare const MatchedRouteContext: React.Context<IRouteContextObject<{}>>;
|
package/lib/hooks.d.ts
CHANGED
|
@@ -4,13 +4,12 @@ import { INavigateFunction, IRouteContextObject } from './types';
|
|
|
4
4
|
* is just point `router.current` object
|
|
5
5
|
*/
|
|
6
6
|
export declare function useCurrentRoute(): import("@shuvi/router").IRoute<{
|
|
7
|
-
|
|
8
|
-
children?: any[] | undefined;
|
|
7
|
+
path: string;
|
|
9
8
|
component?: any;
|
|
10
|
-
|
|
9
|
+
children?: any[] | undefined;
|
|
11
10
|
props?: import("@shuvi/router").IRouteComponentProps | undefined;
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
redirect?: string | undefined;
|
|
12
|
+
caseSensitive?: boolean | undefined;
|
|
14
13
|
}>;
|
|
15
14
|
/**
|
|
16
15
|
* Blocks all navigation attempts. This is useful for preventing the page from
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/router-react",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"node": ">= 12.0.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@shuvi/router": "1.0.0-rc.
|
|
32
|
-
"@shuvi/platform-shared": "1.0.0-rc.
|
|
33
|
-
"@shuvi/utils": "1.0.0-rc.
|
|
31
|
+
"@shuvi/router": "1.0.0-rc.14",
|
|
32
|
+
"@shuvi/platform-shared": "1.0.0-rc.14",
|
|
33
|
+
"@shuvi/utils": "1.0.0-rc.14",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"use-sync-external-store": "1.1.0"
|
|
36
36
|
},
|