@buoy-gg/network 7.0.41 → 7.0.42
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/README.md +11 -85
- package/lib/commonjs/index.js +1 -332
- package/lib/commonjs/index.web.js +1 -420
- package/lib/commonjs/network/components/DataViewer.web.js +1 -879
- package/lib/commonjs/network/components/NetworkCopyScreen.web.js +1 -48
- package/lib/commonjs/network/components/NetworkCopySettingsView.js +27 -755
- package/lib/commonjs/network/components/NetworkCopySettingsView.web.js +14 -1242
- package/lib/commonjs/network/components/NetworkDetailScreen.web.js +1 -101
- package/lib/commonjs/network/components/NetworkDetailStepper.js +1 -108
- package/lib/commonjs/network/components/NetworkDetailStepper.web.js +1 -298
- package/lib/commonjs/network/components/NetworkEventDetailView.js +15 -1130
- package/lib/commonjs/network/components/NetworkEventDetailView.web.js +15 -1484
- package/lib/commonjs/network/components/NetworkEventItemCompact.js +2 -401
- package/lib/commonjs/network/components/NetworkEventItemCompact.web.js +2 -820
- package/lib/commonjs/network/components/NetworkFilterScreen.web.js +1 -55
- package/lib/commonjs/network/components/NetworkFilterViewV3.js +1 -442
- package/lib/commonjs/network/components/NetworkFilterViewV3.web.js +1 -1310
- package/lib/commonjs/network/components/NetworkHeaderLive.js +1 -375
- package/lib/commonjs/network/components/NetworkHeaderLive.web.js +1 -623
- package/lib/commonjs/network/components/NetworkHeaderMenu.js +1 -190
- package/lib/commonjs/network/components/NetworkListScreen.js +1 -403
- package/lib/commonjs/network/components/NetworkListScreen.web.js +1 -624
- package/lib/commonjs/network/components/NetworkModal.js +1 -786
- package/lib/commonjs/network/components/NetworkNumberPrompt.js +1 -178
- package/lib/commonjs/network/components/NetworkNumberPrompt.web.js +1 -232
- package/lib/commonjs/network/components/NetworkOverrideEditor.js +1 -814
- package/lib/commonjs/network/components/NetworkOverrideEditor.web.js +1 -942
- package/lib/commonjs/network/components/NetworkOverrideHeaderButton.js +1 -107
- package/lib/commonjs/network/components/NetworkOverrideHeaderButton.web.js +1 -133
- package/lib/commonjs/network/components/NetworkOverridesButton.js +1 -90
- package/lib/commonjs/network/components/NetworkOverridesButton.web.js +1 -143
- package/lib/commonjs/network/components/NetworkOverridesScreen.js +1 -543
- package/lib/commonjs/network/components/NetworkOverridesScreen.web.js +1 -830
- package/lib/commonjs/network/components/NetworkSavedScreen.js +1 -226
- package/lib/commonjs/network/components/NetworkSavedScreen.web.js +1 -463
- package/lib/commonjs/network/components/NetworkUpgradeBanner.js +1 -76
- package/lib/commonjs/network/components/response-editor/Explorer.js +1 -973
- package/lib/commonjs/network/components/response-editor/Explorer.web.js +1 -1136
- package/lib/commonjs/network/components/response-editor/deleteNestedDataByPath.js +1 -56
- package/lib/commonjs/network/components/response-editor/editorContext.js +1 -33
- package/lib/commonjs/network/components/response-editor/updateNestedDataByPath.js +1 -61
- package/lib/commonjs/network/conditions/NetworkConditionsControl.js +1 -235
- package/lib/commonjs/network/conditions/NetworkConditionsControl.test.js +1 -136
- package/lib/commonjs/network/conditions/NetworkConditionsIcon.js +1 -33
- package/lib/commonjs/network/conditions/NetworkFloatingTool.js +1 -310
- package/lib/commonjs/network/conditions/NetworkFloatingTool.test.js +1 -219
- package/lib/commonjs/network/conditions/store.js +1 -75
- package/lib/commonjs/network/conditions/wait.js +1 -43
- package/lib/commonjs/network/conditions/xhr.js +1 -135
- package/lib/commonjs/network/hooks/useLiveNetworkEvent.js +1 -62
- package/lib/commonjs/network/hooks/useNetworkBadgeCounts.js +1 -83
- package/lib/commonjs/network/hooks/useNetworkEventList.js +1 -108
- package/lib/commonjs/network/hooks/useNetworkEvents.js +1 -318
- package/lib/commonjs/network/hooks/useNetworkHasMatches.js +1 -56
- package/lib/commonjs/network/hooks/useNetworkSaved.js +1 -38
- package/lib/commonjs/network/hooks/useNetworkSelection.js +1 -53
- package/lib/commonjs/network/hooks/useOverrideRules.js +1 -36
- package/lib/commonjs/network/hooks/useTickEveryMinute.js +1 -21
- package/lib/commonjs/network/overrides/applyToFetch.js +1 -80
- package/lib/commonjs/network/overrides/applyToXhr.js +2 -510
- package/lib/commonjs/network/overrides/engine.js +1 -93
- package/lib/commonjs/network/overrides/matchRule.js +1 -87
- package/lib/commonjs/network/overrides/overriddenRows.js +1 -37
- package/lib/commonjs/network/overrides/overrideRulesStore.js +1 -550
- package/lib/commonjs/network/overrides/presets.js +1 -70
- package/lib/commonjs/network/overrides/resolveOverride.js +1 -158
- package/lib/commonjs/network/overrides/types.js +1 -90
- package/lib/commonjs/network/sync/networkBodyResolver.js +1 -39
- package/lib/commonjs/network/sync/networkSyncAdapter.js +1 -882
- package/lib/commonjs/network/sync/overrideHonesty.release.test.js +1 -36
- package/lib/commonjs/network/types/index.js +1 -5
- package/lib/commonjs/network/utils/extractOperationName.js +1 -80
- package/lib/commonjs/network/utils/filterNetworkEvents.js +1 -96
- package/lib/commonjs/network/utils/formatGraphQLVariables.js +1 -219
- package/lib/commonjs/network/utils/formatting.js +1 -30
- package/lib/commonjs/network/utils/generateCurl.js +2 -71
- package/lib/commonjs/network/utils/generateNetworkCopyText.js +37 -166
- package/lib/commonjs/network/utils/httpCompletion.js +1 -37
- package/lib/commonjs/network/utils/networkEventStore.js +1 -411
- package/lib/commonjs/network/utils/networkListener.js +4 -1352
- package/lib/commonjs/network/utils/networkSavedStore.js +3 -577
- package/lib/commonjs/network/utils/networkSelectionStore.js +1 -193
- package/lib/commonjs/network/utils/realNow.js +1 -0
- package/lib/commonjs/network/utils/requestId.js +1 -16
- package/lib/commonjs/network/utils/resolveRequestUrl.js +1 -15
- package/lib/commonjs/network/utils/selectSavedEvents.js +1 -39
- package/lib/commonjs/network/utils/startNetworkCapture.js +1 -24
- package/lib/commonjs/network/utils/withPinnedFirst.js +1 -32
- package/lib/commonjs/preset.js +1 -93
- package/lib/module/index.js +1 -104
- package/lib/module/index.web.js +1 -82
- package/lib/module/network/components/DataViewer.web.js +1 -875
- package/lib/module/network/components/NetworkCopyScreen.web.js +1 -44
- package/lib/module/network/components/NetworkCopySettingsView.js +27 -750
- package/lib/module/network/components/NetworkCopySettingsView.web.js +14 -1237
- package/lib/module/network/components/NetworkDetailScreen.web.js +1 -97
- package/lib/module/network/components/NetworkDetailStepper.js +1 -104
- package/lib/module/network/components/NetworkDetailStepper.web.js +1 -296
- package/lib/module/network/components/NetworkEventDetailView.js +15 -1129
- package/lib/module/network/components/NetworkEventDetailView.web.js +15 -1482
- package/lib/module/network/components/NetworkEventItemCompact.js +2 -398
- package/lib/module/network/components/NetworkEventItemCompact.web.js +2 -818
- package/lib/module/network/components/NetworkFilterScreen.web.js +1 -51
- package/lib/module/network/components/NetworkFilterViewV3.js +1 -438
- package/lib/module/network/components/NetworkFilterViewV3.web.js +1 -1306
- package/lib/module/network/components/NetworkHeaderLive.js +1 -366
- package/lib/module/network/components/NetworkHeaderLive.web.js +1 -617
- package/lib/module/network/components/NetworkHeaderMenu.js +1 -184
- package/lib/module/network/components/NetworkListScreen.js +1 -399
- package/lib/module/network/components/NetworkListScreen.web.js +1 -622
- package/lib/module/network/components/NetworkModal.js +1 -781
- package/lib/module/network/components/NetworkNumberPrompt.js +1 -174
- package/lib/module/network/components/NetworkNumberPrompt.web.js +1 -230
- package/lib/module/network/components/NetworkOverrideEditor.js +1 -811
- package/lib/module/network/components/NetworkOverrideEditor.web.js +1 -939
- package/lib/module/network/components/NetworkOverrideHeaderButton.js +1 -104
- package/lib/module/network/components/NetworkOverrideHeaderButton.web.js +1 -131
- package/lib/module/network/components/NetworkOverridesButton.js +1 -87
- package/lib/module/network/components/NetworkOverridesButton.web.js +1 -141
- package/lib/module/network/components/NetworkOverridesScreen.js +1 -539
- package/lib/module/network/components/NetworkOverridesScreen.web.js +1 -826
- package/lib/module/network/components/NetworkSavedScreen.js +1 -222
- package/lib/module/network/components/NetworkSavedScreen.web.js +1 -461
- package/lib/module/network/components/NetworkUpgradeBanner.js +1 -72
- package/lib/module/network/components/response-editor/Explorer.js +1 -972
- package/lib/module/network/components/response-editor/Explorer.web.js +1 -1133
- package/lib/module/network/components/response-editor/deleteNestedDataByPath.js +1 -51
- package/lib/module/network/components/response-editor/editorContext.js +1 -29
- package/lib/module/network/components/response-editor/updateNestedDataByPath.js +1 -56
- package/lib/module/network/conditions/NetworkConditionsControl.js +1 -231
- package/lib/module/network/conditions/NetworkConditionsControl.test.js +1 -135
- package/lib/module/network/conditions/NetworkConditionsIcon.js +1 -29
- package/lib/module/network/conditions/NetworkFloatingTool.js +1 -304
- package/lib/module/network/conditions/NetworkFloatingTool.test.js +1 -218
- package/lib/module/network/conditions/store.js +1 -65
- package/lib/module/network/conditions/wait.js +1 -38
- package/lib/module/network/conditions/xhr.js +1 -131
- package/lib/module/network/hooks/useLiveNetworkEvent.js +1 -58
- package/lib/module/network/hooks/useNetworkBadgeCounts.js +1 -79
- package/lib/module/network/hooks/useNetworkEventList.js +1 -104
- package/lib/module/network/hooks/useNetworkEvents.js +1 -314
- package/lib/module/network/hooks/useNetworkHasMatches.js +1 -52
- package/lib/module/network/hooks/useNetworkSaved.js +1 -34
- package/lib/module/network/hooks/useNetworkSelection.js +1 -46
- package/lib/module/network/hooks/useOverrideRules.js +1 -32
- package/lib/module/network/hooks/useTickEveryMinute.js +1 -11
- package/lib/module/network/overrides/applyToFetch.js +1 -72
- package/lib/module/network/overrides/applyToXhr.js +2 -502
- package/lib/module/network/overrides/engine.js +1 -85
- package/lib/module/network/overrides/matchRule.js +1 -81
- package/lib/module/network/overrides/overriddenRows.js +1 -33
- package/lib/module/network/overrides/overrideRulesStore.js +1 -547
- package/lib/module/network/overrides/presets.js +1 -65
- package/lib/module/network/overrides/resolveOverride.js +1 -152
- package/lib/module/network/overrides/types.js +1 -86
- package/lib/module/network/sync/networkBodyResolver.js +1 -34
- package/lib/module/network/sync/networkSyncAdapter.js +1 -880
- package/lib/module/network/sync/overrideHonesty.release.test.js +1 -35
- package/lib/module/network/types/index.js +1 -3
- package/lib/module/network/utils/extractOperationName.js +1 -76
- package/lib/module/network/utils/filterNetworkEvents.js +1 -92
- package/lib/module/network/utils/formatGraphQLVariables.js +1 -213
- package/lib/module/network/utils/formatting.js +1 -9
- package/lib/module/network/utils/generateCurl.js +2 -67
- package/lib/module/network/utils/generateNetworkCopyText.js +37 -162
- package/lib/module/network/utils/httpCompletion.js +1 -32
- package/lib/module/network/utils/networkEventStore.js +1 -409
- package/lib/module/network/utils/networkListener.js +4 -1341
- package/lib/module/network/utils/networkSavedStore.js +3 -572
- package/lib/module/network/utils/networkSelectionStore.js +1 -188
- package/lib/module/network/utils/realNow.js +1 -0
- package/lib/module/network/utils/requestId.js +1 -12
- package/lib/module/network/utils/resolveRequestUrl.js +1 -11
- package/lib/module/network/utils/selectSavedEvents.js +1 -35
- package/lib/module/network/utils/startNetworkCapture.js +1 -21
- package/lib/module/network/utils/withPinnedFirst.js +1 -28
- package/lib/module/preset.js +1 -91
- package/lib/typescript/network/overrides/engine.d.ts +1 -1
- package/lib/typescript/network/overrides/matchRule.d.ts +1 -1
- package/lib/typescript/network/overrides/resolveOverride.d.ts +2 -2
- package/lib/typescript/network/overrides/types.d.ts +9 -0
- package/lib/typescript/network/utils/networkListener.d.ts +11 -0
- package/lib/typescript/network/utils/realNow.d.ts +18 -0
- package/lib/web/index.mjs +73 -74
- package/package.json +2 -2
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/index.web.d.ts.map +0 -1
- package/lib/typescript/network/components/DataViewer.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkCopyScreen.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkCopySettingsView.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkCopySettingsView.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkDetailScreen.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkDetailStepper.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkDetailStepper.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkEventDetailView.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkEventDetailView.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkFilterScreen.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkFilterViewV3.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkFilterViewV3.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkHeaderLive.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkHeaderMenu.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkListScreen.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkModal.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkNumberPrompt.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkNumberPrompt.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverrideEditor.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverrideEditor.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverrideHeaderButton.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverrideHeaderButton.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverridesButton.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverridesButton.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverridesScreen.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkOverridesScreen.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkSavedScreen.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkSavedScreen.web.d.ts.map +0 -1
- package/lib/typescript/network/components/NetworkUpgradeBanner.d.ts.map +0 -1
- package/lib/typescript/network/components/response-editor/Explorer.d.ts.map +0 -1
- package/lib/typescript/network/components/response-editor/Explorer.web.d.ts.map +0 -1
- package/lib/typescript/network/components/response-editor/deleteNestedDataByPath.d.ts.map +0 -1
- package/lib/typescript/network/components/response-editor/editorContext.d.ts.map +0 -1
- package/lib/typescript/network/components/response-editor/updateNestedDataByPath.d.ts.map +0 -1
- package/lib/typescript/network/conditions/NetworkConditionsControl.d.ts.map +0 -1
- package/lib/typescript/network/conditions/NetworkConditionsControl.test.d.ts.map +0 -1
- package/lib/typescript/network/conditions/NetworkConditionsIcon.d.ts.map +0 -1
- package/lib/typescript/network/conditions/NetworkFloatingTool.d.ts.map +0 -1
- package/lib/typescript/network/conditions/NetworkFloatingTool.test.d.ts.map +0 -1
- package/lib/typescript/network/conditions/store.d.ts.map +0 -1
- package/lib/typescript/network/conditions/wait.d.ts.map +0 -1
- package/lib/typescript/network/conditions/xhr.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useLiveNetworkEvent.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useNetworkBadgeCounts.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useNetworkEventList.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useNetworkEvents.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useNetworkHasMatches.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useNetworkSaved.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useNetworkSelection.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useOverrideRules.d.ts.map +0 -1
- package/lib/typescript/network/hooks/useTickEveryMinute.d.ts.map +0 -1
- package/lib/typescript/network/overrides/applyToFetch.d.ts.map +0 -1
- package/lib/typescript/network/overrides/applyToXhr.d.ts.map +0 -1
- package/lib/typescript/network/overrides/engine.d.ts.map +0 -1
- package/lib/typescript/network/overrides/matchRule.d.ts.map +0 -1
- package/lib/typescript/network/overrides/overriddenRows.d.ts.map +0 -1
- package/lib/typescript/network/overrides/overrideRulesStore.d.ts.map +0 -1
- package/lib/typescript/network/overrides/presets.d.ts.map +0 -1
- package/lib/typescript/network/overrides/resolveOverride.d.ts.map +0 -1
- package/lib/typescript/network/overrides/types.d.ts.map +0 -1
- package/lib/typescript/network/sync/networkBodyResolver.d.ts.map +0 -1
- package/lib/typescript/network/sync/networkSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/network/sync/overrideHonesty.release.test.d.ts.map +0 -1
- package/lib/typescript/network/types/index.d.ts.map +0 -1
- package/lib/typescript/network/utils/extractOperationName.d.ts.map +0 -1
- package/lib/typescript/network/utils/filterNetworkEvents.d.ts.map +0 -1
- package/lib/typescript/network/utils/formatGraphQLVariables.d.ts.map +0 -1
- package/lib/typescript/network/utils/formatting.d.ts.map +0 -1
- package/lib/typescript/network/utils/generateCurl.d.ts.map +0 -1
- package/lib/typescript/network/utils/generateNetworkCopyText.d.ts.map +0 -1
- package/lib/typescript/network/utils/httpCompletion.d.ts.map +0 -1
- package/lib/typescript/network/utils/networkEventStore.d.ts.map +0 -1
- package/lib/typescript/network/utils/networkListener.d.ts.map +0 -1
- package/lib/typescript/network/utils/networkSavedStore.d.ts.map +0 -1
- package/lib/typescript/network/utils/networkSelectionStore.d.ts.map +0 -1
- package/lib/typescript/network/utils/requestId.d.ts.map +0 -1
- package/lib/typescript/network/utils/resolveRequestUrl.d.ts.map +0 -1
- package/lib/typescript/network/utils/selectSavedEvents.d.ts.map +0 -1
- package/lib/typescript/network/utils/startNetworkCapture.d.ts.map +0 -1
- package/lib/typescript/network/utils/withPinnedFirst.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
|
@@ -1,101 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NetworkDetailScreen = NetworkDetailScreen;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _useLiveNetworkEvent = require("../hooks/useLiveNetworkEvent");
|
|
9
|
-
var _useNetworkSelection = require("../hooks/useNetworkSelection");
|
|
10
|
-
var _networkSelectionStore = require("../utils/networkSelectionStore");
|
|
11
|
-
var _NetworkEventDetailView = require("./NetworkEventDetailView.web");
|
|
12
|
-
var _NetworkDetailStepper = require("./NetworkDetailStepper.web");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
/**
|
|
15
|
-
* NetworkDetailScreen.web — DOM twin of the `NetworkDetailScreen` screen
|
|
16
|
-
* component inside NetworkModal.tsx (the native detail screen is private to
|
|
17
|
-
* the modal; web hosts compose their own shell, so the screen is exported
|
|
18
|
-
* here as the reusable piece).
|
|
19
|
-
*
|
|
20
|
-
* Same rule4 contract and the same two-cursor render strategy as native:
|
|
21
|
-
*
|
|
22
|
-
* - Hooks run unconditionally; the component returns null when not visible.
|
|
23
|
-
* - The detail chrome renders at the IMMEDIATE selection
|
|
24
|
-
* (`useSelectedNetworkEventId`) — every step, no delay — while the
|
|
25
|
-
* expensive JSON body trees wait for the settled cursor
|
|
26
|
-
* (`useNetworkBodyEventId`): `showBodies` is false exactly while the
|
|
27
|
-
* prev/next cursor is still moving, so a burst of taps renders the request
|
|
28
|
-
* you land on and none of the ones you flew past.
|
|
29
|
-
* - The ID resolves through `useLiveNetworkEvent` so a request opened while
|
|
30
|
-
* pending picks up its response/error in place.
|
|
31
|
-
* - `reportRendered` still fires after the trees commit — benchmark
|
|
32
|
-
* instrumentation, same gating as native.
|
|
33
|
-
*
|
|
34
|
-
* All hooks and the selection store are the platform-free modules native
|
|
35
|
-
* uses — REUSED, not forked. Layout: the detail body scrolls, the stepper
|
|
36
|
-
* stays pinned under it (the body owns its scroll — see the native comment);
|
|
37
|
-
* the spacer holds the footer down when the ID resolves to nothing.
|
|
38
|
-
*
|
|
39
|
-
* @platform React DOM Web
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
function NetworkDetailScreen({
|
|
43
|
-
visible,
|
|
44
|
-
paused,
|
|
45
|
-
ignoredPatternValues,
|
|
46
|
-
onTogglePattern,
|
|
47
|
-
isPro,
|
|
48
|
-
filter,
|
|
49
|
-
ignoredPatterns,
|
|
50
|
-
fromSaved,
|
|
51
|
-
savedSearch,
|
|
52
|
-
applySafeAreaInset
|
|
53
|
-
}) {
|
|
54
|
-
const eventId = (0, _useNetworkSelection.useSelectedNetworkEventId)();
|
|
55
|
-
const settledId = (0, _useNetworkSelection.useNetworkBodyEventId)();
|
|
56
|
-
const heavyReady = eventId != null && eventId === settledId;
|
|
57
|
-
// Resolve the ID to the live event so a request opened while pending picks
|
|
58
|
-
// up its response/error in place instead of freezing on the tap snapshot.
|
|
59
|
-
const event = (0, _useLiveNetworkEvent.useLiveNetworkEvent)(eventId, {
|
|
60
|
-
paused: paused || !visible
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// Instrumentation for the benchmark harness — reports when the expensive
|
|
64
|
-
// TREES landed (gated on `heavyReady`, same rationale as native).
|
|
65
|
-
(0, _react.useEffect)(() => {
|
|
66
|
-
if (visible && event && heavyReady) {
|
|
67
|
-
_networkSelectionStore.networkSelectionStore.reportRendered(event.id);
|
|
68
|
-
}
|
|
69
|
-
}, [visible, event, heavyReady]);
|
|
70
|
-
if (!visible) return null;
|
|
71
|
-
// Column: the detail body scrolls, the stepper stays pinned under it.
|
|
72
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
73
|
-
style: {
|
|
74
|
-
display: "flex",
|
|
75
|
-
flexDirection: "column",
|
|
76
|
-
flex: 1,
|
|
77
|
-
minHeight: 0
|
|
78
|
-
},
|
|
79
|
-
children: [event ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkEventDetailView.NetworkEventDetailView, {
|
|
80
|
-
event: event,
|
|
81
|
-
ignoredPatterns: ignoredPatternValues,
|
|
82
|
-
onTogglePattern: onTogglePattern,
|
|
83
|
-
showBodies: heavyReady
|
|
84
|
-
}) :
|
|
85
|
-
/*#__PURE__*/
|
|
86
|
-
/* Holds the footer down when the selected ID resolves to no event. */
|
|
87
|
-
(0, _jsxRuntime.jsx)("div", {
|
|
88
|
-
style: {
|
|
89
|
-
flex: 1
|
|
90
|
-
}
|
|
91
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkDetailStepper.NetworkDetailStepper, {
|
|
92
|
-
paused: paused,
|
|
93
|
-
filter: filter,
|
|
94
|
-
ignoredPatterns: ignoredPatterns,
|
|
95
|
-
isPro: isPro,
|
|
96
|
-
fromSaved: fromSaved,
|
|
97
|
-
savedSearch: savedSearch,
|
|
98
|
-
applySafeAreaInset: applySafeAreaInset
|
|
99
|
-
})]
|
|
100
|
-
});
|
|
101
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NetworkDetailScreen=NetworkDetailScreen;var _react=require("react");var _useLiveNetworkEvent=require("../hooks/useLiveNetworkEvent");var _useNetworkSelection=require("../hooks/useNetworkSelection");var _networkSelectionStore=require("../utils/networkSelectionStore");var _NetworkEventDetailView=require("./NetworkEventDetailView.web");var _NetworkDetailStepper=require("./NetworkDetailStepper.web");var _jsxRuntime=require("react/jsx-runtime");function NetworkDetailScreen({visible:t,paused:n,ignoredPatternValues:i,onTogglePattern:s,isPro:a,filter:l,ignoredPatterns:u,fromSaved:v,savedSearch:w,applySafeAreaInset:c}){const r=(0,_useNetworkSelection.useSelectedNetworkEventId)();const d=(0,_useNetworkSelection.useNetworkBodyEventId)();const o=r!=null&&r===d;const e=(0,_useLiveNetworkEvent.useLiveNetworkEvent)(r,{paused:n||!t});(0,_react.useEffect)(()=>{if(t&&e&&o){_networkSelectionStore.networkSelectionStore.reportRendered(e.id)}},[t,e,o]);if(!t)return null;return(0,_jsxRuntime.jsxs)("div",{style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[e?(0,_jsxRuntime.jsx)(_NetworkEventDetailView.NetworkEventDetailView,{event:e,ignoredPatterns:i,onTogglePattern:s,showBodies:o}):(0,_jsxRuntime.jsx)("div",{style:{flex:1}}),(0,_jsxRuntime.jsx)(_NetworkDetailStepper.NetworkDetailStepper,{paused:n,filter:l,ignoredPatterns:u,isPro:a,fromSaved:v,savedSearch:w,applySafeAreaInset:c})]})}
|
|
@@ -1,108 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NetworkDetailStepper = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _useNetworkEventList = require("../hooks/useNetworkEventList");
|
|
10
|
-
var _useNetworkSaved = require("../hooks/useNetworkSaved");
|
|
11
|
-
var _useNetworkSelection = require("../hooks/useNetworkSelection");
|
|
12
|
-
var _networkSelectionStore = require("../utils/networkSelectionStore");
|
|
13
|
-
var _withPinnedFirst = require("../utils/withPinnedFirst");
|
|
14
|
-
var _selectSavedEvents = require("../utils/selectSavedEvents");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
/**
|
|
17
|
-
* Previous/Next footer for the request DETAIL screen — step through requests
|
|
18
|
-
* without bouncing back to the list.
|
|
19
|
-
*
|
|
20
|
-
* It is its OWN leaf (rule3) because it is the only part of the detail screen
|
|
21
|
-
* that needs the event LIST. Subscribing here keeps the request stream out of
|
|
22
|
-
* the detail body's render path, which is the expensive subtree (headers,
|
|
23
|
-
* bodies, JSON viewers): a request arriving re-renders this ~30-node footer
|
|
24
|
-
* and nothing else.
|
|
25
|
-
*
|
|
26
|
-
* The order it steps through is EXACTLY what the list screen renders —
|
|
27
|
-
* `[...pinned, ...rest]` off the same `useNetworkEventList` + `splitPinned`
|
|
28
|
-
* derivation — so "Next" always lands on the row below the one the user
|
|
29
|
-
* tapped. Because the live filter is an input, typing in the search box or
|
|
30
|
-
* flipping a status chip re-scopes the stepper in place; the counter is
|
|
31
|
-
* "request N of <what the list is showing>", never "N of everything ever
|
|
32
|
-
* captured". Detail opened from the Saved screen steps through the SAVED
|
|
33
|
-
* list instead (with its own search applied), for the same reason.
|
|
34
|
-
*
|
|
35
|
-
* This component OWNS the navigable order but not the cursor: it publishes
|
|
36
|
-
* the ordered ids into `networkSelectionStore` and reads the cursor back.
|
|
37
|
-
* That split is what makes stepping O(1) (the store keeps the index, so
|
|
38
|
-
* there is no `findIndex` per render) and what lets the benchmark harness
|
|
39
|
-
* drive `step(+1)` directly without going through the UI.
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
/** Stable identities — the store is a singleton, so these never need to change. */
|
|
43
|
-
const stepPrevious = () => _networkSelectionStore.networkSelectionStore.step(-1);
|
|
44
|
-
const stepNext = () => _networkSelectionStore.networkSelectionStore.step(1);
|
|
45
|
-
const NetworkDetailStepper = exports.NetworkDetailStepper = /*#__PURE__*/(0, _react.memo)(function NetworkDetailStepper({
|
|
46
|
-
paused,
|
|
47
|
-
filter,
|
|
48
|
-
ignoredPatterns,
|
|
49
|
-
isPro,
|
|
50
|
-
fromSaved,
|
|
51
|
-
savedSearch,
|
|
52
|
-
applySafeAreaInset
|
|
53
|
-
}) {
|
|
54
|
-
const {
|
|
55
|
-
visibleEvents
|
|
56
|
-
} = (0, _useNetworkEventList.useNetworkEventList)({
|
|
57
|
-
filter,
|
|
58
|
-
ignoredPatterns,
|
|
59
|
-
paused,
|
|
60
|
-
isPro
|
|
61
|
-
});
|
|
62
|
-
const {
|
|
63
|
-
pinnedEvents,
|
|
64
|
-
pinnedLiveIds,
|
|
65
|
-
savedRecords
|
|
66
|
-
} = (0, _useNetworkSaved.useNetworkSaved)();
|
|
67
|
-
const savedLimit = (0, _sharedUi.useLimit)("network.saved");
|
|
68
|
-
const ordered = (0, _react.useMemo)(() => {
|
|
69
|
-
if (fromSaved) {
|
|
70
|
-
return (0, _selectSavedEvents.selectSavedEvents)(savedRecords, savedLimit, savedSearch).events;
|
|
71
|
-
}
|
|
72
|
-
// Same split the list screen does — pins render above the FlatList, so
|
|
73
|
-
// they come first here too.
|
|
74
|
-
const {
|
|
75
|
-
pinned,
|
|
76
|
-
rest
|
|
77
|
-
} = (0, _withPinnedFirst.splitPinned)(visibleEvents, pinnedEvents, pinnedLiveIds);
|
|
78
|
-
return pinned.length === 0 ? rest : [...pinned, ...rest];
|
|
79
|
-
}, [fromSaved, savedRecords, savedSearch, isPro, visibleEvents, pinnedEvents, pinnedLiveIds]);
|
|
80
|
-
|
|
81
|
-
// Publish the navigable order. `setIds` re-anchors the cursor BY ID and
|
|
82
|
-
// no-ops when the ids are unchanged, so this is safe to run every render.
|
|
83
|
-
(0, _react.useEffect)(() => {
|
|
84
|
-
_networkSelectionStore.networkSelectionStore.setIds((0, _networkSelectionStore.toSelectionIds)(ordered));
|
|
85
|
-
}, [ordered]);
|
|
86
|
-
const {
|
|
87
|
-
index,
|
|
88
|
-
total
|
|
89
|
-
} = (0, _useNetworkSelection.useNetworkCursor)();
|
|
90
|
-
|
|
91
|
-
// Not in the list at all: the filter changed under it while it was open, it
|
|
92
|
-
// aged past the 500-request cap, or it is a saved snapshot with no live twin.
|
|
93
|
-
// There is no coherent "next" in that state, so show no footer rather than a
|
|
94
|
-
// counter that lies.
|
|
95
|
-
if (index < 0) return null;
|
|
96
|
-
|
|
97
|
-
// Both lists are newest-first, so "Previous" walks toward the NEWER request —
|
|
98
|
-
// the same direction as scrolling up, which is what the arrow means here.
|
|
99
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.EventStepperFooter, {
|
|
100
|
-
currentIndex: index,
|
|
101
|
-
totalItems: total,
|
|
102
|
-
itemLabel: "Request",
|
|
103
|
-
applySafeAreaInset: applySafeAreaInset,
|
|
104
|
-
onPrevious: stepPrevious,
|
|
105
|
-
onNext: stepNext,
|
|
106
|
-
variant: "night"
|
|
107
|
-
});
|
|
108
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NetworkDetailStepper=void 0;var _react=require("react");var _sharedUi=require("@buoy-gg/shared-ui");var _useNetworkEventList=require("../hooks/useNetworkEventList");var _useNetworkSaved=require("../hooks/useNetworkSaved");var _useNetworkSelection=require("../hooks/useNetworkSelection");var _networkSelectionStore=require("../utils/networkSelectionStore");var _withPinnedFirst=require("../utils/withPinnedFirst");var _selectSavedEvents=require("../utils/selectSavedEvents");var _jsxRuntime=require("react/jsx-runtime");const stepPrevious=()=>_networkSelectionStore.networkSelectionStore.step(-1);const stepNext=()=>_networkSelectionStore.networkSelectionStore.step(1);const NetworkDetailStepper=exports.NetworkDetailStepper=(0,_react.memo)(function N({paused:c,filter:d,ignoredPatterns:p,isPro:e,fromSaved:t,savedSearch:r,applySafeAreaInset:S}){const{visibleEvents:s}=(0,_useNetworkEventList.useNetworkEventList)({filter:d,ignoredPatterns:p,paused:c,isPro:e});const{pinnedEvents:o,pinnedLiveIds:n,savedRecords:i}=(0,_useNetworkSaved.useNetworkSaved)();const k=(0,_sharedUi.useLimit)("network.saved");const u=(0,_react.useMemo)(()=>{if(t){return(0,_selectSavedEvents.selectSavedEvents)(i,k,r).events}const{pinned:v,rest:l}=(0,_withPinnedFirst.splitPinned)(s,o,n);return v.length===0?l:[...v,...l]},[t,i,r,e,s,o,n]);(0,_react.useEffect)(()=>{_networkSelectionStore.networkSelectionStore.setIds((0,_networkSelectionStore.toSelectionIds)(u))},[u]);const{index:a,total:w}=(0,_useNetworkSelection.useNetworkCursor)();if(a<0)return null;return(0,_jsxRuntime.jsx)(_sharedUi.EventStepperFooter,{currentIndex:a,totalItems:w,itemLabel:"Request",applySafeAreaInset:S,onPrevious:stepPrevious,onNext:stepNext,variant:"night"})});
|
|
@@ -1,298 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NetworkDetailStepper = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _useNetworkEventList = require("../hooks/useNetworkEventList");
|
|
10
|
-
var _useNetworkSaved = require("../hooks/useNetworkSaved");
|
|
11
|
-
var _useNetworkSelection = require("../hooks/useNetworkSelection");
|
|
12
|
-
var _networkSelectionStore = require("../utils/networkSelectionStore");
|
|
13
|
-
var _withPinnedFirst = require("../utils/withPinnedFirst");
|
|
14
|
-
var _selectSavedEvents = require("../utils/selectSavedEvents");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
/**
|
|
17
|
-
* NetworkDetailStepper.web — DOM twin of NetworkDetailStepper.tsx.
|
|
18
|
-
*
|
|
19
|
-
* Previous/Next footer for the request DETAIL screen. The data layer is
|
|
20
|
-
* REUSED, not forked — `useNetworkEventList`, `useNetworkSaved`,
|
|
21
|
-
* `useNetworkCursor`, `networkSelectionStore`, `splitPinned` and
|
|
22
|
-
* `selectSavedEvents` are all platform-free — so the navigable order is
|
|
23
|
-
* EXACTLY what the list screen renders (`[...pinned, ...rest]`), re-scoped in
|
|
24
|
-
* place by the live filter, and detail opened from the Saved screen steps
|
|
25
|
-
* through the saved list instead. It is its own leaf for the same reason as
|
|
26
|
-
* native: it is the only part of the detail screen that needs the event LIST,
|
|
27
|
-
* so a request arriving re-renders this footer and nothing else.
|
|
28
|
-
*
|
|
29
|
-
* shared-ui RN chrome is replicated as DOM with provenance:
|
|
30
|
-
* - `EventStepperFooter` — inlined DOM twin below, values from
|
|
31
|
-
* shared/src/ui/components/EventStepperFooter.tsx (macOSColors verbatim;
|
|
32
|
-
* the native -2px shadow → an equivalent CSS box-shadow).
|
|
33
|
-
* - `applySafeAreaInset` maps `useSafeAreaInsets().bottom` →
|
|
34
|
-
* `env(safe-area-inset-bottom)` (0 on desktop webviews, the real inset on
|
|
35
|
-
* phone webviews).
|
|
36
|
-
*
|
|
37
|
-
* @platform React DOM Web
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
// =============================
|
|
41
|
-
// Native palette (provenance)
|
|
42
|
-
// =============================
|
|
43
|
-
|
|
44
|
-
/** macOSColors subset — shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts, verbatim. */const macOSColors = {
|
|
45
|
-
background: {
|
|
46
|
-
base: "#0A0A0C",
|
|
47
|
-
card: "#1A1A1C"
|
|
48
|
-
},
|
|
49
|
-
border: {
|
|
50
|
-
default: "#2D2D2F"
|
|
51
|
-
},
|
|
52
|
-
text: {
|
|
53
|
-
primary: "#F5F5F7",
|
|
54
|
-
secondary: "#A1A1A6",
|
|
55
|
-
muted: "#8E8E93"
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
// =============================
|
|
60
|
-
// Inline lucide icons (shared-ui icons are lucide re-exports)
|
|
61
|
-
// =============================
|
|
62
|
-
|
|
63
|
-
function Svg({
|
|
64
|
-
size = 14,
|
|
65
|
-
color = "currentColor",
|
|
66
|
-
children
|
|
67
|
-
}) {
|
|
68
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
69
|
-
width: size,
|
|
70
|
-
height: size,
|
|
71
|
-
viewBox: "0 0 24 24",
|
|
72
|
-
fill: "none",
|
|
73
|
-
stroke: color,
|
|
74
|
-
strokeWidth: 2,
|
|
75
|
-
strokeLinecap: "round",
|
|
76
|
-
strokeLinejoin: "round",
|
|
77
|
-
style: {
|
|
78
|
-
flexShrink: 0,
|
|
79
|
-
display: "block"
|
|
80
|
-
},
|
|
81
|
-
children: children
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
const ChevronLeft = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
|
|
85
|
-
...p,
|
|
86
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
87
|
-
d: "m15 18-6-6 6-6"
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
const ChevronRight = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
|
|
91
|
-
...p,
|
|
92
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
93
|
-
d: "m9 18 6-6-6-6"
|
|
94
|
-
})
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// =============================
|
|
98
|
-
// EventStepperFooter DOM twin (shared/src/ui/components/EventStepperFooter.tsx)
|
|
99
|
-
// =============================
|
|
100
|
-
|
|
101
|
-
const EventStepperFooter = /*#__PURE__*/(0, _react.memo)(function EventStepperFooter({
|
|
102
|
-
currentIndex,
|
|
103
|
-
totalItems,
|
|
104
|
-
onPrevious,
|
|
105
|
-
onNext,
|
|
106
|
-
itemLabel = "Event",
|
|
107
|
-
subtitle,
|
|
108
|
-
applySafeAreaInset = true
|
|
109
|
-
}) {
|
|
110
|
-
// Don't render if there's only one or no items (native).
|
|
111
|
-
if (totalItems <= 1) return null;
|
|
112
|
-
const isFirstItem = currentIndex === 0;
|
|
113
|
-
const isLastItem = currentIndex === totalItems - 1;
|
|
114
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
115
|
-
style: {
|
|
116
|
-
...footerStyles.footer,
|
|
117
|
-
paddingBottom: applySafeAreaInset ? "calc(12px + env(safe-area-inset-bottom, 0px))" : 12
|
|
118
|
-
},
|
|
119
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
120
|
-
type: "button",
|
|
121
|
-
onClick: onPrevious,
|
|
122
|
-
disabled: isFirstItem,
|
|
123
|
-
style: {
|
|
124
|
-
...footerStyles.navButton,
|
|
125
|
-
...(isFirstItem ? footerStyles.navButtonDisabled : null)
|
|
126
|
-
},
|
|
127
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ChevronLeft, {
|
|
128
|
-
size: 20,
|
|
129
|
-
color: isFirstItem ? macOSColors.text.muted : macOSColors.text.primary
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
131
|
-
style: {
|
|
132
|
-
...footerStyles.navButtonText,
|
|
133
|
-
...(isFirstItem ? footerStyles.navButtonTextDisabled : null)
|
|
134
|
-
},
|
|
135
|
-
children: "Previous"
|
|
136
|
-
})]
|
|
137
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
138
|
-
style: footerStyles.counterContainer,
|
|
139
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
140
|
-
style: footerStyles.counterText,
|
|
141
|
-
children: [itemLabel, " ", currentIndex + 1, " of ", totalItems]
|
|
142
|
-
}), subtitle ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
143
|
-
style: footerStyles.subtitleText,
|
|
144
|
-
children: subtitle
|
|
145
|
-
}) : null]
|
|
146
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
147
|
-
type: "button",
|
|
148
|
-
onClick: onNext,
|
|
149
|
-
disabled: isLastItem,
|
|
150
|
-
style: {
|
|
151
|
-
...footerStyles.navButton,
|
|
152
|
-
...(isLastItem ? footerStyles.navButtonDisabled : null)
|
|
153
|
-
},
|
|
154
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
155
|
-
style: {
|
|
156
|
-
...footerStyles.navButtonText,
|
|
157
|
-
...(isLastItem ? footerStyles.navButtonTextDisabled : null)
|
|
158
|
-
},
|
|
159
|
-
children: "Next"
|
|
160
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ChevronRight, {
|
|
161
|
-
size: 20,
|
|
162
|
-
color: isLastItem ? macOSColors.text.muted : macOSColors.text.primary
|
|
163
|
-
})]
|
|
164
|
-
})]
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
// Values mirror the native StyleSheet block 1:1.
|
|
169
|
-
const footerStyles = {
|
|
170
|
-
footer: {
|
|
171
|
-
display: "flex",
|
|
172
|
-
flexDirection: "row",
|
|
173
|
-
alignItems: "center",
|
|
174
|
-
justifyContent: "space-between",
|
|
175
|
-
padding: "12px 16px 12px",
|
|
176
|
-
backgroundColor: macOSColors.background.base,
|
|
177
|
-
borderTop: `1px solid ${macOSColors.border.default}`,
|
|
178
|
-
// Native: shadowOffset 0/-2, opacity 0.1, radius 4.
|
|
179
|
-
boxShadow: "0 -2px 4px rgba(0, 0, 0, 0.1)",
|
|
180
|
-
flexShrink: 0
|
|
181
|
-
},
|
|
182
|
-
navButton: {
|
|
183
|
-
display: "inline-flex",
|
|
184
|
-
flexDirection: "row",
|
|
185
|
-
alignItems: "center",
|
|
186
|
-
gap: 6,
|
|
187
|
-
padding: "8px 12px",
|
|
188
|
-
borderRadius: 6,
|
|
189
|
-
backgroundColor: macOSColors.background.card,
|
|
190
|
-
minWidth: 100,
|
|
191
|
-
boxSizing: "border-box",
|
|
192
|
-
justifyContent: "center",
|
|
193
|
-
border: "none",
|
|
194
|
-
cursor: "pointer",
|
|
195
|
-
margin: 0
|
|
196
|
-
},
|
|
197
|
-
navButtonDisabled: {
|
|
198
|
-
opacity: 0.3,
|
|
199
|
-
cursor: "default"
|
|
200
|
-
},
|
|
201
|
-
navButtonText: {
|
|
202
|
-
fontSize: 12,
|
|
203
|
-
fontWeight: 600,
|
|
204
|
-
color: macOSColors.text.primary,
|
|
205
|
-
fontFamily: "ui-monospace, Menlo, monospace",
|
|
206
|
-
textTransform: "uppercase"
|
|
207
|
-
},
|
|
208
|
-
navButtonTextDisabled: {
|
|
209
|
-
color: macOSColors.text.muted
|
|
210
|
-
},
|
|
211
|
-
counterContainer: {
|
|
212
|
-
display: "flex",
|
|
213
|
-
flexDirection: "column",
|
|
214
|
-
alignItems: "center"
|
|
215
|
-
},
|
|
216
|
-
counterText: {
|
|
217
|
-
fontSize: 14,
|
|
218
|
-
fontWeight: 700,
|
|
219
|
-
color: macOSColors.text.primary,
|
|
220
|
-
fontFamily: "ui-monospace, Menlo, monospace",
|
|
221
|
-
textTransform: "uppercase"
|
|
222
|
-
},
|
|
223
|
-
subtitleText: {
|
|
224
|
-
fontSize: 11,
|
|
225
|
-
color: macOSColors.text.secondary,
|
|
226
|
-
fontFamily: "ui-monospace, Menlo, monospace",
|
|
227
|
-
marginTop: 2
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
// =============================
|
|
232
|
-
// Stepper (logic mirrors the native file 1:1)
|
|
233
|
-
// =============================
|
|
234
|
-
|
|
235
|
-
/** Stable identities — the store is a singleton, so these never need to change. */
|
|
236
|
-
const stepPrevious = () => _networkSelectionStore.networkSelectionStore.step(-1);
|
|
237
|
-
const stepNext = () => _networkSelectionStore.networkSelectionStore.step(1);
|
|
238
|
-
const NetworkDetailStepper = exports.NetworkDetailStepper = /*#__PURE__*/(0, _react.memo)(function NetworkDetailStepper({
|
|
239
|
-
paused,
|
|
240
|
-
filter,
|
|
241
|
-
ignoredPatterns,
|
|
242
|
-
isPro,
|
|
243
|
-
fromSaved,
|
|
244
|
-
savedSearch,
|
|
245
|
-
applySafeAreaInset
|
|
246
|
-
}) {
|
|
247
|
-
const {
|
|
248
|
-
visibleEvents
|
|
249
|
-
} = (0, _useNetworkEventList.useNetworkEventList)({
|
|
250
|
-
filter,
|
|
251
|
-
ignoredPatterns,
|
|
252
|
-
paused,
|
|
253
|
-
isPro
|
|
254
|
-
});
|
|
255
|
-
const {
|
|
256
|
-
pinnedEvents,
|
|
257
|
-
pinnedLiveIds,
|
|
258
|
-
savedRecords
|
|
259
|
-
} = (0, _useNetworkSaved.useNetworkSaved)();
|
|
260
|
-
const savedLimit = (0, _sharedUi.useLimit)("network.saved");
|
|
261
|
-
const ordered = (0, _react.useMemo)(() => {
|
|
262
|
-
if (fromSaved) {
|
|
263
|
-
return (0, _selectSavedEvents.selectSavedEvents)(savedRecords, savedLimit, savedSearch).events;
|
|
264
|
-
}
|
|
265
|
-
// Same split the list screen does — pins render above the list, so they
|
|
266
|
-
// come first here too.
|
|
267
|
-
const {
|
|
268
|
-
pinned,
|
|
269
|
-
rest
|
|
270
|
-
} = (0, _withPinnedFirst.splitPinned)(visibleEvents, pinnedEvents, pinnedLiveIds);
|
|
271
|
-
return pinned.length === 0 ? rest : [...pinned, ...rest];
|
|
272
|
-
}, [fromSaved, savedRecords, savedSearch, isPro, visibleEvents, pinnedEvents, pinnedLiveIds]);
|
|
273
|
-
|
|
274
|
-
// Publish the navigable order. `setIds` re-anchors the cursor BY ID and
|
|
275
|
-
// no-ops when the ids are unchanged, so this is safe to run every render.
|
|
276
|
-
(0, _react.useEffect)(() => {
|
|
277
|
-
_networkSelectionStore.networkSelectionStore.setIds((0, _networkSelectionStore.toSelectionIds)(ordered));
|
|
278
|
-
}, [ordered]);
|
|
279
|
-
const {
|
|
280
|
-
index,
|
|
281
|
-
total
|
|
282
|
-
} = (0, _useNetworkSelection.useNetworkCursor)();
|
|
283
|
-
|
|
284
|
-
// Not in the list at all (filter changed under it, aged past the cap, or a
|
|
285
|
-
// saved snapshot with no live twin) — no footer rather than a counter that
|
|
286
|
-
// lies.
|
|
287
|
-
if (index < 0) return null;
|
|
288
|
-
|
|
289
|
-
// Both lists are newest-first, so "Previous" walks toward the NEWER request.
|
|
290
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(EventStepperFooter, {
|
|
291
|
-
currentIndex: index,
|
|
292
|
-
totalItems: total,
|
|
293
|
-
itemLabel: "Request",
|
|
294
|
-
applySafeAreaInset: applySafeAreaInset,
|
|
295
|
-
onPrevious: stepPrevious,
|
|
296
|
-
onNext: stepNext
|
|
297
|
-
});
|
|
298
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NetworkDetailStepper=void 0;var _react=require("react");var _sharedUi=require("@buoy-gg/shared-ui");var _useNetworkEventList=require("../hooks/useNetworkEventList");var _useNetworkSaved=require("../hooks/useNetworkSaved");var _useNetworkSelection=require("../hooks/useNetworkSelection");var _networkSelectionStore=require("../utils/networkSelectionStore");var _withPinnedFirst=require("../utils/withPinnedFirst");var _selectSavedEvents=require("../utils/selectSavedEvents");var _jsxRuntime=require("react/jsx-runtime");const macOSColors={background:{base:"#0A0A0C",card:"#1A1A1C"},border:{default:"#2D2D2F"},text:{primary:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93"}};function Svg({size:e=14,color:t="currentColor",children:o}){return(0,_jsxRuntime.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0,display:"block"},children:o})}const ChevronLeft=e=>(0,_jsxRuntime.jsx)(Svg,{...e,children:(0,_jsxRuntime.jsx)("path",{d:"m15 18-6-6 6-6"})});const ChevronRight=e=>(0,_jsxRuntime.jsx)(Svg,{...e,children:(0,_jsxRuntime.jsx)("path",{d:"m9 18 6-6-6-6"})});const EventStepperFooter=(0,_react.memo)(function e({currentIndex:t,totalItems:o,onPrevious:l,onNext:i,itemLabel:a="Event",subtitle:s,applySafeAreaInset:u=true}){if(o<=1)return null;const n=t===0;const r=t===o-1;return(0,_jsxRuntime.jsxs)("div",{style:{...footerStyles.footer,paddingBottom:u?"calc(12px + env(safe-area-inset-bottom, 0px))":12},children:[(0,_jsxRuntime.jsxs)("button",{type:"button",onClick:l,disabled:n,style:{...footerStyles.navButton,...n?footerStyles.navButtonDisabled:null},children:[(0,_jsxRuntime.jsx)(ChevronLeft,{size:20,color:n?macOSColors.text.muted:macOSColors.text.primary}),(0,_jsxRuntime.jsx)("span",{style:{...footerStyles.navButtonText,...n?footerStyles.navButtonTextDisabled:null},children:"Previous"})]}),(0,_jsxRuntime.jsxs)("div",{style:footerStyles.counterContainer,children:[(0,_jsxRuntime.jsxs)("span",{style:footerStyles.counterText,children:[a," ",t+1," of ",o]}),s?(0,_jsxRuntime.jsx)("span",{style:footerStyles.subtitleText,children:s}):null]}),(0,_jsxRuntime.jsxs)("button",{type:"button",onClick:i,disabled:r,style:{...footerStyles.navButton,...r?footerStyles.navButtonDisabled:null},children:[(0,_jsxRuntime.jsx)("span",{style:{...footerStyles.navButtonText,...r?footerStyles.navButtonTextDisabled:null},children:"Next"}),(0,_jsxRuntime.jsx)(ChevronRight,{size:20,color:r?macOSColors.text.muted:macOSColors.text.primary})]})]})});const footerStyles={footer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"12px 16px 12px",backgroundColor:macOSColors.background.base,borderTop:`1px solid ${macOSColors.border.default}`,boxShadow:"0 -2px 4px rgba(0, 0, 0, 0.1)",flexShrink:0},navButton:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:6,padding:"8px 12px",borderRadius:6,backgroundColor:macOSColors.background.card,minWidth:100,boxSizing:"border-box",justifyContent:"center",border:"none",cursor:"pointer",margin:0},navButtonDisabled:{opacity:.3,cursor:"default"},navButtonText:{fontSize:12,fontWeight:600,color:macOSColors.text.primary,fontFamily:"ui-monospace, Menlo, monospace",textTransform:"uppercase"},navButtonTextDisabled:{color:macOSColors.text.muted},counterContainer:{display:"flex",flexDirection:"column",alignItems:"center"},counterText:{fontSize:14,fontWeight:700,color:macOSColors.text.primary,fontFamily:"ui-monospace, Menlo, monospace",textTransform:"uppercase"},subtitleText:{fontSize:11,color:macOSColors.text.secondary,fontFamily:"ui-monospace, Menlo, monospace",marginTop:2}};const stepPrevious=()=>_networkSelectionStore.networkSelectionStore.step(-1);const stepNext=()=>_networkSelectionStore.networkSelectionStore.step(1);const NetworkDetailStepper=exports.NetworkDetailStepper=(0,_react.memo)(function e({paused:t,filter:o,ignoredPatterns:l,isPro:i,fromSaved:a,savedSearch:s,applySafeAreaInset:u}){const{visibleEvents:n}=(0,_useNetworkEventList.useNetworkEventList)({filter:o,ignoredPatterns:l,paused:t,isPro:i});const{pinnedEvents:r,pinnedLiveIds:c,savedRecords:d}=(0,_useNetworkSaved.useNetworkSaved)();const f=(0,_sharedUi.useLimit)("network.saved");const p=(0,_react.useMemo)(()=>{if(a){return(0,_selectSavedEvents.selectSavedEvents)(d,f,s).events}const{pinned:v,rest:m}=(0,_withPinnedFirst.splitPinned)(n,r,c);return v.length===0?m:[...v,...m]},[a,d,s,i,n,r,c]);(0,_react.useEffect)(()=>{_networkSelectionStore.networkSelectionStore.setIds((0,_networkSelectionStore.toSelectionIds)(p))},[p]);const{index:x,total:b}=(0,_useNetworkSelection.useNetworkCursor)();if(x<0)return null;return(0,_jsxRuntime.jsx)(EventStepperFooter,{currentIndex:x,totalItems:b,itemLabel:"Request",applySafeAreaInset:u,onPrevious:stepPrevious,onNext:stepNext})});
|