Replace react-hotkeys with updated fork for Vite compatibility
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
5ec0b8e3e2
commit
9174bd774a
3 changed files with 17 additions and 43 deletions
|
@ -61,6 +61,7 @@
|
|||
"@lexical/react": "^0.13.1",
|
||||
"@lexical/selection": "^0.13.1",
|
||||
"@lexical/utils": "^0.13.1",
|
||||
"@mkljczk/react-hotkeys": "^1.2.2",
|
||||
"@noble/hashes": "^1.3.3",
|
||||
"@popperjs/core": "^2.11.5",
|
||||
"@reach/combobox": "^0.18.0",
|
||||
|
@ -147,7 +148,6 @@
|
|||
"react-error-boundary": "^4.0.11",
|
||||
"react-helmet": "^6.1.0",
|
||||
"react-hot-toast": "^2.4.0",
|
||||
"react-hotkeys": "^1.1.4",
|
||||
"react-immutable-pure-component": "^2.2.2",
|
||||
"react-inlinesvg": "^4.0.0",
|
||||
"react-intl": "^6.0.0",
|
||||
|
|
|
@ -1,22 +1,14 @@
|
|||
import { HotKeys as _HotKeys, type HotKeysProps } from '@mkljczk/react-hotkeys';
|
||||
import React from 'react';
|
||||
import { HotKeys as _HotKeys } from 'react-hotkeys';
|
||||
|
||||
type IHotKeys = React.ComponentProps<typeof _HotKeys>;
|
||||
|
||||
/**
|
||||
* Wrapper component around `react-hotkeys`.
|
||||
* `react-hotkeys` is a legacy component, so confining its import to one place is beneficial.
|
||||
*
|
||||
* NOTE: Temporarily disabled due to incompatibility with Vite.
|
||||
*/
|
||||
const HotKeys = React.forwardRef<any, IHotKeys>(({ children, ...rest }, ref) => {
|
||||
// return (
|
||||
// <_HotKeys {...rest} ref={ref}>
|
||||
// {children}
|
||||
// </_HotKeys>
|
||||
// );
|
||||
const HotKeys = React.forwardRef<any, HotKeysProps>(({ children, ...rest }, ref) => (
|
||||
<_HotKeys {...rest} ref={ref}>
|
||||
{children}
|
||||
</_HotKeys>
|
||||
));
|
||||
|
||||
return <>{children}</>;
|
||||
});
|
||||
|
||||
export { HotKeys, type IHotKeys };
|
||||
export { HotKeys, type HotKeysProps as IHotKeys };
|
36
yarn.lock
36
yarn.lock
|
@ -1832,6 +1832,14 @@
|
|||
resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.3.16.tgz#c3b6585c256461fe5e2eac85182b11b36ea2678b"
|
||||
integrity sha512-b0kKg2weqKDLI+Ai5+tocgUEIidccdSfzUndbS2YnwIp5aVvd3M0D+DCcbrsSOSgMyrV9QKMqogtqMIjKwvDxw==
|
||||
|
||||
"@mkljczk/react-hotkeys@^1.2.2":
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@mkljczk/react-hotkeys/-/react-hotkeys-1.2.2.tgz#9e27d1f54f6fcc96657643d07534cf71987eba09"
|
||||
integrity sha512-BGGdSdPtpu+XbqvfO3gxzUNHzMJN0ztmQoIuqEEPBsogH6oAzlGdFnfy5VDxExJ+8LufmLHHr3yZ7eiqYqGvog==
|
||||
dependencies:
|
||||
lodash "^4.17.21"
|
||||
mousetrap "^1.6.5"
|
||||
|
||||
"@noble/ciphers@0.2.0", "@noble/ciphers@^0.2.0":
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@noble/ciphers/-/ciphers-0.2.0.tgz#a12cda60f3cf1ab5d7c77068c3711d2366649ed7"
|
||||
|
@ -6176,21 +6184,6 @@ lodash.debounce@^4.0.8:
|
|||
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
|
||||
integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==
|
||||
|
||||
lodash.isboolean@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6"
|
||||
integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=
|
||||
|
||||
lodash.isequal@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
|
||||
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
|
||||
|
||||
lodash.isobject@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d"
|
||||
integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=
|
||||
|
||||
lodash.isplainobject@^4.0.6:
|
||||
version "4.0.6"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
|
||||
|
@ -6490,7 +6483,7 @@ mlly@^1.2.0, mlly@^1.4.2:
|
|||
pkg-types "^1.0.3"
|
||||
ufo "^1.3.0"
|
||||
|
||||
mousetrap@^1.5.2:
|
||||
mousetrap@^1.6.5:
|
||||
version "1.6.5"
|
||||
resolved "https://registry.yarnpkg.com/mousetrap/-/mousetrap-1.6.5.tgz#8a766d8c272b08393d5f56074e0b5ec183485bf9"
|
||||
integrity sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==
|
||||
|
@ -7476,17 +7469,6 @@ react-hot-toast@^2.4.0:
|
|||
dependencies:
|
||||
goober "^2.1.10"
|
||||
|
||||
react-hotkeys@^1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/react-hotkeys/-/react-hotkeys-1.1.4.tgz#a0712aa2e0c03a759fd7885808598497a4dace72"
|
||||
integrity sha1-oHEqouDAOnWf14hYCFmEl6TaznI=
|
||||
dependencies:
|
||||
lodash.isboolean "^3.0.3"
|
||||
lodash.isequal "^4.5.0"
|
||||
lodash.isobject "^3.0.2"
|
||||
mousetrap "^1.5.2"
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-immutable-pure-component@^2.2.2:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz#3014d3e20cd5a7a4db73b81f1f1464f4d351684b"
|
||||
|
|
Loading…
Reference in a new issue