@buoy-gg/highlight-updates 7.0.41 → 7.0.42

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 (108) hide show
  1. package/README.md +11 -71
  2. package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +1 -281
  3. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1 -1474
  4. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +1 -641
  5. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +1 -273
  6. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +1 -188
  7. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +1 -293
  8. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +1 -508
  9. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +1 -846
  10. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +1 -915
  11. package/lib/commonjs/highlight-updates/components/RenderListItem.js +1 -235
  12. package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +1 -469
  13. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +1 -73
  14. package/lib/commonjs/highlight-updates/types/copySettings.js +1 -107
  15. package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +1 -455
  16. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1929
  17. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +26 -359
  18. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -371
  19. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +5 -1840
  20. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +1 -952
  21. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +1 -264
  22. package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +1 -32
  23. package/lib/commonjs/highlight-updates/utils/devtoolsComponentNames.js +1 -188
  24. package/lib/commonjs/highlight-updates/utils/namedComposite.js +1 -41
  25. package/lib/commonjs/highlight-updates/utils/ownStateChanged.js +1 -103
  26. package/lib/commonjs/highlight-updates/utils/rawEventEmitter.js +1 -50
  27. package/lib/commonjs/highlight-updates/utils/rawEventEmitter.web.js +1 -12
  28. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +1 -58
  29. package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +1 -485
  30. package/lib/commonjs/highlight-updates/utils/screenElements.js +1 -1269
  31. package/lib/commonjs/highlight-updates/utils/tapMatch.js +1 -83
  32. package/lib/commonjs/highlight-updates/utils/testIDs.js +1 -68
  33. package/lib/commonjs/highlight-updates/utils/touchCapture.js +1 -277
  34. package/lib/commonjs/index.js +1 -429
  35. package/lib/commonjs/preset.js +1 -278
  36. package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +1 -235
  37. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +1 -274
  38. package/lib/module/highlight-updates/components/HighlightFilterView.js +1 -1468
  39. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -634
  40. package/lib/module/highlight-updates/components/IdentifierBadge.js +1 -265
  41. package/lib/module/highlight-updates/components/IsolatedRenderList.js +1 -183
  42. package/lib/module/highlight-updates/components/ModalHeaderContent.js +1 -288
  43. package/lib/module/highlight-updates/components/RenderCauseBadge.js +1 -499
  44. package/lib/module/highlight-updates/components/RenderDetailView.js +1 -840
  45. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +1 -908
  46. package/lib/module/highlight-updates/components/RenderListItem.js +1 -230
  47. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +1 -465
  48. package/lib/module/highlight-updates/components/StatsDisplay.js +1 -70
  49. package/lib/module/highlight-updates/types/copySettings.js +1 -102
  50. package/lib/module/highlight-updates/utils/CommitProfiler.js +1 -451
  51. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1925
  52. package/lib/module/highlight-updates/utils/PerformanceLogger.js +26 -353
  53. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -358
  54. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +5 -1830
  55. package/lib/module/highlight-updates/utils/RenderTracker.js +1 -949
  56. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +1 -255
  57. package/lib/module/highlight-updates/utils/copySettingsStorage.js +1 -26
  58. package/lib/module/highlight-updates/utils/devtoolsComponentNames.js +1 -178
  59. package/lib/module/highlight-updates/utils/namedComposite.js +1 -36
  60. package/lib/module/highlight-updates/utils/ownStateChanged.js +1 -98
  61. package/lib/module/highlight-updates/utils/rawEventEmitter.js +1 -46
  62. package/lib/module/highlight-updates/utils/rawEventEmitter.web.js +1 -3
  63. package/lib/module/highlight-updates/utils/renderExportFormatter.js +1 -54
  64. package/lib/module/highlight-updates/utils/rendersExportFormatter.js +1 -478
  65. package/lib/module/highlight-updates/utils/screenElements.js +1 -1263
  66. package/lib/module/highlight-updates/utils/tapMatch.js +1 -76
  67. package/lib/module/highlight-updates/utils/testIDs.js +1 -60
  68. package/lib/module/highlight-updates/utils/touchCapture.js +1 -270
  69. package/lib/module/index.js +1 -130
  70. package/lib/module/preset.js +1 -272
  71. package/lib/module/sync/highlightUpdatesSyncAdapter.js +1 -230
  72. package/lib/web/index.mjs +28 -29
  73. package/package.json +7 -7
  74. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +0 -1
  75. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +0 -1
  76. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +0 -1
  77. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +0 -1
  78. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +0 -1
  79. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +0 -1
  80. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +0 -1
  81. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +0 -1
  82. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +0 -1
  83. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +0 -1
  84. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +0 -1
  85. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +0 -1
  86. package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +0 -1
  87. package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +0 -1
  88. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +0 -1
  89. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +0 -1
  90. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +0 -1
  91. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +0 -1
  92. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +0 -1
  93. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +0 -1
  94. package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +0 -1
  95. package/lib/typescript/highlight-updates/utils/devtoolsComponentNames.d.ts.map +0 -1
  96. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +0 -1
  97. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +0 -1
  98. package/lib/typescript/highlight-updates/utils/rawEventEmitter.d.ts.map +0 -1
  99. package/lib/typescript/highlight-updates/utils/rawEventEmitter.web.d.ts.map +0 -1
  100. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +0 -1
  101. package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +0 -1
  102. package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +0 -1
  103. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +0 -1
  104. package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +0 -1
  105. package/lib/typescript/highlight-updates/utils/touchCapture.d.ts.map +0 -1
  106. package/lib/typescript/index.d.ts.map +0 -1
  107. package/lib/typescript/preset.d.ts.map +0 -1
  108. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +0 -1
@@ -1,230 +1 @@
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;
1
+ "use strict";import f,{useMemo as m}from"react";import{View as a,Text as u,TouchableOpacity as b,StyleSheet as g}from"react-native";import{ChevronRight as h,night as r,useRelativeTime as v,monoFont as y}from"@buoy-gg/shared-ui";import{IdentifierBadge as p}from"./IdentifierBadge";import{RenderCauseBadge as R}from"./RenderCauseBadge";import{renderRowTestID as C}from"../utils/testIDs";import{jsx as o,jsxs as s}from"react/jsx-runtime";function I({render:e,onPress:c}){const t=m(()=>{if(e.testID)return{type:"testID",value:e.testID};if(e.nativeID)return{type:"nativeID",value:e.nativeID};if(e.componentName)return{type:"component",value:e.componentName};if(e.accessibilityLabel)return{type:"accessibilityLabel",value:e.accessibilityLabel};return{type:"nativeTag",value:String(e.nativeTag)}},[e.testID,e.nativeID,e.componentName,e.accessibilityLabel,e.nativeTag]);const n=m(()=>{if(e.accessibilityLabel&&t.type!=="accessibilityLabel"){return{type:"accessibilityLabel",value:e.accessibilityLabel}}return null},[e.accessibilityLabel,t.type]);const d=v(e.lastRenderTime);const l=C(t.value);return s(b,{testID:l,accessibilityRole:"button",accessibilityLabel:`${e.displayName}, ${t.type} ${t.value}, ${e.renderCount} renders`,style:i.container,onPress:()=>c(e),activeOpacity:.7,children:[o(a,{style:[i.colorIndicator,{backgroundColor:e.color}]}),s(a,{style:i.content,children:[s(a,{style:i.topRow,children:[s(a,{style:i.viewTypeContainer,children:[o(u,{testID:`${l}-name`,style:i.viewType,numberOfLines:1,children:e.displayName}),n?o(p,{type:n.type,value:n.value,compact:true,shortLabel:true}):e.displayName!==e.viewType?o(u,{testID:`${l}-type`,style:i.nativeType,numberOfLines:1,children:e.viewType}):null]}),o(a,{style:[i.renderCountBadge,{backgroundColor:e.color+"30"}],children:s(u,{testID:`${l}-count`,style:[i.renderCount,{color:e.color}],children:[e.renderCount,"x"]})})]}),e.lastRenderCause&&o(a,{style:i.causeRow,children:o(R,{testID:`${l}-cause`,cause:e.lastRenderCause,compact:true,showKeys:true,showTwoLevel:true})}),s(a,{style:i.bottomRow,children:[o(a,{style:i.identifierContainer,children:o(p,{testID:`${l}-identifier`,type:t.type,value:t.value,compact:true,shortLabel:true})}),o(u,{testID:`${l}-time`,style:i.timing,children:d})]})]}),o(h,{size:16,color:r.color.textTertiary})]})}export const RenderListItem=f.memo(I,(e,c)=>{const t=e.render;const n=c.render;return t.id===n.id&&t.renderCount===n.renderCount&&t.color===n.color&&t.lastRenderTime===n.lastRenderTime&&t.lastRenderCause?.type===n.lastRenderCause?.type&&t.lastRenderCause?.componentCause===n.lastRenderCause?.componentCause&&e.onPress===c.onPress});const i=g.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,marginHorizontal:12,marginBottom:6,backgroundColor:r.color.surface,borderRadius:8,borderWidth:1,borderColor:r.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:r.color.text},nativeType:{fontSize:10,color:r.color.textTertiary,fontFamily:y,marginTop:1},accessibilityLabel:{fontSize:10,color:r.color.accent,fontStyle:"italic",marginTop:1},renderCountBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},renderCount:{fontSize:11,fontWeight:"700",fontFamily:y},bottomRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},identifierContainer:{flex:1,flexShrink:1,overflow:"hidden"},timing:{fontSize:10,color:r.color.textTertiary,fontWeight:"500",flexShrink:0}});export default RenderListItem;