@buoy-gg/highlight-updates 3.0.1 → 3.0.2

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,220 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.RenderListItem=void 0;var _react=_interopRequireWildcard(require("react")),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_IdentifierBadge=require("./IdentifierBadge"),_RenderCauseBadge=require("./RenderCauseBadge"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var i=new WeakMap,r=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var n,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(n=t?r:i){if(n.has(e))return n.get(e);n.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?n(s,t,a):s[t]=e[t]);return s})(e,t)}function RenderListItemInner({render:e,onPress:t}){const i=(0,_react.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]),r=(0,_react.useMemo)(()=>e.accessibilityLabel&&"accessibilityLabel"!==i.type?{type:"accessibilityLabel",value:e.accessibilityLabel}:null,[e.accessibilityLabel,i.type]),n=(0,_sharedUi.useRelativeTime)(e.lastRenderTime);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:styles.container,onPress:()=>t(e),activeOpacity:.7,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.colorIndicator,{backgroundColor:e.color}]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.content,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.topRow,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.viewTypeContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.viewType,numberOfLines:1,children:e.displayName}),r?(0,_jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge,{type:r.type,value:r.value,compact:!0,shortLabel:!0}):e.displayName!==e.viewType?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.nativeType,numberOfLines:1,children:e.viewType}):null]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.renderCountBadge,{backgroundColor:e.color+"30"}],children:(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:[styles.renderCount,{color:e.color}],children:[e.renderCount,"x"]})})]}),e.lastRenderCause&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.causeRow,children:(0,_jsxRuntime.jsx)(_RenderCauseBadge.RenderCauseBadge,{cause:e.lastRenderCause,compact:!0,showKeys:!0,showTwoLevel:!0})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.bottomRow,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.identifierContainer,children:(0,_jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge,{type:i.type,value:i.value,compact:!0,shortLabel:!0})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timing,children:n})]})]}),(0,_jsxRuntime.jsx)(_sharedUi.ChevronRight,{size:16,color:_sharedUi.buoyColors.textMuted})]})}const RenderListItem=exports.RenderListItem=_react.default.memo(RenderListItemInner,(e,t)=>{const i=e.render,r=t.render;return i.id===r.id&&i.renderCount===r.renderCount&&i.color===r.color&&i.lastRenderTime===r.lastRenderTime&&i.lastRenderCause?.type===r.lastRenderCause?.type&&i.lastRenderCause?.componentCause===r.lastRenderCause?.componentCause&&e.onPress===t.onPress}),styles=_reactNative.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,marginHorizontal:12,marginBottom:6,backgroundColor:_sharedUi.buoyColors.card,borderRadius:8,borderWidth:1,borderColor:_sharedUi.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:_sharedUi.buoyColors.text},nativeType:{fontSize:10,color:_sharedUi.buoyColors.textMuted,fontFamily:"monospace",marginTop:1},accessibilityLabel:{fontSize:10,color:_sharedUi.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:_sharedUi.buoyColors.textMuted,fontWeight:"500",flexShrink:0}});var _default=exports.default=RenderListItem;
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.RenderListItem = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _sharedUi = require("@buoy-gg/shared-ui");
10
+ var _IdentifierBadge = require("./IdentifierBadge");
11
+ var _RenderCauseBadge = require("./RenderCauseBadge");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ /**
15
+ * RenderListItem
16
+ *
17
+ * Compact list item showing a tracked component render.
18
+ * Displays viewType, identifier (testID/nativeID/component), render count, and timing.
19
+ */
20
+
21
+ function RenderListItemInner({
22
+ render,
23
+ onPress
24
+ }) {
25
+ // Get best identifier to show (primary)
26
+ const identifier = (0, _react.useMemo)(() => {
27
+ if (render.testID) return {
28
+ type: "testID",
29
+ value: render.testID
30
+ };
31
+ if (render.nativeID) return {
32
+ type: "nativeID",
33
+ value: render.nativeID
34
+ };
35
+ if (render.componentName) return {
36
+ type: "component",
37
+ value: render.componentName
38
+ };
39
+ if (render.accessibilityLabel) return {
40
+ type: "accessibilityLabel",
41
+ value: render.accessibilityLabel
42
+ };
43
+ return {
44
+ type: "nativeTag",
45
+ value: String(render.nativeTag)
46
+ };
47
+ }, [render.testID, render.nativeID, render.componentName, render.accessibilityLabel, render.nativeTag]);
48
+
49
+ // Get secondary identifier (accessibilityLabel if not already primary)
50
+ const secondaryIdentifier = (0, _react.useMemo)(() => {
51
+ if (render.accessibilityLabel && identifier.type !== "accessibilityLabel") {
52
+ return {
53
+ type: "accessibilityLabel",
54
+ value: render.accessibilityLabel
55
+ };
56
+ }
57
+ return null;
58
+ }, [render.accessibilityLabel, identifier.type]);
59
+
60
+ // Format time since last render (live-updating)
61
+ const timeSinceRender = (0, _sharedUi.useRelativeTime)(render.lastRenderTime);
62
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
63
+ style: styles.container,
64
+ onPress: () => onPress(render),
65
+ activeOpacity: 0.7,
66
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
67
+ style: [styles.colorIndicator, {
68
+ backgroundColor: render.color
69
+ }]
70
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
71
+ style: styles.content,
72
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
73
+ style: styles.topRow,
74
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
75
+ style: styles.viewTypeContainer,
76
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
77
+ style: styles.viewType,
78
+ numberOfLines: 1,
79
+ children: render.displayName
80
+ }), secondaryIdentifier ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge, {
81
+ type: secondaryIdentifier.type,
82
+ value: secondaryIdentifier.value,
83
+ compact: true,
84
+ shortLabel: true
85
+ }) : render.displayName !== render.viewType ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
86
+ style: styles.nativeType,
87
+ numberOfLines: 1,
88
+ children: render.viewType
89
+ }) : null]
90
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
91
+ style: [styles.renderCountBadge, {
92
+ backgroundColor: render.color + "30"
93
+ }],
94
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
95
+ style: [styles.renderCount, {
96
+ color: render.color
97
+ }],
98
+ children: [render.renderCount, "x"]
99
+ })
100
+ })]
101
+ }), render.lastRenderCause && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
102
+ style: styles.causeRow,
103
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderCauseBadge.RenderCauseBadge, {
104
+ cause: render.lastRenderCause,
105
+ compact: true,
106
+ showKeys: true,
107
+ showTwoLevel: true
108
+ })
109
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
110
+ style: styles.bottomRow,
111
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
112
+ style: styles.identifierContainer,
113
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge, {
114
+ type: identifier.type,
115
+ value: identifier.value,
116
+ compact: true,
117
+ shortLabel: true
118
+ })
119
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
120
+ style: styles.timing,
121
+ children: timeSinceRender
122
+ })]
123
+ })]
124
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronRight, {
125
+ size: 16,
126
+ color: _sharedUi.buoyColors.textMuted
127
+ })]
128
+ });
129
+ }
130
+
131
+ // Memoize with custom comparison - only re-render when relevant props change
132
+ // This is critical for performance when the modal is open during rapid renders
133
+ const RenderListItem = exports.RenderListItem = /*#__PURE__*/_react.default.memo(RenderListItemInner, (prevProps, nextProps) => {
134
+ // Return true if props are EQUAL (skip re-render)
135
+ // Return false if props are DIFFERENT (trigger re-render)
136
+ const prevRender = prevProps.render;
137
+ const nextRender = nextProps.render;
138
+ 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;
139
+ });
140
+ const styles = _reactNative.StyleSheet.create({
141
+ container: {
142
+ flexDirection: "row",
143
+ alignItems: "center",
144
+ paddingVertical: 10,
145
+ paddingHorizontal: 12,
146
+ marginHorizontal: 12,
147
+ marginBottom: 6,
148
+ backgroundColor: _sharedUi.buoyColors.card,
149
+ borderRadius: 8,
150
+ borderWidth: 1,
151
+ borderColor: _sharedUi.buoyColors.border
152
+ },
153
+ colorIndicator: {
154
+ width: 4,
155
+ height: 36,
156
+ borderRadius: 2,
157
+ marginRight: 10
158
+ },
159
+ content: {
160
+ flex: 1,
161
+ marginRight: 8
162
+ },
163
+ topRow: {
164
+ flexDirection: "row",
165
+ alignItems: "center",
166
+ marginBottom: 4
167
+ },
168
+ causeRow: {
169
+ marginBottom: 4
170
+ },
171
+ viewTypeContainer: {
172
+ flex: 1,
173
+ marginRight: 8
174
+ },
175
+ viewType: {
176
+ fontSize: 13,
177
+ fontWeight: "600",
178
+ color: _sharedUi.buoyColors.text
179
+ },
180
+ nativeType: {
181
+ fontSize: 10,
182
+ color: _sharedUi.buoyColors.textMuted,
183
+ fontFamily: "monospace",
184
+ marginTop: 1
185
+ },
186
+ accessibilityLabel: {
187
+ fontSize: 10,
188
+ color: _sharedUi.buoyColors.primary,
189
+ fontStyle: "italic",
190
+ marginTop: 1
191
+ },
192
+ renderCountBadge: {
193
+ paddingHorizontal: 8,
194
+ paddingVertical: 2,
195
+ borderRadius: 10
196
+ },
197
+ renderCount: {
198
+ fontSize: 11,
199
+ fontWeight: "700",
200
+ fontFamily: "monospace"
201
+ },
202
+ bottomRow: {
203
+ flexDirection: "row",
204
+ alignItems: "center",
205
+ justifyContent: "space-between",
206
+ gap: 8
207
+ },
208
+ identifierContainer: {
209
+ flex: 1,
210
+ flexShrink: 1,
211
+ overflow: "hidden"
212
+ },
213
+ timing: {
214
+ fontSize: 10,
215
+ color: _sharedUi.buoyColors.textMuted,
216
+ fontWeight: "500",
217
+ flexShrink: 0
218
+ }
219
+ });
220
+ var _default = exports.default = RenderListItem;