@buoy-gg/highlight-updates 7.0.36 → 7.0.38

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 (104) hide show
  1. package/README.md +28 -6
  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 -466
  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 -446
  16. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1920
  17. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +1 -359
  18. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -371
  19. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1 -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/renderExportFormatter.js +1 -58
  28. package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +1 -485
  29. package/lib/commonjs/highlight-updates/utils/screenElements.js +1 -1248
  30. package/lib/commonjs/highlight-updates/utils/tapMatch.js +1 -83
  31. package/lib/commonjs/highlight-updates/utils/testIDs.js +1 -68
  32. package/lib/commonjs/highlight-updates/utils/touchCapture.js +1 -277
  33. package/lib/commonjs/index.js +1 -429
  34. package/lib/commonjs/preset.js +1 -278
  35. package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +1 -235
  36. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +1 -274
  37. package/lib/module/highlight-updates/components/HighlightFilterView.js +1 -1468
  38. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -634
  39. package/lib/module/highlight-updates/components/IdentifierBadge.js +1 -265
  40. package/lib/module/highlight-updates/components/IsolatedRenderList.js +1 -183
  41. package/lib/module/highlight-updates/components/ModalHeaderContent.js +1 -288
  42. package/lib/module/highlight-updates/components/RenderCauseBadge.js +1 -499
  43. package/lib/module/highlight-updates/components/RenderDetailView.js +1 -840
  44. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +1 -908
  45. package/lib/module/highlight-updates/components/RenderListItem.js +1 -230
  46. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +1 -462
  47. package/lib/module/highlight-updates/components/StatsDisplay.js +1 -70
  48. package/lib/module/highlight-updates/types/copySettings.js +1 -102
  49. package/lib/module/highlight-updates/utils/CommitProfiler.js +1 -442
  50. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1916
  51. package/lib/module/highlight-updates/utils/PerformanceLogger.js +1 -353
  52. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -358
  53. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1 -1830
  54. package/lib/module/highlight-updates/utils/RenderTracker.js +1 -949
  55. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +1 -255
  56. package/lib/module/highlight-updates/utils/copySettingsStorage.js +1 -26
  57. package/lib/module/highlight-updates/utils/devtoolsComponentNames.js +1 -178
  58. package/lib/module/highlight-updates/utils/namedComposite.js +1 -36
  59. package/lib/module/highlight-updates/utils/ownStateChanged.js +1 -98
  60. package/lib/module/highlight-updates/utils/rawEventEmitter.js +1 -46
  61. package/lib/module/highlight-updates/utils/renderExportFormatter.js +1 -54
  62. package/lib/module/highlight-updates/utils/rendersExportFormatter.js +1 -478
  63. package/lib/module/highlight-updates/utils/screenElements.js +1 -1242
  64. package/lib/module/highlight-updates/utils/tapMatch.js +1 -76
  65. package/lib/module/highlight-updates/utils/testIDs.js +1 -60
  66. package/lib/module/highlight-updates/utils/touchCapture.js +1 -270
  67. package/lib/module/index.js +1 -130
  68. package/lib/module/preset.js +1 -272
  69. package/lib/module/sync/highlightUpdatesSyncAdapter.js +1 -230
  70. package/package.json +8 -8
  71. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +0 -1
  72. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +0 -1
  73. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +0 -1
  74. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +0 -1
  75. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +0 -1
  76. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +0 -1
  77. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +0 -1
  78. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +0 -1
  79. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +0 -1
  80. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +0 -1
  81. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +0 -1
  82. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +0 -1
  83. package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +0 -1
  84. package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +0 -1
  85. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +0 -1
  86. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +0 -1
  87. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +0 -1
  88. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +0 -1
  89. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +0 -1
  90. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +0 -1
  91. package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +0 -1
  92. package/lib/typescript/highlight-updates/utils/devtoolsComponentNames.d.ts.map +0 -1
  93. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +0 -1
  94. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +0 -1
  95. package/lib/typescript/highlight-updates/utils/rawEventEmitter.d.ts.map +0 -1
  96. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +0 -1
  97. package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +0 -1
  98. package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +0 -1
  99. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +0 -1
  100. package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +0 -1
  101. package/lib/typescript/highlight-updates/utils/touchCapture.d.ts.map +0 -1
  102. package/lib/typescript/index.d.ts.map +0 -1
  103. package/lib/typescript/preset.d.ts.map +0 -1
  104. 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 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;