@buoy-gg/network 7.0.41 → 7.0.43
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 +3 -6
- 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,624 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NetworkListScreen = NetworkListScreen;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _NetworkEventItemCompact = require("./NetworkEventItemCompact.web");
|
|
9
|
-
var _useNetworkEventList = require("../hooks/useNetworkEventList");
|
|
10
|
-
var _useNetworkSaved = require("../hooks/useNetworkSaved");
|
|
11
|
-
var _useOverrideRules = require("../hooks/useOverrideRules");
|
|
12
|
-
var _overriddenRows = require("../overrides/overriddenRows");
|
|
13
|
-
var _withPinnedFirst = require("../utils/withPinnedFirst");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
/**
|
|
16
|
-
* NetworkListScreen.web — DOM twin of NetworkListScreen.tsx.
|
|
17
|
-
*
|
|
18
|
-
* The network tool's LIST screen: owns the event-store subscription, the
|
|
19
|
-
* scrolling list, the OVERRIDDEN and PINNED strips, empty state, disabled
|
|
20
|
-
* banner, and the free-tier locked-history footer. Identical prop contract,
|
|
21
|
-
* hook usage and derivation order as the native file — the data layer is
|
|
22
|
-
* REUSED, not forked (`useNetworkEventList`, `useNetworkSaved`,
|
|
23
|
-
* `useOverrideRules`, `ruleMatches`, `splitPinned` are all platform-free).
|
|
24
|
-
*
|
|
25
|
-
* Stable-tree contract (rule4): hooks run unconditionally, then the
|
|
26
|
-
* component returns null when not visible. The subscription is gated with
|
|
27
|
-
* `paused || !visible` so a hidden list doesn't subscribe at all.
|
|
28
|
-
*
|
|
29
|
-
* shared-ui RN chrome is replicated as DOM with provenance (web consumers
|
|
30
|
-
* resolve `@buoy-gg/shared-ui` to a minimal shim):
|
|
31
|
-
* - `macOSColors` / `buoyColors` — inlined verbatim subsets from
|
|
32
|
-
* shared/src/ui/gameUI/constants/.
|
|
33
|
-
* - Icons — inline lucide SVGs (shared-ui's icons are lucide re-exports).
|
|
34
|
-
* - `NetworkUpgradeBanner` (which itself leans on shared-ui `ProBadge` +
|
|
35
|
-
* `Zap`) — inlined DOM twin below, values from
|
|
36
|
-
* NetworkUpgradeBanner.tsx + license/FeatureGate.tsx `proBadge` styles.
|
|
37
|
-
*
|
|
38
|
-
* Intentional deviations (all logged):
|
|
39
|
-
* - FlatList virtualization → a plain scrolled div. The store caps at 500
|
|
40
|
-
* events and web rows are cheap DOM; the window/batch tuning the native
|
|
41
|
-
* list carries is a FlatList-only concern.
|
|
42
|
-
* (`extraData={savedLiveIds}` is likewise moot — plain `map` has no
|
|
43
|
-
* PureComponent bail-out to bust.)
|
|
44
|
-
* - The upgrade banner's `ProBadge` renders the static gold "PRO" — the
|
|
45
|
-
* Weekend Pass variant reads `useProAccess` from @buoy-gg/license, which
|
|
46
|
-
* is not part of the web port.
|
|
47
|
-
* - `onEventPress` opens the detail view (ported in F3 as
|
|
48
|
-
* NetworkEventDetailView.web / NetworkDetailScreen.web) — callers wire the
|
|
49
|
-
* prop to `networkSelectionStore.select`, the screen just calls it
|
|
50
|
-
* (native behavior; nothing stubbed here).
|
|
51
|
-
* - Native's row tap opens the detail view and long-press toggles the pin;
|
|
52
|
-
* both are wired identically here (long-press = 500ms pointer hold, see
|
|
53
|
-
* NetworkEventItemCompact.web).
|
|
54
|
-
*
|
|
55
|
-
* F4 integration point: `ignoredPatterns` is a prop (same as native). The
|
|
56
|
-
* native root feeds it from shared-ui's persisted `useIgnoredPatterns` store,
|
|
57
|
-
* which the web shim does not expose — web hosts pass `[]` until the filter
|
|
58
|
-
* feature lands.
|
|
59
|
-
*
|
|
60
|
-
* @platform React DOM Web
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
// =============================
|
|
64
|
-
// Native palettes (provenance)
|
|
65
|
-
// =============================
|
|
66
|
-
|
|
67
|
-
/** macOSColors subset — shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts, verbatim. */const macOSColors = {
|
|
68
|
-
background: {
|
|
69
|
-
card: "#1A1A1C"
|
|
70
|
-
},
|
|
71
|
-
border: {
|
|
72
|
-
default: "#2D2D2F"
|
|
73
|
-
},
|
|
74
|
-
text: {
|
|
75
|
-
primary: "#F5F5F7",
|
|
76
|
-
muted: "#8E8E93"
|
|
77
|
-
},
|
|
78
|
-
semantic: {
|
|
79
|
-
warning: "#FFEB3B",
|
|
80
|
-
warningBackground: "rgba(255, 235, 59, 0.15)",
|
|
81
|
-
info: "#00B8E6"
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/** buoyColors subset — shared/src/ui/gameUI/constants/gameUIColors.ts (macOS theme), verbatim. */
|
|
86
|
-
const buoy = {
|
|
87
|
-
card: "#1A1A1A",
|
|
88
|
-
text: "#E0E0E0",
|
|
89
|
-
textMuted: "#888888",
|
|
90
|
-
primary: "#20C997"
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// =============================
|
|
94
|
-
// Inline lucide icons (shared-ui icons are lucide re-exports)
|
|
95
|
-
// =============================
|
|
96
|
-
|
|
97
|
-
function Svg({
|
|
98
|
-
size = 14,
|
|
99
|
-
color = "currentColor",
|
|
100
|
-
children
|
|
101
|
-
}) {
|
|
102
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
103
|
-
width: size,
|
|
104
|
-
height: size,
|
|
105
|
-
viewBox: "0 0 24 24",
|
|
106
|
-
fill: "none",
|
|
107
|
-
stroke: color,
|
|
108
|
-
strokeWidth: 2,
|
|
109
|
-
strokeLinecap: "round",
|
|
110
|
-
strokeLinejoin: "round",
|
|
111
|
-
style: {
|
|
112
|
-
flexShrink: 0,
|
|
113
|
-
display: "block"
|
|
114
|
-
},
|
|
115
|
-
children: children
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
const Globe = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
119
|
-
...p,
|
|
120
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
121
|
-
cx: "12",
|
|
122
|
-
cy: "12",
|
|
123
|
-
r: "10"
|
|
124
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
125
|
-
d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"
|
|
126
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
127
|
-
d: "M2 12h20"
|
|
128
|
-
})]
|
|
129
|
-
});
|
|
130
|
-
const Pin = ({
|
|
131
|
-
active,
|
|
132
|
-
...p
|
|
133
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
|
|
134
|
-
...p,
|
|
135
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
136
|
-
transform: active ? "rotate(-45 12 12) translate(12 12) scale(0.92) translate(-12 -12)" : undefined,
|
|
137
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
138
|
-
d: "M2.97 21.03 8.18 15.82"
|
|
139
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
140
|
-
d: "M4.4 10.81 13.19 19.6"
|
|
141
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
142
|
-
d: "M5.17 10.54 11.43 8.83"
|
|
143
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
144
|
-
d: "M13.46 18.83 15.17 12.57"
|
|
145
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
|
|
146
|
-
x: "12.15",
|
|
147
|
-
y: "5.4",
|
|
148
|
-
width: "9.38",
|
|
149
|
-
height: "3.52",
|
|
150
|
-
rx: "1.07",
|
|
151
|
-
transform: "rotate(-45 16.84 7.16)"
|
|
152
|
-
})]
|
|
153
|
-
})
|
|
154
|
-
});
|
|
155
|
-
const Power = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
156
|
-
...p,
|
|
157
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
158
|
-
d: "M12 2v10"
|
|
159
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
160
|
-
d: "M18.4 6.6a9 9 0 1 1-12.77.04"
|
|
161
|
-
})]
|
|
162
|
-
});
|
|
163
|
-
const FlaskConical = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
164
|
-
...p,
|
|
165
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
166
|
-
d: "M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"
|
|
167
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
168
|
-
d: "M8.5 2h7"
|
|
169
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
170
|
-
d: "M7 16h10"
|
|
171
|
-
})]
|
|
172
|
-
});
|
|
173
|
-
const Zap = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
|
|
174
|
-
...p,
|
|
175
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", {
|
|
176
|
-
points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2"
|
|
177
|
-
})
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
// =============================
|
|
181
|
-
// NetworkUpgradeBanner DOM twin (provenance: NetworkUpgradeBanner.tsx +
|
|
182
|
-
// license/FeatureGate.tsx proBadge styles; ProBadge is static "PRO" — see
|
|
183
|
-
// the deviations log)
|
|
184
|
-
// =============================
|
|
185
|
-
|
|
186
|
-
function NetworkUpgradeBannerWeb({
|
|
187
|
-
title,
|
|
188
|
-
subtitle,
|
|
189
|
-
onPress
|
|
190
|
-
}) {
|
|
191
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
192
|
-
type: "button",
|
|
193
|
-
style: styles.upgradeBanner,
|
|
194
|
-
onClick: onPress,
|
|
195
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
196
|
-
style: styles.upgradeContent,
|
|
197
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
198
|
-
style: styles.upgradeLeft,
|
|
199
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Zap, {
|
|
200
|
-
size: 16,
|
|
201
|
-
color: buoy.primary
|
|
202
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
203
|
-
style: styles.upgradeTitle,
|
|
204
|
-
children: title
|
|
205
|
-
})]
|
|
206
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
207
|
-
style: styles.proBadge,
|
|
208
|
-
children: "PRO"
|
|
209
|
-
})]
|
|
210
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
211
|
-
style: styles.upgradeSubtitle,
|
|
212
|
-
children: subtitle
|
|
213
|
-
})]
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// =============================
|
|
218
|
-
// Screen (structure mirrors the native file 1:1)
|
|
219
|
-
// =============================
|
|
220
|
-
|
|
221
|
-
function EmptyState({
|
|
222
|
-
isEnabled
|
|
223
|
-
}) {
|
|
224
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
225
|
-
style: styles.emptyState,
|
|
226
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Globe, {
|
|
227
|
-
size: 32,
|
|
228
|
-
color: macOSColors.text.muted
|
|
229
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
230
|
-
style: styles.emptyTitle,
|
|
231
|
-
children: "No network events"
|
|
232
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
233
|
-
style: styles.emptyText,
|
|
234
|
-
children: isEnabled ? "Network requests will appear here" : "Enable interception to start capturing"
|
|
235
|
-
})]
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* The PINNED strip above the live list. Renders OUTSIDE the scrolled list on
|
|
241
|
-
* purpose — pins ignore the filters, are bounded at MAX_PINNED in the store,
|
|
242
|
-
* and keeping them out of the list keeps the boundary from moving as events
|
|
243
|
-
* arrive (same rationale as native).
|
|
244
|
-
*/
|
|
245
|
-
function PinnedSection({
|
|
246
|
-
events,
|
|
247
|
-
onEventPress,
|
|
248
|
-
onLongPress,
|
|
249
|
-
savedLiveIds,
|
|
250
|
-
onClearPinned
|
|
251
|
-
}) {
|
|
252
|
-
if (events.length === 0) return null;
|
|
253
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
254
|
-
style: styles.pinnedSection,
|
|
255
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
256
|
-
style: styles.pinnedHeader,
|
|
257
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Pin, {
|
|
258
|
-
size: 11,
|
|
259
|
-
active: true,
|
|
260
|
-
color: macOSColors.semantic.info
|
|
261
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
262
|
-
style: styles.pinnedTitle,
|
|
263
|
-
children: ["PINNED \xB7 ", events.length]
|
|
264
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
265
|
-
type: "button",
|
|
266
|
-
onClick: onClearPinned,
|
|
267
|
-
style: styles.pinnedClear,
|
|
268
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
269
|
-
style: styles.pinnedClearText,
|
|
270
|
-
children: "Unpin all"
|
|
271
|
-
})
|
|
272
|
-
})]
|
|
273
|
-
}), events.map(event => /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact, {
|
|
274
|
-
event: event,
|
|
275
|
-
onPress: onEventPress,
|
|
276
|
-
onLongPress: onLongPress,
|
|
277
|
-
pinned: true,
|
|
278
|
-
saved: savedLiveIds.has(event.id)
|
|
279
|
-
}, event.id))]
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* The OVERRIDDEN strip, above the pins. Rows are matched against the RULES
|
|
285
|
-
* rather than filtered on the `override` mark, and the header button is
|
|
286
|
-
* PAUSE, not "Manage" — same reasoning as native (see NetworkListScreen.tsx).
|
|
287
|
-
*/
|
|
288
|
-
function OverriddenSection({
|
|
289
|
-
events,
|
|
290
|
-
onEventPress,
|
|
291
|
-
onLongPress,
|
|
292
|
-
savedLiveIds,
|
|
293
|
-
paused,
|
|
294
|
-
onTogglePaused
|
|
295
|
-
}) {
|
|
296
|
-
if (events.length === 0) return null;
|
|
297
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
298
|
-
style: {
|
|
299
|
-
...styles.overriddenSection,
|
|
300
|
-
...(paused ? styles.overriddenSectionOff : null)
|
|
301
|
-
},
|
|
302
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
303
|
-
style: styles.overriddenHeader,
|
|
304
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FlaskConical, {
|
|
305
|
-
size: 11,
|
|
306
|
-
color: paused ? macOSColors.text.muted : macOSColors.semantic.warning
|
|
307
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
308
|
-
style: {
|
|
309
|
-
...styles.overriddenTitle,
|
|
310
|
-
...(paused ? styles.overriddenTitleOff : null)
|
|
311
|
-
},
|
|
312
|
-
children: paused ? `PAUSED · ${events.length}` : `OVERRIDDEN · ${events.length}`
|
|
313
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
314
|
-
type: "button",
|
|
315
|
-
onClick: onTogglePaused,
|
|
316
|
-
style: styles.overriddenManage,
|
|
317
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
318
|
-
style: {
|
|
319
|
-
...styles.overriddenManageText,
|
|
320
|
-
...(paused ? styles.overriddenTitleOff : null)
|
|
321
|
-
},
|
|
322
|
-
children: paused ? "Resume" : "Pause"
|
|
323
|
-
})
|
|
324
|
-
})]
|
|
325
|
-
}), events.map(event => /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact, {
|
|
326
|
-
event: event,
|
|
327
|
-
onPress: onEventPress,
|
|
328
|
-
onLongPress: onLongPress,
|
|
329
|
-
overridden: true,
|
|
330
|
-
saved: savedLiveIds.has(event.id)
|
|
331
|
-
}, event.id))]
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
function NetworkListScreen({
|
|
335
|
-
visible,
|
|
336
|
-
paused,
|
|
337
|
-
filter,
|
|
338
|
-
ignoredPatterns,
|
|
339
|
-
isPro,
|
|
340
|
-
searchText,
|
|
341
|
-
onEventPress,
|
|
342
|
-
onUpgradePress
|
|
343
|
-
}) {
|
|
344
|
-
const {
|
|
345
|
-
visibleEvents,
|
|
346
|
-
hasLockedEvents,
|
|
347
|
-
lockedEventCount
|
|
348
|
-
} = (0, _useNetworkEventList.useNetworkEventList)({
|
|
349
|
-
filter,
|
|
350
|
-
ignoredPatterns,
|
|
351
|
-
paused: paused || !visible,
|
|
352
|
-
isPro
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
// Pins come from the persisted saved store, NOT from the live list — that is
|
|
356
|
-
// what lets a pinned failure survive Clear, the 500-event cap and a reload.
|
|
357
|
-
const {
|
|
358
|
-
pinnedEvents,
|
|
359
|
-
pinnedLiveIds,
|
|
360
|
-
savedLiveIds,
|
|
361
|
-
togglePin,
|
|
362
|
-
clearPinned
|
|
363
|
-
} = (0, _useNetworkSaved.useNetworkSaved)();
|
|
364
|
-
|
|
365
|
-
// Which rules are live right now — the strip below reflects the rules, not
|
|
366
|
-
// the history, so it's correct the moment a rule is made or removed.
|
|
367
|
-
const {
|
|
368
|
-
rules,
|
|
369
|
-
enabled: overridesEnabled,
|
|
370
|
-
setEnabled,
|
|
371
|
-
isRuleSpent
|
|
372
|
-
} = (0, _useOverrideRules.useOverrideRules)();
|
|
373
|
-
|
|
374
|
-
// Stable identity: handed to memoized rows.
|
|
375
|
-
const handleLongPress = (0, _react.useCallback)(event => {
|
|
376
|
-
togglePin(event);
|
|
377
|
-
}, [togglePin]);
|
|
378
|
-
|
|
379
|
-
// Everything above is a hook and must run unconditionally; everything below
|
|
380
|
-
// is work (same rule4 contract as native).
|
|
381
|
-
if (!visible) return null;
|
|
382
|
-
const {
|
|
383
|
-
pinned,
|
|
384
|
-
rest
|
|
385
|
-
} = (0, _withPinnedFirst.splitPinned)(visibleEvents, pinnedEvents, pinnedLiveIds);
|
|
386
|
-
|
|
387
|
-
// Hoist anything an active rule covers. Done after `splitPinned` so a request
|
|
388
|
-
// that is both pinned and overridden appears once, in the louder section.
|
|
389
|
-
const activeRules = rules.filter(rule => rule.enabled && !isRuleSpent(rule));
|
|
390
|
-
const overridden = (0, _overriddenRows.overriddenEvents)([...pinned, ...rest], activeRules);
|
|
391
|
-
const overriddenIds = new Set(overridden.map(event => event.id));
|
|
392
|
-
const pinnedRows = pinned.filter(event => !overriddenIds.has(event.id));
|
|
393
|
-
const restRows = overriddenIds.size ? rest.filter(event => !overriddenIds.has(event.id)) : rest;
|
|
394
|
-
const isEnabled = !paused;
|
|
395
|
-
const renderListFooter = () => {
|
|
396
|
-
if (!hasLockedEvents) return null;
|
|
397
|
-
const isSearching = searchText.length > 0;
|
|
398
|
-
const bannerText = isSearching ? `${lockedEventCount} matching ${lockedEventCount === 1 ? "request" : "requests"} in locked history` : `${lockedEventCount} requests locked`;
|
|
399
|
-
const subtextMessage = isSearching ? "Upgrade to Pro to search your full request history" : "Upgrade to Pro to unlock full request history";
|
|
400
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NetworkUpgradeBannerWeb, {
|
|
401
|
-
title: bannerText,
|
|
402
|
-
subtitle: subtextMessage,
|
|
403
|
-
onPress: onUpgradePress
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
407
|
-
style: styles.root,
|
|
408
|
-
children: [!isEnabled ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
409
|
-
style: styles.disabledBanner,
|
|
410
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Power, {
|
|
411
|
-
size: 14,
|
|
412
|
-
color: macOSColors.semantic.warning
|
|
413
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
414
|
-
style: styles.disabledText,
|
|
415
|
-
children: "Network interception is disabled"
|
|
416
|
-
})]
|
|
417
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(OverriddenSection, {
|
|
418
|
-
events: overridden,
|
|
419
|
-
onEventPress: onEventPress,
|
|
420
|
-
onLongPress: handleLongPress,
|
|
421
|
-
savedLiveIds: savedLiveIds,
|
|
422
|
-
paused: !overridesEnabled,
|
|
423
|
-
onTogglePaused: () => setEnabled(!overridesEnabled)
|
|
424
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(PinnedSection, {
|
|
425
|
-
events: pinnedRows,
|
|
426
|
-
onEventPress: onEventPress,
|
|
427
|
-
onLongPress: handleLongPress,
|
|
428
|
-
savedLiveIds: savedLiveIds,
|
|
429
|
-
onClearPinned: clearPinned
|
|
430
|
-
}), restRows.length > 0 || hasLockedEvents ?
|
|
431
|
-
/*#__PURE__*/
|
|
432
|
-
// DEVIATION: FlatList → plain scrolled div (see file header). The
|
|
433
|
-
// list still OWNS scrolling — hosts render this screen without a
|
|
434
|
-
// scroll wrapper (JsModal's `disableScrollWrapper`), same as native.
|
|
435
|
-
(0, _jsxRuntime.jsx)("div", {
|
|
436
|
-
style: styles.list,
|
|
437
|
-
"aria-label": "Network events list",
|
|
438
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
439
|
-
style: styles.listContent,
|
|
440
|
-
children: [restRows.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact, {
|
|
441
|
-
event: item,
|
|
442
|
-
onPress: onEventPress,
|
|
443
|
-
onLongPress: handleLongPress,
|
|
444
|
-
saved: savedLiveIds.has(item.id)
|
|
445
|
-
}, item.id)), renderListFooter()]
|
|
446
|
-
})
|
|
447
|
-
}) : pinnedRows.length > 0 || overridden.length > 0 ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyState, {
|
|
448
|
-
isEnabled: isEnabled
|
|
449
|
-
})]
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// Values mirror the native StyleSheet block 1:1.
|
|
454
|
-
const styles = {
|
|
455
|
-
root: {
|
|
456
|
-
display: "flex",
|
|
457
|
-
flexDirection: "column",
|
|
458
|
-
flex: 1,
|
|
459
|
-
minHeight: 0
|
|
460
|
-
},
|
|
461
|
-
/**
|
|
462
|
-
* The strip is separated from the live list by a real rule, not just space:
|
|
463
|
-
* these rows do NOT obey the filters, and the boundary is what tells the
|
|
464
|
-
* user why a request they just filtered out is still on screen.
|
|
465
|
-
*/
|
|
466
|
-
overriddenSection: {
|
|
467
|
-
borderBottom: `1px solid ${macOSColors.semantic.warning}44`,
|
|
468
|
-
backgroundColor: macOSColors.semantic.warningBackground
|
|
469
|
-
},
|
|
470
|
-
overriddenSectionOff: {
|
|
471
|
-
borderBottom: `1px solid ${macOSColors.border.default}`,
|
|
472
|
-
backgroundColor: macOSColors.background.card
|
|
473
|
-
},
|
|
474
|
-
overriddenTitleOff: {
|
|
475
|
-
color: macOSColors.text.muted
|
|
476
|
-
},
|
|
477
|
-
overriddenHeader: {
|
|
478
|
-
display: "flex",
|
|
479
|
-
flexDirection: "row",
|
|
480
|
-
alignItems: "center",
|
|
481
|
-
gap: 6,
|
|
482
|
-
padding: "8px 12px 4px"
|
|
483
|
-
},
|
|
484
|
-
overriddenTitle: {
|
|
485
|
-
flex: 1,
|
|
486
|
-
fontSize: 10,
|
|
487
|
-
fontWeight: 700,
|
|
488
|
-
letterSpacing: 0.8,
|
|
489
|
-
color: macOSColors.semantic.warning
|
|
490
|
-
},
|
|
491
|
-
overriddenManage: {
|
|
492
|
-
padding: "2px 6px",
|
|
493
|
-
background: "none",
|
|
494
|
-
border: "none",
|
|
495
|
-
cursor: "pointer",
|
|
496
|
-
margin: 0
|
|
497
|
-
},
|
|
498
|
-
overriddenManageText: {
|
|
499
|
-
fontSize: 10,
|
|
500
|
-
fontWeight: 600,
|
|
501
|
-
color: macOSColors.semantic.warning
|
|
502
|
-
},
|
|
503
|
-
pinnedSection: {
|
|
504
|
-
borderBottom: `1px solid ${macOSColors.border.default}`,
|
|
505
|
-
paddingBottom: 4
|
|
506
|
-
},
|
|
507
|
-
pinnedHeader: {
|
|
508
|
-
display: "flex",
|
|
509
|
-
flexDirection: "row",
|
|
510
|
-
alignItems: "center",
|
|
511
|
-
gap: 6,
|
|
512
|
-
padding: "10px 20px 6px"
|
|
513
|
-
},
|
|
514
|
-
pinnedTitle: {
|
|
515
|
-
flex: 1,
|
|
516
|
-
color: macOSColors.semantic.info,
|
|
517
|
-
fontSize: 10,
|
|
518
|
-
fontWeight: 700,
|
|
519
|
-
letterSpacing: 0.6,
|
|
520
|
-
fontFamily: "ui-monospace, Menlo, monospace"
|
|
521
|
-
},
|
|
522
|
-
pinnedClear: {
|
|
523
|
-
padding: "2px 6px",
|
|
524
|
-
background: "none",
|
|
525
|
-
border: "none",
|
|
526
|
-
cursor: "pointer",
|
|
527
|
-
margin: 0
|
|
528
|
-
},
|
|
529
|
-
pinnedClearText: {
|
|
530
|
-
color: macOSColors.text.muted,
|
|
531
|
-
fontSize: 10
|
|
532
|
-
},
|
|
533
|
-
disabledBanner: {
|
|
534
|
-
display: "flex",
|
|
535
|
-
flexDirection: "row",
|
|
536
|
-
alignItems: "center",
|
|
537
|
-
gap: 8,
|
|
538
|
-
padding: 10,
|
|
539
|
-
margin: "8px 12px 0",
|
|
540
|
-
backgroundColor: macOSColors.semantic.warningBackground,
|
|
541
|
-
borderRadius: 8,
|
|
542
|
-
border: `1px solid ${macOSColors.semantic.warning}20`
|
|
543
|
-
},
|
|
544
|
-
disabledText: {
|
|
545
|
-
color: macOSColors.semantic.warning,
|
|
546
|
-
fontSize: 11,
|
|
547
|
-
flex: 1
|
|
548
|
-
},
|
|
549
|
-
list: {
|
|
550
|
-
flex: 1,
|
|
551
|
-
minHeight: 0,
|
|
552
|
-
overflowY: "auto"
|
|
553
|
-
},
|
|
554
|
-
listContent: {
|
|
555
|
-
paddingTop: 8
|
|
556
|
-
},
|
|
557
|
-
emptyState: {
|
|
558
|
-
display: "flex",
|
|
559
|
-
flexDirection: "column",
|
|
560
|
-
alignItems: "center",
|
|
561
|
-
padding: "40px 0"
|
|
562
|
-
},
|
|
563
|
-
emptyTitle: {
|
|
564
|
-
color: macOSColors.text.primary,
|
|
565
|
-
fontSize: 14,
|
|
566
|
-
fontWeight: 600,
|
|
567
|
-
marginTop: 12,
|
|
568
|
-
marginBottom: 6
|
|
569
|
-
},
|
|
570
|
-
emptyText: {
|
|
571
|
-
color: macOSColors.text.muted,
|
|
572
|
-
fontSize: 12,
|
|
573
|
-
textAlign: "center"
|
|
574
|
-
},
|
|
575
|
-
// NetworkUpgradeBanner.tsx values (buoyColors), verbatim.
|
|
576
|
-
upgradeBanner: {
|
|
577
|
-
display: "block",
|
|
578
|
-
width: "calc(100% - 24px)",
|
|
579
|
-
boxSizing: "border-box",
|
|
580
|
-
backgroundColor: buoy.card,
|
|
581
|
-
borderRadius: 10,
|
|
582
|
-
border: `1px solid ${buoy.primary}40`,
|
|
583
|
-
padding: 12,
|
|
584
|
-
margin: "12px 12px 34px",
|
|
585
|
-
textAlign: "left",
|
|
586
|
-
cursor: "pointer",
|
|
587
|
-
fontFamily: "inherit"
|
|
588
|
-
},
|
|
589
|
-
upgradeContent: {
|
|
590
|
-
display: "flex",
|
|
591
|
-
flexDirection: "row",
|
|
592
|
-
alignItems: "center",
|
|
593
|
-
justifyContent: "space-between",
|
|
594
|
-
marginBottom: 4
|
|
595
|
-
},
|
|
596
|
-
upgradeLeft: {
|
|
597
|
-
display: "inline-flex",
|
|
598
|
-
flexDirection: "row",
|
|
599
|
-
alignItems: "center",
|
|
600
|
-
gap: 8
|
|
601
|
-
},
|
|
602
|
-
upgradeTitle: {
|
|
603
|
-
color: buoy.text,
|
|
604
|
-
fontSize: 13,
|
|
605
|
-
fontWeight: 600
|
|
606
|
-
},
|
|
607
|
-
upgradeSubtitle: {
|
|
608
|
-
display: "block",
|
|
609
|
-
color: buoy.textMuted,
|
|
610
|
-
fontSize: 11
|
|
611
|
-
},
|
|
612
|
-
// license/FeatureGate.tsx `proBadge`/`proBadgeText`, verbatim.
|
|
613
|
-
proBadge: {
|
|
614
|
-
display: "inline-flex",
|
|
615
|
-
backgroundColor: `${buoy.primary}15`,
|
|
616
|
-
borderRadius: 4,
|
|
617
|
-
border: `1px solid ${buoy.primary}40`,
|
|
618
|
-
padding: "2px 6px",
|
|
619
|
-
fontSize: 10,
|
|
620
|
-
fontWeight: 700,
|
|
621
|
-
color: buoy.primary,
|
|
622
|
-
letterSpacing: 0.5
|
|
623
|
-
}
|
|
624
|
-
};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NetworkListScreen=NetworkListScreen;var _react=require("react");var _NetworkEventItemCompact=require("./NetworkEventItemCompact.web");var _useNetworkEventList=require("../hooks/useNetworkEventList");var _useNetworkSaved=require("../hooks/useNetworkSaved");var _useOverrideRules=require("../hooks/useOverrideRules");var _overriddenRows=require("../overrides/overriddenRows");var _withPinnedFirst=require("../utils/withPinnedFirst");var _jsxRuntime=require("react/jsx-runtime");const macOSColors={background:{card:"#1A1A1C"},border:{default:"#2D2D2F"},text:{primary:"#F5F5F7",muted:"#8E8E93"},semantic:{warning:"#FFEB3B",warningBackground:"rgba(255, 235, 59, 0.15)",info:"#00B8E6"}};const buoy={card:"#1A1A1A",text:"#E0E0E0",textMuted:"#888888",primary:"#20C997"};function Svg({size:e=14,color:t="currentColor",children:i}){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:i})}const Globe=e=>(0,_jsxRuntime.jsxs)(Svg,{...e,children:[(0,_jsxRuntime.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,_jsxRuntime.jsx)("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}),(0,_jsxRuntime.jsx)("path",{d:"M2 12h20"})]});const Pin=({active:e,...t})=>(0,_jsxRuntime.jsx)(Svg,{...t,children:(0,_jsxRuntime.jsxs)("g",{transform:e?"rotate(-45 12 12) translate(12 12) scale(0.92) translate(-12 -12)":void 0,children:[(0,_jsxRuntime.jsx)("path",{d:"M2.97 21.03 8.18 15.82"}),(0,_jsxRuntime.jsx)("path",{d:"M4.4 10.81 13.19 19.6"}),(0,_jsxRuntime.jsx)("path",{d:"M5.17 10.54 11.43 8.83"}),(0,_jsxRuntime.jsx)("path",{d:"M13.46 18.83 15.17 12.57"}),(0,_jsxRuntime.jsx)("rect",{x:"12.15",y:"5.4",width:"9.38",height:"3.52",rx:"1.07",transform:"rotate(-45 16.84 7.16)"})]})});const Power=e=>(0,_jsxRuntime.jsxs)(Svg,{...e,children:[(0,_jsxRuntime.jsx)("path",{d:"M12 2v10"}),(0,_jsxRuntime.jsx)("path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"})]});const FlaskConical=e=>(0,_jsxRuntime.jsxs)(Svg,{...e,children:[(0,_jsxRuntime.jsx)("path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"}),(0,_jsxRuntime.jsx)("path",{d:"M8.5 2h7"}),(0,_jsxRuntime.jsx)("path",{d:"M7 16h10"})]});const Zap=e=>(0,_jsxRuntime.jsx)(Svg,{...e,children:(0,_jsxRuntime.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})});function NetworkUpgradeBannerWeb({title:e,subtitle:t,onPress:i}){return(0,_jsxRuntime.jsxs)("button",{type:"button",style:styles.upgradeBanner,onClick:i,children:[(0,_jsxRuntime.jsxs)("span",{style:styles.upgradeContent,children:[(0,_jsxRuntime.jsxs)("span",{style:styles.upgradeLeft,children:[(0,_jsxRuntime.jsx)(Zap,{size:16,color:buoy.primary}),(0,_jsxRuntime.jsx)("span",{style:styles.upgradeTitle,children:e})]}),(0,_jsxRuntime.jsx)("span",{style:styles.proBadge,children:"PRO"})]}),(0,_jsxRuntime.jsx)("span",{style:styles.upgradeSubtitle,children:t})]})}function EmptyState({isEnabled:e}){return(0,_jsxRuntime.jsxs)("div",{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(Globe,{size:32,color:macOSColors.text.muted}),(0,_jsxRuntime.jsx)("div",{style:styles.emptyTitle,children:"No network events"}),(0,_jsxRuntime.jsx)("div",{style:styles.emptyText,children:e?"Network requests will appear here":"Enable interception to start capturing"})]})}function PinnedSection({events:e,onEventPress:t,onLongPress:i,savedLiveIds:d,onClearPinned:r}){if(e.length===0)return null;return(0,_jsxRuntime.jsxs)("div",{style:styles.pinnedSection,children:[(0,_jsxRuntime.jsxs)("div",{style:styles.pinnedHeader,children:[(0,_jsxRuntime.jsx)(Pin,{size:11,active:true,color:macOSColors.semantic.info}),(0,_jsxRuntime.jsxs)("span",{style:styles.pinnedTitle,children:["PINNED \xB7 ",e.length]}),(0,_jsxRuntime.jsx)("button",{type:"button",onClick:r,style:styles.pinnedClear,children:(0,_jsxRuntime.jsx)("span",{style:styles.pinnedClearText,children:"Unpin all"})})]}),e.map(o=>(0,_jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact,{event:o,onPress:t,onLongPress:i,pinned:true,saved:d.has(o.id)},o.id))]})}function OverriddenSection({events:e,onEventPress:t,onLongPress:i,savedLiveIds:d,paused:r,onTogglePaused:o}){if(e.length===0)return null;return(0,_jsxRuntime.jsxs)("div",{style:{...styles.overriddenSection,...r?styles.overriddenSectionOff:null},children:[(0,_jsxRuntime.jsxs)("div",{style:styles.overriddenHeader,children:[(0,_jsxRuntime.jsx)(FlaskConical,{size:11,color:r?macOSColors.text.muted:macOSColors.semantic.warning}),(0,_jsxRuntime.jsx)("span",{style:{...styles.overriddenTitle,...r?styles.overriddenTitleOff:null},children:r?`PAUSED \xB7 ${e.length}`:`OVERRIDDEN \xB7 ${e.length}`}),(0,_jsxRuntime.jsx)("button",{type:"button",onClick:o,style:styles.overriddenManage,children:(0,_jsxRuntime.jsx)("span",{style:{...styles.overriddenManageText,...r?styles.overriddenTitleOff:null},children:r?"Resume":"Pause"})})]}),e.map(s=>(0,_jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact,{event:s,onPress:t,onLongPress:i,overridden:true,saved:d.has(s.id)},s.id))]})}function NetworkListScreen({visible:e,paused:t,filter:i,ignoredPatterns:d,isPro:r,searchText:o,onEventPress:s,onUpgradePress:b}){const{visibleEvents:k,hasLockedEvents:g,lockedEventCount:l}=(0,_useNetworkEventList.useNetworkEventList)({filter:i,ignoredPatterns:d,paused:t||!e,isPro:r});const{pinnedEvents:w,pinnedLiveIds:S,savedLiveIds:a,togglePin:h,clearPinned:C}=(0,_useNetworkSaved.useNetworkSaved)();const{rules:E,enabled:f,setEnabled:P,isRuleSpent:T}=(0,_useOverrideRules.useOverrideRules)();const c=(0,_react.useCallback)(n=>{h(n)},[h]);if(!e)return null;const{pinned:m,rest:p}=(0,_withPinnedFirst.splitPinned)(k,w,S);const L=E.filter(n=>n.enabled&&!T(n));const x=(0,_overriddenRows.overriddenEvents)([...m,...p],L);const u=new Set(x.map(n=>n.id));const v=m.filter(n=>!u.has(n.id));const y=u.size?p.filter(n=>!u.has(n.id)):p;const j=!t;const B=()=>{if(!g)return null;const n=o.length>0;const N=n?`${l} matching ${l===1?"request":"requests"} in locked history`:`${l} requests locked`;const M=n?"Upgrade to Pro to search your full request history":"Upgrade to Pro to unlock full request history";return(0,_jsxRuntime.jsx)(NetworkUpgradeBannerWeb,{title:N,subtitle:M,onPress:b})};return(0,_jsxRuntime.jsxs)("div",{style:styles.root,children:[!j?(0,_jsxRuntime.jsxs)("div",{style:styles.disabledBanner,children:[(0,_jsxRuntime.jsx)(Power,{size:14,color:macOSColors.semantic.warning}),(0,_jsxRuntime.jsx)("span",{style:styles.disabledText,children:"Network interception is disabled"})]}):null,(0,_jsxRuntime.jsx)(OverriddenSection,{events:x,onEventPress:s,onLongPress:c,savedLiveIds:a,paused:!f,onTogglePaused:()=>P(!f)}),(0,_jsxRuntime.jsx)(PinnedSection,{events:v,onEventPress:s,onLongPress:c,savedLiveIds:a,onClearPinned:C}),y.length>0||g?(0,_jsxRuntime.jsx)("div",{style:styles.list,"aria-label":"Network events list",children:(0,_jsxRuntime.jsxs)("div",{style:styles.listContent,children:[y.map(n=>(0,_jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact,{event:n,onPress:s,onLongPress:c,saved:a.has(n.id)},n.id)),B()]})}):v.length>0||x.length>0?null:(0,_jsxRuntime.jsx)(EmptyState,{isEnabled:j})]})}const styles={root:{display:"flex",flexDirection:"column",flex:1,minHeight:0},overriddenSection:{borderBottom:`1px solid ${macOSColors.semantic.warning}44`,backgroundColor:macOSColors.semantic.warningBackground},overriddenSectionOff:{borderBottom:`1px solid ${macOSColors.border.default}`,backgroundColor:macOSColors.background.card},overriddenTitleOff:{color:macOSColors.text.muted},overriddenHeader:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,padding:"8px 12px 4px"},overriddenTitle:{flex:1,fontSize:10,fontWeight:700,letterSpacing:.8,color:macOSColors.semantic.warning},overriddenManage:{padding:"2px 6px",background:"none",border:"none",cursor:"pointer",margin:0},overriddenManageText:{fontSize:10,fontWeight:600,color:macOSColors.semantic.warning},pinnedSection:{borderBottom:`1px solid ${macOSColors.border.default}`,paddingBottom:4},pinnedHeader:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,padding:"10px 20px 6px"},pinnedTitle:{flex:1,color:macOSColors.semantic.info,fontSize:10,fontWeight:700,letterSpacing:.6,fontFamily:"ui-monospace, Menlo, monospace"},pinnedClear:{padding:"2px 6px",background:"none",border:"none",cursor:"pointer",margin:0},pinnedClearText:{color:macOSColors.text.muted,fontSize:10},disabledBanner:{display:"flex",flexDirection:"row",alignItems:"center",gap:8,padding:10,margin:"8px 12px 0",backgroundColor:macOSColors.semantic.warningBackground,borderRadius:8,border:`1px solid ${macOSColors.semantic.warning}20`},disabledText:{color:macOSColors.semantic.warning,fontSize:11,flex:1},list:{flex:1,minHeight:0,overflowY:"auto"},listContent:{paddingTop:8},emptyState:{display:"flex",flexDirection:"column",alignItems:"center",padding:"40px 0"},emptyTitle:{color:macOSColors.text.primary,fontSize:14,fontWeight:600,marginTop:12,marginBottom:6},emptyText:{color:macOSColors.text.muted,fontSize:12,textAlign:"center"},upgradeBanner:{display:"block",width:"calc(100% - 24px)",boxSizing:"border-box",backgroundColor:buoy.card,borderRadius:10,border:`1px solid ${buoy.primary}40`,padding:12,margin:"12px 12px 34px",textAlign:"left",cursor:"pointer",fontFamily:"inherit"},upgradeContent:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4},upgradeLeft:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:8},upgradeTitle:{color:buoy.text,fontSize:13,fontWeight:600},upgradeSubtitle:{display:"block",color:buoy.textMuted,fontSize:11},proBadge:{display:"inline-flex",backgroundColor:`${buoy.primary}15`,borderRadius:4,border:`1px solid ${buoy.primary}40`,padding:"2px 6px",fontSize:10,fontWeight:700,color:buoy.primary,letterSpacing:.5}};
|