@buoy-gg/highlight-updates 7.0.35 → 7.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +28 -6
  2. package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +1 -281
  3. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1 -1474
  4. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +1 -641
  5. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +1 -273
  6. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +1 -188
  7. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +1 -293
  8. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +1 -508
  9. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +1 -846
  10. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +1 -915
  11. package/lib/commonjs/highlight-updates/components/RenderListItem.js +1 -235
  12. package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +1 -466
  13. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +1 -73
  14. package/lib/commonjs/highlight-updates/types/copySettings.js +1 -107
  15. package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +1 -446
  16. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1920
  17. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +1 -359
  18. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -371
  19. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1 -1840
  20. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +1 -952
  21. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +1 -264
  22. package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +1 -32
  23. package/lib/commonjs/highlight-updates/utils/devtoolsComponentNames.js +1 -188
  24. package/lib/commonjs/highlight-updates/utils/namedComposite.js +1 -41
  25. package/lib/commonjs/highlight-updates/utils/ownStateChanged.js +1 -103
  26. package/lib/commonjs/highlight-updates/utils/rawEventEmitter.js +1 -50
  27. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +1 -58
  28. package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +1 -485
  29. package/lib/commonjs/highlight-updates/utils/screenElements.js +1 -1046
  30. package/lib/commonjs/highlight-updates/utils/tapMatch.js +1 -58
  31. package/lib/commonjs/highlight-updates/utils/testIDs.js +1 -68
  32. package/lib/commonjs/highlight-updates/utils/touchCapture.js +1 -277
  33. package/lib/commonjs/index.js +1 -429
  34. package/lib/commonjs/preset.js +1 -278
  35. package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +1 -235
  36. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +1 -274
  37. package/lib/module/highlight-updates/components/HighlightFilterView.js +1 -1468
  38. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -634
  39. package/lib/module/highlight-updates/components/IdentifierBadge.js +1 -265
  40. package/lib/module/highlight-updates/components/IsolatedRenderList.js +1 -183
  41. package/lib/module/highlight-updates/components/ModalHeaderContent.js +1 -288
  42. package/lib/module/highlight-updates/components/RenderCauseBadge.js +1 -499
  43. package/lib/module/highlight-updates/components/RenderDetailView.js +1 -840
  44. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +1 -908
  45. package/lib/module/highlight-updates/components/RenderListItem.js +1 -230
  46. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +1 -462
  47. package/lib/module/highlight-updates/components/StatsDisplay.js +1 -70
  48. package/lib/module/highlight-updates/types/copySettings.js +1 -102
  49. package/lib/module/highlight-updates/utils/CommitProfiler.js +1 -442
  50. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1916
  51. package/lib/module/highlight-updates/utils/PerformanceLogger.js +1 -353
  52. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -358
  53. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1 -1830
  54. package/lib/module/highlight-updates/utils/RenderTracker.js +1 -949
  55. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +1 -255
  56. package/lib/module/highlight-updates/utils/copySettingsStorage.js +1 -26
  57. package/lib/module/highlight-updates/utils/devtoolsComponentNames.js +1 -178
  58. package/lib/module/highlight-updates/utils/namedComposite.js +1 -36
  59. package/lib/module/highlight-updates/utils/ownStateChanged.js +1 -98
  60. package/lib/module/highlight-updates/utils/rawEventEmitter.js +1 -46
  61. package/lib/module/highlight-updates/utils/renderExportFormatter.js +1 -54
  62. package/lib/module/highlight-updates/utils/rendersExportFormatter.js +1 -478
  63. package/lib/module/highlight-updates/utils/screenElements.js +1 -1040
  64. package/lib/module/highlight-updates/utils/tapMatch.js +1 -52
  65. package/lib/module/highlight-updates/utils/testIDs.js +1 -60
  66. package/lib/module/highlight-updates/utils/touchCapture.js +1 -270
  67. package/lib/module/index.js +1 -130
  68. package/lib/module/preset.js +1 -272
  69. package/lib/module/sync/highlightUpdatesSyncAdapter.js +1 -230
  70. package/lib/typescript/highlight-updates/utils/screenElements.d.ts +52 -1
  71. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts +11 -0
  72. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts +1 -1
  73. package/package.json +8 -8
  74. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +0 -1
  75. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +0 -1
  76. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +0 -1
  77. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +0 -1
  78. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +0 -1
  79. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +0 -1
  80. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +0 -1
  81. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +0 -1
  82. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +0 -1
  83. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +0 -1
  84. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +0 -1
  85. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +0 -1
  86. package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +0 -1
  87. package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +0 -1
  88. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +0 -1
  89. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +0 -1
  90. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +0 -1
  91. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +0 -1
  92. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +0 -1
  93. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +0 -1
  94. package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +0 -1
  95. package/lib/typescript/highlight-updates/utils/devtoolsComponentNames.d.ts.map +0 -1
  96. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +0 -1
  97. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +0 -1
  98. package/lib/typescript/highlight-updates/utils/rawEventEmitter.d.ts.map +0 -1
  99. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +0 -1
  100. package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +0 -1
  101. package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +0 -1
  102. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +0 -1
  103. package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +0 -1
  104. package/lib/typescript/highlight-updates/utils/touchCapture.d.ts.map +0 -1
  105. package/lib/typescript/index.d.ts.map +0 -1
  106. package/lib/typescript/preset.d.ts.map +0 -1
  107. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +0 -1
@@ -1,371 +1 @@
1
- /**
2
- * ProfilerInterceptor
3
- *
4
- * Swizzles React DevTools internals to capture and log exactly what the
5
- * profiler detects when "Highlight updates when components render" is enabled.
6
- *
7
- * This allows us to compare profiler detection with our own implementation
8
- * to ensure 100% accuracy.
9
- *
10
- * Usage:
11
- * import { installProfilerInterceptor } from './ProfilerInterceptor';
12
- * installProfilerInterceptor();
13
- */
14
-
15
- "use strict";
16
-
17
- Object.defineProperty(exports, "__esModule", {
18
- value: true
19
- });
20
- exports.default = void 0;
21
- exports.disableProfilerLogging = disableProfilerLogging;
22
- exports.enableProfilerLogging = enableProfilerLogging;
23
- exports.installProfilerInterceptor = installProfilerInterceptor;
24
- exports.isInterceptorInstalled = isInterceptorInstalled;
25
- exports.isLoggingEnabled = isLoggingEnabled;
26
- exports.logHookStructure = logHookStructure;
27
- exports.logRendererInterfaces = logRendererInterfaces;
28
- exports.setComparisonCallback = setComparisonCallback;
29
- exports.uninstallProfilerInterceptor = uninstallProfilerInterceptor;
30
- // Store original functions for cleanup
31
- let originalHookEmit = null;
32
- let originalAgentEmit = null;
33
- let isInstalled = false;
34
-
35
- // Controls whether logging is active (toggled by enable/disable)
36
- let loggingEnabled = false;
37
-
38
- // Callback for our comparison function
39
- let comparisonCallback = null;
40
-
41
- /**
42
- * Get a readable description of a stateNode for logging
43
- */
44
- function describeNode(node) {
45
- if (!node) return {
46
- type: "null"
47
- };
48
- const n = node;
49
-
50
- // Try to identify the node type and extract useful info
51
- const info = {};
52
-
53
- // Check for Fabric canonical structure
54
- if (n.canonical) {
55
- info.type = "Fabric";
56
- const canonical = n.canonical;
57
- if (canonical.publicInstance) {
58
- const pub = canonical.publicInstance;
59
- info.hasMeasure = typeof pub.measure === "function";
60
- info.nativeTag = pub.__nativeTag ?? pub._nativeTag ?? "unknown";
61
- }
62
- }
63
- // Check for legacy structure with direct measure
64
- else if (typeof n.measure === "function") {
65
- info.type = "Legacy";
66
- info.hasMeasure = true;
67
- info.nativeTag = n.__nativeTag ?? n._nativeTag ?? n.nativeTag ?? "unknown";
68
- }
69
- // Unknown structure
70
- else {
71
- info.type = "Unknown";
72
- info.keys = Object.keys(n).slice(0, 10); // First 10 keys for debugging
73
- }
74
- return info;
75
- }
76
-
77
- /**
78
- * Swizzle hook.emit to intercept all events including 'traceUpdates'
79
- *
80
- * This captures the raw data from the renderer before any processing.
81
- * The 'traceUpdates' event contains a Set of stateNodes.
82
- *
83
- * Reference: backend.js line 13566
84
- * hook.emit('traceUpdates', traceUpdatesForNodes)
85
- */
86
- function swizzleHookEmit() {
87
- const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
88
- if (!hook || typeof hook.emit !== "function") {
89
- // Silent - hook not available is expected in some environments
90
- return;
91
- }
92
- if (originalHookEmit) {
93
- // Already swizzled - no need to log
94
- return;
95
- }
96
- originalHookEmit = hook.emit.bind(hook);
97
- hook.emit = function (event, ...args) {
98
- // Intercept traceUpdates events - only log when logging is enabled
99
- if (event === "traceUpdates" && loggingEnabled) {
100
- const nodes = args[0];
101
-
102
- // Only log if there are actual nodes (skip 0 node events)
103
- if (nodes.size > 0) {
104
- console.log(`[PROFILER] traceUpdates: ${nodes.size} nodes`, Array.from(nodes).map((node, index) => ({
105
- index,
106
- ...describeNode(node)
107
- })));
108
- }
109
-
110
- // Call comparison callback if set (even for 0 nodes)
111
- if (comparisonCallback) {
112
- comparisonCallback(nodes);
113
- }
114
- }
115
-
116
- // Call original emit
117
- return originalHookEmit(event, ...args);
118
- };
119
-
120
- // Swizzled successfully - no need to log in normal operation
121
- }
122
-
123
- /**
124
- * Swizzle agent.emit to intercept 'drawTraceUpdates' events
125
- *
126
- * This captures data after the TraceUpdates module has processed it,
127
- * including color assignments based on render count.
128
- *
129
- * Reference: backend.js line 6380
130
- * agent.emit('drawTraceUpdates', nodesToDraw)
131
- */
132
- function swizzleAgentEmit() {
133
- const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
134
- const agent = hook?.reactDevtoolsAgent;
135
- if (!agent || typeof agent.emit !== "function") {
136
- // Silent - agent not available is expected when DevTools not connected
137
- return;
138
- }
139
- if (originalAgentEmit) {
140
- // Already swizzled - no need to log
141
- return;
142
- }
143
- originalAgentEmit = agent.emit.bind(agent);
144
- agent.emit = function (event, ...args) {
145
- // Only log when logging is enabled and there are actual nodes
146
- if (loggingEnabled && event === "drawTraceUpdates") {
147
- const nodesToDraw = args[0];
148
- if (nodesToDraw.length > 0) {
149
- console.log(`[PROFILER] drawTraceUpdates: ${nodesToDraw.length} nodes`, nodesToDraw.map((item, index) => ({
150
- index,
151
- color: item.color,
152
- ...describeNode(item.node)
153
- })));
154
- }
155
- }
156
-
157
- // Call original emit
158
- return originalAgentEmit(event, ...args);
159
- };
160
-
161
- // Swizzled successfully - no need to log in normal operation
162
- }
163
-
164
- /**
165
- * Log information about available renderer interfaces.
166
- * Only call this manually for debugging - not called during normal operation.
167
- * @internal
168
- */
169
- function logRendererInterfaces() {
170
- const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
171
- if (!hook?.rendererInterfaces) {
172
- console.log("[ProfilerInterceptor] No rendererInterfaces available");
173
- return;
174
- }
175
- const info = [];
176
- hook.rendererInterfaces.forEach((iface, id) => {
177
- const methods = Object.keys(iface).filter(key => typeof iface[key] === "function");
178
- info.push({
179
- id,
180
- hasSetTraceUpdatesEnabled: typeof iface.setTraceUpdatesEnabled === "function",
181
- methods: methods.slice(0, 20) // First 20 methods
182
- });
183
- });
184
- console.log(`[ProfilerInterceptor] Found ${hook.rendererInterfaces.size} renderer interface(s)`, info);
185
- }
186
-
187
- /**
188
- * Log hook structure for debugging.
189
- * Only call this manually for debugging - not called during normal operation.
190
- * @internal
191
- */
192
- function logHookStructure() {
193
- const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
194
- if (!hook) {
195
- console.log("[ProfilerInterceptor] No hook available");
196
- return;
197
- }
198
- const structure = {};
199
- for (const key in hook) {
200
- const value = hook[key];
201
- if (typeof value === "function") {
202
- structure[key] = "function";
203
- } else if (value instanceof Map) {
204
- structure[key] = `Map(${value.size})`;
205
- } else if (value instanceof Set) {
206
- structure[key] = `Set(${value.size})`;
207
- } else if (typeof value === "object" && value !== null) {
208
- structure[key] = "object";
209
- } else {
210
- structure[key] = typeof value;
211
- }
212
- }
213
- console.log("[ProfilerInterceptor] Hook structure:", structure);
214
- }
215
-
216
- /**
217
- * Enable trace updates on all renderer interfaces
218
- *
219
- * This is what DevTools does when you check "Highlight updates when components render"
220
- *
221
- * Reference: backend.js line 15487-15489
222
- * function setTraceUpdatesEnabled(isEnabled) {
223
- * traceUpdatesEnabled = isEnabled;
224
- * }
225
- */
226
- function enableTracingOnAllRenderers() {
227
- const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
228
- if (!hook?.rendererInterfaces) {
229
- // Silent - no rendererInterfaces available
230
- return;
231
- }
232
- hook.rendererInterfaces.forEach(iface => {
233
- if (typeof iface.setTraceUpdatesEnabled === "function") {
234
- try {
235
- iface.setTraceUpdatesEnabled(true);
236
- } catch {
237
- // Silent - error enabling tracing on this renderer
238
- }
239
- }
240
- });
241
- }
242
-
243
- /**
244
- * Disable trace updates on all renderer interfaces
245
- */
246
- function disableTracingOnAllRenderers() {
247
- const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
248
- if (!hook?.rendererInterfaces) return;
249
- hook.rendererInterfaces.forEach(iface => {
250
- if (typeof iface.setTraceUpdatesEnabled === "function") {
251
- try {
252
- iface.setTraceUpdatesEnabled(false);
253
- } catch {
254
- // Silent - error disabling tracing on this renderer
255
- }
256
- }
257
- });
258
- }
259
-
260
- /**
261
- * Set a callback to receive profiler nodes for comparison
262
- */
263
- function setComparisonCallback(callback) {
264
- comparisonCallback = callback;
265
- }
266
-
267
- /**
268
- * Install all profiler interception hooks
269
- *
270
- * Call this early in your app initialization to capture all events.
271
- * Installation is silent - no console logs in normal operation.
272
- */
273
- function installProfilerInterceptor() {
274
- if (typeof __DEV__ !== "undefined" && !__DEV__) {
275
- // Silent in production - nothing to install
276
- return;
277
- }
278
- if (isInstalled) {
279
- // Already installed - no action needed
280
- return;
281
- }
282
-
283
- // Swizzle emit functions to intercept events (silent operation)
284
- swizzleHookEmit();
285
- swizzleAgentEmit();
286
-
287
- // NOTE: We don't enable tracing here - it will be enabled when
288
- // enableProfilerLogging() is called (when user toggles on)
289
-
290
- // Note: We don't need hook.sub since we already intercept via swizzled hook.emit
291
-
292
- isInstalled = true;
293
- }
294
-
295
- /**
296
- * Uninstall profiler interception hooks and restore original functions
297
- */
298
- function uninstallProfilerInterceptor() {
299
- if (!isInstalled) return;
300
- const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
301
-
302
- // Restore hook.emit
303
- if (originalHookEmit && hook) {
304
- hook.emit = originalHookEmit;
305
- originalHookEmit = null;
306
- }
307
-
308
- // Restore agent.emit
309
- if (originalAgentEmit && hook?.reactDevtoolsAgent) {
310
- hook.reactDevtoolsAgent.emit = originalAgentEmit;
311
- originalAgentEmit = null;
312
- }
313
-
314
- // Disable tracing
315
- disableTracingOnAllRenderers();
316
- comparisonCallback = null;
317
- isInstalled = false;
318
- // Silent uninstall - no logging in normal operation
319
- }
320
-
321
- /**
322
- * Check if interceptor is currently installed
323
- */
324
- function isInterceptorInstalled() {
325
- return isInstalled;
326
- }
327
-
328
- /**
329
- * Enable profiler logging - starts logging all profiler events
330
- *
331
- * NOTE: This only enables LOGGING of events. It does NOT enable tracing.
332
- * The profiler must be enabled separately (e.g., via Chrome DevTools checkbox)
333
- * for events to be emitted. This allows us to compare what the real profiler
334
- * detects without our code interfering.
335
- */
336
- function enableProfilerLogging() {
337
- loggingEnabled = true;
338
- // Don't enable tracing here - let Chrome DevTools control that
339
- // enableTracingOnAllRenderers();
340
- // Silent enable - no logging needed
341
- }
342
-
343
- /**
344
- * Disable profiler logging - stops logging profiler events
345
- * NOTE: Does NOT disable tracing - the profiler continues to work,
346
- * we just stop logging its events
347
- */
348
- function disableProfilerLogging() {
349
- loggingEnabled = false;
350
- // Don't disable tracing - let the profiler continue to work
351
- // disableTracingOnAllRenderers();
352
- // Silent disable - no logging needed
353
- }
354
-
355
- /**
356
- * Check if logging is currently enabled
357
- */
358
- function isLoggingEnabled() {
359
- return loggingEnabled;
360
- }
361
- var _default = exports.default = {
362
- install: installProfilerInterceptor,
363
- uninstall: uninstallProfilerInterceptor,
364
- isInstalled: isInterceptorInstalled,
365
- setComparisonCallback,
366
- enableTracing: enableTracingOnAllRenderers,
367
- disableTracing: disableTracingOnAllRenderers,
368
- enableLogging: enableProfilerLogging,
369
- disableLogging: disableProfilerLogging,
370
- isLoggingEnabled
371
- };
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.disableProfilerLogging=disableProfilerLogging,exports.enableProfilerLogging=enableProfilerLogging,exports.installProfilerInterceptor=installProfilerInterceptor,exports.isInterceptorInstalled=isInterceptorInstalled,exports.isLoggingEnabled=isLoggingEnabled,exports.logHookStructure=logHookStructure,exports.logRendererInterfaces=logRendererInterfaces,exports.setComparisonCallback=setComparisonCallback,exports.uninstallProfilerInterceptor=uninstallProfilerInterceptor;let originalHookEmit=null,originalAgentEmit=null,isInstalled=!1,loggingEnabled=!1,comparisonCallback=null;function describeNode(e){if(!e)return{type:"null"};const n=e,o={};if(n.canonical){o.type="Fabric";const e=n.canonical;if(e.publicInstance){const n=e.publicInstance;o.hasMeasure="function"==typeof n.measure,o.nativeTag=n.__nativeTag??n._nativeTag??"unknown"}}else"function"==typeof n.measure?(o.type="Legacy",o.hasMeasure=!0,o.nativeTag=n.__nativeTag??n._nativeTag??n.nativeTag??"unknown"):(o.type="Unknown",o.keys=Object.keys(n).slice(0,10));return o}function swizzleHookEmit(){const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;e&&"function"==typeof e.emit&&(originalHookEmit||(originalHookEmit=e.emit.bind(e),e.emit=function(e,...n){if("traceUpdates"===e&&loggingEnabled){const e=n[0];e.size>0&&console.log(`[PROFILER] traceUpdates: ${e.size} nodes`,Array.from(e).map((e,n)=>({index:n,...describeNode(e)}))),comparisonCallback&&comparisonCallback(e)}return originalHookEmit(e,...n)}))}function swizzleAgentEmit(){const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__,n=e?.reactDevtoolsAgent;n&&"function"==typeof n.emit&&(originalAgentEmit||(originalAgentEmit=n.emit.bind(n),n.emit=function(e,...n){if(loggingEnabled&&"drawTraceUpdates"===e){const e=n[0];e.length>0&&console.log(`[PROFILER] drawTraceUpdates: ${e.length} nodes`,e.map((e,n)=>({index:n,color:e.color,...describeNode(e.node)})))}return originalAgentEmit(e,...n)}))}function logRendererInterfaces(){const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e?.rendererInterfaces)return void console.log("[ProfilerInterceptor] No rendererInterfaces available");const n=[];e.rendererInterfaces.forEach((e,o)=>{const t=Object.keys(e).filter(n=>"function"==typeof e[n]);n.push({id:o,hasSetTraceUpdatesEnabled:"function"==typeof e.setTraceUpdatesEnabled,methods:t.slice(0,20)})}),console.log(`[ProfilerInterceptor] Found ${e.rendererInterfaces.size} renderer interface(s)`,n)}function logHookStructure(){const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e)return void console.log("[ProfilerInterceptor] No hook available");const n={};for(const o in e){const t=e[o];"function"==typeof t?n[o]="function":t instanceof Map?n[o]=`Map(${t.size})`:t instanceof Set?n[o]=`Set(${t.size})`:n[o]="object"==typeof t&&null!==t?"object":typeof t}console.log("[ProfilerInterceptor] Hook structure:",n)}function enableTracingOnAllRenderers(){const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;e?.rendererInterfaces&&e.rendererInterfaces.forEach(e=>{if("function"==typeof e.setTraceUpdatesEnabled)try{e.setTraceUpdatesEnabled(!0)}catch{}})}function disableTracingOnAllRenderers(){const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;e?.rendererInterfaces&&e.rendererInterfaces.forEach(e=>{if("function"==typeof e.setTraceUpdatesEnabled)try{e.setTraceUpdatesEnabled(!1)}catch{}})}function setComparisonCallback(e){comparisonCallback=e}function installProfilerInterceptor(){("undefined"==typeof __DEV__||__DEV__)&&(isInstalled||(swizzleHookEmit(),swizzleAgentEmit(),isInstalled=!0))}function uninstallProfilerInterceptor(){if(!isInstalled)return;const e=window.__REACT_DEVTOOLS_GLOBAL_HOOK__;originalHookEmit&&e&&(e.emit=originalHookEmit,originalHookEmit=null),originalAgentEmit&&e?.reactDevtoolsAgent&&(e.reactDevtoolsAgent.emit=originalAgentEmit,originalAgentEmit=null),disableTracingOnAllRenderers(),comparisonCallback=null,isInstalled=!1}function isInterceptorInstalled(){return isInstalled}function enableProfilerLogging(){loggingEnabled=!0}function disableProfilerLogging(){loggingEnabled=!1}function isLoggingEnabled(){return loggingEnabled}var _default=exports.default={install:installProfilerInterceptor,uninstall:uninstallProfilerInterceptor,isInstalled:isInterceptorInstalled,setComparisonCallback:setComparisonCallback,enableTracing:enableTracingOnAllRenderers,disableTracing:disableTracingOnAllRenderers,enableLogging:enableProfilerLogging,disableLogging:disableProfilerLogging,isLoggingEnabled:isLoggingEnabled};