@rozenite/network-activity-plugin 1.7.0 → 1.8.1
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/CHANGELOG.md +32 -0
- package/README.md +24 -0
- package/dist/devtools/App.html +2 -2
- package/dist/devtools/assets/{App-pokLiGYV.js → App-B3xlUjs6.js} +163 -115
- package/dist/devtools/assets/{App-BrSkOkws.css → App-m6xge0az.css} +13 -0
- package/dist/react-native/chunks/boot-recording.cjs +307 -28
- package/dist/react-native/chunks/boot-recording.js +310 -31
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.cjs +192 -141
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.js +193 -142
- package/dist/react-native/index.d.ts +24 -7
- package/dist/rozenite.json +1 -1
- package/dist/sdk/index.cjs +127 -0
- package/dist/sdk/index.d.ts +1243 -0
- package/dist/sdk/index.js +127 -0
- package/package.json +17 -6
- package/sdk.ts +59 -0
- package/src/react-native/__tests__/events-listener.test.ts +35 -0
- package/src/react-native/agent/__tests__/network-activity-agent-state.test.ts +21 -9
- package/src/react-native/agent/state.ts +13 -13
- package/src/react-native/agent/tools.ts +20 -146
- package/src/react-native/agent/use-network-activity-agent-tools.ts +73 -64
- package/src/react-native/events-listener.ts +12 -3
- package/src/react-native/http/http-inspector.ts +19 -5
- package/src/react-native/network-inspector.ts +46 -8
- package/src/react-native/nitro-fetch/__tests__/nitro-network-inspector.test.ts +198 -0
- package/src/react-native/nitro-fetch/nitro-network-inspector.ts +403 -0
- package/src/react-native/useHttpInspector.ts +9 -19
- package/src/react-native/useNetworkActivityDevTools.ts +13 -1
- package/src/react-native/websocket/__tests__/websocket-inspector.test.ts +69 -0
- package/src/react-native/websocket/websocket-inspector.ts +32 -17
- package/src/shared/agent-tools.ts +230 -0
- package/src/shared/client.ts +3 -0
- package/src/shared/http-events.ts +6 -0
- package/src/shared/websocket-events.ts +16 -7
- package/src/ui/components/RequestList.tsx +21 -0
- package/src/ui/components/SidePanel.tsx +12 -9
- package/src/ui/state/derived.ts +4 -0
- package/src/ui/state/model.ts +6 -1
- package/src/ui/state/store.ts +52 -36
- package/src/ui/tabs/HeadersTab.tsx +18 -4
- package/src/ui/tabs/ResponseTab.tsx +5 -3
- package/tsconfig.json +4 -1
- package/vite.config.ts +7 -0
|
@@ -406,9 +406,9 @@ function requireNormalizeColors() {
|
|
|
406
406
|
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
407
407
|
const p = 2 * l - q;
|
|
408
408
|
const r2 = hue2rgb(p, q, h2 + 1 / 3);
|
|
409
|
-
const
|
|
409
|
+
const g2 = hue2rgb(p, q, h2);
|
|
410
410
|
const b2 = hue2rgb(p, q, h2 - 1 / 3);
|
|
411
|
-
return Math.round(r2 * 255) << 24 | Math.round(
|
|
411
|
+
return Math.round(r2 * 255) << 24 | Math.round(g2 * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
412
412
|
}
|
|
413
413
|
function hwbToRgb(h2, w2, b2) {
|
|
414
414
|
if (w2 + b2 >= 1) {
|
|
@@ -819,11 +819,11 @@ var normalizeColor = function normalizeColor2(color2, opacity) {
|
|
|
819
819
|
var colorInt = processColor(color2);
|
|
820
820
|
if (colorInt != null) {
|
|
821
821
|
var r2 = colorInt >> 16 & 255;
|
|
822
|
-
var
|
|
822
|
+
var g2 = colorInt >> 8 & 255;
|
|
823
823
|
var b2 = colorInt & 255;
|
|
824
824
|
var a = (colorInt >> 24 & 255) / 255;
|
|
825
825
|
var alpha = (a * opacity).toFixed(2);
|
|
826
|
-
return "rgba(" + r2 + "," +
|
|
826
|
+
return "rgba(" + r2 + "," + g2 + "," + b2 + "," + alpha + ")";
|
|
827
827
|
}
|
|
828
828
|
};
|
|
829
829
|
var colorProps = {
|
|
@@ -17081,23 +17081,23 @@ function requireJsxRuntime() {
|
|
|
17081
17081
|
return jsxRuntime.exports;
|
|
17082
17082
|
}
|
|
17083
17083
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
17084
|
-
const f = () => typeof window < "u" && typeof window.document < "u", m = () => f() && typeof window.__ROZENITE_WEB__ < "u",
|
|
17085
|
-
class
|
|
17084
|
+
const f = () => typeof window < "u" && typeof window.document < "u", m = () => f() && typeof window.__ROZENITE_WEB__ < "u", y = () => typeof window > "u";
|
|
17085
|
+
class w extends Error {
|
|
17086
17086
|
constructor(n) {
|
|
17087
17087
|
super(`Unsupported platform: ${n}`), this.name = "UnsupportedPlatformError";
|
|
17088
17088
|
}
|
|
17089
17089
|
}
|
|
17090
|
-
class
|
|
17090
|
+
class g extends Error {
|
|
17091
17091
|
constructor() {
|
|
17092
17092
|
super(
|
|
17093
17093
|
"Rozenite for web is not configured. A separate integration is required for web. Consult Rozenite docs for details."
|
|
17094
17094
|
), this.name = "MissingRozeniteForWebError";
|
|
17095
17095
|
}
|
|
17096
17096
|
}
|
|
17097
|
-
const u = "rozenite",
|
|
17097
|
+
const u = "rozenite", T = () => {
|
|
17098
17098
|
const e = self.__FUSEBOX_REACT_DEVTOOLS_DISPATCHER__, n = e.BINDING_NAME;
|
|
17099
17099
|
return self[n] != null ? e.initializeDomain(u) : null;
|
|
17100
|
-
},
|
|
17100
|
+
}, v = () => new Promise((e) => {
|
|
17101
17101
|
const n = (t) => {
|
|
17102
17102
|
t.name === u && (self.__FUSEBOX_REACT_DEVTOOLS_DISPATCHER__.onDomainInitialization.removeEventListener(
|
|
17103
17103
|
n
|
|
@@ -17106,10 +17106,10 @@ const u = "rozenite", y = () => {
|
|
|
17106
17106
|
self.__FUSEBOX_REACT_DEVTOOLS_DISPATCHER__.onDomainInitialization.addEventListener(
|
|
17107
17107
|
n
|
|
17108
17108
|
);
|
|
17109
|
-
}),
|
|
17109
|
+
}), D = async () => {
|
|
17110
17110
|
const e = /* @__PURE__ */ new Set();
|
|
17111
|
-
let n =
|
|
17112
|
-
n || (n = await
|
|
17111
|
+
let n = T();
|
|
17112
|
+
n || (n = await v());
|
|
17113
17113
|
const t = () => {
|
|
17114
17114
|
if (!n)
|
|
17115
17115
|
throw new Error("Domain not initialized");
|
|
@@ -17145,13 +17145,13 @@ const u = "rozenite", y = () => {
|
|
|
17145
17145
|
);
|
|
17146
17146
|
}
|
|
17147
17147
|
};
|
|
17148
|
-
},
|
|
17148
|
+
}, R = async () => {
|
|
17149
17149
|
if (f() && !m())
|
|
17150
|
-
throw new
|
|
17151
|
-
if (
|
|
17152
|
-
throw new
|
|
17153
|
-
return
|
|
17154
|
-
},
|
|
17150
|
+
throw new g();
|
|
17151
|
+
if (y())
|
|
17152
|
+
throw new w("server");
|
|
17153
|
+
return D();
|
|
17154
|
+
}, h = async () => {
|
|
17155
17155
|
const e = /* @__PURE__ */ new Set(), n = (t) => {
|
|
17156
17156
|
e.forEach((l) => {
|
|
17157
17157
|
l(t.data);
|
|
@@ -17178,7 +17178,7 @@ let c = null;
|
|
|
17178
17178
|
const C = async () => {
|
|
17179
17179
|
if (c)
|
|
17180
17180
|
return c;
|
|
17181
|
-
const n = "__ROZENITE_PANEL__" in window ?
|
|
17181
|
+
const n = "__ROZENITE_PANEL__" in window ? h() : R();
|
|
17182
17182
|
c = n;
|
|
17183
17183
|
try {
|
|
17184
17184
|
const t = await n;
|
|
@@ -17192,8 +17192,8 @@ const C = async () => {
|
|
|
17192
17192
|
if (!s || s.pluginId !== e)
|
|
17193
17193
|
return;
|
|
17194
17194
|
const i = t.get(s.type);
|
|
17195
|
-
i?.forEach((
|
|
17196
|
-
|
|
17195
|
+
i?.forEach((p) => {
|
|
17196
|
+
p(s.payload);
|
|
17197
17197
|
});
|
|
17198
17198
|
}, d = (a, s) => {
|
|
17199
17199
|
n.send({
|
|
@@ -17216,7 +17216,7 @@ const C = async () => {
|
|
|
17216
17216
|
t.clear(), r2.remove(), n.close();
|
|
17217
17217
|
}
|
|
17218
17218
|
};
|
|
17219
|
-
},
|
|
17219
|
+
}, b = async (e) => L(e), M = () => "__ROZENITE_PANEL__" in globalThis, O = ({
|
|
17220
17220
|
pluginId: e
|
|
17221
17221
|
}) => {
|
|
17222
17222
|
const [n, t] = reactExports.useState(null), [l, d] = reactExports.useState(null);
|
|
@@ -17224,15 +17224,15 @@ const C = async () => {
|
|
|
17224
17224
|
let r2 = true, o = null;
|
|
17225
17225
|
const a = async () => {
|
|
17226
17226
|
try {
|
|
17227
|
-
o = await
|
|
17227
|
+
o = await b(e), r2 && t(o);
|
|
17228
17228
|
} catch (i) {
|
|
17229
|
-
if (i instanceof
|
|
17229
|
+
if (i instanceof g) {
|
|
17230
17230
|
console.warn(
|
|
17231
17231
|
`[Rozenite, ${e}] Rozenite for web is not configured. A separate integration is required for web. Consult Rozenite docs for details.`
|
|
17232
17232
|
);
|
|
17233
17233
|
return;
|
|
17234
17234
|
}
|
|
17235
|
-
if (i instanceof
|
|
17235
|
+
if (i instanceof w) {
|
|
17236
17236
|
console.warn(
|
|
17237
17237
|
`[Rozenite, ${e}] Unsupported platform, skipping setup.`
|
|
17238
17238
|
);
|
|
@@ -17251,7 +17251,18 @@ const C = async () => {
|
|
|
17251
17251
|
};
|
|
17252
17252
|
}, [e]), l != null)
|
|
17253
17253
|
throw l;
|
|
17254
|
-
return
|
|
17254
|
+
return reactExports.useEffect(() => {
|
|
17255
|
+
if (!n || M())
|
|
17256
|
+
return;
|
|
17257
|
+
const r2 = n, o = setTimeout(() => {
|
|
17258
|
+
r2.send("plugin-mounted", {
|
|
17259
|
+
pluginId: e
|
|
17260
|
+
});
|
|
17261
|
+
}, 0);
|
|
17262
|
+
return () => {
|
|
17263
|
+
clearTimeout(o);
|
|
17264
|
+
};
|
|
17265
|
+
}, [n, e]), n;
|
|
17255
17266
|
};
|
|
17256
17267
|
function setRef(ref, value) {
|
|
17257
17268
|
if (typeof ref === "function") {
|
|
@@ -20842,6 +20853,14 @@ const createNetworkActivityStore = () => createStore()(
|
|
|
20842
20853
|
// Event handling
|
|
20843
20854
|
handleEvent: (eventType, data) => {
|
|
20844
20855
|
switch (eventType) {
|
|
20856
|
+
case "recording-state": {
|
|
20857
|
+
const eventData = data;
|
|
20858
|
+
const { isRecording, _client } = get();
|
|
20859
|
+
if (_client && isRecording !== eventData.isRecording) {
|
|
20860
|
+
_client.send(isRecording ? "network-enable" : "network-disable", {});
|
|
20861
|
+
}
|
|
20862
|
+
break;
|
|
20863
|
+
}
|
|
20845
20864
|
case "client-ui-settings": {
|
|
20846
20865
|
const eventData = data;
|
|
20847
20866
|
set({ clientUISettings: eventData.settings || null });
|
|
@@ -20859,6 +20878,7 @@ const createNetworkActivityStore = () => createStore()(
|
|
|
20859
20878
|
id: eventData.requestId,
|
|
20860
20879
|
type: "http",
|
|
20861
20880
|
timestamp: eventData.timestamp,
|
|
20881
|
+
source: eventData.source ?? "builtin",
|
|
20862
20882
|
request: {
|
|
20863
20883
|
url: eventData.request.url,
|
|
20864
20884
|
method: eventData.request.method,
|
|
@@ -20988,6 +21008,7 @@ const createNetworkActivityStore = () => createStore()(
|
|
|
20988
21008
|
id: `ws-${eventData.socketId}`,
|
|
20989
21009
|
type: "websocket",
|
|
20990
21010
|
timestamp: eventData.timestamp,
|
|
21011
|
+
source: eventData.source ?? "builtin",
|
|
20991
21012
|
connection: {
|
|
20992
21013
|
url: eventData.url,
|
|
20993
21014
|
socketId: eventData.socketId,
|
|
@@ -21219,6 +21240,10 @@ const createNetworkActivityStore = () => createStore()(
|
|
|
21219
21240
|
setupClient: (client2) => {
|
|
21220
21241
|
const { handleEvent } = get();
|
|
21221
21242
|
const unsubscribeFunctions = [
|
|
21243
|
+
client2.onMessage(
|
|
21244
|
+
"recording-state",
|
|
21245
|
+
(data) => handleEvent("recording-state", data)
|
|
21246
|
+
),
|
|
21222
21247
|
client2.onMessage(
|
|
21223
21248
|
"client-ui-settings",
|
|
21224
21249
|
(data) => handleEvent("client-ui-settings", data)
|
|
@@ -21627,6 +21652,7 @@ const getProcessedRequests = memoize((state) => {
|
|
|
21627
21652
|
requests.push({
|
|
21628
21653
|
id: httpEntry.id,
|
|
21629
21654
|
type: "http",
|
|
21655
|
+
source: httpEntry.source,
|
|
21630
21656
|
name: httpEntry.request.url,
|
|
21631
21657
|
status: httpEntry.status,
|
|
21632
21658
|
timestamp: httpEntry.timestamp,
|
|
@@ -21641,6 +21667,7 @@ const getProcessedRequests = memoize((state) => {
|
|
|
21641
21667
|
requests.push({
|
|
21642
21668
|
id: wsEntry.id,
|
|
21643
21669
|
type: "websocket",
|
|
21670
|
+
source: wsEntry.source,
|
|
21644
21671
|
name: wsEntry.connection.url,
|
|
21645
21672
|
status: wsEntry.status,
|
|
21646
21673
|
timestamp: wsEntry.timestamp,
|
|
@@ -22634,7 +22661,7 @@ function orderColumns(leafColumns, grouping, groupedColumnMode) {
|
|
|
22634
22661
|
if (groupedColumnMode === "remove") {
|
|
22635
22662
|
return nonGroupingColumns;
|
|
22636
22663
|
}
|
|
22637
|
-
const groupingColumns = grouping.map((
|
|
22664
|
+
const groupingColumns = grouping.map((g2) => leafColumns.find((col) => col.id === g2)).filter(Boolean);
|
|
22638
22665
|
return [...groupingColumns, ...nonGroupingColumns];
|
|
22639
22666
|
}
|
|
22640
22667
|
const ColumnOrdering = {
|
|
@@ -22845,7 +22872,7 @@ const ColumnSizing = {
|
|
|
22845
22872
|
column.resetSize = () => {
|
|
22846
22873
|
table.setColumnSizing((_ref2) => {
|
|
22847
22874
|
let {
|
|
22848
|
-
[column.id]:
|
|
22875
|
+
[column.id]: _,
|
|
22849
22876
|
...rest
|
|
22850
22877
|
} = _ref2;
|
|
22851
22878
|
return rest;
|
|
@@ -23308,7 +23335,7 @@ const RowExpanding = {
|
|
|
23308
23335
|
}
|
|
23309
23336
|
if (exists && !expanded) {
|
|
23310
23337
|
const {
|
|
23311
|
-
[row.id]:
|
|
23338
|
+
[row.id]: _,
|
|
23312
23339
|
...rest
|
|
23313
23340
|
} = oldExpanded;
|
|
23314
23341
|
return rest;
|
|
@@ -23440,7 +23467,7 @@ const RowPagination = {
|
|
|
23440
23467
|
table.getPageOptions = memo(() => [table.getPageCount()], (pageCount) => {
|
|
23441
23468
|
let pageOptions = [];
|
|
23442
23469
|
if (pageCount && pageCount > 0) {
|
|
23443
|
-
pageOptions = [...new Array(pageCount)].fill(null).map((
|
|
23470
|
+
pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i);
|
|
23444
23471
|
}
|
|
23445
23472
|
return pageOptions;
|
|
23446
23473
|
}, getMemoOptions(table.options, "debugTable"));
|
|
@@ -24491,6 +24518,15 @@ const getStatusColor = (status) => {
|
|
|
24491
24518
|
return "text-gray-400";
|
|
24492
24519
|
};
|
|
24493
24520
|
const isNumber = (value) => typeof value === "number" && !isNaN(value);
|
|
24521
|
+
const getSourceLabel = (source) => {
|
|
24522
|
+
if (source === "nitro") {
|
|
24523
|
+
return "Nitro";
|
|
24524
|
+
}
|
|
24525
|
+
if (source === "builtin") {
|
|
24526
|
+
return "Built-in";
|
|
24527
|
+
}
|
|
24528
|
+
return null;
|
|
24529
|
+
};
|
|
24494
24530
|
const formatSize = (bytes) => {
|
|
24495
24531
|
if (bytes === 0) return "0 B";
|
|
24496
24532
|
const k = 1024;
|
|
@@ -24586,6 +24622,7 @@ const processNetworkRequests = (processedRequests, overrides, showEntirePathAsNa
|
|
|
24586
24622
|
size: isNumber(request.size) ? formatSize(request.size) : "—",
|
|
24587
24623
|
time: formatDuration(duration),
|
|
24588
24624
|
type: request.type,
|
|
24625
|
+
source: request.source,
|
|
24589
24626
|
startTime: formatStartTime(request.timestamp),
|
|
24590
24627
|
hasOverride
|
|
24591
24628
|
};
|
|
@@ -24603,7 +24640,8 @@ const columns$1 = [
|
|
|
24603
24640
|
header: "Name",
|
|
24604
24641
|
cell: ({ row, getValue: getValue2 }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0 truncate", title: row.original.path, children: [
|
|
24605
24642
|
getValue2(),
|
|
24606
|
-
row.original.hasOverride && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-violet-300 ms-2 inline-block" })
|
|
24643
|
+
row.original.hasOverride && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-2 h-2 rounded-full bg-violet-300 ms-2 inline-block" }),
|
|
24644
|
+
getSourceLabel(row.original.source) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 rounded border border-gray-700 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-gray-400", children: getSourceLabel(row.original.source) })
|
|
24607
24645
|
] }),
|
|
24608
24646
|
sortingFn: "alphanumeric"
|
|
24609
24647
|
}),
|
|
@@ -25196,7 +25234,7 @@ function focusFirst$2(candidates, preventScroll = false) {
|
|
|
25196
25234
|
}
|
|
25197
25235
|
}
|
|
25198
25236
|
function wrapArray$1(array, startIndex) {
|
|
25199
|
-
return array.map((
|
|
25237
|
+
return array.map((_, index2) => array[(startIndex + index2) % array.length]);
|
|
25200
25238
|
}
|
|
25201
25239
|
var Root$2 = RovingFocusGroup;
|
|
25202
25240
|
var Item = RovingFocusGroupItem;
|
|
@@ -30598,7 +30636,7 @@ function focusFirst(candidates) {
|
|
|
30598
30636
|
}
|
|
30599
30637
|
}
|
|
30600
30638
|
function wrapArray(array, startIndex) {
|
|
30601
|
-
return array.map((
|
|
30639
|
+
return array.map((_, index2) => array[(startIndex + index2) % array.length]);
|
|
30602
30640
|
}
|
|
30603
30641
|
function getNextMatch(values, search, currentMatch) {
|
|
30604
30642
|
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
|
|
@@ -31081,6 +31119,7 @@ function getHeadersItems(headers) {
|
|
|
31081
31119
|
}
|
|
31082
31120
|
const HeadersTab = ({ selectedRequest }) => {
|
|
31083
31121
|
const requestBody = selectedRequest.request.body;
|
|
31122
|
+
const sourceLabel = selectedRequest.source === "nitro" ? "Nitro" : selectedRequest.source === "builtin" ? "Built-in" : null;
|
|
31084
31123
|
const generalItems = reactExports.useMemo(
|
|
31085
31124
|
() => [
|
|
31086
31125
|
{
|
|
@@ -31103,9 +31142,15 @@ const HeadersTab = ({ selectedRequest }) => {
|
|
|
31103
31142
|
value: requestBody.type,
|
|
31104
31143
|
valueClassName: "text-blue-400"
|
|
31105
31144
|
}
|
|
31145
|
+
] : [],
|
|
31146
|
+
...sourceLabel ? [
|
|
31147
|
+
{
|
|
31148
|
+
key: "Source",
|
|
31149
|
+
value: sourceLabel
|
|
31150
|
+
}
|
|
31106
31151
|
] : []
|
|
31107
31152
|
],
|
|
31108
|
-
[selectedRequest]
|
|
31153
|
+
[requestBody, selectedRequest, sourceLabel]
|
|
31109
31154
|
);
|
|
31110
31155
|
const responseHeadersItems = reactExports.useMemo(
|
|
31111
31156
|
() => getHeadersItems(selectedRequest.response?.headers),
|
|
@@ -31498,9 +31543,9 @@ function requireColorString() {
|
|
|
31498
31543
|
cs.to.rgb.percent = function() {
|
|
31499
31544
|
var rgba = swizzle(arguments);
|
|
31500
31545
|
var r2 = Math.round(rgba[0] / 255 * 100);
|
|
31501
|
-
var
|
|
31546
|
+
var g2 = Math.round(rgba[1] / 255 * 100);
|
|
31502
31547
|
var b2 = Math.round(rgba[2] / 255 * 100);
|
|
31503
|
-
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r2 + "%, " +
|
|
31548
|
+
return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r2 + "%, " + g2 + "%, " + b2 + "%)" : "rgba(" + r2 + "%, " + g2 + "%, " + b2 + "%, " + rgba[3] + ")";
|
|
31504
31549
|
};
|
|
31505
31550
|
cs.to.hsl = function() {
|
|
31506
31551
|
var hsla = swizzle(arguments);
|
|
@@ -31572,21 +31617,21 @@ function requireConversions() {
|
|
|
31572
31617
|
}
|
|
31573
31618
|
convert.rgb.hsl = function(rgb) {
|
|
31574
31619
|
const r2 = rgb[0] / 255;
|
|
31575
|
-
const
|
|
31620
|
+
const g2 = rgb[1] / 255;
|
|
31576
31621
|
const b2 = rgb[2] / 255;
|
|
31577
|
-
const min2 = Math.min(r2,
|
|
31578
|
-
const max2 = Math.max(r2,
|
|
31622
|
+
const min2 = Math.min(r2, g2, b2);
|
|
31623
|
+
const max2 = Math.max(r2, g2, b2);
|
|
31579
31624
|
const delta = max2 - min2;
|
|
31580
31625
|
let h2;
|
|
31581
31626
|
let s;
|
|
31582
31627
|
if (max2 === min2) {
|
|
31583
31628
|
h2 = 0;
|
|
31584
31629
|
} else if (r2 === max2) {
|
|
31585
|
-
h2 = (
|
|
31586
|
-
} else if (
|
|
31630
|
+
h2 = (g2 - b2) / delta;
|
|
31631
|
+
} else if (g2 === max2) {
|
|
31587
31632
|
h2 = 2 + (b2 - r2) / delta;
|
|
31588
31633
|
} else if (b2 === max2) {
|
|
31589
|
-
h2 = 4 + (r2 -
|
|
31634
|
+
h2 = 4 + (r2 - g2) / delta;
|
|
31590
31635
|
}
|
|
31591
31636
|
h2 = Math.min(h2 * 60, 360);
|
|
31592
31637
|
if (h2 < 0) {
|
|
@@ -31609,10 +31654,10 @@ function requireConversions() {
|
|
|
31609
31654
|
let h2;
|
|
31610
31655
|
let s;
|
|
31611
31656
|
const r2 = rgb[0] / 255;
|
|
31612
|
-
const
|
|
31657
|
+
const g2 = rgb[1] / 255;
|
|
31613
31658
|
const b2 = rgb[2] / 255;
|
|
31614
|
-
const v2 = Math.max(r2,
|
|
31615
|
-
const diff = v2 - Math.min(r2,
|
|
31659
|
+
const v2 = Math.max(r2, g2, b2);
|
|
31660
|
+
const diff = v2 - Math.min(r2, g2, b2);
|
|
31616
31661
|
const diffc = function(c2) {
|
|
31617
31662
|
return (v2 - c2) / 6 / diff + 1 / 2;
|
|
31618
31663
|
};
|
|
@@ -31622,11 +31667,11 @@ function requireConversions() {
|
|
|
31622
31667
|
} else {
|
|
31623
31668
|
s = diff / v2;
|
|
31624
31669
|
rdif = diffc(r2);
|
|
31625
|
-
gdif = diffc(
|
|
31670
|
+
gdif = diffc(g2);
|
|
31626
31671
|
bdif = diffc(b2);
|
|
31627
31672
|
if (r2 === v2) {
|
|
31628
31673
|
h2 = bdif - gdif;
|
|
31629
|
-
} else if (
|
|
31674
|
+
} else if (g2 === v2) {
|
|
31630
31675
|
h2 = 1 / 3 + rdif - bdif;
|
|
31631
31676
|
} else if (b2 === v2) {
|
|
31632
31677
|
h2 = 2 / 3 + gdif - rdif;
|
|
@@ -31645,20 +31690,20 @@ function requireConversions() {
|
|
|
31645
31690
|
};
|
|
31646
31691
|
convert.rgb.hwb = function(rgb) {
|
|
31647
31692
|
const r2 = rgb[0];
|
|
31648
|
-
const
|
|
31693
|
+
const g2 = rgb[1];
|
|
31649
31694
|
let b2 = rgb[2];
|
|
31650
31695
|
const h2 = convert.rgb.hsl(rgb)[0];
|
|
31651
|
-
const w2 = 1 / 255 * Math.min(r2, Math.min(
|
|
31652
|
-
b2 = 1 - 1 / 255 * Math.max(r2, Math.max(
|
|
31696
|
+
const w2 = 1 / 255 * Math.min(r2, Math.min(g2, b2));
|
|
31697
|
+
b2 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b2));
|
|
31653
31698
|
return [h2, w2 * 100, b2 * 100];
|
|
31654
31699
|
};
|
|
31655
31700
|
convert.rgb.cmyk = function(rgb) {
|
|
31656
31701
|
const r2 = rgb[0] / 255;
|
|
31657
|
-
const
|
|
31702
|
+
const g2 = rgb[1] / 255;
|
|
31658
31703
|
const b2 = rgb[2] / 255;
|
|
31659
|
-
const k = Math.min(1 - r2, 1 -
|
|
31704
|
+
const k = Math.min(1 - r2, 1 - g2, 1 - b2);
|
|
31660
31705
|
const c2 = (1 - r2 - k) / (1 - k) || 0;
|
|
31661
|
-
const m2 = (1 -
|
|
31706
|
+
const m2 = (1 - g2 - k) / (1 - k) || 0;
|
|
31662
31707
|
const y2 = (1 - b2 - k) / (1 - k) || 0;
|
|
31663
31708
|
return [c2 * 100, m2 * 100, y2 * 100, k * 100];
|
|
31664
31709
|
};
|
|
@@ -31687,14 +31732,14 @@ function requireConversions() {
|
|
|
31687
31732
|
};
|
|
31688
31733
|
convert.rgb.xyz = function(rgb) {
|
|
31689
31734
|
let r2 = rgb[0] / 255;
|
|
31690
|
-
let
|
|
31735
|
+
let g2 = rgb[1] / 255;
|
|
31691
31736
|
let b2 = rgb[2] / 255;
|
|
31692
31737
|
r2 = r2 > 0.04045 ? ((r2 + 0.055) / 1.055) ** 2.4 : r2 / 12.92;
|
|
31693
|
-
|
|
31738
|
+
g2 = g2 > 0.04045 ? ((g2 + 0.055) / 1.055) ** 2.4 : g2 / 12.92;
|
|
31694
31739
|
b2 = b2 > 0.04045 ? ((b2 + 0.055) / 1.055) ** 2.4 : b2 / 12.92;
|
|
31695
|
-
const x = r2 * 0.4124 +
|
|
31696
|
-
const y2 = r2 * 0.2126 +
|
|
31697
|
-
const z2 = r2 * 0.0193 +
|
|
31740
|
+
const x = r2 * 0.4124 + g2 * 0.3576 + b2 * 0.1805;
|
|
31741
|
+
const y2 = r2 * 0.2126 + g2 * 0.7152 + b2 * 0.0722;
|
|
31742
|
+
const z2 = r2 * 0.0193 + g2 * 0.1192 + b2 * 0.9505;
|
|
31698
31743
|
return [x * 100, y2 * 100, z2 * 100];
|
|
31699
31744
|
};
|
|
31700
31745
|
convert.rgb.lab = function(rgb) {
|
|
@@ -31823,43 +31868,43 @@ function requireConversions() {
|
|
|
31823
31868
|
}
|
|
31824
31869
|
const n = wh + f2 * (v2 - wh);
|
|
31825
31870
|
let r2;
|
|
31826
|
-
let
|
|
31871
|
+
let g2;
|
|
31827
31872
|
let b2;
|
|
31828
31873
|
switch (i) {
|
|
31829
31874
|
default:
|
|
31830
31875
|
case 6:
|
|
31831
31876
|
case 0:
|
|
31832
31877
|
r2 = v2;
|
|
31833
|
-
|
|
31878
|
+
g2 = n;
|
|
31834
31879
|
b2 = wh;
|
|
31835
31880
|
break;
|
|
31836
31881
|
case 1:
|
|
31837
31882
|
r2 = n;
|
|
31838
|
-
|
|
31883
|
+
g2 = v2;
|
|
31839
31884
|
b2 = wh;
|
|
31840
31885
|
break;
|
|
31841
31886
|
case 2:
|
|
31842
31887
|
r2 = wh;
|
|
31843
|
-
|
|
31888
|
+
g2 = v2;
|
|
31844
31889
|
b2 = n;
|
|
31845
31890
|
break;
|
|
31846
31891
|
case 3:
|
|
31847
31892
|
r2 = wh;
|
|
31848
|
-
|
|
31893
|
+
g2 = n;
|
|
31849
31894
|
b2 = v2;
|
|
31850
31895
|
break;
|
|
31851
31896
|
case 4:
|
|
31852
31897
|
r2 = n;
|
|
31853
|
-
|
|
31898
|
+
g2 = wh;
|
|
31854
31899
|
b2 = v2;
|
|
31855
31900
|
break;
|
|
31856
31901
|
case 5:
|
|
31857
31902
|
r2 = v2;
|
|
31858
|
-
|
|
31903
|
+
g2 = wh;
|
|
31859
31904
|
b2 = n;
|
|
31860
31905
|
break;
|
|
31861
31906
|
}
|
|
31862
|
-
return [r2 * 255,
|
|
31907
|
+
return [r2 * 255, g2 * 255, b2 * 255];
|
|
31863
31908
|
};
|
|
31864
31909
|
convert.cmyk.rgb = function(cmyk) {
|
|
31865
31910
|
const c2 = cmyk[0] / 100;
|
|
@@ -31867,27 +31912,27 @@ function requireConversions() {
|
|
|
31867
31912
|
const y2 = cmyk[2] / 100;
|
|
31868
31913
|
const k = cmyk[3] / 100;
|
|
31869
31914
|
const r2 = 1 - Math.min(1, c2 * (1 - k) + k);
|
|
31870
|
-
const
|
|
31915
|
+
const g2 = 1 - Math.min(1, m2 * (1 - k) + k);
|
|
31871
31916
|
const b2 = 1 - Math.min(1, y2 * (1 - k) + k);
|
|
31872
|
-
return [r2 * 255,
|
|
31917
|
+
return [r2 * 255, g2 * 255, b2 * 255];
|
|
31873
31918
|
};
|
|
31874
31919
|
convert.xyz.rgb = function(xyz) {
|
|
31875
31920
|
const x = xyz[0] / 100;
|
|
31876
31921
|
const y2 = xyz[1] / 100;
|
|
31877
31922
|
const z2 = xyz[2] / 100;
|
|
31878
31923
|
let r2;
|
|
31879
|
-
let
|
|
31924
|
+
let g2;
|
|
31880
31925
|
let b2;
|
|
31881
31926
|
r2 = x * 3.2406 + y2 * -1.5372 + z2 * -0.4986;
|
|
31882
|
-
|
|
31927
|
+
g2 = x * -0.9689 + y2 * 1.8758 + z2 * 0.0415;
|
|
31883
31928
|
b2 = x * 0.0557 + y2 * -0.204 + z2 * 1.057;
|
|
31884
31929
|
r2 = r2 > 31308e-7 ? 1.055 * r2 ** (1 / 2.4) - 0.055 : r2 * 12.92;
|
|
31885
|
-
|
|
31930
|
+
g2 = g2 > 31308e-7 ? 1.055 * g2 ** (1 / 2.4) - 0.055 : g2 * 12.92;
|
|
31886
31931
|
b2 = b2 > 31308e-7 ? 1.055 * b2 ** (1 / 2.4) - 0.055 : b2 * 12.92;
|
|
31887
31932
|
r2 = Math.min(Math.max(0, r2), 1);
|
|
31888
|
-
|
|
31933
|
+
g2 = Math.min(Math.max(0, g2), 1);
|
|
31889
31934
|
b2 = Math.min(Math.max(0, b2), 1);
|
|
31890
|
-
return [r2 * 255,
|
|
31935
|
+
return [r2 * 255, g2 * 255, b2 * 255];
|
|
31891
31936
|
};
|
|
31892
31937
|
convert.xyz.lab = function(xyz) {
|
|
31893
31938
|
let x = xyz[0];
|
|
@@ -31948,13 +31993,13 @@ function requireConversions() {
|
|
|
31948
31993
|
return [l, a, b2];
|
|
31949
31994
|
};
|
|
31950
31995
|
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
31951
|
-
const [r2,
|
|
31996
|
+
const [r2, g2, b2] = args;
|
|
31952
31997
|
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
31953
31998
|
value = Math.round(value / 50);
|
|
31954
31999
|
if (value === 0) {
|
|
31955
32000
|
return 30;
|
|
31956
32001
|
}
|
|
31957
|
-
let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(
|
|
32002
|
+
let ansi = 30 + (Math.round(b2 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255));
|
|
31958
32003
|
if (value === 2) {
|
|
31959
32004
|
ansi += 60;
|
|
31960
32005
|
}
|
|
@@ -31965,9 +32010,9 @@ function requireConversions() {
|
|
|
31965
32010
|
};
|
|
31966
32011
|
convert.rgb.ansi256 = function(args) {
|
|
31967
32012
|
const r2 = args[0];
|
|
31968
|
-
const
|
|
32013
|
+
const g2 = args[1];
|
|
31969
32014
|
const b2 = args[2];
|
|
31970
|
-
if (r2 ===
|
|
32015
|
+
if (r2 === g2 && g2 === b2) {
|
|
31971
32016
|
if (r2 < 8) {
|
|
31972
32017
|
return 16;
|
|
31973
32018
|
}
|
|
@@ -31976,7 +32021,7 @@ function requireConversions() {
|
|
|
31976
32021
|
}
|
|
31977
32022
|
return Math.round((r2 - 8) / 247 * 24) + 232;
|
|
31978
32023
|
}
|
|
31979
|
-
const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(
|
|
32024
|
+
const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b2 / 255 * 5);
|
|
31980
32025
|
return ansi;
|
|
31981
32026
|
};
|
|
31982
32027
|
convert.ansi16.rgb = function(args) {
|
|
@@ -31990,9 +32035,9 @@ function requireConversions() {
|
|
|
31990
32035
|
}
|
|
31991
32036
|
const mult = (~~(args > 50) + 1) * 0.5;
|
|
31992
32037
|
const r2 = (color2 & 1) * mult * 255;
|
|
31993
|
-
const
|
|
32038
|
+
const g2 = (color2 >> 1 & 1) * mult * 255;
|
|
31994
32039
|
const b2 = (color2 >> 2 & 1) * mult * 255;
|
|
31995
|
-
return [r2,
|
|
32040
|
+
return [r2, g2, b2];
|
|
31996
32041
|
};
|
|
31997
32042
|
convert.ansi256.rgb = function(args) {
|
|
31998
32043
|
if (args >= 232) {
|
|
@@ -32002,9 +32047,9 @@ function requireConversions() {
|
|
|
32002
32047
|
args -= 16;
|
|
32003
32048
|
let rem;
|
|
32004
32049
|
const r2 = Math.floor(args / 36) / 5 * 255;
|
|
32005
|
-
const
|
|
32050
|
+
const g2 = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
32006
32051
|
const b2 = rem % 6 / 5 * 255;
|
|
32007
|
-
return [r2,
|
|
32052
|
+
return [r2, g2, b2];
|
|
32008
32053
|
};
|
|
32009
32054
|
convert.rgb.hex = function(args) {
|
|
32010
32055
|
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
@@ -32024,16 +32069,16 @@ function requireConversions() {
|
|
|
32024
32069
|
}
|
|
32025
32070
|
const integer = parseInt(colorString2, 16);
|
|
32026
32071
|
const r2 = integer >> 16 & 255;
|
|
32027
|
-
const
|
|
32072
|
+
const g2 = integer >> 8 & 255;
|
|
32028
32073
|
const b2 = integer & 255;
|
|
32029
|
-
return [r2,
|
|
32074
|
+
return [r2, g2, b2];
|
|
32030
32075
|
};
|
|
32031
32076
|
convert.rgb.hcg = function(rgb) {
|
|
32032
32077
|
const r2 = rgb[0] / 255;
|
|
32033
|
-
const
|
|
32078
|
+
const g2 = rgb[1] / 255;
|
|
32034
32079
|
const b2 = rgb[2] / 255;
|
|
32035
|
-
const max2 = Math.max(Math.max(r2,
|
|
32036
|
-
const min2 = Math.min(Math.min(r2,
|
|
32080
|
+
const max2 = Math.max(Math.max(r2, g2), b2);
|
|
32081
|
+
const min2 = Math.min(Math.min(r2, g2), b2);
|
|
32037
32082
|
const chroma = max2 - min2;
|
|
32038
32083
|
let grayscale2;
|
|
32039
32084
|
let hue;
|
|
@@ -32045,11 +32090,11 @@ function requireConversions() {
|
|
|
32045
32090
|
if (chroma <= 0) {
|
|
32046
32091
|
hue = 0;
|
|
32047
32092
|
} else if (max2 === r2) {
|
|
32048
|
-
hue = (
|
|
32049
|
-
} else if (max2 ===
|
|
32093
|
+
hue = (g2 - b2) / chroma % 6;
|
|
32094
|
+
} else if (max2 === g2) {
|
|
32050
32095
|
hue = 2 + (b2 - r2) / chroma;
|
|
32051
32096
|
} else {
|
|
32052
|
-
hue = 4 + (r2 -
|
|
32097
|
+
hue = 4 + (r2 - g2) / chroma;
|
|
32053
32098
|
}
|
|
32054
32099
|
hue /= 6;
|
|
32055
32100
|
hue %= 1;
|
|
@@ -32078,9 +32123,9 @@ function requireConversions() {
|
|
|
32078
32123
|
convert.hcg.rgb = function(hcg) {
|
|
32079
32124
|
const h2 = hcg[0] / 360;
|
|
32080
32125
|
const c2 = hcg[1] / 100;
|
|
32081
|
-
const
|
|
32126
|
+
const g2 = hcg[2] / 100;
|
|
32082
32127
|
if (c2 === 0) {
|
|
32083
|
-
return [
|
|
32128
|
+
return [g2 * 255, g2 * 255, g2 * 255];
|
|
32084
32129
|
}
|
|
32085
32130
|
const pure = [0, 0, 0];
|
|
32086
32131
|
const hi = h2 % 1 * 6;
|
|
@@ -32118,7 +32163,7 @@ function requireConversions() {
|
|
|
32118
32163
|
pure[1] = 0;
|
|
32119
32164
|
pure[2] = w2;
|
|
32120
32165
|
}
|
|
32121
|
-
mg = (1 - c2) *
|
|
32166
|
+
mg = (1 - c2) * g2;
|
|
32122
32167
|
return [
|
|
32123
32168
|
(c2 * pure[0] + mg) * 255,
|
|
32124
32169
|
(c2 * pure[1] + mg) * 255,
|
|
@@ -32127,8 +32172,8 @@ function requireConversions() {
|
|
|
32127
32172
|
};
|
|
32128
32173
|
convert.hcg.hsv = function(hcg) {
|
|
32129
32174
|
const c2 = hcg[1] / 100;
|
|
32130
|
-
const
|
|
32131
|
-
const v2 = c2 +
|
|
32175
|
+
const g2 = hcg[2] / 100;
|
|
32176
|
+
const v2 = c2 + g2 * (1 - c2);
|
|
32132
32177
|
let f2 = 0;
|
|
32133
32178
|
if (v2 > 0) {
|
|
32134
32179
|
f2 = c2 / v2;
|
|
@@ -32137,8 +32182,8 @@ function requireConversions() {
|
|
|
32137
32182
|
};
|
|
32138
32183
|
convert.hcg.hsl = function(hcg) {
|
|
32139
32184
|
const c2 = hcg[1] / 100;
|
|
32140
|
-
const
|
|
32141
|
-
const l =
|
|
32185
|
+
const g2 = hcg[2] / 100;
|
|
32186
|
+
const l = g2 * (1 - c2) + 0.5 * c2;
|
|
32142
32187
|
let s = 0;
|
|
32143
32188
|
if (l > 0 && l < 0.5) {
|
|
32144
32189
|
s = c2 / (2 * l);
|
|
@@ -32149,8 +32194,8 @@ function requireConversions() {
|
|
|
32149
32194
|
};
|
|
32150
32195
|
convert.hcg.hwb = function(hcg) {
|
|
32151
32196
|
const c2 = hcg[1] / 100;
|
|
32152
|
-
const
|
|
32153
|
-
const v2 = c2 +
|
|
32197
|
+
const g2 = hcg[2] / 100;
|
|
32198
|
+
const v2 = c2 + g2 * (1 - c2);
|
|
32154
32199
|
return [hcg[0], (v2 - c2) * 100, (1 - v2) * 100];
|
|
32155
32200
|
};
|
|
32156
32201
|
convert.hwb.hcg = function(hwb) {
|
|
@@ -32158,11 +32203,11 @@ function requireConversions() {
|
|
|
32158
32203
|
const b2 = hwb[2] / 100;
|
|
32159
32204
|
const v2 = 1 - b2;
|
|
32160
32205
|
const c2 = v2 - w2;
|
|
32161
|
-
let
|
|
32206
|
+
let g2 = 0;
|
|
32162
32207
|
if (c2 < 1) {
|
|
32163
|
-
|
|
32208
|
+
g2 = (v2 - c2) / (1 - c2);
|
|
32164
32209
|
}
|
|
32165
|
-
return [hwb[0], c2 * 100,
|
|
32210
|
+
return [hwb[0], c2 * 100, g2 * 100];
|
|
32166
32211
|
};
|
|
32167
32212
|
convert.apple.rgb = function(apple) {
|
|
32168
32213
|
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
@@ -33450,20 +33495,20 @@ function curry(func, arity, guard) {
|
|
|
33450
33495
|
curry.placeholder = {};
|
|
33451
33496
|
function yuv2rgb(yuv) {
|
|
33452
33497
|
const y2 = yuv[0], u2 = yuv[1], v2 = yuv[2];
|
|
33453
|
-
let r2,
|
|
33498
|
+
let r2, g2, b2;
|
|
33454
33499
|
r2 = y2 * 1 + u2 * 0 + v2 * 1.13983;
|
|
33455
|
-
|
|
33500
|
+
g2 = y2 * 1 + u2 * -0.39465 + v2 * -0.5806;
|
|
33456
33501
|
b2 = y2 * 1 + u2 * 2.02311 + v2 * 0;
|
|
33457
33502
|
r2 = Math.min(Math.max(0, r2), 1);
|
|
33458
|
-
|
|
33503
|
+
g2 = Math.min(Math.max(0, g2), 1);
|
|
33459
33504
|
b2 = Math.min(Math.max(0, b2), 1);
|
|
33460
|
-
return [r2 * 255,
|
|
33505
|
+
return [r2 * 255, g2 * 255, b2 * 255];
|
|
33461
33506
|
}
|
|
33462
33507
|
function rgb2yuv(rgb) {
|
|
33463
|
-
const r2 = rgb[0] / 255,
|
|
33464
|
-
const y2 = r2 * 0.299 +
|
|
33465
|
-
const u2 = r2 * -0.14713 +
|
|
33466
|
-
const v2 = r2 * 0.615 +
|
|
33508
|
+
const r2 = rgb[0] / 255, g2 = rgb[1] / 255, b2 = rgb[2] / 255;
|
|
33509
|
+
const y2 = r2 * 0.299 + g2 * 0.587 + b2 * 0.114;
|
|
33510
|
+
const u2 = r2 * -0.14713 + g2 * -0.28886 + b2 * 0.436;
|
|
33511
|
+
const v2 = r2 * 0.615 + g2 * -0.51499 + b2 * -0.10001;
|
|
33467
33512
|
return [y2, u2, v2];
|
|
33468
33513
|
}
|
|
33469
33514
|
const threezerotwofour = {
|
|
@@ -35223,6 +35268,7 @@ const RenderResponseBodySection = ({
|
|
|
35223
35268
|
};
|
|
35224
35269
|
const ResponseTab = ({
|
|
35225
35270
|
selectedRequest,
|
|
35271
|
+
supportsOverrides = true,
|
|
35226
35272
|
onRequestResponseBody
|
|
35227
35273
|
}) => {
|
|
35228
35274
|
const onRequestResponseBodyRef = reactExports.useRef(onRequestResponseBody);
|
|
@@ -35258,7 +35304,7 @@ const ResponseTab = ({
|
|
|
35258
35304
|
]
|
|
35259
35305
|
}
|
|
35260
35306
|
);
|
|
35261
|
-
const overrideAction = /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35307
|
+
const overrideAction = supportsOverrides ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35262
35308
|
Button,
|
|
35263
35309
|
{
|
|
35264
35310
|
variant: "ghost",
|
|
@@ -35273,8 +35319,8 @@ const ResponseTab = ({
|
|
|
35273
35319
|
"Override"
|
|
35274
35320
|
]
|
|
35275
35321
|
}
|
|
35276
|
-
);
|
|
35277
|
-
if (initialOverride !== void 0) {
|
|
35322
|
+
) : null;
|
|
35323
|
+
if (supportsOverrides && initialOverride !== void 0) {
|
|
35278
35324
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35279
35325
|
OverrideResponse,
|
|
35280
35326
|
{
|
|
@@ -35898,7 +35944,8 @@ const SidePanel = () => {
|
|
|
35898
35944
|
legacyNetworkEntries.set(legacyEntry.requestId, legacyEntry);
|
|
35899
35945
|
}
|
|
35900
35946
|
const override = legacyEntry !== null ? overrides.get(legacyEntry.url) : null;
|
|
35901
|
-
const
|
|
35947
|
+
const supportsOverrides = httpDetails?.source !== "nitro";
|
|
35948
|
+
const hasResponseOverride = supportsOverrides && override && override.body ? true : false;
|
|
35902
35949
|
const getTabsListTriggers = () => {
|
|
35903
35950
|
if (httpDetails) {
|
|
35904
35951
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -35993,6 +36040,7 @@ const SidePanel = () => {
|
|
|
35993
36040
|
ResponseTab,
|
|
35994
36041
|
{
|
|
35995
36042
|
selectedRequest: httpDetails,
|
|
36043
|
+
supportsOverrides,
|
|
35996
36044
|
onRequestResponseBody: (requestId) => {
|
|
35997
36045
|
if (client2) {
|
|
35998
36046
|
client2.send("get-response-body", {
|
|
@@ -36209,7 +36257,7 @@ const LoadingView = () => {
|
|
|
36209
36257
|
] }) });
|
|
36210
36258
|
};
|
|
36211
36259
|
function NetworkActivityPanel() {
|
|
36212
|
-
const client2 =
|
|
36260
|
+
const client2 = O({
|
|
36213
36261
|
pluginId: "@rozenite/network-activity-plugin"
|
|
36214
36262
|
});
|
|
36215
36263
|
if (!client2) {
|