@buoy-gg/shared-ui 7.0.7 → 7.0.8
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/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/package.json +4 -4
- package/lib/commonjs/license/DeviceLimitModal.js +0 -480
- package/lib/commonjs/license/ManageDevicesModal.js +0 -546
- package/lib/commonjs/types/index.js +0 -16
- package/lib/commonjs/ui/components/Divider.js +0 -18
- package/lib/commonjs/ui/components/ErrorBoundary.js +0 -113
- package/lib/commonjs/ui/components/ExpandableSection.js +0 -72
- package/lib/commonjs/ui/components/ExpandableSectionHeader.js +0 -87
- package/lib/commonjs/ui/components/ExpandableSectionWithModal.js +0 -183
- package/lib/commonjs/ui/components/FilterViewPattern.js +0 -175
- package/lib/commonjs/ui/components/TypeBadge.js +0 -100
- package/lib/commonjs/ui/components/types.js +0 -5
- package/lib/commonjs/ui/console/BubbleSettingsModal.js +0 -50
- package/lib/commonjs/ui/console/ConsoleSection.js +0 -50
- package/lib/commonjs/ui/console/CyberpunkConsoleSection.js +0 -650
- package/lib/commonjs/ui/console/GalaxyButton.js +0 -100
- package/lib/commonjs/ui/console/index.js +0 -12
- package/lib/module/license/DeviceLimitModal.js +0 -474
- package/lib/module/license/ManageDevicesModal.js +0 -540
- package/lib/module/types/index.js +0 -3
- package/lib/module/ui/components/Divider.js +0 -14
- package/lib/module/ui/components/ErrorBoundary.js +0 -108
- package/lib/module/ui/components/ExpandableSection.js +0 -68
- package/lib/module/ui/components/ExpandableSectionHeader.js +0 -83
- package/lib/module/ui/components/ExpandableSectionWithModal.js +0 -179
- package/lib/module/ui/components/FilterViewPattern.js +0 -172
- package/lib/module/ui/components/TypeBadge.js +0 -96
- package/lib/module/ui/components/types.js +0 -3
- package/lib/module/ui/console/BubbleSettingsModal.js +0 -46
- package/lib/module/ui/console/ConsoleSection.js +0 -46
- package/lib/module/ui/console/CyberpunkConsoleSection.js +0 -647
- package/lib/module/ui/console/GalaxyButton.js +0 -96
- package/lib/module/ui/console/index.js +0 -5
- package/lib/typescript/commonjs/license/DeviceLimitModal.d.ts +0 -23
- package/lib/typescript/commonjs/license/DeviceLimitModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/license/ManageDevicesModal.d.ts +0 -23
- package/lib/typescript/commonjs/license/ManageDevicesModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/types/index.d.ts +0 -2
- package/lib/typescript/commonjs/types/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Divider.d.ts +0 -2
- package/lib/typescript/commonjs/ui/components/Divider.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts +0 -18
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ExpandableSection.d.ts +0 -15
- package/lib/typescript/commonjs/ui/components/ExpandableSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ExpandableSectionHeader.d.ts +0 -13
- package/lib/typescript/commonjs/ui/components/ExpandableSectionHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ExpandableSectionWithModal.d.ts +0 -18
- package/lib/typescript/commonjs/ui/components/ExpandableSectionWithModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/FilterViewPattern.d.ts +0 -15
- package/lib/typescript/commonjs/ui/components/FilterViewPattern.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/TypeBadge.d.ts +0 -6
- package/lib/typescript/commonjs/ui/components/TypeBadge.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/types.d.ts +0 -3
- package/lib/typescript/commonjs/ui/components/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/BubbleSettingsModal.d.ts +0 -11
- package/lib/typescript/commonjs/ui/console/BubbleSettingsModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/ConsoleSection.d.ts +0 -19
- package/lib/typescript/commonjs/ui/console/ConsoleSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/CyberpunkConsoleSection.d.ts +0 -17
- package/lib/typescript/commonjs/ui/console/CyberpunkConsoleSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/GalaxyButton.d.ts +0 -10
- package/lib/typescript/commonjs/ui/console/GalaxyButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/console/index.d.ts +0 -2
- package/lib/typescript/commonjs/ui/console/index.d.ts.map +0 -1
- package/lib/typescript/module/license/DeviceLimitModal.d.ts +0 -23
- package/lib/typescript/module/license/DeviceLimitModal.d.ts.map +0 -1
- package/lib/typescript/module/license/ManageDevicesModal.d.ts +0 -23
- package/lib/typescript/module/license/ManageDevicesModal.d.ts.map +0 -1
- package/lib/typescript/module/types/index.d.ts +0 -2
- package/lib/typescript/module/types/index.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Divider.d.ts +0 -2
- package/lib/typescript/module/ui/components/Divider.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts +0 -18
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ExpandableSection.d.ts +0 -15
- package/lib/typescript/module/ui/components/ExpandableSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ExpandableSectionHeader.d.ts +0 -13
- package/lib/typescript/module/ui/components/ExpandableSectionHeader.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ExpandableSectionWithModal.d.ts +0 -18
- package/lib/typescript/module/ui/components/ExpandableSectionWithModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/FilterViewPattern.d.ts +0 -15
- package/lib/typescript/module/ui/components/FilterViewPattern.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/TypeBadge.d.ts +0 -6
- package/lib/typescript/module/ui/components/TypeBadge.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/types.d.ts +0 -3
- package/lib/typescript/module/ui/components/types.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/BubbleSettingsModal.d.ts +0 -11
- package/lib/typescript/module/ui/console/BubbleSettingsModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/ConsoleSection.d.ts +0 -19
- package/lib/typescript/module/ui/console/ConsoleSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/CyberpunkConsoleSection.d.ts +0 -17
- package/lib/typescript/module/ui/console/CyberpunkConsoleSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/GalaxyButton.d.ts +0 -10
- package/lib/typescript/module/ui/console/GalaxyButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/console/index.d.ts +0 -2
- package/lib/typescript/module/ui/console/index.d.ts.map +0 -1
|
@@ -1,647 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useEffect, useRef } from "react";
|
|
4
|
-
import { View, Text, StyleSheet, Pressable, Animated, Easing } from "react-native";
|
|
5
|
-
import { absoluteFill } from "../../utils/absoluteFill.js";
|
|
6
|
-
import { ChevronRight } from "../../icons/index.js";
|
|
7
|
-
import { gameUIColors } from "../gameUI/index.js";
|
|
8
|
-
|
|
9
|
-
// CONFIGURABLE: Change this value to adjust glitch duration (in milliseconds)
|
|
10
|
-
// Examples: 100 for very quick, 500 for half second, 1000 for 1 second, 2000 for 2 seconds
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const GLITCH_DURATION_MS = 100;
|
|
13
|
-
export function CyberpunkConsoleSection({
|
|
14
|
-
id: _id,
|
|
15
|
-
// Unused but required by interface
|
|
16
|
-
title,
|
|
17
|
-
subtitle,
|
|
18
|
-
icon: Icon,
|
|
19
|
-
iconColor,
|
|
20
|
-
iconBackgroundColor,
|
|
21
|
-
onPress,
|
|
22
|
-
style,
|
|
23
|
-
index = 0
|
|
24
|
-
}) {
|
|
25
|
-
// Animation values
|
|
26
|
-
const glowIntensity = useRef(new Animated.Value(0.3)).current;
|
|
27
|
-
const borderGlow = useRef(new Animated.Value(0)).current;
|
|
28
|
-
const glitchX = useRef(new Animated.Value(0)).current;
|
|
29
|
-
const glitchY = useRef(new Animated.Value(0)).current;
|
|
30
|
-
const glitchOpacity = useRef(new Animated.Value(0)).current;
|
|
31
|
-
const glitchScale = useRef(new Animated.Value(1)).current;
|
|
32
|
-
const pulseScale = useRef(new Animated.Value(1)).current;
|
|
33
|
-
const isPressedRef = useRef(0);
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
// Border glow pulse
|
|
36
|
-
Animated.loop(Animated.sequence([Animated.timing(borderGlow, {
|
|
37
|
-
toValue: 0.8,
|
|
38
|
-
duration: 2000,
|
|
39
|
-
easing: Easing.inOut(Easing.quad),
|
|
40
|
-
useNativeDriver: false
|
|
41
|
-
}), Animated.timing(borderGlow, {
|
|
42
|
-
toValue: 0.2,
|
|
43
|
-
duration: 2000,
|
|
44
|
-
easing: Easing.inOut(Easing.quad),
|
|
45
|
-
useNativeDriver: false
|
|
46
|
-
})])).start();
|
|
47
|
-
|
|
48
|
-
// Random glitch effect with varying delays per item
|
|
49
|
-
const startRandomGlitch = () => {
|
|
50
|
-
// Random delay between 3-8 seconds with stagger based on index
|
|
51
|
-
const nextGlitchDelay = 3000 + Math.random() * 5000 + index * 500;
|
|
52
|
-
setTimeout(() => {
|
|
53
|
-
// Calculate proportional durations based on GLITCH_DURATION_MS
|
|
54
|
-
const d = GLITCH_DURATION_MS; // Total duration
|
|
55
|
-
|
|
56
|
-
// Glitch opacity animation - uses proportional timing
|
|
57
|
-
Animated.sequence([Animated.timing(glitchOpacity, {
|
|
58
|
-
toValue: 1,
|
|
59
|
-
duration: d * 0.15,
|
|
60
|
-
useNativeDriver: true
|
|
61
|
-
}), Animated.timing(glitchOpacity, {
|
|
62
|
-
toValue: 0.3,
|
|
63
|
-
duration: d * 0.1,
|
|
64
|
-
useNativeDriver: true
|
|
65
|
-
}), Animated.timing(glitchOpacity, {
|
|
66
|
-
toValue: 0.9,
|
|
67
|
-
duration: d * 0.15,
|
|
68
|
-
useNativeDriver: true
|
|
69
|
-
}), Animated.timing(glitchOpacity, {
|
|
70
|
-
toValue: 0.2,
|
|
71
|
-
duration: d * 0.1,
|
|
72
|
-
useNativeDriver: true
|
|
73
|
-
}), Animated.timing(glitchOpacity, {
|
|
74
|
-
toValue: 0.8,
|
|
75
|
-
duration: d * 0.2,
|
|
76
|
-
useNativeDriver: true
|
|
77
|
-
}), Animated.timing(glitchOpacity, {
|
|
78
|
-
toValue: 0.4,
|
|
79
|
-
duration: d * 0.1,
|
|
80
|
-
useNativeDriver: true
|
|
81
|
-
}), Animated.timing(glitchOpacity, {
|
|
82
|
-
toValue: 0.7,
|
|
83
|
-
duration: d * 0.15,
|
|
84
|
-
useNativeDriver: true
|
|
85
|
-
}), Animated.timing(glitchOpacity, {
|
|
86
|
-
toValue: 0,
|
|
87
|
-
duration: d * 0.05,
|
|
88
|
-
useNativeDriver: true
|
|
89
|
-
})]).start();
|
|
90
|
-
|
|
91
|
-
// Glitch X displacement - proportional timing
|
|
92
|
-
Animated.sequence([Animated.timing(glitchX, {
|
|
93
|
-
toValue: 10,
|
|
94
|
-
duration: d * 0.1,
|
|
95
|
-
useNativeDriver: true
|
|
96
|
-
}), Animated.timing(glitchX, {
|
|
97
|
-
toValue: -10,
|
|
98
|
-
duration: d * 0.1,
|
|
99
|
-
useNativeDriver: true
|
|
100
|
-
}), Animated.timing(glitchX, {
|
|
101
|
-
toValue: 8,
|
|
102
|
-
duration: d * 0.15,
|
|
103
|
-
useNativeDriver: true
|
|
104
|
-
}), Animated.timing(glitchX, {
|
|
105
|
-
toValue: -6,
|
|
106
|
-
duration: d * 0.15,
|
|
107
|
-
useNativeDriver: true
|
|
108
|
-
}), Animated.timing(glitchX, {
|
|
109
|
-
toValue: 5,
|
|
110
|
-
duration: d * 0.2,
|
|
111
|
-
useNativeDriver: true
|
|
112
|
-
}), Animated.timing(glitchX, {
|
|
113
|
-
toValue: -3,
|
|
114
|
-
duration: d * 0.15,
|
|
115
|
-
useNativeDriver: true
|
|
116
|
-
}), Animated.timing(glitchX, {
|
|
117
|
-
toValue: 0,
|
|
118
|
-
duration: d * 0.15,
|
|
119
|
-
useNativeDriver: true
|
|
120
|
-
})]).start();
|
|
121
|
-
|
|
122
|
-
// Glitch Y displacement - proportional timing
|
|
123
|
-
Animated.sequence([Animated.timing(glitchY, {
|
|
124
|
-
toValue: -5,
|
|
125
|
-
duration: d * 0.2,
|
|
126
|
-
useNativeDriver: true
|
|
127
|
-
}), Animated.timing(glitchY, {
|
|
128
|
-
toValue: 4,
|
|
129
|
-
duration: d * 0.2,
|
|
130
|
-
useNativeDriver: true
|
|
131
|
-
}), Animated.timing(glitchY, {
|
|
132
|
-
toValue: -3,
|
|
133
|
-
duration: d * 0.2,
|
|
134
|
-
useNativeDriver: true
|
|
135
|
-
}), Animated.timing(glitchY, {
|
|
136
|
-
toValue: 2,
|
|
137
|
-
duration: d * 0.2,
|
|
138
|
-
useNativeDriver: true
|
|
139
|
-
}), Animated.timing(glitchY, {
|
|
140
|
-
toValue: 0,
|
|
141
|
-
duration: d * 0.2,
|
|
142
|
-
useNativeDriver: true
|
|
143
|
-
})]).start();
|
|
144
|
-
|
|
145
|
-
// Glitch scale - proportional timing
|
|
146
|
-
Animated.sequence([Animated.timing(glitchScale, {
|
|
147
|
-
toValue: 1.05,
|
|
148
|
-
duration: d * 0.15,
|
|
149
|
-
useNativeDriver: true
|
|
150
|
-
}), Animated.timing(glitchScale, {
|
|
151
|
-
toValue: 0.98,
|
|
152
|
-
duration: d * 0.15,
|
|
153
|
-
useNativeDriver: true
|
|
154
|
-
}), Animated.timing(glitchScale, {
|
|
155
|
-
toValue: 1.03,
|
|
156
|
-
duration: d * 0.2,
|
|
157
|
-
useNativeDriver: true
|
|
158
|
-
}), Animated.timing(glitchScale, {
|
|
159
|
-
toValue: 0.97,
|
|
160
|
-
duration: d * 0.2,
|
|
161
|
-
useNativeDriver: true
|
|
162
|
-
}), Animated.timing(glitchScale, {
|
|
163
|
-
toValue: 1.02,
|
|
164
|
-
duration: d * 0.15,
|
|
165
|
-
useNativeDriver: true
|
|
166
|
-
}), Animated.timing(glitchScale, {
|
|
167
|
-
toValue: 1,
|
|
168
|
-
duration: d * 0.15,
|
|
169
|
-
useNativeDriver: true
|
|
170
|
-
})]).start();
|
|
171
|
-
|
|
172
|
-
// Glow intensity glitch - proportional timing
|
|
173
|
-
Animated.sequence([Animated.timing(glowIntensity, {
|
|
174
|
-
toValue: 1,
|
|
175
|
-
duration: d * 0.3,
|
|
176
|
-
useNativeDriver: false
|
|
177
|
-
}), Animated.timing(glowIntensity, {
|
|
178
|
-
toValue: 0.5,
|
|
179
|
-
duration: d * 0.4,
|
|
180
|
-
useNativeDriver: false
|
|
181
|
-
}), Animated.timing(glowIntensity, {
|
|
182
|
-
toValue: 0.3,
|
|
183
|
-
duration: d * 0.3,
|
|
184
|
-
useNativeDriver: false
|
|
185
|
-
})]).start();
|
|
186
|
-
|
|
187
|
-
// Border glow pulse during glitch - proportional timing
|
|
188
|
-
Animated.sequence([Animated.timing(borderGlow, {
|
|
189
|
-
toValue: 1,
|
|
190
|
-
duration: d * 0.5,
|
|
191
|
-
useNativeDriver: false
|
|
192
|
-
}), Animated.timing(borderGlow, {
|
|
193
|
-
toValue: 0.2,
|
|
194
|
-
duration: d * 0.5,
|
|
195
|
-
useNativeDriver: false
|
|
196
|
-
})]).start();
|
|
197
|
-
|
|
198
|
-
// Schedule next glitch
|
|
199
|
-
startRandomGlitch();
|
|
200
|
-
}, nextGlitchDelay);
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
// Start the random glitch cycle
|
|
204
|
-
const initialDelay = Math.random() * 2000 + index * 300;
|
|
205
|
-
const timeoutId = setTimeout(startRandomGlitch, initialDelay);
|
|
206
|
-
return () => clearTimeout(timeoutId);
|
|
207
|
-
}, [borderGlow, glitchOpacity, glitchScale, glitchX, glitchY, glowIntensity, index, pulseScale]);
|
|
208
|
-
const handlePressIn = () => {
|
|
209
|
-
isPressedRef.current = 1;
|
|
210
|
-
Animated.spring(pulseScale, {
|
|
211
|
-
toValue: 0.98,
|
|
212
|
-
damping: 15,
|
|
213
|
-
stiffness: 400,
|
|
214
|
-
useNativeDriver: true
|
|
215
|
-
}).start();
|
|
216
|
-
Animated.timing(glowIntensity, {
|
|
217
|
-
toValue: 1,
|
|
218
|
-
duration: 100,
|
|
219
|
-
useNativeDriver: false
|
|
220
|
-
}).start();
|
|
221
|
-
|
|
222
|
-
// Trigger glitch on press
|
|
223
|
-
Animated.sequence([Animated.timing(glitchOpacity, {
|
|
224
|
-
toValue: 1,
|
|
225
|
-
duration: 20,
|
|
226
|
-
useNativeDriver: true
|
|
227
|
-
}), Animated.timing(glitchOpacity, {
|
|
228
|
-
toValue: 0,
|
|
229
|
-
duration: 30,
|
|
230
|
-
useNativeDriver: true
|
|
231
|
-
})]).start();
|
|
232
|
-
Animated.sequence([Animated.timing(glitchX, {
|
|
233
|
-
toValue: 5,
|
|
234
|
-
duration: 20,
|
|
235
|
-
useNativeDriver: true
|
|
236
|
-
}), Animated.timing(glitchX, {
|
|
237
|
-
toValue: -5,
|
|
238
|
-
duration: 20,
|
|
239
|
-
useNativeDriver: true
|
|
240
|
-
}), Animated.timing(glitchX, {
|
|
241
|
-
toValue: 0,
|
|
242
|
-
duration: 20,
|
|
243
|
-
useNativeDriver: true
|
|
244
|
-
})]).start();
|
|
245
|
-
};
|
|
246
|
-
const handlePressOut = () => {
|
|
247
|
-
isPressedRef.current = 0;
|
|
248
|
-
Animated.spring(pulseScale, {
|
|
249
|
-
toValue: 1,
|
|
250
|
-
damping: 15,
|
|
251
|
-
stiffness: 400,
|
|
252
|
-
useNativeDriver: true
|
|
253
|
-
}).start();
|
|
254
|
-
Animated.timing(glowIntensity, {
|
|
255
|
-
toValue: 0.3,
|
|
256
|
-
duration: 200,
|
|
257
|
-
useNativeDriver: false
|
|
258
|
-
}).start();
|
|
259
|
-
};
|
|
260
|
-
const containerAnimatedStyle = {
|
|
261
|
-
transform: [{
|
|
262
|
-
scale: pulseScale
|
|
263
|
-
}]
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
// Get accent color for this section
|
|
267
|
-
const getAccentColor = () => {
|
|
268
|
-
// Direct color matching
|
|
269
|
-
if (iconColor === "#10B981") return "#10B981"; // Green
|
|
270
|
-
if (iconColor === "#EF4444") return "#EF4444"; // Red
|
|
271
|
-
if (iconColor === "#3B82F6") return "#3B82F6"; // Blue
|
|
272
|
-
if (iconColor === "#8B5CF6") return "#8B5CF6"; // Purple
|
|
273
|
-
if (iconColor === "#F59E0B") return "#F59E0B"; // Yellow
|
|
274
|
-
if (iconColor === "#00FFFF") return gameUIColors.info; // Cyan
|
|
275
|
-
if (iconColor === "#EC4899") return "#EC4899"; // Pink
|
|
276
|
-
if (iconColor === "#14B8A6") return "#14B8A6"; // Teal
|
|
277
|
-
if (iconColor === "#FF006E") return "#FF006E"; // React Query pink/red
|
|
278
|
-
if (iconColor === "#00FF88") return "#00FF88"; // Storage green
|
|
279
|
-
if (iconColor === "#00E5FF") return gameUIColors.info; // Storage Events cyan
|
|
280
|
-
if (iconColor === "#E040FB") return "#E040FB"; // Network purple
|
|
281
|
-
|
|
282
|
-
// Fallback pattern matching for any other colors
|
|
283
|
-
if (iconColor.includes("FF006E")) return "#FF006E";
|
|
284
|
-
if (iconColor.includes("00FF88")) return "#00FF88";
|
|
285
|
-
if (iconColor.includes("00E5FF")) return "#00E5FF";
|
|
286
|
-
if (iconColor.includes("E040FB")) return "#E040FB";
|
|
287
|
-
return gameUIColors.info; // Default cyan
|
|
288
|
-
};
|
|
289
|
-
const accentColor = getAccentColor();
|
|
290
|
-
|
|
291
|
-
// Convert hex color to RGB values for interpolation
|
|
292
|
-
const hexToRgb = hex => {
|
|
293
|
-
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
294
|
-
return result ? {
|
|
295
|
-
r: parseInt(result[1], 16),
|
|
296
|
-
g: parseInt(result[2], 16),
|
|
297
|
-
b: parseInt(result[3], 16)
|
|
298
|
-
} : {
|
|
299
|
-
r: 0,
|
|
300
|
-
g: 255,
|
|
301
|
-
b: 255
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
const rgb = hexToRgb(accentColor);
|
|
305
|
-
const shadowOpacityValue = glowIntensity.interpolate({
|
|
306
|
-
inputRange: [0, 1],
|
|
307
|
-
outputRange: [0, 0.8]
|
|
308
|
-
});
|
|
309
|
-
const borderAnimatedStyle = {
|
|
310
|
-
borderColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.4)`,
|
|
311
|
-
// Static fallback
|
|
312
|
-
shadowOpacity: shadowOpacityValue
|
|
313
|
-
};
|
|
314
|
-
const glitchStyle = {
|
|
315
|
-
opacity: glitchOpacity,
|
|
316
|
-
transform: [{
|
|
317
|
-
translateX: glitchX
|
|
318
|
-
}, {
|
|
319
|
-
translateY: glitchY
|
|
320
|
-
}, {
|
|
321
|
-
scale: glitchScale
|
|
322
|
-
}]
|
|
323
|
-
};
|
|
324
|
-
return /*#__PURE__*/_jsx(Pressable, {
|
|
325
|
-
onPress: onPress,
|
|
326
|
-
onPressIn: handlePressIn,
|
|
327
|
-
onPressOut: handlePressOut,
|
|
328
|
-
style: style,
|
|
329
|
-
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
330
|
-
style: [styles.container, containerAnimatedStyle],
|
|
331
|
-
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
332
|
-
style: [styles.card, borderAnimatedStyle, {
|
|
333
|
-
shadowColor: accentColor
|
|
334
|
-
}],
|
|
335
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
336
|
-
style: [styles.glassLayer1, {
|
|
337
|
-
backgroundColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.02)`
|
|
338
|
-
}]
|
|
339
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
340
|
-
style: [styles.glassLayer2, {
|
|
341
|
-
backgroundColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.015)`
|
|
342
|
-
}]
|
|
343
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
344
|
-
style: [styles.glassLayer3, {
|
|
345
|
-
backgroundColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.01)`
|
|
346
|
-
}]
|
|
347
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
348
|
-
style: [styles.glassShimmer]
|
|
349
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
350
|
-
style: [styles.cornerAccent, styles.cornerTL, {
|
|
351
|
-
backgroundColor: accentColor
|
|
352
|
-
}]
|
|
353
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
354
|
-
style: [styles.cornerAccent, styles.cornerTR, {
|
|
355
|
-
backgroundColor: `${accentColor}80`
|
|
356
|
-
}]
|
|
357
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
358
|
-
style: [styles.cornerAccent, styles.cornerBL, {
|
|
359
|
-
backgroundColor: `${accentColor}80`
|
|
360
|
-
}]
|
|
361
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
362
|
-
style: [styles.cornerAccent, styles.cornerBR, {
|
|
363
|
-
backgroundColor: accentColor
|
|
364
|
-
}]
|
|
365
|
-
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
366
|
-
style: [styles.glitchOverlayLayer, glitchStyle, {
|
|
367
|
-
backgroundColor: `${accentColor}20`,
|
|
368
|
-
borderColor: accentColor
|
|
369
|
-
}],
|
|
370
|
-
pointerEvents: "none",
|
|
371
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
372
|
-
style: styles.glitchContent,
|
|
373
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
374
|
-
style: [styles.iconContainer, {
|
|
375
|
-
borderColor: accentColor
|
|
376
|
-
}],
|
|
377
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
378
|
-
size: 20,
|
|
379
|
-
color: accentColor
|
|
380
|
-
})
|
|
381
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
382
|
-
style: styles.textContainer,
|
|
383
|
-
children: [/*#__PURE__*/_jsxs(Text, {
|
|
384
|
-
style: [styles.glitchTitle, {
|
|
385
|
-
color: accentColor
|
|
386
|
-
}],
|
|
387
|
-
children: ["_", title, "_"]
|
|
388
|
-
}), subtitle && /*#__PURE__*/_jsx(Text, {
|
|
389
|
-
style: [styles.glitchSubtitle, {
|
|
390
|
-
color: accentColor
|
|
391
|
-
}],
|
|
392
|
-
children: subtitle
|
|
393
|
-
})]
|
|
394
|
-
})]
|
|
395
|
-
})
|
|
396
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
397
|
-
style: styles.content,
|
|
398
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
399
|
-
style: [styles.iconContainer, {
|
|
400
|
-
borderColor: `${accentColor}30`
|
|
401
|
-
}],
|
|
402
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
403
|
-
style: [styles.iconInner, {
|
|
404
|
-
backgroundColor: `${iconBackgroundColor}15`,
|
|
405
|
-
borderColor: `${accentColor}40`
|
|
406
|
-
}],
|
|
407
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
408
|
-
size: 20,
|
|
409
|
-
color: iconColor
|
|
410
|
-
})
|
|
411
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
412
|
-
style: [styles.iconGlow, {
|
|
413
|
-
backgroundColor: accentColor
|
|
414
|
-
}]
|
|
415
|
-
})]
|
|
416
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
417
|
-
style: styles.textContainer,
|
|
418
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
419
|
-
style: [styles.title, {
|
|
420
|
-
textShadowColor: accentColor
|
|
421
|
-
}],
|
|
422
|
-
children: title
|
|
423
|
-
}), subtitle && /*#__PURE__*/_jsx(Text, {
|
|
424
|
-
style: [styles.subtitle, {
|
|
425
|
-
color: `${accentColor}99`
|
|
426
|
-
}],
|
|
427
|
-
children: subtitle
|
|
428
|
-
})]
|
|
429
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
430
|
-
style: styles.arrowContainer,
|
|
431
|
-
children: /*#__PURE__*/_jsx(ChevronRight, {
|
|
432
|
-
size: 16,
|
|
433
|
-
color: `${accentColor}80`
|
|
434
|
-
})
|
|
435
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
436
|
-
style: styles.dataDots,
|
|
437
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
438
|
-
style: [styles.dot, {
|
|
439
|
-
backgroundColor: accentColor,
|
|
440
|
-
opacity: 0.8
|
|
441
|
-
}]
|
|
442
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
443
|
-
style: [styles.dot, {
|
|
444
|
-
backgroundColor: accentColor,
|
|
445
|
-
opacity: 0.5
|
|
446
|
-
}]
|
|
447
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
448
|
-
style: [styles.dot, {
|
|
449
|
-
backgroundColor: accentColor,
|
|
450
|
-
opacity: 0.3
|
|
451
|
-
}]
|
|
452
|
-
})]
|
|
453
|
-
})]
|
|
454
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
455
|
-
style: styles.binaryPattern,
|
|
456
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
457
|
-
style: [styles.binaryText, {
|
|
458
|
-
color: `${accentColor}40`
|
|
459
|
-
}],
|
|
460
|
-
children: "01101"
|
|
461
|
-
})
|
|
462
|
-
})]
|
|
463
|
-
})
|
|
464
|
-
})
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
const styles = StyleSheet.create({
|
|
468
|
-
container: {
|
|
469
|
-
marginBottom: 12
|
|
470
|
-
},
|
|
471
|
-
card: {
|
|
472
|
-
height: 82,
|
|
473
|
-
borderRadius: 12,
|
|
474
|
-
borderWidth: 1.5,
|
|
475
|
-
overflow: "hidden",
|
|
476
|
-
shadowOffset: {
|
|
477
|
-
width: 0,
|
|
478
|
-
height: 0
|
|
479
|
-
},
|
|
480
|
-
shadowRadius: 20,
|
|
481
|
-
elevation: 15,
|
|
482
|
-
backgroundColor: "rgba(5, 5, 10, 0.6)" // Darker glass background
|
|
483
|
-
},
|
|
484
|
-
glassLayer1: {
|
|
485
|
-
...absoluteFill,
|
|
486
|
-
backgroundColor: "rgba(10, 10, 15, 0.7)",
|
|
487
|
-
opacity: 0.8
|
|
488
|
-
},
|
|
489
|
-
glassLayer2: {
|
|
490
|
-
...absoluteFill,
|
|
491
|
-
backgroundColor: "rgba(15, 15, 25, 0.5)",
|
|
492
|
-
opacity: 0.6,
|
|
493
|
-
top: "20%",
|
|
494
|
-
left: "20%"
|
|
495
|
-
},
|
|
496
|
-
glassLayer3: {
|
|
497
|
-
...absoluteFill,
|
|
498
|
-
backgroundColor: "rgba(20, 20, 35, 0.3)",
|
|
499
|
-
opacity: 0.4,
|
|
500
|
-
top: "40%",
|
|
501
|
-
left: "40%"
|
|
502
|
-
},
|
|
503
|
-
glassShimmer: {
|
|
504
|
-
...absoluteFill,
|
|
505
|
-
backgroundColor: "rgba(128, 128, 128, 0.06)",
|
|
506
|
-
opacity: 0.6
|
|
507
|
-
},
|
|
508
|
-
glitchOverlayLayer: {
|
|
509
|
-
...absoluteFill,
|
|
510
|
-
borderRadius: 12,
|
|
511
|
-
borderWidth: 1,
|
|
512
|
-
justifyContent: "center",
|
|
513
|
-
zIndex: 5
|
|
514
|
-
},
|
|
515
|
-
glitchContent: {
|
|
516
|
-
flexDirection: "row",
|
|
517
|
-
alignItems: "center",
|
|
518
|
-
paddingHorizontal: 16,
|
|
519
|
-
height: "100%"
|
|
520
|
-
},
|
|
521
|
-
glitchTitle: {
|
|
522
|
-
fontSize: 15,
|
|
523
|
-
fontWeight: "700",
|
|
524
|
-
letterSpacing: 2,
|
|
525
|
-
fontFamily: "monospace",
|
|
526
|
-
textShadowOffset: {
|
|
527
|
-
width: 2,
|
|
528
|
-
height: 2
|
|
529
|
-
},
|
|
530
|
-
textShadowRadius: 10
|
|
531
|
-
},
|
|
532
|
-
glitchSubtitle: {
|
|
533
|
-
fontSize: 12,
|
|
534
|
-
fontWeight: "500",
|
|
535
|
-
marginTop: 2,
|
|
536
|
-
letterSpacing: 1,
|
|
537
|
-
fontFamily: "monospace",
|
|
538
|
-
opacity: 0.8
|
|
539
|
-
},
|
|
540
|
-
cornerAccent: {
|
|
541
|
-
position: "absolute",
|
|
542
|
-
width: 16,
|
|
543
|
-
height: 2
|
|
544
|
-
},
|
|
545
|
-
cornerTL: {
|
|
546
|
-
top: 0,
|
|
547
|
-
left: 0,
|
|
548
|
-
width: 2,
|
|
549
|
-
height: 16
|
|
550
|
-
},
|
|
551
|
-
cornerTR: {
|
|
552
|
-
top: 0,
|
|
553
|
-
right: 0
|
|
554
|
-
},
|
|
555
|
-
cornerBL: {
|
|
556
|
-
bottom: 0,
|
|
557
|
-
left: 0
|
|
558
|
-
},
|
|
559
|
-
cornerBR: {
|
|
560
|
-
bottom: 0,
|
|
561
|
-
right: 0,
|
|
562
|
-
width: 2,
|
|
563
|
-
height: 16
|
|
564
|
-
},
|
|
565
|
-
content: {
|
|
566
|
-
flexDirection: "row",
|
|
567
|
-
alignItems: "center",
|
|
568
|
-
height: "100%",
|
|
569
|
-
paddingHorizontal: 16,
|
|
570
|
-
zIndex: 1
|
|
571
|
-
},
|
|
572
|
-
iconContainer: {
|
|
573
|
-
width: 48,
|
|
574
|
-
height: 48,
|
|
575
|
-
borderRadius: 10,
|
|
576
|
-
borderWidth: 1,
|
|
577
|
-
justifyContent: "center",
|
|
578
|
-
alignItems: "center",
|
|
579
|
-
marginRight: 14,
|
|
580
|
-
position: "relative"
|
|
581
|
-
},
|
|
582
|
-
iconInner: {
|
|
583
|
-
width: 42,
|
|
584
|
-
height: 42,
|
|
585
|
-
borderRadius: 8,
|
|
586
|
-
borderWidth: 1,
|
|
587
|
-
justifyContent: "center",
|
|
588
|
-
alignItems: "center"
|
|
589
|
-
},
|
|
590
|
-
iconGlow: {
|
|
591
|
-
position: "absolute",
|
|
592
|
-
width: 48,
|
|
593
|
-
height: 48,
|
|
594
|
-
borderRadius: 10,
|
|
595
|
-
opacity: 0.1
|
|
596
|
-
},
|
|
597
|
-
textContainer: {
|
|
598
|
-
flex: 1
|
|
599
|
-
},
|
|
600
|
-
title: {
|
|
601
|
-
fontSize: 15,
|
|
602
|
-
fontWeight: "700",
|
|
603
|
-
color: "#FFFFFF",
|
|
604
|
-
letterSpacing: 0.5,
|
|
605
|
-
fontFamily: "monospace",
|
|
606
|
-
textShadowOffset: {
|
|
607
|
-
width: 0,
|
|
608
|
-
height: 0
|
|
609
|
-
},
|
|
610
|
-
textShadowRadius: 8
|
|
611
|
-
},
|
|
612
|
-
subtitle: {
|
|
613
|
-
fontSize: 12,
|
|
614
|
-
fontWeight: "500",
|
|
615
|
-
marginTop: 2,
|
|
616
|
-
letterSpacing: 0.3,
|
|
617
|
-
fontFamily: "monospace"
|
|
618
|
-
},
|
|
619
|
-
arrowContainer: {
|
|
620
|
-
marginLeft: 8,
|
|
621
|
-
opacity: 0.8
|
|
622
|
-
},
|
|
623
|
-
dataDots: {
|
|
624
|
-
position: "absolute",
|
|
625
|
-
right: 16,
|
|
626
|
-
bottom: 8,
|
|
627
|
-
flexDirection: "row",
|
|
628
|
-
gap: 3
|
|
629
|
-
},
|
|
630
|
-
dot: {
|
|
631
|
-
width: 3,
|
|
632
|
-
height: 3,
|
|
633
|
-
borderRadius: 1.5
|
|
634
|
-
},
|
|
635
|
-
binaryPattern: {
|
|
636
|
-
position: "absolute",
|
|
637
|
-
top: 8,
|
|
638
|
-
right: 12,
|
|
639
|
-
opacity: 0.05
|
|
640
|
-
},
|
|
641
|
-
binaryText: {
|
|
642
|
-
fontSize: 8,
|
|
643
|
-
fontFamily: "monospace",
|
|
644
|
-
color: gameUIColors.info,
|
|
645
|
-
letterSpacing: 1
|
|
646
|
-
}
|
|
647
|
-
});
|