@moneko/react 1.7.7 → 1.8.0
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
|
@@ -100,7 +100,7 @@ declare module '@app/info' {
|
|
|
100
100
|
export default app;
|
|
101
101
|
}
|
|
102
102
|
declare module '@app/routes' {
|
|
103
|
-
import type { NonIndexRouteObject } from 'react-router
|
|
103
|
+
import type { NonIndexRouteObject } from 'react-router/dom';
|
|
104
104
|
export interface RouteConfig extends Omit<NonIndexRouteObject, 'element' | 'children'> {
|
|
105
105
|
/** 菜单id */
|
|
106
106
|
key?: string;
|
|
@@ -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/mdx.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
type RecordObject = Record<string, any>;
|
|
2
3
|
export interface MDXComponents {
|
|
3
|
-
[k: string]: (props:
|
|
4
|
+
[k: string]: (props: RecordObject) => React.JSX.Element;
|
|
4
5
|
}
|
|
5
6
|
export interface MDXProviderProps extends React.Component {
|
|
6
7
|
children: React.JSX.Element;
|
|
7
|
-
components: MDXComponents | ((props:
|
|
8
|
+
components: MDXComponents | ((props: RecordObject) => MDXComponents);
|
|
8
9
|
disableParentContext?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const emptyComponents: Readonly<MDXComponents>;
|
|
11
12
|
declare const MDXContext: React.Context<Readonly<MDXComponents>>;
|
|
12
|
-
export declare function useMDXComponents(components: MDXComponents | ((props:
|
|
13
|
-
export declare function MDXProvider(
|
|
13
|
+
export declare function useMDXComponents(components: MDXComponents | ((props: RecordObject) => MDXComponents)): MDXComponents;
|
|
14
|
+
export declare function MDXProvider({ components, disableParentContext, children }: MDXProviderProps): React.JSX.Element;
|
package/mdx.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import*as t from"react";let
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import*as t from"react";let o={},n=t.createContext(o);export function useMDXComponents(e){let o=t.useContext(n);return t.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}export function MDXProvider({components:r,disableParentContext:u,children:i}){let s=useMDXComponents(r),c=t.useMemo(()=>u?"function"==typeof r?r(o):r||o:s,[s,r,u]);return e(n.Provider,{value:c,children:i})}
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
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
|
+
"prepare": "husky node_modules/.husky && echo npm run lint:commit > node_modules/.husky/pre-commit",
|
|
11
|
+
"lint:commit": "lint-git mode=commit",
|
|
12
|
+
"lint:ci": "lint-git mode=ci"
|
|
10
13
|
},
|
|
11
14
|
"author": "moneko",
|
|
12
15
|
"type": "module",
|
|
@@ -15,21 +18,26 @@
|
|
|
15
18
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
|
|
16
19
|
"react-refresh": "0.16.0",
|
|
17
20
|
"react-refresh-typescript": "2.0.10",
|
|
18
|
-
"react-router": "6.
|
|
19
|
-
"react-router-dom": "6.
|
|
21
|
+
"react-router": "6.28.2",
|
|
22
|
+
"react-router-dom": "6.28.2",
|
|
20
23
|
"shared-store-object": "1.2.1"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
23
26
|
"@moneko/convert": "1.0.0",
|
|
27
|
+
"@moneko/eslint": "1.0.1",
|
|
28
|
+
"@moneko/stylelint": "1.0.2",
|
|
24
29
|
"@moneko/transform-imports": "0.6.1",
|
|
25
30
|
"@moneko/utils": "0.1.22",
|
|
26
|
-
"@types/node": "22.
|
|
27
|
-
"@types/react": "19.0.
|
|
28
|
-
"@types/react-dom": "19.0.
|
|
29
|
-
"eslint-
|
|
31
|
+
"@types/node": "22.13.9",
|
|
32
|
+
"@types/react": "19.0.10",
|
|
33
|
+
"@types/react-dom": "19.0.4",
|
|
34
|
+
"eslint-plugin-react": "7.37.4",
|
|
35
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
36
|
+
"husky": "9.1.7",
|
|
37
|
+
"lint-staged-by-git": "1.1.1",
|
|
30
38
|
"react": "19.0.0",
|
|
31
39
|
"react-dom": "19.0.0",
|
|
32
|
-
"typescript": "5.
|
|
40
|
+
"typescript": "5.8.2"
|
|
33
41
|
},
|
|
34
42
|
"files": [
|
|
35
43
|
"lib",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|