@buoy-gg/highlight-updates 3.0.1 → 4.0.1

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 (83) 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 +564 -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 +309 -1
  7. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +500 -1
  8. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +803 -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/RendersCopySettingsView.js +562 -1
  12. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +70 -1
  13. package/lib/commonjs/highlight-updates/components/index.js +97 -1
  14. package/lib/commonjs/highlight-updates/types/copySettings.js +107 -1
  15. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1819 -1
  16. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +359 -1
  17. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +371 -1
  18. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1828 -1
  19. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +919 -1
  20. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +264 -1
  21. package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +49 -1
  22. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +58 -1
  23. package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +485 -1
  24. package/lib/commonjs/index.js +320 -1
  25. package/lib/commonjs/preset.js +278 -1
  26. package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +83 -0
  27. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +278 -1
  28. package/lib/module/highlight-updates/components/HighlightFilterView.js +1365 -1
  29. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +558 -1
  30. package/lib/module/highlight-updates/components/IdentifierBadge.js +259 -1
  31. package/lib/module/highlight-updates/components/IsolatedRenderList.js +174 -1
  32. package/lib/module/highlight-updates/components/ModalHeaderContent.js +304 -1
  33. package/lib/module/highlight-updates/components/RenderCauseBadge.js +491 -1
  34. package/lib/module/highlight-updates/components/RenderDetailView.js +797 -1
  35. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +888 -1
  36. package/lib/module/highlight-updates/components/RenderListItem.js +215 -1
  37. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +558 -1
  38. package/lib/module/highlight-updates/components/StatsDisplay.js +67 -1
  39. package/lib/module/highlight-updates/components/index.js +16 -1
  40. package/lib/module/highlight-updates/types/copySettings.js +102 -1
  41. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1815 -1
  42. package/lib/module/highlight-updates/utils/PerformanceLogger.js +353 -1
  43. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +358 -1
  44. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1818 -1
  45. package/lib/module/highlight-updates/utils/RenderTracker.js +916 -1
  46. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +255 -1
  47. package/lib/module/highlight-updates/utils/copySettingsStorage.js +43 -1
  48. package/lib/module/highlight-updates/utils/renderExportFormatter.js +54 -1
  49. package/lib/module/highlight-updates/utils/rendersExportFormatter.js +478 -1
  50. package/lib/module/index.js +74 -1
  51. package/lib/module/preset.js +272 -1
  52. package/lib/module/sync/highlightUpdatesSyncAdapter.js +78 -0
  53. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +1 -0
  54. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +1 -0
  55. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +1 -0
  56. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +1 -0
  57. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +1 -0
  58. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +1 -0
  59. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +1 -0
  60. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +1 -0
  61. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +1 -0
  62. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +1 -0
  63. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +1 -0
  64. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +1 -0
  65. package/lib/typescript/highlight-updates/components/index.d.ts.map +1 -0
  66. package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +1 -0
  67. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts +90 -0
  68. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +1 -0
  69. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +1 -0
  70. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +1 -0
  71. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +1 -0
  72. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts +10 -0
  73. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +1 -0
  74. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +1 -0
  75. package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +1 -0
  76. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +1 -0
  77. package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +1 -0
  78. package/lib/typescript/index.d.ts +1 -0
  79. package/lib/typescript/index.d.ts.map +1 -0
  80. package/lib/typescript/preset.d.ts.map +1 -0
  81. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts +36 -0
  82. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +1 -0
  83. package/package.json +7 -7
@@ -1 +1,215 @@
1
- "use strict";import React,{useMemo}from"react";import{View,Text,TouchableOpacity,StyleSheet}from"react-native";import{ChevronRight,buoyColors,useRelativeTime}from"@buoy-gg/shared-ui";import{IdentifierBadge}from"./IdentifierBadge";import{RenderCauseBadge}from"./RenderCauseBadge";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";function RenderListItemInner({render:e,onPress:t}){const o=useMemo(()=>e.testID?{type:"testID",value:e.testID}:e.nativeID?{type:"nativeID",value:e.nativeID}:e.componentName?{type:"component",value:e.componentName}:e.accessibilityLabel?{type:"accessibilityLabel",value:e.accessibilityLabel}:{type:"nativeTag",value:String(e.nativeTag)},[e.testID,e.nativeID,e.componentName,e.accessibilityLabel,e.nativeTag]),i=useMemo(()=>e.accessibilityLabel&&"accessibilityLabel"!==o.type?{type:"accessibilityLabel",value:e.accessibilityLabel}:null,[e.accessibilityLabel,o.type]),s=useRelativeTime(e.lastRenderTime);return _jsxs(TouchableOpacity,{style:styles.container,onPress:()=>t(e),activeOpacity:.7,children:[_jsx(View,{style:[styles.colorIndicator,{backgroundColor:e.color}]}),_jsxs(View,{style:styles.content,children:[_jsxs(View,{style:styles.topRow,children:[_jsxs(View,{style:styles.viewTypeContainer,children:[_jsx(Text,{style:styles.viewType,numberOfLines:1,children:e.displayName}),i?_jsx(IdentifierBadge,{type:i.type,value:i.value,compact:!0,shortLabel:!0}):e.displayName!==e.viewType?_jsx(Text,{style:styles.nativeType,numberOfLines:1,children:e.viewType}):null]}),_jsx(View,{style:[styles.renderCountBadge,{backgroundColor:e.color+"30"}],children:_jsxs(Text,{style:[styles.renderCount,{color:e.color}],children:[e.renderCount,"x"]})})]}),e.lastRenderCause&&_jsx(View,{style:styles.causeRow,children:_jsx(RenderCauseBadge,{cause:e.lastRenderCause,compact:!0,showKeys:!0,showTwoLevel:!0})}),_jsxs(View,{style:styles.bottomRow,children:[_jsx(View,{style:styles.identifierContainer,children:_jsx(IdentifierBadge,{type:o.type,value:o.value,compact:!0,shortLabel:!0})}),_jsx(Text,{style:styles.timing,children:s})]})]}),_jsx(ChevronRight,{size:16,color:buoyColors.textMuted})]})}export const RenderListItem=React.memo(RenderListItemInner,(e,t)=>{const o=e.render,i=t.render;return o.id===i.id&&o.renderCount===i.renderCount&&o.color===i.color&&o.lastRenderTime===i.lastRenderTime&&o.lastRenderCause?.type===i.lastRenderCause?.type&&o.lastRenderCause?.componentCause===i.lastRenderCause?.componentCause&&e.onPress===t.onPress});const styles=StyleSheet.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,marginHorizontal:12,marginBottom:6,backgroundColor:buoyColors.card,borderRadius:8,borderWidth:1,borderColor:buoyColors.border},colorIndicator:{width:4,height:36,borderRadius:2,marginRight:10},content:{flex:1,marginRight:8},topRow:{flexDirection:"row",alignItems:"center",marginBottom:4},causeRow:{marginBottom:4},viewTypeContainer:{flex:1,marginRight:8},viewType:{fontSize:13,fontWeight:"600",color:buoyColors.text},nativeType:{fontSize:10,color:buoyColors.textMuted,fontFamily:"monospace",marginTop:1},accessibilityLabel:{fontSize:10,color:buoyColors.primary,fontStyle:"italic",marginTop:1},renderCountBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},renderCount:{fontSize:11,fontWeight:"700",fontFamily:"monospace"},bottomRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},identifierContainer:{flex:1,flexShrink:1,overflow:"hidden"},timing:{fontSize:10,color:buoyColors.textMuted,fontWeight:"500",flexShrink:0}});export default RenderListItem;
1
+ "use strict";
2
+
3
+ /**
4
+ * RenderListItem
5
+ *
6
+ * Compact list item showing a tracked component render.
7
+ * Displays viewType, identifier (testID/nativeID/component), render count, and timing.
8
+ */
9
+
10
+ import React, { useMemo } from "react";
11
+ import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
12
+ import { ChevronRight, buoyColors, useRelativeTime } from "@buoy-gg/shared-ui";
13
+ import { IdentifierBadge } from "./IdentifierBadge";
14
+ import { RenderCauseBadge } from "./RenderCauseBadge";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ function RenderListItemInner({
17
+ render,
18
+ onPress
19
+ }) {
20
+ // Get best identifier to show (primary)
21
+ const identifier = useMemo(() => {
22
+ if (render.testID) return {
23
+ type: "testID",
24
+ value: render.testID
25
+ };
26
+ if (render.nativeID) return {
27
+ type: "nativeID",
28
+ value: render.nativeID
29
+ };
30
+ if (render.componentName) return {
31
+ type: "component",
32
+ value: render.componentName
33
+ };
34
+ if (render.accessibilityLabel) return {
35
+ type: "accessibilityLabel",
36
+ value: render.accessibilityLabel
37
+ };
38
+ return {
39
+ type: "nativeTag",
40
+ value: String(render.nativeTag)
41
+ };
42
+ }, [render.testID, render.nativeID, render.componentName, render.accessibilityLabel, render.nativeTag]);
43
+
44
+ // Get secondary identifier (accessibilityLabel if not already primary)
45
+ const secondaryIdentifier = useMemo(() => {
46
+ if (render.accessibilityLabel && identifier.type !== "accessibilityLabel") {
47
+ return {
48
+ type: "accessibilityLabel",
49
+ value: render.accessibilityLabel
50
+ };
51
+ }
52
+ return null;
53
+ }, [render.accessibilityLabel, identifier.type]);
54
+
55
+ // Format time since last render (live-updating)
56
+ const timeSinceRender = useRelativeTime(render.lastRenderTime);
57
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
58
+ style: styles.container,
59
+ onPress: () => onPress(render),
60
+ activeOpacity: 0.7,
61
+ children: [/*#__PURE__*/_jsx(View, {
62
+ style: [styles.colorIndicator, {
63
+ backgroundColor: render.color
64
+ }]
65
+ }), /*#__PURE__*/_jsxs(View, {
66
+ style: styles.content,
67
+ children: [/*#__PURE__*/_jsxs(View, {
68
+ style: styles.topRow,
69
+ children: [/*#__PURE__*/_jsxs(View, {
70
+ style: styles.viewTypeContainer,
71
+ children: [/*#__PURE__*/_jsx(Text, {
72
+ style: styles.viewType,
73
+ numberOfLines: 1,
74
+ children: render.displayName
75
+ }), secondaryIdentifier ? /*#__PURE__*/_jsx(IdentifierBadge, {
76
+ type: secondaryIdentifier.type,
77
+ value: secondaryIdentifier.value,
78
+ compact: true,
79
+ shortLabel: true
80
+ }) : render.displayName !== render.viewType ? /*#__PURE__*/_jsx(Text, {
81
+ style: styles.nativeType,
82
+ numberOfLines: 1,
83
+ children: render.viewType
84
+ }) : null]
85
+ }), /*#__PURE__*/_jsx(View, {
86
+ style: [styles.renderCountBadge, {
87
+ backgroundColor: render.color + "30"
88
+ }],
89
+ children: /*#__PURE__*/_jsxs(Text, {
90
+ style: [styles.renderCount, {
91
+ color: render.color
92
+ }],
93
+ children: [render.renderCount, "x"]
94
+ })
95
+ })]
96
+ }), render.lastRenderCause && /*#__PURE__*/_jsx(View, {
97
+ style: styles.causeRow,
98
+ children: /*#__PURE__*/_jsx(RenderCauseBadge, {
99
+ cause: render.lastRenderCause,
100
+ compact: true,
101
+ showKeys: true,
102
+ showTwoLevel: true
103
+ })
104
+ }), /*#__PURE__*/_jsxs(View, {
105
+ style: styles.bottomRow,
106
+ children: [/*#__PURE__*/_jsx(View, {
107
+ style: styles.identifierContainer,
108
+ children: /*#__PURE__*/_jsx(IdentifierBadge, {
109
+ type: identifier.type,
110
+ value: identifier.value,
111
+ compact: true,
112
+ shortLabel: true
113
+ })
114
+ }), /*#__PURE__*/_jsx(Text, {
115
+ style: styles.timing,
116
+ children: timeSinceRender
117
+ })]
118
+ })]
119
+ }), /*#__PURE__*/_jsx(ChevronRight, {
120
+ size: 16,
121
+ color: buoyColors.textMuted
122
+ })]
123
+ });
124
+ }
125
+
126
+ // Memoize with custom comparison - only re-render when relevant props change
127
+ // This is critical for performance when the modal is open during rapid renders
128
+ export const RenderListItem = /*#__PURE__*/React.memo(RenderListItemInner, (prevProps, nextProps) => {
129
+ // Return true if props are EQUAL (skip re-render)
130
+ // Return false if props are DIFFERENT (trigger re-render)
131
+ const prevRender = prevProps.render;
132
+ const nextRender = nextProps.render;
133
+ return prevRender.id === nextRender.id && prevRender.renderCount === nextRender.renderCount && prevRender.color === nextRender.color && prevRender.lastRenderTime === nextRender.lastRenderTime && prevRender.lastRenderCause?.type === nextRender.lastRenderCause?.type && prevRender.lastRenderCause?.componentCause === nextRender.lastRenderCause?.componentCause && prevProps.onPress === nextProps.onPress;
134
+ });
135
+ const styles = StyleSheet.create({
136
+ container: {
137
+ flexDirection: "row",
138
+ alignItems: "center",
139
+ paddingVertical: 10,
140
+ paddingHorizontal: 12,
141
+ marginHorizontal: 12,
142
+ marginBottom: 6,
143
+ backgroundColor: buoyColors.card,
144
+ borderRadius: 8,
145
+ borderWidth: 1,
146
+ borderColor: buoyColors.border
147
+ },
148
+ colorIndicator: {
149
+ width: 4,
150
+ height: 36,
151
+ borderRadius: 2,
152
+ marginRight: 10
153
+ },
154
+ content: {
155
+ flex: 1,
156
+ marginRight: 8
157
+ },
158
+ topRow: {
159
+ flexDirection: "row",
160
+ alignItems: "center",
161
+ marginBottom: 4
162
+ },
163
+ causeRow: {
164
+ marginBottom: 4
165
+ },
166
+ viewTypeContainer: {
167
+ flex: 1,
168
+ marginRight: 8
169
+ },
170
+ viewType: {
171
+ fontSize: 13,
172
+ fontWeight: "600",
173
+ color: buoyColors.text
174
+ },
175
+ nativeType: {
176
+ fontSize: 10,
177
+ color: buoyColors.textMuted,
178
+ fontFamily: "monospace",
179
+ marginTop: 1
180
+ },
181
+ accessibilityLabel: {
182
+ fontSize: 10,
183
+ color: buoyColors.primary,
184
+ fontStyle: "italic",
185
+ marginTop: 1
186
+ },
187
+ renderCountBadge: {
188
+ paddingHorizontal: 8,
189
+ paddingVertical: 2,
190
+ borderRadius: 10
191
+ },
192
+ renderCount: {
193
+ fontSize: 11,
194
+ fontWeight: "700",
195
+ fontFamily: "monospace"
196
+ },
197
+ bottomRow: {
198
+ flexDirection: "row",
199
+ alignItems: "center",
200
+ justifyContent: "space-between",
201
+ gap: 8
202
+ },
203
+ identifierContainer: {
204
+ flex: 1,
205
+ flexShrink: 1,
206
+ overflow: "hidden"
207
+ },
208
+ timing: {
209
+ fontSize: 10,
210
+ color: buoyColors.textMuted,
211
+ fontWeight: "500",
212
+ flexShrink: 0
213
+ }
214
+ });
215
+ export default RenderListItem;