diff --git a/babel.config.js b/babel.config.js index f842b77..cf1f9fb 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,3 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], -}; +} diff --git a/example/babel.config.js b/example/babel.config.js index adea77b..15826b0 100644 --- a/example/babel.config.js +++ b/example/babel.config.js @@ -1,5 +1,5 @@ -const path = require('path'); -const pak = require('../package.json'); +const path = require('path') +const pak = require('../package.json') module.exports = { presets: ['module:metro-react-native-babel-preset'], @@ -14,4 +14,4 @@ module.exports = { }, ], ], -}; +} diff --git a/example/index.tsx b/example/index.tsx index 117ddca..5c5c0c5 100644 --- a/example/index.tsx +++ b/example/index.tsx @@ -1,5 +1,5 @@ -import { AppRegistry } from 'react-native'; -import App from './src/App'; -import { name as appName } from './app.json'; +import { AppRegistry } from 'react-native' +import App from './src/App' +import { name as appName } from './app.json' -AppRegistry.registerComponent(appName, () => App); +AppRegistry.registerComponent(appName, () => App) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index f0b82c9..d0040bb 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -494,8 +494,8 @@ SPEC CHECKSUMS: Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 FlipperKit: 57764956d2f0f972c1af5075a9c8f05ca5b12349 - Folly: b73c3869541e86821df3c387eb0af5f65addfab4 - glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 + Folly: aeb27d02cdff07ca01f8a8a5a6dd5bcaf6be6f70 + glog: 2ad46e202fbaa5641fceb4b2af37dcd88fd8762d libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e diff --git a/example/metro.config.js b/example/metro.config.js index d1f468a..f5c2a95 100644 --- a/example/metro.config.js +++ b/example/metro.config.js @@ -1,13 +1,13 @@ -const path = require('path'); -const blacklist = require('metro-config/src/defaults/blacklist'); -const escape = require('escape-string-regexp'); -const pak = require('../package.json'); +const path = require('path') +const blacklist = require('metro-config/src/defaults/blacklist') +const escape = require('escape-string-regexp') +const pak = require('../package.json') -const root = path.resolve(__dirname, '..'); +const root = path.resolve(__dirname, '..') const modules = Object.keys({ ...pak.peerDependencies, -}); +}) module.exports = { projectRoot: __dirname, @@ -17,15 +17,12 @@ module.exports = { // So we blacklist them at the root, and alias them to the versions in example's node_modules resolver: { blacklistRE: blacklist( - modules.map( - (m) => - new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) - ) + modules.map((m) => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)) ), extraNodeModules: modules.reduce((acc, name) => { - acc[name] = path.join(__dirname, 'node_modules', name); - return acc; + acc[name] = path.join(__dirname, 'node_modules', name) + return acc }, {}), }, @@ -37,4 +34,4 @@ module.exports = { }, }), }, -}; +} diff --git a/example/src/App.tsx b/example/src/App.tsx index b9eef64..d039d2b 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,20 +1,20 @@ -import 'react-native-gesture-handler'; -import * as React from 'react'; -import { NavigationContainer } from '@react-navigation/native'; -import { createStackNavigator } from '@react-navigation/stack'; -import Examples from './Examples/Examples'; -import Basic from './Basic/Basic'; -import Dark from './Dark/Dark'; -import Translated from './Translated/Translated'; -import DisabledCategories from './DisabledCategories/DisabledCategories'; -import StaticModal from './StaticModal/StaticModal'; -import Static from './Static/Static'; -import EnableRecently from './EnableRecently/EnableRecently'; -import TopCategory from './TopCategory/TopCategory'; -import BottomCategory from './BottomCategory/BottomCategory'; -import SearchBar from './SearchBar/SearchBar'; +import 'react-native-gesture-handler' +import * as React from 'react' +import { NavigationContainer } from '@react-navigation/native' +import { createStackNavigator } from '@react-navigation/stack' +import Examples from './Examples/Examples' +import Basic from './Basic/Basic' +import Dark from './Dark/Dark' +import Translated from './Translated/Translated' +import DisabledCategories from './DisabledCategories/DisabledCategories' +import StaticModal from './StaticModal/StaticModal' +import Static from './Static/Static' +import EnableRecently from './EnableRecently/EnableRecently' +import TopCategory from './TopCategory/TopCategory' +import BottomCategory from './BottomCategory/BottomCategory' +import SearchBar from './SearchBar/SearchBar' -const Stack = createStackNavigator(); +const Stack = createStackNavigator() export default () => { return ( @@ -27,13 +27,10 @@ export default () => { - + - ); -}; + ) +} diff --git a/example/src/Basic/Basic.tsx b/example/src/Basic/Basic.tsx index 3bfb3a6..97fe077 100644 --- a/example/src/Basic/Basic.tsx +++ b/example/src/Basic/Basic.tsx @@ -1,18 +1,18 @@ -import * as React from 'react'; -import { StyleSheet, Text, TouchableOpacity } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import EmojiPicker from 'rn-emoji-keyboard'; -import type { EmojiType } from 'src/types'; +import * as React from 'react' +import { StyleSheet, Text, TouchableOpacity } from 'react-native' +import { SafeAreaView } from 'react-native-safe-area-context' +import EmojiPicker from 'rn-emoji-keyboard' +import type { EmojiType } from 'src/types' const Basic = () => { - const [result, setResult] = React.useState(); - const [isModalOpen, setIsModalOpen] = React.useState(false); + const [result, setResult] = React.useState() + const [isModalOpen, setIsModalOpen] = React.useState(false) const handlePick = (emoji: EmojiType) => { - console.log(emoji); - setResult(emoji.emoji); - setIsModalOpen((prev) => !prev); - }; + console.log(emoji) + setResult(emoji.emoji) + setIsModalOpen((prev) => !prev) + } return ( Result: {result} @@ -26,8 +26,8 @@ const Basic = () => { onClose={() => setIsModalOpen(false)} /> - ); -}; + ) +} const styles = StyleSheet.create({ container: { @@ -38,6 +38,6 @@ const styles = StyleSheet.create({ margin: 64, fontSize: 18, }, -}); +}) -export default Basic; +export default Basic diff --git a/example/src/BottomCategory/BottomCategory.tsx b/example/src/BottomCategory/BottomCategory.tsx index 6247895..54adb04 100644 --- a/example/src/BottomCategory/BottomCategory.tsx +++ b/example/src/BottomCategory/BottomCategory.tsx @@ -1,17 +1,17 @@ -import * as React from 'react'; -import { StyleSheet, Text, TouchableOpacity } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import EmojiPicker from 'rn-emoji-keyboard'; -import type { EmojiType } from 'src/types'; +import * as React from 'react' +import { StyleSheet, Text, TouchableOpacity } from 'react-native' +import { SafeAreaView } from 'react-native-safe-area-context' +import EmojiPicker from 'rn-emoji-keyboard' +import type { EmojiType } from 'src/types' const BottomCategory = () => { - const [result, setResult] = React.useState(); - const [isModalOpen, setIsModalOpen] = React.useState(false); + const [result, setResult] = React.useState() + const [isModalOpen, setIsModalOpen] = React.useState(false) const handlePick = (emoji: EmojiType) => { - setResult(emoji.emoji); - setIsModalOpen((prev) => !prev); - }; + setResult(emoji.emoji) + setIsModalOpen((prev) => !prev) + } return ( Result: {result} @@ -26,8 +26,8 @@ const BottomCategory = () => { categoryPosition="bottom" /> - ); -}; + ) +} const styles = StyleSheet.create({ container: { @@ -38,6 +38,6 @@ const styles = StyleSheet.create({ margin: 64, fontSize: 18, }, -}); +}) -export default BottomCategory; +export default BottomCategory diff --git a/example/src/Dark/Dark.tsx b/example/src/Dark/Dark.tsx index a122a81..2a4969b 100644 --- a/example/src/Dark/Dark.tsx +++ b/example/src/Dark/Dark.tsx @@ -1,18 +1,18 @@ -import * as React from 'react'; -import { StyleSheet, Text, TouchableOpacity } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import EmojiPicker from 'rn-emoji-keyboard'; -import type { EmojiType } from 'src/types'; +import * as React from 'react' +import { StyleSheet, Text, TouchableOpacity } from 'react-native' +import { SafeAreaView } from 'react-native-safe-area-context' +import EmojiPicker from 'rn-emoji-keyboard' +import type { EmojiType } from 'src/types' const Dark = () => { - const [result, setResult] = React.useState(); - const [isModalOpen, setIsModalOpen] = React.useState(false); + const [result, setResult] = React.useState() + const [isModalOpen, setIsModalOpen] = React.useState(false) const handlePick = (emoji: EmojiType) => { - console.log(emoji); - setResult(emoji.emoji); - setIsModalOpen((prev) => !prev); - }; + console.log(emoji) + setResult(emoji.emoji) + setIsModalOpen((prev) => !prev) + } return ( Result: {result} @@ -34,8 +34,8 @@ const Dark = () => { headerStyles={styles.headerStyles} /> - ); -}; + ) +} const styles = StyleSheet.create({ container: { @@ -58,6 +58,6 @@ const styles = StyleSheet.create({ color: '#fff', fontSize: 16, }, -}); +}) -export default Dark; +export default Dark diff --git a/example/src/DisabledCategories/DisabledCategories.tsx b/example/src/DisabledCategories/DisabledCategories.tsx index 3d6f72d..6d3a794 100644 --- a/example/src/DisabledCategories/DisabledCategories.tsx +++ b/example/src/DisabledCategories/DisabledCategories.tsx @@ -1,18 +1,18 @@ -import * as React from 'react'; -import { StyleSheet, Text, TouchableOpacity } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import EmojiPicker from 'rn-emoji-keyboard'; -import type { EmojiType } from 'src/types'; +import * as React from 'react' +import { StyleSheet, Text, TouchableOpacity } from 'react-native' +import { SafeAreaView } from 'react-native-safe-area-context' +import EmojiPicker from 'rn-emoji-keyboard' +import type { EmojiType } from 'src/types' const DisabledCategories = () => { - const [result, setResult] = React.useState(); - const [isModalOpen, setIsModalOpen] = React.useState(false); + const [result, setResult] = React.useState() + const [isModalOpen, setIsModalOpen] = React.useState(false) const handlePick = (emoji: EmojiType) => { - console.log(emoji); - setResult(emoji.emoji); - setIsModalOpen((prev) => !prev); - }; + console.log(emoji) + setResult(emoji.emoji) + setIsModalOpen((prev) => !prev) + } return ( Result: {result} @@ -27,8 +27,8 @@ const DisabledCategories = () => { disabledCategory={['activities', 'flags', 'objects', 'symbols']} /> - ); -}; + ) +} const styles = StyleSheet.create({ container: { @@ -39,6 +39,6 @@ const styles = StyleSheet.create({ margin: 64, fontSize: 18, }, -}); +}) -export default DisabledCategories; +export default DisabledCategories diff --git a/example/src/EnableRecently/EnableRecently.tsx b/example/src/EnableRecently/EnableRecently.tsx index 6ab7d68..7494898 100644 --- a/example/src/EnableRecently/EnableRecently.tsx +++ b/example/src/EnableRecently/EnableRecently.tsx @@ -1,18 +1,18 @@ -import * as React from 'react'; -import { StyleSheet, Text, TouchableOpacity } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import EmojiPicker from 'rn-emoji-keyboard'; -import type { EmojiType } from 'src/types'; +import * as React from 'react' +import { StyleSheet, Text, TouchableOpacity } from 'react-native' +import { SafeAreaView } from 'react-native-safe-area-context' +import EmojiPicker from 'rn-emoji-keyboard' +import type { EmojiType } from 'src/types' const EnableRecently = () => { - const [result, setResult] = React.useState(); - const [isModalOpen, setIsModalOpen] = React.useState(false); + const [result, setResult] = React.useState() + const [isModalOpen, setIsModalOpen] = React.useState(false) const handlePick = (emoji: EmojiType) => { - console.log(emoji); - setResult(emoji.emoji); - setIsModalOpen((prev) => !prev); - }; + console.log(emoji) + setResult(emoji.emoji) + setIsModalOpen((prev) => !prev) + } return ( Result: {result} @@ -27,8 +27,8 @@ const EnableRecently = () => { enableRecentlyUsed /> - ); -}; + ) +} const styles = StyleSheet.create({ container: { @@ -39,6 +39,6 @@ const styles = StyleSheet.create({ margin: 64, fontSize: 18, }, -}); +}) -export default EnableRecently; +export default EnableRecently diff --git a/example/src/Examples/Examples.tsx b/example/src/Examples/Examples.tsx index 3f744b3..f07c0cd 100644 --- a/example/src/Examples/Examples.tsx +++ b/example/src/Examples/Examples.tsx @@ -1,23 +1,23 @@ -import * as React from 'react'; -import { View, Button } from 'react-native'; -import { SafeAreaView } from 'react-native-safe-area-context'; -import type { StackScreenProps } from '@react-navigation/stack'; +import * as React from 'react' +import { View, Button } from 'react-native' +import { SafeAreaView } from 'react-native-safe-area-context' +import type { StackScreenProps } from '@react-navigation/stack' type RootStackParamList = { - Examples: undefined; - Basic: undefined; - Dark: undefined; - Translated: undefined; - DisabledCategories: undefined; - StaticModal: undefined; - Static: undefined; - EnableRecently: undefined; - TopCategory: undefined; - BottomCategory: undefined; - SearchBar: undefined; -}; + Examples: undefined + Basic: undefined + Dark: undefined + Translated: undefined + DisabledCategories: undefined + StaticModal: undefined + Static: undefined + EnableRecently: undefined + TopCategory: undefined + BottomCategory: undefined + SearchBar: undefined +} -type Props = StackScreenProps; +type Props = StackScreenProps const Examples = ({ navigation }: Props) => { return ( @@ -25,10 +25,7 @@ const Examples = ({ navigation }: Props) => {