@moneko/react 2.0.1 → 2.0.3
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/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/mdx.d.ts +5 -4
- package/mdx.js +1 -1
- package/package.json +6 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Path } from 'react-router';
|
|
1
|
+
import type { Path } from 'react-router-dom';
|
|
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'>> {
|
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-dom';
|
|
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";import e from"./parse-reserved-word.js";export default(t=>{let o=r();return(r,a)=>o(e(r,t),a)});
|
|
1
|
+
import{useNavigate as r}from"react-router-dom";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";export default(()=>{let t=e();return r.useMemo(()=>Object.fromEntries(new URLSearchParams(t.search)),[t.search])});
|
|
1
|
+
import*as r from"react";import{useLocation as e}from"react-router-dom";export default(()=>{let t=e();return r.useMemo(()=>Object.fromEntries(new URLSearchParams(t.search)),[t.search])});
|
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,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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
9
|
"prepublishOnly": "npm run build",
|
|
10
|
+
"prepare": "husky node_modules/.husky && echo npm run lint:commit > node_modules/.husky/pre-commit",
|
|
10
11
|
"lint:commit": "lint-git mode=commit",
|
|
11
12
|
"lint:ci": "lint-git mode=ci"
|
|
12
13
|
},
|
|
@@ -17,8 +18,8 @@
|
|
|
17
18
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
|
|
18
19
|
"react-refresh": "0.16.0",
|
|
19
20
|
"react-refresh-typescript": "2.0.10",
|
|
20
|
-
"react-router": "
|
|
21
|
-
"react-router-dom": "
|
|
21
|
+
"react-router": "6.4.0",
|
|
22
|
+
"react-router-dom": "6.4.0",
|
|
22
23
|
"shared-store-object": "1.2.1"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
@@ -32,10 +33,11 @@
|
|
|
32
33
|
"@types/react-dom": "19.0.4",
|
|
33
34
|
"eslint-plugin-react": "7.37.4",
|
|
34
35
|
"eslint-plugin-react-hooks": "5.2.0",
|
|
36
|
+
"husky": "9.1.7",
|
|
35
37
|
"lint-staged-by-git": "1.1.1",
|
|
36
38
|
"react": "19.0.0",
|
|
37
39
|
"react-dom": "19.0.0",
|
|
38
|
-
"typescript": "5.
|
|
40
|
+
"typescript": "5.8.2"
|
|
39
41
|
},
|
|
40
42
|
"files": [
|
|
41
43
|
"lib",
|