swico 0.6.3 → 0.6.4-beta1
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/package.json +1 -1
- package/src/global-type.d.ts +35 -0
- package/src/global-type.js +2 -0
- package/src/mock-history.d.ts +1 -0
- package/src/template/react/$env/history.d.ts +1 -0
- package/src/template/react/react-hooks.d.ts +1 -0
- package/src/template/vue/$env/history.d.ts +1 -0
- package/src/template/vue/vue-hooks.d.ts +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type SwicoLocationType = {
|
|
2
|
+
name: string;
|
|
3
|
+
path: string;
|
|
4
|
+
pathname: string;
|
|
5
|
+
search: string;
|
|
6
|
+
query?: Record<string, any>;
|
|
7
|
+
hash: string;
|
|
8
|
+
params?: Record<string, any>;
|
|
9
|
+
};
|
|
10
|
+
export type SwicoHistoryOptionType = {
|
|
11
|
+
query?: Record<string, any>;
|
|
12
|
+
params?: Record<string, any>;
|
|
13
|
+
hash?: string;
|
|
14
|
+
path?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
export type SwicoHistoryType = {
|
|
18
|
+
push: (to: string | SwicoHistoryOptionType) => void;
|
|
19
|
+
replace: SwicoHistoryType['push'];
|
|
20
|
+
go: (delta: number) => void;
|
|
21
|
+
forward: () => void;
|
|
22
|
+
back: () => void;
|
|
23
|
+
location: SwicoLocationType;
|
|
24
|
+
};
|
|
25
|
+
export type UseLocationType = {
|
|
26
|
+
(): {
|
|
27
|
+
name: string;
|
|
28
|
+
path: string;
|
|
29
|
+
pathname: string;
|
|
30
|
+
search: string;
|
|
31
|
+
query?: Record<string, any>;
|
|
32
|
+
hash: string;
|
|
33
|
+
params?: Record<string, any>;
|
|
34
|
+
};
|
|
35
|
+
};
|
package/src/mock-history.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConfigRouterType } from '../../../utils/config';
|
|
2
|
+
import { SwicoHistoryType } from '../../../global-type';
|
|
2
3
|
export { unstable_HistoryRouter as HistoryRouter } from 'react-router-dom';
|
|
3
4
|
export declare const formatAncPath: (ancPath: string) => string;
|
|
4
5
|
export declare const pathNameList: {
|