zelune 0.0.0-stage → 1.4.0

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.
@@ -0,0 +1,86 @@
1
+ import React from 'react';
2
+
3
+ interface ScreenErrorBoundaryProps {
4
+ screenName: string;
5
+ children: React.ReactNode;
6
+ }
7
+
8
+ interface ScreenErrorBoundaryState {
9
+ hasError: boolean;
10
+ errorMessage: string | null;
11
+ }
12
+
13
+ export class ScreenErrorBoundary extends React.Component<
14
+ ScreenErrorBoundaryProps,
15
+ ScreenErrorBoundaryState
16
+ > {
17
+ constructor(props: ScreenErrorBoundaryProps) {
18
+ super(props);
19
+ this.state = { hasError: false, errorMessage: null };
20
+ }
21
+
22
+ static getDerivedStateFromError(error: unknown): ScreenErrorBoundaryState {
23
+ return {
24
+ hasError: true,
25
+ errorMessage: error instanceof Error ? error.message : String(error),
26
+ };
27
+ }
28
+
29
+ render() {
30
+ if (this.state.hasError) {
31
+ return (
32
+ <div
33
+ style={{
34
+ height: '100%',
35
+ width: '100%',
36
+ backgroundColor: '#18181B',
37
+ color: '#FCA5A5',
38
+ padding: 24,
39
+ display: 'flex',
40
+ flexDirection: 'column',
41
+ justifyContent: 'center',
42
+ gap: 12,
43
+ fontFamily: 'JetBrains Mono, monospace',
44
+ }}
45
+ >
46
+ <div style={{ fontSize: 13, fontWeight: 700, color: '#F87171' }}>
47
+ Runtime Error in {this.props.screenName}
48
+ </div>
49
+ <div
50
+ style={{
51
+ fontSize: 12,
52
+ lineHeight: 1.5,
53
+ backgroundColor: '#09090B',
54
+ padding: 12,
55
+ borderRadius: 8,
56
+ border: '1px solid #7F1D1D',
57
+ whiteSpace: 'pre-wrap',
58
+ wordBreak: 'break-word',
59
+ }}
60
+ >
61
+ {this.state.errorMessage}
62
+ </div>
63
+ <button
64
+ type="button"
65
+ onClick={() => this.setState({ hasError: false, errorMessage: null })}
66
+ style={{
67
+ alignSelf: 'flex-start',
68
+ padding: '6px 12px',
69
+ backgroundColor: '#EF4444',
70
+ color: '#FFFFFF',
71
+ border: 'none',
72
+ borderRadius: 6,
73
+ fontSize: 12,
74
+ fontWeight: 600,
75
+ cursor: 'pointer',
76
+ }}
77
+ >
78
+ Retry Render
79
+ </button>
80
+ </div>
81
+ );
82
+ }
83
+
84
+ return this.props.children;
85
+ }
86
+ }
@@ -0,0 +1,229 @@
1
+ import React from 'react';
2
+ import {
3
+ View,
4
+ Text,
5
+ TouchableOpacity,
6
+ StyleSheet,
7
+ } from 'react-native';
8
+ import { useNavigation } from '../runtime/MockNavigationContext';
9
+
10
+ export default function CheckoutScreen() {
11
+ const navigation = useNavigation();
12
+
13
+ return (
14
+ <View style={styles.container}>
15
+ <View style={styles.headerRow}>
16
+ <TouchableOpacity
17
+ activeOpacity={0.78}
18
+ style={styles.backButton}
19
+ onPress={() => navigation.navigate('ProductDetail')}
20
+ >
21
+ <Text style={styles.backButtonText}>← Spec Sheet</Text>
22
+ </TouchableOpacity>
23
+ <Text style={styles.headerTitle}>Dispatch &amp; Settlement</Text>
24
+ </View>
25
+
26
+ <View style={styles.orderCard}>
27
+ <Text style={styles.sectionHeading}>MANIFEST // ORDER #CH-8841</Text>
28
+ <View style={styles.itemRow}>
29
+ <View>
30
+ <Text style={styles.itemName}>Chronos Studio Pro</Text>
31
+ <Text style={styles.itemVariant}>Obsidian Anodized · Unit 01</Text>
32
+ </View>
33
+ <Text style={styles.itemPrice}>$349.00</Text>
34
+ </View>
35
+
36
+ <View style={styles.divider} />
37
+
38
+ <View style={styles.summaryRow}>
39
+ <Text style={styles.summaryLabel}>Priority Courier Dispatch</Text>
40
+ <Text style={styles.summaryFree}>INCLUDED</Text>
41
+ </View>
42
+ <View style={styles.summaryRow}>
43
+ <Text style={styles.summaryLabel}>Import &amp; Acoustic Levy</Text>
44
+ <Text style={styles.summaryValue}>$28.80</Text>
45
+ </View>
46
+ <View style={styles.totalRow}>
47
+ <Text style={styles.totalLabel}>Total Settlement</Text>
48
+ <Text style={styles.totalAmount}>$377.80</Text>
49
+ </View>
50
+ </View>
51
+
52
+ <View style={styles.paymentCard}>
53
+ <Text style={styles.sectionHeading}>CRYPTOGRAPHIC AUTHORIZATION</Text>
54
+ <View style={styles.cardMethodRow}>
55
+ <View style={styles.cardBrandBadge}>
56
+ <Text style={styles.cardBrandText}>G-PAY</Text>
57
+ </View>
58
+ <View>
59
+ <Text style={styles.cardNumber}>Hardware Token ·••• 4829</Text>
60
+ <Text style={styles.cardSub}>Biometric enclave signature ready</Text>
61
+ </View>
62
+ </View>
63
+ </View>
64
+
65
+ <TouchableOpacity
66
+ activeOpacity={0.78}
67
+ style={styles.confirmButton}
68
+ onPress={() => navigation.navigate('Home')}
69
+ >
70
+ <Text style={styles.confirmButtonText}>Authorize $377.80 Settlement</Text>
71
+ </TouchableOpacity>
72
+ </View>
73
+ );
74
+ }
75
+
76
+ const styles = StyleSheet.create({
77
+ container: {
78
+ flex: 1,
79
+ backgroundColor: '#0A0B0E',
80
+ padding: 20,
81
+ justifyContent: 'space-between',
82
+ },
83
+ headerRow: {
84
+ flexDirection: 'row',
85
+ justifyContent: 'space-between',
86
+ alignItems: 'center',
87
+ marginTop: 6,
88
+ },
89
+ backButton: {
90
+ backgroundColor: '#13161E',
91
+ paddingHorizontal: 12,
92
+ paddingVertical: 9,
93
+ borderRadius: 8,
94
+ borderWidth: 1,
95
+ borderColor: '#222836',
96
+ },
97
+ backButtonText: {
98
+ color: '#E2E8F0',
99
+ fontSize: 12,
100
+ fontWeight: '600',
101
+ },
102
+ headerTitle: {
103
+ color: '#F8FAFC',
104
+ fontSize: 16,
105
+ fontWeight: '700',
106
+ letterSpacing: -0.2,
107
+ },
108
+ orderCard: {
109
+ backgroundColor: '#11141C',
110
+ borderRadius: 16,
111
+ padding: 18,
112
+ gap: 12,
113
+ borderWidth: 1,
114
+ borderColor: '#1E2433',
115
+ },
116
+ sectionHeading: {
117
+ color: '#38BDF8',
118
+ fontSize: 10,
119
+ fontWeight: '700',
120
+ letterSpacing: 1,
121
+ },
122
+ itemRow: {
123
+ flexDirection: 'row',
124
+ justifyContent: 'space-between',
125
+ alignItems: 'center',
126
+ },
127
+ itemName: {
128
+ color: '#F8FAFC',
129
+ fontSize: 15,
130
+ fontWeight: '600',
131
+ },
132
+ itemVariant: {
133
+ color: '#64748B',
134
+ fontSize: 12,
135
+ marginTop: 2,
136
+ },
137
+ itemPrice: {
138
+ color: '#F8FAFC',
139
+ fontSize: 15,
140
+ fontWeight: '700',
141
+ },
142
+ divider: {
143
+ height: 1,
144
+ backgroundColor: '#1E2433',
145
+ marginVertical: 4,
146
+ },
147
+ summaryRow: {
148
+ flexDirection: 'row',
149
+ justifyContent: 'space-between',
150
+ },
151
+ summaryLabel: {
152
+ color: '#94A3B8',
153
+ fontSize: 13,
154
+ },
155
+ summaryFree: {
156
+ color: '#10B981',
157
+ fontSize: 11,
158
+ fontWeight: '700',
159
+ letterSpacing: 0.6,
160
+ },
161
+ summaryValue: {
162
+ color: '#E2E8F0',
163
+ fontSize: 13,
164
+ fontWeight: '600',
165
+ },
166
+ totalRow: {
167
+ flexDirection: 'row',
168
+ justifyContent: 'space-between',
169
+ alignItems: 'center',
170
+ marginTop: 4,
171
+ },
172
+ totalLabel: {
173
+ color: '#F8FAFC',
174
+ fontSize: 14,
175
+ fontWeight: '700',
176
+ },
177
+ totalAmount: {
178
+ color: '#38BDF8',
179
+ fontSize: 20,
180
+ fontWeight: '700',
181
+ },
182
+ paymentCard: {
183
+ backgroundColor: '#11141C',
184
+ borderRadius: 14,
185
+ padding: 16,
186
+ gap: 10,
187
+ borderWidth: 1,
188
+ borderColor: '#1E2433',
189
+ },
190
+ cardMethodRow: {
191
+ flexDirection: 'row',
192
+ alignItems: 'center',
193
+ gap: 12,
194
+ },
195
+ cardBrandBadge: {
196
+ backgroundColor: '#161A26',
197
+ borderWidth: 1,
198
+ borderColor: '#262D3D',
199
+ paddingHorizontal: 10,
200
+ paddingVertical: 8,
201
+ borderRadius: 7,
202
+ },
203
+ cardBrandText: {
204
+ color: '#38BDF8',
205
+ fontSize: 10,
206
+ fontWeight: '700',
207
+ letterSpacing: 0.8,
208
+ },
209
+ cardNumber: {
210
+ color: '#F8FAFC',
211
+ fontSize: 14,
212
+ fontWeight: '600',
213
+ },
214
+ cardSub: {
215
+ color: '#64748B',
216
+ fontSize: 12,
217
+ },
218
+ confirmButton: {
219
+ backgroundColor: '#F8FAFC',
220
+ borderRadius: 10,
221
+ paddingVertical: 15,
222
+ alignItems: 'center',
223
+ },
224
+ confirmButtonText: {
225
+ color: '#08090C',
226
+ fontSize: 14,
227
+ fontWeight: '700',
228
+ },
229
+ });
@@ -0,0 +1,288 @@
1
+ import React, { useState } from 'react';
2
+ import {
3
+ View,
4
+ Text,
5
+ TouchableOpacity,
6
+ ScrollView,
7
+ StyleSheet,
8
+ } from 'react-native';
9
+ import { useNavigation } from '../runtime/MockNavigationContext';
10
+
11
+ export default function HomeScreen() {
12
+ const navigation = useNavigation();
13
+ const [activeTab, setActiveTab] = useState<'Featured' | 'Hardware' | 'Audio'>('Featured');
14
+
15
+ return (
16
+ <ScrollView style={styles.container} contentContainerStyle={styles.content}>
17
+ <View style={styles.topBar}>
18
+ <View>
19
+ <Text style={styles.greetingLabel}>CHRONOS ACOUSTIC DIVISION</Text>
20
+ <Text style={styles.headerTitle}>Reference Hardware</Text>
21
+ </View>
22
+ <TouchableOpacity
23
+ activeOpacity={0.78}
24
+ style={styles.avatarButton}
25
+ onPress={() => navigation.navigate('Profile')}
26
+ >
27
+ <Text style={styles.avatarButtonText}>AX</Text>
28
+ </TouchableOpacity>
29
+ </View>
30
+
31
+ <View style={styles.heroBanner}>
32
+ <View style={styles.heroMetaRow}>
33
+ <Text style={styles.heroBadge}>SERIES 04 // BERYLLIUM</Text>
34
+ <Text style={styles.heroSerial}>48H DAC</Text>
35
+ </View>
36
+ <Text style={styles.heroTitle}>Chronos Spatial Studio Reference</Text>
37
+ <Text style={styles.heroSubtitle}>
38
+ Planar-magnetic acoustic architecture with zero-latency DSP room calibration.
39
+ </Text>
40
+ <TouchableOpacity
41
+ activeOpacity={0.78}
42
+ style={styles.heroCta}
43
+ onPress={() => navigation.navigate('ProductDetail')}
44
+ >
45
+ <Text style={styles.heroCtaText}>Inspect Spec Sheet — $349</Text>
46
+ </TouchableOpacity>
47
+ </View>
48
+
49
+ <View style={styles.categoryRow}>
50
+ {(['Featured', 'Hardware', 'Audio'] as const).map((cat) => (
51
+ <TouchableOpacity
52
+ key={cat}
53
+ activeOpacity={0.78}
54
+ style={activeTab === cat ? styles.categoryPillActive : styles.categoryPill}
55
+ onPress={() => setActiveTab(cat)}
56
+ >
57
+ <Text
58
+ style={
59
+ activeTab === cat ? styles.categoryTextActive : styles.categoryText
60
+ }
61
+ >
62
+ {cat}
63
+ </Text>
64
+ </TouchableOpacity>
65
+ ))}
66
+ </View>
67
+
68
+ <View style={styles.productList}>
69
+ <TouchableOpacity
70
+ activeOpacity={0.78}
71
+ style={styles.productCard}
72
+ onPress={() => navigation.navigate('ProductDetail')}
73
+ >
74
+ <View style={styles.productIconBox}>
75
+ <Text style={styles.productMonogram}>CH-01</Text>
76
+ </View>
77
+ <View style={styles.productInfo}>
78
+ <Text style={styles.productName}>Chronos Studio Pro</Text>
79
+ <Text style={styles.productMeta}>45mm Beryllium · Titanium Matte</Text>
80
+ </View>
81
+ <Text style={styles.productPrice}>$349</Text>
82
+ </TouchableOpacity>
83
+
84
+ <TouchableOpacity
85
+ activeOpacity={0.78}
86
+ style={styles.productCard}
87
+ onPress={() => navigation.navigate('Checkout')}
88
+ >
89
+ <View style={styles.productIconBoxAlt}>
90
+ <Text style={styles.productMonogramAlt}>KS-75</Text>
91
+ </View>
92
+ <View style={styles.productInfo}>
93
+ <Text style={styles.productName}>Keystone Field Controller</Text>
94
+ <Text style={styles.productMeta}>CNC Aluminum · Optical Hall Switches</Text>
95
+ </View>
96
+ <Text style={styles.productPrice}>$219</Text>
97
+ </TouchableOpacity>
98
+ </View>
99
+ </ScrollView>
100
+ );
101
+ }
102
+
103
+ const styles = StyleSheet.create({
104
+ container: {
105
+ flex: 1,
106
+ backgroundColor: '#0A0B0E',
107
+ },
108
+ content: {
109
+ padding: 20,
110
+ gap: 20,
111
+ },
112
+ topBar: {
113
+ flexDirection: 'row',
114
+ justifyContent: 'space-between',
115
+ alignItems: 'center',
116
+ marginTop: 6,
117
+ },
118
+ greetingLabel: {
119
+ color: '#38BDF8',
120
+ fontSize: 10,
121
+ fontWeight: '700',
122
+ letterSpacing: 1.1,
123
+ },
124
+ headerTitle: {
125
+ color: '#F8FAFC',
126
+ fontSize: 24,
127
+ fontWeight: '700',
128
+ letterSpacing: -0.4,
129
+ marginTop: 2,
130
+ },
131
+ avatarButton: {
132
+ width: 42,
133
+ height: 42,
134
+ borderRadius: 10,
135
+ backgroundColor: '#13161E',
136
+ alignItems: 'center',
137
+ justifyContent: 'center',
138
+ borderWidth: 1,
139
+ borderColor: '#222836',
140
+ },
141
+ avatarButtonText: {
142
+ color: '#F8FAFC',
143
+ fontSize: 12,
144
+ fontWeight: '700',
145
+ },
146
+ heroBanner: {
147
+ backgroundColor: '#11141C',
148
+ borderRadius: 16,
149
+ padding: 20,
150
+ gap: 10,
151
+ borderWidth: 1,
152
+ borderColor: '#262D3D',
153
+ },
154
+ heroMetaRow: {
155
+ flexDirection: 'row',
156
+ justifyContent: 'space-between',
157
+ alignItems: 'center',
158
+ },
159
+ heroBadge: {
160
+ color: '#38BDF8',
161
+ fontSize: 10,
162
+ fontWeight: '700',
163
+ letterSpacing: 1,
164
+ },
165
+ heroSerial: {
166
+ color: '#10B981',
167
+ fontSize: 10,
168
+ fontWeight: '700',
169
+ letterSpacing: 0.8,
170
+ },
171
+ heroTitle: {
172
+ color: '#F8FAFC',
173
+ fontSize: 22,
174
+ fontWeight: '700',
175
+ letterSpacing: -0.3,
176
+ },
177
+ heroSubtitle: {
178
+ color: '#94A3B8',
179
+ fontSize: 13,
180
+ lineHeight: 19,
181
+ },
182
+ heroCta: {
183
+ backgroundColor: '#F8FAFC',
184
+ borderRadius: 9,
185
+ paddingVertical: 12,
186
+ paddingHorizontal: 16,
187
+ alignSelf: 'flex-start',
188
+ marginTop: 6,
189
+ },
190
+ heroCtaText: {
191
+ color: '#08090C',
192
+ fontSize: 13,
193
+ fontWeight: '700',
194
+ },
195
+ categoryRow: {
196
+ flexDirection: 'row',
197
+ gap: 8,
198
+ },
199
+ categoryPillActive: {
200
+ backgroundColor: '#191D28',
201
+ paddingHorizontal: 16,
202
+ paddingVertical: 10,
203
+ borderRadius: 8,
204
+ borderWidth: 1,
205
+ borderColor: '#38BDF8',
206
+ },
207
+ categoryPill: {
208
+ backgroundColor: '#11141C',
209
+ paddingHorizontal: 16,
210
+ paddingVertical: 10,
211
+ borderRadius: 8,
212
+ borderWidth: 1,
213
+ borderColor: '#1E2433',
214
+ },
215
+ categoryTextActive: {
216
+ color: '#F8FAFC',
217
+ fontSize: 12,
218
+ fontWeight: '700',
219
+ },
220
+ categoryText: {
221
+ color: '#94A3B8',
222
+ fontSize: 12,
223
+ fontWeight: '500',
224
+ },
225
+ productList: {
226
+ gap: 12,
227
+ },
228
+ productCard: {
229
+ backgroundColor: '#11141C',
230
+ borderRadius: 14,
231
+ padding: 14,
232
+ flexDirection: 'row',
233
+ alignItems: 'center',
234
+ gap: 14,
235
+ borderWidth: 1,
236
+ borderColor: '#1E2433',
237
+ },
238
+ productIconBox: {
239
+ width: 52,
240
+ height: 52,
241
+ borderRadius: 10,
242
+ backgroundColor: '#161A26',
243
+ borderWidth: 1,
244
+ borderColor: '#262D3D',
245
+ alignItems: 'center',
246
+ justifyContent: 'center',
247
+ },
248
+ productIconBoxAlt: {
249
+ width: 52,
250
+ height: 52,
251
+ borderRadius: 10,
252
+ backgroundColor: '#131720',
253
+ borderWidth: 1,
254
+ borderColor: '#222836',
255
+ alignItems: 'center',
256
+ justifyContent: 'center',
257
+ },
258
+ productMonogram: {
259
+ color: '#38BDF8',
260
+ fontSize: 11,
261
+ fontWeight: '700',
262
+ letterSpacing: 0.5,
263
+ },
264
+ productMonogramAlt: {
265
+ color: '#10B981',
266
+ fontSize: 11,
267
+ fontWeight: '700',
268
+ letterSpacing: 0.5,
269
+ },
270
+ productInfo: {
271
+ flex: 1,
272
+ gap: 3,
273
+ },
274
+ productName: {
275
+ color: '#F8FAFC',
276
+ fontSize: 15,
277
+ fontWeight: '600',
278
+ },
279
+ productMeta: {
280
+ color: '#64748B',
281
+ fontSize: 12,
282
+ },
283
+ productPrice: {
284
+ color: '#F8FAFC',
285
+ fontSize: 15,
286
+ fontWeight: '700',
287
+ },
288
+ });