@buoy-gg/highlight-updates 2.1.9 → 2.1.11

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 (65) hide show
  1. package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +285 -1
  2. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1371 -1
  3. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +591 -1
  4. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +267 -1
  5. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +178 -1
  6. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +303 -1
  7. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +500 -1
  8. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +830 -1
  9. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +894 -1
  10. package/lib/commonjs/highlight-updates/components/RenderListItem.js +220 -1
  11. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +70 -1
  12. package/lib/commonjs/highlight-updates/components/index.js +97 -1
  13. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1435 -1
  14. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +359 -1
  15. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +371 -1
  16. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1828 -1
  17. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +903 -1
  18. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +264 -1
  19. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +58 -1
  20. package/lib/commonjs/index.js +311 -1
  21. package/lib/commonjs/preset.js +278 -1
  22. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +278 -1
  23. package/lib/module/highlight-updates/components/HighlightFilterView.js +1365 -1
  24. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +585 -1
  25. package/lib/module/highlight-updates/components/IdentifierBadge.js +259 -1
  26. package/lib/module/highlight-updates/components/IsolatedRenderList.js +174 -1
  27. package/lib/module/highlight-updates/components/ModalHeaderContent.js +298 -1
  28. package/lib/module/highlight-updates/components/RenderCauseBadge.js +491 -1
  29. package/lib/module/highlight-updates/components/RenderDetailView.js +826 -1
  30. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +888 -1
  31. package/lib/module/highlight-updates/components/RenderListItem.js +215 -1
  32. package/lib/module/highlight-updates/components/StatsDisplay.js +67 -1
  33. package/lib/module/highlight-updates/components/index.js +16 -1
  34. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1431 -1
  35. package/lib/module/highlight-updates/utils/PerformanceLogger.js +353 -1
  36. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +358 -1
  37. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1818 -1
  38. package/lib/module/highlight-updates/utils/RenderTracker.js +900 -1
  39. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +255 -1
  40. package/lib/module/highlight-updates/utils/renderExportFormatter.js +54 -1
  41. package/lib/module/index.js +71 -1
  42. package/lib/module/preset.js +272 -1
  43. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +1 -0
  44. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +1 -0
  45. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +1 -0
  46. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +1 -0
  47. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +1 -0
  48. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +1 -0
  49. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +1 -0
  50. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +1 -0
  51. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +1 -0
  52. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +1 -0
  53. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +1 -0
  54. package/lib/typescript/highlight-updates/components/index.d.ts.map +1 -0
  55. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +1 -0
  56. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +1 -0
  57. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +1 -0
  58. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +1 -0
  59. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +1 -0
  60. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +1 -0
  61. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +1 -0
  62. package/lib/typescript/index.d.ts.map +1 -0
  63. package/lib/typescript/preset.d.ts.map +1 -0
  64. package/package.json +16 -16
  65. package/LICENSE +0 -58
@@ -1 +1,298 @@
1
- "use strict";import React,{memo}from"react";import{View,TouchableOpacity,TextInput,StyleSheet}from"react-native";import{Trash2,Search,Filter,X,Pause,ModalHeader,TabSelector,CopyButton,buoyColors,PowerToggleButton}from"@buoy-gg/shared-ui";import{StatsDisplay}from"./StatsDisplay";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const SearchSectionInner=memo(function({isActive:e,searchText:o,onSearchChange:t,onSearchClose:r}){return e?_jsxs(View,{nativeID:"__rn_buoy__search-container",style:styles.headerSearchContainer,children:[_jsx(Search,{size:14,color:buoyColors.textSecondary}),_jsx(TextInput,{style:styles.headerSearchInput,placeholder:"Search testID, nativeID, component...",placeholderTextColor:buoyColors.textMuted,value:o,onChangeText:t,onSubmitEditing:r,onBlur:r,accessibilityLabel:"Search renders",autoCapitalize:"none",autoCorrect:!1,returnKeyType:"search",autoFocus:!0}),o.length>0?_jsx(TouchableOpacity,{onPress:()=>{t(""),r()},style:styles.headerSearchClear,children:_jsx(X,{size:14,color:buoyColors.textSecondary})}):null]}):null});export const SearchSection=SearchSectionInner;const HeaderActionsInner=memo(function({onSearchToggle:e,onFilterToggle:o,onToggleTracking:t,onToggleFreeze:r,onClear:a,copyData:n,isTracking:s,isFrozen:i,activeFilterCount:l,hasRenders:c}){return _jsxs(ModalHeader.Actions,{children:[_jsx(TouchableOpacity,{onPress:e,style:styles.headerActionButton,children:_jsx(Search,{size:14,color:buoyColors.textSecondary})}),_jsx(TouchableOpacity,{onPress:o,style:[styles.headerActionButton,l>0&&styles.activeFilterButton],children:_jsx(Filter,{size:14,color:l>0?buoyColors.primary:buoyColors.textMuted})}),_jsx(CopyButton,{value:n,size:14,buttonStyle:c?styles.headerActionButton:styles.headerActionButtonCopyDisabled,disabled:!c,colors:{idle:c?buoyColors.textSecondary:buoyColors.textMuted}}),_jsx(TouchableOpacity,{onPress:r,style:[styles.headerActionButton,i&&styles.freezeButton,!s&&styles.headerActionButtonDisabled],disabled:!s,children:_jsx(Pause,{size:14,color:s&&i?buoyColors.primary:buoyColors.textMuted})}),_jsx(PowerToggleButton,{isEnabled:s,onToggle:t,accessibilityLabel:"Toggle render tracking"}),_jsx(TouchableOpacity,{onPress:a,style:[styles.headerActionButton,!c&&styles.headerActionButtonDisabled],disabled:!c,children:_jsx(Trash2,{size:14,color:buoyColors.textMuted})})]})});export const HeaderActions=HeaderActionsInner;export const MainListHeader=memo(function({onBack:e,isSearchActive:o,searchText:t,onSearchChange:r,onSearchToggle:a,onSearchClose:n,onFilterToggle:s,onToggleTracking:i,onToggleFreeze:l,onClear:c,copyData:d,isTracking:u,isFrozen:h,activeFilterCount:y,hasRenders:b,searchInputRef:g}){return _jsxs(ModalHeader,{children:[e&&_jsx(ModalHeader.Navigation,{onBack:e}),_jsx(ModalHeader.Content,{title:"",children:o?_jsx(SearchSection,{isActive:o,searchText:t,onSearchChange:r,onSearchClose:n,searchInputRef:g}):_jsx(StatsDisplay,{})}),_jsx(HeaderActions,{onSearchToggle:a,onFilterToggle:s,onToggleTracking:i,onToggleFreeze:l,onClear:c,copyData:d,isTracking:u,isFrozen:h,activeFilterCount:y,hasRenders:b})]})});export const FilterViewHeader=memo(function({onBack:e,activeTab:o,onTabChange:t,activeFilterCount:r=0}){const a=[{key:"filters",label:"Filters"+(r>0?` (${r})`:"")},{key:"settings",label:"Settings"}];return _jsxs(ModalHeader,{children:[_jsx(ModalHeader.Navigation,{onBack:e}),_jsx(ModalHeader.Content,{title:"",noMargin:!0,children:_jsx(TabSelector,{tabs:a,activeTab:o,onTabChange:e=>t(e)})}),_jsx(ModalHeader.Actions,{})]})});export const DetailViewHeader=memo(function({onBack:e,activeTab:o,onTabChange:t,hasHistory:r=!0}){const a=[{key:"details",label:"Details"},{key:"history",label:"History",disabled:!r}];return _jsxs(ModalHeader,{children:[_jsx(ModalHeader.Navigation,{onBack:e}),_jsx(ModalHeader.Content,{title:"",noMargin:!0,children:_jsx(TabSelector,{tabs:a,activeTab:o,onTabChange:e=>t(e)})}),_jsx(ModalHeader.Actions,{})]})});const styles=StyleSheet.create({headerSearchContainer:{flexDirection:"row",alignItems:"center",backgroundColor:buoyColors.input,borderRadius:10,borderWidth:1,borderColor:buoyColors.border,paddingHorizontal:12,paddingVertical:5},headerSearchInput:{flex:1,color:buoyColors.text,fontSize:13,marginLeft:6,paddingVertical:2},headerSearchClear:{marginLeft:6,padding:4},headerActionButton:{width:32,height:32,borderRadius:8,backgroundColor:buoyColors.hover,borderWidth:1,borderColor:buoyColors.border,alignItems:"center",justifyContent:"center"},headerActionButtonDisabled:{opacity:.55},headerActionButtonCopyDisabled:{width:32,height:32,borderRadius:8,backgroundColor:buoyColors.hover,borderWidth:1,borderColor:buoyColors.border,alignItems:"center",justifyContent:"center",opacity:.55},activeFilterButton:{backgroundColor:buoyColors.primary+"15",borderColor:buoyColors.primary+"40"},freezeButton:{backgroundColor:buoyColors.primary+"15",borderColor:buoyColors.primary+"40"}});
1
+ "use strict";
2
+
3
+ /**
4
+ * ModalHeaderContent
5
+ *
6
+ * Memoized header content components for the HighlightUpdatesModal.
7
+ * Extracted to prevent re-renders when parent state changes unrelated to header.
8
+ *
9
+ * Following the optimization guide: extract inline JSX to memoized components.
10
+ */
11
+
12
+ import React, { memo } from "react";
13
+ import { View, TouchableOpacity, TextInput, StyleSheet } from "react-native";
14
+ import { Trash2, Search, Filter, X, Pause, ModalHeader, TabSelector, CopyButton, buoyColors, PowerToggleButton } from "@buoy-gg/shared-ui";
15
+ import { StatsDisplay } from "./StatsDisplay";
16
+
17
+ // ============================================================================
18
+ // Search Section - isolated component for search UI
19
+ // ============================================================================
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
+ const SearchSectionInner = /*#__PURE__*/memo(function SearchSection({
22
+ isActive,
23
+ searchText,
24
+ onSearchChange,
25
+ onSearchClose
26
+ }) {
27
+ if (!isActive) return null;
28
+ return /*#__PURE__*/_jsxs(View, {
29
+ nativeID: "__rn_buoy__search-container",
30
+ style: styles.headerSearchContainer,
31
+ children: [/*#__PURE__*/_jsx(Search, {
32
+ size: 14,
33
+ color: buoyColors.textSecondary
34
+ }), /*#__PURE__*/_jsx(TextInput, {
35
+ style: styles.headerSearchInput,
36
+ placeholder: "Search testID, nativeID, component...",
37
+ placeholderTextColor: buoyColors.textMuted,
38
+ value: searchText,
39
+ onChangeText: onSearchChange,
40
+ onSubmitEditing: onSearchClose,
41
+ onBlur: onSearchClose,
42
+ accessibilityLabel: "Search renders",
43
+ autoCapitalize: "none",
44
+ autoCorrect: false,
45
+ returnKeyType: "search",
46
+ autoFocus: true
47
+ }), searchText.length > 0 ? /*#__PURE__*/_jsx(TouchableOpacity, {
48
+ onPress: () => {
49
+ onSearchChange("");
50
+ onSearchClose();
51
+ },
52
+ style: styles.headerSearchClear,
53
+ children: /*#__PURE__*/_jsx(X, {
54
+ size: 14,
55
+ color: buoyColors.textSecondary
56
+ })
57
+ }) : null]
58
+ });
59
+ });
60
+ export const SearchSection = SearchSectionInner;
61
+
62
+ // ============================================================================
63
+ // Header Actions - isolated component for action buttons
64
+ // ============================================================================
65
+
66
+ const HeaderActionsInner = /*#__PURE__*/memo(function HeaderActions({
67
+ onSearchToggle,
68
+ onFilterToggle,
69
+ onToggleTracking,
70
+ onToggleFreeze,
71
+ onClear,
72
+ copyData,
73
+ isTracking,
74
+ isFrozen,
75
+ activeFilterCount,
76
+ hasRenders
77
+ }) {
78
+ return /*#__PURE__*/_jsxs(ModalHeader.Actions, {
79
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
80
+ onPress: onSearchToggle,
81
+ style: styles.headerActionButton,
82
+ children: /*#__PURE__*/_jsx(Search, {
83
+ size: 14,
84
+ color: buoyColors.textSecondary
85
+ })
86
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
87
+ onPress: onFilterToggle,
88
+ style: [styles.headerActionButton, activeFilterCount > 0 && styles.activeFilterButton],
89
+ children: /*#__PURE__*/_jsx(Filter, {
90
+ size: 14,
91
+ color: activeFilterCount > 0 ? buoyColors.primary : buoyColors.textMuted
92
+ })
93
+ }), /*#__PURE__*/_jsx(CopyButton, {
94
+ value: copyData,
95
+ size: 14,
96
+ buttonStyle: hasRenders ? styles.headerActionButton : styles.headerActionButtonCopyDisabled,
97
+ disabled: !hasRenders,
98
+ colors: {
99
+ idle: hasRenders ? buoyColors.textSecondary : buoyColors.textMuted
100
+ }
101
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
102
+ onPress: onToggleFreeze,
103
+ style: [styles.headerActionButton, isFrozen && styles.freezeButton, !isTracking && styles.headerActionButtonDisabled],
104
+ disabled: !isTracking,
105
+ children: /*#__PURE__*/_jsx(Pause, {
106
+ size: 14,
107
+ color: !isTracking ? buoyColors.textMuted : isFrozen ? buoyColors.primary : buoyColors.textMuted
108
+ })
109
+ }), /*#__PURE__*/_jsx(PowerToggleButton, {
110
+ isEnabled: isTracking,
111
+ onToggle: onToggleTracking,
112
+ accessibilityLabel: "Toggle render tracking"
113
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
114
+ onPress: onClear,
115
+ style: [styles.headerActionButton, !hasRenders && styles.headerActionButtonDisabled],
116
+ disabled: !hasRenders,
117
+ children: /*#__PURE__*/_jsx(Trash2, {
118
+ size: 14,
119
+ color: hasRenders ? buoyColors.textMuted : buoyColors.textMuted
120
+ })
121
+ })]
122
+ });
123
+ });
124
+ export const HeaderActions = HeaderActionsInner;
125
+
126
+ // ============================================================================
127
+ // Main List Header - complete header for main list view
128
+ // ============================================================================
129
+
130
+ export const MainListHeader = /*#__PURE__*/memo(function MainListHeader({
131
+ onBack,
132
+ isSearchActive,
133
+ searchText,
134
+ onSearchChange,
135
+ onSearchToggle,
136
+ onSearchClose,
137
+ onFilterToggle,
138
+ onToggleTracking,
139
+ onToggleFreeze,
140
+ onClear,
141
+ copyData,
142
+ isTracking,
143
+ isFrozen,
144
+ activeFilterCount,
145
+ hasRenders,
146
+ searchInputRef
147
+ }) {
148
+ return /*#__PURE__*/_jsxs(ModalHeader, {
149
+ children: [onBack && /*#__PURE__*/_jsx(ModalHeader.Navigation, {
150
+ onBack: onBack
151
+ }), /*#__PURE__*/_jsx(ModalHeader.Content, {
152
+ title: "",
153
+ children: isSearchActive ? /*#__PURE__*/_jsx(SearchSection, {
154
+ isActive: isSearchActive,
155
+ searchText: searchText,
156
+ onSearchChange: onSearchChange,
157
+ onSearchClose: onSearchClose,
158
+ searchInputRef: searchInputRef
159
+ }) : /*#__PURE__*/_jsx(StatsDisplay, {})
160
+ }), /*#__PURE__*/_jsx(HeaderActions, {
161
+ onSearchToggle: onSearchToggle,
162
+ onFilterToggle: onFilterToggle,
163
+ onToggleTracking: onToggleTracking,
164
+ onToggleFreeze: onToggleFreeze,
165
+ onClear: onClear,
166
+ copyData: copyData,
167
+ isTracking: isTracking,
168
+ isFrozen: isFrozen,
169
+ activeFilterCount: activeFilterCount,
170
+ hasRenders: hasRenders
171
+ })]
172
+ });
173
+ });
174
+
175
+ // ============================================================================
176
+ // Filter View Header
177
+ // ============================================================================
178
+
179
+ export const FilterViewHeader = /*#__PURE__*/memo(function FilterViewHeader({
180
+ onBack,
181
+ activeTab,
182
+ onTabChange,
183
+ activeFilterCount = 0
184
+ }) {
185
+ const tabs = [{
186
+ key: "filters",
187
+ label: `Filters${activeFilterCount > 0 ? ` (${activeFilterCount})` : ""}`
188
+ }, {
189
+ key: "settings",
190
+ label: "Settings"
191
+ }];
192
+ return /*#__PURE__*/_jsxs(ModalHeader, {
193
+ children: [/*#__PURE__*/_jsx(ModalHeader.Navigation, {
194
+ onBack: onBack
195
+ }), /*#__PURE__*/_jsx(ModalHeader.Content, {
196
+ title: "",
197
+ noMargin: true,
198
+ children: /*#__PURE__*/_jsx(TabSelector, {
199
+ tabs: tabs,
200
+ activeTab: activeTab,
201
+ onTabChange: tab => onTabChange(tab)
202
+ })
203
+ }), /*#__PURE__*/_jsx(ModalHeader.Actions, {})]
204
+ });
205
+ });
206
+
207
+ // ============================================================================
208
+ // Detail View Header
209
+ // ============================================================================
210
+
211
+ export const DetailViewHeader = /*#__PURE__*/memo(function DetailViewHeader({
212
+ onBack,
213
+ activeTab,
214
+ onTabChange,
215
+ hasHistory = true
216
+ }) {
217
+ const tabs = [{
218
+ key: "details",
219
+ label: "Details"
220
+ }, {
221
+ key: "history",
222
+ label: "History",
223
+ disabled: !hasHistory
224
+ }];
225
+ return /*#__PURE__*/_jsxs(ModalHeader, {
226
+ children: [/*#__PURE__*/_jsx(ModalHeader.Navigation, {
227
+ onBack: onBack
228
+ }), /*#__PURE__*/_jsx(ModalHeader.Content, {
229
+ title: "",
230
+ noMargin: true,
231
+ children: /*#__PURE__*/_jsx(TabSelector, {
232
+ tabs: tabs,
233
+ activeTab: activeTab,
234
+ onTabChange: tab => onTabChange(tab)
235
+ })
236
+ }), /*#__PURE__*/_jsx(ModalHeader.Actions, {})]
237
+ });
238
+ });
239
+
240
+ // ============================================================================
241
+ // Styles
242
+ // ============================================================================
243
+
244
+ const styles = StyleSheet.create({
245
+ headerSearchContainer: {
246
+ flexDirection: "row",
247
+ alignItems: "center",
248
+ backgroundColor: buoyColors.input,
249
+ borderRadius: 10,
250
+ borderWidth: 1,
251
+ borderColor: buoyColors.border,
252
+ paddingHorizontal: 12,
253
+ paddingVertical: 5
254
+ },
255
+ headerSearchInput: {
256
+ flex: 1,
257
+ color: buoyColors.text,
258
+ fontSize: 13,
259
+ marginLeft: 6,
260
+ paddingVertical: 2
261
+ },
262
+ headerSearchClear: {
263
+ marginLeft: 6,
264
+ padding: 4
265
+ },
266
+ headerActionButton: {
267
+ width: 32,
268
+ height: 32,
269
+ borderRadius: 8,
270
+ backgroundColor: buoyColors.hover,
271
+ borderWidth: 1,
272
+ borderColor: buoyColors.border,
273
+ alignItems: "center",
274
+ justifyContent: "center"
275
+ },
276
+ headerActionButtonDisabled: {
277
+ opacity: 0.55
278
+ },
279
+ headerActionButtonCopyDisabled: {
280
+ width: 32,
281
+ height: 32,
282
+ borderRadius: 8,
283
+ backgroundColor: buoyColors.hover,
284
+ borderWidth: 1,
285
+ borderColor: buoyColors.border,
286
+ alignItems: "center",
287
+ justifyContent: "center",
288
+ opacity: 0.55
289
+ },
290
+ activeFilterButton: {
291
+ backgroundColor: buoyColors.primary + "15",
292
+ borderColor: buoyColors.primary + "40"
293
+ },
294
+ freezeButton: {
295
+ backgroundColor: buoyColors.primary + "15",
296
+ borderColor: buoyColors.primary + "40"
297
+ }
298
+ });