@buoy-gg/highlight-updates 7.0.41 → 7.0.43
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/README.md +11 -71
- package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +1 -281
- package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1 -1474
- package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +1 -641
- package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +1 -273
- package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +1 -188
- package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +1 -293
- package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +1 -508
- package/lib/commonjs/highlight-updates/components/RenderDetailView.js +1 -846
- package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +1 -915
- package/lib/commonjs/highlight-updates/components/RenderListItem.js +1 -235
- package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +1 -469
- package/lib/commonjs/highlight-updates/components/StatsDisplay.js +1 -73
- package/lib/commonjs/highlight-updates/types/copySettings.js +1 -107
- package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +1 -455
- package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1929
- package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +26 -359
- package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -371
- package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +5 -1840
- package/lib/commonjs/highlight-updates/utils/RenderTracker.js +1 -952
- package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +1 -264
- package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +1 -32
- package/lib/commonjs/highlight-updates/utils/devtoolsComponentNames.js +1 -188
- package/lib/commonjs/highlight-updates/utils/namedComposite.js +1 -41
- package/lib/commonjs/highlight-updates/utils/ownStateChanged.js +1 -103
- package/lib/commonjs/highlight-updates/utils/rawEventEmitter.js +1 -50
- package/lib/commonjs/highlight-updates/utils/rawEventEmitter.web.js +1 -12
- package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +1 -58
- package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +1 -485
- package/lib/commonjs/highlight-updates/utils/screenElements.js +1 -1269
- package/lib/commonjs/highlight-updates/utils/tapMatch.js +1 -83
- package/lib/commonjs/highlight-updates/utils/testIDs.js +1 -68
- package/lib/commonjs/highlight-updates/utils/touchCapture.js +1 -277
- package/lib/commonjs/index.js +1 -429
- package/lib/commonjs/preset.js +1 -278
- package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +1 -235
- package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +1 -274
- package/lib/module/highlight-updates/components/HighlightFilterView.js +1 -1468
- package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -634
- package/lib/module/highlight-updates/components/IdentifierBadge.js +1 -265
- package/lib/module/highlight-updates/components/IsolatedRenderList.js +1 -183
- package/lib/module/highlight-updates/components/ModalHeaderContent.js +1 -288
- package/lib/module/highlight-updates/components/RenderCauseBadge.js +1 -499
- package/lib/module/highlight-updates/components/RenderDetailView.js +1 -840
- package/lib/module/highlight-updates/components/RenderHistoryViewer.js +1 -908
- package/lib/module/highlight-updates/components/RenderListItem.js +1 -230
- package/lib/module/highlight-updates/components/RendersCopySettingsView.js +1 -465
- package/lib/module/highlight-updates/components/StatsDisplay.js +1 -70
- package/lib/module/highlight-updates/types/copySettings.js +1 -102
- package/lib/module/highlight-updates/utils/CommitProfiler.js +1 -451
- package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1925
- package/lib/module/highlight-updates/utils/PerformanceLogger.js +26 -353
- package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -358
- package/lib/module/highlight-updates/utils/RenderCauseDetector.js +5 -1830
- package/lib/module/highlight-updates/utils/RenderTracker.js +1 -949
- package/lib/module/highlight-updates/utils/ViewTypeMapper.js +1 -255
- package/lib/module/highlight-updates/utils/copySettingsStorage.js +1 -26
- package/lib/module/highlight-updates/utils/devtoolsComponentNames.js +1 -178
- package/lib/module/highlight-updates/utils/namedComposite.js +1 -36
- package/lib/module/highlight-updates/utils/ownStateChanged.js +1 -98
- package/lib/module/highlight-updates/utils/rawEventEmitter.js +1 -46
- package/lib/module/highlight-updates/utils/rawEventEmitter.web.js +1 -3
- package/lib/module/highlight-updates/utils/renderExportFormatter.js +1 -54
- package/lib/module/highlight-updates/utils/rendersExportFormatter.js +1 -478
- package/lib/module/highlight-updates/utils/screenElements.js +1 -1263
- package/lib/module/highlight-updates/utils/tapMatch.js +1 -76
- package/lib/module/highlight-updates/utils/testIDs.js +1 -60
- package/lib/module/highlight-updates/utils/touchCapture.js +1 -270
- package/lib/module/index.js +1 -130
- package/lib/module/preset.js +1 -272
- package/lib/module/sync/highlightUpdatesSyncAdapter.js +1 -230
- package/lib/web/index.mjs +28 -29
- package/package.json +7 -11
- package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/devtoolsComponentNames.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/rawEventEmitter.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/rawEventEmitter.web.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/touchCapture.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +0 -1
|
@@ -1,255 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* ViewTypeMapper
|
|
3
|
-
*
|
|
4
|
-
* Maps native view class names (e.g., "RCTView", "RCTText") to their
|
|
5
|
-
* developer-friendly React Native component names (e.g., "View", "Text").
|
|
6
|
-
*
|
|
7
|
-
* This makes the render tracking UI more understandable since developers
|
|
8
|
-
* work with component names, not native class names.
|
|
9
|
-
*
|
|
10
|
-
* Sources:
|
|
11
|
-
* - React Native core: packages/react-native/Libraries/Components/*
|
|
12
|
-
* - React Native Android: ReactAndroid/src/main/java/com/facebook/react/views/*
|
|
13
|
-
* - FabricNameComponentMapping.kt
|
|
14
|
-
* - Common third-party libraries (react-native-svg, gesture-handler, etc.)
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
"use strict";
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Mapping from native view class names to React component names.
|
|
21
|
-
*
|
|
22
|
-
* Format: { "NativeClassName": "ComponentName" }
|
|
23
|
-
*/
|
|
24
|
-
export const VIEW_TYPE_MAP = {
|
|
25
|
-
// ==========================================================================
|
|
26
|
-
// REACT NATIVE CORE - Views
|
|
27
|
-
// ==========================================================================
|
|
28
|
-
RCTView: "View",
|
|
29
|
-
RCTSafeAreaView: "SafeAreaView",
|
|
30
|
-
RCTModalHostView: "Modal",
|
|
31
|
-
// ==========================================================================
|
|
32
|
-
// REACT NATIVE CORE - Text
|
|
33
|
-
// ==========================================================================
|
|
34
|
-
RCTText: "Text",
|
|
35
|
-
RCTRawText: "RawText",
|
|
36
|
-
RCTVirtualText: "VirtualText",
|
|
37
|
-
RCTTextInlineImage: "TextInlineImage",
|
|
38
|
-
// ==========================================================================
|
|
39
|
-
// REACT NATIVE CORE - Images
|
|
40
|
-
// ==========================================================================
|
|
41
|
-
RCTImageView: "Image",
|
|
42
|
-
RCTImage: "Image",
|
|
43
|
-
// ==========================================================================
|
|
44
|
-
// REACT NATIVE CORE - ScrollView
|
|
45
|
-
// ==========================================================================
|
|
46
|
-
RCTScrollView: "ScrollView",
|
|
47
|
-
RCTScrollContentView: "ScrollContentView",
|
|
48
|
-
AndroidHorizontalScrollView: "HorizontalScrollView",
|
|
49
|
-
AndroidHorizontalScrollContentView: "HorizontalScrollContentView",
|
|
50
|
-
// ==========================================================================
|
|
51
|
-
// REACT NATIVE CORE - TextInput
|
|
52
|
-
// ==========================================================================
|
|
53
|
-
RCTSinglelineTextInputView: "TextInput",
|
|
54
|
-
RCTMultilineTextInputView: "TextInput (Multiline)",
|
|
55
|
-
AndroidTextInput: "TextInput",
|
|
56
|
-
RCTInputAccessoryView: "InputAccessoryView",
|
|
57
|
-
// ==========================================================================
|
|
58
|
-
// REACT NATIVE CORE - Lists (FlatList/SectionList internals)
|
|
59
|
-
// ==========================================================================
|
|
60
|
-
RCTRefreshControl: "RefreshControl",
|
|
61
|
-
AndroidSwipeRefreshLayout: "RefreshControl",
|
|
62
|
-
PullToRefreshView: "RefreshControl",
|
|
63
|
-
// ==========================================================================
|
|
64
|
-
// REACT NATIVE CORE - Buttons & Touchables
|
|
65
|
-
// ==========================================================================
|
|
66
|
-
RCTSwitch: "Switch",
|
|
67
|
-
AndroidSwitch: "Switch",
|
|
68
|
-
RCTSlider: "Slider",
|
|
69
|
-
// ==========================================================================
|
|
70
|
-
// REACT NATIVE CORE - Activity Indicators
|
|
71
|
-
// ==========================================================================
|
|
72
|
-
RCTActivityIndicatorView: "ActivityIndicator",
|
|
73
|
-
AndroidProgressBar: "ActivityIndicator",
|
|
74
|
-
// ==========================================================================
|
|
75
|
-
// REACT NATIVE CORE - Android-specific
|
|
76
|
-
// ==========================================================================
|
|
77
|
-
AndroidDrawerLayout: "DrawerLayout",
|
|
78
|
-
VirtualView: "VirtualView",
|
|
79
|
-
VirtualViewExperimental: "VirtualView",
|
|
80
|
-
// ==========================================================================
|
|
81
|
-
// REACT NATIVE CORE - Debugging & Internal
|
|
82
|
-
// ==========================================================================
|
|
83
|
-
DebuggingOverlay: "DebuggingOverlay",
|
|
84
|
-
LayoutConformance: "LayoutConformance",
|
|
85
|
-
UnimplementedNativeView: "UnimplementedView",
|
|
86
|
-
// ==========================================================================
|
|
87
|
-
// REACT NATIVE CORE - Legacy/Deprecated
|
|
88
|
-
// ==========================================================================
|
|
89
|
-
RKShimmeringView: "ShimmeringView",
|
|
90
|
-
RCTTemplateView: "TemplateView",
|
|
91
|
-
RCTAxialGradientView: "AxialGradientView",
|
|
92
|
-
// "RCTVideo": "Video",
|
|
93
|
-
RCTMap: "Map",
|
|
94
|
-
RCTWebView: "WebView",
|
|
95
|
-
RCTKeyframes: "Keyframes",
|
|
96
|
-
RCTImpressionTrackingView: "ImpressionTrackingView",
|
|
97
|
-
// ==========================================================================
|
|
98
|
-
// REACT-NATIVE-SVG
|
|
99
|
-
// ==========================================================================
|
|
100
|
-
RNSVGSvgView: "Svg",
|
|
101
|
-
RNSVGGroup: "G",
|
|
102
|
-
RNSVGPath: "Path",
|
|
103
|
-
RNSVGText: "SvgText",
|
|
104
|
-
RNSVGTSpan: "TSpan",
|
|
105
|
-
RNSVGTextPath: "TextPath",
|
|
106
|
-
RNSVGImage: "SvgImage",
|
|
107
|
-
RNSVGCircle: "Circle",
|
|
108
|
-
RNSVGEllipse: "Ellipse",
|
|
109
|
-
RNSVGLine: "Line",
|
|
110
|
-
RNSVGRect: "Rect",
|
|
111
|
-
RNSVGClipPath: "ClipPath",
|
|
112
|
-
RNSVGDefs: "Defs",
|
|
113
|
-
RNSVGUse: "Use",
|
|
114
|
-
RNSVGSymbol: "Symbol",
|
|
115
|
-
RNSVGPattern: "Pattern",
|
|
116
|
-
RNSVGMask: "Mask",
|
|
117
|
-
RNSVGForeignObject: "ForeignObject",
|
|
118
|
-
RNSVGMarker: "Marker",
|
|
119
|
-
RNSVGLinearGradient: "LinearGradient",
|
|
120
|
-
RNSVGRadialGradient: "RadialGradient",
|
|
121
|
-
RNSVGFilter: "Filter",
|
|
122
|
-
RNSVGFeBlend: "FeBlend",
|
|
123
|
-
RNSVGFeColorMatrix: "FeColorMatrix",
|
|
124
|
-
RNSVGFeComposite: "FeComposite",
|
|
125
|
-
RNSVGFeFlood: "FeFlood",
|
|
126
|
-
RNSVGFeGaussianBlur: "FeGaussianBlur",
|
|
127
|
-
RNSVGFeMerge: "FeMerge",
|
|
128
|
-
RNSVGFeOffset: "FeOffset",
|
|
129
|
-
RNSVGPolygon: "Polygon",
|
|
130
|
-
RNSVGPolyline: "Polyline",
|
|
131
|
-
RNSVGStop: "Stop",
|
|
132
|
-
// ==========================================================================
|
|
133
|
-
// REACT-NATIVE-GESTURE-HANDLER
|
|
134
|
-
// ==========================================================================
|
|
135
|
-
RNGestureHandlerRootView: "GestureHandlerRootView",
|
|
136
|
-
RNGestureHandlerButton: "GestureHandlerButton",
|
|
137
|
-
// ==========================================================================
|
|
138
|
-
// REACT-NATIVE-SAFE-AREA-CONTEXT
|
|
139
|
-
// ==========================================================================
|
|
140
|
-
RNCSafeAreaProvider: "SafeAreaProvider",
|
|
141
|
-
RNCSafeAreaView: "SafeAreaView",
|
|
142
|
-
// ==========================================================================
|
|
143
|
-
// REACT-NATIVE-SCREENS (React Navigation)
|
|
144
|
-
// ==========================================================================
|
|
145
|
-
RNSScreen: "Screen",
|
|
146
|
-
RNSScreenContainer: "ScreenContainer",
|
|
147
|
-
RNSScreenStack: "ScreenStack",
|
|
148
|
-
RNSScreenStackHeaderConfig: "ScreenStackHeaderConfig",
|
|
149
|
-
RNSScreenStackHeaderSubview: "ScreenStackHeaderSubview",
|
|
150
|
-
RNSSearchBar: "SearchBar",
|
|
151
|
-
RNSFullWindowOverlay: "FullWindowOverlay",
|
|
152
|
-
RNSModalScreen: "ModalScreen",
|
|
153
|
-
// ==========================================================================
|
|
154
|
-
// REACT-NATIVE-REANIMATED
|
|
155
|
-
// ==========================================================================
|
|
156
|
-
ReanimatedView: "Animated.View",
|
|
157
|
-
// ==========================================================================
|
|
158
|
-
// EXPO MODULES
|
|
159
|
-
// ==========================================================================
|
|
160
|
-
ExpoView: "ExpoView",
|
|
161
|
-
ExpoBlurView: "BlurView",
|
|
162
|
-
ExpoLinearGradient: "LinearGradient",
|
|
163
|
-
ExpoImage: "ExpoImage",
|
|
164
|
-
ExpoVideoView: "VideoView",
|
|
165
|
-
ExpoCamera: "Camera",
|
|
166
|
-
ExpoBarCodeScannerView: "BarCodeScanner",
|
|
167
|
-
// ==========================================================================
|
|
168
|
-
// REACT-NATIVE-WEBVIEW
|
|
169
|
-
// ==========================================================================
|
|
170
|
-
RNCWebView: "WebView",
|
|
171
|
-
// ==========================================================================
|
|
172
|
-
// REACT-NATIVE-MAPS
|
|
173
|
-
// ==========================================================================
|
|
174
|
-
AIRMap: "MapView",
|
|
175
|
-
AIRMapMarker: "Marker",
|
|
176
|
-
AIRMapPolyline: "Polyline",
|
|
177
|
-
AIRMapPolygon: "Polygon",
|
|
178
|
-
AIRMapCircle: "Circle",
|
|
179
|
-
AIRMapCallout: "Callout",
|
|
180
|
-
// ==========================================================================
|
|
181
|
-
// REACT-NATIVE-VIDEO
|
|
182
|
-
// ==========================================================================
|
|
183
|
-
RCTVideo: "Video",
|
|
184
|
-
// ==========================================================================
|
|
185
|
-
// LOTTIE-REACT-NATIVE
|
|
186
|
-
// ==========================================================================
|
|
187
|
-
LottieAnimationView: "LottieView",
|
|
188
|
-
// ==========================================================================
|
|
189
|
-
// REACT-NATIVE-FAST-IMAGE
|
|
190
|
-
// ==========================================================================
|
|
191
|
-
FastImageView: "FastImage"
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Get the developer-friendly component name for a native view type.
|
|
196
|
-
* Returns the original viewType if no mapping exists.
|
|
197
|
-
*
|
|
198
|
-
* @param viewType - The native view class name (e.g., "RCTView")
|
|
199
|
-
* @returns The component name (e.g., "View")
|
|
200
|
-
*/
|
|
201
|
-
export function getComponentDisplayName(viewType) {
|
|
202
|
-
return VIEW_TYPE_MAP[viewType] || viewType;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Get the native view class name for a component name (reverse lookup).
|
|
207
|
-
* Returns null if no mapping exists.
|
|
208
|
-
*
|
|
209
|
-
* @param componentName - The component name (e.g., "View")
|
|
210
|
-
* @returns The native view class name (e.g., "RCTView") or null
|
|
211
|
-
*/
|
|
212
|
-
export function getNativeViewType(componentName) {
|
|
213
|
-
for (const [native, display] of Object.entries(VIEW_TYPE_MAP)) {
|
|
214
|
-
if (display === componentName) {
|
|
215
|
-
return native;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
return null;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Check if a view type is a known native component.
|
|
223
|
-
*
|
|
224
|
-
* @param viewType - The native view class name
|
|
225
|
-
* @returns true if it's a known component
|
|
226
|
-
*/
|
|
227
|
-
export function isKnownViewType(viewType) {
|
|
228
|
-
return viewType in VIEW_TYPE_MAP;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Get all known view types (useful for autocomplete/suggestions).
|
|
233
|
-
*
|
|
234
|
-
* @returns Array of all native view class names
|
|
235
|
-
*/
|
|
236
|
-
export function getAllNativeViewTypes() {
|
|
237
|
-
return Object.keys(VIEW_TYPE_MAP);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Get all known component names (useful for autocomplete/suggestions).
|
|
242
|
-
*
|
|
243
|
-
* @returns Array of all component display names
|
|
244
|
-
*/
|
|
245
|
-
export function getAllComponentNames() {
|
|
246
|
-
return [...new Set(Object.values(VIEW_TYPE_MAP))];
|
|
247
|
-
}
|
|
248
|
-
export default {
|
|
249
|
-
VIEW_TYPE_MAP,
|
|
250
|
-
getComponentDisplayName,
|
|
251
|
-
getNativeViewType,
|
|
252
|
-
isKnownViewType,
|
|
253
|
-
getAllNativeViewTypes,
|
|
254
|
-
getAllComponentNames
|
|
255
|
-
};
|
|
1
|
+
"use strict";export const VIEW_TYPE_MAP={RCTView:"View",RCTSafeAreaView:"SafeAreaView",RCTModalHostView:"Modal",RCTText:"Text",RCTRawText:"RawText",RCTVirtualText:"VirtualText",RCTTextInlineImage:"TextInlineImage",RCTImageView:"Image",RCTImage:"Image",RCTScrollView:"ScrollView",RCTScrollContentView:"ScrollContentView",AndroidHorizontalScrollView:"HorizontalScrollView",AndroidHorizontalScrollContentView:"HorizontalScrollContentView",RCTSinglelineTextInputView:"TextInput",RCTMultilineTextInputView:"TextInput (Multiline)",AndroidTextInput:"TextInput",RCTInputAccessoryView:"InputAccessoryView",RCTRefreshControl:"RefreshControl",AndroidSwipeRefreshLayout:"RefreshControl",PullToRefreshView:"RefreshControl",RCTSwitch:"Switch",AndroidSwitch:"Switch",RCTSlider:"Slider",RCTActivityIndicatorView:"ActivityIndicator",AndroidProgressBar:"ActivityIndicator",AndroidDrawerLayout:"DrawerLayout",VirtualView:"VirtualView",VirtualViewExperimental:"VirtualView",DebuggingOverlay:"DebuggingOverlay",LayoutConformance:"LayoutConformance",UnimplementedNativeView:"UnimplementedView",RKShimmeringView:"ShimmeringView",RCTTemplateView:"TemplateView",RCTAxialGradientView:"AxialGradientView",RCTMap:"Map",RCTWebView:"WebView",RCTKeyframes:"Keyframes",RCTImpressionTrackingView:"ImpressionTrackingView",RNSVGSvgView:"Svg",RNSVGGroup:"G",RNSVGPath:"Path",RNSVGText:"SvgText",RNSVGTSpan:"TSpan",RNSVGTextPath:"TextPath",RNSVGImage:"SvgImage",RNSVGCircle:"Circle",RNSVGEllipse:"Ellipse",RNSVGLine:"Line",RNSVGRect:"Rect",RNSVGClipPath:"ClipPath",RNSVGDefs:"Defs",RNSVGUse:"Use",RNSVGSymbol:"Symbol",RNSVGPattern:"Pattern",RNSVGMask:"Mask",RNSVGForeignObject:"ForeignObject",RNSVGMarker:"Marker",RNSVGLinearGradient:"LinearGradient",RNSVGRadialGradient:"RadialGradient",RNSVGFilter:"Filter",RNSVGFeBlend:"FeBlend",RNSVGFeColorMatrix:"FeColorMatrix",RNSVGFeComposite:"FeComposite",RNSVGFeFlood:"FeFlood",RNSVGFeGaussianBlur:"FeGaussianBlur",RNSVGFeMerge:"FeMerge",RNSVGFeOffset:"FeOffset",RNSVGPolygon:"Polygon",RNSVGPolyline:"Polyline",RNSVGStop:"Stop",RNGestureHandlerRootView:"GestureHandlerRootView",RNGestureHandlerButton:"GestureHandlerButton",RNCSafeAreaProvider:"SafeAreaProvider",RNCSafeAreaView:"SafeAreaView",RNSScreen:"Screen",RNSScreenContainer:"ScreenContainer",RNSScreenStack:"ScreenStack",RNSScreenStackHeaderConfig:"ScreenStackHeaderConfig",RNSScreenStackHeaderSubview:"ScreenStackHeaderSubview",RNSSearchBar:"SearchBar",RNSFullWindowOverlay:"FullWindowOverlay",RNSModalScreen:"ModalScreen",ReanimatedView:"Animated.View",ExpoView:"ExpoView",ExpoBlurView:"BlurView",ExpoLinearGradient:"LinearGradient",ExpoImage:"ExpoImage",ExpoVideoView:"VideoView",ExpoCamera:"Camera",ExpoBarCodeScannerView:"BarCodeScanner",RNCWebView:"WebView",AIRMap:"MapView",AIRMapMarker:"Marker",AIRMapPolyline:"Polyline",AIRMapPolygon:"Polygon",AIRMapCircle:"Circle",AIRMapCallout:"Callout",RCTVideo:"Video",LottieAnimationView:"LottieView",FastImageView:"FastImage"};export function getComponentDisplayName(e){return VIEW_TYPE_MAP[e]||e}export function getNativeViewType(e){for(const[i,r]of Object.entries(VIEW_TYPE_MAP)){if(r===e){return i}}return null}export function isKnownViewType(e){return e in VIEW_TYPE_MAP}export function getAllNativeViewTypes(){return Object.keys(VIEW_TYPE_MAP)}export function getAllComponentNames(){return[...new Set(Object.values(VIEW_TYPE_MAP))]}export default{VIEW_TYPE_MAP,getComponentDisplayName,getNativeViewType,isKnownViewType,getAllNativeViewTypes,getAllComponentNames};
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Copy Settings Storage
|
|
5
|
-
*
|
|
6
|
-
* Persists the highlight-updates copy/export settings through the shared
|
|
7
|
-
* `definePersistedSetting` (merge-over-defaults, best-effort save/clear).
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { definePersistedSetting, devToolsStorageKeys } from "@buoy-gg/shared-ui";
|
|
11
|
-
import { DEFAULT_COPY_SETTINGS } from "../types/copySettings";
|
|
12
|
-
const copySettings = definePersistedSetting(devToolsStorageKeys.highlightUpdates.copySettings(), DEFAULT_COPY_SETTINGS, {
|
|
13
|
-
sanitize: (merged, stored) => ({
|
|
14
|
-
...merged,
|
|
15
|
-
filterCauses: stored?.filterCauses ?? DEFAULT_COPY_SETTINGS.filterCauses
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
export async function saveCopySettings(settings) {
|
|
19
|
-
await copySettings.save(settings);
|
|
20
|
-
}
|
|
21
|
-
export async function loadCopySettings() {
|
|
22
|
-
return copySettings.loadOrNull();
|
|
23
|
-
}
|
|
24
|
-
export async function clearCopySettings() {
|
|
25
|
-
await copySettings.clear();
|
|
26
|
-
}
|
|
1
|
+
"use strict";import{definePersistedSetting as o,devToolsStorageKeys as a}from"@buoy-gg/shared-ui";import{DEFAULT_COPY_SETTINGS as s}from"../types/copySettings";const e=o(a.highlightUpdates.copySettings(),s,{sanitize:(t,i)=>({...t,filterCauses:i?.filterCauses??s.filterCauses})});export async function saveCopySettings(t){await e.save(t)}export async function loadCopySettings(){return e.loadOrNull()}export async function clearCopySettings(){await e.clear()}
|
|
@@ -1,178 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
// ============================================================================
|
|
4
|
-
// Buoy devtools component-name sets, shared by HighlightUpdatesController's
|
|
5
|
-
// per-node exclusion walk and CommitProfiler's subtree pruning.
|
|
6
|
-
//
|
|
7
|
-
// Extracted from HighlightUpdatesController.ts verbatim — keep the split:
|
|
8
|
-
// HIGHLIGHT_* sets are ALWAYS excluded (tracking them causes infinite render
|
|
9
|
-
// loops); OTHER_DEV_TOOLS_* sets are toggleable via the excludeDevTools
|
|
10
|
-
// setting in the highlight flow (CommitProfiler always excludes both).
|
|
11
|
-
// ============================================================================
|
|
12
|
-
|
|
13
|
-
// Components that MUST always be excluded to prevent infinite loops.
|
|
14
|
-
// Includes the Highlight Updates overlay AND the Events tool (which subscribes
|
|
15
|
-
// to render callbacks via RenderTracker.onRenderEvent - tracking its renders
|
|
16
|
-
// would create an infinite callback loop).
|
|
17
|
-
export const HIGHLIGHT_OVERLAY_COMPONENTS = new Set([
|
|
18
|
-
// Highlight Updates overlay components
|
|
19
|
-
"HighlightUpdatesOverlay", "HighlightUpdatesModal", "HighlightFilterView", "RenderDetailView", "RenderListItem", "RenderListItemInner", "RenderHistoryViewer", "RenderHistoryFooter", "RenderCauseBadge", "TwoLevelCauseBadge", "EnhancedCauseDisplay", "IsolatedRenderList", "IsolatedRenderListInner", "StatsDisplay", "StatsDisplayInner", "CurrentStateView", "EventStepperFooter",
|
|
20
|
-
// Events tool components - subscribes to onRenderEvent, tracking these causes infinite loops
|
|
21
|
-
"EventsModal", "UnifiedEventList", "UnifiedEventItem", "UnifiedEventDetail", "UnifiedEventFilters", "UnifiedEventViewer", "ReactQueryEventDetail", "EventsCopySettingsView"]);
|
|
22
|
-
|
|
23
|
-
// Prefixes for always-excluded components (highlight overlay + events tool)
|
|
24
|
-
export const HIGHLIGHT_OVERLAY_PREFIXES = ["HighlightUpdates", "RenderList", "RenderDetail", "RenderHistory", "RenderCause", "EventStepper",
|
|
25
|
-
// Events tool - subscribes to onRenderEvent, must always be excluded
|
|
26
|
-
"UnifiedEvent", "EventsModal", "EventsCopy"];
|
|
27
|
-
|
|
28
|
-
// Other dev tools components - can be toggled via excludeDevTools setting
|
|
29
|
-
export const OTHER_DEV_TOOLS_COMPONENTS = new Set([
|
|
30
|
-
// React Buoy devtools components
|
|
31
|
-
"JsModalComponent", "JsModal", "TypePicker", "PatternInput", "PatternChip", "DetectedItemsSection", "DetectedCategoryBadge", "IdentifierBadge", "CategoryBadge", "AppRenderer", "AppOverlay", "FloatingTools", "DialDevTools", "DevToolsVisibilityProvider", "AppHostProvider", "MinimizedToolsProvider",
|
|
32
|
-
// Shared UI components used in modals
|
|
33
|
-
"ModalHeader", "TabSelector", "SectionHeader", "DraggableHeader", "WindowControls",
|
|
34
|
-
// Shared UI data viewer components (JSON diff viewers, etc.)
|
|
35
|
-
"TreeDiffViewer", "DataViewer", "SplitDiffViewer", "VirtualizedDataExplorer", "DiffSummary", "TypeLegend", "IndentGuides", "IndentGuidesOverlay", "CyberpunkInput", "DiffView", "AnswerCard", "DetailsSection", "DetailRow", "QuickActionsSection", "FilterOptionCard",
|
|
36
|
-
// Modal header sub-components
|
|
37
|
-
"SearchSection", "SearchSectionInner", "HeaderActions", "HeaderActionsInner", "MainListHeader", "FilterViewHeader", "DetailViewHeader",
|
|
38
|
-
// Floating menu components (minimized tools, dial, etc.)
|
|
39
|
-
"FloatingMenu", "FloatingDevTools", "MinimizedToolsStack", "MinimizedToolsContext", "GlitchToolButton", "ExpandablePopover", "CollapsedPeek", "ExpandedWrapper", "DialIcon", "DialMenu", "DialIconItem", "OnboardingTooltip", "MenuLauncherIcon", "DevToolsSettingsModal", "SettingsModal",
|
|
40
|
-
// Image Overlay components
|
|
41
|
-
"ImageOverlayModal", "ImageOverlayStandalone", "ToolCard", "ToolIcon", "GripVerticalIcon", "UserStatus", "Divider",
|
|
42
|
-
// Shared UI icon components (Chevrons, etc.)
|
|
43
|
-
"ChevronDown", "ChevronUp", "ChevronLeft", "ChevronRight", "ChevronDownIcon", "ChevronUpIcon", "ChevronLeftIcon", "ChevronRightIcon",
|
|
44
|
-
// React Native LogBox components (shown on reload/errors)
|
|
45
|
-
"LogBox", "LogBoxLog", "LogBoxLogNotification", "LogBoxNotificationContainer", "_LogBoxNotificationContainer", "LogBoxInspector", "LogBoxInspectorContainer", "LogBoxInspectorHeader", "LogBoxInspectorBody", "LogBoxInspectorFooter", "LogBoxInspectorMessageHeader", "LogBoxInspectorStackFrame", "LogBoxInspectorSection", "LogBoxButton", "LogBoxMessage",
|
|
46
|
-
// Perf-monitor components. The HUD re-renders on every 250ms sample tick
|
|
47
|
-
// during a benchmark recording, so leaving these in would dominate any
|
|
48
|
-
// render-capture result. NOTE: no blanket "Perf" prefix — user benchmark
|
|
49
|
-
// screens are commonly named Perf* (e.g. PerfBenchHeavy in the example app).
|
|
50
|
-
"PerfMonitorOverlay", "PerfMonitorModal", "PerfMonitorRoot", "PerfHudInline", "PerfDiagnostics", "MetricSparkline", "JsFallbackNotice", "AutomationConfigView", "AutomationProgressOverlay", "AutomationResumer", "SaveBenchmarkPrompt", "SavedCasesModal", "BatchBarReport", "BatchReportView",
|
|
51
|
-
// Perf HUD INNER components. The live-highlight exclusion walk climbs at
|
|
52
|
-
// most 30 fiber levels from a flagged host view — the HUD's metric
|
|
53
|
-
// TextInputs sit under deep TextInput/Animated wrappers, so the walk can
|
|
54
|
-
// miss the PerfMonitorOverlay root; near names are what it actually hits.
|
|
55
|
-
"PerfHudInlineInner", "PerfMonitorOverlayInner", "MiniMetric", "MetricRow", "MetricNumber", "MetricSparklineInner", "RecColumn", "PillBody", "FullBody", "TargetLine", "PagesSection", "ProbesSection",
|
|
56
|
-
// JS TOP components without the "JsTop" prefix (which is matched
|
|
57
|
-
// separately). The modal/table re-render on every 250ms snapshot tick.
|
|
58
|
-
"TaskTable", "TaskRow", "BusySparkline"]);
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Other dev-tools prefixes — noise reduction, toggleable via excludeDevTools.
|
|
62
|
-
*
|
|
63
|
-
* EVERY ENTRY HERE MUST BE BUOY-NAMESPACED. These are prefix matches, and a
|
|
64
|
-
* match hides the component from render reports. Generic English words do not
|
|
65
|
-
* belong in this list, because app components share them.
|
|
66
|
-
*
|
|
67
|
-
* This list used to contain `Virtualized`, meant for Buoy's own
|
|
68
|
-
* VirtualizedDataExplorer. React Native's FlatList renders a `VirtualizedList`,
|
|
69
|
-
* so the prefix matched — and because CommitProfiler pruned the whole subtree
|
|
70
|
-
* on a match, Buoy could not see inside ANY FlatList or SectionList in ANY
|
|
71
|
-
* app. Lists are the number-one source of render problems in React Native, and
|
|
72
|
-
* the render tools were blind to all of them. `Dial` was the same trap:
|
|
73
|
-
* "Dialog".startsWith("Dial") is true, so every Dialog vanished too.
|
|
74
|
-
*
|
|
75
|
-
* Names that are generic on their own now live in OTHER_DEV_TOOLS_COMPONENTS
|
|
76
|
-
* as exact matches instead.
|
|
77
|
-
*/
|
|
78
|
-
export const OTHER_DEV_TOOLS_PREFIXES = ["JsModal", "ImageOverlay",
|
|
79
|
-
// Perf-monitor prefixes (safe: user code is Perf*, buoy code is
|
|
80
|
-
// PerfMonitor* / PerfHud*)
|
|
81
|
-
"PerfMonitor", "PerfHud",
|
|
82
|
-
// JS TOP (js-top package)
|
|
83
|
-
"JsTop"];
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Buoy component names that were previously matched by over-broad prefixes.
|
|
87
|
-
* Exact matches only — see the warning above.
|
|
88
|
-
*/
|
|
89
|
-
export const OTHER_DEV_TOOLS_EXACT = new Set(["VirtualizedDataExplorer", "TreeDiffView", "TreeDiffRow", "DataViewer", "DiffView", "DiffSummary", "FloatingDevTools", "FloatingMenu", "FloatingBubble", "MinimizedDock", "DialMenu", "DialItem", "ExpandableSection", "ChevronIcon", "GlitchText", "SettingsModal", "SettingsRow", "OnboardingFlow", "DevToolsMenu"]);
|
|
90
|
-
|
|
91
|
-
// ── Bench "profile our own tools" mode ──────────────────────────────────
|
|
92
|
-
// When enabled (by a dedicated benchmark screen, e.g. the example app's
|
|
93
|
-
// /tool-bench page), render capture INCLUDES Buoy's tool UI so we can
|
|
94
|
-
// benchmark our own devtools. Two groups stay excluded regardless:
|
|
95
|
-
// - highlight overlay + events tool (tracking them = infinite render loop)
|
|
96
|
-
// - perf-monitor UI (the HUD re-renders on every 250ms sample tick while
|
|
97
|
-
// recording, so its renders would dominate any capture result)
|
|
98
|
-
// Only consulted by `isDevToolsComponentName` (the CommitProfiler path) —
|
|
99
|
-
// the highlight flow's own excludeDevTools walk reads the raw sets above
|
|
100
|
-
// and is deliberately unaffected.
|
|
101
|
-
let captureBuoyToolRenders = false;
|
|
102
|
-
export function setCaptureBuoyToolRenders(enabled) {
|
|
103
|
-
captureBuoyToolRenders = enabled;
|
|
104
|
-
}
|
|
105
|
-
export function isCapturingBuoyToolRenders() {
|
|
106
|
-
return captureBuoyToolRenders;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Perf-monitor components without the "PerfMonitor" prefix (which is
|
|
110
|
-
// matched separately). Mirrors the perf entries in OTHER_DEV_TOOLS_*.
|
|
111
|
-
const PERF_MONITOR_ALWAYS_EXCLUDED = new Set(["PerfHudInline", "PerfHudInlineInner", "PerfDiagnostics", "MetricSparkline", "MetricSparklineInner", "JsFallbackNotice", "AutomationConfigView", "AutomationProgressOverlay", "AutomationResumer", "SaveBenchmarkPrompt", "SavedCasesModal", "BatchBarReport", "BatchReportView",
|
|
112
|
-
// HUD inner components — churn every 250ms sample tick while recording.
|
|
113
|
-
"MiniMetric", "MetricRow", "MetricNumber", "RecColumn", "PillBody", "FullBody", "TargetLine", "PagesSection", "ProbesSection"]);
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* True when a name belongs to the perf-monitor UI. These stay excluded
|
|
117
|
-
* even in bench "profile our own tools" mode — the HUD re-renders on
|
|
118
|
-
* every 250ms sample tick while recording, so both capture results and
|
|
119
|
-
* live highlight boxes would be dominated by it.
|
|
120
|
-
*/
|
|
121
|
-
export function isPerfMonitorComponentName(name) {
|
|
122
|
-
return name.startsWith("PerfMonitor") || name.startsWith("PerfHud") || PERF_MONITOR_ALWAYS_EXCLUDED.has(name);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// JS TOP components without the "JsTop" prefix. Mirrors the js-top entries
|
|
126
|
-
// in OTHER_DEV_TOOLS_COMPONENTS.
|
|
127
|
-
const JS_TOP_ALWAYS_EXCLUDED = new Set(["TaskTable", "TaskRow", "BusySparkline"]);
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* True when a name belongs to the JS TOP UI. Stays excluded even in bench
|
|
131
|
-
* "profile our own tools" mode for the same reason as the perf HUD: the
|
|
132
|
-
* task table re-renders on every 250ms snapshot tick while open.
|
|
133
|
-
*/
|
|
134
|
-
export function isJsTopComponentName(name) {
|
|
135
|
-
return name.startsWith("JsTop") || JS_TOP_ALWAYS_EXCLUDED.has(name);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* True when a component display name belongs to Buoy's own devtools UI (or
|
|
140
|
-
* RN's LogBox). Sets are checked first (O(1)), then prefixes.
|
|
141
|
-
*/
|
|
142
|
-
export function isDevToolsComponentName(name) {
|
|
143
|
-
// Always excluded — tracking these causes infinite render loops.
|
|
144
|
-
if (HIGHLIGHT_OVERLAY_COMPONENTS.has(name)) return true;
|
|
145
|
-
for (let i = 0; i < HIGHLIGHT_OVERLAY_PREFIXES.length; i++) {
|
|
146
|
-
if (name.startsWith(HIGHLIGHT_OVERLAY_PREFIXES[i])) return true;
|
|
147
|
-
}
|
|
148
|
-
if (captureBuoyToolRenders) {
|
|
149
|
-
// Benchmarking our own tools: capture everything except the
|
|
150
|
-
// perf-monitor and JS TOP UIs (their 250ms tick churn would drown
|
|
151
|
-
// the result).
|
|
152
|
-
return isPerfMonitorComponentName(name) || isJsTopComponentName(name);
|
|
153
|
-
}
|
|
154
|
-
if (OTHER_DEV_TOOLS_COMPONENTS.has(name)) return true;
|
|
155
|
-
if (OTHER_DEV_TOOLS_EXACT.has(name)) return true;
|
|
156
|
-
for (let i = 0; i < OTHER_DEV_TOOLS_PREFIXES.length; i++) {
|
|
157
|
-
if (name.startsWith(OTHER_DEV_TOOLS_PREFIXES[i])) return true;
|
|
158
|
-
}
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Is this name one whose SUBTREE must be skipped, not merely the node?
|
|
164
|
-
*
|
|
165
|
-
* Only the always-excluded group qualifies: walking Buoy's own render-tracking
|
|
166
|
-
* UI feeds its own renders back in and loops. Everything else in
|
|
167
|
-
* `isDevToolsComponentName` is noise reduction — hide the row, but keep
|
|
168
|
-
* walking, because app components live underneath Buoy chrome (a tool modal
|
|
169
|
-
* renders the host app behind it) and pruning on a NAME is how one bad prefix
|
|
170
|
-
* cost us every FlatList in every app.
|
|
171
|
-
*/
|
|
172
|
-
export function isRenderLoopUnsafeName(name) {
|
|
173
|
-
if (HIGHLIGHT_OVERLAY_COMPONENTS.has(name)) return true;
|
|
174
|
-
for (let i = 0; i < HIGHLIGHT_OVERLAY_PREFIXES.length; i++) {
|
|
175
|
-
if (name.startsWith(HIGHLIGHT_OVERLAY_PREFIXES[i])) return true;
|
|
176
|
-
}
|
|
177
|
-
return false;
|
|
178
|
-
}
|
|
1
|
+
"use strict";export const HIGHLIGHT_OVERLAY_COMPONENTS=new Set(["HighlightUpdatesOverlay","HighlightUpdatesModal","HighlightFilterView","RenderDetailView","RenderListItem","RenderListItemInner","RenderHistoryViewer","RenderHistoryFooter","RenderCauseBadge","TwoLevelCauseBadge","EnhancedCauseDisplay","IsolatedRenderList","IsolatedRenderListInner","StatsDisplay","StatsDisplayInner","CurrentStateView","EventStepperFooter","EventsModal","UnifiedEventList","UnifiedEventItem","UnifiedEventDetail","UnifiedEventFilters","UnifiedEventViewer","ReactQueryEventDetail","EventsCopySettingsView"]);export const HIGHLIGHT_OVERLAY_PREFIXES=["HighlightUpdates","RenderList","RenderDetail","RenderHistory","RenderCause","EventStepper","UnifiedEvent","EventsModal","EventsCopy"];export const OTHER_DEV_TOOLS_COMPONENTS=new Set(["JsModalComponent","JsModal","TypePicker","PatternInput","PatternChip","DetectedItemsSection","DetectedCategoryBadge","IdentifierBadge","CategoryBadge","AppRenderer","AppOverlay","FloatingTools","DialDevTools","DevToolsVisibilityProvider","AppHostProvider","MinimizedToolsProvider","ModalHeader","TabSelector","SectionHeader","DraggableHeader","WindowControls","TreeDiffViewer","DataViewer","SplitDiffViewer","VirtualizedDataExplorer","DiffSummary","TypeLegend","IndentGuides","IndentGuidesOverlay","CyberpunkInput","DiffView","AnswerCard","DetailsSection","DetailRow","QuickActionsSection","FilterOptionCard","SearchSection","SearchSectionInner","HeaderActions","HeaderActionsInner","MainListHeader","FilterViewHeader","DetailViewHeader","FloatingMenu","FloatingDevTools","MinimizedToolsStack","MinimizedToolsContext","GlitchToolButton","ExpandablePopover","CollapsedPeek","ExpandedWrapper","DialIcon","DialMenu","DialIconItem","OnboardingTooltip","MenuLauncherIcon","DevToolsSettingsModal","SettingsModal","ImageOverlayModal","ImageOverlayStandalone","ToolCard","ToolIcon","GripVerticalIcon","UserStatus","Divider","ChevronDown","ChevronUp","ChevronLeft","ChevronRight","ChevronDownIcon","ChevronUpIcon","ChevronLeftIcon","ChevronRightIcon","LogBox","LogBoxLog","LogBoxLogNotification","LogBoxNotificationContainer","_LogBoxNotificationContainer","LogBoxInspector","LogBoxInspectorContainer","LogBoxInspectorHeader","LogBoxInspectorBody","LogBoxInspectorFooter","LogBoxInspectorMessageHeader","LogBoxInspectorStackFrame","LogBoxInspectorSection","LogBoxButton","LogBoxMessage","PerfMonitorOverlay","PerfMonitorModal","PerfMonitorRoot","PerfHudInline","PerfDiagnostics","MetricSparkline","JsFallbackNotice","AutomationConfigView","AutomationProgressOverlay","AutomationResumer","SaveBenchmarkPrompt","SavedCasesModal","BatchBarReport","BatchReportView","PerfHudInlineInner","PerfMonitorOverlayInner","MiniMetric","MetricRow","MetricNumber","MetricSparklineInner","RecColumn","PillBody","FullBody","TargetLine","PagesSection","ProbesSection","TaskTable","TaskRow","BusySparkline"]);export const OTHER_DEV_TOOLS_PREFIXES=["JsModal","ImageOverlay","PerfMonitor","PerfHud","JsTop"];export const OTHER_DEV_TOOLS_EXACT=new Set(["VirtualizedDataExplorer","TreeDiffView","TreeDiffRow","DataViewer","DiffView","DiffSummary","FloatingDevTools","FloatingMenu","FloatingBubble","MinimizedDock","DialMenu","DialItem","ExpandableSection","ChevronIcon","GlitchText","SettingsModal","SettingsRow","OnboardingFlow","DevToolsMenu"]);let o=false;export function setCaptureBuoyToolRenders(e){o=e}export function isCapturingBuoyToolRenders(){return o}const r=new Set(["PerfHudInline","PerfHudInlineInner","PerfDiagnostics","MetricSparkline","MetricSparklineInner","JsFallbackNotice","AutomationConfigView","AutomationProgressOverlay","AutomationResumer","SaveBenchmarkPrompt","SavedCasesModal","BatchBarReport","BatchReportView","MiniMetric","MetricRow","MetricNumber","RecColumn","PillBody","FullBody","TargetLine","PagesSection","ProbesSection"]);export function isPerfMonitorComponentName(e){return e.startsWith("PerfMonitor")||e.startsWith("PerfHud")||r.has(e)}const n=new Set(["TaskTable","TaskRow","BusySparkline"]);export function isJsTopComponentName(e){return e.startsWith("JsTop")||n.has(e)}export function isDevToolsComponentName(e){if(HIGHLIGHT_OVERLAY_COMPONENTS.has(e))return true;for(let t=0;t<HIGHLIGHT_OVERLAY_PREFIXES.length;t++){if(e.startsWith(HIGHLIGHT_OVERLAY_PREFIXES[t]))return true}if(o){return isPerfMonitorComponentName(e)||isJsTopComponentName(e)}if(OTHER_DEV_TOOLS_COMPONENTS.has(e))return true;if(OTHER_DEV_TOOLS_EXACT.has(e))return true;for(let t=0;t<OTHER_DEV_TOOLS_PREFIXES.length;t++){if(e.startsWith(OTHER_DEV_TOOLS_PREFIXES[t]))return true}return false}export function isRenderLoopUnsafeName(e){if(HIGHLIGHT_OVERLAY_COMPONENTS.has(e))return true;for(let t=0;t<HIGHLIGHT_OVERLAY_PREFIXES.length;t++){if(e.startsWith(HIGHLIGHT_OVERLAY_PREFIXES[t]))return true}return false}
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Host views (RCTView / View / Text) drown the Highlight Updates list.
|
|
5
|
-
* Named composites are what you actually want when asking "what re-rendered?"
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const HOST_NAMES = new Set(["View", "RCTView", "Text", "RCTText", "RawText", "RCTRawText", "VirtualText", "RCTVirtualText", "ScrollView", "RCTScrollView", "RCTScrollContentView", "SafeAreaView", "RCTSafeAreaView", "Pressable", "TouchableOpacity", "Image", "RCTImageView"]);
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Fiber names that look like identity but are list chrome / RN internals.
|
|
12
|
-
* Only provably-anonymous names belong here — real components (CopyButton,
|
|
13
|
-
* a user's `Copy`…) must stay visible. "Comp Copy"-style truncated
|
|
14
|
-
* placeholders are handled by the regex in isNamedComposite instead.
|
|
15
|
-
*/
|
|
16
|
-
const PLACEHOLDER_NAMES = new Set(["Unknown", "Anonymous", "CellRenderer", "NativeComponent"]);
|
|
17
|
-
/**
|
|
18
|
-
* True when this row is a named user composite (or has a testID). Host views
|
|
19
|
-
* and anonymous "Comp Copy" wrappers return false.
|
|
20
|
-
*/
|
|
21
|
-
export function isNamedComposite(r) {
|
|
22
|
-
if (r.testID && r.testID.trim()) return true;
|
|
23
|
-
const name = (r.componentName ?? "").trim();
|
|
24
|
-
if (!name) return false;
|
|
25
|
-
if (HOST_NAMES.has(name)) return false;
|
|
26
|
-
if (PLACEHOLDER_NAMES.has(name)) return false;
|
|
27
|
-
const view = (r.viewType ?? "").trim();
|
|
28
|
-
if (view && HOST_NAMES.has(view) && name === view) return false;
|
|
29
|
-
// "Comp Copy" / "1x" style placeholders — no real component identity.
|
|
30
|
-
if (/^comp(\s|$)/i.test(name)) return false;
|
|
31
|
-
if (name.startsWith("_")) return false;
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
export function isHostViewName(name) {
|
|
35
|
-
return !!name && HOST_NAMES.has(name);
|
|
36
|
-
}
|
|
1
|
+
"use strict";const i=new Set(["View","RCTView","Text","RCTText","RawText","RCTRawText","VirtualText","RCTVirtualText","ScrollView","RCTScrollView","RCTScrollContentView","SafeAreaView","RCTSafeAreaView","Pressable","TouchableOpacity","Image","RCTImageView"]);const n=new Set(["Unknown","Anonymous","CellRenderer","NativeComponent"]);export function isNamedComposite(e){if(e.testID&&e.testID.trim())return true;const t=(e.componentName??"").trim();if(!t)return false;if(i.has(t))return false;if(n.has(t))return false;const r=(e.viewType??"").trim();if(r&&i.has(r)&&t===r)return false;if(/^comp(\s|$)/i.test(t))return false;if(t.startsWith("_"))return false;return true}export function isHostViewName(e){return!!e&&i.has(e)}
|
|
@@ -1,98 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* "Did this component's own state actually change?" — one implementation.
|
|
5
|
-
*
|
|
6
|
-
* This package classifies render causes twice, on purpose. `RenderCauseDetector`
|
|
7
|
-
* serves the overlay and rides React DevTools' `traceUpdates`, which hands it
|
|
8
|
-
* fibers at an ambiguous moment — hence its WeakMap fallbacks and fiber-swap
|
|
9
|
-
* detection. `CommitProfiler` serves Bench's render capture from inside
|
|
10
|
-
* `onCommitFiberRoot`, where `fiber` is current and `fiber.alternate` is
|
|
11
|
-
* previous by definition, and where it runs on every composite fiber of every
|
|
12
|
-
* commit and so counts allocations. Those are genuinely different problems and
|
|
13
|
-
* the two classifiers should stay separate.
|
|
14
|
-
*
|
|
15
|
-
* This ONE question is not different between them, and it is the question they
|
|
16
|
-
* both got wrong:
|
|
17
|
-
*
|
|
18
|
-
* `prev.memoizedState !== next.memoizedState`
|
|
19
|
-
*
|
|
20
|
-
* For a function component `memoizedState` is the head of the hook linked list,
|
|
21
|
-
* and React rebuilds that list on every update — `updateWorkInProgressHook`
|
|
22
|
-
* clones each node — so the head is a fresh object whether or not a single
|
|
23
|
-
* hook's value moved. Read as "state changed" it makes "state"/"hooks" the
|
|
24
|
-
* answer for every component that uses ANY hook (a lone `useEffect` is enough)
|
|
25
|
-
* and leaves "parent" reachable only by the vanishingly rare component that
|
|
26
|
-
* uses none.
|
|
27
|
-
*
|
|
28
|
-
* That is the one distinction in either tool a developer acts on: "parent"
|
|
29
|
-
* means memoize it or lift the state, "state" means it genuinely updated and
|
|
30
|
-
* should be left alone. Backwards, it sends you to optimise the thing that was
|
|
31
|
-
* already fine — and in Bench it also silently shrank `wastedRenders`, the
|
|
32
|
-
* number that says whether there is anything to fix at all.
|
|
33
|
-
*
|
|
34
|
-
* Both tools reached that wrong line independently, which is exactly why the
|
|
35
|
-
* answer lives here now rather than in two places that happen to agree.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/** React work tag for a class component — its `memoizedState` IS the state. */
|
|
39
|
-
const CLASS_COMPONENT = 1;
|
|
40
|
-
|
|
41
|
-
/** Guardrail on the hook-list walk; deep hook lists are pathological. */
|
|
42
|
-
const MAX_HOOKS_WALKED = 64;
|
|
43
|
-
|
|
44
|
-
/** Does this look like React's hook linked list rather than class state? */
|
|
45
|
-
function isHookList(head) {
|
|
46
|
-
return !!head && typeof head === "object" && ("next" in head || "queue" in head || "memoizedState" in head);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* True when a STATE hook's value actually moved between two hook-list heads.
|
|
51
|
-
*
|
|
52
|
-
* `queue` is the marker: `useState` and `useReducer` — and everything built on
|
|
53
|
-
* them — own one; effects, memos, callbacks and refs do not. An effect's
|
|
54
|
-
* `memoizedState` is a brand-new object on every single render, which is the
|
|
55
|
-
* specific thing that broke the identity check.
|
|
56
|
-
*
|
|
57
|
-
* Note that a `useRef` mutation is deliberately NOT a state change here. It
|
|
58
|
-
* cannot cause a render, so a render attributed to one is a render blamed on
|
|
59
|
-
* something that did not do it.
|
|
60
|
-
*
|
|
61
|
-
* Conservative where it cannot tell: a class component, or a `memoizedState`
|
|
62
|
-
* that is not a recognisable hook list, falls back to the identity comparison.
|
|
63
|
-
* There the identity IS meaningful (or is the best signal available), so the
|
|
64
|
-
* old behaviour is the right behaviour.
|
|
65
|
-
*
|
|
66
|
-
* Takes the HEADS rather than the fibers because only one of the two callers
|
|
67
|
-
* has a previous fiber to hand — the overlay may be working from a WeakMap
|
|
68
|
-
* snapshot of the previous `memoizedState` instead. Use `ownStateChanged` when
|
|
69
|
-
* you do have both fibers.
|
|
70
|
-
*/
|
|
71
|
-
export function hookStateChanged(prevHead, nextHead, options) {
|
|
72
|
-
if (prevHead === nextHead) return false;
|
|
73
|
-
if (options?.isClassComponent) return true;
|
|
74
|
-
if (!isHookList(nextHead)) return true;
|
|
75
|
-
let p = prevHead;
|
|
76
|
-
let n = nextHead;
|
|
77
|
-
for (let depth = 0; n != null && depth < MAX_HOOKS_WALKED; depth++) {
|
|
78
|
-
if (n.queue != null) {
|
|
79
|
-
// A hook the previous render did not have is a real change.
|
|
80
|
-
if (p == null) return true;
|
|
81
|
-
if (!Object.is(p.memoizedState, n.memoizedState)) return true;
|
|
82
|
-
}
|
|
83
|
-
n = n.next;
|
|
84
|
-
p = p != null ? p.next : null;
|
|
85
|
-
}
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* `hookStateChanged` for callers holding both fibers — the common case inside
|
|
91
|
-
* `onCommitFiberRoot`, where `fiber.alternate` is the previous fiber by
|
|
92
|
-
* definition.
|
|
93
|
-
*/
|
|
94
|
-
export function ownStateChanged(prev, next) {
|
|
95
|
-
return hookStateChanged(prev?.memoizedState, next?.memoizedState, {
|
|
96
|
-
isClassComponent: next?.tag === CLASS_COMPONENT
|
|
97
|
-
});
|
|
98
|
-
}
|
|
1
|
+
"use strict";const r=1;const l=64;function s(t){return!!t&&typeof t==="object"&&("next"in t||"queue"in t||"memoizedState"in t)}export function hookStateChanged(t,e,i){if(t===e)return false;if(i?.isClassComponent)return true;if(!s(e))return true;let n=t;let u=e;for(let o=0;u!=null&&o<l;o++){if(u.queue!=null){if(n==null)return true;if(!Object.is(n.memoizedState,u.memoizedState))return true}u=u.next;n=n!=null?n.next:null}return false}export function ownStateChanged(t,e){return hookStateChanged(t?.memoizedState,e?.memoizedState,{isClassComponent:e?.tag===r})}
|