@buoy-gg/redux 7.0.41 → 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.
Files changed (78) hide show
  1. package/README.md +11 -106
  2. package/lib/commonjs/index.js +1 -256
  3. package/lib/commonjs/preset.js +1 -90
  4. package/lib/commonjs/redux/components/ReduxActionButton.js +1 -131
  5. package/lib/commonjs/redux/components/ReduxActionDetailContent.js +1 -437
  6. package/lib/commonjs/redux/components/ReduxActionDetailView.js +1 -401
  7. package/lib/commonjs/redux/components/ReduxActionInfoView.js +1 -836
  8. package/lib/commonjs/redux/components/ReduxActionItem.js +1 -337
  9. package/lib/commonjs/redux/components/ReduxAutoInstrument.js +1 -20
  10. package/lib/commonjs/redux/components/ReduxDetailViewToggle.js +1 -50
  11. package/lib/commonjs/redux/components/ReduxIcon.js +1 -18
  12. package/lib/commonjs/redux/components/ReduxModal.js +1 -703
  13. package/lib/commonjs/redux/hooks/reduxPeer.js +1 -17
  14. package/lib/commonjs/redux/hooks/reduxPeer.web.js +1 -10
  15. package/lib/commonjs/redux/hooks/useAutoInstrumentRedux.js +1 -177
  16. package/lib/commonjs/redux/hooks/useReduxActions.js +1 -58
  17. package/lib/commonjs/redux/sync/reduxSyncAdapter.js +1 -191
  18. package/lib/commonjs/redux/types/index.js +1 -1
  19. package/lib/commonjs/redux/utils/activeStoreRegistry.js +1 -104
  20. package/lib/commonjs/redux/utils/autoInstrument.js +1 -231
  21. package/lib/commonjs/redux/utils/buoyReduxMiddleware.js +1 -202
  22. package/lib/commonjs/redux/utils/createReduxHistoryAdapter.js +1 -146
  23. package/lib/commonjs/redux/utils/devtoolsHook.js +1 -152
  24. package/lib/commonjs/redux/utils/reduxActionStore.js +1 -473
  25. package/lib/commonjs/redux/utils/snapshotProvider.js +1 -158
  26. package/lib/commonjs/redux/utils/testIDs.js +1 -75
  27. package/lib/module/index.js +1 -125
  28. package/lib/module/preset.js +1 -87
  29. package/lib/module/redux/components/ReduxActionButton.js +1 -128
  30. package/lib/module/redux/components/ReduxActionDetailContent.js +1 -433
  31. package/lib/module/redux/components/ReduxActionDetailView.js +1 -397
  32. package/lib/module/redux/components/ReduxActionInfoView.js +1 -831
  33. package/lib/module/redux/components/ReduxActionItem.js +1 -333
  34. package/lib/module/redux/components/ReduxAutoInstrument.js +1 -17
  35. package/lib/module/redux/components/ReduxDetailViewToggle.js +1 -45
  36. package/lib/module/redux/components/ReduxIcon.js +1 -8
  37. package/lib/module/redux/components/ReduxModal.js +1 -698
  38. package/lib/module/redux/hooks/reduxPeer.js +1 -13
  39. package/lib/module/redux/hooks/reduxPeer.web.js +1 -6
  40. package/lib/module/redux/hooks/useAutoInstrumentRedux.js +1 -173
  41. package/lib/module/redux/hooks/useReduxActions.js +1 -54
  42. package/lib/module/redux/sync/reduxSyncAdapter.js +1 -188
  43. package/lib/module/redux/types/index.js +1 -1
  44. package/lib/module/redux/utils/activeStoreRegistry.js +1 -92
  45. package/lib/module/redux/utils/autoInstrument.js +1 -201
  46. package/lib/module/redux/utils/buoyReduxMiddleware.js +1 -188
  47. package/lib/module/redux/utils/createReduxHistoryAdapter.js +1 -142
  48. package/lib/module/redux/utils/devtoolsHook.js +1 -145
  49. package/lib/module/redux/utils/reduxActionStore.js +1 -465
  50. package/lib/module/redux/utils/snapshotProvider.js +1 -157
  51. package/lib/module/redux/utils/testIDs.js +1 -68
  52. package/lib/web/index.mjs +1 -2
  53. package/package.json +4 -4
  54. package/lib/typescript/index.d.ts.map +0 -1
  55. package/lib/typescript/preset.d.ts.map +0 -1
  56. package/lib/typescript/redux/components/ReduxActionButton.d.ts.map +0 -1
  57. package/lib/typescript/redux/components/ReduxActionDetailContent.d.ts.map +0 -1
  58. package/lib/typescript/redux/components/ReduxActionDetailView.d.ts.map +0 -1
  59. package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +0 -1
  60. package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +0 -1
  61. package/lib/typescript/redux/components/ReduxAutoInstrument.d.ts.map +0 -1
  62. package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +0 -1
  63. package/lib/typescript/redux/components/ReduxIcon.d.ts.map +0 -1
  64. package/lib/typescript/redux/components/ReduxModal.d.ts.map +0 -1
  65. package/lib/typescript/redux/hooks/reduxPeer.d.ts.map +0 -1
  66. package/lib/typescript/redux/hooks/reduxPeer.web.d.ts.map +0 -1
  67. package/lib/typescript/redux/hooks/useAutoInstrumentRedux.d.ts.map +0 -1
  68. package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +0 -1
  69. package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts.map +0 -1
  70. package/lib/typescript/redux/types/index.d.ts.map +0 -1
  71. package/lib/typescript/redux/utils/activeStoreRegistry.d.ts.map +0 -1
  72. package/lib/typescript/redux/utils/autoInstrument.d.ts.map +0 -1
  73. package/lib/typescript/redux/utils/buoyReduxMiddleware.d.ts.map +0 -1
  74. package/lib/typescript/redux/utils/createReduxHistoryAdapter.d.ts.map +0 -1
  75. package/lib/typescript/redux/utils/devtoolsHook.d.ts.map +0 -1
  76. package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +0 -1
  77. package/lib/typescript/redux/utils/snapshotProvider.d.ts.map +0 -1
  78. package/lib/typescript/redux/utils/testIDs.d.ts.map +0 -1
@@ -1,836 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ReduxActionInfoView = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _sharedUi = require("@buoy-gg/shared-ui");
10
- var _license = require("@buoy-gg/license");
11
- var _dataViewer = require("@buoy-gg/shared-ui/dataViewer");
12
- var _reduxActionStore = require("../utils/reduxActionStore");
13
- var _buoyReduxMiddleware = require("../utils/buoyReduxMiddleware");
14
- var _ReduxActionButton = require("./ReduxActionButton");
15
- var _testIDs = require("../utils/testIDs");
16
- var _jsxRuntime = require("react/jsx-runtime");
17
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
- /**
19
- * ReduxActionInfoView
20
- *
21
- * Displays comprehensive action information including:
22
- * - Action metadata (type, slice, category, duration)
23
- * - Payload data
24
- * - Async thunk metadata (requestId, status, arg)
25
- * - Error details for rejected actions
26
- */
27
-
28
- /**
29
- * Get category display info
30
- */
31
- function getCategoryInfo(category) {
32
- switch (category) {
33
- case "pending":
34
- return {
35
- label: "PENDING",
36
- color: _sharedUi.buoyColors.warning,
37
- bgColor: _sharedUi.buoyColors.warning + "26"
38
- };
39
- case "fulfilled":
40
- return {
41
- label: "FULFILLED",
42
- color: _sharedUi.buoyColors.success,
43
- bgColor: _sharedUi.buoyColors.success + "26"
44
- };
45
- case "rejected":
46
- return {
47
- label: "REJECTED",
48
- color: _sharedUi.buoyColors.error,
49
- bgColor: _sharedUi.buoyColors.error + "26"
50
- };
51
- case "internal":
52
- return {
53
- label: "INTERNAL",
54
- color: _sharedUi.buoyColors.textMuted,
55
- bgColor: _sharedUi.buoyColors.textMuted + "26"
56
- };
57
- case "query":
58
- return {
59
- label: "QUERY",
60
- color: _sharedUi.buoyColors.info,
61
- bgColor: _sharedUi.buoyColors.info + "26"
62
- };
63
- case "mutation":
64
- return {
65
- label: "MUTATION",
66
- color: _sharedUi.buoyColors.info,
67
- bgColor: _sharedUi.buoyColors.info + "26"
68
- };
69
- default:
70
- return {
71
- label: "ACTION",
72
- color: _sharedUi.buoyColors.info,
73
- bgColor: _sharedUi.buoyColors.info + "26"
74
- };
75
- }
76
- }
77
-
78
- /**
79
- * Format duration for display
80
- */
81
- function formatDuration(duration) {
82
- if (duration === undefined) return "N/A";
83
- if (duration < 1) return "<1ms";
84
- return `${duration.toFixed(1)}ms`;
85
- }
86
-
87
- /**
88
- * Section header component - matches React Query DevTools styling
89
- */
90
- function SectionHeader({
91
- icon: Icon,
92
- title,
93
- badge,
94
- testID
95
- }) {
96
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
97
- style: styles.sectionHeader,
98
- testID: testID,
99
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
100
- style: styles.sectionHeaderLeft,
101
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
102
- size: 14,
103
- color: _sharedUi.night.color.accent
104
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
105
- style: styles.sectionTitle,
106
- children: title
107
- })]
108
- }), badge]
109
- });
110
- }
111
-
112
- /**
113
- * Format timestamp for display
114
- */
115
- function formatTime(timestamp) {
116
- const date = new Date(timestamp);
117
- const hours = date.getHours().toString().padStart(2, "0");
118
- const minutes = date.getMinutes().toString().padStart(2, "0");
119
- const seconds = date.getSeconds().toString().padStart(2, "0");
120
- const ms = date.getMilliseconds().toString().padStart(3, "0");
121
- return `${hours}:${minutes}:${seconds}.${ms}`;
122
- }
123
- const ReduxActionInfoView = exports.ReduxActionInfoView = /*#__PURE__*/(0, _react.memo)(function ReduxActionInfoView({
124
- action,
125
- onNavigateToAction
126
- }) {
127
- const isPro = (0, _license.useIsPro)();
128
- const [showProModal, setShowProModal] = (0, _react.useState)(false);
129
-
130
- // Auto-close modal when user becomes Pro
131
- (0, _react.useEffect)(() => {
132
- if (showProModal && isPro) {
133
- setShowProModal(false);
134
- }
135
- }, [showProModal, isPro]);
136
- const categoryInfo = getCategoryInfo(action.category);
137
- // Time travel needs a REAL tree. The store releases raw state for older
138
- // actions (see ReduxActionDetailContent), and `jumpToState` refuses the
139
- // sentinel — but it refused into a console warning, so from the screen the
140
- // button simply did nothing at all. A disabled button that says why is the
141
- // difference between a limit and a bug.
142
- const stateEvicted = (0, _reduxActionStore.isEvictedState)(action.nextState);
143
- // Whether this app wired time travel at all. Capture and time travel are
144
- // separate: an app can be fully captured through `buoyReduxMiddleware` and
145
- // still have no reducer that answers a jump, in which case the press
146
- // dispatched, was ignored, and left the screen exactly as it was.
147
- const canTimeTravel = (0, _buoyReduxMiddleware.isTimeTravelAvailable)();
148
- const jumpDisabled = stateEvicted || !canTimeTravel;
149
- const hasPayload = action.payload !== undefined;
150
- const hasMeta = action.meta && Object.keys(action.meta).length > 0;
151
- const hasError = action.error !== undefined;
152
-
153
- // Get related async actions
154
- const relatedActions = (0, _react.useMemo)(() => {
155
- return _reduxActionStore.reduxActionStore.getLinkedActions(action);
156
- }, [action]);
157
- const hasRelatedActions = relatedActions.length > 1;
158
- const baseActionType = hasRelatedActions ? _reduxActionStore.reduxActionStore.getBaseActionType(action.type) : null;
159
- const totalDuration = action.meta?.requestId ? _reduxActionStore.reduxActionStore.getAsyncOperationDuration(action.meta.requestId) : null;
160
-
161
- // Action handlers - copy requires Pro
162
- const handleCopyAction = (0, _react.useCallback)(async () => {
163
- if (!isPro) {
164
- setShowProModal(true);
165
- return;
166
- }
167
- await (0, _sharedUi.copyToClipboard)(action.action);
168
- }, [action, isPro]);
169
- const handleCopyPayload = (0, _react.useCallback)(async () => {
170
- if (!isPro) {
171
- setShowProModal(true);
172
- return;
173
- }
174
- await (0, _sharedUi.copyToClipboard)(action.payload);
175
- }, [action.payload, isPro]);
176
- const handleReplay = (0, _react.useCallback)(() => {
177
- // Replay the original action
178
- if (action.action && typeof action.action === "object" && "type" in action.action) {
179
- (0, _buoyReduxMiddleware.replayAction)(action.action);
180
- }
181
- }, [action]);
182
- const handleJump = (0, _react.useCallback)(() => {
183
- // Jump to the state after this action was applied
184
- if (action.nextState !== undefined) {
185
- (0, _buoyReduxMiddleware.jumpToState)(action.nextState);
186
- }
187
- }, [action]);
188
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
189
- testID: `${_testIDs.REDUX_TEST_ID}-detail-scroll`,
190
- style: styles.container,
191
- contentContainerStyle: styles.contentContainer,
192
- showsVerticalScrollIndicator: false,
193
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
194
- style: styles.card,
195
- testID: `${_testIDs.REDUX_TEST_ID}-info-card`,
196
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
197
- icon: _sharedUi.Info,
198
- title: "ACTION INFO"
199
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
200
- style: styles.cardContent,
201
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
202
- label: "Type",
203
- value: action.type,
204
- mono: true,
205
- testID: `${_testIDs.REDUX_TEST_ID}-info-type`
206
- }), action.sliceName && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
207
- label: "Slice",
208
- value: action.sliceName,
209
- mono: true,
210
- testID: `${_testIDs.REDUX_TEST_ID}-info-slice`
211
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
212
- label: "Action",
213
- value: action.actionName,
214
- mono: true,
215
- testID: `${_testIDs.REDUX_TEST_ID}-info-action`
216
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
217
- style: styles.badgeRow,
218
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
219
- style: [styles.categoryBadge, {
220
- backgroundColor: categoryInfo.bgColor
221
- }],
222
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
223
- style: [styles.categoryText, {
224
- color: categoryInfo.color
225
- }],
226
- testID: `${_testIDs.REDUX_TEST_ID}-info-category`,
227
- children: categoryInfo.label
228
- })
229
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
230
- style: [styles.durationBadge, action.isSlowAction && styles.durationBadgeSlow],
231
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Clock, {
232
- size: 10,
233
- color: action.isSlowAction ? _sharedUi.buoyColors.error : _sharedUi.night.color.textSecondary
234
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
235
- style: [styles.durationText, action.isSlowAction && styles.durationTextSlow],
236
- testID: `${_testIDs.REDUX_TEST_ID}-info-duration`,
237
- children: formatDuration(action.duration)
238
- }), action.isSlowAction && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
239
- size: 10,
240
- color: _sharedUi.buoyColors.error
241
- })]
242
- }), action.hasStateChange ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
243
- style: styles.changesBadge,
244
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Zap, {
245
- size: 10,
246
- color: _sharedUi.buoyColors.success
247
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
248
- style: styles.changesText,
249
- testID: `${_testIDs.REDUX_TEST_ID}-info-changes`,
250
- children: action.diffSummary || "changed"
251
- })]
252
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
253
- style: styles.noChangesBadge,
254
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
255
- style: styles.noChangesText,
256
- testID: `${_testIDs.REDUX_TEST_ID}-info-no-changes`,
257
- children: "no change"
258
- })
259
- })]
260
- })]
261
- })]
262
- }), hasRelatedActions && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
263
- style: styles.card,
264
- testID: `${_testIDs.REDUX_TEST_ID}-async-card`,
265
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
266
- icon: _sharedUi.Hash,
267
- title: "ASYNC FLOW",
268
- badge: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
269
- style: styles.asyncBadge,
270
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
271
- style: styles.asyncBadgeText,
272
- testID: `${_testIDs.REDUX_TEST_ID}-async-count`,
273
- children: [relatedActions.length, " ACTIONS"]
274
- })
275
- })
276
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
277
- style: styles.cardContent,
278
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
279
- style: styles.baseActionType,
280
- testID: `${_testIDs.REDUX_TEST_ID}-async-base`,
281
- children: baseActionType
282
- }), totalDuration !== null && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
283
- style: styles.totalDurationRow,
284
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
285
- style: styles.totalDurationLabel,
286
- children: "Total Duration"
287
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
288
- style: styles.totalDurationValue,
289
- testID: `${_testIDs.REDUX_TEST_ID}-async-total`,
290
- children: [totalDuration, "ms"]
291
- })]
292
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
293
- style: styles.timeline,
294
- children: relatedActions.map((relatedAction, index) => {
295
- const relatedCategoryInfo = getCategoryInfo(relatedAction.category);
296
- const isCurrent = relatedAction.id === action.id;
297
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
298
- style: [styles.timelineItem, isCurrent && styles.timelineItemCurrent],
299
- onPress: () => onNavigateToAction?.(relatedAction),
300
- disabled: isCurrent || !onNavigateToAction,
301
- activeOpacity: 0.7,
302
- testID: `${_testIDs.REDUX_TEST_ID}-async-step-${index}`,
303
- children: [index < relatedActions.length - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
304
- style: styles.timelineConnector
305
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
306
- style: [styles.timelineDot, {
307
- backgroundColor: relatedCategoryInfo.color
308
- }]
309
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
310
- style: styles.timelineContent,
311
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
312
- style: styles.timelineHeader,
313
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
314
- style: [styles.timelineStatusBadge, {
315
- backgroundColor: relatedCategoryInfo.bgColor
316
- }],
317
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
318
- style: [styles.timelineStatusText, {
319
- color: relatedCategoryInfo.color
320
- }],
321
- testID: `${_testIDs.REDUX_TEST_ID}-async-step-${index}-status`,
322
- children: relatedCategoryInfo.label
323
- })
324
- }), isCurrent && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
325
- style: styles.currentBadge,
326
- testID: `${_testIDs.REDUX_TEST_ID}-async-step-${index}-current`,
327
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
328
- style: styles.currentBadgeText,
329
- children: "CURRENT"
330
- })
331
- })]
332
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
333
- style: styles.timelineTime,
334
- children: formatTime(relatedAction.timestamp)
335
- })]
336
- })]
337
- }, relatedAction.id);
338
- })
339
- })]
340
- })]
341
- }), hasPayload && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
342
- style: styles.card,
343
- testID: `${_testIDs.REDUX_TEST_ID}-payload-card`,
344
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
345
- icon: _sharedUi.Box,
346
- title: "PAYLOAD",
347
- badge: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
348
- style: styles.typeBadge,
349
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
350
- style: styles.typeText,
351
- children: Array.isArray(action.payload) ? "ARRAY" : typeof action.payload === "object" ? "OBJECT" : typeof action.payload?.toString().toUpperCase()
352
- })
353
- })
354
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
355
- style: styles.dataViewerContainer,
356
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.DataViewer, {
357
- title: "",
358
- data: (0, _sharedUi.parseValue)(action.payload),
359
- showTypeFilter: true,
360
- rawMode: true,
361
- initialExpanded: true
362
- })
363
- })]
364
- }), hasMeta && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
365
- style: styles.card,
366
- testID: `${_testIDs.REDUX_TEST_ID}-meta-card`,
367
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
368
- icon: _sharedUi.Hash,
369
- title: "ASYNC METADATA",
370
- badge: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
371
- style: [styles.categoryBadge, {
372
- backgroundColor: categoryInfo.bgColor
373
- }],
374
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
375
- style: [styles.categoryText, {
376
- color: categoryInfo.color
377
- }],
378
- children: "RTK THUNK"
379
- })
380
- })
381
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
382
- style: styles.cardContent,
383
- children: [action.meta?.requestId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
384
- label: "Request ID",
385
- value: action.meta.requestId,
386
- mono: true
387
- }), action.meta?.requestStatus && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
388
- label: "Status",
389
- value: action.meta.requestStatus.toUpperCase(),
390
- valueColor: categoryInfo.color,
391
- testID: `${_testIDs.REDUX_TEST_ID}-meta-status`
392
- }), action.meta?.arg !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
393
- style: styles.argSection,
394
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
395
- style: styles.argLabel,
396
- children: "Original Argument"
397
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
398
- style: styles.argValueContainer,
399
- children: typeof action.meta.arg === "object" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.DataViewer, {
400
- title: "",
401
- data: (0, _sharedUi.parseValue)(action.meta.arg),
402
- showTypeFilter: true,
403
- rawMode: true,
404
- initialExpanded: true
405
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
406
- style: styles.argValue,
407
- children: JSON.stringify(action.meta.arg)
408
- })
409
- })]
410
- }), action.meta?.rejectedWithValue && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
411
- label: "Rejected With Value",
412
- value: "true",
413
- valueColor: _sharedUi.buoyColors.error
414
- }), action.meta?.aborted && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
415
- label: "Aborted",
416
- value: "true",
417
- valueColor: _sharedUi.buoyColors.warning
418
- }), action.meta?.condition && /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.InfoRow, {
419
- label: "Condition",
420
- value: "true",
421
- valueColor: _sharedUi.night.color.textTertiary
422
- })]
423
- })]
424
- }), hasError && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
425
- style: [styles.card, styles.errorCard],
426
- testID: `${_testIDs.REDUX_TEST_ID}-error-card`,
427
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
428
- icon: _sharedUi.AlertCircle,
429
- title: "ERROR",
430
- badge: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
431
- style: styles.errorBadge,
432
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
433
- style: styles.errorBadgeText,
434
- testID: `${_testIDs.REDUX_TEST_ID}-error-badge`,
435
- children: "REJECTED"
436
- })
437
- })
438
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
439
- style: styles.dataViewerContainer,
440
- children: typeof action.error === "object" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.DataViewer, {
441
- title: "",
442
- data: (0, _sharedUi.parseValue)(action.error),
443
- showTypeFilter: true,
444
- rawMode: true,
445
- initialExpanded: true
446
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
447
- style: styles.errorText,
448
- children: String(action.error)
449
- })
450
- })]
451
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
452
- style: styles.card,
453
- testID: `${_testIDs.REDUX_TEST_ID}-full-action-card`,
454
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SectionHeader, {
455
- icon: _sharedUi.FileText,
456
- title: "FULL ACTION OBJECT"
457
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
458
- style: styles.dataViewerContainer,
459
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.DataViewer, {
460
- title: "",
461
- data: (0, _sharedUi.parseValue)(action.action),
462
- showTypeFilter: true,
463
- rawMode: true,
464
- initialExpanded: true
465
- })
466
- })]
467
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
468
- style: styles.actionFooter,
469
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
470
- style: styles.actionsGrid,
471
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
472
- style: styles.actionButtonWrapper,
473
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton, {
474
- type: "replay",
475
- text: "REPLAY",
476
- onPress: handleReplay,
477
- testID: `${_testIDs.REDUX_TEST_ID}-replay`
478
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
479
- style: styles.actionDescription,
480
- children: "Dispatch again"
481
- })]
482
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
483
- style: styles.actionButtonWrapper,
484
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton, {
485
- type: "jump",
486
- text: "JUMP",
487
- onPress: handleJump,
488
- disabled: jumpDisabled,
489
- testID: `${_testIDs.REDUX_TEST_ID}-jump`
490
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
491
- style: styles.actionDescription,
492
- testID: `${_testIDs.REDUX_TEST_ID}-jump-description`,
493
- children: stateEvicted ? "State not retained" : canTimeTravel ? "Restore this state" : "Time travel not wired"
494
- })]
495
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
496
- style: styles.actionButtonWrapper,
497
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton, {
498
- type: "copy",
499
- text: "COPY ACTION",
500
- onPress: handleCopyAction,
501
- testID: `${_testIDs.REDUX_TEST_ID}-copy-action`
502
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
503
- style: styles.actionDescription,
504
- children: isPro ? "Copy to clipboard" : "Pro feature"
505
- })]
506
- }), hasPayload && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
507
- style: styles.actionButtonWrapper,
508
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton, {
509
- type: "copy",
510
- text: "COPY PAYLOAD",
511
- onPress: handleCopyPayload,
512
- testID: `${_testIDs.REDUX_TEST_ID}-copy-payload`
513
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
514
- style: styles.actionDescription,
515
- children: isPro ? "Copy payload only" : "Pro feature"
516
- })]
517
- })]
518
- })
519
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ProUpgradeModal, {
520
- visible: showProModal,
521
- onClose: () => setShowProModal(false),
522
- featureName: "Copy"
523
- })]
524
- });
525
- });
526
- const styles = _reactNative.StyleSheet.create({
527
- container: {
528
- flex: 1
529
- },
530
- contentContainer: {
531
- padding: 8,
532
- paddingBottom: 100,
533
- gap: 16
534
- },
535
- // Card styling - matches React Query DevTools
536
- card: {
537
- backgroundColor: _sharedUi.night.color.surface,
538
- borderRadius: 6,
539
- borderWidth: 1,
540
- borderColor: _sharedUi.night.color.accent + "4D",
541
- overflow: "hidden",
542
- shadowColor: _sharedUi.night.color.accent,
543
- shadowOffset: {
544
- width: 0,
545
- height: 0
546
- },
547
- shadowOpacity: 0.1,
548
- shadowRadius: 6
549
- },
550
- errorCard: {
551
- borderColor: _sharedUi.buoyColors.error + "4D",
552
- shadowColor: _sharedUi.buoyColors.error
553
- },
554
- // Section header - green tinted like React Query
555
- sectionHeader: {
556
- flexDirection: "row",
557
- alignItems: "center",
558
- justifyContent: "space-between",
559
- paddingHorizontal: 12,
560
- paddingVertical: 10,
561
- borderBottomWidth: 1,
562
- borderBottomColor: _sharedUi.night.color.accent + "33",
563
- backgroundColor: _sharedUi.night.color.accent + "15"
564
- },
565
- sectionHeaderLeft: {
566
- flexDirection: "row",
567
- alignItems: "center",
568
- gap: 6
569
- },
570
- sectionTitle: {
571
- fontSize: 12,
572
- fontWeight: "600",
573
- letterSpacing: 0.5,
574
- color: _sharedUi.night.color.accent,
575
- fontFamily: _sharedUi.monoFont
576
- },
577
- cardContent: {
578
- padding: 14,
579
- gap: 10
580
- },
581
- badgeRow: {
582
- flexDirection: "row",
583
- flexWrap: "wrap",
584
- gap: 8,
585
- marginTop: 6
586
- },
587
- categoryBadge: {
588
- paddingHorizontal: 8,
589
- paddingVertical: 3,
590
- borderRadius: 4
591
- },
592
- categoryText: {
593
- fontSize: 9,
594
- fontWeight: "700",
595
- letterSpacing: 0.3
596
- },
597
- durationBadge: {
598
- flexDirection: "row",
599
- alignItems: "center",
600
- gap: 4,
601
- paddingHorizontal: 8,
602
- paddingVertical: 3,
603
- borderRadius: 4,
604
- backgroundColor: _sharedUi.night.color.surfaceElevated
605
- },
606
- durationBadgeSlow: {
607
- backgroundColor: _sharedUi.buoyColors.error + "26"
608
- },
609
- durationText: {
610
- fontSize: 9,
611
- fontWeight: "600",
612
- color: _sharedUi.night.color.textSecondary,
613
- fontFamily: _sharedUi.monoFont
614
- },
615
- durationTextSlow: {
616
- color: _sharedUi.buoyColors.error
617
- },
618
- changesBadge: {
619
- flexDirection: "row",
620
- alignItems: "center",
621
- gap: 4,
622
- paddingHorizontal: 8,
623
- paddingVertical: 3,
624
- borderRadius: 4,
625
- backgroundColor: _sharedUi.buoyColors.success + "26"
626
- },
627
- changesText: {
628
- fontSize: 9,
629
- fontWeight: "600",
630
- color: _sharedUi.buoyColors.success
631
- },
632
- noChangesBadge: {
633
- paddingHorizontal: 8,
634
- paddingVertical: 3,
635
- borderRadius: 4,
636
- backgroundColor: _sharedUi.night.color.surfaceElevated
637
- },
638
- noChangesText: {
639
- fontSize: 9,
640
- fontWeight: "600",
641
- color: _sharedUi.night.color.textTertiary
642
- },
643
- typeBadge: {
644
- paddingHorizontal: 6,
645
- paddingVertical: 2,
646
- borderRadius: 3,
647
- backgroundColor: _sharedUi.night.color.surfaceElevated
648
- },
649
- typeText: {
650
- fontSize: 8,
651
- fontWeight: "600",
652
- color: _sharedUi.night.color.textTertiary,
653
- fontFamily: _sharedUi.monoFont
654
- },
655
- dataViewerContainer: {
656
- backgroundColor: _sharedUi.night.color.bg,
657
- minHeight: 60
658
- },
659
- argSection: {
660
- marginTop: 4
661
- },
662
- argLabel: {
663
- fontSize: 11,
664
- color: _sharedUi.night.color.textTertiary,
665
- fontWeight: "500",
666
- marginBottom: 6
667
- },
668
- argValueContainer: {
669
- backgroundColor: _sharedUi.night.color.bg,
670
- borderRadius: 6,
671
- borderWidth: 1,
672
- borderColor: _sharedUi.night.color.border,
673
- overflow: "hidden"
674
- },
675
- argValue: {
676
- fontSize: 11,
677
- color: _sharedUi.night.color.text,
678
- fontFamily: _sharedUi.monoFont,
679
- padding: 10
680
- },
681
- errorBadge: {
682
- paddingHorizontal: 8,
683
- paddingVertical: 3,
684
- borderRadius: 4,
685
- backgroundColor: _sharedUi.buoyColors.error + "26"
686
- },
687
- errorBadgeText: {
688
- fontSize: 9,
689
- fontWeight: "700",
690
- color: _sharedUi.buoyColors.error,
691
- letterSpacing: 0.3
692
- },
693
- errorText: {
694
- fontSize: 12,
695
- color: _sharedUi.buoyColors.error,
696
- fontFamily: _sharedUi.monoFont,
697
- padding: 14
698
- },
699
- // Async Operation / Related Actions styles
700
- asyncBadge: {
701
- paddingHorizontal: 8,
702
- paddingVertical: 3,
703
- borderRadius: 4,
704
- backgroundColor: _sharedUi.night.color.accent + "26"
705
- },
706
- asyncBadgeText: {
707
- fontSize: 9,
708
- fontWeight: "700",
709
- color: _sharedUi.night.color.accent,
710
- letterSpacing: 0.3
711
- },
712
- baseActionType: {
713
- fontSize: 12,
714
- fontWeight: "600",
715
- color: _sharedUi.night.color.text,
716
- fontFamily: _sharedUi.monoFont,
717
- marginBottom: 8
718
- },
719
- totalDurationRow: {
720
- flexDirection: "row",
721
- justifyContent: "space-between",
722
- alignItems: "center",
723
- marginBottom: 12,
724
- paddingBottom: 12,
725
- borderBottomWidth: 1,
726
- borderBottomColor: _sharedUi.night.color.border
727
- },
728
- totalDurationLabel: {
729
- fontSize: 11,
730
- color: _sharedUi.night.color.textTertiary,
731
- fontWeight: "500"
732
- },
733
- totalDurationValue: {
734
- fontSize: 14,
735
- fontWeight: "700",
736
- color: _sharedUi.buoyColors.success,
737
- fontFamily: _sharedUi.monoFont
738
- },
739
- timeline: {
740
- gap: 0
741
- },
742
- timelineItem: {
743
- flexDirection: "row",
744
- alignItems: "flex-start",
745
- paddingVertical: 8,
746
- paddingHorizontal: 8,
747
- borderRadius: 8,
748
- position: "relative"
749
- },
750
- timelineItemCurrent: {
751
- backgroundColor: _sharedUi.night.color.accentSoft
752
- },
753
- timelineConnector: {
754
- position: "absolute",
755
- left: 13,
756
- top: 24,
757
- bottom: -8,
758
- width: 2,
759
- backgroundColor: _sharedUi.night.color.border
760
- },
761
- timelineDot: {
762
- width: 12,
763
- height: 12,
764
- borderRadius: 6,
765
- marginRight: 10,
766
- marginTop: 2
767
- },
768
- timelineContent: {
769
- flex: 1
770
- },
771
- timelineHeader: {
772
- flexDirection: "row",
773
- alignItems: "center",
774
- gap: 8,
775
- marginBottom: 2
776
- },
777
- timelineStatusBadge: {
778
- paddingHorizontal: 6,
779
- paddingVertical: 2,
780
- borderRadius: 4
781
- },
782
- timelineStatusText: {
783
- fontSize: 9,
784
- fontWeight: "700",
785
- letterSpacing: 0.3
786
- },
787
- currentBadge: {
788
- paddingHorizontal: 6,
789
- paddingVertical: 2,
790
- borderRadius: 4,
791
- backgroundColor: _sharedUi.night.color.accent
792
- },
793
- currentBadgeText: {
794
- fontSize: 8,
795
- fontWeight: "700",
796
- // The night accent takes dark ink.
797
- color: _sharedUi.night.color.onAccent,
798
- letterSpacing: 0.3
799
- },
800
- timelineTime: {
801
- fontSize: 10,
802
- color: _sharedUi.night.color.textTertiary,
803
- fontFamily: _sharedUi.monoFont
804
- },
805
- // Action footer - matches React Query DevTools
806
- actionFooter: {
807
- backgroundColor: _sharedUi.night.color.surface,
808
- borderRadius: 6,
809
- borderWidth: 1,
810
- borderColor: _sharedUi.night.color.accent + "4D",
811
- paddingVertical: 12,
812
- paddingHorizontal: 12,
813
- shadowColor: _sharedUi.night.color.accent,
814
- shadowOffset: {
815
- width: 0,
816
- height: 0
817
- },
818
- shadowOpacity: 0.1,
819
- shadowRadius: 6
820
- },
821
- actionsGrid: {
822
- flexDirection: "row",
823
- flexWrap: "wrap",
824
- gap: 12,
825
- justifyContent: "flex-start"
826
- },
827
- actionButtonWrapper: {
828
- alignItems: "center",
829
- gap: 4
830
- },
831
- actionDescription: {
832
- fontSize: 9,
833
- color: _sharedUi.night.color.textTertiary,
834
- textAlign: "center"
835
- }
836
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ReduxActionInfoView=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _license=require("@buoy-gg/license");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _reduxActionStore=require("../utils/reduxActionStore");var _buoyReduxMiddleware=require("../utils/buoyReduxMiddleware");var _ReduxActionButton=require("./ReduxActionButton");var _testIDs=require("../utils/testIDs");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(n,e){if("function"==typeof WeakMap)var a=new WeakMap,o=new WeakMap;return(_interopRequireWildcard=function(t,i){if(!i&&t&&t.__esModule)return t;var r,c,l={__proto__:null,default:t};if(null===t||"object"!=typeof t&&"function"!=typeof t)return l;if(r=i?o:a){if(r.has(t))return r.get(t);r.set(t,l)}for(const s in t)"default"!==s&&{}.hasOwnProperty.call(t,s)&&((c=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,s))&&(c.get||c.set)?r(l,s,c):l[s]=t[s]);return l})(n,e)}function getCategoryInfo(n){switch(n){case"pending":return{label:"PENDING",color:_sharedUi.buoyColors.warning,bgColor:_sharedUi.buoyColors.warning+"26"};case"fulfilled":return{label:"FULFILLED",color:_sharedUi.buoyColors.success,bgColor:_sharedUi.buoyColors.success+"26"};case"rejected":return{label:"REJECTED",color:_sharedUi.buoyColors.error,bgColor:_sharedUi.buoyColors.error+"26"};case"internal":return{label:"INTERNAL",color:_sharedUi.buoyColors.textMuted,bgColor:_sharedUi.buoyColors.textMuted+"26"};case"query":return{label:"QUERY",color:_sharedUi.buoyColors.info,bgColor:_sharedUi.buoyColors.info+"26"};case"mutation":return{label:"MUTATION",color:_sharedUi.buoyColors.info,bgColor:_sharedUi.buoyColors.info+"26"};default:return{label:"ACTION",color:_sharedUi.buoyColors.info,bgColor:_sharedUi.buoyColors.info+"26"}}}function formatDuration(n){if(n===void 0)return"N/A";if(n<1)return"<1ms";return`${n.toFixed(1)}ms`}function SectionHeader({icon:n,title:e,badge:a,testID:o}){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.sectionHeader,testID:o,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.sectionHeaderLeft,children:[(0,_jsxRuntime.jsx)(n,{size:14,color:_sharedUi.night.color.accent}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionTitle,children:e})]}),a]})}function formatTime(n){const e=new Date(n);const a=e.getHours().toString().padStart(2,"0");const o=e.getMinutes().toString().padStart(2,"0");const t=e.getSeconds().toString().padStart(2,"0");const i=e.getMilliseconds().toString().padStart(3,"0");return`${a}:${o}:${t}.${i}`}const ReduxActionInfoView=exports.ReduxActionInfoView=(0,_react.memo)(function n({action:e,onNavigateToAction:a}){const o=(0,_license.useIsPro)();const[t,i]=(0,_react.useState)(false);(0,_react.useEffect)(()=>{if(t&&o){i(false)}},[t,o]);const r=getCategoryInfo(e.category);const c=(0,_reduxActionStore.isEvictedState)(e.nextState);const l=(0,_buoyReduxMiddleware.isTimeTravelAvailable)();const s=c||!l;const h=e.payload!==void 0;const b=e.meta&&Object.keys(e.meta).length>0;const T=e.error!==void 0;const u=(0,_react.useMemo)(()=>{return _reduxActionStore.reduxActionStore.getLinkedActions(e)},[e]);const p=u.length>1;const C=p?_reduxActionStore.reduxActionStore.getBaseActionType(e.type):null;const f=e.meta?.requestId?_reduxActionStore.reduxActionStore.getAsyncOperationDuration(e.meta.requestId):null;const D=(0,_react.useCallback)(async()=>{if(!o){i(true);return}await(0,_sharedUi.copyToClipboard)(e.action)},[e,o]);const w=(0,_react.useCallback)(async()=>{if(!o){i(true);return}await(0,_sharedUi.copyToClipboard)(e.payload)},[e.payload,o]);const m=(0,_react.useCallback)(()=>{if(e.action&&typeof e.action==="object"&&"type"in e.action){(0,_buoyReduxMiddleware.replayAction)(e.action)}},[e]);const j=(0,_react.useCallback)(()=>{if(e.nextState!==void 0){(0,_buoyReduxMiddleware.jumpToState)(e.nextState)}},[e]);return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{testID:`${_testIDs.REDUX_TEST_ID}-detail-scroll`,style:styles.container,contentContainerStyle:styles.contentContainer,showsVerticalScrollIndicator:false,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:`${_testIDs.REDUX_TEST_ID}-info-card`,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:_sharedUi.Info,title:"ACTION INFO"}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.cardContent,children:[(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Type",value:e.type,mono:true,testID:`${_testIDs.REDUX_TEST_ID}-info-type`}),e.sliceName&&(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Slice",value:e.sliceName,mono:true,testID:`${_testIDs.REDUX_TEST_ID}-info-slice`}),(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Action",value:e.actionName,mono:true,testID:`${_testIDs.REDUX_TEST_ID}-info-action`}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.badgeRow,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.categoryBadge,{backgroundColor:r.bgColor}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.categoryText,{color:r.color}],testID:`${_testIDs.REDUX_TEST_ID}-info-category`,children:r.label})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.durationBadge,e.isSlowAction&&styles.durationBadgeSlow],children:[(0,_jsxRuntime.jsx)(_sharedUi.Clock,{size:10,color:e.isSlowAction?_sharedUi.buoyColors.error:_sharedUi.night.color.textSecondary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.durationText,e.isSlowAction&&styles.durationTextSlow],testID:`${_testIDs.REDUX_TEST_ID}-info-duration`,children:formatDuration(e.duration)}),e.isSlowAction&&(0,_jsxRuntime.jsx)(_sharedUi.AlertTriangle,{size:10,color:_sharedUi.buoyColors.error})]}),e.hasStateChange?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.changesBadge,children:[(0,_jsxRuntime.jsx)(_sharedUi.Zap,{size:10,color:_sharedUi.buoyColors.success}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.changesText,testID:`${_testIDs.REDUX_TEST_ID}-info-changes`,children:e.diffSummary||"changed"})]}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.noChangesBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.noChangesText,testID:`${_testIDs.REDUX_TEST_ID}-info-no-changes`,children:"no change"})})]})]})]}),p&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:`${_testIDs.REDUX_TEST_ID}-async-card`,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:_sharedUi.Hash,title:"ASYNC FLOW",badge:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.asyncBadge,children:(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.asyncBadgeText,testID:`${_testIDs.REDUX_TEST_ID}-async-count`,children:[u.length," ACTIONS"]})})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.cardContent,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.baseActionType,testID:`${_testIDs.REDUX_TEST_ID}-async-base`,children:C}),f!==null&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.totalDurationRow,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.totalDurationLabel,children:"Total Duration"}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.totalDurationValue,testID:`${_testIDs.REDUX_TEST_ID}-async-total`,children:[f,"ms"]})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.timeline,children:u.map((d,g)=>{const y=getCategoryInfo(d.category);const x=d.id===e.id;return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:[styles.timelineItem,x&&styles.timelineItemCurrent],onPress:()=>a?.(d),disabled:x||!a,activeOpacity:.7,testID:`${_testIDs.REDUX_TEST_ID}-async-step-${g}`,children:[g<u.length-1&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.timelineConnector}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.timelineDot,{backgroundColor:y.color}]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.timelineContent,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.timelineHeader,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.timelineStatusBadge,{backgroundColor:y.bgColor}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.timelineStatusText,{color:y.color}],testID:`${_testIDs.REDUX_TEST_ID}-async-step-${g}-status`,children:y.label})}),x&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.currentBadge,testID:`${_testIDs.REDUX_TEST_ID}-async-step-${g}-current`,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.currentBadgeText,children:"CURRENT"})})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timelineTime,children:formatTime(d.timestamp)})]})]},d.id)})})]})]}),h&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:`${_testIDs.REDUX_TEST_ID}-payload-card`,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:_sharedUi.Box,title:"PAYLOAD",badge:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.typeBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.typeText,children:Array.isArray(e.payload)?"ARRAY":typeof e.payload==="object"?"OBJECT":typeof e.payload?.toString().toUpperCase()})})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataViewerContainer,children:(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:(0,_sharedUi.parseValue)(e.payload),showTypeFilter:true,rawMode:true,initialExpanded:true})})]}),b&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:`${_testIDs.REDUX_TEST_ID}-meta-card`,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:_sharedUi.Hash,title:"ASYNC METADATA",badge:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.categoryBadge,{backgroundColor:r.bgColor}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.categoryText,{color:r.color}],children:"RTK THUNK"})})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.cardContent,children:[e.meta?.requestId&&(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Request ID",value:e.meta.requestId,mono:true}),e.meta?.requestStatus&&(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Status",value:e.meta.requestStatus.toUpperCase(),valueColor:r.color,testID:`${_testIDs.REDUX_TEST_ID}-meta-status`}),e.meta?.arg!==void 0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.argSection,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.argLabel,children:"Original Argument"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.argValueContainer,children:typeof e.meta.arg==="object"?(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:(0,_sharedUi.parseValue)(e.meta.arg),showTypeFilter:true,rawMode:true,initialExpanded:true}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.argValue,children:JSON.stringify(e.meta.arg)})})]}),e.meta?.rejectedWithValue&&(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Rejected With Value",value:"true",valueColor:_sharedUi.buoyColors.error}),e.meta?.aborted&&(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Aborted",value:"true",valueColor:_sharedUi.buoyColors.warning}),e.meta?.condition&&(0,_jsxRuntime.jsx)(_sharedUi.InfoRow,{label:"Condition",value:"true",valueColor:_sharedUi.night.color.textTertiary})]})]}),T&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.card,styles.errorCard],testID:`${_testIDs.REDUX_TEST_ID}-error-card`,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:_sharedUi.AlertCircle,title:"ERROR",badge:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.errorBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.errorBadgeText,testID:`${_testIDs.REDUX_TEST_ID}-error-badge`,children:"REJECTED"})})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataViewerContainer,children:typeof e.error==="object"?(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:(0,_sharedUi.parseValue)(e.error),showTypeFilter:true,rawMode:true,initialExpanded:true}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.errorText,children:String(e.error)})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:`${_testIDs.REDUX_TEST_ID}-full-action-card`,children:[(0,_jsxRuntime.jsx)(SectionHeader,{icon:_sharedUi.FileText,title:"FULL ACTION OBJECT"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataViewerContainer,children:(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:(0,_sharedUi.parseValue)(e.action),showTypeFilter:true,rawMode:true,initialExpanded:true})})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.actionFooter,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.actionsGrid,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.actionButtonWrapper,children:[(0,_jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton,{type:"replay",text:"REPLAY",onPress:m,testID:`${_testIDs.REDUX_TEST_ID}-replay`}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.actionDescription,children:"Dispatch again"})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.actionButtonWrapper,children:[(0,_jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton,{type:"jump",text:"JUMP",onPress:j,disabled:s,testID:`${_testIDs.REDUX_TEST_ID}-jump`}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.actionDescription,testID:`${_testIDs.REDUX_TEST_ID}-jump-description`,children:c?"State not retained":l?"Restore this state":"Time travel not wired"})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.actionButtonWrapper,children:[(0,_jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton,{type:"copy",text:"COPY ACTION",onPress:D,testID:`${_testIDs.REDUX_TEST_ID}-copy-action`}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.actionDescription,children:o?"Copy to clipboard":"Pro feature"})]}),h&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.actionButtonWrapper,children:[(0,_jsxRuntime.jsx)(_ReduxActionButton.ReduxActionButton,{type:"copy",text:"COPY PAYLOAD",onPress:w,testID:`${_testIDs.REDUX_TEST_ID}-copy-payload`}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.actionDescription,children:o?"Copy payload only":"Pro feature"})]})]})}),(0,_jsxRuntime.jsx)(_sharedUi.ProUpgradeModal,{visible:t,onClose:()=>i(false),featureName:"Copy"})]})});const styles=_reactNative.StyleSheet.create({container:{flex:1},contentContainer:{padding:8,paddingBottom:100,gap:16},card:{backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",overflow:"hidden",shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},errorCard:{borderColor:_sharedUi.buoyColors.error+"4D",shadowColor:_sharedUi.buoyColors.error},sectionHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.accent+"33",backgroundColor:_sharedUi.night.color.accent+"15"},sectionHeaderLeft:{flexDirection:"row",alignItems:"center",gap:6},sectionTitle:{fontSize:12,fontWeight:"600",letterSpacing:.5,color:_sharedUi.night.color.accent,fontFamily:_sharedUi.monoFont},cardContent:{padding:14,gap:10},badgeRow:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:6},categoryBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4},categoryText:{fontSize:9,fontWeight:"700",letterSpacing:.3},durationBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:_sharedUi.night.color.surfaceElevated},durationBadgeSlow:{backgroundColor:_sharedUi.buoyColors.error+"26"},durationText:{fontSize:9,fontWeight:"600",color:_sharedUi.night.color.textSecondary,fontFamily:_sharedUi.monoFont},durationTextSlow:{color:_sharedUi.buoyColors.error},changesBadge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:_sharedUi.buoyColors.success+"26"},changesText:{fontSize:9,fontWeight:"600",color:_sharedUi.buoyColors.success},noChangesBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:_sharedUi.night.color.surfaceElevated},noChangesText:{fontSize:9,fontWeight:"600",color:_sharedUi.night.color.textTertiary},typeBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:3,backgroundColor:_sharedUi.night.color.surfaceElevated},typeText:{fontSize:8,fontWeight:"600",color:_sharedUi.night.color.textTertiary,fontFamily:_sharedUi.monoFont},dataViewerContainer:{backgroundColor:_sharedUi.night.color.bg,minHeight:60},argSection:{marginTop:4},argLabel:{fontSize:11,color:_sharedUi.night.color.textTertiary,fontWeight:"500",marginBottom:6},argValueContainer:{backgroundColor:_sharedUi.night.color.bg,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.border,overflow:"hidden"},argValue:{fontSize:11,color:_sharedUi.night.color.text,fontFamily:_sharedUi.monoFont,padding:10},errorBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:_sharedUi.buoyColors.error+"26"},errorBadgeText:{fontSize:9,fontWeight:"700",color:_sharedUi.buoyColors.error,letterSpacing:.3},errorText:{fontSize:12,color:_sharedUi.buoyColors.error,fontFamily:_sharedUi.monoFont,padding:14},asyncBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:4,backgroundColor:_sharedUi.night.color.accent+"26"},asyncBadgeText:{fontSize:9,fontWeight:"700",color:_sharedUi.night.color.accent,letterSpacing:.3},baseActionType:{fontSize:12,fontWeight:"600",color:_sharedUi.night.color.text,fontFamily:_sharedUi.monoFont,marginBottom:8},totalDurationRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:12,paddingBottom:12,borderBottomWidth:1,borderBottomColor:_sharedUi.night.color.border},totalDurationLabel:{fontSize:11,color:_sharedUi.night.color.textTertiary,fontWeight:"500"},totalDurationValue:{fontSize:14,fontWeight:"700",color:_sharedUi.buoyColors.success,fontFamily:_sharedUi.monoFont},timeline:{gap:0},timelineItem:{flexDirection:"row",alignItems:"flex-start",paddingVertical:8,paddingHorizontal:8,borderRadius:8,position:"relative"},timelineItemCurrent:{backgroundColor:_sharedUi.night.color.accentSoft},timelineConnector:{position:"absolute",left:13,top:24,bottom:-8,width:2,backgroundColor:_sharedUi.night.color.border},timelineDot:{width:12,height:12,borderRadius:6,marginRight:10,marginTop:2},timelineContent:{flex:1},timelineHeader:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:2},timelineStatusBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},timelineStatusText:{fontSize:9,fontWeight:"700",letterSpacing:.3},currentBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4,backgroundColor:_sharedUi.night.color.accent},currentBadgeText:{fontSize:8,fontWeight:"700",color:_sharedUi.night.color.onAccent,letterSpacing:.3},timelineTime:{fontSize:10,color:_sharedUi.night.color.textTertiary,fontFamily:_sharedUi.monoFont},actionFooter:{backgroundColor:_sharedUi.night.color.surface,borderRadius:6,borderWidth:1,borderColor:_sharedUi.night.color.accent+"4D",paddingVertical:12,paddingHorizontal:12,shadowColor:_sharedUi.night.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12,justifyContent:"flex-start"},actionButtonWrapper:{alignItems:"center",gap:4},actionDescription:{fontSize:9,color:_sharedUi.night.color.textTertiary,textAlign:"center"}});