@buoy-gg/network 7.0.40 → 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 -79
- package/lib/commonjs/index.js +1 -325
- 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 -404
- package/lib/commonjs/network/components/NetworkListScreen.web.js +1 -625
- 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 -110
- 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 -453
- package/lib/commonjs/network/overrides/engine.js +1 -93
- package/lib/commonjs/network/overrides/matchRule.js +1 -81
- package/lib/commonjs/network/overrides/overriddenRows.js +1 -0
- 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 -393
- package/lib/commonjs/network/utils/networkListener.js +4 -1259
- 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 -0
- package/lib/commonjs/network/utils/resolveRequestUrl.js +1 -0
- package/lib/commonjs/network/utils/selectSavedEvents.js +1 -39
- package/lib/commonjs/network/utils/startNetworkCapture.js +1 -0
- package/lib/commonjs/network/utils/withPinnedFirst.js +1 -32
- package/lib/commonjs/preset.js +1 -102
- package/lib/module/index.js +1 -103
- 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 -400
- package/lib/module/network/components/NetworkListScreen.web.js +1 -623
- 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 -106
- 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 -446
- package/lib/module/network/overrides/engine.js +1 -85
- package/lib/module/network/overrides/matchRule.js +1 -75
- package/lib/module/network/overrides/overriddenRows.js +1 -0
- 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 -391
- package/lib/module/network/utils/networkListener.js +4 -1249
- 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 -0
- package/lib/module/network/utils/resolveRequestUrl.js +1 -0
- package/lib/module/network/utils/selectSavedEvents.js +1 -35
- package/lib/module/network/utils/startNetworkCapture.js +1 -0
- package/lib/module/network/utils/withPinnedFirst.js +1 -28
- package/lib/module/preset.js +1 -100
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/network/overrides/applyToXhr.d.ts +1 -0
- 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/overriddenRows.d.ts +16 -0
- 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 +14 -4
- package/lib/typescript/network/utils/networkSavedStore.d.ts +4 -4
- package/lib/typescript/network/utils/realNow.d.ts +18 -0
- package/lib/typescript/network/utils/requestId.d.ts +2 -0
- package/lib/typescript/network/utils/resolveRequestUrl.d.ts +3 -0
- package/lib/typescript/network/utils/startNetworkCapture.d.ts +6 -0
- package/lib/web/index.mjs +145 -0
- package/package.json +32 -10
- 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/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/selectSavedEvents.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,463 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NetworkSavedScreen = NetworkSavedScreen;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _NetworkEventItemCompact = require("./NetworkEventItemCompact.web");
|
|
10
|
-
var _DataViewer = require("./DataViewer.web");
|
|
11
|
-
var _generateNetworkCopyText = require("../utils/generateNetworkCopyText");
|
|
12
|
-
var _selectSavedEvents = require("../utils/selectSavedEvents");
|
|
13
|
-
var _useNetworkSaved = require("../hooks/useNetworkSaved");
|
|
14
|
-
var _networkSavedStore = require("../utils/networkSavedStore");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
/**
|
|
17
|
-
* NetworkSavedScreen.web — DOM twin of NetworkSavedScreen.tsx.
|
|
18
|
-
*
|
|
19
|
-
* The SAVED screen — the network tool's favorites list. Everything here is
|
|
20
|
-
* read from the persisted saved store, never from the live event store: these
|
|
21
|
-
* requests survive a Clear, the 500-event cap, and an app restart. Identical
|
|
22
|
-
* prop contract, hook usage and derivation order as the native file — the
|
|
23
|
-
* data layer is REUSED, not forked (`useNetworkSaved`, `selectSavedEvents`,
|
|
24
|
-
* `generateNetworkCopyText` are all platform-free).
|
|
25
|
-
*
|
|
26
|
-
* Rows are the same row component the live list uses
|
|
27
|
-
* (`NetworkEventItemCompact.web`), so a saved request looks exactly like the
|
|
28
|
-
* request it was. Long-press here UNSAVES rather than pins — in this list
|
|
29
|
-
* "get rid of it" is the action the row affords (pinning stays on the detail
|
|
30
|
-
* header). Row tap opens the detail view via `onEventPress` — hosts wire it
|
|
31
|
-
* to `networkSelectionStore.select` and pass `fromSaved` to the detail
|
|
32
|
-
* screen, so the prev/next footer steps through THIS list (native behavior;
|
|
33
|
-
* `NetworkDetailStepper.web` already derives it from `selectSavedEvents`).
|
|
34
|
-
*
|
|
35
|
-
* Stable-tree contract (rule4): hooks run unconditionally, then the
|
|
36
|
-
* component returns null when not visible.
|
|
37
|
-
*
|
|
38
|
-
* shared-ui RN chrome is replicated as DOM with provenance (web consumers
|
|
39
|
-
* resolve `@buoy-gg/shared-ui` to a minimal shim):
|
|
40
|
-
* - `macOSColors` / `buoyColors` — inlined verbatim subsets from
|
|
41
|
-
* shared/src/ui/gameUI/constants/.
|
|
42
|
-
* - Icons — inline lucide SVGs (shared-ui's icons are lucide re-exports).
|
|
43
|
-
* - `CopyButton` — the DOM twin exported by DataViewer.web (same lazy
|
|
44
|
-
* function-value contract, colors and 1500ms feedback as native).
|
|
45
|
-
* - `NetworkUpgradeBanner` — inlined DOM twin, values from
|
|
46
|
-
* NetworkUpgradeBanner.tsx + license/FeatureGate.tsx `proBadge` styles
|
|
47
|
-
* (static gold-less "PRO" — the Weekend Pass variant reads
|
|
48
|
-
* `useProAccess` from @buoy-gg/license, not part of the web port).
|
|
49
|
-
*
|
|
50
|
-
* Intentional deviations (all logged):
|
|
51
|
-
* - FlatList virtualization → a plain scrolled div (same deal as
|
|
52
|
-
* NetworkListScreen.web: MAX_SAVED caps the list at 50 rows, and the
|
|
53
|
-
* window/batch tuning + `extraData` are FlatList-only concerns).
|
|
54
|
-
* - `CopySettings` is imported from the platform-free
|
|
55
|
-
* `generateNetworkCopyText` module (the native screen imports it from
|
|
56
|
-
* NetworkCopySettingsView.tsx, which would drag react-native in).
|
|
57
|
-
*
|
|
58
|
-
* @platform React DOM Web
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
// =============================
|
|
62
|
-
// Native palettes (provenance)
|
|
63
|
-
// =============================
|
|
64
|
-
|
|
65
|
-
/** macOSColors subset — shared/src/ui/gameUI/constants/macOSDesignSystemColors.ts, verbatim. */const macOSColors = {
|
|
66
|
-
background: {
|
|
67
|
-
input: "#26262A"
|
|
68
|
-
},
|
|
69
|
-
border: {
|
|
70
|
-
default: "#2D2D2F"
|
|
71
|
-
},
|
|
72
|
-
text: {
|
|
73
|
-
primary: "#F5F5F7",
|
|
74
|
-
secondary: "#A1A1A6",
|
|
75
|
-
muted: "#8E8E93",
|
|
76
|
-
disabled: "#9E9EA0"
|
|
77
|
-
},
|
|
78
|
-
semantic: {
|
|
79
|
-
success: "#34C759",
|
|
80
|
-
error: "#FF453A",
|
|
81
|
-
debug: "#BF5AF2"
|
|
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 Bookmark = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
|
|
119
|
-
...p,
|
|
120
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
121
|
-
d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"
|
|
122
|
-
})
|
|
123
|
-
});
|
|
124
|
-
const Search = p => /*#__PURE__*/(0, _jsxRuntime.jsxs)(Svg, {
|
|
125
|
-
...p,
|
|
126
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", {
|
|
127
|
-
cx: "11",
|
|
128
|
-
cy: "11",
|
|
129
|
-
r: "8"
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
131
|
-
d: "m21 21-4.3-4.3"
|
|
132
|
-
})]
|
|
133
|
-
});
|
|
134
|
-
const Zap = p => /*#__PURE__*/(0, _jsxRuntime.jsx)(Svg, {
|
|
135
|
-
...p,
|
|
136
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", {
|
|
137
|
-
points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2"
|
|
138
|
-
})
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
// =============================
|
|
142
|
-
// NetworkUpgradeBanner DOM twin (provenance: NetworkUpgradeBanner.tsx +
|
|
143
|
-
// license/FeatureGate.tsx proBadge styles — see the deviations log)
|
|
144
|
-
// =============================
|
|
145
|
-
|
|
146
|
-
function NetworkUpgradeBannerWeb({
|
|
147
|
-
title,
|
|
148
|
-
subtitle,
|
|
149
|
-
onPress
|
|
150
|
-
}) {
|
|
151
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
152
|
-
type: "button",
|
|
153
|
-
style: styles.upgradeBanner,
|
|
154
|
-
onClick: onPress,
|
|
155
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
156
|
-
style: styles.upgradeContent,
|
|
157
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
158
|
-
style: styles.upgradeLeft,
|
|
159
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Zap, {
|
|
160
|
-
size: 16,
|
|
161
|
-
color: buoy.primary
|
|
162
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
163
|
-
style: styles.upgradeTitle,
|
|
164
|
-
children: title
|
|
165
|
-
})]
|
|
166
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
167
|
-
style: styles.proBadge,
|
|
168
|
-
children: "PRO"
|
|
169
|
-
})]
|
|
170
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
171
|
-
style: styles.upgradeSubtitle,
|
|
172
|
-
children: subtitle
|
|
173
|
-
})]
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// =============================
|
|
178
|
-
// Screen (structure mirrors the native file 1:1)
|
|
179
|
-
// =============================
|
|
180
|
-
|
|
181
|
-
function EmptyState() {
|
|
182
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
183
|
-
style: styles.emptyState,
|
|
184
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Bookmark, {
|
|
185
|
-
size: 32,
|
|
186
|
-
color: macOSColors.text.muted
|
|
187
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
188
|
-
style: styles.emptyTitle,
|
|
189
|
-
children: "No saved requests"
|
|
190
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
191
|
-
style: styles.emptyText,
|
|
192
|
-
children: "Open a request and tap the bookmark to keep it here \u2014 saved requests survive Clear and app restarts."
|
|
193
|
-
})]
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
function NetworkSavedScreen({
|
|
197
|
-
visible,
|
|
198
|
-
isPro,
|
|
199
|
-
copySettings,
|
|
200
|
-
search: searchProp,
|
|
201
|
-
onSearchChange,
|
|
202
|
-
onEventPress,
|
|
203
|
-
onUpgradePress
|
|
204
|
-
}) {
|
|
205
|
-
const {
|
|
206
|
-
savedRecords,
|
|
207
|
-
pinnedLiveIds,
|
|
208
|
-
toggleSave,
|
|
209
|
-
clearSaved
|
|
210
|
-
} = (0, _useNetworkSaved.useNetworkSaved)();
|
|
211
|
-
// Declared with the other hooks: the `!visible` early return below would
|
|
212
|
-
// otherwise make this conditional.
|
|
213
|
-
const savedLimit = (0, _sharedUi.useLimit)("network.saved");
|
|
214
|
-
const [searchState, setSearchState] = (0, _react.useState)("");
|
|
215
|
-
const controlled = searchProp != null && onSearchChange != null;
|
|
216
|
-
const search = controlled ? searchProp : searchState;
|
|
217
|
-
const setSearch = controlled ? onSearchChange : setSearchState;
|
|
218
|
-
if (!visible) return null;
|
|
219
|
-
|
|
220
|
-
// Shared with the detail footer, so "Next" can't disagree with the row below.
|
|
221
|
-
const {
|
|
222
|
-
events: filtered,
|
|
223
|
-
lockedCount
|
|
224
|
-
} = (0, _selectSavedEvents.selectSavedEvents)(savedRecords, savedLimit, search);
|
|
225
|
-
const handleLongPress = event => {
|
|
226
|
-
toggleSave(event);
|
|
227
|
-
};
|
|
228
|
-
const renderListFooter = () => {
|
|
229
|
-
if (lockedCount === 0) return null;
|
|
230
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NetworkUpgradeBannerWeb, {
|
|
231
|
-
title: `${lockedCount} saved ${lockedCount === 1 ? "request" : "requests"} locked`,
|
|
232
|
-
subtitle: `Your plan keeps ${savedLimit}. Upgrade to Pro to unlock the rest.`,
|
|
233
|
-
onPress: onUpgradePress
|
|
234
|
-
});
|
|
235
|
-
};
|
|
236
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
237
|
-
style: styles.root,
|
|
238
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
239
|
-
style: styles.toolbar,
|
|
240
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Bookmark, {
|
|
241
|
-
size: 11,
|
|
242
|
-
color: macOSColors.semantic.debug
|
|
243
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
244
|
-
style: styles.toolbarTitle,
|
|
245
|
-
children: ["SAVED \xB7 ", savedRecords.length, savedLimit >= _networkSavedStore.MAX_SAVED ? "" : `/${savedLimit}`]
|
|
246
|
-
}), isPro ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DataViewer.CopyButton
|
|
247
|
-
// Lazy value, resolved at press time — no string is built per
|
|
248
|
-
// render, and it always reflects the current list.
|
|
249
|
-
, {
|
|
250
|
-
value: () => (0, _generateNetworkCopyText.generateNetworkCopyText)(filtered, copySettings),
|
|
251
|
-
size: 13,
|
|
252
|
-
buttonStyle: {
|
|
253
|
-
...styles.toolbarButton,
|
|
254
|
-
...(filtered.length === 0 ? styles.toolbarButtonDisabled : null)
|
|
255
|
-
},
|
|
256
|
-
colors: {
|
|
257
|
-
idle: macOSColors.text.secondary,
|
|
258
|
-
success: macOSColors.semantic.success,
|
|
259
|
-
error: macOSColors.semantic.error
|
|
260
|
-
},
|
|
261
|
-
"aria-label": "Copy saved requests"
|
|
262
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
263
|
-
type: "button",
|
|
264
|
-
onClick: clearSaved,
|
|
265
|
-
style: styles.toolbarClear,
|
|
266
|
-
disabled: savedRecords.length === 0,
|
|
267
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
268
|
-
style: {
|
|
269
|
-
...styles.toolbarClearText,
|
|
270
|
-
...(savedRecords.length === 0 ? styles.toolbarClearTextDisabled : null)
|
|
271
|
-
},
|
|
272
|
-
children: "Clear all"
|
|
273
|
-
})
|
|
274
|
-
})]
|
|
275
|
-
}), savedRecords.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
276
|
-
style: styles.searchRow,
|
|
277
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Search, {
|
|
278
|
-
size: 13,
|
|
279
|
-
color: macOSColors.text.secondary
|
|
280
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
281
|
-
style: styles.searchInput,
|
|
282
|
-
placeholder: "Search saved requests\u2026",
|
|
283
|
-
value: search,
|
|
284
|
-
onChange: e => setSearch(e.target.value),
|
|
285
|
-
"aria-label": "Search saved requests",
|
|
286
|
-
autoCapitalize: "none",
|
|
287
|
-
autoCorrect: "off",
|
|
288
|
-
autoComplete: "off",
|
|
289
|
-
spellCheck: false
|
|
290
|
-
})]
|
|
291
|
-
}) : null, savedRecords.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyState, {}) :
|
|
292
|
-
/*#__PURE__*/
|
|
293
|
-
// DEVIATION: FlatList → plain scrolled div (see file header). The
|
|
294
|
-
// list still OWNS scrolling — hosts render this screen without a
|
|
295
|
-
// scroll wrapper, same as native.
|
|
296
|
-
(0, _jsxRuntime.jsx)("div", {
|
|
297
|
-
style: styles.list,
|
|
298
|
-
"aria-label": "Saved requests list",
|
|
299
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
300
|
-
style: styles.listContent,
|
|
301
|
-
children: [filtered.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact, {
|
|
302
|
-
event: item,
|
|
303
|
-
onPress: onEventPress,
|
|
304
|
-
onLongPress: handleLongPress,
|
|
305
|
-
saved: true,
|
|
306
|
-
pinned: pinnedLiveIds.has(item.id)
|
|
307
|
-
}, item.id)), renderListFooter()]
|
|
308
|
-
})
|
|
309
|
-
})]
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// Values mirror the native StyleSheet block 1:1.
|
|
314
|
-
const styles = {
|
|
315
|
-
root: {
|
|
316
|
-
display: "flex",
|
|
317
|
-
flexDirection: "column",
|
|
318
|
-
flex: 1,
|
|
319
|
-
minHeight: 0
|
|
320
|
-
},
|
|
321
|
-
toolbar: {
|
|
322
|
-
display: "flex",
|
|
323
|
-
flexDirection: "row",
|
|
324
|
-
alignItems: "center",
|
|
325
|
-
gap: 6,
|
|
326
|
-
padding: "10px 20px 6px"
|
|
327
|
-
},
|
|
328
|
-
toolbarTitle: {
|
|
329
|
-
flex: 1,
|
|
330
|
-
color: macOSColors.semantic.debug,
|
|
331
|
-
fontSize: 10,
|
|
332
|
-
fontWeight: 700,
|
|
333
|
-
letterSpacing: 0.6,
|
|
334
|
-
fontFamily: "ui-monospace, Menlo, monospace",
|
|
335
|
-
textAlign: "left"
|
|
336
|
-
},
|
|
337
|
-
toolbarButton: {
|
|
338
|
-
width: 26,
|
|
339
|
-
height: 26,
|
|
340
|
-
boxSizing: "border-box",
|
|
341
|
-
borderRadius: 6,
|
|
342
|
-
alignItems: "center",
|
|
343
|
-
justifyContent: "center"
|
|
344
|
-
},
|
|
345
|
-
/** Native passes `disabled` to CopyButton; the DOM twin has no disabled
|
|
346
|
-
* prop, so the toolbar dims + inerts it the same way native renders it. */
|
|
347
|
-
toolbarButtonDisabled: {
|
|
348
|
-
opacity: 0.55,
|
|
349
|
-
pointerEvents: "none"
|
|
350
|
-
},
|
|
351
|
-
toolbarClear: {
|
|
352
|
-
padding: "2px 6px",
|
|
353
|
-
background: "none",
|
|
354
|
-
border: "none",
|
|
355
|
-
cursor: "pointer",
|
|
356
|
-
margin: 0
|
|
357
|
-
},
|
|
358
|
-
toolbarClearText: {
|
|
359
|
-
color: macOSColors.text.muted,
|
|
360
|
-
fontSize: 10
|
|
361
|
-
},
|
|
362
|
-
toolbarClearTextDisabled: {
|
|
363
|
-
color: macOSColors.text.disabled
|
|
364
|
-
},
|
|
365
|
-
searchRow: {
|
|
366
|
-
display: "flex",
|
|
367
|
-
flexDirection: "row",
|
|
368
|
-
alignItems: "center",
|
|
369
|
-
gap: 6,
|
|
370
|
-
margin: "0 12px 8px",
|
|
371
|
-
padding: "5px 10px",
|
|
372
|
-
backgroundColor: macOSColors.background.input,
|
|
373
|
-
borderRadius: 10,
|
|
374
|
-
border: `1px solid ${macOSColors.border.default}`
|
|
375
|
-
},
|
|
376
|
-
searchInput: {
|
|
377
|
-
flex: 1,
|
|
378
|
-
minWidth: 0,
|
|
379
|
-
color: macOSColors.text.primary,
|
|
380
|
-
fontSize: 13,
|
|
381
|
-
padding: "2px 0",
|
|
382
|
-
border: "none",
|
|
383
|
-
outline: "none",
|
|
384
|
-
background: "transparent",
|
|
385
|
-
fontFamily: "inherit"
|
|
386
|
-
},
|
|
387
|
-
list: {
|
|
388
|
-
flex: 1,
|
|
389
|
-
minHeight: 0,
|
|
390
|
-
overflowY: "auto"
|
|
391
|
-
},
|
|
392
|
-
listContent: {
|
|
393
|
-
paddingTop: 4
|
|
394
|
-
},
|
|
395
|
-
emptyState: {
|
|
396
|
-
display: "flex",
|
|
397
|
-
flexDirection: "column",
|
|
398
|
-
alignItems: "center",
|
|
399
|
-
padding: "40px 24px"
|
|
400
|
-
},
|
|
401
|
-
emptyTitle: {
|
|
402
|
-
color: macOSColors.text.primary,
|
|
403
|
-
fontSize: 14,
|
|
404
|
-
fontWeight: 600,
|
|
405
|
-
marginTop: 12,
|
|
406
|
-
marginBottom: 6
|
|
407
|
-
},
|
|
408
|
-
emptyText: {
|
|
409
|
-
color: macOSColors.text.muted,
|
|
410
|
-
fontSize: 12,
|
|
411
|
-
textAlign: "center",
|
|
412
|
-
lineHeight: "17px"
|
|
413
|
-
},
|
|
414
|
-
// NetworkUpgradeBanner.tsx values (buoyColors), verbatim.
|
|
415
|
-
upgradeBanner: {
|
|
416
|
-
display: "block",
|
|
417
|
-
width: "calc(100% - 24px)",
|
|
418
|
-
boxSizing: "border-box",
|
|
419
|
-
backgroundColor: buoy.card,
|
|
420
|
-
borderRadius: 10,
|
|
421
|
-
border: `1px solid ${buoy.primary}40`,
|
|
422
|
-
padding: 12,
|
|
423
|
-
margin: "12px 12px 34px",
|
|
424
|
-
textAlign: "left",
|
|
425
|
-
cursor: "pointer",
|
|
426
|
-
fontFamily: "inherit"
|
|
427
|
-
},
|
|
428
|
-
upgradeContent: {
|
|
429
|
-
display: "flex",
|
|
430
|
-
flexDirection: "row",
|
|
431
|
-
alignItems: "center",
|
|
432
|
-
justifyContent: "space-between",
|
|
433
|
-
marginBottom: 4
|
|
434
|
-
},
|
|
435
|
-
upgradeLeft: {
|
|
436
|
-
display: "inline-flex",
|
|
437
|
-
flexDirection: "row",
|
|
438
|
-
alignItems: "center",
|
|
439
|
-
gap: 8
|
|
440
|
-
},
|
|
441
|
-
upgradeTitle: {
|
|
442
|
-
color: buoy.text,
|
|
443
|
-
fontSize: 13,
|
|
444
|
-
fontWeight: 600
|
|
445
|
-
},
|
|
446
|
-
upgradeSubtitle: {
|
|
447
|
-
display: "block",
|
|
448
|
-
color: buoy.textMuted,
|
|
449
|
-
fontSize: 11
|
|
450
|
-
},
|
|
451
|
-
// license/FeatureGate.tsx `proBadge`/`proBadgeText`, verbatim.
|
|
452
|
-
proBadge: {
|
|
453
|
-
display: "inline-flex",
|
|
454
|
-
backgroundColor: `${buoy.primary}15`,
|
|
455
|
-
borderRadius: 4,
|
|
456
|
-
border: `1px solid ${buoy.primary}40`,
|
|
457
|
-
padding: "2px 6px",
|
|
458
|
-
fontSize: 10,
|
|
459
|
-
fontWeight: 700,
|
|
460
|
-
color: buoy.primary,
|
|
461
|
-
letterSpacing: 0.5
|
|
462
|
-
}
|
|
463
|
-
};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NetworkSavedScreen=NetworkSavedScreen;var _react=require("react");var _sharedUi=require("@buoy-gg/shared-ui");var _NetworkEventItemCompact=require("./NetworkEventItemCompact.web");var _DataViewer=require("./DataViewer.web");var _generateNetworkCopyText=require("../utils/generateNetworkCopyText");var _selectSavedEvents=require("../utils/selectSavedEvents");var _useNetworkSaved=require("../hooks/useNetworkSaved");var _networkSavedStore=require("../utils/networkSavedStore");var _jsxRuntime=require("react/jsx-runtime");const macOSColors={background:{input:"#26262A"},border:{default:"#2D2D2F"},text:{primary:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",disabled:"#9E9EA0"},semantic:{success:"#34C759",error:"#FF453A",debug:"#BF5AF2"}};const buoy={card:"#1A1A1A",text:"#E0E0E0",textMuted:"#888888",primary:"#20C997"};function Svg({size:e=14,color:o="currentColor",children:n}){return(0,_jsxRuntime.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0,display:"block"},children:n})}const Bookmark=e=>(0,_jsxRuntime.jsx)(Svg,{...e,children:(0,_jsxRuntime.jsx)("path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"})});const Search=e=>(0,_jsxRuntime.jsxs)(Svg,{...e,children:[(0,_jsxRuntime.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,_jsxRuntime.jsx)("path",{d:"m21 21-4.3-4.3"})]});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:o,onPress:n}){return(0,_jsxRuntime.jsxs)("button",{type:"button",style:styles.upgradeBanner,onClick:n,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:o})]})}function EmptyState(){return(0,_jsxRuntime.jsxs)("div",{style:styles.emptyState,children:[(0,_jsxRuntime.jsx)(Bookmark,{size:32,color:macOSColors.text.muted}),(0,_jsxRuntime.jsx)("div",{style:styles.emptyTitle,children:"No saved requests"}),(0,_jsxRuntime.jsx)("div",{style:styles.emptyText,children:"Open a request and tap the bookmark to keep it here \u2014 saved requests survive Clear and app restarts."})]})}function NetworkSavedScreen({visible:e,isPro:o,copySettings:n,search:i,onSearchChange:d,onEventPress:p,onUpgradePress:x}){const{savedRecords:r,pinnedLiveIds:g,toggleSave:b,clearSaved:h}=(0,_useNetworkSaved.useNetworkSaved)();const s=(0,_sharedUi.useLimit)("network.saved");const[y,m]=(0,_react.useState)("");const c=i!=null&&d!=null;const u=c?i:y;const v=c?d:m;if(!e)return null;const{events:a,lockedCount:l}=(0,_selectSavedEvents.selectSavedEvents)(r,s,u);const f=t=>{b(t)};const S=()=>{if(l===0)return null;return(0,_jsxRuntime.jsx)(NetworkUpgradeBannerWeb,{title:`${l} saved ${l===1?"request":"requests"} locked`,subtitle:`Your plan keeps ${s}. Upgrade to Pro to unlock the rest.`,onPress:x})};return(0,_jsxRuntime.jsxs)("div",{style:styles.root,children:[(0,_jsxRuntime.jsxs)("div",{style:styles.toolbar,children:[(0,_jsxRuntime.jsx)(Bookmark,{size:11,color:macOSColors.semantic.debug}),(0,_jsxRuntime.jsxs)("span",{style:styles.toolbarTitle,children:["SAVED \xB7 ",r.length,s>=_networkSavedStore.MAX_SAVED?"":`/${s}`]}),o?(0,_jsxRuntime.jsx)(_DataViewer.CopyButton,{value:()=>(0,_generateNetworkCopyText.generateNetworkCopyText)(a,n),size:13,buttonStyle:{...styles.toolbarButton,...a.length===0?styles.toolbarButtonDisabled:null},colors:{idle:macOSColors.text.secondary,success:macOSColors.semantic.success,error:macOSColors.semantic.error},"aria-label":"Copy saved requests"}):null,(0,_jsxRuntime.jsx)("button",{type:"button",onClick:h,style:styles.toolbarClear,disabled:r.length===0,children:(0,_jsxRuntime.jsx)("span",{style:{...styles.toolbarClearText,...r.length===0?styles.toolbarClearTextDisabled:null},children:"Clear all"})})]}),r.length>0?(0,_jsxRuntime.jsxs)("div",{style:styles.searchRow,children:[(0,_jsxRuntime.jsx)(Search,{size:13,color:macOSColors.text.secondary}),(0,_jsxRuntime.jsx)("input",{style:styles.searchInput,placeholder:"Search saved requests\u2026",value:u,onChange:t=>v(t.target.value),"aria-label":"Search saved requests",autoCapitalize:"none",autoCorrect:"off",autoComplete:"off",spellCheck:false})]}):null,r.length===0?(0,_jsxRuntime.jsx)(EmptyState,{}):(0,_jsxRuntime.jsx)("div",{style:styles.list,"aria-label":"Saved requests list",children:(0,_jsxRuntime.jsxs)("div",{style:styles.listContent,children:[a.map(t=>(0,_jsxRuntime.jsx)(_NetworkEventItemCompact.NetworkEventItemCompact,{event:t,onPress:p,onLongPress:f,saved:true,pinned:g.has(t.id)},t.id)),S()]})})]})}const styles={root:{display:"flex",flexDirection:"column",flex:1,minHeight:0},toolbar:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,padding:"10px 20px 6px"},toolbarTitle:{flex:1,color:macOSColors.semantic.debug,fontSize:10,fontWeight:700,letterSpacing:.6,fontFamily:"ui-monospace, Menlo, monospace",textAlign:"left"},toolbarButton:{width:26,height:26,boxSizing:"border-box",borderRadius:6,alignItems:"center",justifyContent:"center"},toolbarButtonDisabled:{opacity:.55,pointerEvents:"none"},toolbarClear:{padding:"2px 6px",background:"none",border:"none",cursor:"pointer",margin:0},toolbarClearText:{color:macOSColors.text.muted,fontSize:10},toolbarClearTextDisabled:{color:macOSColors.text.disabled},searchRow:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,margin:"0 12px 8px",padding:"5px 10px",backgroundColor:macOSColors.background.input,borderRadius:10,border:`1px solid ${macOSColors.border.default}`},searchInput:{flex:1,minWidth:0,color:macOSColors.text.primary,fontSize:13,padding:"2px 0",border:"none",outline:"none",background:"transparent",fontFamily:"inherit"},list:{flex:1,minHeight:0,overflowY:"auto"},listContent:{paddingTop:4},emptyState:{display:"flex",flexDirection:"column",alignItems:"center",padding:"40px 24px"},emptyTitle:{color:macOSColors.text.primary,fontSize:14,fontWeight:600,marginTop:12,marginBottom:6},emptyText:{color:macOSColors.text.muted,fontSize:12,textAlign:"center",lineHeight:"17px"},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}};
|
|
@@ -1,76 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.NetworkUpgradeBanner = NetworkUpgradeBanner;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* The "N things are locked, upgrade to see them" banner.
|
|
12
|
-
*
|
|
13
|
-
* Extracted because there are now two of them — locked request history on the
|
|
14
|
-
* live list, and locked saves on the Saved screen — and they are the same
|
|
15
|
-
* offer. Two copies would drift the moment one of them gets a copy tweak.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
function NetworkUpgradeBanner({
|
|
19
|
-
title,
|
|
20
|
-
subtitle,
|
|
21
|
-
onPress
|
|
22
|
-
}) {
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
24
|
-
style: styles.banner,
|
|
25
|
-
onPress: onPress,
|
|
26
|
-
activeOpacity: 0.8,
|
|
27
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
28
|
-
style: styles.content,
|
|
29
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
30
|
-
style: styles.left,
|
|
31
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Zap, {
|
|
32
|
-
size: 16,
|
|
33
|
-
color: _sharedUi.buoyColors.primary
|
|
34
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
35
|
-
style: styles.title,
|
|
36
|
-
children: title
|
|
37
|
-
})]
|
|
38
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ProBadge, {})]
|
|
39
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
40
|
-
style: styles.subtitle,
|
|
41
|
-
children: subtitle
|
|
42
|
-
})]
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const styles = _reactNative.StyleSheet.create({
|
|
46
|
-
banner: {
|
|
47
|
-
backgroundColor: _sharedUi.buoyColors.card,
|
|
48
|
-
borderRadius: 10,
|
|
49
|
-
borderWidth: 1,
|
|
50
|
-
borderColor: _sharedUi.buoyColors.primary + "40",
|
|
51
|
-
padding: 12,
|
|
52
|
-
marginHorizontal: 12,
|
|
53
|
-
marginTop: 12,
|
|
54
|
-
marginBottom: 34
|
|
55
|
-
},
|
|
56
|
-
content: {
|
|
57
|
-
flexDirection: "row",
|
|
58
|
-
alignItems: "center",
|
|
59
|
-
justifyContent: "space-between",
|
|
60
|
-
marginBottom: 4
|
|
61
|
-
},
|
|
62
|
-
left: {
|
|
63
|
-
flexDirection: "row",
|
|
64
|
-
alignItems: "center",
|
|
65
|
-
gap: 8
|
|
66
|
-
},
|
|
67
|
-
title: {
|
|
68
|
-
color: _sharedUi.buoyColors.text,
|
|
69
|
-
fontSize: 13,
|
|
70
|
-
fontWeight: "600"
|
|
71
|
-
},
|
|
72
|
-
subtitle: {
|
|
73
|
-
color: _sharedUi.buoyColors.textMuted,
|
|
74
|
-
fontSize: 11
|
|
75
|
-
}
|
|
76
|
-
});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NetworkUpgradeBanner=NetworkUpgradeBanner;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function NetworkUpgradeBanner({title:e,subtitle:r,onPress:t}){return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:styles.banner,onPress:t,activeOpacity:.8,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.content,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.left,children:[(0,_jsxRuntime.jsx)(_sharedUi.Zap,{size:16,color:_sharedUi.buoyColors.primary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:e})]}),(0,_jsxRuntime.jsx)(_sharedUi.ProBadge,{})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.subtitle,children:r})]})}const styles=_reactNative.StyleSheet.create({banner:{backgroundColor:_sharedUi.buoyColors.card,borderRadius:10,borderWidth:1,borderColor:_sharedUi.buoyColors.primary+"40",padding:12,marginHorizontal:12,marginTop:12,marginBottom:34},content:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4},left:{flexDirection:"row",alignItems:"center",gap:8},title:{color:_sharedUi.buoyColors.text,fontSize:13,fontWeight:"600"},subtitle:{color:_sharedUi.buoyColors.textMuted,fontSize:11}});
|