@buoy-gg/network 7.0.13 → 7.0.15
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.js +39 -0
- package/lib/commonjs/network/components/NetworkEventDetailView.js +30 -3
- package/lib/commonjs/network/components/NetworkEventItemCompact.js +4 -0
- package/lib/commonjs/network/components/NetworkHeaderLive.js +26 -6
- package/lib/commonjs/network/components/NetworkHeaderMenu.js +183 -0
- package/lib/commonjs/network/components/NetworkListScreen.js +126 -5
- package/lib/commonjs/network/components/NetworkModal.js +136 -29
- package/lib/commonjs/network/components/NetworkNumberPrompt.js +178 -0
- package/lib/commonjs/network/components/NetworkOverrideEditor.js +797 -0
- package/lib/commonjs/network/components/NetworkOverrideHeaderButton.js +102 -0
- package/lib/commonjs/network/components/NetworkOverridesButton.js +88 -0
- package/lib/commonjs/network/components/NetworkOverridesScreen.js +489 -0
- package/lib/commonjs/network/components/response-editor/Explorer.js +973 -0
- package/lib/commonjs/network/components/response-editor/deleteNestedDataByPath.js +56 -0
- package/lib/commonjs/network/components/response-editor/editorContext.js +33 -0
- package/lib/commonjs/network/components/response-editor/updateNestedDataByPath.js +61 -0
- package/lib/commonjs/network/hooks/useOverrideRules.js +36 -0
- package/lib/commonjs/network/overrides/applyToFetch.js +80 -0
- package/lib/commonjs/network/overrides/applyToXhr.js +190 -0
- package/lib/commonjs/network/overrides/engine.js +70 -0
- package/lib/commonjs/network/overrides/matchRule.js +81 -0
- package/lib/commonjs/network/overrides/overrideRulesStore.js +550 -0
- package/lib/commonjs/network/overrides/presets.js +70 -0
- package/lib/commonjs/network/overrides/resolveOverride.js +158 -0
- package/lib/commonjs/network/overrides/types.js +85 -0
- package/lib/commonjs/network/sync/networkSyncAdapter.js +230 -1
- package/lib/commonjs/network/types/index.js +5 -1
- package/lib/commonjs/network/utils/networkEventStore.js +52 -6
- package/lib/commonjs/network/utils/networkListener.js +90 -10
- package/lib/commonjs/preset.js +11 -0
- package/lib/module/index.js +15 -0
- package/lib/module/network/components/NetworkEventDetailView.js +31 -4
- package/lib/module/network/components/NetworkEventItemCompact.js +5 -1
- package/lib/module/network/components/NetworkHeaderLive.js +26 -6
- package/lib/module/network/components/NetworkHeaderMenu.js +177 -0
- package/lib/module/network/components/NetworkListScreen.js +127 -6
- package/lib/module/network/components/NetworkModal.js +138 -31
- package/lib/module/network/components/NetworkNumberPrompt.js +174 -0
- package/lib/module/network/components/NetworkOverrideEditor.js +794 -0
- package/lib/module/network/components/NetworkOverrideHeaderButton.js +99 -0
- package/lib/module/network/components/NetworkOverridesButton.js +85 -0
- package/lib/module/network/components/NetworkOverridesScreen.js +485 -0
- package/lib/module/network/components/response-editor/Explorer.js +972 -0
- package/lib/module/network/components/response-editor/deleteNestedDataByPath.js +51 -0
- package/lib/module/network/components/response-editor/editorContext.js +29 -0
- package/lib/module/network/components/response-editor/updateNestedDataByPath.js +56 -0
- package/lib/module/network/hooks/useOverrideRules.js +32 -0
- package/lib/module/network/overrides/applyToFetch.js +72 -0
- package/lib/module/network/overrides/applyToXhr.js +185 -0
- package/lib/module/network/overrides/engine.js +64 -0
- package/lib/module/network/overrides/matchRule.js +75 -0
- package/lib/module/network/overrides/overrideRulesStore.js +547 -0
- package/lib/module/network/overrides/presets.js +65 -0
- package/lib/module/network/overrides/resolveOverride.js +152 -0
- package/lib/module/network/overrides/types.js +80 -0
- package/lib/module/network/sync/networkSyncAdapter.js +230 -1
- package/lib/module/network/types/index.js +3 -1
- package/lib/module/network/utils/networkEventStore.js +52 -6
- package/lib/module/network/utils/networkListener.js +91 -10
- package/lib/module/preset.js +13 -1
- package/lib/typescript/index.d.ts +8 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventDetailView.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.d.ts +6 -0
- package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkHeaderLive.d.ts +8 -1
- package/lib/typescript/network/components/NetworkHeaderLive.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkHeaderMenu.d.ts +46 -0
- package/lib/typescript/network/components/NetworkHeaderMenu.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkListScreen.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkModal.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkNumberPrompt.d.ts +33 -0
- package/lib/typescript/network/components/NetworkNumberPrompt.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverrideEditor.d.ts +17 -0
- package/lib/typescript/network/components/NetworkOverrideEditor.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverrideHeaderButton.d.ts +27 -0
- package/lib/typescript/network/components/NetworkOverrideHeaderButton.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverridesButton.d.ts +17 -0
- package/lib/typescript/network/components/NetworkOverridesButton.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkOverridesScreen.d.ts +29 -0
- package/lib/typescript/network/components/NetworkOverridesScreen.d.ts.map +1 -0
- package/lib/typescript/network/components/response-editor/Explorer.d.ts +17 -0
- package/lib/typescript/network/components/response-editor/Explorer.d.ts.map +1 -0
- package/lib/typescript/network/components/response-editor/deleteNestedDataByPath.d.ts +9 -0
- package/lib/typescript/network/components/response-editor/deleteNestedDataByPath.d.ts.map +1 -0
- package/lib/typescript/network/components/response-editor/editorContext.d.ts +29 -0
- package/lib/typescript/network/components/response-editor/editorContext.d.ts.map +1 -0
- package/lib/typescript/network/components/response-editor/updateNestedDataByPath.d.ts +10 -0
- package/lib/typescript/network/components/response-editor/updateNestedDataByPath.d.ts.map +1 -0
- package/lib/typescript/network/hooks/useOverrideRules.d.ts +29 -0
- package/lib/typescript/network/hooks/useOverrideRules.d.ts.map +1 -0
- package/lib/typescript/network/overrides/__tests__/applyToFetch.test.d.ts +16 -0
- package/lib/typescript/network/overrides/__tests__/applyToFetch.test.d.ts.map +1 -0
- package/lib/typescript/network/overrides/__tests__/applyToXhr.test.d.ts +19 -0
- package/lib/typescript/network/overrides/__tests__/applyToXhr.test.d.ts.map +1 -0
- package/lib/typescript/network/overrides/__tests__/resolveOverride.test.d.ts +22 -0
- package/lib/typescript/network/overrides/__tests__/resolveOverride.test.d.ts.map +1 -0
- package/lib/typescript/network/overrides/applyToFetch.d.ts +50 -0
- package/lib/typescript/network/overrides/applyToFetch.d.ts.map +1 -0
- package/lib/typescript/network/overrides/applyToXhr.d.ts +43 -0
- package/lib/typescript/network/overrides/applyToXhr.d.ts.map +1 -0
- package/lib/typescript/network/overrides/engine.d.ts +47 -0
- package/lib/typescript/network/overrides/engine.d.ts.map +1 -0
- package/lib/typescript/network/overrides/matchRule.d.ts +22 -0
- package/lib/typescript/network/overrides/matchRule.d.ts.map +1 -0
- package/lib/typescript/network/overrides/overrideRulesStore.d.ts +205 -0
- package/lib/typescript/network/overrides/overrideRulesStore.d.ts.map +1 -0
- package/lib/typescript/network/overrides/presets.d.ts +38 -0
- package/lib/typescript/network/overrides/presets.d.ts.map +1 -0
- package/lib/typescript/network/overrides/resolveOverride.d.ts +46 -0
- package/lib/typescript/network/overrides/resolveOverride.d.ts.map +1 -0
- package/lib/typescript/network/overrides/types.d.ts +169 -0
- package/lib/typescript/network/overrides/types.d.ts.map +1 -0
- package/lib/typescript/network/sync/networkSyncAdapter.d.ts +73 -0
- package/lib/typescript/network/sync/networkSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/network/types/index.d.ts +10 -0
- package/lib/typescript/network/types/index.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkEventStore.d.ts +14 -0
- package/lib/typescript/network/utils/networkEventStore.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkListener.d.ts +3 -0
- package/lib/typescript/network/utils/networkListener.d.ts.map +1 -1
- package/lib/typescript/preset.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -5,6 +5,25 @@
|
|
|
5
5
|
* Simple and reliable network interception for React Native
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { overrideForRequest } from "../overrides/engine";
|
|
9
|
+
import { runOverride } from "../overrides/applyToXhr";
|
|
10
|
+
import { canSynthesizeResponse, sleep, synthesizeFetchError, synthesizeResponse } from "../overrides/applyToFetch";
|
|
11
|
+
import { markForOutcome } from "../overrides/types";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* True only while `originalFetch` is being CALLED (not awaited).
|
|
15
|
+
*
|
|
16
|
+
* Overrides hook both `fetch` and `XMLHttpRequest`, because Expo's native
|
|
17
|
+
* `expo/fetch` bypasses XHR while bare RN's whatwg-fetch polyfill runs straight
|
|
18
|
+
* through it. On bare RN that means one `fetch()` would otherwise be overridden
|
|
19
|
+
* twice — a doubled delay and a doubled hit count.
|
|
20
|
+
*
|
|
21
|
+
* whatwg-fetch creates and sends its XHR synchronously inside the Promise
|
|
22
|
+
* executor, so a flag raised across the call expression alone is enough to
|
|
23
|
+
* cover the inner `send()` without leaking across the await.
|
|
24
|
+
*/
|
|
25
|
+
let insideOverriddenFetch = false;
|
|
26
|
+
|
|
8
27
|
// Extended XMLHttpRequest interface for monkey-patching
|
|
9
28
|
|
|
10
29
|
// Event types for network operations
|
|
@@ -199,7 +218,7 @@ class NetworkListener {
|
|
|
199
218
|
* Handle XMLHttpRequest response processing
|
|
200
219
|
* This method processes the response and emits appropriate events
|
|
201
220
|
*/
|
|
202
|
-
handleXHRResponse(xhr, requestId, cleanUrl, method, requestHeaders, requestData, params, startTime, isError = false, clientType = "xhr") {
|
|
221
|
+
handleXHRResponse(xhr, requestId, cleanUrl, method, requestHeaders, requestData, params, startTime, isError = false, clientType = "xhr", override) {
|
|
203
222
|
const duration = startTime ? Date.now() - startTime : 0;
|
|
204
223
|
|
|
205
224
|
// XHR's duration was ALREADY total (measured at readyState 4 / load), so
|
|
@@ -228,7 +247,8 @@ class NetworkListener {
|
|
|
228
247
|
},
|
|
229
248
|
error: {
|
|
230
249
|
message: isError ? "Request failed" : "Network error or request aborted"
|
|
231
|
-
}
|
|
250
|
+
},
|
|
251
|
+
override
|
|
232
252
|
});
|
|
233
253
|
return;
|
|
234
254
|
}
|
|
@@ -367,7 +387,8 @@ class NetworkListener {
|
|
|
367
387
|
headers: responseHeaders,
|
|
368
388
|
body,
|
|
369
389
|
size: responseSize
|
|
370
|
-
}
|
|
390
|
+
},
|
|
391
|
+
override
|
|
371
392
|
});
|
|
372
393
|
} else {
|
|
373
394
|
this.emit({
|
|
@@ -392,7 +413,8 @@ class NetworkListener {
|
|
|
392
413
|
},
|
|
393
414
|
error: {
|
|
394
415
|
message: `HTTP ${xhr.status}: ${xhr.statusText}`
|
|
395
|
-
}
|
|
416
|
+
},
|
|
417
|
+
override
|
|
396
418
|
});
|
|
397
419
|
}
|
|
398
420
|
}
|
|
@@ -463,6 +485,18 @@ class NetworkListener {
|
|
|
463
485
|
// Determine client type from X-Request-Client header or default to fetch
|
|
464
486
|
const clientType = requestHeaders["X-Request-Client"] || requestHeaders["x-request-client"] || "fetch";
|
|
465
487
|
|
|
488
|
+
/**
|
|
489
|
+
* Response overrides, fetch side.
|
|
490
|
+
*
|
|
491
|
+
* Needed even though `send` below also resolves them: Expo installs a
|
|
492
|
+
* NATIVE `expo/fetch` as `globalThis.fetch`, which never constructs an
|
|
493
|
+
* XMLHttpRequest, so the XHR hook alone would never see these requests.
|
|
494
|
+
* Skipped when `canSynthesizeResponse()` is false so a runtime without a
|
|
495
|
+
* `Response` global degrades to a real request rather than a broken one.
|
|
496
|
+
*/
|
|
497
|
+
const outcome = canSynthesizeResponse() ? overrideForRequest(url, method) : null;
|
|
498
|
+
const override = outcome ? markForOutcome(outcome) : undefined;
|
|
499
|
+
|
|
466
500
|
// Emit request event
|
|
467
501
|
self.emit({
|
|
468
502
|
type: "request",
|
|
@@ -475,10 +509,28 @@ class NetworkListener {
|
|
|
475
509
|
data: requestData,
|
|
476
510
|
params: params || undefined,
|
|
477
511
|
client: clientType
|
|
478
|
-
}
|
|
512
|
+
},
|
|
513
|
+
override
|
|
479
514
|
});
|
|
480
515
|
try {
|
|
481
|
-
|
|
516
|
+
if (outcome) await sleep(outcome.delayMs);
|
|
517
|
+
if (outcome?.kind === "fail") throw synthesizeFetchError(outcome);
|
|
518
|
+
let response;
|
|
519
|
+
if (outcome?.kind === "respond") {
|
|
520
|
+
response = synthesizeResponse(url, outcome);
|
|
521
|
+
} else {
|
|
522
|
+
// The flag spans the CALL only — see `insideOverriddenFetch`. It has
|
|
523
|
+
// to be cleared before the await, or it would still be raised for
|
|
524
|
+
// every unrelated request that starts while this one is in flight.
|
|
525
|
+
insideOverriddenFetch = outcome != null;
|
|
526
|
+
let pending;
|
|
527
|
+
try {
|
|
528
|
+
pending = self.originalFetch(input, init);
|
|
529
|
+
} finally {
|
|
530
|
+
insideOverriddenFetch = false;
|
|
531
|
+
}
|
|
532
|
+
response = await pending;
|
|
533
|
+
}
|
|
482
534
|
// A fetch promise resolves when the HEADERS arrive, not the body — so
|
|
483
535
|
// this is time-to-first-byte, and it is where `duration` used to stop.
|
|
484
536
|
// That silently excluded download time, making an identical request
|
|
@@ -547,7 +599,8 @@ class NetworkListener {
|
|
|
547
599
|
headers: responseHeaders,
|
|
548
600
|
body,
|
|
549
601
|
size: responseSize
|
|
550
|
-
}
|
|
602
|
+
},
|
|
603
|
+
override
|
|
551
604
|
});
|
|
552
605
|
return response;
|
|
553
606
|
} catch (error) {
|
|
@@ -570,7 +623,8 @@ class NetworkListener {
|
|
|
570
623
|
error: {
|
|
571
624
|
message: error instanceof Error ? error.message : "Network error",
|
|
572
625
|
stack: error instanceof Error ? error.stack : undefined
|
|
573
|
-
}
|
|
626
|
+
},
|
|
627
|
+
override
|
|
574
628
|
});
|
|
575
629
|
throw error;
|
|
576
630
|
}
|
|
@@ -637,6 +691,22 @@ class NetworkListener {
|
|
|
637
691
|
const looksLikeAxios = acceptHeader.includes("application/json") && acceptHeader.includes("text/plain") && acceptHeader.includes("*/*");
|
|
638
692
|
const clientType = explicitClient || (looksLikeAxios ? "axios" : "xhr");
|
|
639
693
|
|
|
694
|
+
/**
|
|
695
|
+
* Response overrides.
|
|
696
|
+
*
|
|
697
|
+
* This is the layer that covers `axios` and raw XMLHttpRequest. It also
|
|
698
|
+
* covers `fetch` on BARE React Native, where the whatwg-fetch polyfill
|
|
699
|
+
* runs through XHR — which is why the fetch wrapper raises
|
|
700
|
+
* `insideOverriddenFetch` around its pass-through, so one request can't
|
|
701
|
+
* be overridden twice.
|
|
702
|
+
*
|
|
703
|
+
* Matching uses the raw `url` (query string included), which is what the
|
|
704
|
+
* developer sees in the list and writes into a rule. No-ops in production
|
|
705
|
+
* builds; see `overrideForRequest`.
|
|
706
|
+
*/
|
|
707
|
+
const outcome = insideOverriddenFetch ? null : overrideForRequest(url, method);
|
|
708
|
+
const override = outcome ? markForOutcome(outcome) : undefined;
|
|
709
|
+
|
|
640
710
|
// Emit request event
|
|
641
711
|
self.emit({
|
|
642
712
|
type: "request",
|
|
@@ -649,7 +719,8 @@ class NetworkListener {
|
|
|
649
719
|
data: requestData,
|
|
650
720
|
params: params || undefined,
|
|
651
721
|
client: clientType
|
|
652
|
-
}
|
|
722
|
+
},
|
|
723
|
+
override
|
|
653
724
|
});
|
|
654
725
|
|
|
655
726
|
// Track if we've already processed this request to avoid duplicate events
|
|
@@ -657,7 +728,7 @@ class NetworkListener {
|
|
|
657
728
|
const processResponse = (isError = false) => {
|
|
658
729
|
if (processed) return;
|
|
659
730
|
processed = true;
|
|
660
|
-
self.handleXHRResponse(this, requestId || "unknown", cleanUrl, method, requestHeaders, requestData, params, startTime || 0, isError, clientType);
|
|
731
|
+
self.handleXHRResponse(this, requestId || "unknown", cleanUrl, method, requestHeaders, requestData, params, startTime || 0, isError, clientType, override);
|
|
661
732
|
// Clean up event listeners after processing to prevent memory leaks
|
|
662
733
|
cleanup();
|
|
663
734
|
};
|
|
@@ -704,6 +775,16 @@ class NetworkListener {
|
|
|
704
775
|
this.addEventListener("error", errorListener);
|
|
705
776
|
this.addEventListener("abort", abortListener);
|
|
706
777
|
this.addEventListener("readystatechange", readyStateListener);
|
|
778
|
+
if (outcome) {
|
|
779
|
+
// Listeners are attached above FIRST: `runOverride` drives the same
|
|
780
|
+
// readyState transitions a real response would, and the interceptor has
|
|
781
|
+
// to see them (readyState 2 is where TTFB is stamped).
|
|
782
|
+
const handled = runOverride(this, url, outcome, () => self.originalXHRSend.call(this, data));
|
|
783
|
+
// `handled` is false only where this isn't React Native's own
|
|
784
|
+
// XMLHttpRequest and can't be driven by hand. Fall through and send for
|
|
785
|
+
// real rather than dropping the request on the floor.
|
|
786
|
+
if (handled) return;
|
|
787
|
+
}
|
|
707
788
|
return self.originalXHRSend.call(this, data);
|
|
708
789
|
};
|
|
709
790
|
this.isListening = true;
|
package/lib/module/preset.js
CHANGED
|
@@ -19,6 +19,19 @@
|
|
|
19
19
|
|
|
20
20
|
import { NetworkIcon } from "@buoy-gg/shared-ui";
|
|
21
21
|
import { NetworkModal } from "./network/components/NetworkModal";
|
|
22
|
+
import { overrideRulesStore } from "./network/overrides/overrideRulesStore";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Load persisted response-override rules as soon as the tool is registered.
|
|
26
|
+
*
|
|
27
|
+
* Deliberately at import time rather than when the Network modal mounts: an
|
|
28
|
+
* override has to fire from app boot, with the tool closed and nothing
|
|
29
|
+
* capturing — that is the whole point of persisting rules ("force this endpoint
|
|
30
|
+
* to 500, then restart and watch the boot path"). Hydrating also re-installs
|
|
31
|
+
* the interceptor if any rule is still active. One storage read, dev-only.
|
|
32
|
+
*/
|
|
33
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
|
+
void overrideRulesStore.ensureLoaded();
|
|
22
35
|
|
|
23
36
|
/**
|
|
24
37
|
* Pre-configured network monitoring tool for FloatingDevTools.
|
|
@@ -28,7 +41,6 @@ import { NetworkModal } from "./network/components/NetworkModal";
|
|
|
28
41
|
* - Filter by status, method, URL
|
|
29
42
|
* - Timing information
|
|
30
43
|
*/
|
|
31
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
32
44
|
export const networkToolPreset = {
|
|
33
45
|
id: "network",
|
|
34
46
|
name: "NET",
|
|
@@ -24,6 +24,14 @@ export { networkSelectionStore, DEFAULT_SETTLE_MS, type NetworkSelectionState, }
|
|
|
24
24
|
export { TickProvider, useTickEveryMinute } from "./network/hooks/useTickEveryMinute";
|
|
25
25
|
export { formatBytes, formatDuration, formatHttpStatus, } from "./network/utils/formatting";
|
|
26
26
|
export type { NetworkEvent, NetworkStats, NetworkFilter, NetworkEventStatus, NetworkInsight, IgnoredPattern, IgnoredPatternMatchMode, } from "./network/types";
|
|
27
|
+
export { overrideRulesStore, type OverrideRulesState, type OverrideRuleDraft,
|
|
28
|
+
/**
|
|
29
|
+
* @internal — the desktop dashboard puts the rule store in remote-mirror mode
|
|
30
|
+
* so edits made there are forwarded to the device instead of stored locally.
|
|
31
|
+
*/
|
|
32
|
+
type OverrideRulesRemote, } from "./network/overrides/overrideRulesStore";
|
|
33
|
+
export { draftFromEvent } from "./network/overrides/presets";
|
|
34
|
+
export { MAX_RULES as MAX_OVERRIDE_RULES, FREE_TIER_RULE_LIMIT as FREE_TIER_OVERRIDE_LIMIT, STATUS_MIN as OVERRIDE_STATUS_MIN, STATUS_MAX as OVERRIDE_STATUS_MAX, type OverrideRule, type OverrideRuleKind, type OverrideFailKind, type NetworkOverrideMark, } from "./network/overrides/types";
|
|
27
35
|
export { useIgnoredPatterns, ignoredPatternsStore, urlMatchesIgnoredPattern, isUrlIgnored, } from "@buoy-gg/shared-ui";
|
|
28
36
|
export { networkSyncAdapter } from "./network/sync/networkSyncAdapter";
|
|
29
37
|
export { NetworkBodyResolverProvider, type NetworkBodyResolver, type ResolvedNetworkBody, } from "./network/sync/networkBodyResolver";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EA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G;AACH,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,SAAS,EACT,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,gBAAgB;AAChB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventDetailView.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventDetailView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NetworkEventDetailView.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventDetailView.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,UAAU,CAAC;AA0B7D,UAAU,2BAA2B;IACnC,KAAK,EAAE,YAAY,CAAC;IACpB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA+QD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,mEA6gBjC,CAAC"}
|
|
@@ -14,6 +14,12 @@ interface NetworkEventItemCompactProps {
|
|
|
14
14
|
pinned?: boolean;
|
|
15
15
|
saved?: boolean;
|
|
16
16
|
onLongPress?: (event: NetworkEvent) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Rendered in the OVERRIDDEN strip. Distinct from `event.override`, which
|
|
19
|
+
* records that a PAST request was overridden — this says a rule covers the
|
|
20
|
+
* row right now, which is true even for a request captured before the rule.
|
|
21
|
+
*/
|
|
22
|
+
overridden?: boolean;
|
|
17
23
|
}
|
|
18
24
|
export declare const NetworkEventItemCompact: import("react").NamedExoticComponent<NetworkEventItemCompactProps>;
|
|
19
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventItemCompact.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NetworkEventItemCompact.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAM7C,UAAU,4BAA4B;IACpC,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAkJD,eAAO,MAAM,uBAAuB,oEA4HnC,CAAC"}
|
|
@@ -72,12 +72,19 @@ interface NetworkHeaderCopyButtonProps {
|
|
|
72
72
|
copySettings: CopySettings;
|
|
73
73
|
paused: boolean;
|
|
74
74
|
onUpgradePress: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Render as a labelled row instead of a bare glyph, for the header's
|
|
77
|
+
* overflow menu. The behaviour is identical — this button owns the lazy copy
|
|
78
|
+
* value, the Pro gate and the copied/failed feedback, and a menu row that
|
|
79
|
+
* reimplemented them would be a second copy path to keep in step.
|
|
80
|
+
*/
|
|
81
|
+
label?: string;
|
|
75
82
|
}
|
|
76
83
|
/**
|
|
77
84
|
* Copy-all-requests button. Subscribes to a flip-guarded boolean (its
|
|
78
85
|
* enabled state); the copy text is generated at PRESS time from a live
|
|
79
86
|
* store read, so there's no per-event work and no stale closure.
|
|
80
87
|
*/
|
|
81
|
-
export declare function NetworkHeaderCopyButton({ isPro, filter, ignoredPatterns, copySettings, paused, onUpgradePress, }: NetworkHeaderCopyButtonProps): import("react").JSX.Element;
|
|
88
|
+
export declare function NetworkHeaderCopyButton({ isPro, filter, ignoredPatterns, copySettings, paused, onUpgradePress, label, }: NetworkHeaderCopyButtonProps): import("react").JSX.Element;
|
|
82
89
|
export {};
|
|
83
90
|
//# sourceMappingURL=NetworkHeaderLive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkHeaderLive.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkHeaderLive.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAUL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAsB9D,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpD,UAAU,wBAAwB;IAChC,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,cAAc,EACd,eAAe,EACf,MAAM,GACP,EAAE,wBAAwB,+BA4D1B;AAED,UAAU,uBAAuB;IAC/B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;iDAEiD;AACjD,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,uBAAuB,+BAqBrE;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,uBAAuB,+BAwBtE;AAED,UAAU,4BAA4B;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,cAAc,GACf,EAAE,4BAA4B,+BAuF9B;AAED,UAAU,4BAA4B;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkHeaderLive.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkHeaderLive.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAUL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAsB9D,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpD,UAAU,wBAAwB;IAChC,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,cAAc,EACd,eAAe,EACf,MAAM,GACP,EAAE,wBAAwB,+BA4D1B;AAED,UAAU,uBAAuB;IAC/B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;iDAEiD;AACjD,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,uBAAuB,+BAqBrE;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,uBAAuB,+BAwBtE;AAED,UAAU,4BAA4B;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,cAAc,GACf,EAAE,4BAA4B,+BAuF9B;AAED,UAAU,4BAA4B;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,MAAM,EACN,eAAe,EACf,YAAY,EACZ,MAAM,EACN,cAAc,EACd,KAAK,GACN,EAAE,4BAA4B,+BAsD9B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The header's overflow menu.
|
|
4
|
+
*
|
|
5
|
+
* The toolbar had grown to three status badges and six icon buttons, which on a
|
|
6
|
+
* 402pt screen meant the pending badge was being overlapped by the search
|
|
7
|
+
* button. Something had to leave, and the rule for deciding what is:
|
|
8
|
+
*
|
|
9
|
+
* **A control that COMMUNICATES STATE stays visible. A destination or a rare
|
|
10
|
+
* action goes in the menu.**
|
|
11
|
+
*
|
|
12
|
+
* That keeps the power toggle (are we capturing?), the overrides flask (is the
|
|
13
|
+
* app being lied to, and how many rules?), the status badges (what happened)
|
|
14
|
+
* and Clear (the reproduce loop is clear → repro → read, and burying the first
|
|
15
|
+
* step doubles it). Search stays because it's the only way through 500 rows.
|
|
16
|
+
*
|
|
17
|
+
* Filters, Saved and Copy leave. Filters is the interesting one — it does show
|
|
18
|
+
* state, so the ⋯ carries a dot when a filter is applied rather than hiding
|
|
19
|
+
* that fact.
|
|
20
|
+
*/
|
|
21
|
+
export declare function NetworkHeaderMenuButton({ onPress, isOpen, hasIndicator, }: {
|
|
22
|
+
onPress: () => void;
|
|
23
|
+
/** The menu is showing — the button holds a lit state and closes on tap. */
|
|
24
|
+
isOpen?: boolean;
|
|
25
|
+
/** Something behind the menu is active — currently a filter. */
|
|
26
|
+
hasIndicator?: boolean;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
28
|
+
export interface NetworkHeaderMenuProps {
|
|
29
|
+
onClose: () => void;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The dropdown itself, rendered in the modal BODY rather than the header —
|
|
34
|
+
* the header is a fixed-height row and anything overflowing it is clipped, so
|
|
35
|
+
* a panel anchored to the top-right of the body lands exactly where a dropdown
|
|
36
|
+
* from the ⋯ should appear.
|
|
37
|
+
*/
|
|
38
|
+
export declare function NetworkHeaderMenu({ onClose, children }: NetworkHeaderMenuProps): import("react").JSX.Element;
|
|
39
|
+
export declare function NetworkHeaderMenuItem({ icon, label, detail, onPress, }: {
|
|
40
|
+
icon: ReactNode;
|
|
41
|
+
label: string;
|
|
42
|
+
/** Right-aligned state, e.g. the active filter count. */
|
|
43
|
+
detail?: string;
|
|
44
|
+
onPress: () => void;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=NetworkHeaderMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkHeaderMenu.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkHeaderMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACP,MAAM,EACN,YAAY,GACb,EAAE;IACD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gEAAgE;IAChE,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,+BAkBA;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,sBAAsB,+BAY9E;AAED,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,OAAO,GACR,EAAE;IACD,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,+BAYA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkListScreen.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"NetworkListScreen.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA0J5D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,YAAY,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,EACZ,cAAc,GACf,EAAE,sBAAsB,sCAuJxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkModal.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NetworkModal.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkModal.tsx"],"names":[],"mappings":"AAqEA,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAg1BD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAMpD;AAED,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,GAAE,oBAAyB,+BAa/D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entering one number, without the keyboard eating the screen.
|
|
3
|
+
*
|
|
4
|
+
* The custom status / delay / times fields used to be inline inputs sitting
|
|
5
|
+
* mid-form. Focusing one raises the keyboard, which on a phone covers roughly
|
|
6
|
+
* the bottom half of the tool — including, depending on where you'd scrolled,
|
|
7
|
+
* the field you were typing into and the Save button you needed next.
|
|
8
|
+
*
|
|
9
|
+
* Pinning the panel to the TOP is the fix, and it's the same one
|
|
10
|
+
* `StorageValueEditModal` reached for: a centred panel gets shoved up or
|
|
11
|
+
* covered the moment the field focuses, and a bottom sheet is simply
|
|
12
|
+
* underneath it. At the top it stays put and stays readable.
|
|
13
|
+
*
|
|
14
|
+
* Deliberately not a reuse of that component — this asks for a number and
|
|
15
|
+
* nothing else. It has no type inference, no raw-JSON escape hatch and no
|
|
16
|
+
* shape-preservation rules, so borrowing 400 lines to avoid writing 100 would
|
|
17
|
+
* be the wrong trade.
|
|
18
|
+
*/
|
|
19
|
+
export interface NetworkNumberPromptProps {
|
|
20
|
+
title: string;
|
|
21
|
+
/** Shown under the field — the range or unit, never a sentence. */
|
|
22
|
+
hint?: string;
|
|
23
|
+
/** Current value, or empty when nothing custom is set yet. */
|
|
24
|
+
value?: number;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
min?: number;
|
|
27
|
+
max?: number;
|
|
28
|
+
/** `null` means "cleared" — the caller decides what that means. */
|
|
29
|
+
onSubmit: (value: number | null) => void;
|
|
30
|
+
onCancel: () => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function NetworkNumberPrompt({ title, hint, value, placeholder, min, max, onSubmit, onCancel, }: NetworkNumberPromptProps): import("react").JSX.Element;
|
|
33
|
+
//# sourceMappingURL=NetworkNumberPrompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkNumberPrompt.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkNumberPrompt.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,IAAI,EACJ,KAAK,EACL,WAAsB,EACtB,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,GACT,EAAE,wBAAwB,+BAoE1B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OverrideRuleDraft } from "../overrides/overrideRulesStore";
|
|
2
|
+
export interface NetworkOverrideEditorProps {
|
|
3
|
+
draft: OverrideRuleDraft;
|
|
4
|
+
onChange: (draft: OverrideRuleDraft) => void;
|
|
5
|
+
onSave: () => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
saveLabel?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Pad the footer clear of the home indicator.
|
|
10
|
+
*
|
|
11
|
+
* Only true in bottom-sheet mode — a floating window doesn't sit on it, and a
|
|
12
|
+
* desktop panel has no such thing. Same gating the detail stepper uses.
|
|
13
|
+
*/
|
|
14
|
+
applySafeAreaInset?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function NetworkOverrideEditor({ draft, onChange, onSave, onCancel, saveLabel, applySafeAreaInset, }: NetworkOverrideEditorProps): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=NetworkOverrideEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkOverrideEditor.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkOverrideEditor.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AA+NzE,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAkB,EAClB,kBAA0B,GAC3B,EAAE,0BAA0B,+BAmZ5B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { OverrideRuleDraft } from "../overrides/overrideRulesStore";
|
|
2
|
+
/**
|
|
3
|
+
* The Override action, in the request-detail header.
|
|
4
|
+
*
|
|
5
|
+
* A labelled word rather than an icon: every other control here is a glyph
|
|
6
|
+
* (back, pin, bookmark) and glyphs are fine for things you already know. This
|
|
7
|
+
* one is the least familiar action in the tool, and "Override" spelled out is
|
|
8
|
+
* the entire explanation.
|
|
9
|
+
*
|
|
10
|
+
* A self-subscribing leaf, for the same two reasons `NetworkDetailPinActions`
|
|
11
|
+
* is one: the modal root stays free of subscriptions, and the selected id is
|
|
12
|
+
* subscribed here so stepping between requests doesn't rebuild the header
|
|
13
|
+
* around a new prop.
|
|
14
|
+
*
|
|
15
|
+
* It lights up while a rule covers the request you're looking at — the same
|
|
16
|
+
* warning tint the OVERRIDDEN strip and the toolbar flask use, because "you are
|
|
17
|
+
* not seeing the truth" is one idea and should look like one.
|
|
18
|
+
*
|
|
19
|
+
* Tapping it goes straight to the Overrides screen with the rule open: a new
|
|
20
|
+
* one prefilled from this request, or the existing one if something already
|
|
21
|
+
* covers it. One destination, so there's never a question of where the thing
|
|
22
|
+
* you just made went.
|
|
23
|
+
*/
|
|
24
|
+
export declare function NetworkOverrideHeaderButton({ onOpen, }: {
|
|
25
|
+
onOpen: (draft: OverrideRuleDraft, ruleId?: string) => void;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=NetworkOverrideHeaderButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkOverrideHeaderButton.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkOverrideHeaderButton.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIzE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,MAAM,GACP,EAAE;IACD,MAAM,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7D,+BA8CA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header button for the Overrides screen, and the always-visible "overrides
|
|
3
|
+
* are active" indicator.
|
|
4
|
+
*
|
|
5
|
+
* A self-subscribing LEAF, like the other live header pieces: the rule list
|
|
6
|
+
* changes on its own schedule (every hit bumps a counter) and the modal shell
|
|
7
|
+
* has no business re-rendering for it.
|
|
8
|
+
*
|
|
9
|
+
* The active tint is not decoration. A rule left enabled from yesterday makes
|
|
10
|
+
* the app behave wrongly in a way that looks exactly like a real bug, so the
|
|
11
|
+
* tool has to keep saying so from the top level — Chrome shows the same
|
|
12
|
+
* warning in its Overrides pane for the same reason.
|
|
13
|
+
*/
|
|
14
|
+
export declare function NetworkOverridesButton({ onPress }: {
|
|
15
|
+
onPress: () => void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=NetworkOverridesButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkOverridesButton.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkOverridesButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,+BA4B1E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type OverrideRuleDraft } from "../overrides/overrideRulesStore";
|
|
2
|
+
export interface NetworkOverridesScreenProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
isPro: boolean;
|
|
5
|
+
onUpgradePress: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* A rule prefilled elsewhere (the request detail's Override action). Adopted
|
|
8
|
+
* once, then handed back via `onPendingConsumed` so re-entering the screen
|
|
9
|
+
* doesn't reopen a stale editor.
|
|
10
|
+
*/
|
|
11
|
+
pendingDraft?: (OverrideRuleDraft & {
|
|
12
|
+
id?: string;
|
|
13
|
+
}) | null;
|
|
14
|
+
onPendingConsumed?: () => void;
|
|
15
|
+
/** Bottom-sheet mode only — see the editor's footer. */
|
|
16
|
+
applySafeAreaInset?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Stable-router gate.
|
|
20
|
+
*
|
|
21
|
+
* The screens in `NetworkModal` are rendered as permanent siblings, and the
|
|
22
|
+
* convention there is that a HIDDEN screen must not subscribe to anything.
|
|
23
|
+
* Splitting the body out is how this one honours that: `useOverrideRules`
|
|
24
|
+
* subscribes to a store that ticks while rules are firing, and a hidden screen
|
|
25
|
+
* re-rendering for that would be pure waste. (The header's overrides button is
|
|
26
|
+
* a deliberate exception — it's always visible and its whole job is to react.)
|
|
27
|
+
*/
|
|
28
|
+
export declare function NetworkOverridesScreen(props: NetworkOverridesScreenProps): import("react").JSX.Element | null;
|
|
29
|
+
//# sourceMappingURL=NetworkOverridesScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkOverridesScreen.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkOverridesScreen.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAC;AAiJzC,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,iBAAiB,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IAC5D,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,wDAAwD;IACxD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,sCAGxE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type JsonValue } from "@buoy-gg/shared-ui/dataViewer";
|
|
2
|
+
type Props = {
|
|
3
|
+
editable?: boolean;
|
|
4
|
+
label: string;
|
|
5
|
+
value: JsonValue;
|
|
6
|
+
defaultExpanded?: string[];
|
|
7
|
+
dataPath?: string[];
|
|
8
|
+
itemsDeletable?: boolean;
|
|
9
|
+
dataVersion?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Recursive data explorer component used for both editable and read-only JSON trees inside the
|
|
13
|
+
* React Query dev tools.
|
|
14
|
+
*/
|
|
15
|
+
export default function Explorer({ editable, label, value, defaultExpanded, dataPath, itemsDeletable, dataVersion, }: Props): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Explorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Explorer.d.ts","sourceRoot":"","sources":["../../../../../src/network/components/response-editor/Explorer.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,+BAA+B,CAAC;AA+O/E,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,KAAK,EACL,eAAe,EACf,QAAQ,EACR,cAAc,EACd,WAAe,GAChB,EAAE,KAAK,+BAwWP"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deletes nested data by path
|
|
3
|
+
*
|
|
4
|
+
* @param {unknown} oldData Data to be updated
|
|
5
|
+
* @param {Array<string>} deletePath Path to the data to be deleted
|
|
6
|
+
* @returns newData without the deleted items by path
|
|
7
|
+
*/
|
|
8
|
+
export declare const deleteNestedDataByPath: (oldData: unknown, deletePath: string[]) => unknown;
|
|
9
|
+
//# sourceMappingURL=deleteNestedDataByPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteNestedDataByPath.d.ts","sourceRoot":"","sources":["../../../../../src/network/components/response-editor/deleteNestedDataByPath.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,OAAO,EAChB,YAAY,MAAM,EAAE,KACnB,OAmDF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { JsonValue } from "@buoy-gg/shared-ui/dataViewer";
|
|
2
|
+
/**
|
|
3
|
+
* What the ported Explorer needs in place of React Query's cache.
|
|
4
|
+
*
|
|
5
|
+
* In the original, every edit ends at
|
|
6
|
+
* `queryClient.setQueryData(activeQuery.queryKey, newData)` and `activeQuery`
|
|
7
|
+
* doubles as the "is this editable" gate — so the whole tree is wired to one
|
|
8
|
+
* specific store. Here that becomes two values in context: the ROOT document
|
|
9
|
+
* (every op rebuilds the whole thing from the root, so each row needs it) and a
|
|
10
|
+
* single `onChange`.
|
|
11
|
+
*
|
|
12
|
+
* Context rather than props because Explorer recurses per node and already
|
|
13
|
+
* threads `activeQuery` down every level; swapping one drilled prop for another
|
|
14
|
+
* would have meant the same plumbing at every call site, and a row deep in a
|
|
15
|
+
* response is exactly where you don't want a missed prop.
|
|
16
|
+
*/
|
|
17
|
+
export interface ResponseEditorContextValue {
|
|
18
|
+
/** The whole body. Ops are computed against this, not the node's own value. */
|
|
19
|
+
root: JsonValue;
|
|
20
|
+
/** Hand back the rebuilt document. */
|
|
21
|
+
onChange: (next: JsonValue) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const ResponseEditorContext: import("react").Context<ResponseEditorContextValue | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Null outside a provider, which is how the tree stays READ-ONLY by default —
|
|
26
|
+
* the same role `activeQuery === undefined` played in the original.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useResponseEditor(): ResponseEditorContextValue | null;
|
|
29
|
+
//# sourceMappingURL=editorContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorContext.d.ts","sourceRoot":"","sources":["../../../../../src/network/components/response-editor/editorContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,0BAA0B;IACzC,+EAA+E;IAC/E,IAAI,EAAE,SAAS,CAAC;IAChB,sCAAsC;IACtC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACrC;AAED,eAAO,MAAM,qBAAqB,4DACsB,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,0BAA0B,GAAG,IAAI,CAErE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JsonValue } from "@buoy-gg/shared-ui/dataViewer";
|
|
2
|
+
/**
|
|
3
|
+
* updates nested data by path
|
|
4
|
+
*
|
|
5
|
+
* @param {JsonValue} oldData Data to be updated
|
|
6
|
+
* @param {Array<string>} updatePath Path to the data to be updated
|
|
7
|
+
* @param {JsonValue} value New value
|
|
8
|
+
*/
|
|
9
|
+
export declare const updateNestedDataByPath: (oldData: JsonValue, updatePath: string[], value: JsonValue) => JsonValue;
|
|
10
|
+
//# sourceMappingURL=updateNestedDataByPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateNestedDataByPath.d.ts","sourceRoot":"","sources":["../../../../../src/network/components/response-editor/updateNestedDataByPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,SAAS,EAClB,YAAY,MAAM,EAAE,EACpB,OAAO,SAAS,KACf,SAiEF,CAAC"}
|