@buoy-gg/network 1.7.2

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.
Files changed (67) hide show
  1. package/README.md +381 -0
  2. package/lib/commonjs/index.js +34 -0
  3. package/lib/commonjs/network/components/NetworkCopySettingsView.js +867 -0
  4. package/lib/commonjs/network/components/NetworkEventDetailView.js +837 -0
  5. package/lib/commonjs/network/components/NetworkEventItemCompact.js +323 -0
  6. package/lib/commonjs/network/components/NetworkFilterViewV3.js +297 -0
  7. package/lib/commonjs/network/components/NetworkModal.js +937 -0
  8. package/lib/commonjs/network/hooks/useNetworkEvents.js +320 -0
  9. package/lib/commonjs/network/hooks/useTickEveryMinute.js +34 -0
  10. package/lib/commonjs/network/index.js +102 -0
  11. package/lib/commonjs/network/types/index.js +1 -0
  12. package/lib/commonjs/network/utils/extractOperationName.js +80 -0
  13. package/lib/commonjs/network/utils/formatGraphQLVariables.js +219 -0
  14. package/lib/commonjs/network/utils/formatting.js +30 -0
  15. package/lib/commonjs/network/utils/networkEventStore.js +269 -0
  16. package/lib/commonjs/network/utils/networkListener.js +801 -0
  17. package/lib/commonjs/package.json +1 -0
  18. package/lib/commonjs/preset.js +83 -0
  19. package/lib/module/index.js +7 -0
  20. package/lib/module/network/components/NetworkCopySettingsView.js +862 -0
  21. package/lib/module/network/components/NetworkEventDetailView.js +834 -0
  22. package/lib/module/network/components/NetworkEventItemCompact.js +320 -0
  23. package/lib/module/network/components/NetworkFilterViewV3.js +293 -0
  24. package/lib/module/network/components/NetworkModal.js +933 -0
  25. package/lib/module/network/hooks/useNetworkEvents.js +316 -0
  26. package/lib/module/network/hooks/useTickEveryMinute.js +29 -0
  27. package/lib/module/network/index.js +20 -0
  28. package/lib/module/network/types/index.js +1 -0
  29. package/lib/module/network/utils/extractOperationName.js +76 -0
  30. package/lib/module/network/utils/formatGraphQLVariables.js +213 -0
  31. package/lib/module/network/utils/formatting.js +9 -0
  32. package/lib/module/network/utils/networkEventStore.js +265 -0
  33. package/lib/module/network/utils/networkListener.js +791 -0
  34. package/lib/module/preset.js +79 -0
  35. package/lib/typescript/index.d.ts +3 -0
  36. package/lib/typescript/index.d.ts.map +1 -0
  37. package/lib/typescript/network/components/NetworkCopySettingsView.d.ts +26 -0
  38. package/lib/typescript/network/components/NetworkCopySettingsView.d.ts.map +1 -0
  39. package/lib/typescript/network/components/NetworkEventDetailView.d.ts +13 -0
  40. package/lib/typescript/network/components/NetworkEventDetailView.d.ts.map +1 -0
  41. package/lib/typescript/network/components/NetworkEventItemCompact.d.ts +12 -0
  42. package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +1 -0
  43. package/lib/typescript/network/components/NetworkFilterViewV3.d.ts +22 -0
  44. package/lib/typescript/network/components/NetworkFilterViewV3.d.ts.map +1 -0
  45. package/lib/typescript/network/components/NetworkModal.d.ts +14 -0
  46. package/lib/typescript/network/components/NetworkModal.d.ts.map +1 -0
  47. package/lib/typescript/network/hooks/useNetworkEvents.d.ts +72 -0
  48. package/lib/typescript/network/hooks/useNetworkEvents.d.ts.map +1 -0
  49. package/lib/typescript/network/hooks/useTickEveryMinute.d.ts +9 -0
  50. package/lib/typescript/network/hooks/useTickEveryMinute.d.ts.map +1 -0
  51. package/lib/typescript/network/index.d.ts +12 -0
  52. package/lib/typescript/network/index.d.ts.map +1 -0
  53. package/lib/typescript/network/types/index.d.ts +88 -0
  54. package/lib/typescript/network/types/index.d.ts.map +1 -0
  55. package/lib/typescript/network/utils/extractOperationName.d.ts +41 -0
  56. package/lib/typescript/network/utils/extractOperationName.d.ts.map +1 -0
  57. package/lib/typescript/network/utils/formatGraphQLVariables.d.ts +79 -0
  58. package/lib/typescript/network/utils/formatGraphQLVariables.d.ts.map +1 -0
  59. package/lib/typescript/network/utils/formatting.d.ts +6 -0
  60. package/lib/typescript/network/utils/formatting.d.ts.map +1 -0
  61. package/lib/typescript/network/utils/networkEventStore.d.ts +81 -0
  62. package/lib/typescript/network/utils/networkEventStore.d.ts.map +1 -0
  63. package/lib/typescript/network/utils/networkListener.d.ts +191 -0
  64. package/lib/typescript/network/utils/networkListener.d.ts.map +1 -0
  65. package/lib/typescript/preset.d.ts +76 -0
  66. package/lib/typescript/preset.d.ts.map +1 -0
  67. package/package.json +69 -0
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createNetworkTool = createNetworkTool;
7
+ exports.networkToolPreset = void 0;
8
+ var _sharedUi = require("@buoy-gg/shared-ui");
9
+ var _NetworkModal = require("./network/components/NetworkModal");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ /**
12
+ * Pre-configured network monitoring tool for FloatingDevTools
13
+ *
14
+ * This preset provides a zero-config way to add network request monitoring to your dev tools.
15
+ * Just import and add it to your apps array!
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { networkToolPreset } from '@buoy-gg/network';
20
+ *
21
+ * const installedApps = [
22
+ * networkToolPreset, // That's it!
23
+ * // ...other tools
24
+ * ];
25
+ * ```
26
+ */
27
+
28
+ /**
29
+ * Pre-configured network monitoring tool for FloatingDevTools.
30
+ * Includes:
31
+ * - Live network request monitoring
32
+ * - Request/response inspection
33
+ * - Filter by status, method, URL
34
+ * - Timing information
35
+ */
36
+ const networkToolPreset = exports.networkToolPreset = {
37
+ id: "network",
38
+ name: "NET",
39
+ description: "Network request logger",
40
+ slot: "both",
41
+ icon: ({
42
+ size
43
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.NetworkIcon, {
44
+ size: size
45
+ }),
46
+ component: _NetworkModal.NetworkModal,
47
+ props: {
48
+ enableSharedModalDimensions: false
49
+ }
50
+ };
51
+
52
+ /**
53
+ * Create a custom network monitoring tool configuration.
54
+ * Use this if you want to override default settings.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * import { createNetworkTool } from '@buoy-gg/network';
59
+ *
60
+ * const myNetworkTool = createNetworkTool({
61
+ * name: "REQUESTS",
62
+ * iconColor: "#9945FF", // Purple color
63
+ * enableSharedModalDimensions: true,
64
+ * });
65
+ * ```
66
+ */
67
+ function createNetworkTool(options) {
68
+ return {
69
+ id: options?.id || "network",
70
+ name: options?.name || "NET",
71
+ description: options?.description || "Network request logger",
72
+ slot: "both",
73
+ icon: ({
74
+ size
75
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.NetworkIcon, {
76
+ size: size
77
+ }),
78
+ component: _NetworkModal.NetworkModal,
79
+ props: {
80
+ enableSharedModalDimensions: options?.enableSharedModalDimensions !== undefined ? options.enableSharedModalDimensions : false
81
+ }
82
+ };
83
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ // Export preset configuration (easiest way to add to FloatingDevTools!)
4
+ export { networkToolPreset, createNetworkTool } from "./preset";
5
+
6
+ // Export all network utilities and components
7
+ export * from "./network";