@moneko/react 2.0.14 → 2.1.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/env.d.ts CHANGED
@@ -15,13 +15,6 @@ declare module './index.less' {
15
15
  export default styles;
16
16
  }
17
17
 
18
- declare module '*.mdx' {
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- let MDXComponent: (props: any) => JSX.Element;
21
-
22
- export default MDXComponent;
23
- }
24
-
25
18
  declare module '*?raw' {
26
19
  export default string;
27
20
  }
@@ -62,43 +55,7 @@ declare module '@app/docs' {
62
55
 
63
56
  export default entry;
64
57
  }
65
- declare module '@app/info' {
66
- interface App {
67
- /** 应用名称 */
68
- name: string;
69
- /** 应用描述 */
70
- description: string;
71
- /** 应用版本 */
72
- version: string;
73
- /** 应用类型 */
74
- type: 'mobile' | 'site' | 'backstage' | 'micro' | 'library';
75
- /** 开发者 */
76
- author: {
77
- name: string;
78
- url?: string;
79
- email?: string;
80
- };
81
- /** 存储库 */
82
- repository: {
83
- type?: string;
84
- url?: string;
85
- directory?: string;
86
- };
87
- /** 路由模式 */
88
- routerMode: 'hash' | 'browser';
89
- /** 根路由 */
90
- base: string;
91
- prefixCls?: string;
92
- theme?: string;
93
- projectName: string;
94
- ssr: boolean;
95
- injectRemoteReactRefresh?: boolean;
96
- frameworkVersion: string;
97
- }
98
- const app: App;
99
58
 
100
- export default app;
101
- }
102
59
  declare module '@app/routes' {
103
60
  import type { RouteObject } from 'react-router-dom';
104
61
  export interface RouteConfig extends Omit<RouteObject, 'element' | 'children'> {
@@ -1 +1 @@
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}});
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=>{if(h.has(e)&&!r.has(e)){let a=h.get(e);void 0===a?r.delete(e):r.set(e,a??"")}}),{pathname:t,search:r.toString(),hash:s}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/react",
3
- "version": "2.0.14",
3
+ "version": "2.1.1",
4
4
  "description": "react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -17,11 +17,11 @@
17
17
  "sideEffects": false,
18
18
  "dependencies": {
19
19
  "@pmmmwh/react-refresh-webpack-plugin": "0.6.1",
20
- "react-refresh": "0.17.0",
21
- "react-refresh-typescript": "2.0.10",
20
+ "react-refresh": "0.18.0",
21
+ "react-refresh-typescript": "2.0.11",
22
22
  "react-router": "6.3.0",
23
23
  "react-router-dom": "6.3.0",
24
- "shared-store-object": "1.2.8"
24
+ "shared-store-object": "1.3.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@moneko/convert": "1.0.1",
@@ -32,6 +32,7 @@
32
32
  "@types/node": "22.14.0",
33
33
  "@types/react": "19.1.0",
34
34
  "@types/react-dom": "19.1.2",
35
+ "@types/react-refresh": "0.14.6",
35
36
  "husky": "9.1.7",
36
37
  "lint-staged-by-git": "1.3.0",
37
38
  "react": "19.1.0",
@@ -1,3 +0,0 @@
1
- import ReactDOM from 'react-dom';
2
- import { injectIntoGlobalHook } from 'react-refresh';
3
- export declare const injectReactRefresh: () => void;
@@ -1 +0,0 @@
1
- import e from"react-dom";import{injectIntoGlobalHook as r}from"react-refresh";export const injectReactRefresh=()=>{r(window),window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject(e)};injectReactRefresh();