neouter 0.1.2 → 0.1.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 +7 -5
- package/dist/index.d.mts +5 -5
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# neouter
|
|
2
2
|
|
|
3
|
-
neouter($/njuːtər/$, ニョーター) is type-safe router for minimalists!
|
|
4
|
-
|
|
5
|
-
**This project is still under development and may be unstable. PLEASE DO NOT USE IT IN PRODUCTION ENVIRONMENTS!!**
|
|
3
|
+
neouter($/njuːtər/$, ニョーター) is type-safe router for minimalists!
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -27,8 +25,12 @@ const routes = {
|
|
|
27
25
|
};
|
|
28
26
|
|
|
29
27
|
export const App = () => {
|
|
30
|
-
const { Router } = useCreateRoutes({ routes });
|
|
31
|
-
return
|
|
28
|
+
const { Router, RouterProvider } = useCreateRoutes({ routes });
|
|
29
|
+
return (
|
|
30
|
+
<RouterProvider>
|
|
31
|
+
<Router />
|
|
32
|
+
</RouterProvider>
|
|
33
|
+
);
|
|
32
34
|
};
|
|
33
35
|
```
|
|
34
36
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ComponentType } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/types.d.ts
|
|
5
5
|
type Path$1 = string;
|
|
@@ -30,7 +30,7 @@ declare const BaseLink: ({
|
|
|
30
30
|
...props
|
|
31
31
|
}: ComponentProps<"a"> & {
|
|
32
32
|
href: Path$1;
|
|
33
|
-
}) =>
|
|
33
|
+
}) => react_jsx_runtime1.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/hooks/useCreateRoutes.d.ts
|
|
36
36
|
declare const useCreateRoutes: ({
|
|
@@ -45,8 +45,8 @@ declare const useCreateRoutes: ({
|
|
|
45
45
|
children
|
|
46
46
|
}: {
|
|
47
47
|
children: React.ReactNode;
|
|
48
|
-
}) =>
|
|
49
|
-
Router: () =>
|
|
48
|
+
}) => react_jsx_runtime1.JSX.Element;
|
|
49
|
+
Router: () => react_jsx_runtime1.JSX.Element;
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/hooks/usePathParams.d.ts
|
|
@@ -71,6 +71,6 @@ declare const getMatchedPath: (routes: Routes, path: string) => Path$1 | null;
|
|
|
71
71
|
declare function lazyImport<U extends string, T$1 extends { [P in U]: ComponentType }>(factory: () => Promise<T$1>, name: U): T$1;
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/libs/redirect.d.ts
|
|
74
|
-
declare const redirect: <T extends Path$1>(path: T) => () =>
|
|
74
|
+
declare const redirect: <T extends Path$1>(path: T) => () => react_jsx_runtime1.JSX.Element;
|
|
75
75
|
//#endregion
|
|
76
76
|
export { type AssertPathType, BaseLink, type ExtractParams, type ParamsObject, type Path$1 as Path, type QueryParamsValueType, type Routes, type WithQueryAndHash, extractParams, getMatchedPath, lazyImport, redirect, useCreateRoutes, usePathParams, useQueryParams, useRouter };
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neouter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"author": "avaice <avaice@ymail.ne.jp>",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "A type-safe router for minimalists",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/avaice/neouter"
|
|
10
|
+
},
|
|
7
11
|
"main": "dist/index.mjs",
|
|
8
12
|
"types": "dist/index.d.mts",
|
|
9
13
|
"files": [
|