@buoy-gg/network 4.0.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/network/components/NetworkEventItemCompact.js +32 -18
- package/lib/commonjs/network/components/NetworkHeaderLive.js +199 -0
- package/lib/commonjs/network/components/NetworkListScreen.js +203 -0
- package/lib/commonjs/network/components/NetworkModal.js +153 -630
- package/lib/commonjs/network/hooks/useNetworkBadgeCounts.js +83 -0
- package/lib/commonjs/network/hooks/useNetworkEventList.js +93 -0
- package/lib/commonjs/network/hooks/useNetworkHasMatches.js +56 -0
- package/lib/commonjs/network/utils/filterNetworkEvents.js +96 -0
- package/lib/commonjs/network/utils/generateNetworkCopyText.js +139 -0
- package/lib/module/index.js +5 -0
- package/lib/module/network/components/NetworkEventItemCompact.js +32 -18
- package/lib/module/network/components/NetworkHeaderLive.js +193 -0
- package/lib/module/network/components/NetworkListScreen.js +199 -0
- package/lib/module/network/components/NetworkModal.js +157 -634
- package/lib/module/network/hooks/useNetworkBadgeCounts.js +79 -0
- package/lib/module/network/hooks/useNetworkEventList.js +89 -0
- package/lib/module/network/hooks/useNetworkHasMatches.js +52 -0
- package/lib/module/network/utils/filterNetworkEvents.js +92 -0
- package/lib/module/network/utils/generateNetworkCopyText.js +135 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.d.ts +0 -4
- package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkHeaderLive.d.ts +52 -0
- package/lib/typescript/network/components/NetworkHeaderLive.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkListScreen.d.ts +27 -0
- package/lib/typescript/network/components/NetworkListScreen.d.ts.map +1 -0
- package/lib/typescript/network/components/NetworkModal.d.ts.map +1 -1
- package/lib/typescript/network/hooks/useNetworkBadgeCounts.d.ts +24 -0
- package/lib/typescript/network/hooks/useNetworkBadgeCounts.d.ts.map +1 -0
- package/lib/typescript/network/hooks/useNetworkEventList.d.ts +34 -0
- package/lib/typescript/network/hooks/useNetworkEventList.d.ts.map +1 -0
- package/lib/typescript/network/hooks/useNetworkHasMatches.d.ts +23 -0
- package/lib/typescript/network/hooks/useNetworkHasMatches.d.ts.map +1 -0
- package/lib/typescript/network/utils/filterNetworkEvents.d.ts +13 -0
- package/lib/typescript/network/utils/filterNetworkEvents.d.ts.map +1 -0
- package/lib/typescript/network/utils/generateNetworkCopyText.d.ts +11 -0
- package/lib/typescript/network/utils/generateNetworkCopyText.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Narrowest possible subscription: a BOOLEAN that flips when the store
|
|
3
|
+
* goes between "has events matching this filter" and "empty". Used by
|
|
4
|
+
* header buttons (clear/copy) whose only live dependency is their
|
|
5
|
+
* enabled state — with the full counts hook they re-rendered on every
|
|
6
|
+
* count change (32× in a 25-request run, tool-bench 2026-07-06); with a
|
|
7
|
+
* flip-guarded boolean they render ~twice per session.
|
|
8
|
+
*/
|
|
9
|
+
import type { IgnoredPattern } from "@buoy-gg/shared-ui";
|
|
10
|
+
import type { NetworkFilter } from "../types";
|
|
11
|
+
/** True while the store has ANY events (clear button's enabled state). */
|
|
12
|
+
export declare function useNetworkHasEvents(options: {
|
|
13
|
+
paused: boolean;
|
|
14
|
+
}): boolean;
|
|
15
|
+
/** True while the store has events matching the current filter (copy
|
|
16
|
+
* button's enabled state). The filter pass runs per emission but a
|
|
17
|
+
* re-render only happens when the boolean flips. */
|
|
18
|
+
export declare function useNetworkHasMatches(options: {
|
|
19
|
+
filter: NetworkFilter;
|
|
20
|
+
ignoredPatterns: readonly IgnoredPattern[];
|
|
21
|
+
paused: boolean;
|
|
22
|
+
}): boolean;
|
|
23
|
+
//# sourceMappingURL=useNetworkHasMatches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNetworkHasMatches.d.ts","sourceRoot":"","sources":["../../../../src/network/hooks/useNetworkHasMatches.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAM9C,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAoBzE;AAED;;oDAEoD;AACpD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE;IAC5C,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB,GAAG,OAAO,CA0BV"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure network-event filtering shared by the list/copy/filter-screen hooks
|
|
3
|
+
* (rule3: reusable logic extracted to a pure function). Ported verbatim
|
|
4
|
+
* from the filtering previously inlined in `useNetworkEvents` so every
|
|
5
|
+
* subscriber applies identical semantics.
|
|
6
|
+
*/
|
|
7
|
+
import { type IgnoredPattern } from "@buoy-gg/shared-ui";
|
|
8
|
+
import type { NetworkEvent, NetworkFilter } from "../types";
|
|
9
|
+
/** Apply the user's search/method/status/host/content-type filter. */
|
|
10
|
+
export declare function filterNetworkEvents(events: NetworkEvent[], filter: NetworkFilter): NetworkEvent[];
|
|
11
|
+
/** Drop events matching the shared ignored-domain/URL patterns. */
|
|
12
|
+
export declare function applyIgnoredPatterns(events: NetworkEvent[], ignoredPatterns: readonly IgnoredPattern[]): NetworkEvent[];
|
|
13
|
+
//# sourceMappingURL=filterNetworkEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterNetworkEvents.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/filterNetworkEvents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG5D,sEAAsE;AACtE,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EAAE,EACtB,MAAM,EAAE,aAAa,GACpB,YAAY,EAAE,CA6GhB;AAED,mEAAmE;AACnE,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EAAE,EACtB,eAAe,EAAE,SAAS,cAAc,EAAE,GACzC,YAAY,EAAE,CAQhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure copy-text generation for the network tool (rule3: reusable logic
|
|
3
|
+
* extracted from the modal). Ported verbatim from the `generateCopyText`
|
|
4
|
+
* callback previously inlined in NetworkModal — kept pure so the header
|
|
5
|
+
* CopyButton can resolve it LAZILY at copy time (CopyButton accepts a
|
|
6
|
+
* function value) instead of rebuilding the string on every event.
|
|
7
|
+
*/
|
|
8
|
+
import type { NetworkEvent } from "../types";
|
|
9
|
+
import type { CopySettings } from "../components/NetworkCopySettingsView";
|
|
10
|
+
export declare function generateNetworkCopyText(events: NetworkEvent[], copySettings: CopySettings): string;
|
|
11
|
+
//# sourceMappingURL=generateNetworkCopyText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateNetworkCopyText.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/generateNetworkCopyText.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAiB1E,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,YAAY,EAAE,EACtB,YAAY,EAAE,YAAY,GACzB,MAAM,CAyKR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/network",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "network package",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/shared-ui": "
|
|
29
|
+
"@buoy-gg/shared-ui": "6.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "*",
|