@buoy-gg/redux 2.1.12 → 2.1.13

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 (62) hide show
  1. package/lib/commonjs/index.js +1 -179
  2. package/lib/commonjs/preset.js +1 -98
  3. package/lib/commonjs/redux/components/ReduxActionButton.js +1 -129
  4. package/lib/commonjs/redux/components/ReduxActionDetailContent.js +1 -380
  5. package/lib/commonjs/redux/components/ReduxActionDetailView.js +1 -401
  6. package/lib/commonjs/redux/components/ReduxActionInfoView.js +1 -838
  7. package/lib/commonjs/redux/components/ReduxActionItem.js +1 -366
  8. package/lib/commonjs/redux/components/ReduxDetailViewToggle.js +1 -134
  9. package/lib/commonjs/redux/components/ReduxIcon.js +1 -18
  10. package/lib/commonjs/redux/components/ReduxModal.js +1 -530
  11. package/lib/commonjs/redux/components/index.js +1 -52
  12. package/lib/commonjs/redux/hooks/index.js +1 -25
  13. package/lib/commonjs/redux/hooks/useAutoInstrumentRedux.js +1 -197
  14. package/lib/commonjs/redux/hooks/useReduxActions.js +1 -75
  15. package/lib/commonjs/redux/index.js +1 -49
  16. package/lib/commonjs/redux/utils/autoInstrument.js +1 -270
  17. package/lib/commonjs/redux/utils/buoyReduxMiddleware.js +1 -166
  18. package/lib/commonjs/redux/utils/createReduxHistoryAdapter.js +1 -146
  19. package/lib/commonjs/redux/utils/index.js +1 -111
  20. package/lib/commonjs/redux/utils/reduxActionStore.js +1 -358
  21. package/lib/module/index.js +1 -87
  22. package/lib/module/preset.js +1 -94
  23. package/lib/module/redux/components/ReduxActionButton.js +1 -126
  24. package/lib/module/redux/components/ReduxActionDetailContent.js +1 -376
  25. package/lib/module/redux/components/ReduxActionDetailView.js +1 -397
  26. package/lib/module/redux/components/ReduxActionInfoView.js +1 -833
  27. package/lib/module/redux/components/ReduxActionItem.js +1 -362
  28. package/lib/module/redux/components/ReduxDetailViewToggle.js +1 -129
  29. package/lib/module/redux/components/ReduxIcon.js +1 -8
  30. package/lib/module/redux/components/ReduxModal.js +1 -525
  31. package/lib/module/redux/components/index.js +1 -7
  32. package/lib/module/redux/hooks/index.js +1 -4
  33. package/lib/module/redux/hooks/useAutoInstrumentRedux.js +1 -193
  34. package/lib/module/redux/hooks/useReduxActions.js +1 -71
  35. package/lib/module/redux/index.js +1 -13
  36. package/lib/module/redux/utils/autoInstrument.js +1 -260
  37. package/lib/module/redux/utils/buoyReduxMiddleware.js +1 -157
  38. package/lib/module/redux/utils/createReduxHistoryAdapter.js +1 -142
  39. package/lib/module/redux/utils/index.js +1 -8
  40. package/lib/module/redux/utils/reduxActionStore.js +1 -354
  41. package/package.json +4 -4
  42. package/lib/typescript/index.d.ts.map +0 -1
  43. package/lib/typescript/preset.d.ts.map +0 -1
  44. package/lib/typescript/redux/components/ReduxActionButton.d.ts.map +0 -1
  45. package/lib/typescript/redux/components/ReduxActionDetailContent.d.ts.map +0 -1
  46. package/lib/typescript/redux/components/ReduxActionDetailView.d.ts.map +0 -1
  47. package/lib/typescript/redux/components/ReduxActionInfoView.d.ts.map +0 -1
  48. package/lib/typescript/redux/components/ReduxActionItem.d.ts.map +0 -1
  49. package/lib/typescript/redux/components/ReduxDetailViewToggle.d.ts.map +0 -1
  50. package/lib/typescript/redux/components/ReduxIcon.d.ts.map +0 -1
  51. package/lib/typescript/redux/components/ReduxModal.d.ts.map +0 -1
  52. package/lib/typescript/redux/components/index.d.ts.map +0 -1
  53. package/lib/typescript/redux/hooks/index.d.ts.map +0 -1
  54. package/lib/typescript/redux/hooks/useAutoInstrumentRedux.d.ts.map +0 -1
  55. package/lib/typescript/redux/hooks/useReduxActions.d.ts.map +0 -1
  56. package/lib/typescript/redux/index.d.ts.map +0 -1
  57. package/lib/typescript/redux/types/index.d.ts.map +0 -1
  58. package/lib/typescript/redux/utils/autoInstrument.d.ts.map +0 -1
  59. package/lib/typescript/redux/utils/buoyReduxMiddleware.d.ts.map +0 -1
  60. package/lib/typescript/redux/utils/createReduxHistoryAdapter.d.ts.map +0 -1
  61. package/lib/typescript/redux/utils/index.d.ts.map +0 -1
  62. package/lib/typescript/redux/utils/reduxActionStore.d.ts.map +0 -1
@@ -1,376 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * ReduxActionDetailContent
5
- *
6
- * Enhanced detail view for a Redux action with 3 view modes:
7
- * - ACTION: View action details, payload, meta, error
8
- * - STATE: View current state after action
9
- * - DIFF: Compare prev vs next state
10
- */
11
-
12
- import { View, Text, StyleSheet, ScrollView } from "react-native";
13
- import { useState, useCallback, useMemo } from "react";
14
- import { macOSColors, EventStepperFooter, formatRelativeTime, parseValue } from "@buoy-gg/shared-ui";
15
- import { DataViewer, SplitDiffViewer, TreeDiffViewer, diffThemes } from "@buoy-gg/shared-ui/dataViewer";
16
- import { ReduxDetailViewToggle } from "./ReduxDetailViewToggle";
17
- import { ReduxActionInfoView } from "./ReduxActionInfoView";
18
- import { DiffModeTabs, CompareBar } from "@buoy-gg/shared-ui";
19
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
- /**
21
- * Get color for action type
22
- */
23
- function getActionColor(type) {
24
- if (type.includes("/pending")) return macOSColors.semantic.warning;
25
- if (type.includes("/fulfilled")) return macOSColors.semantic.success;
26
- if (type.includes("/rejected")) return macOSColors.semantic.error;
27
- if (type.startsWith("@@")) return macOSColors.text.muted;
28
- return macOSColors.semantic.info;
29
- }
30
-
31
- /**
32
- * Get short action label
33
- */
34
- function getActionLabel(type) {
35
- if (type.includes("/pending")) return "PENDING";
36
- if (type.includes("/fulfilled")) return "FULFILLED";
37
- if (type.includes("/rejected")) return "REJECTED";
38
- if (type.startsWith("@@")) return "INTERNAL";
39
- const parts = type.split("/");
40
- return parts[parts.length - 1]?.toUpperCase() || "ACTION";
41
- }
42
-
43
- /**
44
- * Get the type (object, array, string, etc.)
45
- */
46
- function getValueType(value) {
47
- if (value === null) return "null";
48
- if (value === undefined) return "undefined";
49
- if (Array.isArray(value)) return "array";
50
- return typeof value;
51
- }
52
-
53
- /**
54
- * Format timestamp for display
55
- */
56
- function formatTimestamp(timestamp) {
57
- const date = new Date(timestamp);
58
- return date.toLocaleTimeString("en-US", {
59
- hour12: false,
60
- hour: "2-digit",
61
- minute: "2-digit",
62
- second: "2-digit"
63
- });
64
- }
65
-
66
- /**
67
- * Diff mode tabs configuration
68
- */
69
- const DIFF_MODE_TABS = [{
70
- key: "tree",
71
- label: "TREE VIEW"
72
- }, {
73
- key: "split",
74
- label: "SPLIT VIEW"
75
- }];
76
- export function ReduxActionDetailContent({
77
- action,
78
- actions,
79
- selectedIndex,
80
- onIndexChange,
81
- disableInternalFooter = false
82
- }) {
83
- // View state
84
- const [activeView, setActiveView] = useState("action");
85
- const [diffMode, setDiffMode] = useState("tree");
86
- const totalActions = actions.length;
87
- const actionColor = getActionColor(action.type);
88
- const actionLabel = getActionLabel(action.type);
89
- const stateType = getValueType(parseValue(action.nextState));
90
-
91
- // Actions are in reverse chronological order (newest first, oldest last)
92
- const chronologicalNumber = totalActions - selectedIndex;
93
- const prevChronologicalNumber = chronologicalNumber - 1;
94
-
95
- // Get the previous action in chronological order (which is the NEXT index in the array)
96
- const prevActionIndex = selectedIndex < totalActions - 1 ? selectedIndex + 1 : null;
97
- const prevAction = prevActionIndex !== null ? actions[prevActionIndex] : null;
98
-
99
- // Compare bar info for diff view
100
- const leftEvent = useMemo(() => ({
101
- index: prevActionIndex ?? 0,
102
- label: prevChronologicalNumber > 0 ? `#${prevChronologicalNumber}` : "Initial",
103
- timestamp: prevAction ? formatTimestamp(prevAction.timestamp) : "",
104
- relativeTime: prevAction ? formatRelativeTime(new Date(prevAction.timestamp)) : "state",
105
- badge: prevAction ? /*#__PURE__*/_jsx(View, {
106
- style: [styles.actionBadgeSmall, {
107
- backgroundColor: `${getActionColor(prevAction.type)}20`
108
- }],
109
- children: /*#__PURE__*/_jsx(Text, {
110
- style: [styles.actionTextSmall, {
111
- color: getActionColor(prevAction.type)
112
- }],
113
- children: getActionLabel(prevAction.type)
114
- })
115
- }) : undefined
116
- }), [prevActionIndex, prevAction, prevChronologicalNumber]);
117
- const rightEvent = useMemo(() => ({
118
- index: selectedIndex,
119
- label: `#${chronologicalNumber}`,
120
- timestamp: formatTimestamp(action.timestamp),
121
- relativeTime: formatRelativeTime(new Date(action.timestamp)),
122
- badge: /*#__PURE__*/_jsx(View, {
123
- style: [styles.actionBadgeSmall, {
124
- backgroundColor: `${actionColor}20`
125
- }],
126
- children: /*#__PURE__*/_jsx(Text, {
127
- style: [styles.actionTextSmall, {
128
- color: actionColor
129
- }],
130
- children: actionLabel
131
- })
132
- })
133
- }), [selectedIndex, action.timestamp, actionColor, actionLabel, chronologicalNumber]);
134
-
135
- // Render state view
136
- const renderStateView = useCallback(() => {
137
- const parsed = parseValue(action.nextState);
138
- return /*#__PURE__*/_jsxs(View, {
139
- style: styles.contentCard,
140
- children: [/*#__PURE__*/_jsxs(View, {
141
- style: styles.valueHeader,
142
- children: [/*#__PURE__*/_jsx(Text, {
143
- style: styles.valueLabel,
144
- children: "STATE AFTER ACTION"
145
- }), /*#__PURE__*/_jsxs(View, {
146
- style: styles.valueHeaderBadges,
147
- children: [/*#__PURE__*/_jsx(View, {
148
- style: [styles.actionBadge, {
149
- backgroundColor: `${actionColor}20`
150
- }],
151
- children: /*#__PURE__*/_jsx(Text, {
152
- style: [styles.actionText, {
153
- color: actionColor
154
- }],
155
- children: actionLabel
156
- })
157
- }), /*#__PURE__*/_jsx(View, {
158
- style: styles.typeBadge,
159
- children: /*#__PURE__*/_jsx(Text, {
160
- style: styles.typeText,
161
- children: stateType.toUpperCase()
162
- })
163
- })]
164
- })]
165
- }), /*#__PURE__*/_jsx(View, {
166
- style: styles.dataViewerContainer,
167
- children: /*#__PURE__*/_jsx(DataViewer, {
168
- title: "",
169
- data: parsed,
170
- showTypeFilter: true,
171
- rawMode: true,
172
- initialExpanded: true
173
- })
174
- })]
175
- });
176
- }, [action.nextState, actionColor, actionLabel, stateType]);
177
-
178
- // Render diff content
179
- const renderDiffContent = useCallback(() => {
180
- const prevState = parseValue(action.prevState);
181
- const nextState = parseValue(action.nextState);
182
- if (diffMode === "split") {
183
- return /*#__PURE__*/_jsx(ScrollView, {
184
- style: {
185
- flex: 1
186
- },
187
- showsVerticalScrollIndicator: true,
188
- children: /*#__PURE__*/_jsx(SplitDiffViewer, {
189
- oldValue: prevState,
190
- newValue: nextState,
191
- theme: diffThemes.devToolsDefault,
192
- options: {
193
- hideLineNumbers: false,
194
- disableWordDiff: false,
195
- showDiffOnly: false,
196
- compareMethod: "words",
197
- contextLines: 3
198
- },
199
- showThemeName: false
200
- })
201
- });
202
- }
203
- return /*#__PURE__*/_jsx(TreeDiffViewer, {
204
- oldValue: prevState,
205
- newValue: nextState
206
- });
207
- }, [action.prevState, action.nextState, diffMode]);
208
-
209
- // Navigation handlers
210
- const handleFooterPrevious = useCallback(() => {
211
- onIndexChange(Math.min(totalActions - 1, selectedIndex + 1));
212
- }, [selectedIndex, totalActions, onIndexChange]);
213
- const handleFooterNext = useCallback(() => {
214
- onIndexChange(Math.max(0, selectedIndex - 1));
215
- }, [selectedIndex, onIndexChange]);
216
- const diffDisabled = totalActions <= 1;
217
- return /*#__PURE__*/_jsxs(View, {
218
- style: styles.container,
219
- children: [/*#__PURE__*/_jsx(ReduxDetailViewToggle, {
220
- activeView: activeView,
221
- onViewChange: setActiveView,
222
- diffDisabled: diffDisabled
223
- }), /*#__PURE__*/_jsxs(View, {
224
- style: styles.contentArea,
225
- children: [activeView === "action" && /*#__PURE__*/_jsx(ReduxActionInfoView, {
226
- action: action
227
- }), activeView === "state" && /*#__PURE__*/_jsx(View, {
228
- style: styles.stateContainer,
229
- children: renderStateView()
230
- }), activeView === "diff" && /*#__PURE__*/_jsxs(View, {
231
- style: styles.diffContainer,
232
- children: [/*#__PURE__*/_jsx(DiffModeTabs, {
233
- tabs: DIFF_MODE_TABS,
234
- activeTab: diffMode,
235
- onTabChange: setDiffMode
236
- }), /*#__PURE__*/_jsx(CompareBar, {
237
- leftEvent: leftEvent,
238
- rightEvent: rightEvent
239
- }), /*#__PURE__*/_jsx(View, {
240
- style: styles.diffContent,
241
- children: renderDiffContent()
242
- })]
243
- })]
244
- }), !disableInternalFooter && totalActions > 1 && /*#__PURE__*/_jsx(EventStepperFooter, {
245
- currentIndex: chronologicalNumber - 1,
246
- totalItems: totalActions,
247
- onPrevious: handleFooterPrevious,
248
- onNext: handleFooterNext,
249
- itemLabel: "Action",
250
- subtitle: formatRelativeTime(new Date(action.timestamp)),
251
- absolute: true
252
- })]
253
- });
254
- }
255
-
256
- /**
257
- * External footer component for modal use
258
- */
259
- export function ReduxActionDetailFooter({
260
- action,
261
- actions,
262
- selectedIndex,
263
- onIndexChange
264
- }) {
265
- const totalActions = actions.length;
266
- if (totalActions <= 1) return null;
267
- const chronologicalNumber = totalActions - selectedIndex;
268
- return /*#__PURE__*/_jsx(EventStepperFooter, {
269
- currentIndex: chronologicalNumber - 1,
270
- totalItems: totalActions,
271
- onPrevious: () => onIndexChange(Math.min(totalActions - 1, selectedIndex + 1)),
272
- onNext: () => onIndexChange(Math.max(0, selectedIndex - 1)),
273
- itemLabel: "Action",
274
- subtitle: formatRelativeTime(new Date(action.timestamp))
275
- });
276
- }
277
- const styles = StyleSheet.create({
278
- container: {
279
- flex: 1,
280
- backgroundColor: macOSColors.background.base
281
- },
282
- contentArea: {
283
- flex: 1,
284
- paddingBottom: 96
285
- },
286
- // State view styles
287
- stateContainer: {
288
- flex: 1,
289
- padding: 14
290
- },
291
- contentCard: {
292
- backgroundColor: macOSColors.background.card,
293
- borderRadius: 14,
294
- padding: 14,
295
- borderWidth: 1,
296
- borderColor: macOSColors.border.default
297
- },
298
- valueHeader: {
299
- flexDirection: "row",
300
- alignItems: "center",
301
- justifyContent: "space-between",
302
- marginBottom: 8
303
- },
304
- valueLabel: {
305
- fontSize: 10,
306
- color: macOSColors.text.secondary,
307
- fontFamily: "monospace",
308
- letterSpacing: 0.5,
309
- fontWeight: "600"
310
- },
311
- valueHeaderBadges: {
312
- flexDirection: "row",
313
- alignItems: "center",
314
- gap: 6
315
- },
316
- actionBadge: {
317
- paddingHorizontal: 8,
318
- paddingVertical: 2,
319
- borderRadius: 4
320
- },
321
- actionText: {
322
- fontSize: 9,
323
- fontWeight: "700",
324
- fontFamily: "monospace",
325
- letterSpacing: 0.3
326
- },
327
- typeBadge: {
328
- paddingHorizontal: 8,
329
- paddingVertical: 2,
330
- borderRadius: 4,
331
- backgroundColor: macOSColors.background.input
332
- },
333
- typeText: {
334
- fontSize: 9,
335
- fontWeight: "600",
336
- color: macOSColors.text.muted,
337
- fontFamily: "monospace"
338
- },
339
- valueBox: {
340
- backgroundColor: macOSColors.background.base,
341
- borderRadius: 6,
342
- borderWidth: 1,
343
- borderColor: macOSColors.border.input,
344
- padding: 8
345
- },
346
- valueText: {
347
- fontSize: 12,
348
- color: macOSColors.text.primary,
349
- fontFamily: "monospace",
350
- lineHeight: 18
351
- },
352
- // Diff view styles
353
- diffContainer: {
354
- flex: 1
355
- },
356
- diffContent: {
357
- flex: 1,
358
- paddingHorizontal: 14
359
- },
360
- // Action badges for compare bar
361
- actionBadgeSmall: {
362
- paddingHorizontal: 6,
363
- paddingVertical: 1,
364
- borderRadius: 3
365
- },
366
- actionTextSmall: {
367
- fontSize: 8,
368
- fontWeight: "700",
369
- fontFamily: "monospace"
370
- },
371
- dataViewerContainer: {
372
- marginTop: -12,
373
- marginHorizontal: -12,
374
- marginBottom: -12
375
- }
376
- });
1
+ "use strict";import{View,Text,StyleSheet,ScrollView}from"react-native";import{useState,useCallback,useMemo}from"react";import{macOSColors,EventStepperFooter,formatRelativeTime,parseValue}from"@buoy-gg/shared-ui";import{DataViewer,SplitDiffViewer,TreeDiffViewer,diffThemes}from"@buoy-gg/shared-ui/dataViewer";import{ReduxDetailViewToggle}from"./ReduxDetailViewToggle";import{ReduxActionInfoView}from"./ReduxActionInfoView";import{DiffModeTabs,CompareBar}from"@buoy-gg/shared-ui";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";function getActionColor(e){return e.includes("/pending")?macOSColors.semantic.warning:e.includes("/fulfilled")?macOSColors.semantic.success:e.includes("/rejected")?macOSColors.semantic.error:e.startsWith("@@")?macOSColors.text.muted:macOSColors.semantic.info}function getActionLabel(e){if(e.includes("/pending"))return"PENDING";if(e.includes("/fulfilled"))return"FULFILLED";if(e.includes("/rejected"))return"REJECTED";if(e.startsWith("@@"))return"INTERNAL";const t=e.split("/");return t[t.length-1]?.toUpperCase()||"ACTION"}function getValueType(e){return null===e?"null":void 0===e?"undefined":Array.isArray(e)?"array":typeof e}function formatTimestamp(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}const DIFF_MODE_TABS=[{key:"tree",label:"TREE VIEW"},{key:"split",label:"SPLIT VIEW"}];export function ReduxActionDetailContent({action:e,actions:t,selectedIndex:a,onIndexChange:o,disableInternalFooter:i=!1}){const[n,r]=useState("action"),[l,s]=useState("tree"),d=t.length,c=getActionColor(e.type),m=getActionLabel(e.type),u=getValueType(parseValue(e.nextState)),f=d-a,x=f-1,p=a<d-1?a+1:null,g=null!==p?t[p]:null,y=useMemo(()=>({index:p??0,label:x>0?`#${x}`:"Initial",timestamp:g?formatTimestamp(g.timestamp):"",relativeTime:g?formatRelativeTime(new Date(g.timestamp)):"state",badge:g?_jsx(View,{style:[styles.actionBadgeSmall,{backgroundColor:`${getActionColor(g.type)}20`}],children:_jsx(Text,{style:[styles.actionTextSmall,{color:getActionColor(g.type)}],children:getActionLabel(g.type)})}):void 0}),[p,g,x]),b=useMemo(()=>({index:a,label:`#${f}`,timestamp:formatTimestamp(e.timestamp),relativeTime:formatRelativeTime(new Date(e.timestamp)),badge:_jsx(View,{style:[styles.actionBadgeSmall,{backgroundColor:`${c}20`}],children:_jsx(Text,{style:[styles.actionTextSmall,{color:c}],children:m})})}),[a,e.timestamp,c,m,f]),h=useCallback(()=>{const t=parseValue(e.nextState);return _jsxs(View,{style:styles.contentCard,children:[_jsxs(View,{style:styles.valueHeader,children:[_jsx(Text,{style:styles.valueLabel,children:"STATE AFTER ACTION"}),_jsxs(View,{style:styles.valueHeaderBadges,children:[_jsx(View,{style:[styles.actionBadge,{backgroundColor:`${c}20`}],children:_jsx(Text,{style:[styles.actionText,{color:c}],children:m})}),_jsx(View,{style:styles.typeBadge,children:_jsx(Text,{style:styles.typeText,children:u.toUpperCase()})})]})]}),_jsx(View,{style:styles.dataViewerContainer,children:_jsx(DataViewer,{title:"",data:t,showTypeFilter:!0,rawMode:!0,initialExpanded:!0})})]})},[e.nextState,c,m,u]),C=useCallback(()=>{const t=parseValue(e.prevState),a=parseValue(e.nextState);return"split"===l?_jsx(ScrollView,{style:{flex:1},showsVerticalScrollIndicator:!0,children:_jsx(SplitDiffViewer,{oldValue:t,newValue:a,theme:diffThemes.devToolsDefault,options:{hideLineNumbers:!1,disableWordDiff:!1,showDiffOnly:!1,compareMethod:"words",contextLines:3},showThemeName:!1})}):_jsx(TreeDiffViewer,{oldValue:t,newValue:a})},[e.prevState,e.nextState,l]),S=useCallback(()=>{o(Math.min(d-1,a+1))},[a,d,o]),T=useCallback(()=>{o(Math.max(0,a-1))},[a,o]),w=d<=1;return _jsxs(View,{style:styles.container,children:[_jsx(ReduxDetailViewToggle,{activeView:n,onViewChange:r,diffDisabled:w}),_jsxs(View,{style:styles.contentArea,children:["action"===n&&_jsx(ReduxActionInfoView,{action:e}),"state"===n&&_jsx(View,{style:styles.stateContainer,children:h()}),"diff"===n&&_jsxs(View,{style:styles.diffContainer,children:[_jsx(DiffModeTabs,{tabs:DIFF_MODE_TABS,activeTab:l,onTabChange:s}),_jsx(CompareBar,{leftEvent:y,rightEvent:b}),_jsx(View,{style:styles.diffContent,children:C()})]})]}),!i&&d>1&&_jsx(EventStepperFooter,{currentIndex:f-1,totalItems:d,onPrevious:S,onNext:T,itemLabel:"Action",subtitle:formatRelativeTime(new Date(e.timestamp)),absolute:!0})]})}export function ReduxActionDetailFooter({action:e,actions:t,selectedIndex:a,onIndexChange:o}){const i=t.length;return i<=1?null:_jsx(EventStepperFooter,{currentIndex:i-a-1,totalItems:i,onPrevious:()=>o(Math.min(i-1,a+1)),onNext:()=>o(Math.max(0,a-1)),itemLabel:"Action",subtitle:formatRelativeTime(new Date(e.timestamp))})}const styles=StyleSheet.create({container:{flex:1,backgroundColor:macOSColors.background.base},contentArea:{flex:1,paddingBottom:96},stateContainer:{flex:1,padding:14},contentCard:{backgroundColor:macOSColors.background.card,borderRadius:14,padding:14,borderWidth:1,borderColor:macOSColors.border.default},valueHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:8},valueLabel:{fontSize:10,color:macOSColors.text.secondary,fontFamily:"monospace",letterSpacing:.5,fontWeight:"600"},valueHeaderBadges:{flexDirection:"row",alignItems:"center",gap:6},actionBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4},actionText:{fontSize:9,fontWeight:"700",fontFamily:"monospace",letterSpacing:.3},typeBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:macOSColors.background.input},typeText:{fontSize:9,fontWeight:"600",color:macOSColors.text.muted,fontFamily:"monospace"},valueBox:{backgroundColor:macOSColors.background.base,borderRadius:6,borderWidth:1,borderColor:macOSColors.border.input,padding:8},valueText:{fontSize:12,color:macOSColors.text.primary,fontFamily:"monospace",lineHeight:18},diffContainer:{flex:1},diffContent:{flex:1,paddingHorizontal:14},actionBadgeSmall:{paddingHorizontal:6,paddingVertical:1,borderRadius:3},actionTextSmall:{fontSize:8,fontWeight:"700",fontFamily:"monospace"},dataViewerContainer:{marginTop:-12,marginHorizontal:-12,marginBottom:-12}});