@buoy-gg/highlight-updates 3.0.0 → 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.
- package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +285 -1
- package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1371 -1
- package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +564 -1
- package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +267 -1
- package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +178 -1
- package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +309 -1
- package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +500 -1
- package/lib/commonjs/highlight-updates/components/RenderDetailView.js +803 -1
- package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +894 -1
- package/lib/commonjs/highlight-updates/components/RenderListItem.js +220 -1
- package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +562 -1
- package/lib/commonjs/highlight-updates/components/StatsDisplay.js +70 -1
- package/lib/commonjs/highlight-updates/components/index.js +97 -1
- package/lib/commonjs/highlight-updates/types/copySettings.js +107 -1
- package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1819 -1
- package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +359 -1
- package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +371 -1
- package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1828 -1
- package/lib/commonjs/highlight-updates/utils/RenderTracker.js +919 -1
- package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +264 -1
- package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +49 -1
- package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +58 -1
- package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +485 -1
- package/lib/commonjs/index.js +320 -1
- package/lib/commonjs/preset.js +278 -1
- package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +83 -0
- package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +278 -1
- package/lib/module/highlight-updates/components/HighlightFilterView.js +1365 -1
- package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +558 -1
- package/lib/module/highlight-updates/components/IdentifierBadge.js +259 -1
- package/lib/module/highlight-updates/components/IsolatedRenderList.js +174 -1
- package/lib/module/highlight-updates/components/ModalHeaderContent.js +304 -1
- package/lib/module/highlight-updates/components/RenderCauseBadge.js +491 -1
- package/lib/module/highlight-updates/components/RenderDetailView.js +797 -1
- package/lib/module/highlight-updates/components/RenderHistoryViewer.js +888 -1
- package/lib/module/highlight-updates/components/RenderListItem.js +215 -1
- package/lib/module/highlight-updates/components/RendersCopySettingsView.js +558 -1
- package/lib/module/highlight-updates/components/StatsDisplay.js +67 -1
- package/lib/module/highlight-updates/components/index.js +16 -1
- package/lib/module/highlight-updates/types/copySettings.js +102 -1
- package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1815 -1
- package/lib/module/highlight-updates/utils/PerformanceLogger.js +353 -1
- package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +358 -1
- package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1818 -1
- package/lib/module/highlight-updates/utils/RenderTracker.js +916 -1
- package/lib/module/highlight-updates/utils/ViewTypeMapper.js +255 -1
- package/lib/module/highlight-updates/utils/copySettingsStorage.js +43 -1
- package/lib/module/highlight-updates/utils/renderExportFormatter.js +54 -1
- package/lib/module/highlight-updates/utils/rendersExportFormatter.js +478 -1
- package/lib/module/index.js +74 -1
- package/lib/module/preset.js +272 -1
- package/lib/module/sync/highlightUpdatesSyncAdapter.js +78 -0
- package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/components/index.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts +90 -0
- package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts +10 -0
- package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +1 -0
- package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/preset.d.ts.map +1 -0
- package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts +36 -0
- package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +1 -0
- package/package.json +7 -7
|
@@ -1 +1,220 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|