@buoy-gg/network 7.0.15 → 7.0.16
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/index.web.js +395 -0
- package/lib/commonjs/network/components/DataViewer.web.js +879 -0
- package/lib/commonjs/network/components/NetworkCopyScreen.web.js +48 -0
- package/lib/commonjs/network/components/NetworkCopySettingsView.web.js +1242 -0
- package/lib/commonjs/network/components/NetworkDetailScreen.web.js +101 -0
- package/lib/commonjs/network/components/NetworkDetailStepper.web.js +296 -0
- package/lib/commonjs/network/components/NetworkEventDetailView.web.js +1498 -0
- package/lib/commonjs/network/components/NetworkEventItemCompact.web.js +802 -0
- package/lib/commonjs/network/components/NetworkFilterScreen.web.js +55 -0
- package/lib/commonjs/network/components/NetworkFilterViewV3.web.js +1310 -0
- package/lib/commonjs/network/components/NetworkHeaderLive.web.js +604 -0
- package/lib/commonjs/network/components/NetworkListScreen.js +2 -1
- package/lib/commonjs/network/components/NetworkListScreen.web.js +607 -0
- package/lib/commonjs/network/components/NetworkModal.js +12 -3
- package/lib/commonjs/network/components/NetworkNumberPrompt.web.js +232 -0
- package/lib/commonjs/network/components/NetworkOverrideEditor.web.js +942 -0
- package/lib/commonjs/network/components/NetworkOverrideHeaderButton.web.js +133 -0
- package/lib/commonjs/network/components/NetworkOverridesButton.web.js +143 -0
- package/lib/commonjs/network/components/NetworkOverridesScreen.js +160 -126
- package/lib/commonjs/network/components/NetworkOverridesScreen.web.js +830 -0
- package/lib/commonjs/network/components/NetworkSavedScreen.web.js +459 -0
- package/lib/commonjs/network/components/response-editor/Explorer.web.js +1136 -0
- package/lib/commonjs/network/hooks/useNetworkEventList.js +12 -2
- package/lib/commonjs/network/overrides/applyToXhr.js +276 -15
- package/lib/commonjs/network/utils/generateNetworkCopyText.js +32 -5
- package/lib/commonjs/network/utils/networkEventStore.js +12 -4
- package/lib/commonjs/network/utils/networkListener.js +1 -16
- package/lib/module/index.web.js +81 -0
- package/lib/module/network/components/DataViewer.web.js +875 -0
- package/lib/module/network/components/NetworkCopyScreen.web.js +44 -0
- package/lib/module/network/components/NetworkCopySettingsView.web.js +1237 -0
- package/lib/module/network/components/NetworkDetailScreen.web.js +97 -0
- package/lib/module/network/components/NetworkDetailStepper.web.js +294 -0
- package/lib/module/network/components/NetworkEventDetailView.web.js +1496 -0
- package/lib/module/network/components/NetworkEventItemCompact.web.js +800 -0
- package/lib/module/network/components/NetworkFilterScreen.web.js +51 -0
- package/lib/module/network/components/NetworkFilterViewV3.web.js +1306 -0
- package/lib/module/network/components/NetworkHeaderLive.web.js +598 -0
- package/lib/module/network/components/NetworkListScreen.js +2 -1
- package/lib/module/network/components/NetworkListScreen.web.js +605 -0
- package/lib/module/network/components/NetworkModal.js +12 -3
- package/lib/module/network/components/NetworkNumberPrompt.web.js +230 -0
- package/lib/module/network/components/NetworkOverrideEditor.web.js +939 -0
- package/lib/module/network/components/NetworkOverrideHeaderButton.web.js +131 -0
- package/lib/module/network/components/NetworkOverridesButton.web.js +141 -0
- package/lib/module/network/components/NetworkOverridesScreen.js +161 -127
- package/lib/module/network/components/NetworkOverridesScreen.web.js +826 -0
- package/lib/module/network/components/NetworkSavedScreen.web.js +457 -0
- package/lib/module/network/components/response-editor/Explorer.web.js +1133 -0
- package/lib/module/network/hooks/useNetworkEventList.js +12 -2
- package/lib/module/network/overrides/applyToXhr.js +275 -15
- package/lib/module/network/utils/generateNetworkCopyText.js +28 -1
- package/lib/module/network/utils/networkEventStore.js +12 -4
- package/lib/module/network/utils/networkListener.js +1 -16
- package/lib/typescript/index.web.d.ts +56 -0
- package/lib/typescript/index.web.d.ts.map +1 -0
- package/lib/typescript/network/components/DataViewer.web.d.ts +78 -0
- package/lib/typescript/network/components/DataViewer.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkCopyScreen.web.d.ts +27 -0
- package/lib/typescript/network/components/NetworkCopyScreen.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkCopySettingsView.web.d.ts +68 -0
- package/lib/typescript/network/components/NetworkCopySettingsView.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkDetailScreen.web.d.ts +45 -0
- package/lib/typescript/network/components/NetworkDetailScreen.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkDetailStepper.web.d.ts +40 -0
- package/lib/typescript/network/components/NetworkDetailStepper.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkEventDetailView.web.d.ts +67 -0
- package/lib/typescript/network/components/NetworkEventDetailView.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts +58 -0
- package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkFilterScreen.web.d.ts +28 -0
- package/lib/typescript/network/components/NetworkFilterScreen.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkFilterViewV3.web.d.ts +74 -0
- package/lib/typescript/network/components/NetworkFilterViewV3.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts +112 -0
- package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkListScreen.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkListScreen.web.d.ts +63 -0
- package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkModal.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkNumberPrompt.web.d.ts +38 -0
- package/lib/typescript/network/components/NetworkNumberPrompt.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverrideEditor.web.d.ts +43 -0
- package/lib/typescript/network/components/NetworkOverrideEditor.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverrideHeaderButton.web.d.ts +32 -0
- package/lib/typescript/network/components/NetworkOverrideHeaderButton.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverridesButton.web.d.ts +26 -0
- package/lib/typescript/network/components/NetworkOverridesButton.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverridesScreen.d.ts +9 -0
- package/lib/typescript/network/components/NetworkOverridesScreen.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkOverridesScreen.web.d.ts +69 -0
- package/lib/typescript/network/components/NetworkOverridesScreen.web.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkSavedScreen.web.d.ts +67 -0
- package/lib/typescript/network/components/NetworkSavedScreen.web.d.ts.map +1 -0
- package/lib/typescript/network/components/response-editor/Explorer.web.d.ts +56 -0
- package/lib/typescript/network/components/response-editor/Explorer.web.d.ts.map +1 -0
- package/lib/typescript/network/hooks/useNetworkEventList.d.ts +10 -0
- package/lib/typescript/network/hooks/useNetworkEventList.d.ts.map +1 -1
- package/lib/typescript/network/overrides/__tests__/applyToXhr.test.d.ts.map +1 -1
- package/lib/typescript/network/overrides/applyToXhr.d.ts +40 -14
- package/lib/typescript/network/overrides/applyToXhr.d.ts.map +1 -1
- package/lib/typescript/network/utils/generateNetworkCopyText.d.ts +34 -1
- package/lib/typescript/network/utils/generateNetworkCopyText.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkEventStore.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkListener.d.ts +0 -1
- package/lib/typescript/network/utils/networkListener.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,1310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NetworkFilterViewV3 = NetworkFilterViewV3;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* NetworkFilterViewV3.web — DOM twin of NetworkFilterViewV3.tsx.
|
|
11
|
+
*
|
|
12
|
+
* Same props, same filter semantics, same screen inventory. Natively the
|
|
13
|
+
* screen is a thin config over shared-ui's `DynamicFilterView`; the web shim
|
|
14
|
+
* doesn't ship that component, so this twin renders the exact subtree
|
|
15
|
+
* DynamicFilterView produces FOR THIS CONFIG (no tabs, no filter-summary, no
|
|
16
|
+
* include-only, no preview — those config branches are disabled natively and
|
|
17
|
+
* are not ported):
|
|
18
|
+
*
|
|
19
|
+
* 1. Facet card sections — Status (All/Success/Error/Pending, icon + count),
|
|
20
|
+
* Method (colored method badge + count, no label — native's
|
|
21
|
+
* `showLabel = type !== "method"`), Content Type (icon + count + label).
|
|
22
|
+
* Same single-select method/content-type replace behavior
|
|
23
|
+
* (`handleDynamicFilterChange` is native's handler, verbatim).
|
|
24
|
+
* 2. ACTIVE FILTERS — add-pattern button → input (with the Match:
|
|
25
|
+
* Contains/Exact mode toggle rendered above it, native `renderExtra`),
|
|
26
|
+
* and the pattern list where each row removes on click and carries the
|
|
27
|
+
* CONTAINS/EXACT mode badge (native `renderPatternMeta`) that toggles the
|
|
28
|
+
* pattern's match mode.
|
|
29
|
+
* 3. AVAILABLE DOMAINS & URLS — host + origin+pathname suggestions from the
|
|
30
|
+
* visible events (30 per group), click-to-add with the currently selected
|
|
31
|
+
* mode; suggestions already covered by an active pattern are hidden
|
|
32
|
+
* (native's `item.includes(pattern)` filter).
|
|
33
|
+
* 4. HOW NETWORK FILTERS WORK — description + examples.
|
|
34
|
+
*
|
|
35
|
+
* shared-ui RN chrome replicated as DOM with provenance:
|
|
36
|
+
* - `buoyColors` — inlined verbatim subset from
|
|
37
|
+
* shared/src/ui/gameUI/constants/gameUIColors.ts (DynamicFilterView /
|
|
38
|
+
* SectionHeader / FilterComponents palette).
|
|
39
|
+
* - `macOSColors` — inlined verbatim subset from
|
|
40
|
+
* shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts (the mode
|
|
41
|
+
* toggle/badge palette the native screen uses directly).
|
|
42
|
+
* - Icons — inline lucide SVGs (shared-ui's icons are lucide re-exports).
|
|
43
|
+
* - Native card glow (`shadowColor` primary, opacity 0.3, radius 8) → an
|
|
44
|
+
* equivalent CSS box-shadow; native text shadows → CSS text-shadow.
|
|
45
|
+
*
|
|
46
|
+
* Intentional deviations (all logged):
|
|
47
|
+
* - Pattern rows nest a pressable mode badge inside a pressable row; RN's
|
|
48
|
+
* inner Touchable swallows the press, DOM needs `stopPropagation()` on the
|
|
49
|
+
* badge so toggling a mode doesn't also remove the pattern.
|
|
50
|
+
* - Native's `adjustsFontSizeToFit` on the method badge has no DOM
|
|
51
|
+
* equivalent — long method names ellipsize at the same max width instead.
|
|
52
|
+
* - The add-pattern input autofocuses via the `autoFocus` attribute rather
|
|
53
|
+
* than RN's imperative focus.
|
|
54
|
+
*
|
|
55
|
+
* @platform React DOM Web
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
// =============================
|
|
59
|
+
// Native palettes (provenance)
|
|
60
|
+
// =============================
|
|
61
|
+
|
|
62
|
+
/** buoyColors subset — shared/src/ui/gameUI/constants/gameUIColors.ts, verbatim. */
|
|
63
|
+
const buoyColors = {
|
|
64
|
+
base: "#121212",
|
|
65
|
+
card: "#1A1A1A",
|
|
66
|
+
hover: "#242424",
|
|
67
|
+
input: "#2A2A2A",
|
|
68
|
+
border: "#333333",
|
|
69
|
+
text: "#E0E0E0",
|
|
70
|
+
textSecondary: "#A0A0A0",
|
|
71
|
+
textMuted: "#888888",
|
|
72
|
+
primary: "#20C997"
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** macOSColors subset — shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts, verbatim. */
|
|
76
|
+
const macOSColors = {
|
|
77
|
+
background: {
|
|
78
|
+
hover: "#1D1D1F"
|
|
79
|
+
},
|
|
80
|
+
border: {
|
|
81
|
+
default: "#2D2D2F"
|
|
82
|
+
},
|
|
83
|
+
text: {
|
|
84
|
+
secondary: "#A1A1A6",
|
|
85
|
+
muted: "#8E8E93"
|
|
86
|
+
},
|
|
87
|
+
semantic: {
|
|
88
|
+
success: "#34C759",
|
|
89
|
+
error: "#FF453A",
|
|
90
|
+
warning: "#FFEB3B",
|
|
91
|
+
info: "#00B8E6",
|
|
92
|
+
debug: "#BF5AF2"
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// =============================
|
|
97
|
+
// Inline lucide icons (shared-ui icons are lucide re-exports)
|
|
98
|
+
// =============================
|
|
99
|
+
|
|
100
|
+
function Svg({
|
|
101
|
+
size = 14,
|
|
102
|
+
color = "currentColor",
|
|
103
|
+
children
|
|
104
|
+
}) {
|
|
105
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
106
|
+
width: size,
|
|
107
|
+
height: size,
|
|
108
|
+
viewBox: "0 0 24 24",
|
|
109
|
+
fill: "none",
|
|
110
|
+
stroke: color,
|
|
111
|
+
strokeWidth: 2,
|
|
112
|
+
strokeLinecap: "round",
|
|
113
|
+
strokeLinejoin: "round",
|
|
114
|
+
style: {
|
|
115
|
+
flexShrink: 0,
|
|
116
|
+
display: "block"
|
|
117
|
+
},
|
|
118
|
+
children: children
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
const CheckCircle = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
122
|
+
...p,
|
|
123
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
124
|
+
d: "M21.801 10A10 10 0 1 1 17 3.335"
|
|
125
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
126
|
+
d: "m9 11 3 3L22 4"
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
const XCircle = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
130
|
+
...p,
|
|
131
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
132
|
+
cx: "12",
|
|
133
|
+
cy: "12",
|
|
134
|
+
r: "10"
|
|
135
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
136
|
+
d: "m15 9-6 6"
|
|
137
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
138
|
+
d: "m9 9 6 6"
|
|
139
|
+
})]
|
|
140
|
+
});
|
|
141
|
+
const Clock = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
142
|
+
...p,
|
|
143
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
144
|
+
cx: "12",
|
|
145
|
+
cy: "12",
|
|
146
|
+
r: "10"
|
|
147
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", {
|
|
148
|
+
points: "12 6 12 12 16 14"
|
|
149
|
+
})]
|
|
150
|
+
});
|
|
151
|
+
const Globe = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
152
|
+
...p,
|
|
153
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
154
|
+
cx: "12",
|
|
155
|
+
cy: "12",
|
|
156
|
+
r: "10"
|
|
157
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
158
|
+
d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"
|
|
159
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
160
|
+
d: "M2 12h20"
|
|
161
|
+
})]
|
|
162
|
+
});
|
|
163
|
+
const FileJson = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
164
|
+
...p,
|
|
165
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
166
|
+
d: "M14 2v4a2 2 0 0 0 2 2h4"
|
|
167
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
168
|
+
d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"
|
|
169
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
170
|
+
d: "M4 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"
|
|
171
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
172
|
+
d: "M8 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"
|
|
173
|
+
})]
|
|
174
|
+
});
|
|
175
|
+
const FileText = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
176
|
+
...p,
|
|
177
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
178
|
+
d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"
|
|
179
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
180
|
+
d: "M14 2v4a2 2 0 0 0 2 2h4"
|
|
181
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
182
|
+
d: "M10 9H8"
|
|
183
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
184
|
+
d: "M16 13H8"
|
|
185
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
186
|
+
d: "M16 17H8"
|
|
187
|
+
})]
|
|
188
|
+
});
|
|
189
|
+
const ImageIcon = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
190
|
+
...p,
|
|
191
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
192
|
+
width: "18",
|
|
193
|
+
height: "18",
|
|
194
|
+
x: "3",
|
|
195
|
+
y: "3",
|
|
196
|
+
rx: "2",
|
|
197
|
+
ry: "2"
|
|
198
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
199
|
+
cx: "9",
|
|
200
|
+
cy: "9",
|
|
201
|
+
r: "2"
|
|
202
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
203
|
+
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"
|
|
204
|
+
})]
|
|
205
|
+
});
|
|
206
|
+
const Film = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
207
|
+
...p,
|
|
208
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
209
|
+
width: "18",
|
|
210
|
+
height: "18",
|
|
211
|
+
x: "3",
|
|
212
|
+
y: "3",
|
|
213
|
+
rx: "2"
|
|
214
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
215
|
+
d: "M7 3v18"
|
|
216
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
217
|
+
d: "M3 7.5h4"
|
|
218
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
219
|
+
d: "M3 12h18"
|
|
220
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
221
|
+
d: "M3 16.5h4"
|
|
222
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
223
|
+
d: "M17 3v18"
|
|
224
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
225
|
+
d: "M17 7.5h4"
|
|
226
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
227
|
+
d: "M17 16.5h4"
|
|
228
|
+
})]
|
|
229
|
+
});
|
|
230
|
+
const Music = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
231
|
+
...p,
|
|
232
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
233
|
+
d: "M9 18V5l12-2v13"
|
|
234
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
235
|
+
cx: "6",
|
|
236
|
+
cy: "18",
|
|
237
|
+
r: "3"
|
|
238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
239
|
+
cx: "18",
|
|
240
|
+
cy: "16",
|
|
241
|
+
r: "3"
|
|
242
|
+
})]
|
|
243
|
+
});
|
|
244
|
+
const Filter = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
|
|
245
|
+
...p,
|
|
246
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", {
|
|
247
|
+
points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
const Plus = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
251
|
+
...p,
|
|
252
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
253
|
+
d: "M5 12h14"
|
|
254
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
255
|
+
d: "M12 5v14"
|
|
256
|
+
})]
|
|
257
|
+
});
|
|
258
|
+
const X = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
259
|
+
...p,
|
|
260
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
261
|
+
d: "M18 6 6 18"
|
|
262
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
263
|
+
d: "m6 6 12 12"
|
|
264
|
+
})]
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// =============================
|
|
268
|
+
// Native helpers (verbatim from NetworkFilterViewV3.tsx)
|
|
269
|
+
// =============================
|
|
270
|
+
|
|
271
|
+
function getContentType(event) {
|
|
272
|
+
const headers = event.responseHeaders || event.requestHeaders;
|
|
273
|
+
const contentType = headers?.["content-type"] || headers?.["Content-Type"] || "";
|
|
274
|
+
if (contentType.includes("json")) return {
|
|
275
|
+
type: "JSON",
|
|
276
|
+
color: macOSColors.semantic.info
|
|
277
|
+
};
|
|
278
|
+
if (contentType.includes("xml")) return {
|
|
279
|
+
type: "XML",
|
|
280
|
+
color: macOSColors.semantic.success
|
|
281
|
+
};
|
|
282
|
+
if (contentType.includes("html")) return {
|
|
283
|
+
type: "HTML",
|
|
284
|
+
color: macOSColors.semantic.warning
|
|
285
|
+
};
|
|
286
|
+
if (contentType.includes("text")) return {
|
|
287
|
+
type: "TEXT",
|
|
288
|
+
color: macOSColors.semantic.success
|
|
289
|
+
};
|
|
290
|
+
if (contentType.includes("image")) return {
|
|
291
|
+
type: "IMAGE",
|
|
292
|
+
color: macOSColors.semantic.error
|
|
293
|
+
};
|
|
294
|
+
if (contentType.includes("video")) return {
|
|
295
|
+
type: "VIDEO",
|
|
296
|
+
color: macOSColors.semantic.error
|
|
297
|
+
};
|
|
298
|
+
if (contentType.includes("audio")) return {
|
|
299
|
+
type: "AUDIO",
|
|
300
|
+
color: macOSColors.semantic.debug
|
|
301
|
+
};
|
|
302
|
+
if (contentType.includes("form")) return {
|
|
303
|
+
type: "FORM",
|
|
304
|
+
color: macOSColors.semantic.info
|
|
305
|
+
};
|
|
306
|
+
return {
|
|
307
|
+
type: "OTHER",
|
|
308
|
+
color: macOSColors.text.muted
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
function getContentTypeIcon(type) {
|
|
312
|
+
switch (type) {
|
|
313
|
+
case "JSON":
|
|
314
|
+
return FileJson;
|
|
315
|
+
case "HTML":
|
|
316
|
+
case "XML":
|
|
317
|
+
case "TEXT":
|
|
318
|
+
return FileText;
|
|
319
|
+
case "IMAGE":
|
|
320
|
+
return ImageIcon;
|
|
321
|
+
case "VIDEO":
|
|
322
|
+
return Film;
|
|
323
|
+
case "AUDIO":
|
|
324
|
+
return Music;
|
|
325
|
+
default:
|
|
326
|
+
return Globe;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
function getMethodColor(method) {
|
|
330
|
+
switch (method) {
|
|
331
|
+
case "GET":
|
|
332
|
+
return macOSColors.semantic.success;
|
|
333
|
+
case "POST":
|
|
334
|
+
return macOSColors.semantic.info;
|
|
335
|
+
case "PUT":
|
|
336
|
+
return macOSColors.semantic.warning;
|
|
337
|
+
case "DELETE":
|
|
338
|
+
return macOSColors.semantic.error;
|
|
339
|
+
case "PATCH":
|
|
340
|
+
return macOSColors.semantic.success;
|
|
341
|
+
default:
|
|
342
|
+
return macOSColors.text.muted;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// =============================
|
|
347
|
+
// DOM twins of the shared-ui pieces DynamicFilterView composes
|
|
348
|
+
// =============================
|
|
349
|
+
|
|
350
|
+
/** SectionHeader twin — shared/src/ui/components/SectionHeader.tsx. */
|
|
351
|
+
function SectionHeader({
|
|
352
|
+
icon: Icon,
|
|
353
|
+
iconColor,
|
|
354
|
+
title,
|
|
355
|
+
badgeCount,
|
|
356
|
+
badgeColor
|
|
357
|
+
}) {
|
|
358
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
359
|
+
style: styles.sectionHeader,
|
|
360
|
+
children: [Icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
361
|
+
style: styles.sectionHeaderIcon,
|
|
362
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
|
363
|
+
size: 12,
|
|
364
|
+
color: iconColor ?? buoyColors.primary
|
|
365
|
+
})
|
|
366
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
367
|
+
style: styles.sectionHeaderTitle,
|
|
368
|
+
children: title
|
|
369
|
+
}), badgeCount !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
370
|
+
style: {
|
|
371
|
+
...styles.sectionHeaderBadge,
|
|
372
|
+
backgroundColor: `${badgeColor ?? buoyColors.primary}15`,
|
|
373
|
+
border: `1px solid ${badgeColor ?? buoyColors.primary}33`
|
|
374
|
+
},
|
|
375
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
376
|
+
style: {
|
|
377
|
+
...styles.sectionHeaderBadgeText,
|
|
378
|
+
color: badgeColor ?? buoyColors.primary
|
|
379
|
+
},
|
|
380
|
+
children: badgeCount
|
|
381
|
+
})
|
|
382
|
+
}) : null]
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/** AddFilterButton twin — shared/src/ui/components/FilterComponents.tsx. */
|
|
387
|
+
function AddFilterButton({
|
|
388
|
+
onPress,
|
|
389
|
+
color,
|
|
390
|
+
label
|
|
391
|
+
}) {
|
|
392
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
393
|
+
type: "button",
|
|
394
|
+
onClick: onPress,
|
|
395
|
+
style: {
|
|
396
|
+
...styles.addButton,
|
|
397
|
+
borderColor: `${color}40`
|
|
398
|
+
},
|
|
399
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Plus, {
|
|
400
|
+
size: 14,
|
|
401
|
+
color: color
|
|
402
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
403
|
+
style: {
|
|
404
|
+
...styles.addButtonText,
|
|
405
|
+
color
|
|
406
|
+
},
|
|
407
|
+
children: label
|
|
408
|
+
})]
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/** AddFilterInput twin — shared/src/ui/components/FilterComponents.tsx. */
|
|
413
|
+
function AddFilterInput({
|
|
414
|
+
value,
|
|
415
|
+
onChange,
|
|
416
|
+
onSubmit,
|
|
417
|
+
onCancel,
|
|
418
|
+
placeholder,
|
|
419
|
+
color
|
|
420
|
+
}) {
|
|
421
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
422
|
+
style: {
|
|
423
|
+
...styles.inputContainer,
|
|
424
|
+
borderColor: `${color}40`
|
|
425
|
+
},
|
|
426
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
427
|
+
value: value,
|
|
428
|
+
onChange: e => onChange(e.target.value),
|
|
429
|
+
onKeyDown: e => {
|
|
430
|
+
if (e.key === "Enter") onSubmit();
|
|
431
|
+
},
|
|
432
|
+
placeholder: placeholder,
|
|
433
|
+
style: {
|
|
434
|
+
...styles.input,
|
|
435
|
+
color
|
|
436
|
+
},
|
|
437
|
+
autoFocus: true,
|
|
438
|
+
autoCorrect: "off",
|
|
439
|
+
autoCapitalize: "none",
|
|
440
|
+
autoComplete: "off",
|
|
441
|
+
spellCheck: false
|
|
442
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
443
|
+
style: styles.inputButtons,
|
|
444
|
+
children: [value.trim() ? /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
445
|
+
type: "button",
|
|
446
|
+
onClick: onSubmit,
|
|
447
|
+
style: {
|
|
448
|
+
...styles.inlineAddButton,
|
|
449
|
+
backgroundColor: `${color}15`,
|
|
450
|
+
borderColor: `${color}40`
|
|
451
|
+
},
|
|
452
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
453
|
+
style: {
|
|
454
|
+
...styles.inlineAddButtonText,
|
|
455
|
+
color
|
|
456
|
+
},
|
|
457
|
+
children: "Add"
|
|
458
|
+
})
|
|
459
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
460
|
+
type: "button",
|
|
461
|
+
onClick: onCancel,
|
|
462
|
+
style: styles.cancelButton,
|
|
463
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(X, {
|
|
464
|
+
size: 16,
|
|
465
|
+
color: `${color}60`
|
|
466
|
+
})
|
|
467
|
+
})]
|
|
468
|
+
})]
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Control panel for filtering captured network events by status, method, and
|
|
474
|
+
* content type, plus ignored-pattern management — same surface as native.
|
|
475
|
+
*/
|
|
476
|
+
function NetworkFilterViewV3({
|
|
477
|
+
events,
|
|
478
|
+
filter,
|
|
479
|
+
onFilterChange,
|
|
480
|
+
ignoredPatterns = [],
|
|
481
|
+
onRemovePattern = () => {},
|
|
482
|
+
onAddPattern = () => {},
|
|
483
|
+
onTogglePatternMode = () => {}
|
|
484
|
+
}) {
|
|
485
|
+
// Mode applied when the user submits the "Add pattern" input. Defaults to
|
|
486
|
+
// `contains` so behavior matches the previous implementation until the user
|
|
487
|
+
// opts into `exact`. (Native state, verbatim.)
|
|
488
|
+
const [nextPatternMode, setNextPatternMode] = (0, _react.useState)("contains");
|
|
489
|
+
|
|
490
|
+
// DynamicFilterView's `useFilterManager` input UI state — the subset this
|
|
491
|
+
// config exercises (show/hide the add input + the draft value).
|
|
492
|
+
const [showAddInput, setShowAddInput] = (0, _react.useState)(false);
|
|
493
|
+
const [newFilter, setNewFilter] = (0, _react.useState)("");
|
|
494
|
+
const patternModes = (0, _react.useMemo)(() => {
|
|
495
|
+
const map = new Map();
|
|
496
|
+
for (const p of ignoredPatterns) map.set(p.value, p.mode);
|
|
497
|
+
return map;
|
|
498
|
+
}, [ignoredPatterns]);
|
|
499
|
+
const activePatterns = (0, _react.useMemo)(() => ignoredPatterns.map(p => p.value), [ignoredPatterns]);
|
|
500
|
+
const handlePatternAdd = (0, _react.useCallback)(pattern => {
|
|
501
|
+
onAddPattern({
|
|
502
|
+
value: pattern,
|
|
503
|
+
mode: nextPatternMode
|
|
504
|
+
});
|
|
505
|
+
}, [onAddPattern, nextPatternMode]);
|
|
506
|
+
|
|
507
|
+
// DynamicFilterView.handleAddPattern: forward the trimmed draft, then reset
|
|
508
|
+
// the input UI (its filterManager.addFilter side effect).
|
|
509
|
+
const submitDraftPattern = (0, _react.useCallback)(() => {
|
|
510
|
+
const trimmed = newFilter.trim();
|
|
511
|
+
if (!trimmed) return;
|
|
512
|
+
handlePatternAdd(trimmed);
|
|
513
|
+
setNewFilter("");
|
|
514
|
+
setShowAddInput(false);
|
|
515
|
+
}, [newFilter, handlePatternAdd]);
|
|
516
|
+
const statusCounts = (0, _react.useMemo)(() => {
|
|
517
|
+
const counts = {
|
|
518
|
+
all: events.length,
|
|
519
|
+
success: 0,
|
|
520
|
+
error: 0,
|
|
521
|
+
pending: 0
|
|
522
|
+
};
|
|
523
|
+
events.forEach(event => {
|
|
524
|
+
if (event.error || event.status && event.status >= 400) {
|
|
525
|
+
counts.error += 1;
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
if (event.status && event.status >= 200 && event.status < 300) {
|
|
529
|
+
counts.success += 1;
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
if (!event.status && !event.error) {
|
|
533
|
+
counts.pending += 1;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
return counts;
|
|
537
|
+
}, [events]);
|
|
538
|
+
const methodCounts = (0, _react.useMemo)(() => {
|
|
539
|
+
return events.reduce((acc, event) => {
|
|
540
|
+
if (!event.method) return acc;
|
|
541
|
+
acc[event.method] = (acc[event.method] || 0) + 1;
|
|
542
|
+
return acc;
|
|
543
|
+
}, {});
|
|
544
|
+
}, [events]);
|
|
545
|
+
const contentTypeCounts = (0, _react.useMemo)(() => {
|
|
546
|
+
return events.reduce((acc, event) => {
|
|
547
|
+
const {
|
|
548
|
+
type
|
|
549
|
+
} = getContentType(event);
|
|
550
|
+
acc[type] = (acc[type] || 0) + 1;
|
|
551
|
+
return acc;
|
|
552
|
+
}, {});
|
|
553
|
+
}, [events]);
|
|
554
|
+
const availableDomains = (0, _react.useMemo)(() => {
|
|
555
|
+
const domains = new Set();
|
|
556
|
+
events.forEach(event => {
|
|
557
|
+
if (event.host) {
|
|
558
|
+
domains.add(event.host);
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
try {
|
|
562
|
+
if (event.url) {
|
|
563
|
+
const parsed = new URL(event.url);
|
|
564
|
+
const host = String(parsed.host || "");
|
|
565
|
+
if (host) domains.add(host);
|
|
566
|
+
}
|
|
567
|
+
} catch {
|
|
568
|
+
// Ignore relative URLs
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
return Array.from(domains).filter(domain => domain && domain !== "").sort((a, b) => a.localeCompare(b));
|
|
572
|
+
}, [events]);
|
|
573
|
+
const availableUrls = (0, _react.useMemo)(() => {
|
|
574
|
+
const urls = new Set();
|
|
575
|
+
events.forEach(event => {
|
|
576
|
+
if (!event.url) return;
|
|
577
|
+
try {
|
|
578
|
+
const parsed = new URL(event.url);
|
|
579
|
+
const origin = String(parsed.origin || "");
|
|
580
|
+
const pathname = String(parsed.pathname || "");
|
|
581
|
+
const normalized = `${origin}${pathname}`;
|
|
582
|
+
urls.add(normalized);
|
|
583
|
+
} catch {
|
|
584
|
+
// URL constructor fails for relative paths - fall back to raw value
|
|
585
|
+
urls.add(event.url);
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
return Array.from(urls).filter(url => url && url !== "").sort((a, b) => a.localeCompare(b));
|
|
589
|
+
}, [events]);
|
|
590
|
+
const suggestionItems = (0, _react.useMemo)(() => {
|
|
591
|
+
const maxItemsPerGroup = 30;
|
|
592
|
+
const domainSuggestions = availableDomains.slice(0, maxItemsPerGroup);
|
|
593
|
+
const urlSuggestions = availableUrls.slice(0, maxItemsPerGroup);
|
|
594
|
+
return [...domainSuggestions, ...urlSuggestions];
|
|
595
|
+
}, [availableDomains, availableUrls]);
|
|
596
|
+
|
|
597
|
+
// DynamicFilterView.suggestedItems: hide suggestions any active pattern
|
|
598
|
+
// already covers (substring test, native verbatim).
|
|
599
|
+
const suggestedItems = (0, _react.useMemo)(() => suggestionItems.filter(item => !activePatterns.some(pattern => item.includes(pattern))), [suggestionItems, activePatterns]);
|
|
600
|
+
const handleDynamicFilterChange = (0, _react.useCallback)((optionId, value) => {
|
|
601
|
+
const [group] = optionId.split("::");
|
|
602
|
+
if (group === "status") {
|
|
603
|
+
const nextStatus = value === "all" ? undefined : value;
|
|
604
|
+
onFilterChange({
|
|
605
|
+
...filter,
|
|
606
|
+
status: nextStatus
|
|
607
|
+
});
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
if (group === "method") {
|
|
611
|
+
const methodValue = String(value);
|
|
612
|
+
const currentMethods = filter.method || [];
|
|
613
|
+
const hasMethod = currentMethods.includes(methodValue);
|
|
614
|
+
const updatedMethods = hasMethod ? currentMethods.filter(method => method !== methodValue) : [methodValue];
|
|
615
|
+
onFilterChange({
|
|
616
|
+
...filter,
|
|
617
|
+
method: updatedMethods.length > 0 ? updatedMethods : undefined
|
|
618
|
+
});
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
if (group === "contentType") {
|
|
622
|
+
const typeValue = String(value);
|
|
623
|
+
const currentTypes = filter.contentType || [];
|
|
624
|
+
const hasType = currentTypes.includes(typeValue);
|
|
625
|
+
const updatedTypes = hasType ? currentTypes.filter(type => type !== typeValue) : [typeValue];
|
|
626
|
+
onFilterChange({
|
|
627
|
+
...filter,
|
|
628
|
+
contentType: updatedTypes.length > 0 ? updatedTypes : undefined
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
}, [filter, onFilterChange]);
|
|
632
|
+
|
|
633
|
+
// =============================
|
|
634
|
+
// Renderers (DynamicFilterView subtree for this config)
|
|
635
|
+
// =============================
|
|
636
|
+
|
|
637
|
+
const renderFilterCard = option => {
|
|
638
|
+
const countIsZero = option.count === 0;
|
|
639
|
+
// Native: showLabel = section.type !== "method" || option.icon
|
|
640
|
+
const showLabel = !option.isMethod || option.icon;
|
|
641
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
642
|
+
type: "button",
|
|
643
|
+
onClick: () => handleDynamicFilterChange(option.id, option.value),
|
|
644
|
+
style: {
|
|
645
|
+
...styles.filterCard,
|
|
646
|
+
...(option.isActive ? styles.activeFilterCard : null)
|
|
647
|
+
},
|
|
648
|
+
children: [option.icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(option.icon, {
|
|
649
|
+
size: 24,
|
|
650
|
+
color: option.color
|
|
651
|
+
}) : option.isMethod ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
652
|
+
style: {
|
|
653
|
+
...styles.methodBadgeCompact,
|
|
654
|
+
backgroundColor: `${option.color}20`
|
|
655
|
+
},
|
|
656
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
657
|
+
style: {
|
|
658
|
+
...styles.methodTextCompact,
|
|
659
|
+
color: option.color
|
|
660
|
+
},
|
|
661
|
+
children: option.label
|
|
662
|
+
})
|
|
663
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
664
|
+
style: countIsZero ? styles.filterCountZero : styles.filterCountActive,
|
|
665
|
+
children: option.count
|
|
666
|
+
}), showLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
667
|
+
style: styles.filterLabelCompact,
|
|
668
|
+
children: option.label
|
|
669
|
+
}) : null]
|
|
670
|
+
}, option.id);
|
|
671
|
+
};
|
|
672
|
+
const statusOptions = ["all", "success", "error", "pending"].map(status => ({
|
|
673
|
+
id: `status::${status}`,
|
|
674
|
+
label: status.charAt(0).toUpperCase() + status.slice(1),
|
|
675
|
+
count: statusCounts[status],
|
|
676
|
+
icon: status === "success" ? CheckCircle : status === "error" ? XCircle : status === "pending" ? Clock : Globe,
|
|
677
|
+
color: status === "success" ? macOSColors.semantic.success : status === "error" ? macOSColors.semantic.error : status === "pending" ? macOSColors.semantic.warning : macOSColors.semantic.info,
|
|
678
|
+
isActive: filter.status === status || !filter.status && status === "all",
|
|
679
|
+
value: status
|
|
680
|
+
}));
|
|
681
|
+
const methodEntries = Object.entries(methodCounts);
|
|
682
|
+
const contentTypeEntries = Object.entries(contentTypeCounts);
|
|
683
|
+
|
|
684
|
+
// Native renderAddFilterExtra — the Match: Contains/Exact toggle shown
|
|
685
|
+
// above the pattern input.
|
|
686
|
+
const renderAddFilterExtra = () => {
|
|
687
|
+
const options = [{
|
|
688
|
+
label: "Contains",
|
|
689
|
+
value: "contains",
|
|
690
|
+
hint: "substring"
|
|
691
|
+
}, {
|
|
692
|
+
label: "Exact",
|
|
693
|
+
value: "exact",
|
|
694
|
+
hint: "whole path/host/url"
|
|
695
|
+
}];
|
|
696
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
697
|
+
style: styles.modeToggleRow,
|
|
698
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
699
|
+
style: styles.modeToggleLabel,
|
|
700
|
+
children: "Match:"
|
|
701
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
702
|
+
style: styles.modeToggleGroup,
|
|
703
|
+
children: options.map(opt => {
|
|
704
|
+
const isActive = nextPatternMode === opt.value;
|
|
705
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
706
|
+
type: "button",
|
|
707
|
+
onClick: () => setNextPatternMode(opt.value),
|
|
708
|
+
"aria-pressed": isActive,
|
|
709
|
+
style: {
|
|
710
|
+
...styles.modeToggleButton,
|
|
711
|
+
...(isActive ? styles.modeToggleButtonActive : null)
|
|
712
|
+
},
|
|
713
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
714
|
+
style: {
|
|
715
|
+
...styles.modeToggleButtonText,
|
|
716
|
+
...(isActive ? styles.modeToggleButtonTextActive : null)
|
|
717
|
+
},
|
|
718
|
+
children: opt.label
|
|
719
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
720
|
+
style: styles.modeToggleButtonHint,
|
|
721
|
+
children: opt.hint
|
|
722
|
+
})]
|
|
723
|
+
}, opt.value);
|
|
724
|
+
})
|
|
725
|
+
})]
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
// Native renderPatternMeta — the CONTAINS/EXACT badge on each pattern row.
|
|
730
|
+
const renderPatternMeta = pattern => {
|
|
731
|
+
const mode = patternModes.get(pattern) ?? "contains";
|
|
732
|
+
const isExact = mode === "exact";
|
|
733
|
+
const color = isExact ? macOSColors.semantic.warning : macOSColors.semantic.info;
|
|
734
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
735
|
+
type: "button",
|
|
736
|
+
"aria-label": `Match mode: ${mode}. Tap to toggle.`,
|
|
737
|
+
onClick: e => {
|
|
738
|
+
// DEVIATION (logged): RN's nested Touchable swallows the press; DOM
|
|
739
|
+
// must stop it reaching the row's remove handler.
|
|
740
|
+
e.stopPropagation();
|
|
741
|
+
onTogglePatternMode(pattern);
|
|
742
|
+
},
|
|
743
|
+
style: {
|
|
744
|
+
...styles.modeBadge,
|
|
745
|
+
borderColor: `${color}60`,
|
|
746
|
+
backgroundColor: `${color}15`
|
|
747
|
+
},
|
|
748
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
749
|
+
style: {
|
|
750
|
+
...styles.modeBadgeText,
|
|
751
|
+
color
|
|
752
|
+
},
|
|
753
|
+
children: isExact ? "EXACT" : "CONTAINS"
|
|
754
|
+
})
|
|
755
|
+
});
|
|
756
|
+
};
|
|
757
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
758
|
+
style: styles.container,
|
|
759
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
760
|
+
style: styles.content,
|
|
761
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
762
|
+
style: styles.section,
|
|
763
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
|
|
764
|
+
title: "Status"
|
|
765
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
766
|
+
style: styles.filterGrid,
|
|
767
|
+
children: statusOptions.map(renderFilterCard)
|
|
768
|
+
})]
|
|
769
|
+
}), methodEntries.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
770
|
+
style: styles.section,
|
|
771
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
|
|
772
|
+
title: "Method"
|
|
773
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
774
|
+
style: styles.filterGrid,
|
|
775
|
+
children: methodEntries.map(([method, count]) => renderFilterCard({
|
|
776
|
+
id: `method::${method}`,
|
|
777
|
+
label: method,
|
|
778
|
+
count,
|
|
779
|
+
color: getMethodColor(method),
|
|
780
|
+
isActive: filter.method?.includes(method) ?? false,
|
|
781
|
+
value: method,
|
|
782
|
+
isMethod: true
|
|
783
|
+
}))
|
|
784
|
+
})]
|
|
785
|
+
}) : null, contentTypeEntries.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
786
|
+
style: styles.section,
|
|
787
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
|
|
788
|
+
title: "Content Type"
|
|
789
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
790
|
+
style: styles.filterGrid,
|
|
791
|
+
children: contentTypeEntries.map(([type, count]) => {
|
|
792
|
+
const representativeEvent = events.find(event => getContentType(event).type === type);
|
|
793
|
+
const {
|
|
794
|
+
color
|
|
795
|
+
} = representativeEvent ? getContentType(representativeEvent) : {
|
|
796
|
+
color: macOSColors.text.muted
|
|
797
|
+
};
|
|
798
|
+
return renderFilterCard({
|
|
799
|
+
id: `contentType::${type}`,
|
|
800
|
+
label: type,
|
|
801
|
+
count,
|
|
802
|
+
icon: getContentTypeIcon(type),
|
|
803
|
+
color,
|
|
804
|
+
isActive: filter.contentType?.includes(type) ?? false,
|
|
805
|
+
value: type
|
|
806
|
+
});
|
|
807
|
+
})
|
|
808
|
+
})]
|
|
809
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
810
|
+
style: styles.excludeFiltersSection,
|
|
811
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
|
|
812
|
+
icon: Filter,
|
|
813
|
+
iconColor: buoyColors.primary,
|
|
814
|
+
title: "ACTIVE FILTERS",
|
|
815
|
+
badgeCount: activePatterns.length > 0 ? activePatterns.length : undefined,
|
|
816
|
+
badgeColor: buoyColors.primary
|
|
817
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
818
|
+
style: styles.excludeFiltersDescription,
|
|
819
|
+
children: "Hide queries matching these patterns from the list."
|
|
820
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
821
|
+
style: styles.excludeFiltersInputWrapper,
|
|
822
|
+
children: !showAddInput ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AddFilterButton, {
|
|
823
|
+
onPress: () => setShowAddInput(true),
|
|
824
|
+
color: buoyColors.primary,
|
|
825
|
+
label: "Add exclude pattern"
|
|
826
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
827
|
+
children: [renderAddFilterExtra(), /*#__PURE__*/(0, _jsxRuntime.jsx)(AddFilterInput, {
|
|
828
|
+
value: newFilter,
|
|
829
|
+
onChange: setNewFilter,
|
|
830
|
+
onSubmit: submitDraftPattern,
|
|
831
|
+
onCancel: () => {
|
|
832
|
+
setShowAddInput(false);
|
|
833
|
+
setNewFilter("");
|
|
834
|
+
},
|
|
835
|
+
placeholder: "Enter domain or URL pattern...",
|
|
836
|
+
color: buoyColors.primary
|
|
837
|
+
})]
|
|
838
|
+
})
|
|
839
|
+
}), activePatterns.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
840
|
+
style: styles.excludeFiltersContent,
|
|
841
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
842
|
+
style: styles.filterListColumn,
|
|
843
|
+
children: activePatterns.map(pattern => /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
844
|
+
type: "button",
|
|
845
|
+
onClick: () => onRemovePattern(pattern),
|
|
846
|
+
style: styles.filterItemRow,
|
|
847
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
848
|
+
style: {
|
|
849
|
+
...styles.filterItemText,
|
|
850
|
+
color: buoyColors.primary
|
|
851
|
+
},
|
|
852
|
+
children: pattern
|
|
853
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
854
|
+
style: styles.filterItemMeta,
|
|
855
|
+
children: renderPatternMeta(pattern)
|
|
856
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(X, {
|
|
857
|
+
size: 12,
|
|
858
|
+
color: `${buoyColors.primary}80`
|
|
859
|
+
})]
|
|
860
|
+
}, pattern))
|
|
861
|
+
})
|
|
862
|
+
}) : null]
|
|
863
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
864
|
+
style: styles.availableKeysSection,
|
|
865
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
|
|
866
|
+
icon: Plus,
|
|
867
|
+
iconColor: buoyColors.primary,
|
|
868
|
+
title: "AVAILABLE DOMAINS & URLS",
|
|
869
|
+
badgeCount: suggestedItems.length,
|
|
870
|
+
badgeColor: buoyColors.primary
|
|
871
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
872
|
+
style: styles.availableKeysScroll,
|
|
873
|
+
children: suggestedItems.length > 0 ? suggestedItems.map(item => /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
874
|
+
type: "button",
|
|
875
|
+
onClick: () => handlePatternAdd(item),
|
|
876
|
+
style: styles.availableKeyItem,
|
|
877
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
878
|
+
style: styles.availableKeyText,
|
|
879
|
+
children: item
|
|
880
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Plus, {
|
|
881
|
+
size: 12,
|
|
882
|
+
color: buoyColors.primary
|
|
883
|
+
})]
|
|
884
|
+
}, item)) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
885
|
+
style: styles.emptyStateText,
|
|
886
|
+
children: "No network events captured yet. Domains and URLs will appear here."
|
|
887
|
+
})
|
|
888
|
+
})]
|
|
889
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
890
|
+
style: styles.howItWorksSection,
|
|
891
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
|
|
892
|
+
icon: Filter,
|
|
893
|
+
iconColor: buoyColors.textSecondary,
|
|
894
|
+
title: "HOW NETWORK FILTERS WORK"
|
|
895
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
896
|
+
style: styles.howItWorksText,
|
|
897
|
+
children: "Patterns hide matching requests from the network event list. Each pattern has a match mode you can toggle on its badge: CONTAINS hides any URL containing the text; EXACT hides only an exact path/host/url match."
|
|
898
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
899
|
+
style: styles.examplesContainer,
|
|
900
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
901
|
+
style: styles.examplesTitle,
|
|
902
|
+
children: "EXAMPLES:"
|
|
903
|
+
}), ["• example.com (CONTAINS) → any request whose URL contains example.com", "• example.com (EXACT) → only requests served by that exact host", "• /v1 (CONTAINS) → any URL containing /v1 (e.g. /v1, /v1/users)", "• /v1 (EXACT) → only requests whose pathname is exactly /v1"].map(example => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
904
|
+
style: styles.exampleItem,
|
|
905
|
+
children: example
|
|
906
|
+
}, example))]
|
|
907
|
+
})]
|
|
908
|
+
})]
|
|
909
|
+
})
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
// Values mirror the native StyleSheet blocks 1:1 (DynamicFilterView.tsx,
|
|
914
|
+
// SectionHeader.tsx, FilterComponents.tsx, NetworkFilterViewV3.tsx).
|
|
915
|
+
const styles = {
|
|
916
|
+
container: {
|
|
917
|
+
display: "flex",
|
|
918
|
+
flexDirection: "column",
|
|
919
|
+
flex: 1,
|
|
920
|
+
minHeight: 0,
|
|
921
|
+
backgroundColor: buoyColors.base
|
|
922
|
+
},
|
|
923
|
+
content: {
|
|
924
|
+
flex: 1,
|
|
925
|
+
minHeight: 0,
|
|
926
|
+
overflowY: "auto",
|
|
927
|
+
padding: "16px 16px 24px 16px"
|
|
928
|
+
},
|
|
929
|
+
section: {
|
|
930
|
+
marginBottom: 8
|
|
931
|
+
},
|
|
932
|
+
// SectionHeader.tsx container/title/badge
|
|
933
|
+
sectionHeader: {
|
|
934
|
+
display: "flex",
|
|
935
|
+
flexDirection: "row",
|
|
936
|
+
alignItems: "center",
|
|
937
|
+
padding: "8px 16px",
|
|
938
|
+
backgroundColor: buoyColors.base,
|
|
939
|
+
minHeight: 40,
|
|
940
|
+
boxSizing: "border-box"
|
|
941
|
+
},
|
|
942
|
+
sectionHeaderIcon: {
|
|
943
|
+
display: "inline-flex",
|
|
944
|
+
marginRight: 8
|
|
945
|
+
},
|
|
946
|
+
sectionHeaderTitle: {
|
|
947
|
+
flex: 1,
|
|
948
|
+
fontSize: 14,
|
|
949
|
+
fontWeight: 600,
|
|
950
|
+
color: buoyColors.text,
|
|
951
|
+
whiteSpace: "nowrap",
|
|
952
|
+
overflow: "hidden",
|
|
953
|
+
textOverflow: "ellipsis"
|
|
954
|
+
},
|
|
955
|
+
sectionHeaderBadge: {
|
|
956
|
+
display: "inline-flex",
|
|
957
|
+
alignItems: "center",
|
|
958
|
+
padding: "3px 8px",
|
|
959
|
+
borderRadius: 12,
|
|
960
|
+
marginLeft: 8
|
|
961
|
+
},
|
|
962
|
+
sectionHeaderBadgeText: {
|
|
963
|
+
fontSize: 12,
|
|
964
|
+
fontWeight: 600
|
|
965
|
+
},
|
|
966
|
+
filterGrid: {
|
|
967
|
+
display: "flex",
|
|
968
|
+
flexDirection: "row",
|
|
969
|
+
flexWrap: "wrap",
|
|
970
|
+
gap: 8,
|
|
971
|
+
marginTop: 8
|
|
972
|
+
},
|
|
973
|
+
filterCard: {
|
|
974
|
+
display: "flex",
|
|
975
|
+
backgroundColor: buoyColors.card,
|
|
976
|
+
borderRadius: 12,
|
|
977
|
+
padding: "10px 8px",
|
|
978
|
+
flexDirection: "column",
|
|
979
|
+
alignItems: "center",
|
|
980
|
+
justifyContent: "center",
|
|
981
|
+
border: `1px solid ${buoyColors.border}`,
|
|
982
|
+
width: 72,
|
|
983
|
+
minHeight: 68,
|
|
984
|
+
boxSizing: "border-box",
|
|
985
|
+
cursor: "pointer",
|
|
986
|
+
margin: 0
|
|
987
|
+
},
|
|
988
|
+
activeFilterCard: {
|
|
989
|
+
backgroundColor: `${buoyColors.primary}33`,
|
|
990
|
+
border: `2px solid ${buoyColors.primary}`,
|
|
991
|
+
// Native: shadowColor primary, offset 0/0, opacity 0.3, radius 8.
|
|
992
|
+
boxShadow: `0 0 8px ${buoyColors.primary}4D`
|
|
993
|
+
},
|
|
994
|
+
filterCountActive: {
|
|
995
|
+
fontSize: 14,
|
|
996
|
+
fontWeight: 700,
|
|
997
|
+
color: buoyColors.text,
|
|
998
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
999
|
+
marginTop: 3,
|
|
1000
|
+
marginBottom: 1,
|
|
1001
|
+
textShadow: "0 0.5px 1px rgba(0, 0, 0, 0.2)"
|
|
1002
|
+
},
|
|
1003
|
+
filterCountZero: {
|
|
1004
|
+
fontSize: 11,
|
|
1005
|
+
fontWeight: 500,
|
|
1006
|
+
color: buoyColors.textMuted,
|
|
1007
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1008
|
+
marginTop: 3,
|
|
1009
|
+
marginBottom: 1
|
|
1010
|
+
},
|
|
1011
|
+
filterLabelCompact: {
|
|
1012
|
+
fontSize: 10,
|
|
1013
|
+
color: buoyColors.text,
|
|
1014
|
+
fontWeight: 600,
|
|
1015
|
+
textAlign: "center",
|
|
1016
|
+
textTransform: "capitalize",
|
|
1017
|
+
textShadow: "0 0.5px 1px rgba(0, 0, 0, 0.3)"
|
|
1018
|
+
},
|
|
1019
|
+
methodBadgeCompact: {
|
|
1020
|
+
display: "inline-flex",
|
|
1021
|
+
padding: "4px 8px",
|
|
1022
|
+
borderRadius: 5,
|
|
1023
|
+
minWidth: 48,
|
|
1024
|
+
maxWidth: 60,
|
|
1025
|
+
boxSizing: "border-box",
|
|
1026
|
+
alignItems: "center",
|
|
1027
|
+
justifyContent: "center"
|
|
1028
|
+
},
|
|
1029
|
+
methodTextCompact: {
|
|
1030
|
+
fontSize: 13,
|
|
1031
|
+
fontWeight: 700,
|
|
1032
|
+
letterSpacing: 0.3,
|
|
1033
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1034
|
+
whiteSpace: "nowrap",
|
|
1035
|
+
overflow: "hidden",
|
|
1036
|
+
textOverflow: "ellipsis"
|
|
1037
|
+
},
|
|
1038
|
+
excludeFiltersSection: {
|
|
1039
|
+
backgroundColor: buoyColors.card,
|
|
1040
|
+
borderRadius: 16,
|
|
1041
|
+
border: `1px solid ${buoyColors.border}`,
|
|
1042
|
+
marginTop: 16,
|
|
1043
|
+
overflow: "hidden"
|
|
1044
|
+
},
|
|
1045
|
+
excludeFiltersDescription: {
|
|
1046
|
+
fontSize: 10,
|
|
1047
|
+
color: buoyColors.textSecondary,
|
|
1048
|
+
padding: "8px 16px 0 16px",
|
|
1049
|
+
lineHeight: "14px"
|
|
1050
|
+
},
|
|
1051
|
+
excludeFiltersInputWrapper: {
|
|
1052
|
+
padding: "8px 16px"
|
|
1053
|
+
},
|
|
1054
|
+
excludeFiltersContent: {
|
|
1055
|
+
padding: "0 16px 16px 16px",
|
|
1056
|
+
maxHeight: 150,
|
|
1057
|
+
overflowY: "auto"
|
|
1058
|
+
},
|
|
1059
|
+
filterListColumn: {
|
|
1060
|
+
display: "flex",
|
|
1061
|
+
flexDirection: "column",
|
|
1062
|
+
gap: 8
|
|
1063
|
+
},
|
|
1064
|
+
filterItemRow: {
|
|
1065
|
+
display: "flex",
|
|
1066
|
+
flexDirection: "row",
|
|
1067
|
+
alignItems: "center",
|
|
1068
|
+
justifyContent: "space-between",
|
|
1069
|
+
padding: "10px 12px",
|
|
1070
|
+
backgroundColor: buoyColors.hover,
|
|
1071
|
+
borderRadius: 8,
|
|
1072
|
+
border: `1px solid ${buoyColors.border}`,
|
|
1073
|
+
cursor: "pointer",
|
|
1074
|
+
margin: 0,
|
|
1075
|
+
width: "100%",
|
|
1076
|
+
boxSizing: "border-box",
|
|
1077
|
+
textAlign: "left"
|
|
1078
|
+
},
|
|
1079
|
+
filterItemText: {
|
|
1080
|
+
flex: 1,
|
|
1081
|
+
fontSize: 12,
|
|
1082
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1083
|
+
marginRight: 8,
|
|
1084
|
+
whiteSpace: "nowrap",
|
|
1085
|
+
overflow: "hidden",
|
|
1086
|
+
textOverflow: "ellipsis",
|
|
1087
|
+
minWidth: 0
|
|
1088
|
+
},
|
|
1089
|
+
filterItemMeta: {
|
|
1090
|
+
display: "inline-flex",
|
|
1091
|
+
marginRight: 8
|
|
1092
|
+
},
|
|
1093
|
+
// NetworkFilterViewV3.tsx modeBadge / modeToggle styles
|
|
1094
|
+
modeBadge: {
|
|
1095
|
+
display: "inline-flex",
|
|
1096
|
+
padding: "3px 8px",
|
|
1097
|
+
borderRadius: 6,
|
|
1098
|
+
borderWidth: 1,
|
|
1099
|
+
borderStyle: "solid",
|
|
1100
|
+
background: "none",
|
|
1101
|
+
cursor: "pointer",
|
|
1102
|
+
margin: 0
|
|
1103
|
+
},
|
|
1104
|
+
modeBadgeText: {
|
|
1105
|
+
fontSize: 9,
|
|
1106
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1107
|
+
fontWeight: 700,
|
|
1108
|
+
letterSpacing: 0.5
|
|
1109
|
+
},
|
|
1110
|
+
modeToggleRow: {
|
|
1111
|
+
display: "flex",
|
|
1112
|
+
flexDirection: "row",
|
|
1113
|
+
alignItems: "center",
|
|
1114
|
+
gap: 8,
|
|
1115
|
+
marginBottom: 8
|
|
1116
|
+
},
|
|
1117
|
+
modeToggleLabel: {
|
|
1118
|
+
fontSize: 11,
|
|
1119
|
+
fontWeight: 600,
|
|
1120
|
+
color: macOSColors.text.secondary,
|
|
1121
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1122
|
+
letterSpacing: 0.3
|
|
1123
|
+
},
|
|
1124
|
+
modeToggleGroup: {
|
|
1125
|
+
display: "flex",
|
|
1126
|
+
flexDirection: "row",
|
|
1127
|
+
gap: 6,
|
|
1128
|
+
flex: 1
|
|
1129
|
+
},
|
|
1130
|
+
modeToggleButton: {
|
|
1131
|
+
flex: 1,
|
|
1132
|
+
display: "flex",
|
|
1133
|
+
flexDirection: "column",
|
|
1134
|
+
padding: "6px 10px",
|
|
1135
|
+
borderRadius: 8,
|
|
1136
|
+
border: `1px solid ${macOSColors.border.default}`,
|
|
1137
|
+
backgroundColor: macOSColors.background.hover,
|
|
1138
|
+
alignItems: "center",
|
|
1139
|
+
cursor: "pointer",
|
|
1140
|
+
margin: 0
|
|
1141
|
+
},
|
|
1142
|
+
modeToggleButtonActive: {
|
|
1143
|
+
border: `1px solid ${macOSColors.semantic.info}`,
|
|
1144
|
+
backgroundColor: `${macOSColors.semantic.info}22`
|
|
1145
|
+
},
|
|
1146
|
+
modeToggleButtonText: {
|
|
1147
|
+
fontSize: 11,
|
|
1148
|
+
fontWeight: 700,
|
|
1149
|
+
color: macOSColors.text.secondary,
|
|
1150
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1151
|
+
letterSpacing: 0.3
|
|
1152
|
+
},
|
|
1153
|
+
modeToggleButtonTextActive: {
|
|
1154
|
+
color: macOSColors.semantic.info
|
|
1155
|
+
},
|
|
1156
|
+
modeToggleButtonHint: {
|
|
1157
|
+
fontSize: 9,
|
|
1158
|
+
color: macOSColors.text.muted,
|
|
1159
|
+
marginTop: 1
|
|
1160
|
+
},
|
|
1161
|
+
// FilterComponents.tsx add button/input
|
|
1162
|
+
addButton: {
|
|
1163
|
+
display: "flex",
|
|
1164
|
+
flexDirection: "row",
|
|
1165
|
+
alignItems: "center",
|
|
1166
|
+
justifyContent: "center",
|
|
1167
|
+
padding: "10px 14px",
|
|
1168
|
+
borderRadius: 10,
|
|
1169
|
+
borderWidth: 1,
|
|
1170
|
+
borderStyle: "dashed",
|
|
1171
|
+
backgroundColor: buoyColors.input,
|
|
1172
|
+
cursor: "pointer",
|
|
1173
|
+
margin: 0,
|
|
1174
|
+
width: "100%",
|
|
1175
|
+
boxSizing: "border-box"
|
|
1176
|
+
},
|
|
1177
|
+
addButtonText: {
|
|
1178
|
+
fontSize: 13,
|
|
1179
|
+
fontWeight: 500,
|
|
1180
|
+
marginLeft: 6
|
|
1181
|
+
},
|
|
1182
|
+
inputContainer: {
|
|
1183
|
+
display: "flex",
|
|
1184
|
+
flexDirection: "row",
|
|
1185
|
+
alignItems: "center",
|
|
1186
|
+
backgroundColor: buoyColors.input,
|
|
1187
|
+
borderRadius: 10,
|
|
1188
|
+
borderWidth: 1,
|
|
1189
|
+
borderStyle: "solid",
|
|
1190
|
+
padding: "10px 14px",
|
|
1191
|
+
marginBottom: 8,
|
|
1192
|
+
boxSizing: "border-box"
|
|
1193
|
+
},
|
|
1194
|
+
input: {
|
|
1195
|
+
flex: 1,
|
|
1196
|
+
fontSize: 13,
|
|
1197
|
+
padding: 0,
|
|
1198
|
+
border: "none",
|
|
1199
|
+
outline: "none",
|
|
1200
|
+
background: "transparent",
|
|
1201
|
+
fontFamily: "inherit",
|
|
1202
|
+
minWidth: 0
|
|
1203
|
+
},
|
|
1204
|
+
inputButtons: {
|
|
1205
|
+
display: "flex",
|
|
1206
|
+
flexDirection: "row",
|
|
1207
|
+
alignItems: "center",
|
|
1208
|
+
gap: 8
|
|
1209
|
+
},
|
|
1210
|
+
cancelButton: {
|
|
1211
|
+
display: "inline-flex",
|
|
1212
|
+
padding: 4,
|
|
1213
|
+
borderRadius: 6,
|
|
1214
|
+
backgroundColor: buoyColors.hover,
|
|
1215
|
+
border: "none",
|
|
1216
|
+
cursor: "pointer",
|
|
1217
|
+
margin: 0
|
|
1218
|
+
},
|
|
1219
|
+
inlineAddButton: {
|
|
1220
|
+
display: "inline-flex",
|
|
1221
|
+
padding: "6px 12px",
|
|
1222
|
+
borderRadius: 6,
|
|
1223
|
+
borderWidth: 1,
|
|
1224
|
+
borderStyle: "solid",
|
|
1225
|
+
cursor: "pointer",
|
|
1226
|
+
margin: 0
|
|
1227
|
+
},
|
|
1228
|
+
inlineAddButtonText: {
|
|
1229
|
+
fontSize: 12,
|
|
1230
|
+
fontWeight: 600
|
|
1231
|
+
},
|
|
1232
|
+
availableKeysSection: {
|
|
1233
|
+
backgroundColor: buoyColors.card,
|
|
1234
|
+
borderRadius: 16,
|
|
1235
|
+
border: `1px solid ${buoyColors.border}`,
|
|
1236
|
+
marginTop: 16,
|
|
1237
|
+
overflow: "hidden"
|
|
1238
|
+
},
|
|
1239
|
+
availableKeysScroll: {
|
|
1240
|
+
maxHeight: 150,
|
|
1241
|
+
overflowY: "auto",
|
|
1242
|
+
padding: "8px 16px 16px 16px"
|
|
1243
|
+
},
|
|
1244
|
+
availableKeyItem: {
|
|
1245
|
+
display: "flex",
|
|
1246
|
+
flexDirection: "row",
|
|
1247
|
+
alignItems: "center",
|
|
1248
|
+
justifyContent: "space-between",
|
|
1249
|
+
padding: "10px 12px",
|
|
1250
|
+
backgroundColor: buoyColors.hover,
|
|
1251
|
+
borderRadius: 8,
|
|
1252
|
+
border: `1px solid ${buoyColors.border}`,
|
|
1253
|
+
marginBottom: 8,
|
|
1254
|
+
cursor: "pointer",
|
|
1255
|
+
width: "100%",
|
|
1256
|
+
boxSizing: "border-box",
|
|
1257
|
+
textAlign: "left"
|
|
1258
|
+
},
|
|
1259
|
+
availableKeyText: {
|
|
1260
|
+
flex: 1,
|
|
1261
|
+
fontSize: 11,
|
|
1262
|
+
color: buoyColors.text,
|
|
1263
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1264
|
+
marginRight: 8,
|
|
1265
|
+
whiteSpace: "nowrap",
|
|
1266
|
+
overflow: "hidden",
|
|
1267
|
+
textOverflow: "ellipsis",
|
|
1268
|
+
minWidth: 0
|
|
1269
|
+
},
|
|
1270
|
+
emptyStateText: {
|
|
1271
|
+
fontSize: 11,
|
|
1272
|
+
color: buoyColors.textMuted,
|
|
1273
|
+
fontStyle: "italic",
|
|
1274
|
+
textAlign: "center",
|
|
1275
|
+
padding: "12px 0"
|
|
1276
|
+
},
|
|
1277
|
+
howItWorksSection: {
|
|
1278
|
+
backgroundColor: buoyColors.card,
|
|
1279
|
+
borderRadius: 16,
|
|
1280
|
+
border: `1px solid ${buoyColors.border}`,
|
|
1281
|
+
marginTop: 16,
|
|
1282
|
+
overflow: "hidden"
|
|
1283
|
+
},
|
|
1284
|
+
howItWorksText: {
|
|
1285
|
+
fontSize: 11,
|
|
1286
|
+
color: buoyColors.textSecondary,
|
|
1287
|
+
lineHeight: "16px",
|
|
1288
|
+
margin: "8px 0 12px 0",
|
|
1289
|
+
padding: "0 16px",
|
|
1290
|
+
fontFamily: "ui-monospace, Menlo, monospace"
|
|
1291
|
+
},
|
|
1292
|
+
examplesContainer: {
|
|
1293
|
+
padding: "8px 16px 16px 16px",
|
|
1294
|
+
borderTop: `1px solid ${buoyColors.border}`
|
|
1295
|
+
},
|
|
1296
|
+
examplesTitle: {
|
|
1297
|
+
fontSize: 10,
|
|
1298
|
+
fontWeight: 600,
|
|
1299
|
+
color: buoyColors.textMuted,
|
|
1300
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1301
|
+
letterSpacing: 0.5,
|
|
1302
|
+
marginBottom: 6
|
|
1303
|
+
},
|
|
1304
|
+
exampleItem: {
|
|
1305
|
+
fontSize: 10,
|
|
1306
|
+
color: buoyColors.textMuted,
|
|
1307
|
+
fontFamily: "ui-monospace, Menlo, monospace",
|
|
1308
|
+
lineHeight: "16px"
|
|
1309
|
+
}
|
|
1310
|
+
};
|