@oxog/react-check 1.1.0 → 1.1.1

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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { F as FiberNode, R as RenderInfo, a as ReactDevToolsHook, S as SessionReport, b as ReportOptions, C as CLIMessage, B as BrowserMessage, c as ScannerConfig, W as WindowWithReactDevTools } from './types-CVcIoqzs.cjs';
2
- export { q as ComponentNode, h as ComponentStats, E as ErrorCode, t as FiberType, g as FixSuggestion, e as FixType, k as FrameworkInfo, m as FrameworkOptions, O as OverlayOptions, p as ReactCheckConfig, r as ReactCheckError, s as ReactCheckEvents, o as ReactCheckOptions, d as RenderChainInfo, n as RuleOptions, i as SessionInfo, j as SessionSummary, f as Severity, l as ThresholdOptions, T as TimelineEvent } from './types-CVcIoqzs.cjs';
3
- import { S as Scanner } from './scanner-BsBnFki5.cjs';
4
- export { b as ScannerEvents, a as StatsCollector, c as StatsEvents } from './scanner-BsBnFki5.cjs';
1
+ import { F as FiberNode, R as RenderInfo, a as ReactDevToolsHook, S as SessionReport, b as ReportOptions, C as CLIMessage, B as BrowserMessage, c as ScannerConfig, W as WindowWithReactDevTools } from './types-xAXT9cir.cjs';
2
+ export { q as ComponentNode, h as ComponentStats, E as ErrorCode, t as FiberType, g as FixSuggestion, e as FixType, k as FrameworkInfo, m as FrameworkOptions, O as OverlayOptions, p as ReactCheckConfig, r as ReactCheckError, s as ReactCheckEvents, o as ReactCheckOptions, d as RenderChainInfo, n as RuleOptions, i as SessionInfo, j as SessionSummary, f as Severity, l as ThresholdOptions, T as TimelineEvent } from './types-xAXT9cir.cjs';
3
+ import { S as Scanner } from './scanner-5j2LEM-q.cjs';
4
+ export { b as ScannerEvents, a as StatsCollector, c as StatsEvents } from './scanner-5j2LEM-q.cjs';
5
5
  export { ChainAnalyzer, ChainEvents } from './chain.cjs';
6
6
  export { FixEvents, FixSuggester } from './fix.cjs';
7
7
  export { detectFramework, detectFrameworkFromWindow, frameworkDetectors, getFrameworkTips } from './detect.cjs';
@@ -1031,6 +1031,148 @@ declare class BrowserLauncher extends EventEmitter<BrowserEvents> {
1031
1031
  */
1032
1032
  declare function isPuppeteerAvailable(): Promise<boolean>;
1033
1033
 
1034
+ /**
1035
+ * Browser overlay for render visualization
1036
+ * @packageDocumentation
1037
+ */
1038
+
1039
+ /**
1040
+ * Overlay configuration
1041
+ */
1042
+ interface OverlayConfig {
1043
+ /** Whether overlay is enabled */
1044
+ enabled: boolean;
1045
+ /** Whether to highlight renders */
1046
+ highlightRenders: boolean;
1047
+ /** Animation speed */
1048
+ animationSpeed: 'slow' | 'fast' | 'off';
1049
+ /** Whether to show badges */
1050
+ showBadges: boolean;
1051
+ /** Whether to show toolbar */
1052
+ showToolbar: boolean;
1053
+ }
1054
+ /**
1055
+ * Overlay for visualizing React renders in the browser
1056
+ */
1057
+ declare class Overlay {
1058
+ /** Shadow root for isolation */
1059
+ private shadowRoot;
1060
+ /** Host element */
1061
+ private host;
1062
+ /** Overlay configuration */
1063
+ private config;
1064
+ /** Highlight elements */
1065
+ private highlights;
1066
+ /** Badge elements */
1067
+ private badges;
1068
+ /** Render counts for badges */
1069
+ private renderCounts;
1070
+ /** Toolbar element */
1071
+ private toolbar;
1072
+ /** Whether overlay is visible */
1073
+ private visible;
1074
+ /**
1075
+ * Create a new overlay
1076
+ * @param config - Overlay configuration
1077
+ */
1078
+ constructor(config?: Partial<OverlayConfig>);
1079
+ /**
1080
+ * Initialize the overlay
1081
+ */
1082
+ init(): void;
1083
+ /**
1084
+ * Destroy the overlay
1085
+ */
1086
+ destroy(): void;
1087
+ /**
1088
+ * Inject CSS styles into shadow DOM
1089
+ */
1090
+ private injectStyles;
1091
+ /**
1092
+ * Create the floating toolbar
1093
+ */
1094
+ private createToolbar;
1095
+ /**
1096
+ * Set up toolbar event listeners
1097
+ */
1098
+ private setupToolbarEvents;
1099
+ /**
1100
+ * Make an element draggable
1101
+ * @param element - Element to make draggable
1102
+ */
1103
+ private makeDraggable;
1104
+ /**
1105
+ * Highlight a component render with flash effect
1106
+ * @param render - Render information
1107
+ * @param element - DOM element to highlight
1108
+ */
1109
+ highlight(render: RenderInfo, element: Element): void;
1110
+ /**
1111
+ * Create a flash overlay effect on the element
1112
+ * @param rect - Element bounding rectangle
1113
+ * @param color - Flash color
1114
+ */
1115
+ private createFlashOverlay;
1116
+ /**
1117
+ * Update or create a badge for a component
1118
+ * @param render - Render information
1119
+ * @param rect - Bounding rectangle
1120
+ * @param color - Badge color
1121
+ */
1122
+ private updateBadge;
1123
+ /**
1124
+ * Get severity level for a render
1125
+ * @param render - Render information
1126
+ * @returns Severity level
1127
+ */
1128
+ private getSeverity;
1129
+ /**
1130
+ * Record a render event (updates stats even without DOM element)
1131
+ * @param render - Render information
1132
+ */
1133
+ recordRender(render: RenderInfo): void;
1134
+ /** Total render count */
1135
+ private totalRenders;
1136
+ /**
1137
+ * Update toolbar stats
1138
+ */
1139
+ private updateStats;
1140
+ /**
1141
+ * Clear all highlights
1142
+ */
1143
+ clearHighlights(): void;
1144
+ /**
1145
+ * Clear all badges
1146
+ */
1147
+ clearBadges(): void;
1148
+ /**
1149
+ * Clear all visualizations
1150
+ */
1151
+ clear(): void;
1152
+ /**
1153
+ * Show the overlay
1154
+ */
1155
+ show(): void;
1156
+ /**
1157
+ * Hide the overlay
1158
+ */
1159
+ hide(): void;
1160
+ /**
1161
+ * Toggle overlay visibility
1162
+ */
1163
+ toggle(): void;
1164
+ /**
1165
+ * Update configuration
1166
+ * @param config - Partial configuration
1167
+ */
1168
+ configure(config: Partial<OverlayConfig>): void;
1169
+ /**
1170
+ * Check if overlay is visible
1171
+ * @returns true if visible
1172
+ */
1173
+ isVisible(): boolean;
1174
+ }
1175
+
1034
1176
  /**
1035
1177
  * Browser-side scanner for React render tracking
1036
1178
  * @packageDocumentation
@@ -1069,12 +1211,35 @@ declare class BrowserScanner extends EventEmitter<BrowserScannerEvents> {
1069
1211
  private originalOnCommitFiberRoot;
1070
1212
  /** Window reference */
1071
1213
  private win;
1214
+ /** Overlay for visual feedback */
1215
+ private overlay;
1072
1216
  /**
1073
1217
  * Create a new browser scanner
1074
1218
  * @param config - Scanner configuration
1075
1219
  * @param win - Window object (for testing)
1076
1220
  */
1077
1221
  constructor(config?: Partial<ScannerConfig>, win?: WindowWithReactDevTools);
1222
+ /**
1223
+ * Get DOM element from fiber node
1224
+ * React stores the DOM node in fiber.stateNode for host components
1225
+ * or we need to walk down to find the first DOM node
1226
+ * @param fiber - Fiber node
1227
+ * @returns DOM Element or null
1228
+ */
1229
+ private getDOMElement;
1230
+ /**
1231
+ * Enable visual overlay for render highlighting
1232
+ */
1233
+ enableOverlay(): void;
1234
+ /**
1235
+ * Disable visual overlay
1236
+ */
1237
+ disableOverlay(): void;
1238
+ /**
1239
+ * Get overlay instance
1240
+ * @returns Overlay instance or null
1241
+ */
1242
+ getOverlay(): Overlay | null;
1078
1243
  /**
1079
1244
  * Start the scanner
1080
1245
  */
@@ -1168,142 +1333,6 @@ declare class BrowserScanner extends EventEmitter<BrowserScannerEvents> {
1168
1333
  getAllRenderCounts(): Map<string, number>;
1169
1334
  }
1170
1335
 
1171
- /**
1172
- * Browser overlay for render visualization
1173
- * @packageDocumentation
1174
- */
1175
-
1176
- /**
1177
- * Overlay configuration
1178
- */
1179
- interface OverlayConfig {
1180
- /** Whether overlay is enabled */
1181
- enabled: boolean;
1182
- /** Whether to highlight renders */
1183
- highlightRenders: boolean;
1184
- /** Animation speed */
1185
- animationSpeed: 'slow' | 'fast' | 'off';
1186
- /** Whether to show badges */
1187
- showBadges: boolean;
1188
- /** Whether to show toolbar */
1189
- showToolbar: boolean;
1190
- }
1191
- /**
1192
- * Overlay for visualizing React renders in the browser
1193
- */
1194
- declare class Overlay {
1195
- /** Shadow root for isolation */
1196
- private shadowRoot;
1197
- /** Host element */
1198
- private host;
1199
- /** Overlay configuration */
1200
- private config;
1201
- /** Highlight elements */
1202
- private highlights;
1203
- /** Badge elements */
1204
- private badges;
1205
- /** Render counts for badges */
1206
- private renderCounts;
1207
- /** Toolbar element */
1208
- private toolbar;
1209
- /** Whether overlay is visible */
1210
- private visible;
1211
- /**
1212
- * Create a new overlay
1213
- * @param config - Overlay configuration
1214
- */
1215
- constructor(config?: Partial<OverlayConfig>);
1216
- /**
1217
- * Initialize the overlay
1218
- */
1219
- init(): void;
1220
- /**
1221
- * Destroy the overlay
1222
- */
1223
- destroy(): void;
1224
- /**
1225
- * Inject CSS styles into shadow DOM
1226
- */
1227
- private injectStyles;
1228
- /**
1229
- * Create the floating toolbar
1230
- */
1231
- private createToolbar;
1232
- /**
1233
- * Set up toolbar event listeners
1234
- */
1235
- private setupToolbarEvents;
1236
- /**
1237
- * Make an element draggable
1238
- * @param element - Element to make draggable
1239
- */
1240
- private makeDraggable;
1241
- /**
1242
- * Highlight a component render
1243
- * @param render - Render information
1244
- * @param element - DOM element to highlight
1245
- */
1246
- highlight(render: RenderInfo, element: Element): void;
1247
- /**
1248
- * Update or create a badge for a component
1249
- * @param render - Render information
1250
- * @param rect - Bounding rectangle
1251
- * @param color - Badge color
1252
- */
1253
- private updateBadge;
1254
- /**
1255
- * Get severity level for a render
1256
- * @param render - Render information
1257
- * @returns Severity level
1258
- */
1259
- private getSeverity;
1260
- /**
1261
- * Record a render event (updates stats even without DOM element)
1262
- * @param render - Render information
1263
- */
1264
- recordRender(render: RenderInfo): void;
1265
- /** Total render count */
1266
- private totalRenders;
1267
- /**
1268
- * Update toolbar stats
1269
- */
1270
- private updateStats;
1271
- /**
1272
- * Clear all highlights
1273
- */
1274
- clearHighlights(): void;
1275
- /**
1276
- * Clear all badges
1277
- */
1278
- clearBadges(): void;
1279
- /**
1280
- * Clear all visualizations
1281
- */
1282
- clear(): void;
1283
- /**
1284
- * Show the overlay
1285
- */
1286
- show(): void;
1287
- /**
1288
- * Hide the overlay
1289
- */
1290
- hide(): void;
1291
- /**
1292
- * Toggle overlay visibility
1293
- */
1294
- toggle(): void;
1295
- /**
1296
- * Update configuration
1297
- * @param config - Partial configuration
1298
- */
1299
- configure(config: Partial<OverlayConfig>): void;
1300
- /**
1301
- * Check if overlay is visible
1302
- * @returns true if visible
1303
- */
1304
- isVisible(): boolean;
1305
- }
1306
-
1307
1336
  /**
1308
1337
  * Browser injection script - main entry point for browser-side code
1309
1338
  * This file is bundled as an IIFE for injection into target pages
@@ -1351,6 +1380,20 @@ declare class ReactCheckInjector {
1351
1380
  * @param message - CLI message
1352
1381
  */
1353
1382
  private handleMessage;
1383
+ /**
1384
+ * Toggle overlay visibility
1385
+ * @param enabled - Whether overlay should be visible
1386
+ */
1387
+ private handleToggleOverlay;
1388
+ /**
1389
+ * Get overlay visibility status
1390
+ * @returns Whether overlay is visible
1391
+ */
1392
+ isOverlayEnabled(): boolean;
1393
+ /**
1394
+ * Toggle overlay (public method for console access)
1395
+ */
1396
+ toggleOverlay(): void;
1354
1397
  /**
1355
1398
  * Handle config update
1356
1399
  * @param config - New configuration
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { F as FiberNode, R as RenderInfo, a as ReactDevToolsHook, S as SessionReport, b as ReportOptions, C as CLIMessage, B as BrowserMessage, c as ScannerConfig, W as WindowWithReactDevTools } from './types-CVcIoqzs.js';
2
- export { q as ComponentNode, h as ComponentStats, E as ErrorCode, t as FiberType, g as FixSuggestion, e as FixType, k as FrameworkInfo, m as FrameworkOptions, O as OverlayOptions, p as ReactCheckConfig, r as ReactCheckError, s as ReactCheckEvents, o as ReactCheckOptions, d as RenderChainInfo, n as RuleOptions, i as SessionInfo, j as SessionSummary, f as Severity, l as ThresholdOptions, T as TimelineEvent } from './types-CVcIoqzs.js';
3
- import { S as Scanner } from './scanner-bpT7eMcv.js';
4
- export { b as ScannerEvents, a as StatsCollector, c as StatsEvents } from './scanner-bpT7eMcv.js';
1
+ import { F as FiberNode, R as RenderInfo, a as ReactDevToolsHook, S as SessionReport, b as ReportOptions, C as CLIMessage, B as BrowserMessage, c as ScannerConfig, W as WindowWithReactDevTools } from './types-xAXT9cir.js';
2
+ export { q as ComponentNode, h as ComponentStats, E as ErrorCode, t as FiberType, g as FixSuggestion, e as FixType, k as FrameworkInfo, m as FrameworkOptions, O as OverlayOptions, p as ReactCheckConfig, r as ReactCheckError, s as ReactCheckEvents, o as ReactCheckOptions, d as RenderChainInfo, n as RuleOptions, i as SessionInfo, j as SessionSummary, f as Severity, l as ThresholdOptions, T as TimelineEvent } from './types-xAXT9cir.js';
3
+ import { S as Scanner } from './scanner-CTBraprQ.js';
4
+ export { b as ScannerEvents, a as StatsCollector, c as StatsEvents } from './scanner-CTBraprQ.js';
5
5
  export { ChainAnalyzer, ChainEvents } from './chain.js';
6
6
  export { FixEvents, FixSuggester } from './fix.js';
7
7
  export { detectFramework, detectFrameworkFromWindow, frameworkDetectors, getFrameworkTips } from './detect.js';
@@ -1031,6 +1031,148 @@ declare class BrowserLauncher extends EventEmitter<BrowserEvents> {
1031
1031
  */
1032
1032
  declare function isPuppeteerAvailable(): Promise<boolean>;
1033
1033
 
1034
+ /**
1035
+ * Browser overlay for render visualization
1036
+ * @packageDocumentation
1037
+ */
1038
+
1039
+ /**
1040
+ * Overlay configuration
1041
+ */
1042
+ interface OverlayConfig {
1043
+ /** Whether overlay is enabled */
1044
+ enabled: boolean;
1045
+ /** Whether to highlight renders */
1046
+ highlightRenders: boolean;
1047
+ /** Animation speed */
1048
+ animationSpeed: 'slow' | 'fast' | 'off';
1049
+ /** Whether to show badges */
1050
+ showBadges: boolean;
1051
+ /** Whether to show toolbar */
1052
+ showToolbar: boolean;
1053
+ }
1054
+ /**
1055
+ * Overlay for visualizing React renders in the browser
1056
+ */
1057
+ declare class Overlay {
1058
+ /** Shadow root for isolation */
1059
+ private shadowRoot;
1060
+ /** Host element */
1061
+ private host;
1062
+ /** Overlay configuration */
1063
+ private config;
1064
+ /** Highlight elements */
1065
+ private highlights;
1066
+ /** Badge elements */
1067
+ private badges;
1068
+ /** Render counts for badges */
1069
+ private renderCounts;
1070
+ /** Toolbar element */
1071
+ private toolbar;
1072
+ /** Whether overlay is visible */
1073
+ private visible;
1074
+ /**
1075
+ * Create a new overlay
1076
+ * @param config - Overlay configuration
1077
+ */
1078
+ constructor(config?: Partial<OverlayConfig>);
1079
+ /**
1080
+ * Initialize the overlay
1081
+ */
1082
+ init(): void;
1083
+ /**
1084
+ * Destroy the overlay
1085
+ */
1086
+ destroy(): void;
1087
+ /**
1088
+ * Inject CSS styles into shadow DOM
1089
+ */
1090
+ private injectStyles;
1091
+ /**
1092
+ * Create the floating toolbar
1093
+ */
1094
+ private createToolbar;
1095
+ /**
1096
+ * Set up toolbar event listeners
1097
+ */
1098
+ private setupToolbarEvents;
1099
+ /**
1100
+ * Make an element draggable
1101
+ * @param element - Element to make draggable
1102
+ */
1103
+ private makeDraggable;
1104
+ /**
1105
+ * Highlight a component render with flash effect
1106
+ * @param render - Render information
1107
+ * @param element - DOM element to highlight
1108
+ */
1109
+ highlight(render: RenderInfo, element: Element): void;
1110
+ /**
1111
+ * Create a flash overlay effect on the element
1112
+ * @param rect - Element bounding rectangle
1113
+ * @param color - Flash color
1114
+ */
1115
+ private createFlashOverlay;
1116
+ /**
1117
+ * Update or create a badge for a component
1118
+ * @param render - Render information
1119
+ * @param rect - Bounding rectangle
1120
+ * @param color - Badge color
1121
+ */
1122
+ private updateBadge;
1123
+ /**
1124
+ * Get severity level for a render
1125
+ * @param render - Render information
1126
+ * @returns Severity level
1127
+ */
1128
+ private getSeverity;
1129
+ /**
1130
+ * Record a render event (updates stats even without DOM element)
1131
+ * @param render - Render information
1132
+ */
1133
+ recordRender(render: RenderInfo): void;
1134
+ /** Total render count */
1135
+ private totalRenders;
1136
+ /**
1137
+ * Update toolbar stats
1138
+ */
1139
+ private updateStats;
1140
+ /**
1141
+ * Clear all highlights
1142
+ */
1143
+ clearHighlights(): void;
1144
+ /**
1145
+ * Clear all badges
1146
+ */
1147
+ clearBadges(): void;
1148
+ /**
1149
+ * Clear all visualizations
1150
+ */
1151
+ clear(): void;
1152
+ /**
1153
+ * Show the overlay
1154
+ */
1155
+ show(): void;
1156
+ /**
1157
+ * Hide the overlay
1158
+ */
1159
+ hide(): void;
1160
+ /**
1161
+ * Toggle overlay visibility
1162
+ */
1163
+ toggle(): void;
1164
+ /**
1165
+ * Update configuration
1166
+ * @param config - Partial configuration
1167
+ */
1168
+ configure(config: Partial<OverlayConfig>): void;
1169
+ /**
1170
+ * Check if overlay is visible
1171
+ * @returns true if visible
1172
+ */
1173
+ isVisible(): boolean;
1174
+ }
1175
+
1034
1176
  /**
1035
1177
  * Browser-side scanner for React render tracking
1036
1178
  * @packageDocumentation
@@ -1069,12 +1211,35 @@ declare class BrowserScanner extends EventEmitter<BrowserScannerEvents> {
1069
1211
  private originalOnCommitFiberRoot;
1070
1212
  /** Window reference */
1071
1213
  private win;
1214
+ /** Overlay for visual feedback */
1215
+ private overlay;
1072
1216
  /**
1073
1217
  * Create a new browser scanner
1074
1218
  * @param config - Scanner configuration
1075
1219
  * @param win - Window object (for testing)
1076
1220
  */
1077
1221
  constructor(config?: Partial<ScannerConfig>, win?: WindowWithReactDevTools);
1222
+ /**
1223
+ * Get DOM element from fiber node
1224
+ * React stores the DOM node in fiber.stateNode for host components
1225
+ * or we need to walk down to find the first DOM node
1226
+ * @param fiber - Fiber node
1227
+ * @returns DOM Element or null
1228
+ */
1229
+ private getDOMElement;
1230
+ /**
1231
+ * Enable visual overlay for render highlighting
1232
+ */
1233
+ enableOverlay(): void;
1234
+ /**
1235
+ * Disable visual overlay
1236
+ */
1237
+ disableOverlay(): void;
1238
+ /**
1239
+ * Get overlay instance
1240
+ * @returns Overlay instance or null
1241
+ */
1242
+ getOverlay(): Overlay | null;
1078
1243
  /**
1079
1244
  * Start the scanner
1080
1245
  */
@@ -1168,142 +1333,6 @@ declare class BrowserScanner extends EventEmitter<BrowserScannerEvents> {
1168
1333
  getAllRenderCounts(): Map<string, number>;
1169
1334
  }
1170
1335
 
1171
- /**
1172
- * Browser overlay for render visualization
1173
- * @packageDocumentation
1174
- */
1175
-
1176
- /**
1177
- * Overlay configuration
1178
- */
1179
- interface OverlayConfig {
1180
- /** Whether overlay is enabled */
1181
- enabled: boolean;
1182
- /** Whether to highlight renders */
1183
- highlightRenders: boolean;
1184
- /** Animation speed */
1185
- animationSpeed: 'slow' | 'fast' | 'off';
1186
- /** Whether to show badges */
1187
- showBadges: boolean;
1188
- /** Whether to show toolbar */
1189
- showToolbar: boolean;
1190
- }
1191
- /**
1192
- * Overlay for visualizing React renders in the browser
1193
- */
1194
- declare class Overlay {
1195
- /** Shadow root for isolation */
1196
- private shadowRoot;
1197
- /** Host element */
1198
- private host;
1199
- /** Overlay configuration */
1200
- private config;
1201
- /** Highlight elements */
1202
- private highlights;
1203
- /** Badge elements */
1204
- private badges;
1205
- /** Render counts for badges */
1206
- private renderCounts;
1207
- /** Toolbar element */
1208
- private toolbar;
1209
- /** Whether overlay is visible */
1210
- private visible;
1211
- /**
1212
- * Create a new overlay
1213
- * @param config - Overlay configuration
1214
- */
1215
- constructor(config?: Partial<OverlayConfig>);
1216
- /**
1217
- * Initialize the overlay
1218
- */
1219
- init(): void;
1220
- /**
1221
- * Destroy the overlay
1222
- */
1223
- destroy(): void;
1224
- /**
1225
- * Inject CSS styles into shadow DOM
1226
- */
1227
- private injectStyles;
1228
- /**
1229
- * Create the floating toolbar
1230
- */
1231
- private createToolbar;
1232
- /**
1233
- * Set up toolbar event listeners
1234
- */
1235
- private setupToolbarEvents;
1236
- /**
1237
- * Make an element draggable
1238
- * @param element - Element to make draggable
1239
- */
1240
- private makeDraggable;
1241
- /**
1242
- * Highlight a component render
1243
- * @param render - Render information
1244
- * @param element - DOM element to highlight
1245
- */
1246
- highlight(render: RenderInfo, element: Element): void;
1247
- /**
1248
- * Update or create a badge for a component
1249
- * @param render - Render information
1250
- * @param rect - Bounding rectangle
1251
- * @param color - Badge color
1252
- */
1253
- private updateBadge;
1254
- /**
1255
- * Get severity level for a render
1256
- * @param render - Render information
1257
- * @returns Severity level
1258
- */
1259
- private getSeverity;
1260
- /**
1261
- * Record a render event (updates stats even without DOM element)
1262
- * @param render - Render information
1263
- */
1264
- recordRender(render: RenderInfo): void;
1265
- /** Total render count */
1266
- private totalRenders;
1267
- /**
1268
- * Update toolbar stats
1269
- */
1270
- private updateStats;
1271
- /**
1272
- * Clear all highlights
1273
- */
1274
- clearHighlights(): void;
1275
- /**
1276
- * Clear all badges
1277
- */
1278
- clearBadges(): void;
1279
- /**
1280
- * Clear all visualizations
1281
- */
1282
- clear(): void;
1283
- /**
1284
- * Show the overlay
1285
- */
1286
- show(): void;
1287
- /**
1288
- * Hide the overlay
1289
- */
1290
- hide(): void;
1291
- /**
1292
- * Toggle overlay visibility
1293
- */
1294
- toggle(): void;
1295
- /**
1296
- * Update configuration
1297
- * @param config - Partial configuration
1298
- */
1299
- configure(config: Partial<OverlayConfig>): void;
1300
- /**
1301
- * Check if overlay is visible
1302
- * @returns true if visible
1303
- */
1304
- isVisible(): boolean;
1305
- }
1306
-
1307
1336
  /**
1308
1337
  * Browser injection script - main entry point for browser-side code
1309
1338
  * This file is bundled as an IIFE for injection into target pages
@@ -1351,6 +1380,20 @@ declare class ReactCheckInjector {
1351
1380
  * @param message - CLI message
1352
1381
  */
1353
1382
  private handleMessage;
1383
+ /**
1384
+ * Toggle overlay visibility
1385
+ * @param enabled - Whether overlay should be visible
1386
+ */
1387
+ private handleToggleOverlay;
1388
+ /**
1389
+ * Get overlay visibility status
1390
+ * @returns Whether overlay is visible
1391
+ */
1392
+ isOverlayEnabled(): boolean;
1393
+ /**
1394
+ * Toggle overlay (public method for console access)
1395
+ */
1396
+ toggleOverlay(): void;
1354
1397
  /**
1355
1398
  * Handle config update
1356
1399
  * @param config - New configuration