@buoy-gg/events 2.1.1

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 (84) hide show
  1. package/LICENSE +58 -0
  2. package/README.md +55 -0
  3. package/lib/commonjs/components/EventsCopySettingsView.js +645 -0
  4. package/lib/commonjs/components/EventsModal.js +263 -0
  5. package/lib/commonjs/components/ReactQueryEventDetail.js +428 -0
  6. package/lib/commonjs/components/UnifiedEventDetail.js +370 -0
  7. package/lib/commonjs/components/UnifiedEventFilters.js +113 -0
  8. package/lib/commonjs/components/UnifiedEventItem.js +349 -0
  9. package/lib/commonjs/components/UnifiedEventList.js +154 -0
  10. package/lib/commonjs/components/UnifiedEventViewer.js +126 -0
  11. package/lib/commonjs/hooks/useUnifiedEvents.js +237 -0
  12. package/lib/commonjs/index.js +205 -0
  13. package/lib/commonjs/package.json +1 -0
  14. package/lib/commonjs/preset.js +66 -0
  15. package/lib/commonjs/stores/unifiedEventStore.js +413 -0
  16. package/lib/commonjs/types/copySettings.js +220 -0
  17. package/lib/commonjs/types/index.js +17 -0
  18. package/lib/commonjs/utils/autoDiscoverEventSources.js +640 -0
  19. package/lib/commonjs/utils/badgeSelectionStorage.js +58 -0
  20. package/lib/commonjs/utils/copySettingsStorage.js +66 -0
  21. package/lib/commonjs/utils/correlationUtils.js +130 -0
  22. package/lib/commonjs/utils/eventExportFormatter.js +1095 -0
  23. package/lib/commonjs/utils/eventTransformers.js +496 -0
  24. package/lib/module/components/EventsCopySettingsView.js +641 -0
  25. package/lib/module/components/EventsModal.js +259 -0
  26. package/lib/module/components/ReactQueryEventDetail.js +424 -0
  27. package/lib/module/components/UnifiedEventDetail.js +366 -0
  28. package/lib/module/components/UnifiedEventFilters.js +109 -0
  29. package/lib/module/components/UnifiedEventItem.js +345 -0
  30. package/lib/module/components/UnifiedEventList.js +150 -0
  31. package/lib/module/components/UnifiedEventViewer.js +122 -0
  32. package/lib/module/hooks/useUnifiedEvents.js +234 -0
  33. package/lib/module/index.js +77 -0
  34. package/lib/module/preset.js +62 -0
  35. package/lib/module/stores/unifiedEventStore.js +387 -0
  36. package/lib/module/types/copySettings.js +215 -0
  37. package/lib/module/types/index.js +37 -0
  38. package/lib/module/utils/autoDiscoverEventSources.js +633 -0
  39. package/lib/module/utils/badgeSelectionStorage.js +52 -0
  40. package/lib/module/utils/copySettingsStorage.js +61 -0
  41. package/lib/module/utils/correlationUtils.js +120 -0
  42. package/lib/module/utils/eventExportFormatter.js +1085 -0
  43. package/lib/module/utils/eventTransformers.js +487 -0
  44. package/lib/typescript/components/EventsCopySettingsView.d.ts +16 -0
  45. package/lib/typescript/components/EventsModal.d.ts +16 -0
  46. package/lib/typescript/components/ReactQueryEventDetail.d.ts +15 -0
  47. package/lib/typescript/components/UnifiedEventDetail.d.ts +15 -0
  48. package/lib/typescript/components/UnifiedEventFilters.d.ts +21 -0
  49. package/lib/typescript/components/UnifiedEventItem.d.ts +26 -0
  50. package/lib/typescript/components/UnifiedEventList.d.ts +27 -0
  51. package/lib/typescript/components/UnifiedEventViewer.d.ts +8 -0
  52. package/lib/typescript/hooks/useUnifiedEvents.d.ts +30 -0
  53. package/lib/typescript/index.d.ts +28 -0
  54. package/lib/typescript/preset.d.ts +62 -0
  55. package/lib/typescript/stores/unifiedEventStore.d.ts +146 -0
  56. package/lib/typescript/types/copySettings.d.ts +179 -0
  57. package/lib/typescript/types/index.d.ts +73 -0
  58. package/lib/typescript/utils/autoDiscoverEventSources.d.ts +74 -0
  59. package/lib/typescript/utils/badgeSelectionStorage.d.ts +21 -0
  60. package/lib/typescript/utils/copySettingsStorage.d.ts +21 -0
  61. package/lib/typescript/utils/correlationUtils.d.ts +36 -0
  62. package/lib/typescript/utils/eventExportFormatter.d.ts +49 -0
  63. package/lib/typescript/utils/eventTransformers.d.ts +119 -0
  64. package/package.json +91 -0
  65. package/src/components/EventsCopySettingsView.tsx +742 -0
  66. package/src/components/EventsModal.tsx +328 -0
  67. package/src/components/ReactQueryEventDetail.tsx +413 -0
  68. package/src/components/UnifiedEventDetail.tsx +371 -0
  69. package/src/components/UnifiedEventFilters.tsx +156 -0
  70. package/src/components/UnifiedEventItem.tsx +396 -0
  71. package/src/components/UnifiedEventList.tsx +197 -0
  72. package/src/components/UnifiedEventViewer.tsx +132 -0
  73. package/src/hooks/useUnifiedEvents.ts +288 -0
  74. package/src/index.tsx +112 -0
  75. package/src/preset.tsx +57 -0
  76. package/src/stores/unifiedEventStore.ts +405 -0
  77. package/src/types/copySettings.ts +269 -0
  78. package/src/types/index.ts +96 -0
  79. package/src/utils/autoDiscoverEventSources.ts +690 -0
  80. package/src/utils/badgeSelectionStorage.ts +51 -0
  81. package/src/utils/copySettingsStorage.ts +61 -0
  82. package/src/utils/correlationUtils.ts +146 -0
  83. package/src/utils/eventExportFormatter.ts +1233 -0
  84. package/src/utils/eventTransformers.ts +567 -0
@@ -0,0 +1,237 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useUnifiedEvents = useUnifiedEvents;
7
+ var _react = require("react");
8
+ var _sharedUi = require("@buoy-gg/shared-ui");
9
+ var _unifiedEventStore = require("../stores/unifiedEventStore");
10
+ var _badgeSelectionStorage = require("../utils/badgeSelectionStorage");
11
+ var _autoDiscoverEventSources = require("../utils/autoDiscoverEventSources");
12
+ /**
13
+ * useUnifiedEvents Hook
14
+ *
15
+ * Main hook for consuming unified events from all sources.
16
+ * Automatically discovers and subscribes to available event sources.
17
+ */
18
+
19
+ /** Max events for non-Pro users */
20
+ const FREE_TIER_MAX_EVENTS = 25;
21
+
22
+ /**
23
+ * All possible sources for display
24
+ */
25
+ const ALL_DISPLAY_SOURCES = ["storage-async", "redux", "network", "react-query-query", "react-query-mutation", "route"];
26
+
27
+ /**
28
+ * Map display sources to actual event sources they should match
29
+ */
30
+ const SOURCE_TO_EVENT_SOURCES = {
31
+ "storage-async": ["storage-async", "storage-mmkv"],
32
+ "storage-mmkv": ["storage-mmkv"],
33
+ redux: ["redux"],
34
+ network: ["network"],
35
+ "react-query": ["react-query", "react-query-query"],
36
+ "react-query-query": ["react-query", "react-query-query"],
37
+ "react-query-mutation": ["react-query-mutation"],
38
+ route: ["route"]
39
+ };
40
+
41
+ /**
42
+ * Map event sources to their parent discovery ID
43
+ */
44
+ const EVENT_SOURCE_TO_DISCOVERY_ID = {
45
+ "storage-async": "storage",
46
+ "storage-mmkv": "storage",
47
+ redux: "redux",
48
+ network: "network",
49
+ "react-query": "react-query",
50
+ "react-query-query": "react-query",
51
+ "react-query-mutation": "react-query",
52
+ route: "route-events"
53
+ };
54
+ function useUnifiedEvents() {
55
+ const {
56
+ isPro
57
+ } = (0, _sharedUi.useFeatureGate)();
58
+ const [events, setEvents] = (0, _react.useState)([]);
59
+ const [enabledSources, setEnabledSources] = (0, _react.useState)(() => new Set(ALL_DISPLAY_SOURCES));
60
+ const [isCapturing, setIsCapturing] = (0, _react.useState)(true);
61
+ const isStateRestoredRef = (0, _react.useRef)(false);
62
+
63
+ // Get discovered sources (which packages are installed)
64
+ const discoveredSources = (0, _react.useMemo)(() => {
65
+ return (0, _unifiedEventStore.getAvailableEventSources)();
66
+ }, []);
67
+
68
+ // Get available display sources (only show sources for installed packages)
69
+ const availableDisplaySources = (0, _react.useMemo)(() => {
70
+ return ALL_DISPLAY_SOURCES.filter(displaySource => {
71
+ const eventSources = SOURCE_TO_EVENT_SOURCES[displaySource] || [displaySource];
72
+ // Check if any of the event sources for this display source are available
73
+ return eventSources.some(es => discoveredSources.has(es));
74
+ });
75
+ }, [discoveredSources]);
76
+
77
+ // Subscribe to store changes and start capturing on mount
78
+ (0, _react.useEffect)(() => {
79
+ // Subscribe to store updates
80
+ const unsubscribe = (0, _unifiedEventStore.subscribe)(newEvents => {
81
+ setEvents(newEvents);
82
+ });
83
+
84
+ // Start capturing from all available sources
85
+ // These functions are now safe - they check if the source is available
86
+ (0, _unifiedEventStore.subscribeToStorage)();
87
+ (0, _unifiedEventStore.subscribeToRedux)();
88
+ (0, _unifiedEventStore.subscribeToNetwork)();
89
+ (0, _unifiedEventStore.subscribeToReactQuery)();
90
+ (0, _unifiedEventStore.subscribeToRoutes)();
91
+ return unsubscribe;
92
+ }, []);
93
+
94
+ // Restore saved badge selection state on mount
95
+ (0, _react.useEffect)(() => {
96
+ const restoreState = async () => {
97
+ const savedSources = await (0, _badgeSelectionStorage.loadEnabledSources)();
98
+ if (savedSources && savedSources.length > 0) {
99
+ // Filter to only include valid sources that still exist and are available
100
+ const validSources = savedSources.filter(s => availableDisplaySources.includes(s));
101
+ if (validSources.length > 0) {
102
+ setEnabledSources(new Set(validSources));
103
+ } else {
104
+ // If no saved sources are valid, enable all available sources
105
+ setEnabledSources(new Set(availableDisplaySources));
106
+ }
107
+ } else {
108
+ // No saved state - enable all available sources
109
+ setEnabledSources(new Set(availableDisplaySources));
110
+ }
111
+ isStateRestoredRef.current = true;
112
+ };
113
+ restoreState();
114
+ }, [availableDisplaySources]);
115
+
116
+ // Persist enabled sources whenever they change (after initial restoration)
117
+ (0, _react.useEffect)(() => {
118
+ if (!isStateRestoredRef.current) {
119
+ return;
120
+ }
121
+ (0, _badgeSelectionStorage.saveEnabledSources)(Array.from(enabledSources));
122
+ }, [enabledSources]);
123
+
124
+ // Build set of all event sources that should be shown
125
+ const allowedEventSources = (0, _react.useMemo)(() => {
126
+ const allowed = new Set();
127
+ enabledSources.forEach(displaySource => {
128
+ const eventSources = SOURCE_TO_EVENT_SOURCES[displaySource];
129
+ if (eventSources) {
130
+ eventSources.forEach(s => allowed.add(s));
131
+ }
132
+ });
133
+ return allowed;
134
+ }, [enabledSources]);
135
+
136
+ // Filter events by enabled sources
137
+ const allFilteredEvents = (0, _react.useMemo)(() => {
138
+ if (allowedEventSources.size === 0) {
139
+ return [];
140
+ }
141
+ return events.filter(event => allowedEventSources.has(event.source));
142
+ }, [events, allowedEventSources]);
143
+
144
+ // Apply free tier limit if not Pro
145
+ const filteredEvents = (0, _react.useMemo)(() => {
146
+ if (isPro) {
147
+ return allFilteredEvents;
148
+ }
149
+ return allFilteredEvents.slice(0, FREE_TIER_MAX_EVENTS);
150
+ }, [allFilteredEvents, isPro]);
151
+
152
+ // Calculate hidden events count for free tier
153
+ const hiddenEventsCount = (0, _react.useMemo)(() => {
154
+ if (isPro) {
155
+ return 0;
156
+ }
157
+ return Math.max(0, allFilteredEvents.length - FREE_TIER_MAX_EVENTS);
158
+ }, [allFilteredEvents, isPro]);
159
+
160
+ // Get all available sources with counts, sorted: enabled first, disabled last
161
+ const availableSources = (0, _react.useMemo)(() => {
162
+ const counts = (0, _unifiedEventStore.getSourceCounts)();
163
+ const sources = availableDisplaySources.map(source => {
164
+ const eventSources = SOURCE_TO_EVENT_SOURCES[source] || [source];
165
+ const totalCount = eventSources.reduce((sum, s) => sum + (counts[s] || 0), 0);
166
+ const displayConfig = (0, _autoDiscoverEventSources.getSourceDisplayConfig)(source);
167
+ return {
168
+ source,
169
+ ...displayConfig,
170
+ count: totalCount,
171
+ enabled: enabledSources.has(source)
172
+ };
173
+ });
174
+
175
+ // Sort: enabled first, then disabled
176
+ return sources.sort((a, b) => {
177
+ if (a.enabled && !b.enabled) return -1;
178
+ if (!a.enabled && b.enabled) return 1;
179
+ return 0;
180
+ });
181
+ }, [events, enabledSources, availableDisplaySources]);
182
+ const toggleSource = (0, _react.useCallback)(source => {
183
+ setEnabledSources(prev => {
184
+ const next = new Set(prev);
185
+ if (next.has(source)) {
186
+ next.delete(source);
187
+ } else {
188
+ next.add(source);
189
+ }
190
+ return next;
191
+ });
192
+ }, []);
193
+ const enableAllSources = (0, _react.useCallback)(() => {
194
+ setEnabledSources(new Set(availableDisplaySources));
195
+ }, [availableDisplaySources]);
196
+ const clearEvents = (0, _react.useCallback)(() => {
197
+ (0, _unifiedEventStore.clearEvents)();
198
+ }, []);
199
+ const startCapturing = (0, _react.useCallback)(() => {
200
+ (0, _unifiedEventStore.subscribeToStorage)();
201
+ (0, _unifiedEventStore.subscribeToRedux)();
202
+ (0, _unifiedEventStore.subscribeToNetwork)();
203
+ (0, _unifiedEventStore.subscribeToReactQuery)();
204
+ (0, _unifiedEventStore.subscribeToRoutes)();
205
+ setIsCapturing(true);
206
+ }, []);
207
+ const stopCapturing = (0, _react.useCallback)(() => {
208
+ (0, _unifiedEventStore.unsubscribeAll)();
209
+ setIsCapturing(false);
210
+ }, []);
211
+ const toggleCapturing = (0, _react.useCallback)(() => {
212
+ if (isCapturing) {
213
+ stopCapturing();
214
+ } else {
215
+ startCapturing();
216
+ }
217
+ }, [isCapturing, startCapturing, stopCapturing]);
218
+ return {
219
+ events,
220
+ filteredEvents,
221
+ availableSources,
222
+ enabledSources,
223
+ toggleSource,
224
+ enableAllSources,
225
+ clearEvents,
226
+ totalCount: events.length,
227
+ filteredCount: filteredEvents.length,
228
+ isCapturing,
229
+ startCapturing,
230
+ stopCapturing,
231
+ toggleCapturing,
232
+ discoveredSources,
233
+ hiddenEventsCount,
234
+ isPro
235
+ };
236
+ }
237
+ //# sourceMappingURL=useUnifiedEvents.js.map
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "COPY_PRESETS", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _copySettings.COPY_PRESETS;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "DEFAULT_COPY_SETTINGS", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _copySettings.DEFAULT_COPY_SETTINGS;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "EventsCopySettingsView", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _EventsCopySettingsView.EventsCopySettingsView;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "PRESET_METADATA", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _copySettings.PRESET_METADATA;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "ReactQueryEventDetail", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _ReactQueryEventDetail.ReactQueryEventDetail;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "UnifiedEventDetail", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _UnifiedEventDetail.UnifiedEventDetail;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "UnifiedEventFilters", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _UnifiedEventFilters.UnifiedEventFilters;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "UnifiedEventItem", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _UnifiedEventItem.UnifiedEventItem;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "UnifiedEventList", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _UnifiedEventList.UnifiedEventList;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "UnifiedEventViewer", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _UnifiedEventViewer.UnifiedEventViewer;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "buildCorrelationCountMap", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _correlationUtils.buildCorrelationCountMap;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "clearCopySettings", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _copySettingsStorage.clearCopySettings;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "createEventsTool", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _preset.createEventsTool;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "detectActivePreset", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _copySettings.detectActivePreset;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "estimateExportSize", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _eventExportFormatter.estimateExportSize;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "eventsToolPreset", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _preset.eventsToolPreset;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "filterEvents", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _eventExportFormatter.filterEvents;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, "findRelatedEvents", {
109
+ enumerable: true,
110
+ get: function () {
111
+ return _correlationUtils.findRelatedEvents;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, "generateExport", {
115
+ enumerable: true,
116
+ get: function () {
117
+ return _eventExportFormatter.generateExport;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, "generateJsonExport", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _eventExportFormatter.generateJsonExport;
124
+ }
125
+ });
126
+ Object.defineProperty(exports, "generateMarkdownExport", {
127
+ enumerable: true,
128
+ get: function () {
129
+ return _eventExportFormatter.generateMarkdownExport;
130
+ }
131
+ });
132
+ Object.defineProperty(exports, "generatePlaintextExport", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _eventExportFormatter.generatePlaintextExport;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "getCorrelationColor", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _correlationUtils.getCorrelationColor;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "getCorrelationGroup", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _correlationUtils.getCorrelationGroup;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "getCorrelationLabel", {
151
+ enumerable: true,
152
+ get: function () {
153
+ return _correlationUtils.getCorrelationLabel;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "getExportSummary", {
157
+ enumerable: true,
158
+ get: function () {
159
+ return _eventExportFormatter.getExportSummary;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "getRelatedEventsCount", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _correlationUtils.getRelatedEventsCount;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "hasRelatedEvents", {
169
+ enumerable: true,
170
+ get: function () {
171
+ return _correlationUtils.hasRelatedEvents;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "loadCopySettings", {
175
+ enumerable: true,
176
+ get: function () {
177
+ return _copySettingsStorage.loadCopySettings;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, "saveCopySettings", {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _copySettingsStorage.saveCopySettings;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, "useUnifiedEvents", {
187
+ enumerable: true,
188
+ get: function () {
189
+ return _useUnifiedEvents.useUnifiedEvents;
190
+ }
191
+ });
192
+ var _preset = require("./preset");
193
+ var _UnifiedEventViewer = require("./components/UnifiedEventViewer");
194
+ var _useUnifiedEvents = require("./hooks/useUnifiedEvents");
195
+ var _copySettings = require("./types/copySettings");
196
+ var _UnifiedEventItem = require("./components/UnifiedEventItem");
197
+ var _UnifiedEventList = require("./components/UnifiedEventList");
198
+ var _UnifiedEventFilters = require("./components/UnifiedEventFilters");
199
+ var _UnifiedEventDetail = require("./components/UnifiedEventDetail");
200
+ var _ReactQueryEventDetail = require("./components/ReactQueryEventDetail");
201
+ var _EventsCopySettingsView = require("./components/EventsCopySettingsView");
202
+ var _correlationUtils = require("./utils/correlationUtils");
203
+ var _eventExportFormatter = require("./utils/eventExportFormatter");
204
+ var _copySettingsStorage = require("./utils/copySettingsStorage");
205
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createEventsTool = createEventsTool;
7
+ exports.eventsToolPreset = void 0;
8
+ var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
9
+ var _EventsModal = require("./components/EventsModal");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ /**
12
+ * Pre-configured Events tool for FloatingDevTools
13
+ *
14
+ * This preset provides a unified event timeline showing events
15
+ * from all DevTools sources (Storage, Redux, Network, etc.)
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { eventsToolPreset } from '@buoy-gg/events';
20
+ *
21
+ * const installedApps = [
22
+ * eventsToolPreset, // That's it!
23
+ * // ...other tools
24
+ * ];
25
+ * ```
26
+ */
27
+
28
+ /**
29
+ * Pre-configured Events tool for FloatingDevTools.
30
+ * Shows a unified timeline of events from all sources:
31
+ * - AsyncStorage operations
32
+ * - MMKV operations (coming soon)
33
+ * - Redux actions (coming soon)
34
+ * - Network requests (coming soon)
35
+ * - React Query events (coming soon)
36
+ */
37
+ const eventsToolPreset = exports.eventsToolPreset = {
38
+ id: "events",
39
+ name: "EVENTS",
40
+ description: "Unified event timeline",
41
+ slot: "both",
42
+ icon: ({
43
+ size,
44
+ color
45
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_floatingToolsCore.EventsIcon, {
46
+ size: size,
47
+ color: color || _floatingToolsCore.EVENTS_ICON_COLOR
48
+ }),
49
+ component: _EventsModal.EventsModal,
50
+ props: {
51
+ enableSharedModalDimensions: false
52
+ }
53
+ };
54
+
55
+ /**
56
+ * Create a custom Events tool configuration.
57
+ * Use this if you want to override default settings.
58
+ */
59
+ function createEventsTool(options = {}) {
60
+ return {
61
+ ...eventsToolPreset,
62
+ name: options.name ?? eventsToolPreset.name,
63
+ description: options.description ?? eventsToolPreset.description
64
+ };
65
+ }
66
+ //# sourceMappingURL=preset.js.map