Skip to content

Commit 9d85fb7

Browse files
committed
first commit
0 parents  commit 9d85fb7

33 files changed

+3212
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
.kotlin/
14+
*.orig.*
15+
*.jks
16+
*.p8
17+
*.p12
18+
*.key
19+
*.mobileprovision
20+
21+
# Metro
22+
.metro-health-check*
23+
24+
# debug
25+
npm-debug.*
26+
yarn-debug.*
27+
yarn-error.*
28+
29+
# macOS
30+
.DS_Store
31+
*.pem
32+
33+
# local env files
34+
.env*.local
35+
36+
# typescript
37+
*.tsbuildinfo
38+
39+
app-example
40+
41+
# generated native folders
42+
/ios
43+
/android

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "recommendations": ["expo.vscode-expo-tools"] }

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll": "explicit",
4+
"source.organizeImports": "explicit",
5+
"source.sortMembers": "explicit"
6+
}
7+
}

App.tsx

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import { StyleSheet, View } from 'react-native';
2+
3+
import { useRef } from 'react';
4+
5+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
6+
import { useSharedValue } from 'react-native-reanimated';
7+
import { SafeAreaProvider } from 'react-native-safe-area-context';
8+
import { BottomTab } from './src/components/bottom-tab';
9+
import { CircularDraggableSlider, CircularDraggableSliderRefType } from './src/components/circle-time';
10+
11+
12+
const LinesAmount = 200;
13+
14+
export default function App() {
15+
const animatedNumber = useSharedValue(0);
16+
const previousTick = useSharedValue(0);
17+
18+
const circularSliderRef = useRef<CircularDraggableSliderRefType>(null);
19+
20+
return (
21+
<SafeAreaProvider>
22+
<GestureHandlerRootView style={{ flex: 1 }}>
23+
<View style={{ flex: 1 }}>
24+
<View style={styles.container}>
25+
<View
26+
style={{
27+
marginBottom: 256,
28+
}}>
29+
{/* <AnimatedCount
30+
count={animatedNumber}
31+
maxDigits={5}
32+
textDigitWidth={68}
33+
textDigitHeight={120}
34+
fontSize={100}
35+
color="#fff"
36+
gradientAccentColor="#000"
37+
/> */}
38+
</View>
39+
<CircularDraggableSlider
40+
ref={circularSliderRef}
41+
bigLineIndexOffset={10}
42+
linesAmount={LinesAmount}
43+
indicatorColor={'orange'}
44+
maxLineHeight={40}
45+
lineColor="rgba(255,255,255,0.5)"
46+
bigLineColor="white"
47+
minLineHeight={30}
48+
onCompletion={async () => {
49+
50+
}}
51+
onProgressChange={sliderProgress => {
52+
'worklet';
53+
if (sliderProgress < 0) {
54+
return;
55+
}
56+
57+
// Only trigger haptics when crossing a line (when tick value changes)
58+
if (sliderProgress !== previousTick.value) {
59+
previousTick.value = sliderProgress;
60+
}
61+
62+
// Bind the progress value to the animated number
63+
animatedNumber.value = sliderProgress;
64+
}}
65+
/>
66+
</View>
67+
<BottomTab />
68+
</View>
69+
</GestureHandlerRootView>
70+
</SafeAreaProvider>
71+
);
72+
};
73+
74+
const styles = StyleSheet.create({
75+
button: {
76+
alignItems: 'center',
77+
aspectRatio: 1,
78+
backgroundColor: 'white',
79+
borderRadius: 32,
80+
height: 64,
81+
justifyContent: 'center',
82+
},
83+
buttonsContainer: {
84+
bottom: 48,
85+
flexDirection: 'row',
86+
gap: 8,
87+
position: 'absolute',
88+
right: 32,
89+
},
90+
container: {
91+
alignItems: 'center',
92+
backgroundColor: '#000',
93+
flex: 1,
94+
justifyContent: 'center',
95+
},
96+
});

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## 📱 Demo
2+
3+
<div align="center">
4+
5+
![Demo](video.gif)

app.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"expo": {
3+
"name": "PurchaseTemplate",
4+
"slug": "purchasetemplate",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/images/icon.png",
8+
"scheme": "purchasetemplate",
9+
"userInterfaceStyle": "automatic",
10+
"newArchEnabled": true,
11+
"ios": {
12+
"supportsTablet": true
13+
},
14+
"android": {
15+
"adaptiveIcon": {
16+
"backgroundColor": "#E6F4FE",
17+
"foregroundImage": "./assets/images/android-icon-foreground.png",
18+
"backgroundImage": "./assets/images/android-icon-background.png",
19+
"monochromeImage": "./assets/images/android-icon-monochrome.png"
20+
},
21+
"edgeToEdgeEnabled": true,
22+
"predictiveBackGestureEnabled": false
23+
},
24+
"web": {
25+
"output": "static",
26+
"favicon": "./assets/images/favicon.png"
27+
},
28+
"plugins": [
29+
[
30+
"expo-splash-screen",
31+
{
32+
"image": "./assets/images/splash-icon.png",
33+
"imageWidth": 200,
34+
"resizeMode": "contain",
35+
"backgroundColor": "#ffffff",
36+
"dark": {
37+
"backgroundColor": "#000000"
38+
}
39+
}
40+
]
41+
],
42+
"experiments": {
43+
"reactCompiler": true
44+
}
45+
}
46+
}

app/index.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { StyleSheet, Text, View } from "react-native";
2+
3+
export default function Page() {
4+
return (
5+
<View style={styles.container}>
6+
<View style={styles.main}>
7+
<Text style={styles.title}>Hello World</Text>
8+
<Text style={styles.subtitle}>This is the first page of your app.</Text>
9+
</View>
10+
</View>
11+
);
12+
}
13+
14+
const styles = StyleSheet.create({
15+
container: {
16+
flex: 1,
17+
alignItems: "center",
18+
padding: 24,
19+
},
20+
main: {
21+
flex: 1,
22+
justifyContent: "center",
23+
maxWidth: 960,
24+
marginHorizontal: "auto",
25+
},
26+
title: {
27+
fontSize: 64,
28+
fontWeight: "bold",
29+
},
30+
subtitle: {
31+
fontSize: 36,
32+
color: "#38434D",
33+
},
34+
});
17.1 KB
Loading
76.9 KB
Loading
4.04 KB
Loading

0 commit comments

Comments
 (0)