clear-react-router 1.0.3 → 1.0.6
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/README.md +29 -30
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/Router.d.ts +1 -1
- package/dist/context/RouterContext.d.ts +5 -5
- package/dist/hooks/useBlocker.d.ts +1 -1
- package/dist/hooks/useHandleNavigation.d.ts +1 -1
- package/dist/hooks/useLatest.d.ts +1 -1
- package/dist/hooks/useLoader.d.ts +3 -3
- package/dist/hooks/useLocation.d.ts +1 -1
- package/dist/hooks/useNavigate.d.ts +1 -1
- package/dist/hooks/useServiceContext.d.ts +3 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +437 -515
- package/dist/provider/RouterProvider.d.ts +2 -2
- package/dist/types/global.d.ts +1 -1
- package/dist/utils/createLazyComponent.d.ts +1 -1
- package/dist/utils/renderElement.d.ts +1 -1
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +49 -50
- package/dist/vite.config.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ActionsContextValue, DataContextValue, NavigationContextValue } from '../context/RouterContext';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ActionsContextValue, type DataContextValue, type NavigationContextValue } from '../context/RouterContext';
|
|
3
3
|
type RouterProviderProps = NavigationContextValue & ActionsContextValue & DataContextValue & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
};
|
package/dist/types/global.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, ReactElement } from 'react';
|
|
1
|
+
import { type ComponentType, type ReactElement } from 'react';
|
|
2
2
|
export declare const createLazyComponent: (importFn: () => Promise<{
|
|
3
3
|
default: ComponentType<unknown>;
|
|
4
4
|
}>, fallback?: ReactElement | (() => ReactElement)) => (() => ReactElement);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
2
|
export declare const renderElement: (Component?: (() => ReactElement) | ReactElement) => import("react").JSX.Element | null;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientRouteItem, Location, RouteItem } from '../types/global.ts';
|
|
1
|
+
import type { ClientRouteItem, Location, RouteItem } from '../types/global.ts';
|
|
2
2
|
export declare const createRouter: (clientList: ClientRouteItem[]) => RouteItem[];
|
|
3
3
|
export declare const getParamsObject: (params: RouteItem["params"]) => {};
|
|
4
4
|
export declare const parseWindowLocation: (location: typeof window.location) => Location;
|
package/package.json
CHANGED
|
@@ -1,50 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "clear-react-router",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A lightweight, type-safe routing library for React applications",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@types/react": "^19.2.17",
|
|
43
|
-
"@vitejs/plugin-react": "^
|
|
44
|
-
"react": "^19.2.7",
|
|
45
|
-
"react-dom": "^19.2.7",
|
|
46
|
-
"typescript": "^6.0.3",
|
|
47
|
-
"vite": "^
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "clear-react-router",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "A lightweight, type-safe routing library for React applications",
|
|
5
|
+
"author": "Andrew Bubnov",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "vite build && tsc --emitDeclarationOnly"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"react",
|
|
14
|
+
"router",
|
|
15
|
+
"routing",
|
|
16
|
+
"typescript",
|
|
17
|
+
"spa",
|
|
18
|
+
"nested-routes"
|
|
19
|
+
],
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/AndrewBubnov/clear-react-router"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": ">=16.8.0",
|
|
27
|
+
"react-dom": ">=16.8.0"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"type": "module",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"import": "./dist/index.js",
|
|
38
|
+
"require": "./dist/index.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/react": "^19.2.17",
|
|
43
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
44
|
+
"react": "^19.2.7",
|
|
45
|
+
"react-dom": "^19.2.7",
|
|
46
|
+
"typescript": "^6.0.3",
|
|
47
|
+
"vite": "^8.0.16"
|
|
48
|
+
}
|
|
49
|
+
}
|
package/dist/vite.config.d.ts
DELETED