@moneko/react 1.7.7 → 2.0.1
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/lib/parse-reserved-word.d.ts +1 -1
- package/lib/parse-reserved-word.js +1 -1
- package/lib/use-navgate.d.ts +1 -1
- package/lib/use-navgate.js +1 -1
- package/lib/use-query.d.ts +1 -1
- package/lib/use-query.js +1 -1
- package/package.json +15 -9
- /package/lib/{activity.d.tsx → activity.d.ts} +0 -0
- /package/lib/{error-boundary.d.tsx → error-boundary.d.ts} +0 -0
- /package/lib/{link.d.tsx → link.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Path } from 'react-router
|
|
1
|
+
import type { Path } from 'react-router';
|
|
2
2
|
declare function parse(reserved?: string | string[]): string[];
|
|
3
3
|
declare function parseReservedWord(reserved?: string | string[]): string[];
|
|
4
4
|
export interface IPath extends Partial<Omit<Path, 'search'>> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default((e,
|
|
1
|
+
export default((e,a)=>{let r,t,s;if("number"==typeof e)return e;if("string"==typeof e){let a=e.split("?");t=a[0],r=new URLSearchParams(a[1])}else{let a=e.pathname?e.pathname.split("?"):[];t=a[0],r=new URLSearchParams(e.search),a[1]&&new URLSearchParams(a[1]).forEach((e,a)=>{r.has(a)||r.set(a,e)}),s=e.hash}let h=new URLSearchParams(location.search);return Array.from(new Set(["menuId","dynamicTitle"].concat(Array.isArray(a)?a:a?[a]:[]))).forEach(e=>{h.has(e)&&!r.has(e)&&r.set(e,h.get(e)??"")}),{pathname:t,search:r.toString(),hash:s}});
|
package/lib/use-navgate.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type NavigateOptions, useNavigate as useNavigateReactRouter } from 'react-router
|
|
1
|
+
import { type NavigateOptions, useNavigate as useNavigateReactRouter } from 'react-router';
|
|
2
2
|
import parseToByReservedWord, { type To } from './parse-reserved-word.js';
|
|
3
3
|
interface NavigateFunction {
|
|
4
4
|
(to: To, options?: NavigateOptions) : void;
|
package/lib/use-navgate.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useNavigate as r}from"react-router
|
|
1
|
+
import{useNavigate as r}from"react-router";import e from"./parse-reserved-word.js";export default(t=>{let o=r();return(r,a)=>o(e(r,t),a)});
|
package/lib/use-query.d.ts
CHANGED
package/lib/use-query.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"react";import{useLocation as e}from"react-router
|
|
1
|
+
import*as r from"react";import{useLocation as e}from"react-router";export default(()=>{let t=e();return r.useMemo(()=>Object.fromEntries(new URLSearchParams(t.search)),[t.search])});
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "react",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prebuild": "rm -rf ./lib",
|
|
8
8
|
"build": "node ./build.mjs",
|
|
9
|
-
"prepublishOnly": "npm run build"
|
|
9
|
+
"prepublishOnly": "npm run build",
|
|
10
|
+
"lint:commit": "lint-git mode=commit",
|
|
11
|
+
"lint:ci": "lint-git mode=ci"
|
|
10
12
|
},
|
|
11
13
|
"author": "moneko",
|
|
12
14
|
"type": "module",
|
|
@@ -15,21 +17,25 @@
|
|
|
15
17
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
|
|
16
18
|
"react-refresh": "0.16.0",
|
|
17
19
|
"react-refresh-typescript": "2.0.10",
|
|
18
|
-
"react-router": "
|
|
19
|
-
"react-router-dom": "
|
|
20
|
+
"react-router": "7.2.0",
|
|
21
|
+
"react-router-dom": "7.2.0",
|
|
20
22
|
"shared-store-object": "1.2.1"
|
|
21
23
|
},
|
|
22
24
|
"devDependencies": {
|
|
23
25
|
"@moneko/convert": "1.0.0",
|
|
26
|
+
"@moneko/eslint": "1.0.1",
|
|
27
|
+
"@moneko/stylelint": "1.0.2",
|
|
24
28
|
"@moneko/transform-imports": "0.6.1",
|
|
25
29
|
"@moneko/utils": "0.1.22",
|
|
26
|
-
"@types/node": "22.
|
|
27
|
-
"@types/react": "19.0.
|
|
28
|
-
"@types/react-dom": "19.0.
|
|
29
|
-
"eslint-
|
|
30
|
+
"@types/node": "22.13.9",
|
|
31
|
+
"@types/react": "19.0.10",
|
|
32
|
+
"@types/react-dom": "19.0.4",
|
|
33
|
+
"eslint-plugin-react": "7.37.4",
|
|
34
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
35
|
+
"lint-staged-by-git": "1.1.1",
|
|
30
36
|
"react": "19.0.0",
|
|
31
37
|
"react-dom": "19.0.0",
|
|
32
|
-
"typescript": "5.7.
|
|
38
|
+
"typescript": "5.7.3"
|
|
33
39
|
},
|
|
34
40
|
"files": [
|
|
35
41
|
"lib",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|