@buoy-gg/highlight-updates 2.1.4-beta.2 → 2.1.5

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 (64) hide show
  1. package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +1 -285
  2. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1 -1371
  3. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +1 -592
  4. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +1 -267
  5. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +1 -178
  6. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +1 -303
  7. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +1 -500
  8. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +1 -830
  9. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +1 -894
  10. package/lib/commonjs/highlight-updates/components/RenderListItem.js +1 -226
  11. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +1 -70
  12. package/lib/commonjs/highlight-updates/components/index.js +1 -97
  13. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1427
  14. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +1 -359
  15. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -371
  16. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1 -1828
  17. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +1 -903
  18. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +1 -264
  19. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +1 -58
  20. package/lib/commonjs/index.js +1 -311
  21. package/lib/commonjs/preset.js +1 -278
  22. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +1 -278
  23. package/lib/module/highlight-updates/components/HighlightFilterView.js +1 -1365
  24. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -586
  25. package/lib/module/highlight-updates/components/IdentifierBadge.js +1 -259
  26. package/lib/module/highlight-updates/components/IsolatedRenderList.js +1 -174
  27. package/lib/module/highlight-updates/components/ModalHeaderContent.js +1 -298
  28. package/lib/module/highlight-updates/components/RenderCauseBadge.js +1 -491
  29. package/lib/module/highlight-updates/components/RenderDetailView.js +1 -826
  30. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +1 -888
  31. package/lib/module/highlight-updates/components/RenderListItem.js +1 -221
  32. package/lib/module/highlight-updates/components/StatsDisplay.js +1 -67
  33. package/lib/module/highlight-updates/components/index.js +1 -16
  34. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1423
  35. package/lib/module/highlight-updates/utils/PerformanceLogger.js +1 -353
  36. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -358
  37. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1 -1818
  38. package/lib/module/highlight-updates/utils/RenderTracker.js +1 -900
  39. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +1 -255
  40. package/lib/module/highlight-updates/utils/renderExportFormatter.js +1 -54
  41. package/lib/module/index.js +1 -71
  42. package/lib/module/preset.js +1 -272
  43. package/package.json +7 -7
  44. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +0 -1
  45. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +0 -1
  46. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +0 -1
  47. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +0 -1
  48. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +0 -1
  49. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +0 -1
  50. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +0 -1
  51. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +0 -1
  52. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +0 -1
  53. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +0 -1
  54. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +0 -1
  55. package/lib/typescript/highlight-updates/components/index.d.ts.map +0 -1
  56. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +0 -1
  57. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +0 -1
  58. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +0 -1
  59. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +0 -1
  60. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +0 -1
  61. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +0 -1
  62. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +0 -1
  63. package/lib/typescript/index.d.ts.map +0 -1
  64. package/lib/typescript/preset.d.ts.map +0 -1
@@ -1,221 +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, buoyColors } 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
56
- const timeSinceRender = useMemo(() => {
57
- const diff = Date.now() - render.lastRenderTime;
58
- if (diff < 1000) return "just now";
59
- if (diff < 60000) return `${Math.floor(diff / 1000)}s ago`;
60
- if (diff < 3600000) return `${Math.floor(diff / 60000)}m ago`;
61
- return `${Math.floor(diff / 3600000)}h ago`;
62
- }, [render.lastRenderTime]);
63
- return /*#__PURE__*/_jsxs(TouchableOpacity, {
64
- style: styles.container,
65
- onPress: () => onPress(render),
66
- activeOpacity: 0.7,
67
- children: [/*#__PURE__*/_jsx(View, {
68
- style: [styles.colorIndicator, {
69
- backgroundColor: render.color
70
- }]
71
- }), /*#__PURE__*/_jsxs(View, {
72
- style: styles.content,
73
- children: [/*#__PURE__*/_jsxs(View, {
74
- style: styles.topRow,
75
- children: [/*#__PURE__*/_jsxs(View, {
76
- style: styles.viewTypeContainer,
77
- children: [/*#__PURE__*/_jsx(Text, {
78
- style: styles.viewType,
79
- numberOfLines: 1,
80
- children: render.displayName
81
- }), secondaryIdentifier ? /*#__PURE__*/_jsx(IdentifierBadge, {
82
- type: secondaryIdentifier.type,
83
- value: secondaryIdentifier.value,
84
- compact: true,
85
- shortLabel: true
86
- }) : render.displayName !== render.viewType ? /*#__PURE__*/_jsx(Text, {
87
- style: styles.nativeType,
88
- numberOfLines: 1,
89
- children: render.viewType
90
- }) : null]
91
- }), /*#__PURE__*/_jsx(View, {
92
- style: [styles.renderCountBadge, {
93
- backgroundColor: render.color + "30"
94
- }],
95
- children: /*#__PURE__*/_jsxs(Text, {
96
- style: [styles.renderCount, {
97
- color: render.color
98
- }],
99
- children: [render.renderCount, "x"]
100
- })
101
- })]
102
- }), render.lastRenderCause && /*#__PURE__*/_jsx(View, {
103
- style: styles.causeRow,
104
- children: /*#__PURE__*/_jsx(RenderCauseBadge, {
105
- cause: render.lastRenderCause,
106
- compact: true,
107
- showKeys: true,
108
- showTwoLevel: true
109
- })
110
- }), /*#__PURE__*/_jsxs(View, {
111
- style: styles.bottomRow,
112
- children: [/*#__PURE__*/_jsx(View, {
113
- style: styles.identifierContainer,
114
- children: /*#__PURE__*/_jsx(IdentifierBadge, {
115
- type: identifier.type,
116
- value: identifier.value,
117
- compact: true,
118
- shortLabel: true
119
- })
120
- }), /*#__PURE__*/_jsx(Text, {
121
- style: styles.timing,
122
- children: timeSinceRender
123
- })]
124
- })]
125
- }), /*#__PURE__*/_jsx(ChevronRight, {
126
- size: 16,
127
- color: buoyColors.textMuted
128
- })]
129
- });
130
- }
131
-
132
- // Memoize with custom comparison - only re-render when relevant props change
133
- // This is critical for performance when the modal is open during rapid renders
134
- export const RenderListItem = /*#__PURE__*/React.memo(RenderListItemInner, (prevProps, nextProps) => {
135
- // Return true if props are EQUAL (skip re-render)
136
- // Return false if props are DIFFERENT (trigger re-render)
137
- const prevRender = prevProps.render;
138
- const nextRender = nextProps.render;
139
- 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;
140
- });
141
- const styles = StyleSheet.create({
142
- container: {
143
- flexDirection: "row",
144
- alignItems: "center",
145
- paddingVertical: 10,
146
- paddingHorizontal: 12,
147
- marginHorizontal: 12,
148
- marginBottom: 6,
149
- backgroundColor: buoyColors.card,
150
- borderRadius: 8,
151
- borderWidth: 1,
152
- borderColor: buoyColors.border
153
- },
154
- colorIndicator: {
155
- width: 4,
156
- height: 36,
157
- borderRadius: 2,
158
- marginRight: 10
159
- },
160
- content: {
161
- flex: 1,
162
- marginRight: 8
163
- },
164
- topRow: {
165
- flexDirection: "row",
166
- alignItems: "center",
167
- marginBottom: 4
168
- },
169
- causeRow: {
170
- marginBottom: 4
171
- },
172
- viewTypeContainer: {
173
- flex: 1,
174
- marginRight: 8
175
- },
176
- viewType: {
177
- fontSize: 13,
178
- fontWeight: "600",
179
- color: buoyColors.text
180
- },
181
- nativeType: {
182
- fontSize: 10,
183
- color: buoyColors.textMuted,
184
- fontFamily: "monospace",
185
- marginTop: 1
186
- },
187
- accessibilityLabel: {
188
- fontSize: 10,
189
- color: buoyColors.primary,
190
- fontStyle: "italic",
191
- marginTop: 1
192
- },
193
- renderCountBadge: {
194
- paddingHorizontal: 8,
195
- paddingVertical: 2,
196
- borderRadius: 10
197
- },
198
- renderCount: {
199
- fontSize: 11,
200
- fontWeight: "700",
201
- fontFamily: "monospace"
202
- },
203
- bottomRow: {
204
- flexDirection: "row",
205
- alignItems: "center",
206
- justifyContent: "space-between",
207
- gap: 8
208
- },
209
- identifierContainer: {
210
- flex: 1,
211
- flexShrink: 1,
212
- overflow: "hidden"
213
- },
214
- timing: {
215
- fontSize: 10,
216
- color: buoyColors.textMuted,
217
- fontWeight: "500",
218
- flexShrink: 0
219
- }
220
- });
221
- export default RenderListItem;
1
+ "use strict";import React,{useMemo}from"react";import{View,Text,TouchableOpacity,StyleSheet}from"react-native";import{ChevronRight,buoyColors}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]),r=useMemo(()=>{const t=Date.now()-e.lastRenderTime;return t<1e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:`${Math.floor(t/36e5)}h ago`},[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:r})]})]}),_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,67 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * StatsDisplay
5
- *
6
- * Isolated component for displaying render statistics in the header.
7
- * Subscribes to RenderTracker updates independently so parent header
8
- * doesn't re-render when stats change.
9
- *
10
- * Following the optimization guide: move subscriptions to child components.
11
- */
12
-
13
- import React, { useState, useEffect, memo } from "react";
14
- import { View, Text, StyleSheet } from "react-native";
15
- import { Activity, buoyColors } from "@buoy-gg/shared-ui";
16
- import { RenderTracker } from "../utils/RenderTracker";
17
-
18
- /**
19
- * Isolated stats display that owns its own subscription.
20
- * Only this component re-renders when stats change.
21
- */
22
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
- function StatsDisplayInner() {
24
- const [stats, setStats] = useState({
25
- totalComponents: 0,
26
- totalRenders: 0
27
- });
28
- useEffect(() => {
29
- const unsubscribe = RenderTracker.subscribe(() => {
30
- setStats(RenderTracker.getStats());
31
- });
32
- return unsubscribe;
33
- }, []);
34
- return /*#__PURE__*/_jsxs(View, {
35
- nativeID: "__rn_buoy__stats-row",
36
- style: styles.headerChip,
37
- children: [/*#__PURE__*/_jsx(Activity, {
38
- size: 12,
39
- color: buoyColors.primary
40
- }), /*#__PURE__*/_jsx(Text, {
41
- style: [styles.headerChipValue, {
42
- color: buoyColors.primary
43
- }],
44
- children: stats.totalComponents
45
- })]
46
- });
47
- }
48
- export const StatsDisplay = /*#__PURE__*/memo(StatsDisplayInner);
49
- const styles = StyleSheet.create({
50
- headerChip: {
51
- flexDirection: "row",
52
- alignItems: "center",
53
- gap: 4,
54
- backgroundColor: buoyColors.hover,
55
- paddingHorizontal: 8,
56
- paddingVertical: 5,
57
- borderRadius: 12,
58
- borderWidth: 1,
59
- borderColor: buoyColors.border
60
- },
61
- headerChipValue: {
62
- fontSize: 12,
63
- fontWeight: "600",
64
- fontFamily: "monospace"
65
- }
66
- });
67
- export default StatsDisplay;
1
+ "use strict";import React,{useState,useEffect,memo}from"react";import{View,Text,StyleSheet}from"react-native";import{Activity,buoyColors}from"@buoy-gg/shared-ui";import{RenderTracker}from"../utils/RenderTracker";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";function StatsDisplayInner(){const[e,t]=useState({totalComponents:0,totalRenders:0});return useEffect(()=>RenderTracker.subscribe(()=>{t(RenderTracker.getStats())}),[]),_jsxs(View,{nativeID:"__rn_buoy__stats-row",style:styles.headerChip,children:[_jsx(Activity,{size:12,color:buoyColors.primary}),_jsx(Text,{style:[styles.headerChipValue,{color:buoyColors.primary}],children:e.totalComponents})]})}export const StatsDisplay=memo(StatsDisplayInner);const styles=StyleSheet.create({headerChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:buoyColors.hover,paddingHorizontal:8,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:buoyColors.border},headerChipValue:{fontSize:12,fontWeight:"600",fontFamily:"monospace"}});export default StatsDisplay;
@@ -1,16 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * Highlight Updates Modal Components
5
- */
6
-
7
- export { HighlightUpdatesModal } from "./HighlightUpdatesModal";
8
- export { RenderListItem } from "./RenderListItem";
9
- export { RenderDetailView } from "./RenderDetailView";
10
- export { HighlightFilterView } from "./HighlightFilterView";
11
- export { IdentifierBadge, CategoryBadge, IDENTIFIER_CONFIG } from "./IdentifierBadge";
12
-
13
- // Performance-optimized isolated components
14
- export { IsolatedRenderList } from "./IsolatedRenderList";
15
- export { StatsDisplay } from "./StatsDisplay";
16
- export { MainListHeader, FilterViewHeader, DetailViewHeader, HeaderActions, SearchSection } from "./ModalHeaderContent";
1
+ "use strict";export{HighlightUpdatesModal}from"./HighlightUpdatesModal";export{RenderListItem}from"./RenderListItem";export{RenderDetailView}from"./RenderDetailView";export{HighlightFilterView}from"./HighlightFilterView";export{IdentifierBadge,CategoryBadge,IDENTIFIER_CONFIG}from"./IdentifierBadge";export{IsolatedRenderList}from"./IsolatedRenderList";export{StatsDisplay}from"./StatsDisplay";export{MainListHeader,FilterViewHeader,DetailViewHeader,HeaderActions,SearchSection}from"./ModalHeaderContent";