@buoy-gg/network 7.0.25 → 7.0.27
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/network/components/NetworkDetailStepper.js +2 -1
- package/lib/commonjs/network/components/NetworkEventDetailView.js +74 -72
- package/lib/commonjs/network/components/NetworkEventItemCompact.js +24 -20
- package/lib/commonjs/network/components/NetworkEventItemCompact.web.js +24 -6
- package/lib/commonjs/network/components/NetworkFilterViewV3.js +12 -12
- package/lib/commonjs/network/components/NetworkHeaderLive.js +25 -29
- package/lib/commonjs/network/components/NetworkHeaderLive.web.js +24 -6
- package/lib/commonjs/network/components/NetworkHeaderMenu.js +10 -9
- package/lib/commonjs/network/components/NetworkListScreen.js +2 -1
- package/lib/commonjs/network/components/NetworkListScreen.web.js +24 -6
- package/lib/commonjs/network/components/NetworkModal.js +45 -31
- package/lib/commonjs/network/components/NetworkOverrideHeaderButton.js +10 -7
- package/lib/commonjs/network/components/NetworkOverridesButton.js +7 -7
- package/lib/commonjs/network/sync/networkSyncAdapter.js +36 -16
- package/lib/commonjs/network/utils/networkEventStore.js +26 -0
- package/lib/commonjs/network/utils/networkListener.js +173 -39
- package/lib/module/network/components/NetworkDetailStepper.js +2 -1
- package/lib/module/network/components/NetworkEventDetailView.js +75 -73
- package/lib/module/network/components/NetworkEventItemCompact.js +25 -21
- package/lib/module/network/components/NetworkEventItemCompact.web.js +24 -6
- package/lib/module/network/components/NetworkFilterViewV3.js +13 -13
- package/lib/module/network/components/NetworkHeaderLive.js +26 -30
- package/lib/module/network/components/NetworkHeaderLive.web.js +24 -6
- package/lib/module/network/components/NetworkHeaderMenu.js +11 -10
- package/lib/module/network/components/NetworkListScreen.js +3 -2
- package/lib/module/network/components/NetworkListScreen.web.js +24 -6
- package/lib/module/network/components/NetworkModal.js +46 -32
- package/lib/module/network/components/NetworkOverrideHeaderButton.js +11 -8
- package/lib/module/network/components/NetworkOverridesButton.js +8 -8
- package/lib/module/network/sync/networkSyncAdapter.js +37 -17
- package/lib/module/network/utils/networkEventStore.js +26 -0
- package/lib/module/network/utils/networkListener.js +171 -38
- package/lib/typescript/network/components/NetworkDetailStepper.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventDetailView.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkFilterViewV3.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkHeaderLive.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkListScreen.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkModal.d.ts.map +1 -1
- package/lib/typescript/network/sync/networkSyncAdapter.d.ts +1 -0
- package/lib/typescript/network/sync/networkSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkEventStore.d.ts +17 -0
- package/lib/typescript/network/utils/networkEventStore.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkListener.d.ts +61 -5
- package/lib/typescript/network/utils/networkListener.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect, useMemo, memo } from "react";
|
|
4
4
|
import { View, Text, StyleSheet, ScrollView, TouchableOpacity } from "react-native";
|
|
5
|
-
import { Clock, Upload, Download, AlertCircle, ChevronDown, ChevronUp, Lock, Unlock, FileJson, Filter, Globe, Link, Copy, FlaskConical, InlineCopyButton, macOSColors, useFeatureGate, UpgradeModal } from "@buoy-gg/shared-ui";
|
|
5
|
+
import { Clock, Upload, Download, AlertCircle, ChevronDown, ChevronUp, Lock, Unlock, FileJson, Filter, Globe, Link, Copy, FlaskConical, InlineCopyButton, macOSColors, night, useFeatureGate, UpgradeModal } from "@buoy-gg/shared-ui";
|
|
6
6
|
import { formatBytes, formatDuration, formatHttpStatus } from "../utils/formatting";
|
|
7
7
|
import { formatRelativeTime } from "@buoy-gg/shared-ui";
|
|
8
8
|
import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
|
|
@@ -15,7 +15,7 @@ import { useNetworkBodyResolver } from "../sync/networkBodyResolver";
|
|
|
15
15
|
* secure-vs-insecure is a genuine signal, as does the status pill.
|
|
16
16
|
*/
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
-
const NEUTRAL_ICON =
|
|
18
|
+
const NEUTRAL_ICON = night.color.accent;
|
|
19
19
|
|
|
20
20
|
/** Hoisted so the defaults don't mint a new Set/function per render. */
|
|
21
21
|
const EMPTY_PATTERNS = new Set();
|
|
@@ -124,10 +124,10 @@ const CollapsibleSection = ({
|
|
|
124
124
|
}) : null]
|
|
125
125
|
}), isOpen ? /*#__PURE__*/_jsx(ChevronUp, {
|
|
126
126
|
size: 16,
|
|
127
|
-
color:
|
|
127
|
+
color: night.color.textSecondary
|
|
128
128
|
}) : /*#__PURE__*/_jsx(ChevronDown, {
|
|
129
129
|
size: 16,
|
|
130
|
-
color:
|
|
130
|
+
color: night.color.textSecondary
|
|
131
131
|
})]
|
|
132
132
|
}), isOpen ? /*#__PURE__*/_jsx(View, {
|
|
133
133
|
style: styles.collapsibleContent,
|
|
@@ -232,7 +232,7 @@ const UrlBreakdown = ({
|
|
|
232
232
|
activeOpacity: 0.7,
|
|
233
233
|
children: /*#__PURE__*/_jsx(Copy, {
|
|
234
234
|
size: 14,
|
|
235
|
-
color:
|
|
235
|
+
color: night.color.textSecondary
|
|
236
236
|
})
|
|
237
237
|
})]
|
|
238
238
|
}), /*#__PURE__*/_jsx(View, {
|
|
@@ -259,10 +259,10 @@ const UrlBreakdown = ({
|
|
|
259
259
|
children: Object.keys(urlParts.params).length
|
|
260
260
|
}), showParams ? /*#__PURE__*/_jsx(ChevronUp, {
|
|
261
261
|
size: 14,
|
|
262
|
-
color:
|
|
262
|
+
color: night.color.textSecondary
|
|
263
263
|
}) : /*#__PURE__*/_jsx(ChevronDown, {
|
|
264
264
|
size: 14,
|
|
265
|
-
color:
|
|
265
|
+
color: night.color.textSecondary
|
|
266
266
|
})]
|
|
267
267
|
}), showParams ? /*#__PURE__*/_jsx(DataViewer, {
|
|
268
268
|
title: "",
|
|
@@ -437,7 +437,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
437
437
|
style: styles.pendingBadge,
|
|
438
438
|
children: [/*#__PURE__*/_jsx(Clock, {
|
|
439
439
|
size: 10,
|
|
440
|
-
color:
|
|
440
|
+
color: night.color.warning
|
|
441
441
|
}), /*#__PURE__*/_jsx(Text, {
|
|
442
442
|
style: styles.pendingBadgeText,
|
|
443
443
|
children: "Pending"
|
|
@@ -446,7 +446,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
446
446
|
style: styles.httpDuration,
|
|
447
447
|
children: [/*#__PURE__*/_jsx(Clock, {
|
|
448
448
|
size: 10,
|
|
449
|
-
color:
|
|
449
|
+
color: night.color.textTertiary
|
|
450
450
|
}), /*#__PURE__*/_jsx(Text, {
|
|
451
451
|
style: styles.httpDurationText,
|
|
452
452
|
children: formatDuration(event.duration)
|
|
@@ -455,7 +455,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
455
455
|
style: styles.overrideBadge,
|
|
456
456
|
children: [/*#__PURE__*/_jsx(FlaskConical, {
|
|
457
457
|
size: 10,
|
|
458
|
-
color:
|
|
458
|
+
color: night.color.warning
|
|
459
459
|
}), /*#__PURE__*/_jsx(Text, {
|
|
460
460
|
style: styles.overrideBadgeText,
|
|
461
461
|
children: event.override.ruleName || "Overridden"
|
|
@@ -476,7 +476,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
476
476
|
activeOpacity: 0.7,
|
|
477
477
|
children: /*#__PURE__*/_jsx(Copy, {
|
|
478
478
|
size: 14,
|
|
479
|
-
color:
|
|
479
|
+
color: night.color.textSecondary
|
|
480
480
|
})
|
|
481
481
|
})]
|
|
482
482
|
}), /*#__PURE__*/_jsx(UrlBreakdown, {
|
|
@@ -491,7 +491,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
491
491
|
style: styles.errorBox,
|
|
492
492
|
children: [/*#__PURE__*/_jsx(AlertCircle, {
|
|
493
493
|
size: 12,
|
|
494
|
-
color:
|
|
494
|
+
color: night.color.danger
|
|
495
495
|
}), /*#__PURE__*/_jsx(Text, {
|
|
496
496
|
style: styles.errorText,
|
|
497
497
|
children: event.error
|
|
@@ -503,7 +503,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
503
503
|
style: styles.timingRow,
|
|
504
504
|
children: [/*#__PURE__*/_jsx(Clock, {
|
|
505
505
|
size: 12,
|
|
506
|
-
color:
|
|
506
|
+
color: night.color.textSecondary
|
|
507
507
|
}), /*#__PURE__*/_jsx(Text, {
|
|
508
508
|
style: styles.timingLabel,
|
|
509
509
|
children: "Started:"
|
|
@@ -519,7 +519,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
519
519
|
style: styles.sizeItem,
|
|
520
520
|
children: [/*#__PURE__*/_jsx(Upload, {
|
|
521
521
|
size: 10,
|
|
522
|
-
color:
|
|
522
|
+
color: night.color.info
|
|
523
523
|
}), /*#__PURE__*/_jsx(Text, {
|
|
524
524
|
style: styles.sizeLabel,
|
|
525
525
|
children: "Sent:"
|
|
@@ -553,7 +553,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
553
553
|
title: "Request Headers",
|
|
554
554
|
icon: /*#__PURE__*/_jsx(Upload, {
|
|
555
555
|
size: 14,
|
|
556
|
-
color:
|
|
556
|
+
color: night.color.info
|
|
557
557
|
}),
|
|
558
558
|
defaultOpen: false,
|
|
559
559
|
count: Object.keys(requestHeaders).length,
|
|
@@ -597,7 +597,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
597
597
|
title: "Request Body",
|
|
598
598
|
icon: /*#__PURE__*/_jsx(FileJson, {
|
|
599
599
|
size: 14,
|
|
600
|
-
color:
|
|
600
|
+
color: night.color.accent
|
|
601
601
|
}),
|
|
602
602
|
defaultOpen: false,
|
|
603
603
|
children: /*#__PURE__*/_jsx(View, {
|
|
@@ -615,7 +615,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
615
615
|
title: "Request Body",
|
|
616
616
|
icon: /*#__PURE__*/_jsx(FileJson, {
|
|
617
617
|
size: 14,
|
|
618
|
-
color:
|
|
618
|
+
color: night.color.accent
|
|
619
619
|
}),
|
|
620
620
|
defaultOpen: true,
|
|
621
621
|
children: /*#__PURE__*/_jsx(Text, {
|
|
@@ -658,7 +658,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
658
658
|
title: "Filter Options",
|
|
659
659
|
icon: /*#__PURE__*/_jsx(Filter, {
|
|
660
660
|
size: 14,
|
|
661
|
-
color:
|
|
661
|
+
color: night.color.warning
|
|
662
662
|
}),
|
|
663
663
|
defaultOpen: false,
|
|
664
664
|
children: /*#__PURE__*/_jsx(View, {
|
|
@@ -683,7 +683,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
683
683
|
style: styles.filterOptionLeft,
|
|
684
684
|
children: [/*#__PURE__*/_jsx(Globe, {
|
|
685
685
|
size: 16,
|
|
686
|
-
color: isDomainIgnored ?
|
|
686
|
+
color: isDomainIgnored ? night.color.warning : night.color.textTertiary
|
|
687
687
|
}), /*#__PURE__*/_jsxs(View, {
|
|
688
688
|
style: styles.filterOptionContent,
|
|
689
689
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
@@ -708,7 +708,7 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
708
708
|
style: styles.filterOptionLeft,
|
|
709
709
|
children: [/*#__PURE__*/_jsx(Link, {
|
|
710
710
|
size: 16,
|
|
711
|
-
color: isUrlIgnored ?
|
|
711
|
+
color: isUrlIgnored ? night.color.warning : night.color.textTertiary
|
|
712
712
|
}), /*#__PURE__*/_jsxs(View, {
|
|
713
713
|
style: styles.filterOptionContent,
|
|
714
714
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
@@ -750,16 +750,17 @@ ${JSON.stringify(requestDetails.responseData, null, 2)}
|
|
|
750
750
|
const styles = StyleSheet.create({
|
|
751
751
|
container: {
|
|
752
752
|
flex: 1,
|
|
753
|
-
|
|
753
|
+
// Transparent so the night sheet's star field shows through.
|
|
754
|
+
backgroundColor: "transparent"
|
|
754
755
|
},
|
|
755
756
|
// Request details section - always visible
|
|
756
757
|
requestDetailsSection: {
|
|
757
758
|
marginHorizontal: 12,
|
|
758
759
|
marginTop: 12,
|
|
759
|
-
backgroundColor:
|
|
760
|
+
backgroundColor: night.color.surface,
|
|
760
761
|
borderRadius: 8,
|
|
761
762
|
borderWidth: 1,
|
|
762
|
-
borderColor:
|
|
763
|
+
borderColor: night.color.border,
|
|
763
764
|
padding: 12
|
|
764
765
|
},
|
|
765
766
|
httpHeader: {
|
|
@@ -770,13 +771,13 @@ const styles = StyleSheet.create({
|
|
|
770
771
|
flexWrap: "nowrap"
|
|
771
772
|
},
|
|
772
773
|
httpMethodBadge: {
|
|
773
|
-
backgroundColor:
|
|
774
|
+
backgroundColor: night.color.infoSoft,
|
|
774
775
|
paddingHorizontal: 8,
|
|
775
776
|
paddingVertical: 4,
|
|
776
777
|
borderRadius: 4
|
|
777
778
|
},
|
|
778
779
|
httpMethod: {
|
|
779
|
-
color:
|
|
780
|
+
color: night.color.info,
|
|
780
781
|
fontSize: 11,
|
|
781
782
|
fontWeight: "700",
|
|
782
783
|
letterSpacing: 0.5
|
|
@@ -794,13 +795,13 @@ const styles = StyleSheet.create({
|
|
|
794
795
|
flexDirection: "row",
|
|
795
796
|
alignItems: "center",
|
|
796
797
|
gap: 4,
|
|
797
|
-
backgroundColor:
|
|
798
|
+
backgroundColor: night.color.warningSoft,
|
|
798
799
|
paddingHorizontal: 8,
|
|
799
800
|
paddingVertical: 4,
|
|
800
801
|
borderRadius: 4
|
|
801
802
|
},
|
|
802
803
|
pendingBadgeText: {
|
|
803
|
-
color:
|
|
804
|
+
color: night.color.warning,
|
|
804
805
|
fontSize: 11,
|
|
805
806
|
fontWeight: "600"
|
|
806
807
|
},
|
|
@@ -810,7 +811,7 @@ const styles = StyleSheet.create({
|
|
|
810
811
|
gap: 4
|
|
811
812
|
},
|
|
812
813
|
httpDurationText: {
|
|
813
|
-
color:
|
|
814
|
+
color: night.color.textSecondary,
|
|
814
815
|
fontSize: 11
|
|
815
816
|
},
|
|
816
817
|
overrideBadge: {
|
|
@@ -820,10 +821,10 @@ const styles = StyleSheet.create({
|
|
|
820
821
|
paddingHorizontal: 6,
|
|
821
822
|
paddingVertical: 3,
|
|
822
823
|
borderRadius: 4,
|
|
823
|
-
backgroundColor:
|
|
824
|
+
backgroundColor: night.color.warningSoft
|
|
824
825
|
},
|
|
825
826
|
overrideBadgeText: {
|
|
826
|
-
color:
|
|
827
|
+
color: night.color.warning,
|
|
827
828
|
fontSize: 10,
|
|
828
829
|
fontWeight: "700"
|
|
829
830
|
},
|
|
@@ -834,7 +835,8 @@ const styles = StyleSheet.create({
|
|
|
834
835
|
},
|
|
835
836
|
// URL breakdown styles
|
|
836
837
|
urlBreakdown: {
|
|
837
|
-
|
|
838
|
+
// Inset code box — darker than the card, the night track color.
|
|
839
|
+
backgroundColor: night.color.bg,
|
|
838
840
|
borderRadius: 4,
|
|
839
841
|
padding: 8
|
|
840
842
|
},
|
|
@@ -845,13 +847,13 @@ const styles = StyleSheet.create({
|
|
|
845
847
|
marginBottom: 4
|
|
846
848
|
},
|
|
847
849
|
urlDomain: {
|
|
848
|
-
color:
|
|
850
|
+
color: night.color.text,
|
|
849
851
|
fontSize: 12,
|
|
850
852
|
fontWeight: "600",
|
|
851
853
|
flex: 1
|
|
852
854
|
},
|
|
853
855
|
urlProtocol: {
|
|
854
|
-
color:
|
|
856
|
+
color: night.color.textTertiary,
|
|
855
857
|
fontSize: 10
|
|
856
858
|
},
|
|
857
859
|
copyButton: {
|
|
@@ -861,12 +863,12 @@ const styles = StyleSheet.create({
|
|
|
861
863
|
paddingLeft: 18
|
|
862
864
|
},
|
|
863
865
|
urlPath: {
|
|
864
|
-
color:
|
|
866
|
+
color: night.color.textSecondary,
|
|
865
867
|
fontSize: 11,
|
|
866
868
|
fontFamily: "monospace"
|
|
867
869
|
},
|
|
868
870
|
urlQueryString: {
|
|
869
|
-
color:
|
|
871
|
+
color: night.color.info,
|
|
870
872
|
fontSize: 11,
|
|
871
873
|
fontFamily: "monospace"
|
|
872
874
|
},
|
|
@@ -880,15 +882,15 @@ const styles = StyleSheet.create({
|
|
|
880
882
|
justifyContent: "space-between",
|
|
881
883
|
paddingHorizontal: 12,
|
|
882
884
|
paddingVertical: 10,
|
|
883
|
-
backgroundColor:
|
|
885
|
+
backgroundColor: night.color.surfaceElevated,
|
|
884
886
|
borderRadius: 8,
|
|
885
887
|
borderWidth: 1,
|
|
886
|
-
borderColor:
|
|
888
|
+
borderColor: night.color.border,
|
|
887
889
|
marginBottom: 8
|
|
888
890
|
},
|
|
889
891
|
queryParamsToggleText: {
|
|
890
892
|
flexGrow: 0,
|
|
891
|
-
color:
|
|
893
|
+
color: night.color.text,
|
|
892
894
|
fontSize: 12,
|
|
893
895
|
fontWeight: "600",
|
|
894
896
|
letterSpacing: 0.3
|
|
@@ -897,10 +899,10 @@ const styles = StyleSheet.create({
|
|
|
897
899
|
timingSection: {
|
|
898
900
|
marginHorizontal: 12,
|
|
899
901
|
marginTop: 8,
|
|
900
|
-
backgroundColor:
|
|
902
|
+
backgroundColor: night.color.surface,
|
|
901
903
|
borderRadius: 8,
|
|
902
904
|
borderWidth: 1,
|
|
903
|
-
borderColor:
|
|
905
|
+
borderColor: night.color.border,
|
|
904
906
|
padding: 12
|
|
905
907
|
},
|
|
906
908
|
timingRow: {
|
|
@@ -912,16 +914,16 @@ const styles = StyleSheet.create({
|
|
|
912
914
|
flexWrap: "wrap"
|
|
913
915
|
},
|
|
914
916
|
timingLabel: {
|
|
915
|
-
color:
|
|
917
|
+
color: night.color.textSecondary,
|
|
916
918
|
fontSize: 11
|
|
917
919
|
},
|
|
918
920
|
timingValue: {
|
|
919
|
-
color:
|
|
921
|
+
color: night.color.text,
|
|
920
922
|
fontSize: 11,
|
|
921
923
|
fontWeight: "600"
|
|
922
924
|
},
|
|
923
925
|
timingExact: {
|
|
924
|
-
color:
|
|
926
|
+
color: night.color.textTertiary,
|
|
925
927
|
fontSize: 10,
|
|
926
928
|
marginLeft: 4
|
|
927
929
|
},
|
|
@@ -939,11 +941,11 @@ const styles = StyleSheet.create({
|
|
|
939
941
|
gap: 4
|
|
940
942
|
},
|
|
941
943
|
sizeLabel: {
|
|
942
|
-
color:
|
|
944
|
+
color: night.color.textTertiary,
|
|
943
945
|
fontSize: 10
|
|
944
946
|
},
|
|
945
947
|
sizeValue: {
|
|
946
|
-
color:
|
|
948
|
+
color: night.color.info,
|
|
947
949
|
fontSize: 10,
|
|
948
950
|
fontFamily: "monospace",
|
|
949
951
|
fontWeight: "600"
|
|
@@ -951,7 +953,7 @@ const styles = StyleSheet.create({
|
|
|
951
953
|
/* ---- Timing phases ---- */
|
|
952
954
|
phaseDivider: {
|
|
953
955
|
height: 1,
|
|
954
|
-
backgroundColor:
|
|
956
|
+
backgroundColor: night.color.border,
|
|
955
957
|
marginTop: 12,
|
|
956
958
|
marginBottom: 12
|
|
957
959
|
},
|
|
@@ -968,17 +970,17 @@ const styles = StyleSheet.create({
|
|
|
968
970
|
},
|
|
969
971
|
phaseLabel: {
|
|
970
972
|
fontSize: 12,
|
|
971
|
-
color:
|
|
973
|
+
color: night.color.textSecondary
|
|
972
974
|
},
|
|
973
975
|
phaseHint: {
|
|
974
976
|
fontSize: 10,
|
|
975
|
-
color:
|
|
977
|
+
color: night.color.textTertiary
|
|
976
978
|
},
|
|
977
979
|
phaseTrack: {
|
|
978
980
|
flex: 1,
|
|
979
981
|
height: 7,
|
|
980
982
|
borderRadius: 4,
|
|
981
|
-
backgroundColor:
|
|
983
|
+
backgroundColor: night.color.surfaceElevated,
|
|
982
984
|
justifyContent: "center",
|
|
983
985
|
overflow: "hidden"
|
|
984
986
|
},
|
|
@@ -991,16 +993,16 @@ const styles = StyleSheet.create({
|
|
|
991
993
|
textAlign: "right",
|
|
992
994
|
fontSize: 12,
|
|
993
995
|
fontFamily: "monospace",
|
|
994
|
-
color:
|
|
996
|
+
color: night.color.text
|
|
995
997
|
},
|
|
996
998
|
// Collapsible section styles
|
|
997
999
|
collapsibleSection: {
|
|
998
1000
|
marginHorizontal: 12,
|
|
999
1001
|
marginTop: 8,
|
|
1000
|
-
backgroundColor:
|
|
1002
|
+
backgroundColor: night.color.surface,
|
|
1001
1003
|
borderRadius: 8,
|
|
1002
1004
|
borderWidth: 1,
|
|
1003
|
-
borderColor:
|
|
1005
|
+
borderColor: night.color.border,
|
|
1004
1006
|
overflow: "hidden"
|
|
1005
1007
|
},
|
|
1006
1008
|
collapsibleHeader: {
|
|
@@ -1010,7 +1012,7 @@ const styles = StyleSheet.create({
|
|
|
1010
1012
|
padding: 12,
|
|
1011
1013
|
// `background.hover` is the SELECTION grey — heavy enough here that every
|
|
1012
1014
|
// section header read as a toolbar. The design uses a near-white strip.
|
|
1013
|
-
backgroundColor:
|
|
1015
|
+
backgroundColor: night.color.surfaceElevated
|
|
1014
1016
|
},
|
|
1015
1017
|
collapsibleTitle: {
|
|
1016
1018
|
flexDirection: "row",
|
|
@@ -1018,13 +1020,13 @@ const styles = StyleSheet.create({
|
|
|
1018
1020
|
gap: 8
|
|
1019
1021
|
},
|
|
1020
1022
|
collapsibleTitleText: {
|
|
1021
|
-
color:
|
|
1023
|
+
color: night.color.text,
|
|
1022
1024
|
fontSize: 13,
|
|
1023
1025
|
fontWeight: "600"
|
|
1024
1026
|
},
|
|
1025
1027
|
/** The "how much is in here" number beside a section title. */
|
|
1026
1028
|
collapsibleCount: {
|
|
1027
|
-
color:
|
|
1029
|
+
color: night.color.textTertiary,
|
|
1028
1030
|
fontSize: 11.5,
|
|
1029
1031
|
fontFamily: "monospace"
|
|
1030
1032
|
},
|
|
@@ -1046,19 +1048,19 @@ const styles = StyleSheet.create({
|
|
|
1046
1048
|
flexDirection: "row",
|
|
1047
1049
|
alignItems: "center",
|
|
1048
1050
|
gap: 6,
|
|
1049
|
-
backgroundColor:
|
|
1051
|
+
backgroundColor: night.color.dangerSoft,
|
|
1050
1052
|
padding: 8,
|
|
1051
1053
|
borderRadius: 4,
|
|
1052
1054
|
marginTop: 8
|
|
1053
1055
|
},
|
|
1054
1056
|
errorText: {
|
|
1055
|
-
color:
|
|
1057
|
+
color: night.color.danger,
|
|
1056
1058
|
fontSize: 11,
|
|
1057
1059
|
flex: 1
|
|
1058
1060
|
},
|
|
1059
1061
|
// Empty state
|
|
1060
1062
|
emptyText: {
|
|
1061
|
-
color:
|
|
1063
|
+
color: night.color.textTertiary,
|
|
1062
1064
|
fontSize: 12,
|
|
1063
1065
|
fontStyle: "italic",
|
|
1064
1066
|
textAlign: "center"
|
|
@@ -1071,15 +1073,15 @@ const styles = StyleSheet.create({
|
|
|
1071
1073
|
flexDirection: "row",
|
|
1072
1074
|
alignItems: "center",
|
|
1073
1075
|
justifyContent: "space-between",
|
|
1074
|
-
backgroundColor:
|
|
1076
|
+
backgroundColor: night.color.surfaceElevated,
|
|
1075
1077
|
borderRadius: 8,
|
|
1076
1078
|
padding: 12,
|
|
1077
1079
|
borderWidth: 1,
|
|
1078
|
-
borderColor:
|
|
1080
|
+
borderColor: night.color.border
|
|
1079
1081
|
},
|
|
1080
1082
|
filterOptionActive: {
|
|
1081
|
-
backgroundColor:
|
|
1082
|
-
borderColor:
|
|
1083
|
+
backgroundColor: night.color.warningSoft,
|
|
1084
|
+
borderColor: night.color.warning + "33"
|
|
1083
1085
|
},
|
|
1084
1086
|
filterOptionLeft: {
|
|
1085
1087
|
flexDirection: "row",
|
|
@@ -1091,14 +1093,14 @@ const styles = StyleSheet.create({
|
|
|
1091
1093
|
flex: 1
|
|
1092
1094
|
},
|
|
1093
1095
|
filterOptionLabel: {
|
|
1094
|
-
color:
|
|
1096
|
+
color: night.color.textSecondary,
|
|
1095
1097
|
fontSize: 11,
|
|
1096
1098
|
marginBottom: 2,
|
|
1097
1099
|
textTransform: "uppercase",
|
|
1098
1100
|
letterSpacing: 0.5
|
|
1099
1101
|
},
|
|
1100
1102
|
filterOptionValue: {
|
|
1101
|
-
color:
|
|
1103
|
+
color: night.color.text,
|
|
1102
1104
|
fontSize: 13,
|
|
1103
1105
|
fontFamily: "monospace"
|
|
1104
1106
|
},
|
|
@@ -1106,32 +1108,32 @@ const styles = StyleSheet.create({
|
|
|
1106
1108
|
paddingHorizontal: 10,
|
|
1107
1109
|
paddingVertical: 6,
|
|
1108
1110
|
borderRadius: 4,
|
|
1109
|
-
backgroundColor:
|
|
1111
|
+
backgroundColor: night.color.bg,
|
|
1110
1112
|
borderWidth: 1,
|
|
1111
|
-
borderColor:
|
|
1113
|
+
borderColor: night.color.border
|
|
1112
1114
|
},
|
|
1113
1115
|
filterToggleActive: {
|
|
1114
|
-
backgroundColor:
|
|
1115
|
-
borderColor:
|
|
1116
|
+
backgroundColor: night.color.warningSoft,
|
|
1117
|
+
borderColor: night.color.warning + "4D"
|
|
1116
1118
|
},
|
|
1117
1119
|
filterToggleText: {
|
|
1118
1120
|
fontSize: 10,
|
|
1119
1121
|
fontWeight: "600",
|
|
1120
|
-
color:
|
|
1122
|
+
color: night.color.textTertiary,
|
|
1121
1123
|
letterSpacing: 0.5
|
|
1122
1124
|
},
|
|
1123
1125
|
filterToggleTextActive: {
|
|
1124
|
-
color:
|
|
1126
|
+
color: night.color.warning
|
|
1125
1127
|
},
|
|
1126
1128
|
filterInfoBox: {
|
|
1127
|
-
backgroundColor:
|
|
1129
|
+
backgroundColor: night.color.infoSoft,
|
|
1128
1130
|
borderRadius: 6,
|
|
1129
1131
|
padding: 10,
|
|
1130
1132
|
borderWidth: 1,
|
|
1131
|
-
borderColor:
|
|
1133
|
+
borderColor: night.color.info + "33"
|
|
1132
1134
|
},
|
|
1133
1135
|
filterInfoText: {
|
|
1134
|
-
color:
|
|
1136
|
+
color: night.color.textSecondary,
|
|
1135
1137
|
fontSize: 11,
|
|
1136
1138
|
lineHeight: 16
|
|
1137
1139
|
}
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import { StyleSheet, View, Text } from "react-native";
|
|
5
|
-
import { ChevronRight, Upload, Download, Clock, AlertCircle, Bookmark, FlaskConical, Pin, DevToolsCard, MethodBadge, TypeBadge, macOSColors } from "@buoy-gg/shared-ui";
|
|
5
|
+
import { ChevronRight, Upload, Download, Clock, AlertCircle, Bookmark, FlaskConical, Pin, DevToolsCard, MethodBadge, TypeBadge, night, macOSColors } from "@buoy-gg/shared-ui";
|
|
6
6
|
import { formatBytes, formatDuration } from "../utils/formatting";
|
|
7
7
|
import { formatRelativeTime } from "@buoy-gg/shared-ui";
|
|
8
8
|
import { useTickEveryMinute } from "../hooks/useTickEveryMinute";
|
|
9
9
|
import { formatGraphQLDisplay } from "../utils/formatGraphQLVariables";
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
// Get color based on status
|
|
11
|
+
// Get color based on status. Deliberately kept on the macOS semantic palette
|
|
12
|
+
// (not the night tones) — the classic status colors read well on the night
|
|
13
|
+
// rows and stay consistent with the status colors used elsewhere.
|
|
12
14
|
function getStatusColor(status, error) {
|
|
13
15
|
if (error) return macOSColors.semantic.error;
|
|
14
16
|
if (!status) return macOSColors.semantic.warning;
|
|
@@ -78,7 +80,7 @@ function StatusIndicator({
|
|
|
78
80
|
style: styles.pendingBadge,
|
|
79
81
|
children: [/*#__PURE__*/_jsx(Clock, {
|
|
80
82
|
size: 10,
|
|
81
|
-
color:
|
|
83
|
+
color: night.color.warning
|
|
82
84
|
}), /*#__PURE__*/_jsx(Text, {
|
|
83
85
|
style: styles.pendingText,
|
|
84
86
|
children: "..."
|
|
@@ -90,7 +92,7 @@ function StatusIndicator({
|
|
|
90
92
|
style: styles.errorBadge,
|
|
91
93
|
children: [/*#__PURE__*/_jsx(AlertCircle, {
|
|
92
94
|
size: 10,
|
|
93
|
-
color:
|
|
95
|
+
color: night.color.danger
|
|
94
96
|
}), /*#__PURE__*/_jsx(Text, {
|
|
95
97
|
style: styles.errorText,
|
|
96
98
|
children: "ERR"
|
|
@@ -120,7 +122,7 @@ function SizeIndicators({
|
|
|
120
122
|
style: styles.sizeItem,
|
|
121
123
|
children: [/*#__PURE__*/_jsx(Upload, {
|
|
122
124
|
size: 8,
|
|
123
|
-
color:
|
|
125
|
+
color: night.color.info
|
|
124
126
|
}), /*#__PURE__*/_jsx(Text, {
|
|
125
127
|
style: styles.sizeText,
|
|
126
128
|
children: formatBytes(requestSize)
|
|
@@ -129,7 +131,7 @@ function SizeIndicators({
|
|
|
129
131
|
style: styles.sizeItem,
|
|
130
132
|
children: [/*#__PURE__*/_jsx(Download, {
|
|
131
133
|
size: 8,
|
|
132
|
-
color:
|
|
134
|
+
color: night.color.accent
|
|
133
135
|
}), /*#__PURE__*/_jsx(Text, {
|
|
134
136
|
style: styles.sizeText,
|
|
135
137
|
children: formatBytes(responseSize)
|
|
@@ -205,13 +207,14 @@ function NetworkEventItemCompact({
|
|
|
205
207
|
style: styles.topRightContainer,
|
|
206
208
|
children: [pinned ? /*#__PURE__*/_jsx(Pin, {
|
|
207
209
|
size: 10,
|
|
208
|
-
|
|
210
|
+
active: true,
|
|
211
|
+
color: night.color.info
|
|
209
212
|
}) : null, saved ? /*#__PURE__*/_jsx(Bookmark, {
|
|
210
213
|
size: 10,
|
|
211
|
-
color:
|
|
214
|
+
color: night.color.accent
|
|
212
215
|
}) : null, overridden || event.override ? /*#__PURE__*/_jsx(FlaskConical, {
|
|
213
216
|
size: 10,
|
|
214
|
-
color:
|
|
217
|
+
color: night.color.warning
|
|
215
218
|
}) : null, /*#__PURE__*/_jsx(StatusIndicator, {
|
|
216
219
|
event: event,
|
|
217
220
|
isPending: isPending,
|
|
@@ -250,7 +253,7 @@ function NetworkEventItemCompact({
|
|
|
250
253
|
size: "small"
|
|
251
254
|
}) : null, /*#__PURE__*/_jsx(ChevronRight, {
|
|
252
255
|
size: 14,
|
|
253
|
-
color:
|
|
256
|
+
color: night.color.textTertiary
|
|
254
257
|
})]
|
|
255
258
|
}), /*#__PURE__*/_jsx(View, {
|
|
256
259
|
style: styles.bottomRightContainer,
|
|
@@ -276,9 +279,10 @@ const styles = StyleSheet.create({
|
|
|
276
279
|
alignItems: "center",
|
|
277
280
|
// Translucent instead of DevToolsCard's opaque fill, so the tool background
|
|
278
281
|
// (see ToolBackground) reads THROUGH the list rather than only around it.
|
|
279
|
-
//
|
|
280
|
-
//
|
|
281
|
-
|
|
282
|
+
// Same luminance contract as the old rgba(10,13,20,0.9) scrim (backing
|
|
283
|
+
// stays ≤ ~45 under the catalogue's brightest scenes), re-based on the
|
|
284
|
+
// night surface `#0C0C0C` so rows match the night cards.
|
|
285
|
+
backgroundColor: "rgba(12, 12, 12, 0.9)",
|
|
282
286
|
borderLeftWidth: 3,
|
|
283
287
|
borderLeftColor: "transparent",
|
|
284
288
|
// One hairline per row — the same value DevToolsCard's border uses.
|
|
@@ -308,7 +312,7 @@ const styles = StyleSheet.create({
|
|
|
308
312
|
},
|
|
309
313
|
urlText: {
|
|
310
314
|
fontSize: 12,
|
|
311
|
-
color:
|
|
315
|
+
color: night.color.text,
|
|
312
316
|
lineHeight: 16,
|
|
313
317
|
fontFamily: "monospace"
|
|
314
318
|
},
|
|
@@ -324,7 +328,7 @@ const styles = StyleSheet.create({
|
|
|
324
328
|
},
|
|
325
329
|
bottomRightText: {
|
|
326
330
|
fontSize: 9,
|
|
327
|
-
color:
|
|
331
|
+
color: night.color.textTertiary,
|
|
328
332
|
fontFamily: "monospace"
|
|
329
333
|
},
|
|
330
334
|
statusBadge: {
|
|
@@ -342,12 +346,12 @@ const styles = StyleSheet.create({
|
|
|
342
346
|
gap: 2,
|
|
343
347
|
paddingHorizontal: 4,
|
|
344
348
|
paddingVertical: 1,
|
|
345
|
-
backgroundColor:
|
|
349
|
+
backgroundColor: night.color.warningSoft,
|
|
346
350
|
borderRadius: 3
|
|
347
351
|
},
|
|
348
352
|
pendingText: {
|
|
349
353
|
fontSize: 10,
|
|
350
|
-
color:
|
|
354
|
+
color: night.color.warning,
|
|
351
355
|
fontWeight: "600"
|
|
352
356
|
},
|
|
353
357
|
errorBadge: {
|
|
@@ -356,17 +360,17 @@ const styles = StyleSheet.create({
|
|
|
356
360
|
gap: 2,
|
|
357
361
|
paddingHorizontal: 4,
|
|
358
362
|
paddingVertical: 1,
|
|
359
|
-
backgroundColor:
|
|
363
|
+
backgroundColor: night.color.dangerSoft,
|
|
360
364
|
borderRadius: 3
|
|
361
365
|
},
|
|
362
366
|
errorText: {
|
|
363
367
|
fontSize: 10,
|
|
364
|
-
color:
|
|
368
|
+
color: night.color.danger,
|
|
365
369
|
fontWeight: "600"
|
|
366
370
|
},
|
|
367
371
|
durationText: {
|
|
368
372
|
fontSize: 9,
|
|
369
|
-
color:
|
|
373
|
+
color: night.color.textSecondary
|
|
370
374
|
},
|
|
371
375
|
sizeRow: {
|
|
372
376
|
flexDirection: "row",
|
|
@@ -380,7 +384,7 @@ const styles = StyleSheet.create({
|
|
|
380
384
|
},
|
|
381
385
|
sizeText: {
|
|
382
386
|
fontSize: 8,
|
|
383
|
-
color:
|
|
387
|
+
color: night.color.textSecondary,
|
|
384
388
|
fontFamily: "monospace"
|
|
385
389
|
},
|
|
386
390
|
clientText: {
|