@buoy-gg/redux 7.0.35 → 7.0.38

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 (69) hide show
  1. package/README.md +37 -9
  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 -334
  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/useAutoInstrumentRedux.js +1 -187
  14. package/lib/commonjs/redux/hooks/useReduxActions.js +1 -58
  15. package/lib/commonjs/redux/sync/reduxSyncAdapter.js +1 -191
  16. package/lib/commonjs/redux/utils/activeStoreRegistry.js +1 -104
  17. package/lib/commonjs/redux/utils/autoInstrument.js +1 -231
  18. package/lib/commonjs/redux/utils/buoyReduxMiddleware.js +1 -202
  19. package/lib/commonjs/redux/utils/createReduxHistoryAdapter.js +1 -146
  20. package/lib/commonjs/redux/utils/devtoolsHook.js +1 -152
  21. package/lib/commonjs/redux/utils/reduxActionStore.js +1 -473
  22. package/lib/commonjs/redux/utils/snapshotProvider.js +1 -158
  23. package/lib/commonjs/redux/utils/testIDs.js +1 -75
  24. package/lib/module/index.js +1 -125
  25. package/lib/module/preset.js +1 -87
  26. package/lib/module/redux/components/ReduxActionButton.js +1 -128
  27. package/lib/module/redux/components/ReduxActionDetailContent.js +1 -433
  28. package/lib/module/redux/components/ReduxActionDetailView.js +1 -397
  29. package/lib/module/redux/components/ReduxActionInfoView.js +1 -831
  30. package/lib/module/redux/components/ReduxActionItem.js +1 -330
  31. package/lib/module/redux/components/ReduxAutoInstrument.js +1 -17
  32. package/lib/module/redux/components/ReduxDetailViewToggle.js +1 -45
  33. package/lib/module/redux/components/ReduxIcon.js +1 -8
  34. package/lib/module/redux/components/ReduxModal.js +1 -698
  35. package/lib/module/redux/hooks/useAutoInstrumentRedux.js +1 -183
  36. package/lib/module/redux/hooks/useReduxActions.js +1 -54
  37. package/lib/module/redux/sync/reduxSyncAdapter.js +1 -188
  38. package/lib/module/redux/utils/activeStoreRegistry.js +1 -92
  39. package/lib/module/redux/utils/autoInstrument.js +1 -201
  40. package/lib/module/redux/utils/buoyReduxMiddleware.js +1 -188
  41. package/lib/module/redux/utils/createReduxHistoryAdapter.js +1 -142
  42. package/lib/module/redux/utils/devtoolsHook.js +1 -145
  43. package/lib/module/redux/utils/reduxActionStore.js +1 -465
  44. package/lib/module/redux/utils/snapshotProvider.js +1 -157
  45. package/lib/module/redux/utils/testIDs.js +1 -68
  46. package/package.json +5 -5
  47. package/lib/typescript/index.d.ts.map +0 -1
  48. package/lib/typescript/preset.d.ts.map +0 -1
  49. package/lib/typescript/redux/components/ReduxActionButton.d.ts.map +0 -1
  50. package/lib/typescript/redux/components/ReduxActionDetailContent.d.ts.map +0 -1
  51. package/lib/typescript/redux/components/ReduxActionDetailView.d.ts.map +0 -1
  52. package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +0 -1
  53. package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +0 -1
  54. package/lib/typescript/redux/components/ReduxAutoInstrument.d.ts.map +0 -1
  55. package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +0 -1
  56. package/lib/typescript/redux/components/ReduxIcon.d.ts.map +0 -1
  57. package/lib/typescript/redux/components/ReduxModal.d.ts.map +0 -1
  58. package/lib/typescript/redux/hooks/useAutoInstrumentRedux.d.ts.map +0 -1
  59. package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +0 -1
  60. package/lib/typescript/redux/sync/reduxSyncAdapter.d.ts.map +0 -1
  61. package/lib/typescript/redux/types/index.d.ts.map +0 -1
  62. package/lib/typescript/redux/utils/activeStoreRegistry.d.ts.map +0 -1
  63. package/lib/typescript/redux/utils/autoInstrument.d.ts.map +0 -1
  64. package/lib/typescript/redux/utils/buoyReduxMiddleware.d.ts.map +0 -1
  65. package/lib/typescript/redux/utils/createReduxHistoryAdapter.d.ts.map +0 -1
  66. package/lib/typescript/redux/utils/devtoolsHook.d.ts.map +0 -1
  67. package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +0 -1
  68. package/lib/typescript/redux/utils/snapshotProvider.d.ts.map +0 -1
  69. package/lib/typescript/redux/utils/testIDs.d.ts.map +0 -1
@@ -1,334 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ReduxActionItem = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _sharedUi = require("@buoy-gg/shared-ui");
10
- var _reduxActionStore = require("../utils/reduxActionStore");
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- /**
13
- * Compact list item for displaying a Redux action
14
- * Uses shared CompactRow for consistent styling with React Query devtools
15
- */
16
-
17
- /**
18
- * Color palette for async operation badges
19
- * Each operation gets a distinct color to make matching easy
20
- */
21
- const OPERATION_COLORS = [{
22
- bg: "rgba(99, 102, 241, 0.25)",
23
- text: "#818CF8"
24
- },
25
- // indigo
26
- {
27
- bg: "rgba(236, 72, 153, 0.25)",
28
- text: "#F472B6"
29
- },
30
- // pink
31
- {
32
- bg: "rgba(14, 165, 233, 0.25)",
33
- text: "#38BDF8"
34
- },
35
- // sky
36
- {
37
- bg: "rgba(245, 158, 11, 0.25)",
38
- text: "#FBBF24"
39
- },
40
- // amber
41
- {
42
- bg: "rgba(16, 185, 129, 0.25)",
43
- text: "#34D399"
44
- },
45
- // emerald
46
- {
47
- bg: "rgba(168, 85, 247, 0.25)",
48
- text: "#C084FC"
49
- },
50
- // purple
51
- {
52
- bg: "rgba(239, 68, 68, 0.25)",
53
- text: "#F87171"
54
- },
55
- // red
56
- {
57
- bg: "rgba(20, 184, 166, 0.25)",
58
- text: "#2DD4BF"
59
- } // teal
60
- ];
61
- function getOperationColor(index) {
62
- if (index <= 0) return {
63
- bg: "rgba(142, 142, 147, 0.2)",
64
- text: _sharedUi.buoyColors.textSecondary
65
- };
66
- return OPERATION_COLORS[(index - 1) % OPERATION_COLORS.length];
67
- }
68
-
69
- /**
70
- * Slice color palette - consistent colors per slice name
71
- * Makes it easy to visually track actions from the same slice
72
- */
73
- const SLICE_COLORS = {
74
- cart: "#10B981",
75
- // emerald - shopping/commerce
76
- user: "#3B82F6",
77
- // blue - user related
78
- auth: "#8B5CF6",
79
- // purple - authentication
80
- app: "#6366F1",
81
- // indigo - app-wide
82
- ui: "#EC4899",
83
- // pink - UI state
84
- settings: "#F59E0B",
85
- // amber - settings
86
- api: "#14B8A6",
87
- // teal - API calls
88
- data: "#06B6D4" // cyan - data management
89
- };
90
-
91
- /**
92
- * Get consistent color for a slice based on its name
93
- */
94
- function getSliceColor(sliceName) {
95
- if (!sliceName) return "#6B7280"; // gray for unknown
96
-
97
- const lowerSlice = sliceName.toLowerCase();
98
-
99
- // Check for exact match first
100
- if (SLICE_COLORS[lowerSlice]) {
101
- return SLICE_COLORS[lowerSlice];
102
- }
103
-
104
- // Check for partial matches
105
- for (const [key, color] of Object.entries(SLICE_COLORS)) {
106
- if (lowerSlice.includes(key)) {
107
- return color;
108
- }
109
- }
110
-
111
- // Generate consistent color from slice name hash
112
- const hash = sliceName.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0);
113
- const hue = hash * 137 % 360;
114
- return `hsl(${hue}, 70%, 60%)`;
115
- }
116
-
117
- /**
118
- * Get status label based on category and slice
119
- */
120
- function getStatusLabel(category, sliceName) {
121
- switch (category) {
122
- case "pending":
123
- return "Pending";
124
- case "fulfilled":
125
- return "Success";
126
- case "rejected":
127
- return "Error";
128
- case "internal":
129
- return "Internal";
130
- case "query":
131
- return "Query";
132
- case "mutation":
133
- return "Mutation";
134
- default:
135
- // For regular actions, show slice name if available
136
- return sliceName ? sliceName.charAt(0).toUpperCase() + sliceName.slice(1) : "Action";
137
- }
138
- }
139
-
140
- /**
141
- * Get color for action category
142
- */
143
- function getStatusColor(category, hasStateChange, sliceName) {
144
- switch (category) {
145
- case "pending":
146
- return _sharedUi.buoyColors.warning;
147
- case "fulfilled":
148
- return _sharedUi.buoyColors.success;
149
- case "rejected":
150
- return _sharedUi.buoyColors.error;
151
- case "internal":
152
- return _sharedUi.buoyColors.textMuted;
153
- case "query":
154
- return _sharedUi.buoyColors.info;
155
- case "mutation":
156
- return _sharedUi.buoyColors.info;
157
- default:
158
- // For regular actions, use slice-based color
159
- return getSliceColor(sliceName);
160
- }
161
- }
162
-
163
- /**
164
- * Get sublabel with duration and diff info
165
- */
166
- function getSublabel(action) {
167
- const parts = [];
168
-
169
- // Add duration if available and meaningful
170
- if (action.duration !== undefined && action.duration >= 0.1) {
171
- parts.push(`${action.duration.toFixed(1)}ms`);
172
- }
173
-
174
- // Add diff summary - be more descriptive
175
- if (action.hasStateChange) {
176
- if (action.changedKeysCount && action.changedKeysCount > 0) {
177
- parts.push(`${action.changedKeysCount} key${action.changedKeysCount > 1 ? 's' : ''} changed`);
178
- } else {
179
- parts.push(action.diffSummary || "state changed");
180
- }
181
- } else {
182
- parts.push("no state change");
183
- }
184
- return parts.join(" · ");
185
- }
186
-
187
- /**
188
- * Get action name badge text
189
- */
190
- function getActionBadge(action) {
191
- // Show the action name in uppercase (e.g., ADDITEM, ORDERCOMPLETED)
192
- return action.actionName?.toUpperCase() || action.type.split('/').pop()?.toUpperCase() || "";
193
- }
194
-
195
- /**
196
- * Get primary text - use action name for cleaner display
197
- */
198
- function getPrimaryText(action) {
199
- // For internal actions, show the full type
200
- if (action.category === "internal") {
201
- return action.type;
202
- }
203
-
204
- // For others, show slice/actionName format
205
- if (action.sliceName) {
206
- return `${action.sliceName}/${action.actionName.toLowerCase()}`;
207
- }
208
- return action.type;
209
- }
210
-
211
- // Memo justified by profiling (tool-bench 2026-07-06): ReduxActionItem
212
- // x172 renders during a 5s idle dwell at 200 seeded actions. The relative
213
- // timestamp is delegated to the shared <RelativeTime/> leaf so the 5s
214
- // tick re-renders only that Text, not this row.
215
- const ReduxActionItem = exports.ReduxActionItem = /*#__PURE__*/(0, _react.memo)(function ReduxActionItem({
216
- action,
217
- onPress,
218
- linkedCount,
219
- testID
220
- }) {
221
- const sliceName = action.sliceName ?? undefined;
222
- const statusColor = getStatusColor(action.category, action.hasStateChange, sliceName);
223
- const statusLabel = getStatusLabel(action.category, sliceName);
224
- const sublabel = getSublabel(action);
225
- const primaryText = getPrimaryText(action);
226
- const actionBadge = getActionBadge(action);
227
-
228
- // Check for linked async actions. The COUNT comes from the list (see the
229
- // prop's doc); the ordered list is only needed to say where in the flow this
230
- // action sits, and only when there is a flow at all.
231
- const hasLinkedActions = (linkedCount ?? 0) > 1;
232
- const linkedActions = hasLinkedActions ? _reduxActionStore.reduxActionStore.getLinkedActions(action) : [];
233
-
234
- // Get position in async sequence (1/2, 2/2, etc.)
235
- const asyncPosition = hasLinkedActions ? linkedActions.findIndex(a => a.id === action.id) + 1 : 0;
236
-
237
- // Get sequential operation index to distinguish concurrent requests (#1, #2, etc.)
238
- const operationIndex = hasLinkedActions && action.meta?.requestId ? _reduxActionStore.reduxActionStore.getAsyncOperationIndex(action.meta.requestId) : 0;
239
-
240
- // Get color for this operation's badge
241
- const opColor = getOperationColor(operationIndex);
242
-
243
- // The async-sequence chip ("1/2 #3") sits in front of whatever indicator
244
- // the row shows; the ⚡ / 🕒 indicators and the mono action verb are drawn
245
- // by the shared ChangeRow.
246
- const sequenceChip = hasLinkedActions ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
247
- style: [styles.asyncSequenceBadge, {
248
- backgroundColor: opColor.bg
249
- }],
250
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
251
- style: [styles.asyncSequenceText, {
252
- color: opColor.text
253
- }],
254
- testID: testID ? `${testID}-seq` : undefined,
255
- children: [asyncPosition, "/", linkedCount, " #", operationIndex]
256
- })
257
- }) : undefined;
258
- const common = {
259
- statusColor,
260
- statusLabel,
261
- sublabel,
262
- primaryText,
263
- timestamp: action.timestamp,
264
- onPress: () => onPress(action),
265
- testID,
266
- accessibilityLabel: `${primaryText}, ${statusLabel}, ${sublabel}`
267
- };
268
- if (action.isSlowAction) {
269
- // Slow action warning (with the sequence chip when part of a flow).
270
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
271
- ...common,
272
- badgePrefix: sequenceChip,
273
- slow: true
274
- });
275
- }
276
- if (action.category === "rejected") {
277
- // Error badge for rejected actions.
278
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
279
- ...common,
280
- customBadge: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
281
- style: styles.badgeContainer,
282
- children: [sequenceChip, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
283
- style: styles.errorBadge,
284
- testID: testID ? `${testID}-error` : undefined,
285
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertCircle, {
286
- size: 12,
287
- color: _sharedUi.buoyColors.error
288
- })
289
- })]
290
- })
291
- });
292
- }
293
- if (hasLinkedActions) {
294
- // Linked indicator for async actions.
295
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
296
- ...common,
297
- badgePrefix: sequenceChip,
298
- changed: action.hasStateChange
299
- });
300
- }
301
- if (action.hasStateChange) {
302
- // State change indicator with the action verb.
303
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
304
- ...common,
305
- badgeText: actionBadge,
306
- changed: true
307
- });
308
- }
309
- // Nothing special: CompactRow's plain badge with the action verb.
310
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChangeRow, {
311
- ...common,
312
- plainBadgeText: actionBadge
313
- });
314
- });
315
- const styles = _reactNative.StyleSheet.create({
316
- badgeContainer: {
317
- flexDirection: "row",
318
- alignItems: "center",
319
- gap: 4
320
- },
321
- errorBadge: {
322
- paddingHorizontal: 4
323
- },
324
- asyncSequenceBadge: {
325
- paddingHorizontal: 6,
326
- paddingVertical: 2,
327
- borderRadius: 4
328
- },
329
- asyncSequenceText: {
330
- fontSize: 10,
331
- fontWeight: "600",
332
- fontFamily: _sharedUi.monoFont
333
- }
334
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReduxActionItem=void 0;var _react=require("react"),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_reduxActionStore=require("../utils/reduxActionStore"),_jsxRuntime=require("react/jsx-runtime");const OPERATION_COLORS=[{bg:"rgba(99, 102, 241, 0.25)",text:"#818CF8"},{bg:"rgba(236, 72, 153, 0.25)",text:"#F472B6"},{bg:"rgba(14, 165, 233, 0.25)",text:"#38BDF8"},{bg:"rgba(245, 158, 11, 0.25)",text:"#FBBF24"},{bg:"rgba(16, 185, 129, 0.25)",text:"#34D399"},{bg:"rgba(168, 85, 247, 0.25)",text:"#C084FC"},{bg:"rgba(239, 68, 68, 0.25)",text:"#F87171"},{bg:"rgba(20, 184, 166, 0.25)",text:"#2DD4BF"}];function getOperationColor(e){return e<=0?{bg:"rgba(142, 142, 147, 0.2)",text:_sharedUi.buoyColors.textSecondary}:OPERATION_COLORS[(e-1)%OPERATION_COLORS.length]}const SLICE_COLORS={cart:"#10B981",user:"#3B82F6",auth:"#8B5CF6",app:"#6366F1",ui:"#EC4899",settings:"#F59E0B",api:"#14B8A6",data:"#06B6D4"};function getSliceColor(e){if(!e)return"#6B7280";const t=e.toLowerCase();if(SLICE_COLORS[t])return SLICE_COLORS[t];for(const[e,r]of Object.entries(SLICE_COLORS))if(t.includes(e))return r;return`hsl(${137*e.split("").reduce((e,t)=>e+t.charCodeAt(0),0)%360}, 70%, 60%)`}function getStatusLabel(e,t){switch(e){case"pending":return"Pending";case"fulfilled":return"Success";case"rejected":return"Error";case"internal":return"Internal";case"query":return"Query";case"mutation":return"Mutation";default:return t?t.charAt(0).toUpperCase()+t.slice(1):"Action"}}function getStatusColor(e,t,r){switch(e){case"pending":return _sharedUi.buoyColors.warning;case"fulfilled":return _sharedUi.buoyColors.success;case"rejected":return _sharedUi.buoyColors.error;case"internal":return _sharedUi.buoyColors.textMuted;case"query":case"mutation":return _sharedUi.buoyColors.info;default:return getSliceColor(r)}}function getSublabel(e){const t=[];return void 0!==e.duration&&e.duration>=.1&&t.push(`${e.duration.toFixed(1)}ms`),e.hasStateChange?e.changedKeysCount&&e.changedKeysCount>0?t.push(`${e.changedKeysCount} key${e.changedKeysCount>1?"s":""} changed`):t.push(e.diffSummary||"state changed"):t.push("no state change"),t.join(" · ")}function getActionBadge(e){return e.actionName?.toUpperCase()||e.type.split("/").pop()?.toUpperCase()||""}function getPrimaryText(e){return"internal"===e.category?e.type:e.sliceName?`${e.sliceName}/${e.actionName.toLowerCase()}`:e.type}const ReduxActionItem=exports.ReduxActionItem=(0,_react.memo)(function({action:e,onPress:t,linkedCount:r,testID:a}){const n=e.sliceName??void 0,s=getStatusColor(e.category,e.hasStateChange,n),o=getStatusLabel(e.category,n),i=getSublabel(e),u=getPrimaryText(e),c=getActionBadge(e),d=(r??0)>1,g=d?_reduxActionStore.reduxActionStore.getLinkedActions(e):[],l=d?g.findIndex(t=>t.id===e.id)+1:0,x=d&&e.meta?.requestId?_reduxActionStore.reduxActionStore.getAsyncOperationIndex(e.meta.requestId):0,h=getOperationColor(x),C=d?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.asyncSequenceBadge,{backgroundColor:h.bg}],children:(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:[styles.asyncSequenceText,{color:h.text}],testID:a?`${a}-seq`:void 0,children:[l,"/",r," #",x]})}):void 0,b={statusColor:s,statusLabel:o,sublabel:i,primaryText:u,timestamp:e.timestamp,onPress:()=>t(e),testID:a,accessibilityLabel:`${u}, ${o}, ${i}`};return e.isSlowAction?(0,_jsxRuntime.jsx)(_sharedUi.ChangeRow,{...b,badgePrefix:C,slow:!0}):"rejected"===e.category?(0,_jsxRuntime.jsx)(_sharedUi.ChangeRow,{...b,customBadge:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.badgeContainer,children:[C,(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.errorBadge,testID:a?`${a}-error`:void 0,children:(0,_jsxRuntime.jsx)(_sharedUi.AlertCircle,{size:12,color:_sharedUi.buoyColors.error})})]})}):d?(0,_jsxRuntime.jsx)(_sharedUi.ChangeRow,{...b,badgePrefix:C,changed:e.hasStateChange}):e.hasStateChange?(0,_jsxRuntime.jsx)(_sharedUi.ChangeRow,{...b,badgeText:c,changed:!0}):(0,_jsxRuntime.jsx)(_sharedUi.ChangeRow,{...b,plainBadgeText:c})}),styles=_reactNative.StyleSheet.create({badgeContainer:{flexDirection:"row",alignItems:"center",gap:4},errorBadge:{paddingHorizontal:4},asyncSequenceBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},asyncSequenceText:{fontSize:10,fontWeight:"600",fontFamily:_sharedUi.monoFont}});
@@ -1,20 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ReduxAutoInstrument = ReduxAutoInstrument;
7
- var _useAutoInstrumentRedux = require("../hooks/useAutoInstrumentRedux");
8
- /**
9
- * Headless startup instrumentation. Auto-rendered by FloatingDevTools (same
10
- * pattern as RouteTracker & the overlay tools) so the Redux store is bound
11
- * from app mount — action log, MCP getState/dispatch, and desktop sync all
12
- * work WITHOUT the user ever opening the Redux tool. Renders nothing.
13
- *
14
- * Safe anywhere: if react-redux is missing or there's no Provider above, the
15
- * hook records the diagnostic and fails gracefully.
16
- */
17
- function ReduxAutoInstrument() {
18
- (0, _useAutoInstrumentRedux.useAutoInstrumentRedux)();
19
- return null;
20
- }
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReduxAutoInstrument=ReduxAutoInstrument;var _useAutoInstrumentRedux=require("../hooks/useAutoInstrumentRedux");function ReduxAutoInstrument(){return(0,_useAutoInstrumentRedux.useAutoInstrumentRedux)(),null}
@@ -1,50 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ReduxDetailViewToggle = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _sharedUi = require("@buoy-gg/shared-ui");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- 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); }
11
- /**
12
- * ReduxDetailViewToggle
13
- *
14
- * Three-card toggle for switching between Action, State, and Diff views.
15
- * The cards themselves are the shared `DetailViewToggle`; this file owns
16
- * the redux view list and testID prefix.
17
- */
18
-
19
- // Active-card chrome takes the single night accent (the per-view
20
- // warning/info/success tints were selection chrome, not data).
21
- const VIEWS = [{
22
- key: "action",
23
- label: "ACTION",
24
- description: "View action details",
25
- icon: _sharedUi.FileText
26
- }, {
27
- key: "state",
28
- label: "STATE",
29
- description: "View current state",
30
- icon: _sharedUi.Database
31
- }, {
32
- key: "diff",
33
- label: "DIFF",
34
- description: "Compare changes",
35
- icon: _sharedUi.GitBranch
36
- }];
37
- const DIFF_DISABLED = ["diff"];
38
- const ReduxDetailViewToggle = exports.ReduxDetailViewToggle = /*#__PURE__*/(0, _react.memo)(function ReduxDetailViewToggle({
39
- activeView,
40
- onViewChange,
41
- diffDisabled = false
42
- }) {
43
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.DetailViewToggle, {
44
- views: VIEWS,
45
- activeView: activeView,
46
- onViewChange: onViewChange,
47
- disabledKeys: diffDisabled ? DIFF_DISABLED : undefined,
48
- testIDPrefix: "buoy-redux"
49
- });
50
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReduxDetailViewToggle=void 0;var _react=_interopRequireWildcard(require("react")),_sharedUi=require("@buoy-gg/shared-ui"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,i){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return(_interopRequireWildcard=function(e,i){if(!i&&e&&e.__esModule)return e;var a,n,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=i?r:t){if(a.has(e))return a.get(e);a.set(e,o)}for(const i in e)"default"!==i&&{}.hasOwnProperty.call(e,i)&&((n=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,i))&&(n.get||n.set)?a(o,i,n):o[i]=e[i]);return o})(e,i)}const VIEWS=[{key:"action",label:"ACTION",description:"View action details",icon:_sharedUi.FileText},{key:"state",label:"STATE",description:"View current state",icon:_sharedUi.Database},{key:"diff",label:"DIFF",description:"Compare changes",icon:_sharedUi.GitBranch}],DIFF_DISABLED=["diff"],ReduxDetailViewToggle=exports.ReduxDetailViewToggle=(0,_react.memo)(function({activeView:e,onViewChange:i,diffDisabled:t=!1}){return(0,_jsxRuntime.jsx)(_sharedUi.DetailViewToggle,{views:VIEWS,activeView:e,onViewChange:i,disabledKeys:t?DIFF_DISABLED:void 0,testIDPrefix:"buoy-redux"})});
@@ -1,18 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "REDUX_ICON_COLOR", {
7
- enumerable: true,
8
- get: function () {
9
- return _floatingToolsCore.REDUX_ICON_COLOR;
10
- }
11
- });
12
- Object.defineProperty(exports, "ReduxIcon", {
13
- enumerable: true,
14
- get: function () {
15
- return _floatingToolsCore.ReduxIcon;
16
- }
17
- });
18
- var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"REDUX_ICON_COLOR",{enumerable:!0,get:function(){return _floatingToolsCore.REDUX_ICON_COLOR}}),Object.defineProperty(exports,"ReduxIcon",{enumerable:!0,get:function(){return _floatingToolsCore.ReduxIcon}});var _floatingToolsCore=require("@buoy-gg/floating-tools-core");