@buoy-gg/highlight-updates 7.0.38 → 7.0.40

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 (103) hide show
  1. package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +281 -1
  2. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1474 -1
  3. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +641 -1
  4. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +273 -1
  5. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +188 -1
  6. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +293 -1
  7. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +508 -1
  8. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +846 -1
  9. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +915 -1
  10. package/lib/commonjs/highlight-updates/components/RenderListItem.js +235 -1
  11. package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +469 -1
  12. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +73 -1
  13. package/lib/commonjs/highlight-updates/types/copySettings.js +107 -1
  14. package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +446 -1
  15. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1920 -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 +1840 -1
  19. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +952 -1
  20. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +264 -1
  21. package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +32 -1
  22. package/lib/commonjs/highlight-updates/utils/devtoolsComponentNames.js +188 -1
  23. package/lib/commonjs/highlight-updates/utils/namedComposite.js +41 -1
  24. package/lib/commonjs/highlight-updates/utils/ownStateChanged.js +103 -1
  25. package/lib/commonjs/highlight-updates/utils/rawEventEmitter.js +50 -1
  26. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +58 -1
  27. package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +485 -1
  28. package/lib/commonjs/highlight-updates/utils/screenElements.js +1248 -1
  29. package/lib/commonjs/highlight-updates/utils/tapMatch.js +83 -1
  30. package/lib/commonjs/highlight-updates/utils/testIDs.js +68 -1
  31. package/lib/commonjs/highlight-updates/utils/touchCapture.js +277 -1
  32. package/lib/commonjs/index.js +429 -1
  33. package/lib/commonjs/preset.js +278 -1
  34. package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +235 -1
  35. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +274 -1
  36. package/lib/module/highlight-updates/components/HighlightFilterView.js +1468 -1
  37. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +634 -1
  38. package/lib/module/highlight-updates/components/IdentifierBadge.js +265 -1
  39. package/lib/module/highlight-updates/components/IsolatedRenderList.js +183 -1
  40. package/lib/module/highlight-updates/components/ModalHeaderContent.js +288 -1
  41. package/lib/module/highlight-updates/components/RenderCauseBadge.js +499 -1
  42. package/lib/module/highlight-updates/components/RenderDetailView.js +840 -1
  43. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +908 -1
  44. package/lib/module/highlight-updates/components/RenderListItem.js +230 -1
  45. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +465 -1
  46. package/lib/module/highlight-updates/components/StatsDisplay.js +70 -1
  47. package/lib/module/highlight-updates/types/copySettings.js +102 -1
  48. package/lib/module/highlight-updates/utils/CommitProfiler.js +442 -1
  49. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1916 -1
  50. package/lib/module/highlight-updates/utils/PerformanceLogger.js +353 -1
  51. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +358 -1
  52. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1830 -1
  53. package/lib/module/highlight-updates/utils/RenderTracker.js +949 -1
  54. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +255 -1
  55. package/lib/module/highlight-updates/utils/copySettingsStorage.js +26 -1
  56. package/lib/module/highlight-updates/utils/devtoolsComponentNames.js +178 -1
  57. package/lib/module/highlight-updates/utils/namedComposite.js +36 -1
  58. package/lib/module/highlight-updates/utils/ownStateChanged.js +98 -1
  59. package/lib/module/highlight-updates/utils/rawEventEmitter.js +46 -1
  60. package/lib/module/highlight-updates/utils/renderExportFormatter.js +54 -1
  61. package/lib/module/highlight-updates/utils/rendersExportFormatter.js +478 -1
  62. package/lib/module/highlight-updates/utils/screenElements.js +1242 -1
  63. package/lib/module/highlight-updates/utils/tapMatch.js +76 -1
  64. package/lib/module/highlight-updates/utils/testIDs.js +60 -1
  65. package/lib/module/highlight-updates/utils/touchCapture.js +270 -1
  66. package/lib/module/index.js +130 -1
  67. package/lib/module/preset.js +272 -1
  68. package/lib/module/sync/highlightUpdatesSyncAdapter.js +230 -1
  69. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +1 -0
  70. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +1 -0
  71. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +1 -0
  72. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +1 -0
  73. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +1 -0
  74. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +1 -0
  75. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +1 -0
  76. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +1 -0
  77. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +1 -0
  78. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +1 -0
  79. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +1 -0
  80. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +1 -0
  81. package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +1 -0
  82. package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +1 -0
  83. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +1 -0
  84. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +1 -0
  85. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +1 -0
  86. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +1 -0
  87. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +1 -0
  88. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +1 -0
  89. package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +1 -0
  90. package/lib/typescript/highlight-updates/utils/devtoolsComponentNames.d.ts.map +1 -0
  91. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +1 -0
  92. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +1 -0
  93. package/lib/typescript/highlight-updates/utils/rawEventEmitter.d.ts.map +1 -0
  94. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +1 -0
  95. package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +1 -0
  96. package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +1 -0
  97. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +1 -0
  98. package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +1 -0
  99. package/lib/typescript/highlight-updates/utils/touchCapture.d.ts.map +1 -0
  100. package/lib/typescript/index.d.ts.map +1 -0
  101. package/lib/typescript/preset.d.ts.map +1 -0
  102. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +1 -0
  103. package/package.json +7 -7
@@ -1 +1,230 @@
1
- "use strict";import React,{useMemo}from"react";import{View,Text,TouchableOpacity,StyleSheet}from"react-native";import{ChevronRight,night,useRelativeTime,monoFont}from"@buoy-gg/shared-ui";import{IdentifierBadge}from"./IdentifierBadge";import{RenderCauseBadge}from"./RenderCauseBadge";import{renderRowTestID}from"../utils/testIDs";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";function RenderListItemInner({render:e,onPress:t}){const i=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]),o=useMemo(()=>e.accessibilityLabel&&"accessibilityLabel"!==i.type?{type:"accessibilityLabel",value:e.accessibilityLabel}:null,[e.accessibilityLabel,i.type]),n=useRelativeTime(e.lastRenderTime),r=renderRowTestID(i.value);return _jsxs(TouchableOpacity,{testID:r,accessibilityRole:"button",accessibilityLabel:`${e.displayName}, ${i.type} ${i.value}, ${e.renderCount} renders`,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,{testID:`${r}-name`,style:styles.viewType,numberOfLines:1,children:e.displayName}),o?_jsx(IdentifierBadge,{type:o.type,value:o.value,compact:!0,shortLabel:!0}):e.displayName!==e.viewType?_jsx(Text,{testID:`${r}-type`,style:styles.nativeType,numberOfLines:1,children:e.viewType}):null]}),_jsx(View,{style:[styles.renderCountBadge,{backgroundColor:e.color+"30"}],children:_jsxs(Text,{testID:`${r}-count`,style:[styles.renderCount,{color:e.color}],children:[e.renderCount,"x"]})})]}),e.lastRenderCause&&_jsx(View,{style:styles.causeRow,children:_jsx(RenderCauseBadge,{testID:`${r}-cause`,cause:e.lastRenderCause,compact:!0,showKeys:!0,showTwoLevel:!0})}),_jsxs(View,{style:styles.bottomRow,children:[_jsx(View,{style:styles.identifierContainer,children:_jsx(IdentifierBadge,{testID:`${r}-identifier`,type:i.type,value:i.value,compact:!0,shortLabel:!0})}),_jsx(Text,{testID:`${r}-time`,style:styles.timing,children:n})]})]}),_jsx(ChevronRight,{size:16,color:night.color.textTertiary})]})}export const RenderListItem=React.memo(RenderListItemInner,(e,t)=>{const i=e.render,o=t.render;return i.id===o.id&&i.renderCount===o.renderCount&&i.color===o.color&&i.lastRenderTime===o.lastRenderTime&&i.lastRenderCause?.type===o.lastRenderCause?.type&&i.lastRenderCause?.componentCause===o.lastRenderCause?.componentCause&&e.onPress===t.onPress});const styles=StyleSheet.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,marginHorizontal:12,marginBottom:6,backgroundColor:night.color.surface,borderRadius:8,borderWidth:1,borderColor:night.color.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:night.color.text},nativeType:{fontSize:10,color:night.color.textTertiary,fontFamily:monoFont,marginTop:1},accessibilityLabel:{fontSize:10,color:night.color.accent,fontStyle:"italic",marginTop:1},renderCountBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},renderCount:{fontSize:11,fontWeight:"700",fontFamily:monoFont},bottomRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},identifierContainer:{flex:1,flexShrink:1,overflow:"hidden"},timing:{fontSize:10,color:night.color.textTertiary,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, night, useRelativeTime, monoFont } from "@buoy-gg/shared-ui";
13
+ import { IdentifierBadge } from "./IdentifierBadge";
14
+ import { RenderCauseBadge } from "./RenderCauseBadge";
15
+ import { renderRowTestID } from "../utils/testIDs";
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
+ function RenderListItemInner({
18
+ render,
19
+ onPress
20
+ }) {
21
+ // Get best identifier to show (primary)
22
+ const identifier = useMemo(() => {
23
+ if (render.testID) return {
24
+ type: "testID",
25
+ value: render.testID
26
+ };
27
+ if (render.nativeID) return {
28
+ type: "nativeID",
29
+ value: render.nativeID
30
+ };
31
+ if (render.componentName) return {
32
+ type: "component",
33
+ value: render.componentName
34
+ };
35
+ if (render.accessibilityLabel) return {
36
+ type: "accessibilityLabel",
37
+ value: render.accessibilityLabel
38
+ };
39
+ return {
40
+ type: "nativeTag",
41
+ value: String(render.nativeTag)
42
+ };
43
+ }, [render.testID, render.nativeID, render.componentName, render.accessibilityLabel, render.nativeTag]);
44
+
45
+ // Get secondary identifier (accessibilityLabel if not already primary)
46
+ const secondaryIdentifier = useMemo(() => {
47
+ if (render.accessibilityLabel && identifier.type !== "accessibilityLabel") {
48
+ return {
49
+ type: "accessibilityLabel",
50
+ value: render.accessibilityLabel
51
+ };
52
+ }
53
+ return null;
54
+ }, [render.accessibilityLabel, identifier.type]);
55
+
56
+ // Format time since last render (live-updating)
57
+ const timeSinceRender = useRelativeTime(render.lastRenderTime);
58
+
59
+ // The row is addressed by the identifier it SHOWS, never by nativeTag — see
60
+ // utils/testIDs.ts for why a tag can't be a handle. The label spells the row
61
+ // out for assistive tech, which otherwise gets a coloured bar and a count.
62
+ const rowTestID = renderRowTestID(identifier.value);
63
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
64
+ testID: rowTestID,
65
+ accessibilityRole: "button",
66
+ accessibilityLabel: `${render.displayName}, ${identifier.type} ${identifier.value}, ${render.renderCount} renders`,
67
+ style: styles.container,
68
+ onPress: () => onPress(render),
69
+ activeOpacity: 0.7,
70
+ children: [/*#__PURE__*/_jsx(View, {
71
+ style: [styles.colorIndicator, {
72
+ backgroundColor: render.color
73
+ }]
74
+ }), /*#__PURE__*/_jsxs(View, {
75
+ style: styles.content,
76
+ children: [/*#__PURE__*/_jsxs(View, {
77
+ style: styles.topRow,
78
+ children: [/*#__PURE__*/_jsxs(View, {
79
+ style: styles.viewTypeContainer,
80
+ children: [/*#__PURE__*/_jsx(Text, {
81
+ testID: `${rowTestID}-name`,
82
+ style: styles.viewType,
83
+ numberOfLines: 1,
84
+ children: render.displayName
85
+ }), secondaryIdentifier ? /*#__PURE__*/_jsx(IdentifierBadge, {
86
+ type: secondaryIdentifier.type,
87
+ value: secondaryIdentifier.value,
88
+ compact: true,
89
+ shortLabel: true
90
+ }) : render.displayName !== render.viewType ? /*#__PURE__*/_jsx(Text, {
91
+ testID: `${rowTestID}-type`,
92
+ style: styles.nativeType,
93
+ numberOfLines: 1,
94
+ children: render.viewType
95
+ }) : null]
96
+ }), /*#__PURE__*/_jsx(View, {
97
+ style: [styles.renderCountBadge, {
98
+ backgroundColor: render.color + "30"
99
+ }],
100
+ children: /*#__PURE__*/_jsxs(Text, {
101
+ testID: `${rowTestID}-count`,
102
+ style: [styles.renderCount, {
103
+ color: render.color
104
+ }],
105
+ children: [render.renderCount, "x"]
106
+ })
107
+ })]
108
+ }), render.lastRenderCause && /*#__PURE__*/_jsx(View, {
109
+ style: styles.causeRow,
110
+ children: /*#__PURE__*/_jsx(RenderCauseBadge, {
111
+ testID: `${rowTestID}-cause`,
112
+ cause: render.lastRenderCause,
113
+ compact: true,
114
+ showKeys: true,
115
+ showTwoLevel: true
116
+ })
117
+ }), /*#__PURE__*/_jsxs(View, {
118
+ style: styles.bottomRow,
119
+ children: [/*#__PURE__*/_jsx(View, {
120
+ style: styles.identifierContainer,
121
+ children: /*#__PURE__*/_jsx(IdentifierBadge, {
122
+ testID: `${rowTestID}-identifier`,
123
+ type: identifier.type,
124
+ value: identifier.value,
125
+ compact: true,
126
+ shortLabel: true
127
+ })
128
+ }), /*#__PURE__*/_jsx(Text, {
129
+ testID: `${rowTestID}-time`,
130
+ style: styles.timing,
131
+ children: timeSinceRender
132
+ })]
133
+ })]
134
+ }), /*#__PURE__*/_jsx(ChevronRight, {
135
+ size: 16,
136
+ color: night.color.textTertiary
137
+ })]
138
+ });
139
+ }
140
+
141
+ // Memoize with custom comparison - only re-render when relevant props change
142
+ // This is critical for performance when the modal is open during rapid renders
143
+ export const RenderListItem = /*#__PURE__*/React.memo(RenderListItemInner, (prevProps, nextProps) => {
144
+ // Return true if props are EQUAL (skip re-render)
145
+ // Return false if props are DIFFERENT (trigger re-render)
146
+ const prevRender = prevProps.render;
147
+ const nextRender = nextProps.render;
148
+ 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;
149
+ });
150
+ const styles = StyleSheet.create({
151
+ container: {
152
+ flexDirection: "row",
153
+ alignItems: "center",
154
+ paddingVertical: 10,
155
+ paddingHorizontal: 12,
156
+ marginHorizontal: 12,
157
+ marginBottom: 6,
158
+ backgroundColor: night.color.surface,
159
+ borderRadius: 8,
160
+ borderWidth: 1,
161
+ borderColor: night.color.border
162
+ },
163
+ colorIndicator: {
164
+ width: 4,
165
+ height: 36,
166
+ borderRadius: 2,
167
+ marginRight: 10
168
+ },
169
+ content: {
170
+ flex: 1,
171
+ marginRight: 8
172
+ },
173
+ topRow: {
174
+ flexDirection: "row",
175
+ alignItems: "center",
176
+ marginBottom: 4
177
+ },
178
+ causeRow: {
179
+ marginBottom: 4
180
+ },
181
+ viewTypeContainer: {
182
+ flex: 1,
183
+ marginRight: 8
184
+ },
185
+ viewType: {
186
+ fontSize: 13,
187
+ fontWeight: "600",
188
+ color: night.color.text
189
+ },
190
+ nativeType: {
191
+ fontSize: 10,
192
+ color: night.color.textTertiary,
193
+ fontFamily: monoFont,
194
+ marginTop: 1
195
+ },
196
+ accessibilityLabel: {
197
+ fontSize: 10,
198
+ color: night.color.accent,
199
+ fontStyle: "italic",
200
+ marginTop: 1
201
+ },
202
+ renderCountBadge: {
203
+ paddingHorizontal: 8,
204
+ paddingVertical: 2,
205
+ borderRadius: 10
206
+ },
207
+ renderCount: {
208
+ fontSize: 11,
209
+ fontWeight: "700",
210
+ fontFamily: monoFont
211
+ },
212
+ bottomRow: {
213
+ flexDirection: "row",
214
+ alignItems: "center",
215
+ justifyContent: "space-between",
216
+ gap: 8
217
+ },
218
+ identifierContainer: {
219
+ flex: 1,
220
+ flexShrink: 1,
221
+ overflow: "hidden"
222
+ },
223
+ timing: {
224
+ fontSize: 10,
225
+ color: night.color.textTertiary,
226
+ fontWeight: "500",
227
+ flexShrink: 0
228
+ }
229
+ });
230
+ export default RenderListItem;