@buoy-gg/redux 2.1.16 → 3.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.
Files changed (68) hide show
  1. package/lib/commonjs/index.js +186 -1
  2. package/lib/commonjs/preset.js +98 -1
  3. package/lib/commonjs/redux/components/ReduxActionButton.js +129 -1
  4. package/lib/commonjs/redux/components/ReduxActionDetailContent.js +380 -1
  5. package/lib/commonjs/redux/components/ReduxActionDetailView.js +401 -1
  6. package/lib/commonjs/redux/components/ReduxActionInfoView.js +838 -1
  7. package/lib/commonjs/redux/components/ReduxActionItem.js +366 -1
  8. package/lib/commonjs/redux/components/ReduxDetailViewToggle.js +134 -1
  9. package/lib/commonjs/redux/components/ReduxIcon.js +18 -1
  10. package/lib/commonjs/redux/components/ReduxModal.js +531 -1
  11. package/lib/commonjs/redux/components/index.js +52 -1
  12. package/lib/commonjs/redux/hooks/index.js +25 -1
  13. package/lib/commonjs/redux/hooks/useAutoInstrumentRedux.js +197 -1
  14. package/lib/commonjs/redux/hooks/useReduxActions.js +75 -1
  15. package/lib/commonjs/redux/index.js +49 -1
  16. package/lib/commonjs/redux/sync/reduxSyncAdapter.js +26 -0
  17. package/lib/commonjs/redux/utils/autoInstrument.js +270 -1
  18. package/lib/commonjs/redux/utils/buoyReduxMiddleware.js +166 -1
  19. package/lib/commonjs/redux/utils/createReduxHistoryAdapter.js +146 -1
  20. package/lib/commonjs/redux/utils/index.js +111 -1
  21. package/lib/commonjs/redux/utils/reduxActionStore.js +413 -1
  22. package/lib/module/index.js +92 -1
  23. package/lib/module/preset.js +94 -1
  24. package/lib/module/redux/components/ReduxActionButton.js +126 -1
  25. package/lib/module/redux/components/ReduxActionDetailContent.js +376 -1
  26. package/lib/module/redux/components/ReduxActionDetailView.js +397 -1
  27. package/lib/module/redux/components/ReduxActionInfoView.js +833 -1
  28. package/lib/module/redux/components/ReduxActionItem.js +362 -1
  29. package/lib/module/redux/components/ReduxDetailViewToggle.js +129 -1
  30. package/lib/module/redux/components/ReduxIcon.js +8 -1
  31. package/lib/module/redux/components/ReduxModal.js +526 -1
  32. package/lib/module/redux/components/index.js +7 -1
  33. package/lib/module/redux/hooks/index.js +4 -1
  34. package/lib/module/redux/hooks/useAutoInstrumentRedux.js +193 -1
  35. package/lib/module/redux/hooks/useReduxActions.js +71 -1
  36. package/lib/module/redux/index.js +13 -1
  37. package/lib/module/redux/sync/reduxSyncAdapter.js +23 -0
  38. package/lib/module/redux/utils/autoInstrument.js +260 -1
  39. package/lib/module/redux/utils/buoyReduxMiddleware.js +157 -1
  40. package/lib/module/redux/utils/createReduxHistoryAdapter.js +142 -1
  41. package/lib/module/redux/utils/index.js +8 -1
  42. package/lib/module/redux/utils/reduxActionStore.js +409 -1
  43. package/lib/typescript/index.d.ts +1 -0
  44. package/lib/typescript/index.d.ts.map +1 -0
  45. package/lib/typescript/preset.d.ts.map +1 -0
  46. package/lib/typescript/redux/components/ReduxActionButton.d.ts.map +1 -0
  47. package/lib/typescript/redux/components/ReduxActionDetailContent.d.ts.map +1 -0
  48. package/lib/typescript/redux/components/ReduxActionDetailView.d.ts.map +1 -0
  49. package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +1 -0
  50. package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +1 -0
  51. package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +1 -0
  52. package/lib/typescript/redux/components/ReduxIcon.d.ts.map +1 -0
  53. package/lib/typescript/redux/components/ReduxModal.d.ts.map +1 -0
  54. package/lib/typescript/redux/components/index.d.ts.map +1 -0
  55. package/lib/typescript/redux/hooks/index.d.ts.map +1 -0
  56. package/lib/typescript/redux/hooks/useAutoInstrumentRedux.d.ts.map +1 -0
  57. package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +1 -0
  58. package/lib/typescript/redux/index.d.ts.map +1 -0
  59. package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts +18 -0
  60. package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts.map +1 -0
  61. package/lib/typescript/redux/types/index.d.ts.map +1 -0
  62. package/lib/typescript/redux/utils/autoInstrument.d.ts.map +1 -0
  63. package/lib/typescript/redux/utils/buoyReduxMiddleware.d.ts.map +1 -0
  64. package/lib/typescript/redux/utils/createReduxHistoryAdapter.d.ts.map +1 -0
  65. package/lib/typescript/redux/utils/index.d.ts.map +1 -0
  66. package/lib/typescript/redux/utils/reduxActionStore.d.ts +25 -0
  67. package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +1 -0
  68. package/package.json +4 -4
@@ -1 +1,409 @@
1
- "use strict";function getActionCategory(t){return t.startsWith("@@")?"internal":t.includes("/pending")?"pending":t.includes("/fulfilled")?"fulfilled":t.includes("/rejected")?"rejected":t.includes("/executeQuery")?"query":t.includes("/executeMutation")?"mutation":"action"}function parseActionType(t){if(t.startsWith("@@")){const e=t.split("/");return{sliceName:null,actionName:e[e.length-1]||t}}const e=t.split("/");if(e.length>=2){const t=e[0];let n=e[1];return e.length>=3&&["pending","fulfilled","rejected"].includes(e[e.length-1])&&(n=e.slice(1,-1).join("/")),{sliceName:t,actionName:n.toUpperCase()}}return{sliceName:null,actionName:t.toUpperCase()}}function formatPayloadPreview(t,e=40){if(void 0===t)return"";if(null===t)return"null";try{if("string"==typeof t)return t.length>e?`"${t.slice(0,e-3)}..."`:`"${t}"`;if("number"==typeof t||"boolean"==typeof t)return String(t);if(Array.isArray(t)){if(0===t.length)return"[]";const n=JSON.stringify(t);return n.length>e?`[${t.length} items]`:n}if("object"==typeof t){const n=Object.keys(t);if(0===n.length)return"{}";const i=JSON.stringify(t);return i.length<=e?i:`{ ${n.length} keys }`}return String(t).slice(0,e)}catch{return"[complex]"}}function getStateDiffSummary(t,e){if(t===e)return{summary:"no change",changedCount:0};if("object"!=typeof t||"object"!=typeof e||null===t||null===e)return{summary:"changed",changedCount:1};const n=Object.keys(t),i=Object.keys(e),s=i.filter(t=>!n.includes(t)).length,r=n.filter(t=>!i.includes(t)).length;let a=0;for(const s of n)i.includes(s)&&t[s]!==e[s]&&a++;const o=[];s>0&&o.push(`+${s}`),r>0&&o.push(`-${r}`),a>0&&o.push(`~${a}`);const c=s+r+a;return 0===o.length?{summary:"nested change",changedCount:1}:{summary:`${o.join(" ")} ${1===c?"key":"keys"}`,changedCount:c}}function extractMeta(t){const e=t.meta;if(e)return{requestId:e.requestId,requestStatus:e.requestStatus,arg:e.arg,rejectedWithValue:e.rejectedWithValue,aborted:e.aborted,condition:e.condition}}class ReduxActionStore{actions=[];listeners=new Set;maxActions=200;idCounter=0;isEnabled=!0;addAction(t,e,n,i){if(!this.isEnabled)return;const s=t.type||"";if(!s)return;const r=e!==n,a=getActionCategory(s),{sliceName:o,actionName:c}=parseActionType(s),u=extractMeta(t),l=formatPayloadPreview(t.payload),{summary:d,changedCount:h}=getStateDiffSummary(e,n),g=(i??0)>16,f={id:`${Date.now()}-${++this.idCounter}`,type:s,payload:t.payload,action:t,timestamp:Date.now(),prevState:e,nextState:n,duration:i,hasStateChange:r,category:a,sliceName:o,actionName:c,meta:u,error:t.error,payloadPreview:l,diffSummary:d,changedKeysCount:h,isSlowAction:g};this.actions=[f,...this.actions].slice(0,this.maxActions),this.notifyListeners()}getActions(){return[...this.actions]}getActionById(t){return this.actions.find(e=>e.id===t)}clearActions(){this.actions=[],this.notifyListeners()}setEnabled(t){this.isEnabled=t}getEnabled(){return this.isEnabled}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notifyListeners(){const t=this.getActions();this.listeners.forEach(e=>e(t))}setMaxActions(t){this.maxActions=t,this.actions.length>t&&(this.actions=this.actions.slice(0,t),this.notifyListeners())}getStats(){const t=this.actions.length,e=this.actions.filter(t=>t.hasStateChange).length,n=new Set(this.actions.map(t=>t.type)),i=this.actions.filter(t=>void 0!==t.duration).map(t=>t.duration),s=i.length>0?i.reduce((t,e)=>t+e,0)/i.length:0;return{totalActions:t,actionsWithChanges:e,actionsWithoutChanges:t-e,uniqueActionTypes:n.size,averageDuration:Math.round(100*s)/100}}filterActions(t){let e=[...this.actions];if(t.searchText){const n=t.searchText.toLowerCase();e=e.filter(t=>t.type.toLowerCase().includes(n))}return t.actionTypes&&t.actionTypes.length>0&&(e=e.filter(e=>t.actionTypes.includes(e.type))),t.onlyWithChanges&&(e=e.filter(t=>t.hasStateChange)),e}getUniqueActionTypes(){return Array.from(new Set(this.actions.map(t=>t.type))).sort()}getRelatedActions(t){return this.actions.filter(e=>e.meta?.requestId===t).sort((t,e)=>t.timestamp-e.timestamp)}getLinkedActions(t){return t.meta?.requestId?this.getRelatedActions(t.meta.requestId):[]}getLinkedActionsCount(t){return t.meta?.requestId?this.actions.filter(e=>e.meta?.requestId===t.meta?.requestId).length:0}getAsyncOperationDuration(t){const e=this.getRelatedActions(t);if(e.length<2)return null;const n=e.find(t=>"pending"===t.category),i=e.find(t=>"fulfilled"===t.category||"rejected"===t.category);return n&&i?i.timestamp-n.timestamp:null}getBaseActionType(t){const e=t.split("/");if(e.length>=2){const t=e[e.length-1];if(["pending","fulfilled","rejected"].includes(t))return e.slice(0,-1).join("/")}return t}getAsyncOperationIndex(t){const e=new Map;for(const t of this.actions)t.meta?.requestId&&!e.has(t.meta.requestId)&&e.set(t.meta.requestId,t.timestamp);const n=Array.from(e.entries()).sort((t,e)=>t[1]-e[1]).map(([t])=>t).indexOf(t);return n>=0?n+1:0}}export const reduxActionStore=new ReduxActionStore;
1
+ "use strict";
2
+
3
+ /**
4
+ * Redux action store - captures and stores Redux Toolkit actions
5
+ */
6
+
7
+ // ============================================
8
+ // Helper Functions for Enhanced Data
9
+ // ============================================
10
+
11
+ /**
12
+ * Get action category from type string
13
+ */
14
+ function getActionCategory(type) {
15
+ if (type.startsWith("@@")) return "internal";
16
+ if (type.includes("/pending")) return "pending";
17
+ if (type.includes("/fulfilled")) return "fulfilled";
18
+ if (type.includes("/rejected")) return "rejected";
19
+ if (type.includes("/executeQuery")) return "query";
20
+ if (type.includes("/executeMutation")) return "mutation";
21
+ return "action";
22
+ }
23
+
24
+ /**
25
+ * Parse action type to extract slice and action names
26
+ */
27
+ function parseActionType(type) {
28
+ // Handle internal actions
29
+ if (type.startsWith("@@")) {
30
+ const parts = type.split("/");
31
+ return {
32
+ sliceName: null,
33
+ actionName: parts[parts.length - 1] || type
34
+ };
35
+ }
36
+
37
+ // Handle RTK pattern: "sliceName/actionName" or "sliceName/actionName/status"
38
+ const parts = type.split("/");
39
+ if (parts.length >= 2) {
40
+ const sliceName = parts[0];
41
+ // For async thunks, action name might be "fetchUser/pending" -> we want "fetchUser"
42
+ let actionName = parts[1];
43
+
44
+ // If it's an async status, use the base action name
45
+ if (parts.length >= 3 && ["pending", "fulfilled", "rejected"].includes(parts[parts.length - 1])) {
46
+ actionName = parts.slice(1, -1).join("/");
47
+ }
48
+ return {
49
+ sliceName,
50
+ actionName: actionName.toUpperCase()
51
+ };
52
+ }
53
+ return {
54
+ sliceName: null,
55
+ actionName: type.toUpperCase()
56
+ };
57
+ }
58
+
59
+ /**
60
+ * Format payload preview for display
61
+ */
62
+ function formatPayloadPreview(payload, maxLength = 40) {
63
+ if (payload === undefined) return "";
64
+ if (payload === null) return "null";
65
+ try {
66
+ if (typeof payload === "string") {
67
+ return payload.length > maxLength ? `"${payload.slice(0, maxLength - 3)}..."` : `"${payload}"`;
68
+ }
69
+ if (typeof payload === "number" || typeof payload === "boolean") {
70
+ return String(payload);
71
+ }
72
+ if (Array.isArray(payload)) {
73
+ if (payload.length === 0) return "[]";
74
+ const preview = JSON.stringify(payload);
75
+ return preview.length > maxLength ? `[${payload.length} items]` : preview;
76
+ }
77
+ if (typeof payload === "object") {
78
+ const keys = Object.keys(payload);
79
+ if (keys.length === 0) return "{}";
80
+
81
+ // Try to create a meaningful preview
82
+ const preview = JSON.stringify(payload);
83
+ if (preview.length <= maxLength) return preview;
84
+
85
+ // Show key count
86
+ return `{ ${keys.length} keys }`;
87
+ }
88
+ return String(payload).slice(0, maxLength);
89
+ } catch {
90
+ return "[complex]";
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Calculate state diff summary
96
+ */
97
+ function getStateDiffSummary(prevState, nextState) {
98
+ if (prevState === nextState) {
99
+ return {
100
+ summary: "no change",
101
+ changedCount: 0
102
+ };
103
+ }
104
+
105
+ // Handle non-objects
106
+ if (typeof prevState !== "object" || typeof nextState !== "object" || prevState === null || nextState === null) {
107
+ return {
108
+ summary: "changed",
109
+ changedCount: 1
110
+ };
111
+ }
112
+ const prevKeys = Object.keys(prevState);
113
+ const nextKeys = Object.keys(nextState);
114
+ const added = nextKeys.filter(k => !prevKeys.includes(k)).length;
115
+ const removed = prevKeys.filter(k => !nextKeys.includes(k)).length;
116
+
117
+ // Check which existing keys changed
118
+ let changed = 0;
119
+ for (const key of prevKeys) {
120
+ if (nextKeys.includes(key) && prevState[key] !== nextState[key]) {
121
+ changed++;
122
+ }
123
+ }
124
+ const parts = [];
125
+ if (added > 0) parts.push(`+${added}`);
126
+ if (removed > 0) parts.push(`-${removed}`);
127
+ if (changed > 0) parts.push(`~${changed}`);
128
+ const totalChanged = added + removed + changed;
129
+ if (parts.length === 0) {
130
+ return {
131
+ summary: "nested change",
132
+ changedCount: 1
133
+ };
134
+ }
135
+ return {
136
+ summary: `${parts.join(" ")} ${totalChanged === 1 ? "key" : "keys"}`,
137
+ changedCount: totalChanged
138
+ };
139
+ }
140
+
141
+ /**
142
+ * Extract RTK async thunk metadata
143
+ */
144
+ function extractMeta(action) {
145
+ const meta = action.meta;
146
+ if (!meta) return undefined;
147
+ return {
148
+ requestId: meta.requestId,
149
+ requestStatus: meta.requestStatus,
150
+ arg: meta.arg,
151
+ rejectedWithValue: meta.rejectedWithValue,
152
+ aborted: meta.aborted,
153
+ condition: meta.condition
154
+ };
155
+ }
156
+
157
+ // ============================================
158
+ // Redux Action Store
159
+ // ============================================
160
+
161
+ class ReduxActionStore {
162
+ actions = [];
163
+ listeners = new Set();
164
+ clearListeners = new Set();
165
+ maxActions = 200;
166
+ idCounter = 0;
167
+ isEnabled = true;
168
+ captureSuppressed = false;
169
+ addAction(action, prevState, nextState, duration) {
170
+ if (!this.isEnabled || this.captureSuppressed) {
171
+ return;
172
+ }
173
+ const actionType = action.type || "";
174
+
175
+ // Skip actions without a proper type (e.g., thunk functions)
176
+ if (!actionType) {
177
+ return;
178
+ }
179
+ const hasStateChange = prevState !== nextState;
180
+
181
+ // Enhanced data extraction
182
+ const category = getActionCategory(actionType);
183
+ const {
184
+ sliceName,
185
+ actionName
186
+ } = parseActionType(actionType);
187
+ const meta = extractMeta(action);
188
+ const payloadPreview = formatPayloadPreview(action.payload);
189
+ const {
190
+ summary: diffSummary,
191
+ changedCount: changedKeysCount
192
+ } = getStateDiffSummary(prevState, nextState);
193
+ const isSlowAction = (duration ?? 0) > 16; // Frame budget
194
+
195
+ const reduxAction = {
196
+ id: `${Date.now()}-${++this.idCounter}`,
197
+ type: actionType,
198
+ payload: action.payload,
199
+ action,
200
+ timestamp: Date.now(),
201
+ prevState,
202
+ nextState,
203
+ duration,
204
+ hasStateChange,
205
+ // Enhanced fields
206
+ category,
207
+ sliceName,
208
+ actionName,
209
+ meta,
210
+ error: action.error,
211
+ payloadPreview,
212
+ diffSummary,
213
+ changedKeysCount,
214
+ isSlowAction
215
+ };
216
+ this.actions = [reduxAction, ...this.actions].slice(0, this.maxActions);
217
+ this.notifyListeners();
218
+ }
219
+ getActions() {
220
+ return [...this.actions];
221
+ }
222
+ getActionById(id) {
223
+ return this.actions.find(a => a.id === id);
224
+ }
225
+ clearActions() {
226
+ this.actions = [];
227
+ this.notifyListeners();
228
+ this.clearListeners.forEach(listener => {
229
+ try {
230
+ listener();
231
+ } catch {
232
+ // Ignore listener errors
233
+ }
234
+ });
235
+ }
236
+
237
+ /**
238
+ * Listen for clearActions() calls. Used in remote mirror mode to forward a
239
+ * clear performed in the dashboard UI to the synced device.
240
+ */
241
+ onClear(listener) {
242
+ this.clearListeners.add(listener);
243
+ return () => {
244
+ this.clearListeners.delete(listener);
245
+ };
246
+ }
247
+
248
+ // ============================================
249
+ // Remote Mirror Mode
250
+ // ============================================
251
+
252
+ /**
253
+ * Permanently suppress local capture. Use when this store acts as a mirror
254
+ * of a remote device's actions (e.g. the desktop dashboard): actions arrive
255
+ * via replaceActions() and local instrumentation must never record.
256
+ */
257
+ disableCapture() {
258
+ this.captureSuppressed = true;
259
+ }
260
+
261
+ /**
262
+ * Whether the store is in remote mirror mode (capture suppressed). The UI
263
+ * uses this to skip local-instrumentation affordances like the
264
+ * "react-redux not installed" banner.
265
+ */
266
+ isCaptureSuppressed() {
267
+ return this.captureSuppressed;
268
+ }
269
+
270
+ /**
271
+ * Replace the entire action list and notify listeners. Used in remote
272
+ * mirror mode where full snapshots arrive from a synced device. Respects
273
+ * the enabled flag so the UI's pause button freezes the mirror.
274
+ */
275
+ replaceActions(actions) {
276
+ if (!this.isEnabled) {
277
+ return;
278
+ }
279
+ this.actions = actions.slice(0, this.maxActions);
280
+ this.notifyListeners();
281
+ }
282
+ setEnabled(enabled) {
283
+ this.isEnabled = enabled;
284
+ }
285
+ getEnabled() {
286
+ return this.isEnabled;
287
+ }
288
+ subscribe(listener) {
289
+ this.listeners.add(listener);
290
+ return () => {
291
+ this.listeners.delete(listener);
292
+ };
293
+ }
294
+ notifyListeners() {
295
+ const actions = this.getActions();
296
+ this.listeners.forEach(listener => listener(actions));
297
+ }
298
+ setMaxActions(max) {
299
+ this.maxActions = max;
300
+ if (this.actions.length > max) {
301
+ this.actions = this.actions.slice(0, max);
302
+ this.notifyListeners();
303
+ }
304
+ }
305
+ getStats() {
306
+ const total = this.actions.length;
307
+ const withChanges = this.actions.filter(a => a.hasStateChange).length;
308
+ const actionTypes = new Set(this.actions.map(a => a.type));
309
+
310
+ // Calculate average duration
311
+ const durations = this.actions.filter(a => a.duration !== undefined).map(a => a.duration);
312
+ const avgDuration = durations.length > 0 ? durations.reduce((sum, d) => sum + d, 0) / durations.length : 0;
313
+ return {
314
+ totalActions: total,
315
+ actionsWithChanges: withChanges,
316
+ actionsWithoutChanges: total - withChanges,
317
+ uniqueActionTypes: actionTypes.size,
318
+ averageDuration: Math.round(avgDuration * 100) / 100
319
+ };
320
+ }
321
+ filterActions(filter) {
322
+ let filtered = [...this.actions];
323
+ if (filter.searchText) {
324
+ const search = filter.searchText.toLowerCase();
325
+ filtered = filtered.filter(a => a.type.toLowerCase().includes(search));
326
+ }
327
+ if (filter.actionTypes && filter.actionTypes.length > 0) {
328
+ filtered = filtered.filter(a => filter.actionTypes.includes(a.type));
329
+ }
330
+ if (filter.onlyWithChanges) {
331
+ filtered = filtered.filter(a => a.hasStateChange);
332
+ }
333
+ return filtered;
334
+ }
335
+ getUniqueActionTypes() {
336
+ return Array.from(new Set(this.actions.map(a => a.type))).sort();
337
+ }
338
+
339
+ /**
340
+ * Find related async actions by requestId
341
+ */
342
+ getRelatedActions(requestId) {
343
+ return this.actions.filter(a => a.meta?.requestId === requestId).sort((a, b) => a.timestamp - b.timestamp); // Sort chronologically
344
+ }
345
+
346
+ /**
347
+ * Get all actions that share a requestId with the given action
348
+ */
349
+ getLinkedActions(action) {
350
+ if (!action.meta?.requestId) return [];
351
+ return this.getRelatedActions(action.meta.requestId);
352
+ }
353
+
354
+ /**
355
+ * Get count of linked actions for a given action
356
+ */
357
+ getLinkedActionsCount(action) {
358
+ if (!action.meta?.requestId) return 0;
359
+ return this.actions.filter(a => a.meta?.requestId === action.meta?.requestId).length;
360
+ }
361
+
362
+ /**
363
+ * Calculate total duration for an async operation (pending to resolution)
364
+ */
365
+ getAsyncOperationDuration(requestId) {
366
+ const related = this.getRelatedActions(requestId);
367
+ if (related.length < 2) return null;
368
+ const pending = related.find(a => a.category === "pending");
369
+ const resolution = related.find(a => a.category === "fulfilled" || a.category === "rejected");
370
+ if (pending && resolution) {
371
+ return resolution.timestamp - pending.timestamp;
372
+ }
373
+ return null;
374
+ }
375
+
376
+ /**
377
+ * Get the base action type (without /pending, /fulfilled, /rejected suffix)
378
+ */
379
+ getBaseActionType(type) {
380
+ const parts = type.split("/");
381
+ if (parts.length >= 2) {
382
+ const lastPart = parts[parts.length - 1];
383
+ if (["pending", "fulfilled", "rejected"].includes(lastPart)) {
384
+ return parts.slice(0, -1).join("/");
385
+ }
386
+ }
387
+ return type;
388
+ }
389
+
390
+ /**
391
+ * Get sequential index for an async operation (1, 2, 3, etc.)
392
+ * Based on order of when pending actions first appeared
393
+ */
394
+ getAsyncOperationIndex(requestId) {
395
+ // Get all unique requestIds with their first timestamp
396
+ const requestIdTimestamps = new Map();
397
+ for (const action of this.actions) {
398
+ if (action.meta?.requestId && !requestIdTimestamps.has(action.meta.requestId)) {
399
+ requestIdTimestamps.set(action.meta.requestId, action.timestamp);
400
+ }
401
+ }
402
+
403
+ // Sort by timestamp (oldest first) and find index
404
+ const sortedIds = Array.from(requestIdTimestamps.entries()).sort((a, b) => a[1] - b[1]).map(([id]) => id);
405
+ const index = sortedIds.indexOf(requestId);
406
+ return index >= 0 ? index + 1 : 0;
407
+ }
408
+ }
409
+ export const reduxActionStore = new ReduxActionStore();
@@ -44,6 +44,7 @@ export { buoyReduxMiddleware, createBuoyReduxMiddleware, withBuoyDevTools, jumpT
44
44
  export { instrumentStore, uninstrumentStore, isStoreInstrumented, isAutoInstrumentActive, getActiveStore, } from "./redux/utils/autoInstrument";
45
45
  export type { AutoInstrumentOptions } from "./redux/utils/autoInstrument";
46
46
  export { createReduxHistoryAdapter, reduxHistoryAdapter, type ReduxHistoryAdapterOptions, } from "./redux/utils/createReduxHistoryAdapter";
47
+ export { reduxSyncAdapter } from "./redux/sync/reduxSyncAdapter";
47
48
  export { useReduxActions } from "./redux/hooks/useReduxActions";
48
49
  export type { UseReduxActionsResult } from "./redux/hooks/useReduxActions";
49
50
  export { useAutoInstrumentRedux, useReduxAvailability, } from "./redux/hooks/useAutoInstrumentRedux";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;qBAKT;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAKlC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE;IACxC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;;;;;qBAMoB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;EAWpC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxActionButton.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,aAAa,CAAC;AAEpD,UAAU,sBAAsB;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,QAAgB,GACjB,EAAE,sBAAsB,+BAwCxB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxActionDetailContent.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionDetailContent.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAQ5C,UAAU,6BAA6B;IACrC,qCAAqC;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,iCAAiC;IACjC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,qCAAqC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iDAAiD;IACjD,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAwDD,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,qBAA6B,GAC9B,EAAE,6BAA6B,+BA0M/B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,GACd,EAAE;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,sCAiBA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxActionDetailView.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionDetailView.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAWH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,UAAU,0BAA0B;IAClC,MAAM,EAAE,WAAW,CAAC;CACrB;AAID,wBAAgB,qBAAqB,CAAC,EAAE,MAAM,EAAE,EAAE,0BAA0B,+BAkH3E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxActionInfoView.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionInfoView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAkB/E,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAK5D,UAAU,wBAAwB;IAChC,MAAM,EAAE,WAAW,CAAC;IACpB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACpD;AAoID,eAAO,MAAM,mBAAmB,sDAqb9B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxActionItem.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionItem.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAG5D,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC;AA+JD,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,oBAAoB,+BAmGxE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxDetailViewToggle.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxDetailViewToggle.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAe,MAAM,OAAO,CAAC;AAIpC,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAW9D,UAAU,0BAA0B;IAClC,UAAU,EAAE,mBAAmB,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AA0BD,eAAO,MAAM,qBAAqB,wDA8DhC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxIcon.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReduxModal.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2CH,yCAAyC;AACzC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAgBD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,GACpC,EAAE,eAAe,sCA4XjB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoInstrumentRedux.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/useAutoInstrumentRedux.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AAyBjC,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,cAAc,EAAE,OAAO,CAAC;IACxB,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;IACnB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,uCAAuC;IACvC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qCAAqC;IACrC,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,oCAAoC;IACpC,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,0CAA0C;IAC1C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAMD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,6BAAkC,GAC1C,4BAA4B,CA2G9B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CA0BA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReduxActions.d.ts","sourceRoot":"","sources":["../../../../src/redux/hooks/useReduxActions.ts"],"names":[],"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cAAc,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Sync adapter for the redux tool, consumed by @buoy-gg/external-sync's
3
+ * `useExternalSync` (structurally matches its ToolSyncAdapter interface so
4
+ * this package doesn't need a dependency on it).
5
+ *
6
+ * Actions are captured by the auto-instrumentation middleware (installed when
7
+ * FloatingDevTools mounts), independent of whether a dashboard is watching —
8
+ * subscribing here only streams what the store already records.
9
+ */
10
+ export declare const reduxSyncAdapter: {
11
+ version: number;
12
+ getSnapshot: () => import("..").ReduxAction[];
13
+ subscribe: (onChange: () => void) => () => void;
14
+ actions: {
15
+ clearEvents: () => void;
16
+ };
17
+ };
18
+ //# sourceMappingURL=reduxSyncAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduxSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/redux/sync/reduxSyncAdapter.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;0BAGL,MAAM,IAAI;;;;CAMjC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,GACP,UAAU,GACV,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IACrD,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EA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AAmB,IAAI,OAAO,CAE7C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buoyReduxMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/redux/utils/buoyReduxMiddleware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAU3D;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAMD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AACzD,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAiBzD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAMhD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAOxD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAWnE;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,UA0BjC,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,0BAA+B,GACvC,UAAU,CAoCZ"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createReduxHistoryAdapter.d.ts","sourceRoot":"","sources":["../../../../src/redux/utils/createReduxHistoryAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAgD5B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,4BAA4B;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,CAAC,EAAE,0BAA0B,GACnC,cAAc,CAsFhB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yBAA8B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,GACjC,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -5,13 +5,38 @@ import type { ReduxAction, ReduxFilter } from "../types";
5
5
  declare class ReduxActionStore {
6
6
  private actions;
7
7
  private listeners;
8
+ private clearListeners;
8
9
  private maxActions;
9
10
  private idCounter;
10
11
  private isEnabled;
12
+ private captureSuppressed;
11
13
  addAction(action: Record<string, unknown>, prevState: unknown, nextState: unknown, duration?: number): void;
12
14
  getActions(): ReduxAction[];
13
15
  getActionById(id: string): ReduxAction | undefined;
14
16
  clearActions(): void;
17
+ /**
18
+ * Listen for clearActions() calls. Used in remote mirror mode to forward a
19
+ * clear performed in the dashboard UI to the synced device.
20
+ */
21
+ onClear(listener: () => void): () => void;
22
+ /**
23
+ * Permanently suppress local capture. Use when this store acts as a mirror
24
+ * of a remote device's actions (e.g. the desktop dashboard): actions arrive
25
+ * via replaceActions() and local instrumentation must never record.
26
+ */
27
+ disableCapture(): void;
28
+ /**
29
+ * Whether the store is in remote mirror mode (capture suppressed). The UI
30
+ * uses this to skip local-instrumentation affordances like the
31
+ * "react-redux not installed" banner.
32
+ */
33
+ isCaptureSuppressed(): boolean;
34
+ /**
35
+ * Replace the entire action list and notify listeners. Used in remote
36
+ * mirror mode where full snapshots arrive from a synced device. Respects
37
+ * the enabled flag so the UI's pause button freezes the mirror.
38
+ */
39
+ replaceActions(actions: ReduxAction[]): void;
15
40
  setEnabled(enabled: boolean): void;
16
41
  getEnabled(): boolean;
17
42
  subscribe(listener: (actions: ReduxAction[]) => void): () => void;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reduxActionStore.d.ts","sourceRoot":"","sources":["../../../../src/redux/utils/reduxActionStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAA8B,MAAM,UAAU,CAAC;AAiLrF,cAAM,gBAAgB;IACpB,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,SAAS,CAAoD;IACrE,OAAO,CAAC,cAAc,CAA8B;IACpD,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,iBAAiB,CAAS;IAElC,SAAS,CACP,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,IAAI;IAmDP,UAAU,IAAI,WAAW,EAAE;IAI3B,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIlD,YAAY,IAAI,IAAI;IAYpB;;;OAGG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAWzC;;;;OAIG;IACH,cAAc,IAAI,IAAI;IAItB;;;;OAIG;IACH,mBAAmB,IAAI,OAAO;IAI9B;;;;OAIG;IACH,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI;IAQ5C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIlC,UAAU,IAAI,OAAO;IAIrB,SAAS,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI;IAOjE,OAAO,CAAC,eAAe;IAKvB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQhC,QAAQ;;;;;;;IAuBR,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;IAmBjD,oBAAoB,IAAI,MAAM,EAAE;IAIhC;;OAEG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE;IAMnD;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;IAKpD;;OAEG;IACH,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAOlD;;OAEG;IACH,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAe3D;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAWvC;;;OAGG;IACH,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAkBlD;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/redux",
3
- "version": "2.1.16",
3
+ "version": "3.0.0",
4
4
  "description": "Redux Toolkit DevTools for React Native",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -26,9 +26,9 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@buoy-gg/shared-ui": "2.2.0",
30
- "@buoy-gg/floating-tools-core": "2.2.0",
31
- "@buoy-gg/license": "2.1.16"
29
+ "@buoy-gg/shared-ui": "3.0.0",
30
+ "@buoy-gg/floating-tools-core": "3.0.0",
31
+ "@buoy-gg/license": "3.0.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@reduxjs/toolkit": ">=2.0.0",