diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..19a2c0c --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + "recommendations": [ + "equimper.react-native-react-redux", + "esbenp.prettier-vscode", + "msjsdiag.vscode-react-native", + "ms-vscode.vscode-typescript-next", + "dbaeumer.vscode-eslint", + "wix.glean" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..3c2ba1d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "cSpell.words": [ + "Pressable" + ] +} \ No newline at end of file diff --git a/App.tsx b/App.tsx index c186d85..57d730f 100644 --- a/App.tsx +++ b/App.tsx @@ -1,25 +1,35 @@ import React from 'react'; -import { View, StatusBar } from 'react-native'; +import {NavigationContainer} from '@react-navigation/native'; +import {createNativeStackNavigator} from '@react-navigation/native-stack'; -import { Colors } from 'react-native/Libraries/NewAppScreen'; -import KeepAwake from 'react-native-keep-awake'; - -import BinaryClock from './src/components/BinaryClock'; +import BinaryClockScreen from './src/pages/BinaryClockScreen'; +import BinaryClockSettingsScreen from './src/pages/BinaryClockSettingsScreen'; +import Toast from 'react-native-toast-message'; +const Stack = createNativeStackNavigator(); const App = () => { - const isDarkMode = true // useColorScheme() === 'dark'; - - const backgroundStyle = { - backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, - }; - return ( - - + + + + + + + ); }; diff --git a/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_foreground.png index ba03ffa..95014f4 100644 Binary files a/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-hdpi-v26/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index f2c5ddc..59d8a5b 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 4072f48..6b62c3a 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_foreground.png index 54c3acb..fa2b069 100644 Binary files a/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-mdpi-v26/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index d4eecc8..2928831 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index eccf807..44b01fa 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_foreground.png index a4814b9..33e4bba 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index b533dcc..8b8ce0b 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index 53a1286..f54bd7b 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_foreground.png index 0132766..7b3de78 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 65d943c..5dd0630 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index fda923a..4636523 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_foreground.png index 867c626..57f325b 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 7ce4a7b..698e683 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index e8bbaf6..115f2f7 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/docs/binary_clock_demo.gif b/docs/binary_clock_demo.gif index 30ece6d..d23272b 100644 Binary files a/docs/binary_clock_demo.gif and b/docs/binary_clock_demo.gif differ diff --git a/icon.svg b/icon.svg index 7866bea..0934708 100644 --- a/icon.svg +++ b/icon.svg @@ -23,9 +23,9 @@ inkscape:pagecheckerboard="0" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="2.9362513" - inkscape:cx="161.94118" - inkscape:cy="56.364386" + inkscape:zoom="5.8725026" + inkscape:cx="54.916962" + inkscape:cy="60.195801" inkscape:window-width="1920" inkscape:window-height="1009" inkscape:window-x="-8" @@ -46,26 +46,29 @@ height="28.575001" x="32.648796" y="37.646057" /> - - - - - - + + + + diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ios-marketing-1024@1x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ios-marketing-1024@1x.png index cf38eff..e2704ae 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ios-marketing-1024@1x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ios-marketing-1024@1x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@1x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@1x.png index 97e0e71..2cbf08b 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@1x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@1x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@2x.png index ba46d9e..4da76e2 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-20@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@1x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@1x.png index fe781f2..4beae67 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@1x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@1x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@2x.png index 152dd52..f419966 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-29@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@1x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@1x.png index ba46d9e..4da76e2 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@1x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@1x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@2x.png index 6eca37d..aa8fe85 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-40@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@1x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@1x.png index 733fa5b..6ed4b84 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@1x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@1x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@2x.png index 5e30e64..001db2e 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-76@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-83.5@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-83.5@2x.png index c5935d4..ec9bdaf 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-83.5@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/ipad-83.5@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@2x.png index ba46d9e..4da76e2 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@3x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@3x.png index 99be196..7c69055 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@3x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-20@3x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@2x.png index 152dd52..f419966 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@3x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@3x.png index 1bb3707..077704d 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@3x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-29@3x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@2x.png index 6eca37d..aa8fe85 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@3x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@3x.png index 89bab35..f8d3114 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@3x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-40@3x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@2x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@2x.png index 89bab35..f8d3114 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@2x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@2x.png differ diff --git a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@3x.png b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@3x.png index fe210f6..bb44110 100644 Binary files a/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@3x.png and b/ios/BinaryClock/Images.xcassets/AppIcon.appiconset/iphone-60@3x.png differ diff --git a/ios/Podfile b/ios/Podfile index 91ffef8..4aa2842 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -19,7 +19,6 @@ target 'BinaryClock' do :app_path => "#{Pod::Config.instance.installation_root}/.." ) - pod 'react-native-keep-awake', :path => '../node_modules/react-native-keep-awake' target 'BinaryClockTests' do inherit! :complete diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 58cbcbb..ff32b9f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -284,6 +284,14 @@ PODS: - glog - react-native-keep-awake (4.0.0): - React + - react-native-safe-area-context (4.2.5): + - RCT-Folly + - RCTRequired + - RCTTypeSafety + - React + - ReactCommon/turbomodule/core + - react-native-slider (4.2.2): + - React-Core - React-perflogger (0.68.0) - React-RCTActionSheet (0.68.0): - React-Core/RCTActionSheetHeaders (= 0.68.0) @@ -349,6 +357,11 @@ PODS: - React-jsi (= 0.68.0) - React-logger (= 0.68.0) - React-perflogger (= 0.68.0) + - RNDefaultPreference (1.4.4): + - React-Core + - RNScreens (3.13.1): + - React-Core + - React-RCTImage - SocketRocket (0.6.0) - Yoga (1.14.0) - YogaKit (1.18.1): @@ -398,6 +411,8 @@ DEPENDENCIES: - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - react-native-keep-awake (from `../node_modules/react-native-keep-awake`) + - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) + - "react-native-slider (from `../node_modules/@react-native-community/slider`)" - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) @@ -410,6 +425,8 @@ DEPENDENCIES: - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - RNDefaultPreference (from `../node_modules/react-native-default-preference`) + - RNScreens (from `../node_modules/react-native-screens`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: @@ -469,6 +486,10 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/logger" react-native-keep-awake: :path: "../node_modules/react-native-keep-awake" + react-native-safe-area-context: + :path: "../node_modules/react-native-safe-area-context" + react-native-slider: + :path: "../node_modules/@react-native-community/slider" React-perflogger: :path: "../node_modules/react-native/ReactCommon/reactperflogger" React-RCTActionSheet: @@ -493,6 +514,10 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" ReactCommon: :path: "../node_modules/react-native/ReactCommon" + RNDefaultPreference: + :path: "../node_modules/react-native-default-preference" + RNScreens: + :path: "../node_modules/react-native-screens" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" @@ -529,6 +554,8 @@ SPEC CHECKSUMS: React-jsinspector: 90f0bfd5d04e0b066c29216a110ffb9a6c34f23f React-logger: 8474fefa09d05f573a13c044cb0dfd751d4e52e3 react-native-keep-awake: afad8a51dfef9fe9655a6344771be32c8596d774 + react-native-safe-area-context: ebf8c413eb8b5f7c392a036a315eb7b46b96845f + react-native-slider: 2f25c919f1dc309b90e2cc8346b8042ecec2102f React-perflogger: 15cb741d6c2379f4d3fc8f9e4d4e1110ef3020cb React-RCTActionSheet: ea9099db0597bd769430db1e2d011fd5fdb7fc5e React-RCTAnimation: 252df4749866f2654f37612f839522cac91c1165 @@ -541,6 +568,8 @@ SPEC CHECKSUMS: React-RCTVibration: 82fc52d3d96549b8c59a6c8c017d5a1a11457049 React-runtimeexecutor: 9b1304f48e344c55bb3c36e13bf11461cb4da5d8 ReactCommon: fab89a13b52f1ac42b59a0e4b4f76f21aea9eebe + RNDefaultPreference: 08bdb06cfa9188d5da97d4642dac745218d7fb31 + RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 Yoga: 6671cf077f614314c22fd09ddf87d7abeee64e96 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/package-lock.json b/package-lock.json index 3a54f0b..7e8ace3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,9 +8,16 @@ "name": "binaryclock", "version": "0.0.1", "dependencies": { + "@react-native-community/slider": "^4.2.2", + "@react-navigation/native": "^6.0.10", + "@react-navigation/native-stack": "^6.6.2", "react": "17.0.2", "react-native": "0.68.0", - "react-native-keep-awake": "^4.0.0" + "react-native-default-preference": "^1.4.4", + "react-native-keep-awake": "^4.0.0", + "react-native-safe-area-context": "^4.2.5", + "react-native-screens": "^3.13.1", + "react-native-toast-message": "^2.1.5" }, "devDependencies": { "@babel/core": "^7.12.9", @@ -18,6 +25,7 @@ "@react-native-community/eslint-config": "^2.0.0", "@types/jest": "^26.0.23", "@types/react-native": "^0.67.3", + "@types/react-native-keep-awake": "^2.0.3", "@types/react-test-renderer": "^17.0.1", "@typescript-eslint/eslint-plugin": "^5.17.0", "@typescript-eslint/parser": "^5.17.0", @@ -2465,6 +2473,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@react-native-community/slider": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-4.2.2.tgz", + "integrity": "sha512-C1ldx1ypQo+uDWx78TUBG0evLVopKYHK2mQencl+vxi4ebMTL+ipJv5MF5mEvmZWLUOAMm5AsoQNHChYUdyWrQ==", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/@react-native/assets": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz", @@ -2483,6 +2500,98 @@ "integrity": "sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==", "license": "MIT" }, + "node_modules/@react-navigation/core": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.2.1.tgz", + "integrity": "sha512-3mjS6ujwGnPA/BC11DN9c2c42gFld6B6dQBgDedxP2djceXESpY2kVTTwISDHuqFnF7WjvRjsrDu3cKBX+JosA==", + "dependencies": { + "@react-navigation/routers": "^6.1.0", + "escape-string-regexp": "^4.0.0", + "nanoid": "^3.1.23", + "query-string": "^7.0.0", + "react-is": "^16.13.0" + }, + "peerDependencies": { + "react": "*" + } + }, + "node_modules/@react-navigation/core/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-navigation/core/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/@react-navigation/elements": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.3.3.tgz", + "integrity": "sha512-Lv2lR7si5gNME8dRsqz57d54m4FJtrwHRjNQLOyQO546ZxO+g864cSvoLC6hQedQU0+IJnPTsZiEI2hHqfpEpw==", + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0" + } + }, + "node_modules/@react-navigation/native": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.10.tgz", + "integrity": "sha512-H6QhLeiieGxNcAJismIDXIPZgf1myr7Og8v116tezIGmincJTOcWavTd7lPHGnMMXaZg94LlVtbaBRIx9cexqw==", + "dependencies": { + "@react-navigation/core": "^6.2.1", + "escape-string-regexp": "^4.0.0", + "fast-deep-equal": "^3.1.3", + "nanoid": "^3.1.23" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/@react-navigation/native-stack": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.6.2.tgz", + "integrity": "sha512-pFMuzhxbPml5MBvJVAzHWoaUkQaefAOKpuUnAs/AxNQuHQwwnxRmDit1PQLuIPo7g7DlfwFXagDHE1R0tbnS8Q==", + "dependencies": { + "@react-navigation/elements": "^1.3.3", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0", + "react-native-screens": ">= 3.0.0" + } + }, + "node_modules/@react-navigation/native/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-navigation/routers": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.1.0.tgz", + "integrity": "sha512-8xJL+djIzpFdRW/sGlKojQ06fWgFk1c5jER9501HYJ12LF5DIJFr/tqBI2TJ6bk+y+QFu0nbNyeRC80OjRlmkA==", + "dependencies": { + "nanoid": "^3.1.23" + } + }, "node_modules/@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -2701,6 +2810,15 @@ "@types/react": "*" } }, + "node_modules/@types/react-native-keep-awake": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/react-native-keep-awake/-/react-native-keep-awake-2.0.3.tgz", + "integrity": "sha512-0C4bUlGPHRpplbn+YnX2UO0/2joa0dhCPumas2fielGNJkS1FTJOrw9jFo4B0+LOtmsepXiy/ANTF/on0b2Ddw==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/react-test-renderer": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz", @@ -6106,7 +6224,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, "license": "MIT" }, "node_modules/fast-diff": { @@ -6191,6 +6308,14 @@ "node": ">=8" } }, + "node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -9791,6 +9916,17 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "license": "MIT" }, + "node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -10938,6 +11074,23 @@ "teleport": ">=0.2.0" } }, + "node_modules/query-string": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", + "integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==", + "dependencies": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -11015,6 +11168,17 @@ "ws": "^7" } }, + "node_modules/react-freeze": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.0.tgz", + "integrity": "sha512-yQaiOqDmoKqks56LN9MTgY06O0qQHgV4FUrikH357DydArSZHQhl0BJFqGKIZoTqi8JizF9Dxhuk1FIZD6qCaw==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": "^17.0.0" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -11082,6 +11246,14 @@ "nullthrows": "^1.1.1" } }, + "node_modules/react-native-default-preference": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/react-native-default-preference/-/react-native-default-preference-1.4.4.tgz", + "integrity": "sha512-h0vtgiSKws3UmMRJykXAVM4ne1SgfoocUcoBD19ewRpQd6wqurE0HJRQGrSxcHK5LdKE7QPSIB1VX3YGIVS8Jg==", + "peerDependencies": { + "react-native": ">=0.47.0" + } + }, "node_modules/react-native-gradle-plugin": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.5.tgz", @@ -11108,6 +11280,28 @@ "resolved": "https://registry.npmjs.org/react-native-keep-awake/-/react-native-keep-awake-4.0.0.tgz", "integrity": "sha512-0Fotox+eLXQooeibVs3P60yASYUWjtRw9MZNmbuHt5UZQrgUrAKsE4jm7gTr4tPU1m1RkwGzcgUFpcOkh/ec7g==" }, + "node_modules/react-native-safe-area-context": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.2.5.tgz", + "integrity": "sha512-nUil2de1gk/8ZB9IzIxFyGCiKeAYcHzJb/Tks2NzSkev1qH4MNR05DWYDSmW6vLT+y4mospLVyG/H5dyUd+KQQ==", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/react-native-screens": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.13.1.tgz", + "integrity": "sha512-xcrnuUs0qUrGpc2gOTDY4VgHHADQwp80mwR1prU/Q0JqbZN5W3koLhuOsT6FkSRKjR5t40l+4LcjhHdpqRB2HA==", + "dependencies": { + "react-freeze": "^1.0.0", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native-svg-app-icon": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/react-native-svg-app-icon/-/react-native-svg-app-icon-0.6.1.tgz", @@ -11135,6 +11329,15 @@ "node": ">= 10" } }, + "node_modules/react-native-toast-message": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/react-native-toast-message/-/react-native-toast-message-2.1.5.tgz", + "integrity": "sha512-mk3rELtBEhrhWBCN6CTaw0gypgL9ZNauX3xx1LUs4uee9vc0pVsghrKxO57vroUCcNL2hDeZSLJWdQNMCkGeaQ==", + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native/node_modules/ws": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", @@ -12389,6 +12592,14 @@ "dev": true, "license": "CC0-1.0" }, + "node_modules/split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "engines": { + "node": ">=6" + } + }, "node_modules/split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -12519,6 +12730,14 @@ "node": ">= 0.10.0" } }, + "node_modules/strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", + "engines": { + "node": ">=4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -13549,6 +13768,11 @@ "makeerror": "1.0.12" } }, + "node_modules/warn-once": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.0.tgz", + "integrity": "sha512-recZTSvuaH/On5ZU5ywq66y99lImWqzP93+AiUo9LUwG8gXHW+LJjhOd6REJHm7qb0niYqrEQJvbHSQfuJtTqA==" + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -15494,6 +15718,12 @@ "integrity": "sha512-W/J0fNYVO01tioHjvYWQ9m6RgndVtbElzYozBq1ZPrHO/iCzlqoySHl4gO/fpCl9QEFjvJfjPgtPMTMlsoq5DQ==", "dev": true }, + "@react-native-community/slider": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-4.2.2.tgz", + "integrity": "sha512-C1ldx1ypQo+uDWx78TUBG0evLVopKYHK2mQencl+vxi4ebMTL+ipJv5MF5mEvmZWLUOAMm5AsoQNHChYUdyWrQ==", + "requires": {} + }, "@react-native/assets": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz", @@ -15509,6 +15739,71 @@ "resolved": "https://registry.npmjs.org/@react-native/polyfills/-/polyfills-2.0.0.tgz", "integrity": "sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==" }, + "@react-navigation/core": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.2.1.tgz", + "integrity": "sha512-3mjS6ujwGnPA/BC11DN9c2c42gFld6B6dQBgDedxP2djceXESpY2kVTTwISDHuqFnF7WjvRjsrDu3cKBX+JosA==", + "requires": { + "@react-navigation/routers": "^6.1.0", + "escape-string-regexp": "^4.0.0", + "nanoid": "^3.1.23", + "query-string": "^7.0.0", + "react-is": "^16.13.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, + "@react-navigation/elements": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.3.3.tgz", + "integrity": "sha512-Lv2lR7si5gNME8dRsqz57d54m4FJtrwHRjNQLOyQO546ZxO+g864cSvoLC6hQedQU0+IJnPTsZiEI2hHqfpEpw==", + "requires": {} + }, + "@react-navigation/native": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.10.tgz", + "integrity": "sha512-H6QhLeiieGxNcAJismIDXIPZgf1myr7Og8v116tezIGmincJTOcWavTd7lPHGnMMXaZg94LlVtbaBRIx9cexqw==", + "requires": { + "@react-navigation/core": "^6.2.1", + "escape-string-regexp": "^4.0.0", + "fast-deep-equal": "^3.1.3", + "nanoid": "^3.1.23" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + } + } + }, + "@react-navigation/native-stack": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.6.2.tgz", + "integrity": "sha512-pFMuzhxbPml5MBvJVAzHWoaUkQaefAOKpuUnAs/AxNQuHQwwnxRmDit1PQLuIPo7g7DlfwFXagDHE1R0tbnS8Q==", + "requires": { + "@react-navigation/elements": "^1.3.3", + "warn-once": "^0.1.0" + } + }, + "@react-navigation/routers": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.1.0.tgz", + "integrity": "sha512-8xJL+djIzpFdRW/sGlKojQ06fWgFk1c5jER9501HYJ12LF5DIJFr/tqBI2TJ6bk+y+QFu0nbNyeRC80OjRlmkA==", + "requires": { + "nanoid": "^3.1.23" + } + }, "@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -15698,6 +15993,15 @@ "@types/react": "*" } }, + "@types/react-native-keep-awake": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/react-native-keep-awake/-/react-native-keep-awake-2.0.3.tgz", + "integrity": "sha512-0C4bUlGPHRpplbn+YnX2UO0/2joa0dhCPumas2fielGNJkS1FTJOrw9jFo4B0+LOtmsepXiy/ANTF/on0b2Ddw==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "@types/react-test-renderer": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz", @@ -18046,8 +18350,7 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-diff": { "version": "1.2.0", @@ -18114,6 +18417,11 @@ "to-regex-range": "^5.0.1" } }, + "filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=" + }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -20719,6 +21027,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -21521,6 +21834,17 @@ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", "dev": true }, + "query-string": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", + "integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==", + "requires": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -21570,6 +21894,12 @@ "ws": "^7" } }, + "react-freeze": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.0.tgz", + "integrity": "sha512-yQaiOqDmoKqks56LN9MTgY06O0qQHgV4FUrikH357DydArSZHQhl0BJFqGKIZoTqi8JizF9Dxhuk1FIZD6qCaw==", + "requires": {} + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -21635,6 +21965,12 @@ "nullthrows": "^1.1.1" } }, + "react-native-default-preference": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/react-native-default-preference/-/react-native-default-preference-1.4.4.tgz", + "integrity": "sha512-h0vtgiSKws3UmMRJykXAVM4ne1SgfoocUcoBD19ewRpQd6wqurE0HJRQGrSxcHK5LdKE7QPSIB1VX3YGIVS8Jg==", + "requires": {} + }, "react-native-gradle-plugin": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.5.tgz", @@ -21661,6 +21997,21 @@ "resolved": "https://registry.npmjs.org/react-native-keep-awake/-/react-native-keep-awake-4.0.0.tgz", "integrity": "sha512-0Fotox+eLXQooeibVs3P60yASYUWjtRw9MZNmbuHt5UZQrgUrAKsE4jm7gTr4tPU1m1RkwGzcgUFpcOkh/ec7g==" }, + "react-native-safe-area-context": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.2.5.tgz", + "integrity": "sha512-nUil2de1gk/8ZB9IzIxFyGCiKeAYcHzJb/Tks2NzSkev1qH4MNR05DWYDSmW6vLT+y4mospLVyG/H5dyUd+KQQ==", + "requires": {} + }, + "react-native-screens": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.13.1.tgz", + "integrity": "sha512-xcrnuUs0qUrGpc2gOTDY4VgHHADQwp80mwR1prU/Q0JqbZN5W3koLhuOsT6FkSRKjR5t40l+4LcjhHdpqRB2HA==", + "requires": { + "react-freeze": "^1.0.0", + "warn-once": "^0.1.0" + } + }, "react-native-svg-app-icon": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/react-native-svg-app-icon/-/react-native-svg-app-icon-0.6.1.tgz", @@ -21681,6 +22032,12 @@ } } }, + "react-native-toast-message": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/react-native-toast-message/-/react-native-toast-message-2.1.5.tgz", + "integrity": "sha512-mk3rELtBEhrhWBCN6CTaw0gypgL9ZNauX3xx1LUs4uee9vc0pVsghrKxO57vroUCcNL2hDeZSLJWdQNMCkGeaQ==", + "requires": {} + }, "react-refresh": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.4.3.tgz", @@ -22579,6 +22936,11 @@ "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", "dev": true }, + "split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==" + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -22673,6 +23035,11 @@ "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=" }, + "strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -23412,6 +23779,11 @@ "makeerror": "1.0.12" } }, + "warn-once": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.0.tgz", + "integrity": "sha512-recZTSvuaH/On5ZU5ywq66y99lImWqzP93+AiUo9LUwG8gXHW+LJjhOd6REJHm7qb0niYqrEQJvbHSQfuJtTqA==" + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/package.json b/package.json index dfee4e6..7b32920 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,20 @@ "ios": "react-native run-ios", "start": "react-native start", "test": "jest", - "lint": "eslint . --ext .js,.jsx,.ts,.tsx" + "lint": "eslint . --ext .js,.jsx,.ts,.tsx", + "icons": "react-native-svg-app-icon" }, "dependencies": { + "@react-native-community/slider": "^4.2.2", + "@react-navigation/native": "^6.0.10", + "@react-navigation/native-stack": "^6.6.2", "react": "17.0.2", "react-native": "0.68.0", - "react-native-keep-awake": "^4.0.0" + "react-native-default-preference": "^1.4.4", + "react-native-keep-awake": "^4.0.0", + "react-native-safe-area-context": "^4.2.5", + "react-native-screens": "^3.13.1", + "react-native-toast-message": "^2.1.5" }, "devDependencies": { "@babel/core": "^7.12.9", @@ -20,6 +28,7 @@ "@react-native-community/eslint-config": "^2.0.0", "@types/jest": "^26.0.23", "@types/react-native": "^0.67.3", + "@types/react-native-keep-awake": "^2.0.3", "@types/react-test-renderer": "^17.0.1", "@typescript-eslint/eslint-plugin": "^5.17.0", "@typescript-eslint/parser": "^5.17.0", diff --git a/src/components/BinaryClock.tsx b/src/components/BinaryClock.tsx index ac03ded..2b399a8 100644 --- a/src/components/BinaryClock.tsx +++ b/src/components/BinaryClock.tsx @@ -1,39 +1,48 @@ -import React, { useEffect, useState } from "react"; -import { StyleSheet, View } from "react-native"; -import { Colors } from 'react-native/Libraries/NewAppScreen'; +import React, {useEffect, useState} from 'react'; +import {StyleSheet, View} from 'react-native'; -import BinaryDigit from "./BinaryDigit"; +import BinaryDigit from './BinaryDigit'; +import Orientation from '../utils/orientation'; const BinaryClock: React.FC<{ - isDarkMode: boolean; -}> = ({ isDarkMode }) => { - const [time, setTime] = useState(new Date()) + orientation: Orientation; + brightness?: number; +}> = ({orientation, brightness = 0.5}) => { + const [time, setTime] = useState(new Date()); useEffect(() => { const toggle = setInterval(() => { setTime(new Date()); }, 50); return () => clearInterval(toggle); - }) + }); return ( - - - - + + + + - ) -} + ); +}; const styles = StyleSheet.create({ binaryClock: { - flexDirection: "row", - alignItems: 'center', - justifyContent: 'center', - marginTop: 'auto', - marginBottom: 'auto', - height: "100%", - } + flexDirection: 'row', + paddingHorizontal: '5%', + height: '100%', + backgroundColor: 'black', + }, }); -export default BinaryClock; \ No newline at end of file +export default BinaryClock; diff --git a/src/components/BinaryDigit.tsx b/src/components/BinaryDigit.tsx index fe8161e..6821c75 100644 --- a/src/components/BinaryDigit.tsx +++ b/src/components/BinaryDigit.tsx @@ -1,55 +1,118 @@ -import React from "react"; -import { StyleSheet, View, useWindowDimensions, Text } from "react-native"; -import BinaryDot from "./BinaryDot"; +import React from 'react'; +import {StyleSheet, View} from 'react-native'; +import BinaryDot from './BinaryDot'; +import Orientation from '../utils/orientation'; + +/* eslint no-bitwise: ["error", { "allow": ["&"] }] */ const BinaryDigit: React.FC<{ value: number; -}> = ({ value }) => { - const { height, width } = useWindowDimensions(); - if (height > width) { - return ( - - - 0} value={32} /> - 0} value={16} /> - 0} value={8} /> - 0} value={4} /> - 0} value={2} /> - 0} value={1} /> - - - ); - } else { - const firstDigit = Math.floor(value / 10); - const secondDigit = value % 10; - return ( - - - 0} value={8} /> - 0} value={4} /> - 0} value={2} /> - 0} value={1} /> + orientation: Orientation; + brightness?: number; +}> = ({value, orientation, brightness = 0.5}) => { + switch (orientation) { + case Orientation.Portrait: + return ( + + + 0} + value={32} + brightness={brightness} + /> + 0} + value={16} + brightness={brightness} + /> + 0} + value={8} + brightness={brightness} + /> + 0} + value={4} + brightness={brightness} + /> + 0} + value={2} + brightness={brightness} + /> + 0} + value={1} + brightness={brightness} + /> + - - 0} value={8} /> - 0} value={4} /> - 0} value={2} /> - 0} value={1} /> + ); + case Orientation.Landscape: + const firstDigit = Math.floor(value / 10); + const secondDigit = value % 10; + return ( + + + 0} + value={8} + brightness={brightness} + /> + 0} + value={4} + brightness={brightness} + /> + 0} + value={2} + brightness={brightness} + /> + 0} + value={1} + brightness={brightness} + /> + + + 0} + value={8} + brightness={brightness} + /> + 0} + value={4} + brightness={brightness} + /> + 0} + value={2} + brightness={brightness} + /> + 0} + value={1} + brightness={brightness} + /> + - - ); + ); } -} +}; const styles = StyleSheet.create({ digit: { - flexDirection: "column", + alignItems: 'center', + flex: 1, }, pair: { - flexDirection: "row", - padding: 20, + flexDirection: 'row', + alignItems: 'center', + padding: '2%', + flex: 1, }, }); export default BinaryDigit; - diff --git a/src/components/BinaryDot.tsx b/src/components/BinaryDot.tsx index 028eb3a..514fd65 100644 --- a/src/components/BinaryDot.tsx +++ b/src/components/BinaryDot.tsx @@ -1,48 +1,51 @@ -import React from "react"; -import { StyleSheet, View, Text} from "react-native"; +import React from 'react'; +import {StyleSheet, View, Text} from 'react-native'; const BinaryDot: React.FC<{ active: boolean; value?: number; + brightness?: number; showHints?: boolean; -}> = ({active, value, showHints=false}) => { +}> = ({active, value, brightness = 0.5, showHints = false}) => { return ( - + {showHints && value && ( {value} )} - ) -} + ); +}; const styles = StyleSheet.create({ dot: { - margin: 5, - borderRadius: 15, - width: 60, - height: 60, - backgroundColor: "green", + margin: '15%', + borderRadius: 30, + flex: 1, + aspectRatio: 1, + maxWidth: 60, + maxHeight: 60, + backgroundColor: 'green', }, activeDot: { - opacity: 1.0, + opacity: 0.5, }, inactiveDot: { - opacity: 0.5, + opacity: 0.125, }, hint: { alignItems: 'center', justifyContent: 'center', marginTop: 'auto', marginBottom: 'auto', - height: "100%", + height: '100%', }, hintText: { - color: "white", + color: 'white', fontSize: 20, opacity: 0.25, - } + }, }); -export default BinaryDot; \ No newline at end of file +export default BinaryDot; diff --git a/src/pages/BinaryClockScreen.tsx b/src/pages/BinaryClockScreen.tsx new file mode 100644 index 0000000..4c9280d --- /dev/null +++ b/src/pages/BinaryClockScreen.tsx @@ -0,0 +1,37 @@ +import React, {useEffect} from 'react'; +import {View, StatusBar, Pressable, useWindowDimensions} from 'react-native'; +import KeepAwake from 'react-native-keep-awake'; + +import BinaryClock from '../components/BinaryClock'; +import Orientation from '../utils/orientation'; +import {useBrightness} from '../utils/BinaryClockSettings'; +import Toast from 'react-native-toast-message'; + +const BinaryClockScreen: React.FC<{ + navigation: any; +}> = ({navigation}) => { + const [brightness] = useBrightness(); + const {height, width} = useWindowDimensions(); + let orientation = + height > width ? Orientation.Portrait : Orientation.Landscape; + useEffect(() => { + Toast.show({ + type: 'info', + text1: '⚙️ Settings Available ⚙️', + text2: 'Access settings by pressing and holding the clock', + visibilityTime: 10000, + }); + }, []); + return ( + navigation.navigate('BinaryClockSettingsScreen')}> + + + + ); +}; + +export default BinaryClockScreen; diff --git a/src/pages/BinaryClockSettingsScreen.tsx b/src/pages/BinaryClockSettingsScreen.tsx new file mode 100644 index 0000000..436c210 --- /dev/null +++ b/src/pages/BinaryClockSettingsScreen.tsx @@ -0,0 +1,80 @@ +import Slider from '@react-native-community/slider'; +import React from 'react'; +import { + Button, + StyleSheet, + Text, + useWindowDimensions, + View, +} from 'react-native'; +import BinaryClock from '../components/BinaryClock'; +import Orientation from '../utils/orientation'; +import {useBrightness, BinaryClockSettings} from '../utils/BinaryClockSettings'; +import Toast from 'react-native-toast-message'; + +const BinaryClockSettingScreen: React.FC = () => { + const {height, width} = useWindowDimensions(); + let clockOrientation = + height > width ? Orientation.Landscape : Orientation.Portrait; + const [brightness, setBrightness] = useBrightness(); + const brightnessString = `${Math.round(brightness * 100)}%`; + function saveSettings() { + console.debug('Saving settings'); + BinaryClockSettings.setBrightness(brightness) + .then(() => { + Toast.show({ + type: 'success', + text1: 'Settings saved! 🎉', + text2: `Brightness: ${brightnessString}`, + }); + }) + .catch(err => { + console.error(err); + Toast.show({ + type: 'error', + text1: 'Settings not saved 🤔', + }); + }); + } + return ( + width ? 'column' : 'row'}, + ]}> + + + + + Brightness + {brightnessString} + +