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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "0.6.3",
3
+ "version": "0.6.4-beta1",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
+ import { SwicoHistoryType } from './global-type';
1
2
  export declare const history: SwicoHistoryType;
@@ -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: {
@@ -1 +1,2 @@
1
+ import type { UseLocationType } from '../../global-type';
1
2
  export declare const useLocation: UseLocationType;
@@ -1,2 +1,3 @@
1
+ import { SwicoHistoryType } from '../../../global-type';
1
2
  export declare let history: SwicoHistoryType;
2
3
  export declare const getRouter: () => import("vue-router").Router;
@@ -1,2 +1,3 @@
1
+ import { UseLocationType } from '../../global-type';
1
2
  export declare const getFormatRouterBase: (routerBase: any) => any;
2
3
  export declare const useLocation: UseLocationType;