@buoy-gg/impersonate 7.0.26 → 7.0.28
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/impersonate/components/DataNukeSettings.js +55 -53
- package/lib/commonjs/impersonate/components/ImpersonateHistoryList.js +9 -9
- package/lib/commonjs/impersonate/components/ImpersonateModal.js +12 -10
- package/lib/commonjs/impersonate/components/ImpersonateStatusBar.js +5 -5
- package/lib/commonjs/impersonate/components/UserAvatar.js +1 -1
- package/lib/commonjs/impersonate/components/UserCard.js +13 -13
- package/lib/commonjs/impersonate/components/UserSearchView.js +16 -16
- package/lib/commonjs/impersonate/utils/impersonateListener.js +64 -9
- package/lib/module/impersonate/components/DataNukeSettings.js +56 -54
- package/lib/module/impersonate/components/ImpersonateHistoryList.js +10 -10
- package/lib/module/impersonate/components/ImpersonateModal.js +13 -11
- package/lib/module/impersonate/components/ImpersonateStatusBar.js +6 -6
- package/lib/module/impersonate/components/UserAvatar.js +2 -2
- package/lib/module/impersonate/components/UserCard.js +14 -14
- package/lib/module/impersonate/components/UserSearchView.js +17 -17
- package/lib/module/impersonate/utils/impersonateListener.js +64 -9
- package/lib/typescript/impersonate/components/DataNukeSettings.d.ts.map +1 -1
- package/lib/typescript/impersonate/utils/impersonateListener.d.ts +7 -27
- package/lib/typescript/impersonate/utils/impersonateListener.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -47,7 +47,7 @@ function UserSearchView({
|
|
|
47
47
|
style: styles.warningCard,
|
|
48
48
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
|
|
49
49
|
size: 18,
|
|
50
|
-
color: _sharedUi.
|
|
50
|
+
color: _sharedUi.night.color.warning
|
|
51
51
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
52
52
|
style: styles.warningContent,
|
|
53
53
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
@@ -63,7 +63,7 @@ function UserSearchView({
|
|
|
63
63
|
style: styles.loadingContainer,
|
|
64
64
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
65
65
|
size: "small",
|
|
66
|
-
color: _sharedUi.
|
|
66
|
+
color: _sharedUi.night.color.accent
|
|
67
67
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
68
68
|
style: styles.loadingText,
|
|
69
69
|
children: "Searching users..."
|
|
@@ -74,7 +74,7 @@ function UserSearchView({
|
|
|
74
74
|
style: styles.errorCard,
|
|
75
75
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
|
|
76
76
|
size: 16,
|
|
77
|
-
color: _sharedUi.
|
|
77
|
+
color: _sharedUi.night.color.danger
|
|
78
78
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
79
79
|
style: styles.errorText,
|
|
80
80
|
children: searchError
|
|
@@ -104,7 +104,7 @@ function UserSearchView({
|
|
|
104
104
|
style: styles.emptyStateIcon,
|
|
105
105
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Users, {
|
|
106
106
|
size: 28,
|
|
107
|
-
color: _sharedUi.
|
|
107
|
+
color: _sharedUi.night.color.textTertiary
|
|
108
108
|
})
|
|
109
109
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
110
110
|
style: styles.emptyStateTitle,
|
|
@@ -141,7 +141,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
141
141
|
},
|
|
142
142
|
loadingText: {
|
|
143
143
|
fontSize: 13,
|
|
144
|
-
color: _sharedUi.
|
|
144
|
+
color: _sharedUi.night.color.textSecondary
|
|
145
145
|
},
|
|
146
146
|
resultsSection: {
|
|
147
147
|
flex: 1,
|
|
@@ -157,10 +157,10 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
157
157
|
flexDirection: "row",
|
|
158
158
|
alignItems: "flex-start",
|
|
159
159
|
gap: 12,
|
|
160
|
-
backgroundColor: _sharedUi.
|
|
160
|
+
backgroundColor: _sharedUi.night.color.warningSoft,
|
|
161
161
|
borderRadius: 10,
|
|
162
162
|
borderWidth: 1,
|
|
163
|
-
borderColor: _sharedUi.
|
|
163
|
+
borderColor: _sharedUi.night.color.warning + "25",
|
|
164
164
|
padding: 14
|
|
165
165
|
},
|
|
166
166
|
warningContent: {
|
|
@@ -169,28 +169,28 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
169
169
|
warningTitle: {
|
|
170
170
|
fontSize: 14,
|
|
171
171
|
fontWeight: "600",
|
|
172
|
-
color: _sharedUi.
|
|
172
|
+
color: _sharedUi.night.color.warning,
|
|
173
173
|
marginBottom: 4
|
|
174
174
|
},
|
|
175
175
|
warningText: {
|
|
176
176
|
fontSize: 13,
|
|
177
|
-
color: _sharedUi.
|
|
177
|
+
color: _sharedUi.night.color.textSecondary,
|
|
178
178
|
lineHeight: 18
|
|
179
179
|
},
|
|
180
180
|
errorCard: {
|
|
181
181
|
flexDirection: "row",
|
|
182
182
|
alignItems: "center",
|
|
183
183
|
gap: 10,
|
|
184
|
-
backgroundColor: _sharedUi.
|
|
184
|
+
backgroundColor: _sharedUi.night.color.dangerSoft,
|
|
185
185
|
borderRadius: 10,
|
|
186
186
|
borderWidth: 1,
|
|
187
|
-
borderColor: _sharedUi.
|
|
187
|
+
borderColor: _sharedUi.night.color.danger + "25",
|
|
188
188
|
padding: 12
|
|
189
189
|
},
|
|
190
190
|
errorText: {
|
|
191
191
|
flex: 1,
|
|
192
192
|
fontSize: 13,
|
|
193
|
-
color: _sharedUi.
|
|
193
|
+
color: _sharedUi.night.color.danger
|
|
194
194
|
},
|
|
195
195
|
emptyStateContainer: {
|
|
196
196
|
flex: 1,
|
|
@@ -203,7 +203,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
203
203
|
width: 56,
|
|
204
204
|
height: 56,
|
|
205
205
|
borderRadius: 28,
|
|
206
|
-
backgroundColor: _sharedUi.
|
|
206
|
+
backgroundColor: _sharedUi.night.color.surfaceElevated,
|
|
207
207
|
alignItems: "center",
|
|
208
208
|
justifyContent: "center",
|
|
209
209
|
marginBottom: 16
|
|
@@ -211,17 +211,17 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
211
211
|
emptyStateTitle: {
|
|
212
212
|
fontSize: 16,
|
|
213
213
|
fontWeight: "600",
|
|
214
|
-
color: _sharedUi.
|
|
214
|
+
color: _sharedUi.night.color.text,
|
|
215
215
|
marginBottom: 6
|
|
216
216
|
},
|
|
217
217
|
emptyStateDescription: {
|
|
218
218
|
fontSize: 14,
|
|
219
|
-
color: _sharedUi.
|
|
219
|
+
color: _sharedUi.night.color.textSecondary,
|
|
220
220
|
textAlign: "center",
|
|
221
221
|
marginBottom: 8
|
|
222
222
|
},
|
|
223
223
|
emptyStateHint: {
|
|
224
224
|
fontSize: 12,
|
|
225
|
-
color: _sharedUi.
|
|
225
|
+
color: _sharedUi.night.color.textTertiary
|
|
226
226
|
}
|
|
227
227
|
});
|
|
@@ -56,11 +56,33 @@ const DEFAULT_IGNORE_PATTERNS = [/\/symbolicate$/, /\/logs$/, /\/debugger-proxy/
|
|
|
56
56
|
* listener.stopListening();
|
|
57
57
|
* ```
|
|
58
58
|
*/
|
|
59
|
+
/**
|
|
60
|
+
* Cooperating-interceptor protocol with @buoy-gg/network: its interceptors
|
|
61
|
+
* carry `__buoy*` marker properties, and it re-installs itself whenever the
|
|
62
|
+
* marker disappears from the live global (that's how it survives being
|
|
63
|
+
* clobbered by Expo/DevTools re-assigning fetch). We wrap its functions, so
|
|
64
|
+
* the markers must ride along on our wrappers — otherwise the network tool
|
|
65
|
+
* would conclude it lost interception and stack a fresh patch on every check.
|
|
66
|
+
*/
|
|
67
|
+
function carryBuoyMarkers(wrapper, wrapped) {
|
|
68
|
+
for (const key of Object.keys(wrapped)) {
|
|
69
|
+
if (key.startsWith("__buoy")) {
|
|
70
|
+
wrapper[key] = wrapped[key];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
59
74
|
class ImpersonateListener {
|
|
60
75
|
isListeningFlag = false;
|
|
61
76
|
|
|
62
77
|
// Store original methods - MUST be captured before other tools patch
|
|
63
78
|
|
|
79
|
+
/**
|
|
80
|
+
* The wrappers this instance installed, for identity checks — stopListening
|
|
81
|
+
* only restores globals that are still literally ours (see there).
|
|
82
|
+
*/
|
|
83
|
+
patchedFetch = null;
|
|
84
|
+
patchedXHROpen = null;
|
|
85
|
+
patchedXHRSend = null;
|
|
64
86
|
constructor() {
|
|
65
87
|
// Initialize with current fetch - will be re-captured in startListening
|
|
66
88
|
this.originalFetch = globalThis.fetch.bind(globalThis);
|
|
@@ -145,15 +167,24 @@ class ImpersonateListener {
|
|
|
145
167
|
// CRITICAL: Re-capture fetch/XHR NOW, not at construction time
|
|
146
168
|
// This ensures we patch OVER any existing interceptors (like @buoy-gg/network)
|
|
147
169
|
// so our modifications are visible to them
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
170
|
+
//
|
|
171
|
+
// Keep the UNBOUND functions too: @buoy-gg/network stamps `__buoy*` marker
|
|
172
|
+
// properties on its interceptors and re-installs when the marker vanishes
|
|
173
|
+
// from the live global — and `.bind()` drops own properties, so the
|
|
174
|
+
// markers must be read off the unbound originals and carried forward onto
|
|
175
|
+
// our wrappers (see below).
|
|
176
|
+
const wrappedFetch = globalThis.fetch;
|
|
177
|
+
const wrappedXHROpen = XMLHttpRequest.prototype.open;
|
|
178
|
+
const wrappedXHRSend = XMLHttpRequest.prototype.send;
|
|
179
|
+
this.originalFetch = wrappedFetch.bind(globalThis);
|
|
180
|
+
this.originalXHROpen = wrappedXHROpen;
|
|
181
|
+
this.originalXHRSend = wrappedXHRSend;
|
|
151
182
|
const self = this;
|
|
152
183
|
|
|
153
184
|
// =======================================================================
|
|
154
185
|
// PATCH FETCH
|
|
155
186
|
// =======================================================================
|
|
156
|
-
|
|
187
|
+
const patchedFetch = async function (input, init) {
|
|
157
188
|
const url = self.extractUrl(input);
|
|
158
189
|
if (self.shouldInjectHeader(url)) {
|
|
159
190
|
// Create new headers with impersonation header added
|
|
@@ -171,13 +202,16 @@ class ImpersonateListener {
|
|
|
171
202
|
// Not injecting - call original fetch as-is
|
|
172
203
|
return self.originalFetch(input, init);
|
|
173
204
|
};
|
|
205
|
+
carryBuoyMarkers(patchedFetch, wrappedFetch);
|
|
206
|
+
this.patchedFetch = patchedFetch;
|
|
207
|
+
globalThis.fetch = this.patchedFetch;
|
|
174
208
|
|
|
175
209
|
// =======================================================================
|
|
176
210
|
// PATCH XMLHttpRequest
|
|
177
211
|
// =======================================================================
|
|
178
212
|
|
|
179
213
|
// Patch open() to store the URL for later use in send()
|
|
180
|
-
|
|
214
|
+
const patchedOpen = function (method, url, async = true, username, password) {
|
|
181
215
|
const xhr = this;
|
|
182
216
|
xhr._impersonateUrl = typeof url === "string" ? url : url.href;
|
|
183
217
|
const urlStr = typeof url === "string" ? url : url.toString();
|
|
@@ -185,7 +219,7 @@ class ImpersonateListener {
|
|
|
185
219
|
};
|
|
186
220
|
|
|
187
221
|
// Patch send() to inject header before sending
|
|
188
|
-
|
|
222
|
+
const patchedSend = function (body) {
|
|
189
223
|
const xhr = this;
|
|
190
224
|
if (xhr._impersonateUrl && self.shouldInjectHeader(xhr._impersonateUrl)) {
|
|
191
225
|
// Inject the impersonation header
|
|
@@ -193,6 +227,12 @@ class ImpersonateListener {
|
|
|
193
227
|
}
|
|
194
228
|
return self.originalXHRSend.call(this, body);
|
|
195
229
|
};
|
|
230
|
+
carryBuoyMarkers(patchedOpen, wrappedXHROpen);
|
|
231
|
+
carryBuoyMarkers(patchedSend, wrappedXHRSend);
|
|
232
|
+
this.patchedXHROpen = patchedOpen;
|
|
233
|
+
this.patchedXHRSend = patchedSend;
|
|
234
|
+
XMLHttpRequest.prototype.open = this.patchedXHROpen;
|
|
235
|
+
XMLHttpRequest.prototype.send = this.patchedXHRSend;
|
|
196
236
|
this.isListeningFlag = true;
|
|
197
237
|
}
|
|
198
238
|
|
|
@@ -207,9 +247,24 @@ class ImpersonateListener {
|
|
|
207
247
|
if (!this.isListeningFlag) {
|
|
208
248
|
return;
|
|
209
249
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
250
|
+
|
|
251
|
+
// Restore ONLY what is still literally ours: if another interceptor
|
|
252
|
+
// patched after us (the network tool re-asserting itself, a debugger),
|
|
253
|
+
// assigning our saved originals would silently wipe its patch. Leaving our
|
|
254
|
+
// wrapper in a foreign chain is safe — with no userId configured it is a
|
|
255
|
+
// pure pass-through.
|
|
256
|
+
if (this.patchedFetch && globalThis.fetch === this.patchedFetch) {
|
|
257
|
+
globalThis.fetch = this.originalFetch;
|
|
258
|
+
}
|
|
259
|
+
if (this.patchedXHROpen && XMLHttpRequest.prototype.open === this.patchedXHROpen) {
|
|
260
|
+
XMLHttpRequest.prototype.open = this.originalXHROpen;
|
|
261
|
+
}
|
|
262
|
+
if (this.patchedXHRSend && XMLHttpRequest.prototype.send === this.patchedXHRSend) {
|
|
263
|
+
XMLHttpRequest.prototype.send = this.originalXHRSend;
|
|
264
|
+
}
|
|
265
|
+
this.patchedFetch = null;
|
|
266
|
+
this.patchedXHROpen = null;
|
|
267
|
+
this.patchedXHRSend = null;
|
|
213
268
|
this.isListeningFlag = false;
|
|
214
269
|
}
|
|
215
270
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import React, { useState, useEffect, useMemo } from "react";
|
|
11
11
|
import { View, Text, TextInput, StyleSheet, Switch, ScrollView, TouchableOpacity } from "react-native";
|
|
12
|
-
import { CollapsibleSection, buoyColors, Settings, AlertTriangle, Info, Zap, RefreshCw, Check, X, Copy, Eye, copyToClipboard } from "@buoy-gg/shared-ui";
|
|
12
|
+
import { CollapsibleSection, buoyColors, night, Settings, AlertTriangle, Info, Zap, RefreshCw, Check, X, Copy, Eye, copyToClipboard } from "@buoy-gg/shared-ui";
|
|
13
13
|
import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
15
|
const DEFAULT_HEADER_KEY = "x-impersonate-user-id";
|
|
@@ -50,7 +50,7 @@ function ToggleRow({
|
|
|
50
50
|
color: buoyColors.success
|
|
51
51
|
}) : /*#__PURE__*/_jsx(X, {
|
|
52
52
|
size: 10,
|
|
53
|
-
color:
|
|
53
|
+
color: night.color.textTertiary
|
|
54
54
|
}), /*#__PURE__*/_jsx(Text, {
|
|
55
55
|
style: [styles.detectedText, detected ? styles.detectedTextActive : styles.detectedTextInactive],
|
|
56
56
|
children: detected ? "Detected" : "Not Detected"
|
|
@@ -59,7 +59,7 @@ function ToggleRow({
|
|
|
59
59
|
style: styles.recommendedBadge,
|
|
60
60
|
children: [/*#__PURE__*/_jsx(Zap, {
|
|
61
61
|
size: 10,
|
|
62
|
-
color:
|
|
62
|
+
color: night.color.accent
|
|
63
63
|
}), /*#__PURE__*/_jsx(Text, {
|
|
64
64
|
style: styles.recommendedText,
|
|
65
65
|
children: "Recommended"
|
|
@@ -73,10 +73,10 @@ function ToggleRow({
|
|
|
73
73
|
value: value,
|
|
74
74
|
onValueChange: onChange,
|
|
75
75
|
trackColor: {
|
|
76
|
-
false:
|
|
77
|
-
true: dangerous ?
|
|
76
|
+
false: night.color.border,
|
|
77
|
+
true: dangerous ? night.color.warning + "50" : night.color.accent + "50"
|
|
78
78
|
},
|
|
79
|
-
thumbColor: value ? dangerous ?
|
|
79
|
+
thumbColor: value ? dangerous ? night.color.warning : night.color.accent : night.color.knob
|
|
80
80
|
})]
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -186,7 +186,7 @@ export function DataNukeSettings({
|
|
|
186
186
|
onPress: handleDiscard,
|
|
187
187
|
children: [/*#__PURE__*/_jsx(X, {
|
|
188
188
|
size: 14,
|
|
189
|
-
color:
|
|
189
|
+
color: night.color.textSecondary
|
|
190
190
|
}), /*#__PURE__*/_jsx(Text, {
|
|
191
191
|
style: styles.discardButtonText,
|
|
192
192
|
children: "Discard"
|
|
@@ -196,7 +196,7 @@ export function DataNukeSettings({
|
|
|
196
196
|
onPress: handleSave,
|
|
197
197
|
children: [/*#__PURE__*/_jsx(Check, {
|
|
198
198
|
size: 14,
|
|
199
|
-
color:
|
|
199
|
+
color: night.color.onAccent
|
|
200
200
|
}), /*#__PURE__*/_jsx(Text, {
|
|
201
201
|
style: styles.saveButtonText,
|
|
202
202
|
children: "Save"
|
|
@@ -219,7 +219,7 @@ export function DataNukeSettings({
|
|
|
219
219
|
value: localHeaderKey,
|
|
220
220
|
onChangeText: setLocalHeaderKey,
|
|
221
221
|
placeholder: "x-impersonate-user-id",
|
|
222
|
-
placeholderTextColor:
|
|
222
|
+
placeholderTextColor: night.color.placeholder,
|
|
223
223
|
autoCapitalize: "none",
|
|
224
224
|
autoCorrect: false
|
|
225
225
|
}), /*#__PURE__*/_jsxs(View, {
|
|
@@ -316,7 +316,7 @@ export function DataNukeSettings({
|
|
|
316
316
|
style: styles.warningCard,
|
|
317
317
|
children: [/*#__PURE__*/_jsx(AlertTriangle, {
|
|
318
318
|
size: 16,
|
|
319
|
-
color:
|
|
319
|
+
color: night.color.warning
|
|
320
320
|
}), /*#__PURE__*/_jsxs(View, {
|
|
321
321
|
style: styles.warningContent,
|
|
322
322
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
@@ -334,7 +334,7 @@ export function DataNukeSettings({
|
|
|
334
334
|
onPress: handleRestoreDefaults,
|
|
335
335
|
children: [/*#__PURE__*/_jsx(RefreshCw, {
|
|
336
336
|
size: 14,
|
|
337
|
-
color:
|
|
337
|
+
color: night.color.textSecondary
|
|
338
338
|
}), /*#__PURE__*/_jsx(Text, {
|
|
339
339
|
style: styles.restoreButtonText,
|
|
340
340
|
children: "Restore Defaults"
|
|
@@ -399,7 +399,7 @@ export function DataNukeSettings({
|
|
|
399
399
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
400
400
|
children: [/*#__PURE__*/_jsx(Copy, {
|
|
401
401
|
size: 14,
|
|
402
|
-
color:
|
|
402
|
+
color: night.color.accent
|
|
403
403
|
}), /*#__PURE__*/_jsx(Text, {
|
|
404
404
|
style: styles.copyButtonText,
|
|
405
405
|
children: "Copy Config"
|
|
@@ -420,10 +420,10 @@ const styles = StyleSheet.create({
|
|
|
420
420
|
paddingBottom: 32
|
|
421
421
|
},
|
|
422
422
|
actionBar: {
|
|
423
|
-
backgroundColor:
|
|
423
|
+
backgroundColor: night.color.accentSoft,
|
|
424
424
|
borderRadius: 10,
|
|
425
425
|
borderWidth: 1,
|
|
426
|
-
borderColor:
|
|
426
|
+
borderColor: night.color.accentBorder,
|
|
427
427
|
padding: 12
|
|
428
428
|
},
|
|
429
429
|
actionBarContent: {
|
|
@@ -434,7 +434,7 @@ const styles = StyleSheet.create({
|
|
|
434
434
|
unsavedText: {
|
|
435
435
|
fontSize: 13,
|
|
436
436
|
fontWeight: "500",
|
|
437
|
-
color:
|
|
437
|
+
color: night.color.accent
|
|
438
438
|
},
|
|
439
439
|
actionButtons: {
|
|
440
440
|
flexDirection: "row",
|
|
@@ -444,7 +444,7 @@ const styles = StyleSheet.create({
|
|
|
444
444
|
flexDirection: "row",
|
|
445
445
|
alignItems: "center",
|
|
446
446
|
gap: 6,
|
|
447
|
-
backgroundColor:
|
|
447
|
+
backgroundColor: night.color.accent,
|
|
448
448
|
paddingHorizontal: 14,
|
|
449
449
|
paddingVertical: 8,
|
|
450
450
|
borderRadius: 6
|
|
@@ -452,23 +452,24 @@ const styles = StyleSheet.create({
|
|
|
452
452
|
saveButtonText: {
|
|
453
453
|
fontSize: 13,
|
|
454
454
|
fontWeight: "600",
|
|
455
|
-
|
|
455
|
+
// Ink on a filled accent surface — the night accent takes dark ink.
|
|
456
|
+
color: night.color.onAccent
|
|
456
457
|
},
|
|
457
458
|
discardButton: {
|
|
458
459
|
flexDirection: "row",
|
|
459
460
|
alignItems: "center",
|
|
460
461
|
gap: 6,
|
|
461
|
-
backgroundColor:
|
|
462
|
+
backgroundColor: night.color.surfaceElevated,
|
|
462
463
|
paddingHorizontal: 14,
|
|
463
464
|
paddingVertical: 8,
|
|
464
465
|
borderRadius: 6,
|
|
465
466
|
borderWidth: 1,
|
|
466
|
-
borderColor:
|
|
467
|
+
borderColor: night.color.border
|
|
467
468
|
},
|
|
468
469
|
discardButtonText: {
|
|
469
470
|
fontSize: 13,
|
|
470
471
|
fontWeight: "500",
|
|
471
|
-
color:
|
|
472
|
+
color: night.color.textSecondary
|
|
472
473
|
},
|
|
473
474
|
restoreButton: {
|
|
474
475
|
flexDirection: "row",
|
|
@@ -478,31 +479,31 @@ const styles = StyleSheet.create({
|
|
|
478
479
|
paddingVertical: 12,
|
|
479
480
|
borderRadius: 8,
|
|
480
481
|
borderWidth: 1,
|
|
481
|
-
borderColor:
|
|
482
|
+
borderColor: night.color.border,
|
|
482
483
|
borderStyle: "dashed"
|
|
483
484
|
},
|
|
484
485
|
restoreButtonText: {
|
|
485
486
|
fontSize: 13,
|
|
486
|
-
color:
|
|
487
|
+
color: night.color.textSecondary
|
|
487
488
|
},
|
|
488
489
|
sectionContent: {
|
|
489
490
|
paddingTop: 8
|
|
490
491
|
},
|
|
491
492
|
sectionDescription: {
|
|
492
493
|
fontSize: 13,
|
|
493
|
-
color:
|
|
494
|
+
color: night.color.textSecondary,
|
|
494
495
|
lineHeight: 18,
|
|
495
496
|
marginBottom: 14
|
|
496
497
|
},
|
|
497
498
|
togglesCard: {
|
|
498
|
-
backgroundColor:
|
|
499
|
+
backgroundColor: night.color.surface,
|
|
499
500
|
borderRadius: 10,
|
|
500
501
|
borderWidth: 1,
|
|
501
|
-
borderColor:
|
|
502
|
+
borderColor: night.color.border,
|
|
502
503
|
padding: 4
|
|
503
504
|
},
|
|
504
505
|
dangerousCard: {
|
|
505
|
-
borderColor:
|
|
506
|
+
borderColor: night.color.warning + "30"
|
|
506
507
|
},
|
|
507
508
|
advancedSection: {
|
|
508
509
|
marginTop: 16
|
|
@@ -510,7 +511,7 @@ const styles = StyleSheet.create({
|
|
|
510
511
|
advancedLabel: {
|
|
511
512
|
fontSize: 11,
|
|
512
513
|
fontWeight: "600",
|
|
513
|
-
color:
|
|
514
|
+
color: night.color.textTertiary,
|
|
514
515
|
textTransform: "uppercase",
|
|
515
516
|
letterSpacing: 0.5,
|
|
516
517
|
marginBottom: 8,
|
|
@@ -519,18 +520,18 @@ const styles = StyleSheet.create({
|
|
|
519
520
|
inputLabel: {
|
|
520
521
|
fontSize: 12,
|
|
521
522
|
fontWeight: "600",
|
|
522
|
-
color:
|
|
523
|
+
color: night.color.textSecondary,
|
|
523
524
|
marginBottom: 8
|
|
524
525
|
},
|
|
525
526
|
input: {
|
|
526
527
|
height: 42,
|
|
527
|
-
backgroundColor:
|
|
528
|
+
backgroundColor: night.color.surfaceElevated,
|
|
528
529
|
borderRadius: 8,
|
|
529
530
|
borderWidth: 1,
|
|
530
|
-
borderColor:
|
|
531
|
+
borderColor: night.color.border,
|
|
531
532
|
paddingHorizontal: 14,
|
|
532
533
|
fontSize: 14,
|
|
533
|
-
color:
|
|
534
|
+
color: night.color.text,
|
|
534
535
|
fontFamily: "monospace"
|
|
535
536
|
},
|
|
536
537
|
inputFooter: {
|
|
@@ -543,7 +544,7 @@ const styles = StyleSheet.create({
|
|
|
543
544
|
helperText: {
|
|
544
545
|
flex: 1,
|
|
545
546
|
fontSize: 12,
|
|
546
|
-
color:
|
|
547
|
+
color: night.color.textTertiary,
|
|
547
548
|
lineHeight: 16
|
|
548
549
|
},
|
|
549
550
|
resetLink: {
|
|
@@ -551,7 +552,7 @@ const styles = StyleSheet.create({
|
|
|
551
552
|
},
|
|
552
553
|
resetLinkText: {
|
|
553
554
|
fontSize: 12,
|
|
554
|
-
color:
|
|
555
|
+
color: night.color.accent,
|
|
555
556
|
fontWeight: "500"
|
|
556
557
|
},
|
|
557
558
|
toggleRow: {
|
|
@@ -574,16 +575,16 @@ const styles = StyleSheet.create({
|
|
|
574
575
|
toggleLabel: {
|
|
575
576
|
fontSize: 14,
|
|
576
577
|
fontWeight: "500",
|
|
577
|
-
color:
|
|
578
|
+
color: night.color.text
|
|
578
579
|
},
|
|
579
580
|
dangerousLabel: {
|
|
580
|
-
color:
|
|
581
|
+
color: night.color.warning
|
|
581
582
|
},
|
|
582
583
|
recommendedBadge: {
|
|
583
584
|
flexDirection: "row",
|
|
584
585
|
alignItems: "center",
|
|
585
586
|
gap: 4,
|
|
586
|
-
backgroundColor:
|
|
587
|
+
backgroundColor: night.color.accentSoft,
|
|
587
588
|
paddingHorizontal: 8,
|
|
588
589
|
paddingVertical: 3,
|
|
589
590
|
borderRadius: 4
|
|
@@ -591,7 +592,7 @@ const styles = StyleSheet.create({
|
|
|
591
592
|
recommendedText: {
|
|
592
593
|
fontSize: 10,
|
|
593
594
|
fontWeight: "600",
|
|
594
|
-
color:
|
|
595
|
+
color: night.color.accent
|
|
595
596
|
},
|
|
596
597
|
detectedBadge: {
|
|
597
598
|
flexDirection: "row",
|
|
@@ -605,7 +606,7 @@ const styles = StyleSheet.create({
|
|
|
605
606
|
backgroundColor: buoyColors.success + "15"
|
|
606
607
|
},
|
|
607
608
|
detectedBadgeInactive: {
|
|
608
|
-
backgroundColor:
|
|
609
|
+
backgroundColor: night.color.textTertiary + "15"
|
|
609
610
|
},
|
|
610
611
|
detectedText: {
|
|
611
612
|
fontSize: 10,
|
|
@@ -615,16 +616,16 @@ const styles = StyleSheet.create({
|
|
|
615
616
|
color: buoyColors.success
|
|
616
617
|
},
|
|
617
618
|
detectedTextInactive: {
|
|
618
|
-
color:
|
|
619
|
+
color: night.color.textTertiary
|
|
619
620
|
},
|
|
620
621
|
toggleDescription: {
|
|
621
622
|
fontSize: 12,
|
|
622
|
-
color:
|
|
623
|
+
color: night.color.textTertiary,
|
|
623
624
|
lineHeight: 16
|
|
624
625
|
},
|
|
625
626
|
divider: {
|
|
626
627
|
height: 1,
|
|
627
|
-
backgroundColor:
|
|
628
|
+
backgroundColor: night.color.separator,
|
|
628
629
|
marginHorizontal: 12
|
|
629
630
|
},
|
|
630
631
|
warningCard: {
|
|
@@ -632,10 +633,10 @@ const styles = StyleSheet.create({
|
|
|
632
633
|
flexDirection: "row",
|
|
633
634
|
alignItems: "flex-start",
|
|
634
635
|
gap: 12,
|
|
635
|
-
backgroundColor:
|
|
636
|
+
backgroundColor: night.color.warningSoft,
|
|
636
637
|
borderRadius: 10,
|
|
637
638
|
borderWidth: 1,
|
|
638
|
-
borderColor:
|
|
639
|
+
borderColor: night.color.warning + "25",
|
|
639
640
|
padding: 14
|
|
640
641
|
},
|
|
641
642
|
warningContent: {
|
|
@@ -644,17 +645,17 @@ const styles = StyleSheet.create({
|
|
|
644
645
|
warningTitle: {
|
|
645
646
|
fontSize: 13,
|
|
646
647
|
fontWeight: "600",
|
|
647
|
-
color:
|
|
648
|
+
color: night.color.warning,
|
|
648
649
|
marginBottom: 4
|
|
649
650
|
},
|
|
650
651
|
warningText: {
|
|
651
652
|
fontSize: 12,
|
|
652
|
-
color:
|
|
653
|
+
color: night.color.textSecondary,
|
|
653
654
|
lineHeight: 17
|
|
654
655
|
},
|
|
655
656
|
infoText: {
|
|
656
657
|
fontSize: 13,
|
|
657
|
-
color:
|
|
658
|
+
color: night.color.textSecondary,
|
|
658
659
|
lineHeight: 19
|
|
659
660
|
},
|
|
660
661
|
infoTextSpaced: {
|
|
@@ -662,30 +663,31 @@ const styles = StyleSheet.create({
|
|
|
662
663
|
},
|
|
663
664
|
codeBlock: {
|
|
664
665
|
marginTop: 14,
|
|
665
|
-
|
|
666
|
+
// Inset code box — darker than the card, the night track color.
|
|
667
|
+
backgroundColor: night.color.bg,
|
|
666
668
|
borderRadius: 8,
|
|
667
669
|
padding: 14
|
|
668
670
|
},
|
|
669
671
|
codeComment: {
|
|
670
672
|
fontSize: 12,
|
|
671
|
-
color:
|
|
673
|
+
color: night.color.textTertiary,
|
|
672
674
|
fontFamily: "monospace",
|
|
673
675
|
marginBottom: 6
|
|
674
676
|
},
|
|
675
677
|
codeText: {
|
|
676
678
|
fontSize: 13,
|
|
677
|
-
color:
|
|
679
|
+
color: night.color.text,
|
|
678
680
|
fontFamily: "monospace"
|
|
679
681
|
},
|
|
680
682
|
codeValue: {
|
|
681
|
-
color:
|
|
683
|
+
color: night.color.accent
|
|
682
684
|
},
|
|
683
685
|
dataViewerContainer: {
|
|
684
686
|
marginTop: 12,
|
|
685
687
|
borderRadius: 8,
|
|
686
688
|
overflow: "hidden",
|
|
687
689
|
borderWidth: 1,
|
|
688
|
-
borderColor:
|
|
690
|
+
borderColor: night.color.border
|
|
689
691
|
},
|
|
690
692
|
copyButton: {
|
|
691
693
|
flexDirection: "row",
|
|
@@ -693,17 +695,17 @@ const styles = StyleSheet.create({
|
|
|
693
695
|
justifyContent: "center",
|
|
694
696
|
gap: 8,
|
|
695
697
|
marginTop: 14,
|
|
696
|
-
backgroundColor:
|
|
698
|
+
backgroundColor: night.color.accentSoft,
|
|
697
699
|
paddingVertical: 10,
|
|
698
700
|
paddingHorizontal: 16,
|
|
699
701
|
borderRadius: 8,
|
|
700
702
|
borderWidth: 1,
|
|
701
|
-
borderColor:
|
|
703
|
+
borderColor: night.color.accentBorder
|
|
702
704
|
},
|
|
703
705
|
copyButtonText: {
|
|
704
706
|
fontSize: 13,
|
|
705
707
|
fontWeight: "600",
|
|
706
|
-
color:
|
|
708
|
+
color: night.color.accent
|
|
707
709
|
},
|
|
708
710
|
copySuccessText: {
|
|
709
711
|
color: buoyColors.success
|