@oxog/react-check 1.2.0 → 1.3.0
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/CHANGELOG.md +86 -0
- package/README.md +142 -50
- package/dist/browser-inject.global.js +13 -13
- package/dist/chain.cjs +8 -531
- package/dist/chain.cjs.map +1 -1
- package/dist/chain.d.cts +2 -2
- package/dist/chain.d.ts +2 -2
- package/dist/chain.js +2 -533
- package/dist/chain.js.map +1 -1
- package/dist/chunk-27R56V2S.js +473 -0
- package/dist/chunk-27R56V2S.js.map +1 -0
- package/dist/chunk-3K2AER5M.cjs +356 -0
- package/dist/chunk-3K2AER5M.cjs.map +1 -0
- package/dist/chunk-7R4KKJTW.cjs +255 -0
- package/dist/chunk-7R4KKJTW.cjs.map +1 -0
- package/dist/chunk-7YYMP3PP.js +723 -0
- package/dist/chunk-7YYMP3PP.js.map +1 -0
- package/dist/chunk-DWM55ACO.cjs +294 -0
- package/dist/chunk-DWM55ACO.cjs.map +1 -0
- package/dist/chunk-G7YVIPS7.cjs +475 -0
- package/dist/chunk-G7YVIPS7.cjs.map +1 -0
- package/dist/chunk-GE2ZX7I7.cjs +727 -0
- package/dist/chunk-GE2ZX7I7.cjs.map +1 -0
- package/dist/chunk-GS7T56RP.cjs +9 -0
- package/dist/chunk-GS7T56RP.cjs.map +1 -0
- package/dist/chunk-IM6OG2IC.js +338 -0
- package/dist/chunk-IM6OG2IC.js.map +1 -0
- package/dist/chunk-RQYHXWUC.js +292 -0
- package/dist/chunk-RQYHXWUC.js.map +1 -0
- package/dist/chunk-WLN7ZVO4.js +253 -0
- package/dist/chunk-WLN7ZVO4.js.map +1 -0
- package/dist/cli.js +975 -204
- package/dist/cli.js.map +1 -1
- package/dist/detect.cjs +22 -324
- package/dist/detect.cjs.map +1 -1
- package/dist/detect.d.cts +8 -2
- package/dist/detect.d.ts +8 -2
- package/dist/detect.js +1 -324
- package/dist/detect.js.map +1 -1
- package/dist/{event-emitter-CxKUDo9q.d.cts → event-emitter-BVYUPYLd.d.cts} +3 -2
- package/dist/{event-emitter-CxKUDo9q.d.ts → event-emitter-BVYUPYLd.d.ts} +3 -2
- package/dist/fix.cjs +6 -715
- package/dist/fix.cjs.map +1 -1
- package/dist/fix.d.cts +2 -2
- package/dist/fix.d.ts +2 -2
- package/dist/fix.js +2 -719
- package/dist/fix.js.map +1 -1
- package/dist/index.cjs +1238 -2987
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +166 -50
- package/dist/index.d.ts +166 -50
- package/dist/index.js +1137 -2959
- package/dist/index.js.map +1 -1
- package/dist/{scanner-Cc2187fH.d.ts → scanner-D0mBQGTx.d.ts} +23 -3
- package/dist/{scanner-S7BtVIpW.d.cts → scanner-DUBgwztZ.d.cts} +23 -3
- package/dist/scanner.cjs +8 -1652
- package/dist/scanner.cjs.map +1 -1
- package/dist/scanner.d.cts +3 -3
- package/dist/scanner.d.ts +3 -3
- package/dist/scanner.js +4 -1656
- package/dist/scanner.js.map +1 -1
- package/dist/{types-DuZyBVVV.d.cts → types-BZ3OeZ-5.d.cts} +28 -10
- package/dist/{types-DuZyBVVV.d.ts → types-BZ3OeZ-5.d.ts} +28 -10
- package/package.json +16 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as ComponentStats, f as Severity, l as ThresholdOptions, R as RenderInfo, j as SessionSummary, c as RenderChainInfo, g as FixSuggestion, d as ScannerConfig } from './types-
|
|
2
|
-
import { E as EventEmitter } from './event-emitter-
|
|
1
|
+
import { h as ComponentStats, f as Severity, l as ThresholdOptions, R as RenderInfo, j as SessionSummary, c as RenderChainInfo, g as FixSuggestion, d as ScannerConfig, o as RuleOptions } from './types-BZ3OeZ-5.js';
|
|
2
|
+
import { E as EventEmitter } from './event-emitter-BVYUPYLd.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Statistics collector for component render data
|
|
@@ -230,6 +230,8 @@ declare class Scanner extends EventEmitter<ScannerEvents> {
|
|
|
230
230
|
constructor(options?: {
|
|
231
231
|
config?: Partial<ScannerConfig>;
|
|
232
232
|
thresholds?: Partial<ThresholdOptions>;
|
|
233
|
+
/** Fix-suggestion rule levels by rule id (`off` disables a rule) */
|
|
234
|
+
rules?: RuleOptions;
|
|
233
235
|
});
|
|
234
236
|
/**
|
|
235
237
|
* Set up event forwarding from sub-modules
|
|
@@ -254,9 +256,27 @@ declare class Scanner extends EventEmitter<ScannerEvents> {
|
|
|
254
256
|
*/
|
|
255
257
|
addRender(render: RenderInfo, parent?: string): void;
|
|
256
258
|
/**
|
|
257
|
-
*
|
|
259
|
+
* Check a component name against the configured include/exclude patterns
|
|
260
|
+
* @param name - Component name
|
|
261
|
+
* @returns true if renders of this component should be tracked
|
|
262
|
+
*/
|
|
263
|
+
isComponentIncluded(name: string): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Record a painted frame for FPS calculation (the scanner derives FPS from
|
|
266
|
+
* frames recorded during each one-second window)
|
|
258
267
|
*/
|
|
259
268
|
recordFrame(): void;
|
|
269
|
+
/**
|
|
270
|
+
* Record an FPS sample measured elsewhere (e.g. by requestAnimationFrame in
|
|
271
|
+
* the browser)
|
|
272
|
+
* @param fps - Frames per second
|
|
273
|
+
*/
|
|
274
|
+
recordFps(fps: number): void;
|
|
275
|
+
/**
|
|
276
|
+
* FPS threshold below which `fps-drop` is emitted
|
|
277
|
+
* @returns Threshold
|
|
278
|
+
*/
|
|
279
|
+
private getFpsThreshold;
|
|
260
280
|
/**
|
|
261
281
|
* Schedule batch processing
|
|
262
282
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as ComponentStats, f as Severity, l as ThresholdOptions, R as RenderInfo, j as SessionSummary, c as RenderChainInfo, g as FixSuggestion, d as ScannerConfig } from './types-
|
|
2
|
-
import { E as EventEmitter } from './event-emitter-
|
|
1
|
+
import { h as ComponentStats, f as Severity, l as ThresholdOptions, R as RenderInfo, j as SessionSummary, c as RenderChainInfo, g as FixSuggestion, d as ScannerConfig, o as RuleOptions } from './types-BZ3OeZ-5.cjs';
|
|
2
|
+
import { E as EventEmitter } from './event-emitter-BVYUPYLd.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Statistics collector for component render data
|
|
@@ -230,6 +230,8 @@ declare class Scanner extends EventEmitter<ScannerEvents> {
|
|
|
230
230
|
constructor(options?: {
|
|
231
231
|
config?: Partial<ScannerConfig>;
|
|
232
232
|
thresholds?: Partial<ThresholdOptions>;
|
|
233
|
+
/** Fix-suggestion rule levels by rule id (`off` disables a rule) */
|
|
234
|
+
rules?: RuleOptions;
|
|
233
235
|
});
|
|
234
236
|
/**
|
|
235
237
|
* Set up event forwarding from sub-modules
|
|
@@ -254,9 +256,27 @@ declare class Scanner extends EventEmitter<ScannerEvents> {
|
|
|
254
256
|
*/
|
|
255
257
|
addRender(render: RenderInfo, parent?: string): void;
|
|
256
258
|
/**
|
|
257
|
-
*
|
|
259
|
+
* Check a component name against the configured include/exclude patterns
|
|
260
|
+
* @param name - Component name
|
|
261
|
+
* @returns true if renders of this component should be tracked
|
|
262
|
+
*/
|
|
263
|
+
isComponentIncluded(name: string): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Record a painted frame for FPS calculation (the scanner derives FPS from
|
|
266
|
+
* frames recorded during each one-second window)
|
|
258
267
|
*/
|
|
259
268
|
recordFrame(): void;
|
|
269
|
+
/**
|
|
270
|
+
* Record an FPS sample measured elsewhere (e.g. by requestAnimationFrame in
|
|
271
|
+
* the browser)
|
|
272
|
+
* @param fps - Frames per second
|
|
273
|
+
*/
|
|
274
|
+
recordFps(fps: number): void;
|
|
275
|
+
/**
|
|
276
|
+
* FPS threshold below which `fps-drop` is emitted
|
|
277
|
+
* @returns Threshold
|
|
278
|
+
*/
|
|
279
|
+
private getFpsThreshold;
|
|
260
280
|
/**
|
|
261
281
|
* Schedule batch processing
|
|
262
282
|
*/
|