@moneko/react 1.7.7 → 1.7.8

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.
@@ -1,4 +1,4 @@
1
- import type { Path } from 'react-router-dom';
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,r)=>{let a,t,n;if("number"==typeof e)return e;if("string"==typeof e){let r=e.split("?");t=r[0],a=new URLSearchParams(r[1])}else t=e.pathname,a=new URLSearchParams(e.search),n=e.hash;let s=new URLSearchParams(location.search);return Array.from(new Set(["menuId","dynamicTitle",...(Array.isArray(r)?r:[r]).filter(Boolean)])).forEach(e=>{s.has(e)&&!a.has(e)&&a.set(e,s.get(e)??"")}),{pathname:t,search:a.toString(),hash:n}});
1
+ export default((e,a)=>{let r,t,n;if("number"==typeof e)return e;if("string"==typeof e){let a=e.split("?");t=a[0],r=new URLSearchParams(a[1])}else t=e.pathname,r=new URLSearchParams(e.search),n=e.hash;let s=new URLSearchParams(location.search);return Array.from(new Set(["menuId","dynamicTitle"].concat(Array.isArray(a)?a:a?[a]:[]))).forEach(e=>{s.has(e)&&!r.has(e)&&r.set(e,s.get(e)??"")}),{pathname:t,search:r.toString(),hash:n}});
@@ -1,4 +1,4 @@
1
- import { type NavigateOptions, useNavigate as useNavigateReactRouter } from 'react-router-dom';
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;
@@ -1 +1 @@
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)});
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,4 +1,4 @@
1
1
  import * as React from 'react';
2
- import { useLocation } from 'react-router-dom';
2
+ import { useLocation } from 'react-router';
3
3
  declare const useQuery: <T>() => T;
4
4
  export default useQuery;
package/lib/use-query.js CHANGED
@@ -1 +1 @@
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])});
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/react",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "description": "react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {