@moneko/react 1.7.1 → 1.7.2

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/link.d.tsx CHANGED
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { Link as ReactRouterLink, type LinkProps as ReactRouterLinkProps } from 'react-router-dom';
3
- import parseToByReservedWord from './parse-reserved-word.js';
4
- export interface LinkProps extends ReactRouterLinkProps {
3
+ import parseToByReservedWord, { type IPath } from './parse-reserved-word.js';
4
+ export interface LinkProps extends Omit<ReactRouterLinkProps, 'to'> {
5
5
  reserved?: string | string[];
6
+ to: string | IPath;
6
7
  }
7
8
  declare const Link: React.FC<LinkProps>;
8
9
  export default Link;
@@ -1,5 +1,8 @@
1
- import type { To } from 'react-router-dom';
1
+ import type { Path } from 'react-router-dom';
2
2
  declare function parse(reserved?: string | string[]);
3
3
  declare function parseReservedWord(reserved?: string | string[]): string[];
4
- declare const parseToByReservedWord: (to: To, reserved?: string | string[]) => any;
4
+ export interface IPath extends Partial<Omit<Path, 'search'>> {
5
+ search?: string | URLSearchParams | string[][] | Record<string, string>;
6
+ }
7
+ declare const parseToByReservedWord: (to: string | IPath, reserved?: string | string[]) => any;
5
8
  export default parseToByReservedWord;
@@ -1,4 +1,8 @@
1
- import { type NavigateFunction, type NavigateOptions, type To, useNavigate as useNavigateReactRouter } from 'react-router-dom';
2
- import parseToByReservedWord from './parse-reserved-word.js';
3
- declare const useNavigate: (reserved?: string | string[]) => NavigateFunction;
1
+ import { type NavigateOptions, type To, useNavigate as useNavigateReactRouter } from 'react-router-dom';
2
+ import parseToByReservedWord, { type IPath } from './parse-reserved-word.js';
3
+ interface NavigateFunction {
4
+ (to: string | IPath, options?: NavigateOptions) : void;
5
+ (delta: number) : void;
6
+ }
7
+ declare const useNavigate: (reserved?: string | string[]) => any;
4
8
  export default useNavigate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/react",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {