@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,264 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
25
|
+
value: true
|
|
26
|
+
});
|
|
27
|
+
exports.default = exports.VIEW_TYPE_MAP = void 0;
|
|
28
|
+
exports.getAllComponentNames = getAllComponentNames;
|
|
29
|
+
exports.getAllNativeViewTypes = getAllNativeViewTypes;
|
|
30
|
+
exports.getComponentDisplayName = getComponentDisplayName;
|
|
31
|
+
exports.getNativeViewType = getNativeViewType;
|
|
32
|
+
exports.isKnownViewType = isKnownViewType;
|
|
33
|
+
const VIEW_TYPE_MAP = exports.VIEW_TYPE_MAP = {
|
|
34
|
+
// ==========================================================================
|
|
35
|
+
// REACT NATIVE CORE - Views
|
|
36
|
+
// ==========================================================================
|
|
37
|
+
RCTView: "View",
|
|
38
|
+
RCTSafeAreaView: "SafeAreaView",
|
|
39
|
+
RCTModalHostView: "Modal",
|
|
40
|
+
// ==========================================================================
|
|
41
|
+
// REACT NATIVE CORE - Text
|
|
42
|
+
// ==========================================================================
|
|
43
|
+
RCTText: "Text",
|
|
44
|
+
RCTRawText: "RawText",
|
|
45
|
+
RCTVirtualText: "VirtualText",
|
|
46
|
+
RCTTextInlineImage: "TextInlineImage",
|
|
47
|
+
// ==========================================================================
|
|
48
|
+
// REACT NATIVE CORE - Images
|
|
49
|
+
// ==========================================================================
|
|
50
|
+
RCTImageView: "Image",
|
|
51
|
+
RCTImage: "Image",
|
|
52
|
+
// ==========================================================================
|
|
53
|
+
// REACT NATIVE CORE - ScrollView
|
|
54
|
+
// ==========================================================================
|
|
55
|
+
RCTScrollView: "ScrollView",
|
|
56
|
+
RCTScrollContentView: "ScrollContentView",
|
|
57
|
+
AndroidHorizontalScrollView: "HorizontalScrollView",
|
|
58
|
+
AndroidHorizontalScrollContentView: "HorizontalScrollContentView",
|
|
59
|
+
// ==========================================================================
|
|
60
|
+
// REACT NATIVE CORE - TextInput
|
|
61
|
+
// ==========================================================================
|
|
62
|
+
RCTSinglelineTextInputView: "TextInput",
|
|
63
|
+
RCTMultilineTextInputView: "TextInput (Multiline)",
|
|
64
|
+
AndroidTextInput: "TextInput",
|
|
65
|
+
RCTInputAccessoryView: "InputAccessoryView",
|
|
66
|
+
// ==========================================================================
|
|
67
|
+
// REACT NATIVE CORE - Lists (FlatList/SectionList internals)
|
|
68
|
+
// ==========================================================================
|
|
69
|
+
RCTRefreshControl: "RefreshControl",
|
|
70
|
+
AndroidSwipeRefreshLayout: "RefreshControl",
|
|
71
|
+
PullToRefreshView: "RefreshControl",
|
|
72
|
+
// ==========================================================================
|
|
73
|
+
// REACT NATIVE CORE - Buttons & Touchables
|
|
74
|
+
// ==========================================================================
|
|
75
|
+
RCTSwitch: "Switch",
|
|
76
|
+
AndroidSwitch: "Switch",
|
|
77
|
+
RCTSlider: "Slider",
|
|
78
|
+
// ==========================================================================
|
|
79
|
+
// REACT NATIVE CORE - Activity Indicators
|
|
80
|
+
// ==========================================================================
|
|
81
|
+
RCTActivityIndicatorView: "ActivityIndicator",
|
|
82
|
+
AndroidProgressBar: "ActivityIndicator",
|
|
83
|
+
// ==========================================================================
|
|
84
|
+
// REACT NATIVE CORE - Android-specific
|
|
85
|
+
// ==========================================================================
|
|
86
|
+
AndroidDrawerLayout: "DrawerLayout",
|
|
87
|
+
VirtualView: "VirtualView",
|
|
88
|
+
VirtualViewExperimental: "VirtualView",
|
|
89
|
+
// ==========================================================================
|
|
90
|
+
// REACT NATIVE CORE - Debugging & Internal
|
|
91
|
+
// ==========================================================================
|
|
92
|
+
DebuggingOverlay: "DebuggingOverlay",
|
|
93
|
+
LayoutConformance: "LayoutConformance",
|
|
94
|
+
UnimplementedNativeView: "UnimplementedView",
|
|
95
|
+
// ==========================================================================
|
|
96
|
+
// REACT NATIVE CORE - Legacy/Deprecated
|
|
97
|
+
// ==========================================================================
|
|
98
|
+
RKShimmeringView: "ShimmeringView",
|
|
99
|
+
RCTTemplateView: "TemplateView",
|
|
100
|
+
RCTAxialGradientView: "AxialGradientView",
|
|
101
|
+
// "RCTVideo": "Video",
|
|
102
|
+
RCTMap: "Map",
|
|
103
|
+
RCTWebView: "WebView",
|
|
104
|
+
RCTKeyframes: "Keyframes",
|
|
105
|
+
RCTImpressionTrackingView: "ImpressionTrackingView",
|
|
106
|
+
// ==========================================================================
|
|
107
|
+
// REACT-NATIVE-SVG
|
|
108
|
+
// ==========================================================================
|
|
109
|
+
RNSVGSvgView: "Svg",
|
|
110
|
+
RNSVGGroup: "G",
|
|
111
|
+
RNSVGPath: "Path",
|
|
112
|
+
RNSVGText: "SvgText",
|
|
113
|
+
RNSVGTSpan: "TSpan",
|
|
114
|
+
RNSVGTextPath: "TextPath",
|
|
115
|
+
RNSVGImage: "SvgImage",
|
|
116
|
+
RNSVGCircle: "Circle",
|
|
117
|
+
RNSVGEllipse: "Ellipse",
|
|
118
|
+
RNSVGLine: "Line",
|
|
119
|
+
RNSVGRect: "Rect",
|
|
120
|
+
RNSVGClipPath: "ClipPath",
|
|
121
|
+
RNSVGDefs: "Defs",
|
|
122
|
+
RNSVGUse: "Use",
|
|
123
|
+
RNSVGSymbol: "Symbol",
|
|
124
|
+
RNSVGPattern: "Pattern",
|
|
125
|
+
RNSVGMask: "Mask",
|
|
126
|
+
RNSVGForeignObject: "ForeignObject",
|
|
127
|
+
RNSVGMarker: "Marker",
|
|
128
|
+
RNSVGLinearGradient: "LinearGradient",
|
|
129
|
+
RNSVGRadialGradient: "RadialGradient",
|
|
130
|
+
RNSVGFilter: "Filter",
|
|
131
|
+
RNSVGFeBlend: "FeBlend",
|
|
132
|
+
RNSVGFeColorMatrix: "FeColorMatrix",
|
|
133
|
+
RNSVGFeComposite: "FeComposite",
|
|
134
|
+
RNSVGFeFlood: "FeFlood",
|
|
135
|
+
RNSVGFeGaussianBlur: "FeGaussianBlur",
|
|
136
|
+
RNSVGFeMerge: "FeMerge",
|
|
137
|
+
RNSVGFeOffset: "FeOffset",
|
|
138
|
+
RNSVGPolygon: "Polygon",
|
|
139
|
+
RNSVGPolyline: "Polyline",
|
|
140
|
+
RNSVGStop: "Stop",
|
|
141
|
+
// ==========================================================================
|
|
142
|
+
// REACT-NATIVE-GESTURE-HANDLER
|
|
143
|
+
// ==========================================================================
|
|
144
|
+
RNGestureHandlerRootView: "GestureHandlerRootView",
|
|
145
|
+
RNGestureHandlerButton: "GestureHandlerButton",
|
|
146
|
+
// ==========================================================================
|
|
147
|
+
// REACT-NATIVE-SAFE-AREA-CONTEXT
|
|
148
|
+
// ==========================================================================
|
|
149
|
+
RNCSafeAreaProvider: "SafeAreaProvider",
|
|
150
|
+
RNCSafeAreaView: "SafeAreaView",
|
|
151
|
+
// ==========================================================================
|
|
152
|
+
// REACT-NATIVE-SCREENS (React Navigation)
|
|
153
|
+
// ==========================================================================
|
|
154
|
+
RNSScreen: "Screen",
|
|
155
|
+
RNSScreenContainer: "ScreenContainer",
|
|
156
|
+
RNSScreenStack: "ScreenStack",
|
|
157
|
+
RNSScreenStackHeaderConfig: "ScreenStackHeaderConfig",
|
|
158
|
+
RNSScreenStackHeaderSubview: "ScreenStackHeaderSubview",
|
|
159
|
+
RNSSearchBar: "SearchBar",
|
|
160
|
+
RNSFullWindowOverlay: "FullWindowOverlay",
|
|
161
|
+
RNSModalScreen: "ModalScreen",
|
|
162
|
+
// ==========================================================================
|
|
163
|
+
// REACT-NATIVE-REANIMATED
|
|
164
|
+
// ==========================================================================
|
|
165
|
+
ReanimatedView: "Animated.View",
|
|
166
|
+
// ==========================================================================
|
|
167
|
+
// EXPO MODULES
|
|
168
|
+
// ==========================================================================
|
|
169
|
+
ExpoView: "ExpoView",
|
|
170
|
+
ExpoBlurView: "BlurView",
|
|
171
|
+
ExpoLinearGradient: "LinearGradient",
|
|
172
|
+
ExpoImage: "ExpoImage",
|
|
173
|
+
ExpoVideoView: "VideoView",
|
|
174
|
+
ExpoCamera: "Camera",
|
|
175
|
+
ExpoBarCodeScannerView: "BarCodeScanner",
|
|
176
|
+
// ==========================================================================
|
|
177
|
+
// REACT-NATIVE-WEBVIEW
|
|
178
|
+
// ==========================================================================
|
|
179
|
+
RNCWebView: "WebView",
|
|
180
|
+
// ==========================================================================
|
|
181
|
+
// REACT-NATIVE-MAPS
|
|
182
|
+
// ==========================================================================
|
|
183
|
+
AIRMap: "MapView",
|
|
184
|
+
AIRMapMarker: "Marker",
|
|
185
|
+
AIRMapPolyline: "Polyline",
|
|
186
|
+
AIRMapPolygon: "Polygon",
|
|
187
|
+
AIRMapCircle: "Circle",
|
|
188
|
+
AIRMapCallout: "Callout",
|
|
189
|
+
// ==========================================================================
|
|
190
|
+
// REACT-NATIVE-VIDEO
|
|
191
|
+
// ==========================================================================
|
|
192
|
+
RCTVideo: "Video",
|
|
193
|
+
// ==========================================================================
|
|
194
|
+
// LOTTIE-REACT-NATIVE
|
|
195
|
+
// ==========================================================================
|
|
196
|
+
LottieAnimationView: "LottieView",
|
|
197
|
+
// ==========================================================================
|
|
198
|
+
// REACT-NATIVE-FAST-IMAGE
|
|
199
|
+
// ==========================================================================
|
|
200
|
+
FastImageView: "FastImage"
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Get the developer-friendly component name for a native view type.
|
|
205
|
+
* Returns the original viewType if no mapping exists.
|
|
206
|
+
*
|
|
207
|
+
* @param viewType - The native view class name (e.g., "RCTView")
|
|
208
|
+
* @returns The component name (e.g., "View")
|
|
209
|
+
*/
|
|
210
|
+
function getComponentDisplayName(viewType) {
|
|
211
|
+
return VIEW_TYPE_MAP[viewType] || viewType;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Get the native view class name for a component name (reverse lookup).
|
|
216
|
+
* Returns null if no mapping exists.
|
|
217
|
+
*
|
|
218
|
+
* @param componentName - The component name (e.g., "View")
|
|
219
|
+
* @returns The native view class name (e.g., "RCTView") or null
|
|
220
|
+
*/
|
|
221
|
+
function getNativeViewType(componentName) {
|
|
222
|
+
for (const [native, display] of Object.entries(VIEW_TYPE_MAP)) {
|
|
223
|
+
if (display === componentName) {
|
|
224
|
+
return native;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Check if a view type is a known native component.
|
|
232
|
+
*
|
|
233
|
+
* @param viewType - The native view class name
|
|
234
|
+
* @returns true if it's a known component
|
|
235
|
+
*/
|
|
236
|
+
function isKnownViewType(viewType) {
|
|
237
|
+
return viewType in VIEW_TYPE_MAP;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Get all known view types (useful for autocomplete/suggestions).
|
|
242
|
+
*
|
|
243
|
+
* @returns Array of all native view class names
|
|
244
|
+
*/
|
|
245
|
+
function getAllNativeViewTypes() {
|
|
246
|
+
return Object.keys(VIEW_TYPE_MAP);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Get all known component names (useful for autocomplete/suggestions).
|
|
251
|
+
*
|
|
252
|
+
* @returns Array of all component display names
|
|
253
|
+
*/
|
|
254
|
+
function getAllComponentNames() {
|
|
255
|
+
return [...new Set(Object.values(VIEW_TYPE_MAP))];
|
|
256
|
+
}
|
|
257
|
+
var _default = exports.default = {
|
|
258
|
+
VIEW_TYPE_MAP,
|
|
259
|
+
getComponentDisplayName,
|
|
260
|
+
getNativeViewType,
|
|
261
|
+
isKnownViewType,
|
|
262
|
+
getAllNativeViewTypes,
|
|
263
|
+
getAllComponentNames
|
|
264
|
+
};
|
|
@@ -1 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.clearCopySettings = clearCopySettings;
|
|
7
|
+
exports.loadCopySettings = loadCopySettings;
|
|
8
|
+
exports.saveCopySettings = saveCopySettings;
|
|
9
|
+
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
+
var _copySettings = require("../types/copySettings");
|
|
11
|
+
/**
|
|
12
|
+
* Copy Settings Storage
|
|
13
|
+
*
|
|
14
|
+
* Persists the highlight-updates copy/export settings.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
async function saveCopySettings(settings) {
|
|
18
|
+
try {
|
|
19
|
+
const key = _sharedUi.devToolsStorageKeys.highlightUpdates.copySettings();
|
|
20
|
+
await _sharedUi.persistentStorage.setItem(key, JSON.stringify(settings));
|
|
21
|
+
} catch {
|
|
22
|
+
// Silently fail — persistence is optional
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function loadCopySettings() {
|
|
26
|
+
try {
|
|
27
|
+
const key = _sharedUi.devToolsStorageKeys.highlightUpdates.copySettings();
|
|
28
|
+
const value = await _sharedUi.persistentStorage.getItem(key);
|
|
29
|
+
if (value && value !== "") {
|
|
30
|
+
const parsed = JSON.parse(value);
|
|
31
|
+
return {
|
|
32
|
+
..._copySettings.DEFAULT_COPY_SETTINGS,
|
|
33
|
+
...parsed,
|
|
34
|
+
filterCauses: parsed.filterCauses ?? _copySettings.DEFAULT_COPY_SETTINGS.filterCauses
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
} catch {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async function clearCopySettings() {
|
|
43
|
+
try {
|
|
44
|
+
const key = _sharedUi.devToolsStorageKeys.highlightUpdates.copySettings();
|
|
45
|
+
await _sharedUi.persistentStorage.removeItem(key);
|
|
46
|
+
} catch {
|
|
47
|
+
// Silently fail
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1 +1,58 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateRendersJson = generateRendersJson;
|
|
7
|
+
/**
|
|
8
|
+
* Render Export Formatter
|
|
9
|
+
*
|
|
10
|
+
* Simple JSON export for render tracking data.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Generate JSON export of all tracked renders
|
|
15
|
+
*/
|
|
16
|
+
function generateRendersJson(renders) {
|
|
17
|
+
const exportData = {
|
|
18
|
+
exportedAt: new Date().toISOString(),
|
|
19
|
+
totalComponents: renders.length,
|
|
20
|
+
totalRenders: renders.reduce((sum, r) => sum + r.renderCount, 0),
|
|
21
|
+
components: renders.map(render => ({
|
|
22
|
+
// Identity
|
|
23
|
+
componentName: render.componentName || render.displayName,
|
|
24
|
+
viewType: render.viewType,
|
|
25
|
+
nativeTag: render.nativeTag,
|
|
26
|
+
// Identifiers
|
|
27
|
+
testID: render.testID,
|
|
28
|
+
nativeID: render.nativeID,
|
|
29
|
+
accessibilityLabel: render.accessibilityLabel,
|
|
30
|
+
// Render stats
|
|
31
|
+
renderCount: render.renderCount,
|
|
32
|
+
firstRenderTime: render.firstRenderTime,
|
|
33
|
+
lastRenderTime: render.lastRenderTime,
|
|
34
|
+
// Last render cause
|
|
35
|
+
lastRenderCause: render.lastRenderCause ? {
|
|
36
|
+
type: render.lastRenderCause.type,
|
|
37
|
+
componentCause: render.lastRenderCause.componentCause,
|
|
38
|
+
changedKeys: render.lastRenderCause.changedKeys,
|
|
39
|
+
hookChanges: render.lastRenderCause.hookChanges?.map(h => ({
|
|
40
|
+
type: h.type,
|
|
41
|
+
index: h.index,
|
|
42
|
+
description: h.description
|
|
43
|
+
}))
|
|
44
|
+
} : null,
|
|
45
|
+
// Render history (if available)
|
|
46
|
+
renderHistory: render.renderHistory?.map(event => ({
|
|
47
|
+
renderNumber: event.renderNumber,
|
|
48
|
+
timestamp: event.timestamp,
|
|
49
|
+
cause: {
|
|
50
|
+
type: event.cause.type,
|
|
51
|
+
componentCause: event.cause.componentCause,
|
|
52
|
+
changedKeys: event.cause.changedKeys
|
|
53
|
+
}
|
|
54
|
+
}))
|
|
55
|
+
}))
|
|
56
|
+
};
|
|
57
|
+
return JSON.stringify(exportData, null, 2);
|
|
58
|
+
}
|