@symbiote-native/cli 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -447
- package/bundle.js +4 -33
- package/package.json +21 -5
- package/templates/js/angular/index.js +2 -0
- package/templates/js/angular/src/App.css +2 -4
- package/templates/js/react/App.css +1 -1
- package/templates/js/react/index.js +2 -0
- package/templates/js/solid/App.css +2 -4
- package/templates/js/solid/index.js +2 -0
- package/templates/js/svelte/App.svelte +2 -2
- package/templates/js/svelte/App.typescript.svelte +2 -2
- package/templates/js/svelte/index.js +2 -0
- package/templates/js/vue-sfc/App.typescript.vue +2 -2
- package/templates/js/vue-sfc/App.vue +2 -2
- package/templates/js/vue-sfc/index.js +2 -0
- package/templates/js/vue-tsx/App.css +2 -4
- package/templates/js/vue-tsx/index.js +2 -0
- package/templates/layers/navigation/app/angular/src/App.css +2 -4
- package/templates/layers/navigation/app/react/App.css +1 -1
- package/templates/layers/navigation/app/solid/App.css +2 -4
- package/templates/layers/navigation/app/svelte/App.css +2 -4
- package/templates/layers/navigation/app/vue-sfc/App.css +2 -4
- package/templates/layers/navigation/app/vue-tsx/App.css +2 -4
- package/templates/styling/js/angular/css-modules/src/App.module.css +78 -0
- package/templates/styling/js/angular/css-modules/src/App.ts +30 -6
- package/templates/styling/js/angular/stylesheet/src/App.ts +56 -6
- package/templates/styling/js/react/css-modules/App.jsx +17 -5
- package/templates/styling/js/react/css-modules/App.module.css +60 -0
- package/templates/styling/js/react/css-modules/App.tsx +17 -5
- package/templates/styling/js/react/stylesheet/App.jsx +48 -6
- package/templates/styling/js/react/stylesheet/App.tsx +48 -6
- package/templates/styling/js/solid/css-modules/App.jsx +29 -5
- package/templates/styling/js/solid/css-modules/App.module.css +78 -0
- package/templates/styling/js/solid/css-modules/App.tsx +29 -5
- package/templates/styling/js/solid/stylesheet/App.jsx +60 -6
- package/templates/styling/js/solid/stylesheet/App.tsx +60 -6
- package/templates/styling/js/svelte/css-modules/App.module.css +78 -0
- package/templates/styling/js/svelte/css-modules/App.svelte +27 -5
- package/templates/styling/js/svelte/css-modules/App.typescript.svelte +27 -5
- package/templates/styling/js/svelte/stylesheet/App.svelte +62 -6
- package/templates/styling/js/svelte/stylesheet/App.typescript.svelte +62 -6
- package/templates/styling/js/vue-sfc/css-modules/App.module.css +78 -0
- package/templates/styling/js/vue-sfc/css-modules/App.typescript.vue +29 -5
- package/templates/styling/js/vue-sfc/css-modules/App.vue +29 -5
- package/templates/styling/js/vue-sfc/stylesheet/App.typescript.vue +60 -6
- package/templates/styling/js/vue-sfc/stylesheet/App.vue +60 -6
- package/templates/styling/js/vue-tsx/css-modules/App.jsx +29 -5
- package/templates/styling/js/vue-tsx/css-modules/App.module.css +78 -0
- package/templates/styling/js/vue-tsx/css-modules/App.tsx +29 -5
- package/templates/styling/js/vue-tsx/stylesheet/App.jsx +60 -6
- package/templates/styling/js/vue-tsx/stylesheet/App.tsx +60 -6
- package/templates/styling/navigation/angular/css-modules/src/App.module.css +118 -0
- package/templates/styling/navigation/angular/css-modules/src/DetailsScreen.ts +12 -4
- package/templates/styling/navigation/angular/css-modules/src/MenuScreen.ts +38 -8
- package/templates/styling/navigation/angular/stylesheet/src/DetailsScreen.ts +39 -4
- package/templates/styling/navigation/angular/stylesheet/src/MenuScreen.ts +75 -8
- package/templates/styling/navigation/react/css-modules/App.jsx +56 -11
- package/templates/styling/navigation/react/css-modules/App.module.css +100 -0
- package/templates/styling/navigation/react/css-modules/App.tsx +56 -11
- package/templates/styling/navigation/react/stylesheet/App.jsx +107 -12
- package/templates/styling/navigation/react/stylesheet/App.tsx +107 -12
- package/templates/styling/navigation/solid/css-modules/App.jsx +68 -11
- package/templates/styling/navigation/solid/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/solid/css-modules/App.tsx +68 -11
- package/templates/styling/navigation/solid/stylesheet/App.jsx +119 -12
- package/templates/styling/navigation/solid/stylesheet/App.tsx +119 -12
- package/templates/styling/navigation/svelte/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/svelte/css-modules/DetailsScreen.svelte +14 -3
- package/templates/styling/navigation/svelte/css-modules/DetailsScreen.typescript.svelte +14 -3
- package/templates/styling/navigation/svelte/css-modules/MenuScreen.svelte +34 -6
- package/templates/styling/navigation/svelte/css-modules/MenuScreen.typescript.svelte +34 -6
- package/templates/styling/navigation/svelte/stylesheet/DetailsScreen.svelte +41 -4
- package/templates/styling/navigation/svelte/stylesheet/DetailsScreen.typescript.svelte +41 -4
- package/templates/styling/navigation/svelte/stylesheet/MenuScreen.svelte +80 -7
- package/templates/styling/navigation/svelte/stylesheet/MenuScreen.typescript.svelte +80 -7
- package/templates/styling/navigation/vue-sfc/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/vue-sfc/css-modules/DetailsScreen.typescript.vue +12 -3
- package/templates/styling/navigation/vue-sfc/css-modules/DetailsScreen.vue +12 -3
- package/templates/styling/navigation/vue-sfc/css-modules/MenuScreen.typescript.vue +38 -6
- package/templates/styling/navigation/vue-sfc/css-modules/MenuScreen.vue +38 -6
- package/templates/styling/navigation/vue-sfc/stylesheet/DetailsScreen.typescript.vue +39 -4
- package/templates/styling/navigation/vue-sfc/stylesheet/DetailsScreen.vue +39 -4
- package/templates/styling/navigation/vue-sfc/stylesheet/MenuScreen.typescript.vue +80 -7
- package/templates/styling/navigation/vue-sfc/stylesheet/MenuScreen.vue +80 -7
- package/templates/styling/navigation/vue-tsx/css-modules/App.jsx +63 -18
- package/templates/styling/navigation/vue-tsx/css-modules/App.module.css +118 -0
- package/templates/styling/navigation/vue-tsx/css-modules/App.tsx +63 -18
- package/templates/styling/navigation/vue-tsx/stylesheet/App.jsx +116 -21
- package/templates/styling/navigation/vue-tsx/stylesheet/App.tsx +116 -21
- package/src/index.ts +0 -70
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- /package/templates/{native/bootsplash-logo → bootsplash-logo}/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
.screen {
|
|
2
|
+
flex: 1;
|
|
3
|
+
background-color: #0b1622;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
gap: 24px;
|
|
7
|
+
padding: 24px 32px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.brand-logo {
|
|
11
|
+
width: 70px;
|
|
12
|
+
height: 64px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.title {
|
|
16
|
+
color: #ffffff;
|
|
17
|
+
font-size: 22px;
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.subtitle {
|
|
23
|
+
color: #cbd5e1;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
text-align: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.counter-card {
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: 4px;
|
|
31
|
+
padding: 20px 28px;
|
|
32
|
+
border-radius: 16px;
|
|
33
|
+
background-color: #13243a;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.counter-label {
|
|
37
|
+
color: #41506a;
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
letter-spacing: 1px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.counter-value {
|
|
43
|
+
color: #61dafb;
|
|
44
|
+
font-size: 32px;
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.button-row {
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
gap: 12px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.button-primary {
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
border-radius: 12px;
|
|
57
|
+
padding: 14px 22px;
|
|
58
|
+
background-color: #61dafb;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.button-secondary {
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
border-radius: 12px;
|
|
65
|
+
padding: 14px 22px;
|
|
66
|
+
border-width: 1.5px;
|
|
67
|
+
border-color: #41506a;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.button-primary-text {
|
|
71
|
+
color: #0b1622;
|
|
72
|
+
font-size: 15px;
|
|
73
|
+
font-weight: bold;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.button-secondary-text {
|
|
77
|
+
color: #ffffff;
|
|
78
|
+
font-size: 15px;
|
|
79
|
+
font-weight: bold;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.details-card {
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 10px;
|
|
85
|
+
padding: 24px;
|
|
86
|
+
border-radius: 16px;
|
|
87
|
+
background-color: #13243a;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.details-title {
|
|
91
|
+
color: #ffffff;
|
|
92
|
+
font-size: 18px;
|
|
93
|
+
font-weight: bold;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.details-body {
|
|
97
|
+
color: #cbd5e1;
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
text-align: center;
|
|
100
|
+
}
|
|
@@ -1,32 +1,77 @@
|
|
|
1
1
|
import { Stack, useStackNavigation } from '@symbiote-native/navigation/react';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import styles from './App.module.css';
|
|
3
4
|
|
|
4
5
|
function MenuScreen() {
|
|
5
6
|
const navigation = useStackNavigation();
|
|
7
|
+
const [count, setCount] = useState<number>(0);
|
|
6
8
|
|
|
7
9
|
return (
|
|
8
|
-
<view className={styles
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<safe-area-view className={styles['screen']}>
|
|
11
|
+
<image
|
|
12
|
+
className={styles['brand-logo']}
|
|
13
|
+
resizeMode="contain"
|
|
14
|
+
source={require('./assets/react-native-logo.png')}
|
|
15
|
+
/>
|
|
16
|
+
<text className={styles['title']}>Welcome to SymbioteNative!</text>
|
|
17
|
+
<text className={styles['subtitle']}>Framework-agnostic React Native, driven by React.</text>
|
|
18
|
+
|
|
19
|
+
<view className={styles['counter-card']}>
|
|
20
|
+
<text className={styles['counter-label']}>TAPS</text>
|
|
21
|
+
<text className={styles['counter-value']}>{count}</text>
|
|
22
|
+
</view>
|
|
23
|
+
|
|
24
|
+
<view className={styles['button-row']}>
|
|
25
|
+
<pressable className={styles['button-primary']} onPress={() => setCount(count + 1)}>
|
|
26
|
+
<text className={styles['button-primary-text']}>Tap me</text>
|
|
27
|
+
</pressable>
|
|
28
|
+
<pressable className={styles['button-secondary']} onPress={() => navigation.push('Details')}>
|
|
29
|
+
<text className={styles['button-secondary-text']}>Go to Details</text>
|
|
30
|
+
</pressable>
|
|
31
|
+
</view>
|
|
32
|
+
</safe-area-view>
|
|
14
33
|
);
|
|
15
34
|
}
|
|
16
35
|
|
|
17
36
|
function DetailsScreen() {
|
|
37
|
+
const navigation = useStackNavigation();
|
|
38
|
+
|
|
18
39
|
return (
|
|
19
|
-
<view className={styles
|
|
20
|
-
<
|
|
21
|
-
|
|
40
|
+
<safe-area-view className={styles['screen']}>
|
|
41
|
+
<view className={styles['details-card']}>
|
|
42
|
+
<text className={styles['details-title']}>You made it!</text>
|
|
43
|
+
<text className={styles['details-body']}>
|
|
44
|
+
This screen was pushed by the Stack navigator — proof navigation actually works.
|
|
45
|
+
</text>
|
|
46
|
+
</view>
|
|
47
|
+
<pressable className={styles['button-secondary']} onPress={() => navigation.pop()}>
|
|
48
|
+
<text className={styles['button-secondary-text']}>Go back</text>
|
|
49
|
+
</pressable>
|
|
50
|
+
</safe-area-view>
|
|
22
51
|
);
|
|
23
52
|
}
|
|
24
53
|
|
|
54
|
+
const SCREEN_OPTIONS = {
|
|
55
|
+
headerTranslucent: true,
|
|
56
|
+
headerTintColor: '#ffffff',
|
|
57
|
+
headerTitleColor: '#ffffff',
|
|
58
|
+
headerStyle: { backgroundColor: '#0b1622' },
|
|
59
|
+
headerUserInterfaceStyle: 'dark' as const,
|
|
60
|
+
};
|
|
61
|
+
|
|
25
62
|
export default function App() {
|
|
26
63
|
return (
|
|
27
64
|
<Stack initialRouteName="Menu">
|
|
28
|
-
<Stack.Screen
|
|
29
|
-
|
|
65
|
+
<Stack.Screen
|
|
66
|
+
name="Menu"
|
|
67
|
+
component={MenuScreen}
|
|
68
|
+
options={{ title: 'Home', ...SCREEN_OPTIONS }}
|
|
69
|
+
/>
|
|
70
|
+
<Stack.Screen
|
|
71
|
+
name="Details"
|
|
72
|
+
component={DetailsScreen}
|
|
73
|
+
options={{ title: 'Details', ...SCREEN_OPTIONS }}
|
|
74
|
+
/>
|
|
30
75
|
</Stack>
|
|
31
76
|
);
|
|
32
77
|
}
|
|
@@ -1,36 +1,131 @@
|
|
|
1
1
|
import { Stack, useStackNavigation } from '@symbiote-native/navigation/react';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { StyleSheet } from '@symbiote-native/react';
|
|
3
4
|
|
|
4
5
|
function MenuScreen() {
|
|
5
6
|
const navigation = useStackNavigation();
|
|
7
|
+
const [count, setCount] = useState(0);
|
|
6
8
|
|
|
7
9
|
return (
|
|
8
|
-
<view style={styles.
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<safe-area-view style={styles.screen}>
|
|
11
|
+
<image
|
|
12
|
+
style={styles.brandLogo}
|
|
13
|
+
resizeMode="contain"
|
|
14
|
+
source={require('./assets/react-native-logo.png')}
|
|
15
|
+
/>
|
|
16
|
+
<text style={styles.title}>Welcome to SymbioteNative!</text>
|
|
17
|
+
<text style={styles.subtitle}>Framework-agnostic React Native, driven by React.</text>
|
|
18
|
+
|
|
19
|
+
<view style={styles.counterCard}>
|
|
20
|
+
<text style={styles.counterLabel}>TAPS</text>
|
|
21
|
+
<text style={styles.counterValue}>{count}</text>
|
|
22
|
+
</view>
|
|
23
|
+
|
|
24
|
+
<view style={styles.buttonRow}>
|
|
25
|
+
<pressable style={styles.buttonPrimary} onPress={() => setCount(count + 1)}>
|
|
26
|
+
<text style={styles.buttonPrimaryText}>Tap me</text>
|
|
27
|
+
</pressable>
|
|
28
|
+
<pressable style={styles.buttonSecondary} onPress={() => navigation.push('Details')}>
|
|
29
|
+
<text style={styles.buttonSecondaryText}>Go to Details</text>
|
|
30
|
+
</pressable>
|
|
31
|
+
</view>
|
|
32
|
+
</safe-area-view>
|
|
14
33
|
);
|
|
15
34
|
}
|
|
16
35
|
|
|
17
36
|
function DetailsScreen() {
|
|
37
|
+
const navigation = useStackNavigation();
|
|
38
|
+
|
|
18
39
|
return (
|
|
19
|
-
<view style={styles.
|
|
20
|
-
<
|
|
21
|
-
|
|
40
|
+
<safe-area-view style={styles.screen}>
|
|
41
|
+
<view style={styles.detailsCard}>
|
|
42
|
+
<text style={styles.detailsTitle}>You made it!</text>
|
|
43
|
+
<text style={styles.detailsBody}>
|
|
44
|
+
This screen was pushed by the Stack navigator — proof navigation actually works.
|
|
45
|
+
</text>
|
|
46
|
+
</view>
|
|
47
|
+
<pressable style={styles.buttonSecondary} onPress={() => navigation.pop()}>
|
|
48
|
+
<text style={styles.buttonSecondaryText}>Go back</text>
|
|
49
|
+
</pressable>
|
|
50
|
+
</safe-area-view>
|
|
22
51
|
);
|
|
23
52
|
}
|
|
24
53
|
|
|
54
|
+
const SCREEN_OPTIONS = {
|
|
55
|
+
headerTranslucent: true,
|
|
56
|
+
headerTintColor: '#ffffff',
|
|
57
|
+
headerTitleColor: '#ffffff',
|
|
58
|
+
headerStyle: { backgroundColor: '#0b1622' },
|
|
59
|
+
headerUserInterfaceStyle: 'dark',
|
|
60
|
+
};
|
|
61
|
+
|
|
25
62
|
export default function App() {
|
|
26
63
|
return (
|
|
27
64
|
<Stack initialRouteName="Menu">
|
|
28
|
-
<Stack.Screen
|
|
29
|
-
|
|
65
|
+
<Stack.Screen
|
|
66
|
+
name="Menu"
|
|
67
|
+
component={MenuScreen}
|
|
68
|
+
options={{ title: 'Home', ...SCREEN_OPTIONS }}
|
|
69
|
+
/>
|
|
70
|
+
<Stack.Screen
|
|
71
|
+
name="Details"
|
|
72
|
+
component={DetailsScreen}
|
|
73
|
+
options={{ title: 'Details', ...SCREEN_OPTIONS }}
|
|
74
|
+
/>
|
|
30
75
|
</Stack>
|
|
31
76
|
);
|
|
32
77
|
}
|
|
33
78
|
|
|
34
79
|
const styles = StyleSheet.create({
|
|
35
|
-
|
|
80
|
+
screen: {
|
|
81
|
+
flex: 1,
|
|
82
|
+
backgroundColor: '#0b1622',
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
gap: 24,
|
|
86
|
+
paddingVertical: 24,
|
|
87
|
+
paddingHorizontal: 32,
|
|
88
|
+
},
|
|
89
|
+
brandLogo: { width: 70, height: 64 },
|
|
90
|
+
title: { color: '#ffffff', fontSize: 22, fontWeight: 'bold', textAlign: 'center' },
|
|
91
|
+
subtitle: { color: '#cbd5e1', fontSize: 14, textAlign: 'center' },
|
|
92
|
+
counterCard: {
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
gap: 4,
|
|
95
|
+
paddingVertical: 20,
|
|
96
|
+
paddingHorizontal: 28,
|
|
97
|
+
borderRadius: 16,
|
|
98
|
+
backgroundColor: '#13243a',
|
|
99
|
+
},
|
|
100
|
+
counterLabel: { color: '#41506a', fontSize: 12, letterSpacing: 1 },
|
|
101
|
+
counterValue: { color: '#61dafb', fontSize: 32, fontWeight: 'bold' },
|
|
102
|
+
buttonRow: { flexDirection: 'row', gap: 12 },
|
|
103
|
+
buttonPrimary: {
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
justifyContent: 'center',
|
|
106
|
+
borderRadius: 12,
|
|
107
|
+
paddingVertical: 14,
|
|
108
|
+
paddingHorizontal: 22,
|
|
109
|
+
backgroundColor: '#61dafb',
|
|
110
|
+
},
|
|
111
|
+
buttonSecondary: {
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
justifyContent: 'center',
|
|
114
|
+
borderRadius: 12,
|
|
115
|
+
paddingVertical: 14,
|
|
116
|
+
paddingHorizontal: 22,
|
|
117
|
+
borderWidth: 1.5,
|
|
118
|
+
borderColor: '#41506a',
|
|
119
|
+
},
|
|
120
|
+
buttonPrimaryText: { color: '#0b1622', fontSize: 15, fontWeight: 'bold' },
|
|
121
|
+
buttonSecondaryText: { color: '#ffffff', fontSize: 15, fontWeight: 'bold' },
|
|
122
|
+
detailsCard: {
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
gap: 10,
|
|
125
|
+
padding: 24,
|
|
126
|
+
borderRadius: 16,
|
|
127
|
+
backgroundColor: '#13243a',
|
|
128
|
+
},
|
|
129
|
+
detailsTitle: { color: '#ffffff', fontSize: 18, fontWeight: 'bold' },
|
|
130
|
+
detailsBody: { color: '#cbd5e1', fontSize: 14, textAlign: 'center' },
|
|
36
131
|
});
|
|
@@ -1,36 +1,131 @@
|
|
|
1
1
|
import { Stack, useStackNavigation } from '@symbiote-native/navigation/react';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { StyleSheet } from '@symbiote-native/react';
|
|
3
4
|
|
|
4
5
|
function MenuScreen() {
|
|
5
6
|
const navigation = useStackNavigation();
|
|
7
|
+
const [count, setCount] = useState<number>(0);
|
|
6
8
|
|
|
7
9
|
return (
|
|
8
|
-
<view style={styles.
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<safe-area-view style={styles.screen}>
|
|
11
|
+
<image
|
|
12
|
+
style={styles.brandLogo}
|
|
13
|
+
resizeMode="contain"
|
|
14
|
+
source={require('./assets/react-native-logo.png')}
|
|
15
|
+
/>
|
|
16
|
+
<text style={styles.title}>Welcome to SymbioteNative!</text>
|
|
17
|
+
<text style={styles.subtitle}>Framework-agnostic React Native, driven by React.</text>
|
|
18
|
+
|
|
19
|
+
<view style={styles.counterCard}>
|
|
20
|
+
<text style={styles.counterLabel}>TAPS</text>
|
|
21
|
+
<text style={styles.counterValue}>{count}</text>
|
|
22
|
+
</view>
|
|
23
|
+
|
|
24
|
+
<view style={styles.buttonRow}>
|
|
25
|
+
<pressable style={styles.buttonPrimary} onPress={() => setCount(count + 1)}>
|
|
26
|
+
<text style={styles.buttonPrimaryText}>Tap me</text>
|
|
27
|
+
</pressable>
|
|
28
|
+
<pressable style={styles.buttonSecondary} onPress={() => navigation.push('Details')}>
|
|
29
|
+
<text style={styles.buttonSecondaryText}>Go to Details</text>
|
|
30
|
+
</pressable>
|
|
31
|
+
</view>
|
|
32
|
+
</safe-area-view>
|
|
14
33
|
);
|
|
15
34
|
}
|
|
16
35
|
|
|
17
36
|
function DetailsScreen() {
|
|
37
|
+
const navigation = useStackNavigation();
|
|
38
|
+
|
|
18
39
|
return (
|
|
19
|
-
<view style={styles.
|
|
20
|
-
<
|
|
21
|
-
|
|
40
|
+
<safe-area-view style={styles.screen}>
|
|
41
|
+
<view style={styles.detailsCard}>
|
|
42
|
+
<text style={styles.detailsTitle}>You made it!</text>
|
|
43
|
+
<text style={styles.detailsBody}>
|
|
44
|
+
This screen was pushed by the Stack navigator — proof navigation actually works.
|
|
45
|
+
</text>
|
|
46
|
+
</view>
|
|
47
|
+
<pressable style={styles.buttonSecondary} onPress={() => navigation.pop()}>
|
|
48
|
+
<text style={styles.buttonSecondaryText}>Go back</text>
|
|
49
|
+
</pressable>
|
|
50
|
+
</safe-area-view>
|
|
22
51
|
);
|
|
23
52
|
}
|
|
24
53
|
|
|
54
|
+
const SCREEN_OPTIONS = {
|
|
55
|
+
headerTranslucent: true,
|
|
56
|
+
headerTintColor: '#ffffff',
|
|
57
|
+
headerTitleColor: '#ffffff',
|
|
58
|
+
headerStyle: { backgroundColor: '#0b1622' },
|
|
59
|
+
headerUserInterfaceStyle: 'dark' as const,
|
|
60
|
+
};
|
|
61
|
+
|
|
25
62
|
export default function App() {
|
|
26
63
|
return (
|
|
27
64
|
<Stack initialRouteName="Menu">
|
|
28
|
-
<Stack.Screen
|
|
29
|
-
|
|
65
|
+
<Stack.Screen
|
|
66
|
+
name="Menu"
|
|
67
|
+
component={MenuScreen}
|
|
68
|
+
options={{ title: 'Home', ...SCREEN_OPTIONS }}
|
|
69
|
+
/>
|
|
70
|
+
<Stack.Screen
|
|
71
|
+
name="Details"
|
|
72
|
+
component={DetailsScreen}
|
|
73
|
+
options={{ title: 'Details', ...SCREEN_OPTIONS }}
|
|
74
|
+
/>
|
|
30
75
|
</Stack>
|
|
31
76
|
);
|
|
32
77
|
}
|
|
33
78
|
|
|
34
79
|
const styles = StyleSheet.create({
|
|
35
|
-
|
|
80
|
+
screen: {
|
|
81
|
+
flex: 1,
|
|
82
|
+
backgroundColor: '#0b1622',
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
gap: 24,
|
|
86
|
+
paddingVertical: 24,
|
|
87
|
+
paddingHorizontal: 32,
|
|
88
|
+
},
|
|
89
|
+
brandLogo: { width: 70, height: 64 },
|
|
90
|
+
title: { color: '#ffffff', fontSize: 22, fontWeight: 'bold', textAlign: 'center' },
|
|
91
|
+
subtitle: { color: '#cbd5e1', fontSize: 14, textAlign: 'center' },
|
|
92
|
+
counterCard: {
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
gap: 4,
|
|
95
|
+
paddingVertical: 20,
|
|
96
|
+
paddingHorizontal: 28,
|
|
97
|
+
borderRadius: 16,
|
|
98
|
+
backgroundColor: '#13243a',
|
|
99
|
+
},
|
|
100
|
+
counterLabel: { color: '#41506a', fontSize: 12, letterSpacing: 1 },
|
|
101
|
+
counterValue: { color: '#61dafb', fontSize: 32, fontWeight: 'bold' },
|
|
102
|
+
buttonRow: { flexDirection: 'row', gap: 12 },
|
|
103
|
+
buttonPrimary: {
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
justifyContent: 'center',
|
|
106
|
+
borderRadius: 12,
|
|
107
|
+
paddingVertical: 14,
|
|
108
|
+
paddingHorizontal: 22,
|
|
109
|
+
backgroundColor: '#61dafb',
|
|
110
|
+
},
|
|
111
|
+
buttonSecondary: {
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
justifyContent: 'center',
|
|
114
|
+
borderRadius: 12,
|
|
115
|
+
paddingVertical: 14,
|
|
116
|
+
paddingHorizontal: 22,
|
|
117
|
+
borderWidth: 1.5,
|
|
118
|
+
borderColor: '#41506a',
|
|
119
|
+
},
|
|
120
|
+
buttonPrimaryText: { color: '#0b1622', fontSize: 15, fontWeight: 'bold' },
|
|
121
|
+
buttonSecondaryText: { color: '#ffffff', fontSize: 15, fontWeight: 'bold' },
|
|
122
|
+
detailsCard: {
|
|
123
|
+
alignItems: 'center',
|
|
124
|
+
gap: 10,
|
|
125
|
+
padding: 24,
|
|
126
|
+
borderRadius: 16,
|
|
127
|
+
backgroundColor: '#13243a',
|
|
128
|
+
},
|
|
129
|
+
detailsTitle: { color: '#ffffff', fontSize: 18, fontWeight: 'bold' },
|
|
130
|
+
detailsBody: { color: '#cbd5e1', fontSize: 14, textAlign: 'center' },
|
|
36
131
|
});
|
|
@@ -1,32 +1,89 @@
|
|
|
1
1
|
import { Stack, useStackNavigation } from '@symbiote-native/navigation/solid';
|
|
2
|
+
import { createSignal } from 'solid-js';
|
|
2
3
|
import styles from './App.module.css';
|
|
3
4
|
|
|
4
5
|
function MenuScreen() {
|
|
5
6
|
const navigation = useStackNavigation();
|
|
7
|
+
const [count, setCount] = createSignal(0);
|
|
6
8
|
|
|
7
9
|
return (
|
|
8
|
-
<view class={styles
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
<safe-area-view class={styles['screen']}>
|
|
11
|
+
<view class={styles['brand-row']}>
|
|
12
|
+
<image
|
|
13
|
+
class={`${styles['brand-logo']} ${styles['brand-logo-react']}`}
|
|
14
|
+
resizeMode="contain"
|
|
15
|
+
source={require('./assets/react-native-logo.png')}
|
|
16
|
+
/>
|
|
17
|
+
<image
|
|
18
|
+
class={styles['plus-icon']}
|
|
19
|
+
resizeMode="contain"
|
|
20
|
+
source={require('./assets/plus-icon.png')}
|
|
21
|
+
/>
|
|
22
|
+
<image
|
|
23
|
+
class={`${styles['brand-logo']} ${styles['brand-logo-solid']}`}
|
|
24
|
+
resizeMode="contain"
|
|
25
|
+
source={require('./assets/solid-logo.png')}
|
|
26
|
+
/>
|
|
27
|
+
</view>
|
|
28
|
+
<text class={styles['title']}>Welcome to SymbioteNative!</text>
|
|
29
|
+
<text class={styles['subtitle']}>Framework-agnostic React Native, driven by Solid.</text>
|
|
30
|
+
|
|
31
|
+
<view class={styles['counter-card']}>
|
|
32
|
+
<text class={styles['counter-label']}>TAPS</text>
|
|
33
|
+
<text class={styles['counter-value']}>{count()}</text>
|
|
34
|
+
</view>
|
|
35
|
+
|
|
36
|
+
<view class={styles['button-row']}>
|
|
37
|
+
<pressable class={styles['button-primary']} onPress={() => setCount(count() + 1)}>
|
|
38
|
+
<text class={styles['button-primary-text']}>Tap me</text>
|
|
39
|
+
</pressable>
|
|
40
|
+
<pressable class={styles['button-secondary']} onPress={() => navigation().push('Details')}>
|
|
41
|
+
<text class={styles['button-secondary-text']}>Go to Details</text>
|
|
42
|
+
</pressable>
|
|
43
|
+
</view>
|
|
44
|
+
</safe-area-view>
|
|
14
45
|
);
|
|
15
46
|
}
|
|
16
47
|
|
|
17
48
|
function DetailsScreen() {
|
|
49
|
+
const navigation = useStackNavigation();
|
|
50
|
+
|
|
18
51
|
return (
|
|
19
|
-
<view class={styles
|
|
20
|
-
<
|
|
21
|
-
|
|
52
|
+
<safe-area-view class={styles['screen']}>
|
|
53
|
+
<view class={styles['details-card']}>
|
|
54
|
+
<text class={styles['details-title']}>You made it!</text>
|
|
55
|
+
<text class={styles['details-body']}>
|
|
56
|
+
This screen was pushed by the Stack navigator — proof navigation actually works.
|
|
57
|
+
</text>
|
|
58
|
+
</view>
|
|
59
|
+
<pressable class={styles['button-secondary']} onPress={() => navigation().pop()}>
|
|
60
|
+
<text class={styles['button-secondary-text']}>Go back</text>
|
|
61
|
+
</pressable>
|
|
62
|
+
</safe-area-view>
|
|
22
63
|
);
|
|
23
64
|
}
|
|
24
65
|
|
|
66
|
+
const SCREEN_OPTIONS = {
|
|
67
|
+
headerTranslucent: true,
|
|
68
|
+
headerTintColor: '#ffffff',
|
|
69
|
+
headerTitleColor: '#ffffff',
|
|
70
|
+
headerStyle: { backgroundColor: '#0b1622' },
|
|
71
|
+
headerUserInterfaceStyle: 'dark',
|
|
72
|
+
};
|
|
73
|
+
|
|
25
74
|
export default function App() {
|
|
26
75
|
return (
|
|
27
76
|
<Stack initialRouteName="Menu">
|
|
28
|
-
<Stack.Screen
|
|
29
|
-
|
|
77
|
+
<Stack.Screen
|
|
78
|
+
name="Menu"
|
|
79
|
+
component={MenuScreen}
|
|
80
|
+
options={{ title: 'Home', ...SCREEN_OPTIONS }}
|
|
81
|
+
/>
|
|
82
|
+
<Stack.Screen
|
|
83
|
+
name="Details"
|
|
84
|
+
component={DetailsScreen}
|
|
85
|
+
options={{ title: 'Details', ...SCREEN_OPTIONS }}
|
|
86
|
+
/>
|
|
30
87
|
</Stack>
|
|
31
88
|
);
|
|
32
89
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.screen {
|
|
2
|
+
flex: 1;
|
|
3
|
+
background-color: #0b1622;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
gap: 24px;
|
|
7
|
+
padding: 24px 32px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.brand-row {
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 28px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.brand-logo {
|
|
17
|
+
height: 64px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.brand-logo-react {
|
|
21
|
+
width: 70px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.brand-logo-solid {
|
|
25
|
+
width: 66px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.plus-icon {
|
|
29
|
+
width: 48px;
|
|
30
|
+
height: 48px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.title {
|
|
34
|
+
color: #ffffff;
|
|
35
|
+
font-size: 22px;
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
text-align: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.subtitle {
|
|
41
|
+
color: #cbd5e1;
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.counter-card {
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 4px;
|
|
49
|
+
padding: 20px 28px;
|
|
50
|
+
border-radius: 16px;
|
|
51
|
+
background-color: #13243a;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.counter-label {
|
|
55
|
+
color: #41506a;
|
|
56
|
+
font-size: 12px;
|
|
57
|
+
letter-spacing: 1px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.counter-value {
|
|
61
|
+
color: #2c4f7c;
|
|
62
|
+
font-size: 32px;
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.button-row {
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
gap: 12px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.button-primary {
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
border-radius: 12px;
|
|
75
|
+
padding: 14px 22px;
|
|
76
|
+
background-color: #2c4f7c;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.button-secondary {
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
border-radius: 12px;
|
|
83
|
+
padding: 14px 22px;
|
|
84
|
+
border-width: 1.5px;
|
|
85
|
+
border-color: #41506a;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.button-primary-text {
|
|
89
|
+
color: #ffffff;
|
|
90
|
+
font-size: 15px;
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.button-secondary-text {
|
|
95
|
+
color: #ffffff;
|
|
96
|
+
font-size: 15px;
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.details-card {
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: 10px;
|
|
103
|
+
padding: 24px;
|
|
104
|
+
border-radius: 16px;
|
|
105
|
+
background-color: #13243a;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.details-title {
|
|
109
|
+
color: #ffffff;
|
|
110
|
+
font-size: 18px;
|
|
111
|
+
font-weight: bold;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.details-body {
|
|
115
|
+
color: #cbd5e1;
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
text-align: center;
|
|
118
|
+
}
|