From 46d2b6866af099281d85fc78e21c925e9145b72b Mon Sep 17 00:00:00 2001 From: Vali Nagacevschi Date: Sun, 11 Sep 2022 10:49:59 +0100 Subject: [PATCH] fix haptic issues --- components/index.tsx | 8 +-- package.json | 7 +- yarn-error.log | 157 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 yarn-error.log diff --git a/components/index.tsx b/components/index.tsx index a001a40..9c57e1a 100644 --- a/components/index.tsx +++ b/components/index.tsx @@ -106,7 +106,7 @@ type Pressable = { onPress?: ((args: any) => void) | null onSelect?: (selected: any) => void } -const withHaptics =

(Component: React.ComponentType

, force = false) => ({ onPress, onSelect, ...props }: any) => { +const withHaptics =

(Component: React.ComponentType

, force = false) => ({ onPress, onSelect, ...props }: any) => { const onHapticPress = (args: any) => { Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success) onPress?.(args) @@ -209,7 +209,7 @@ const restyleFunctions = composeRestyleFunctions([ border, ]) -export const Datepicker = ({ onPress, onSelect, ...props }: BoxProps & UIDatepickerProps): JSX.Element => { +export const Datepicker = ({ onSelect, ...props }: BoxProps & UIDatepickerProps) => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unreachable code error const { style } = useRestyle(restyleFunctions, props) @@ -217,12 +217,12 @@ export const Datepicker = ({ onPress, onSelect, ...props }: BoxProps & UI viewRestyleFunctions, withHaptics(UIDatepicker, true), ) - return + return } type InputProps = UIInputProps & TextProps -export const Input = (props: BoxProps & InputProps): JSX.Element => { +export const Input = (props: BoxProps & InputProps) => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unreachable code error const { style } = useRestyle(restyleFunctions, props) diff --git a/package.json b/package.json index b6c1650..e8b19b4 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,17 @@ { "name": "restyle-ui-kitten", - "version": "1.0.3", + "version": "1.0.4", "dependencies": { "@eva-design/material": "^2.1.1", "@react-native-async-storage/async-storage": "~1.17.3", "@shopify/restyle": "^2.1.0", "@ui-kitten/components": "^5.1.2" }, + "devDependencies": { + "expo-haptics": "~11.3.0", + "react": "18.0.0", + "react-native": "0.69.5" + }, "description": "combine restyle and ui-kitten", "main": "index.ts", "scripts": { diff --git a/yarn-error.log b/yarn-error.log new file mode 100644 index 0000000..ea536d6 --- /dev/null +++ b/yarn-error.log @@ -0,0 +1,157 @@ +Arguments: + /Users/vali/.nvm/versions/node/v16.14.2/bin/node /usr/local/Cellar/yarn/1.22.18/libexec/bin/yarn.js + +PATH: + /usr/local/opt/postgresql@9.4/bin:/Users/vali/.rbenv/shims:/Users/vali/.nvm/versions/node/v16.14.2/bin:/usr/local/sbin:/Users/vali/.rbenv/shims:/Users/vali/.rbenv/bin:/usr/local/opt/openssl@3/bin:/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home/:/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home//bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/vali/.yarn/bin:/Users/vali/miniconda3/bin:/Users/vali/MyWorks/flutter/bin:/Users/vali/Library/Android/sdk/cmdline-tools/latest/bin:/Users/vali/Library/Android/sdk/emulator + +Yarn version: + 1.22.18 + +Node version: + 16.14.2 + +Platform: + darwin x64 + +Trace: + SyntaxError: /Users/vali/MyWorks/react/restyle-ui-kitten/package.json: Unexpected token } in JSON at position 248 + at JSON.parse () + at /usr/local/Cellar/yarn/1.22.18/libexec/lib/cli.js:1625:59 + at Generator.next () + at step (/usr/local/Cellar/yarn/1.22.18/libexec/lib/cli.js:310:30) + at /usr/local/Cellar/yarn/1.22.18/libexec/lib/cli.js:321:13 + +npm manifest: + { + "name": "restyle-ui-kitten", + "version": "1.0.3", + "dependencies": { + "@eva-design/material": "^2.1.1", + "@react-native-async-storage/async-storage": "~1.17.3", + "@shopify/restyle": "^2.1.0", + "@ui-kitten/components": "^5.1.2", + }, + "devDependencies": { + "react": "18.0.0" + }, + "description": "combine restyle and ui-kitten", + "main": "index.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/valinagacevschi/restyle-ui-kitten.git" + }, + "keywords": [ + "restyle", + "ui-kitten", + "eva", + "design" + ], + "author": "Valentin Nagacevschi", + "license": "MIT", + "bugs": { + "url": "https://github.com/valinagacevschi/restyle-ui-kitten/issues" + }, + "homepage": "https://github.com/valinagacevschi/restyle-ui-kitten#readme" + } + +yarn manifest: + No manifest + +Lockfile: + # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + # yarn lockfile v1 + + + "@eva-design/dss@^2.0.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@eva-design/dss/-/dss-2.1.1.tgz#bd8da793e13a0dcac91d852b91ebf05e6fbdc0ee" + integrity sha512-Z6rZSodsQHWW1yDuiop1glJU8xKJSdKTPoWWCBsQWXYMNwTAEPgcZV69HNlnerB+T++jwj2jeoBzO24CTc0PmQ== + + "@eva-design/material@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@eva-design/material/-/material-2.1.1.tgz#b08bd8f2c8411871c118fac11f7b59c2f4cdfb2f" + integrity sha512-fVqknxM+PVsuPx0H/CcEgoZkZ1UIr41Cxt56yt67LBCus4xIILqyXx5pAvc//QTz3x7K29UEWH80YS6gpZaRag== + + "@eva-design/processor@^2.0.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@eva-design/processor/-/processor-2.1.1.tgz#33a59efa52ee2d206ac4d912dae801d12f9275a8" + integrity sha512-lbxZLm5ARhuk/wxWkaiWhw5XeZ+Xcp1JGCjcZl+S5rUbLppfp4U47jfq861EY27BP1dpQ5PyTVFCbl5eHlRFdg== + + "@react-native-async-storage/async-storage@~1.17.3": + version "1.17.10" + resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.17.10.tgz#8d6a4771912be8454a9e215eebd469b1b8e2e638" + integrity sha512-KrR021BmBLsA0TT1AAsfH16bHYy0MSbhdAeBAqpriak3GS1T2alFcdTUvn13p0ZW6FKRD6Bd3ryU2zhU/IYYJQ== + dependencies: + merge-options "^3.0.4" + + "@shopify/restyle@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@shopify/restyle/-/restyle-2.1.0.tgz#c5371deb5db873268bddd7e90fa74f783ad7ed23" + integrity sha512-CE4DDf5ZvDI438n5iQrdqw628Sa0F4C6CwTGxJEAKQLvC+4orWtr2TFPskoxl9hrMfk+TOzNTDZ3tcR88qKvrw== + + "@ui-kitten/components@^5.1.2": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@ui-kitten/components/-/components-5.1.2.tgz#18b6aba8ed67b0b893f0ec3f40daf5e698676811" + integrity sha512-J1Gd53+2qngktLSKot9aT+LGhUt05uGE3ouEiY6FsxUZdexlzcQVhp5rRasExUSAYNcN5J7/XSNEPNB9qX0v1g== + dependencies: + "@eva-design/dss" "^2.0.0" + "@eva-design/processor" "^2.0.0" + fecha "3.0.3" + hoist-non-react-statics "^3.2.1" + lodash.merge "^4.6.1" + + fecha@3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-3.0.3.tgz#fabbd416497649a42c24d34bfa726b579203a1e2" + integrity sha512-6LQK/1jud/FZnfEEZJ7y81vw7ge81DNd/XEsX0hgMUjhS+QMljkb1C0czBaP7dMNRVrd5mw/J2J7qI2Nw+TWZw== + + hoist-non-react-statics@^3.2.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + + is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + + "js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + + lodash.merge@^4.6.1: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + + loose-envify@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + + merge-options@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/merge-options/-/merge-options-3.0.4.tgz#84709c2aa2a4b24c1981f66c179fe5565cc6dbb7" + integrity sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ== + dependencies: + is-plain-obj "^2.1.0" + + react-is@^16.7.0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + + react@18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.0.0.tgz#b468736d1f4a5891f38585ba8e8fb29f91c3cb96" + integrity sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A== + dependencies: + loose-envify "^1.1.0"