From 6010d62c602725031efaf650bacd7fdf1e45b11b Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] Release 0.7.10 --- package.json | 2 +- typings/replay/styles/inject-style.d.ts | 2 +- typings/types.d.ts | 11 ++++++++--- typings/utils.d.ts | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0d26613e..d4051ea7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rrweb", - "version": "0.7.9", + "version": "0.7.10", "description": "record and replay the web", "scripts": { "test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts", diff --git a/typings/replay/styles/inject-style.d.ts b/typings/replay/styles/inject-style.d.ts index 0798d9e7..88c0f362 100644 --- a/typings/replay/styles/inject-style.d.ts +++ b/typings/replay/styles/inject-style.d.ts @@ -1,2 +1,2 @@ -declare const rules: string[]; +declare const rules: (blockClass: string) => string[]; export default rules; diff --git a/typings/types.d.ts b/typings/types.d.ts index ce1807a7..4be126f3 100644 --- a/typings/types.d.ts +++ b/typings/types.d.ts @@ -74,6 +74,8 @@ export declare type recordOptions = { emit?: (e: eventWithTime, isCheckout?: boolean) => void; checkoutEveryNth?: number; checkoutEveryNms?: number; + blockClass?: string; + ignoreClass?: string; }; export declare type observerParam = { mutationCb: mutationCallBack; @@ -82,6 +84,8 @@ export declare type observerParam = { scrollCb: scrollCallback; viewportResizeCb: viewportResizeCallback; inputCb: inputCallback; + blockClass: string; + ignoreClass: string; }; export declare type textCursor = { node: Node; @@ -181,9 +185,10 @@ export declare type playerConfig = { speed: number; root: Element; loadTimeout: number; - skipInactive: Boolean; - showWarning: Boolean; - showDebug: Boolean; + skipInactive: boolean; + showWarning: boolean; + showDebug: boolean; + blockClass: string; }; export declare type playerMetaData = { totalTime: number; diff --git a/typings/utils.d.ts b/typings/utils.d.ts index 94f70e77..ea0c66b7 100644 --- a/typings/utils.d.ts +++ b/typings/utils.d.ts @@ -6,5 +6,5 @@ export declare function throttle(func: (arg: T) => void, wait: number, option export declare function hookSetter(target: T, key: string | number | symbol, d: PropertyDescriptor): hookResetter; export declare function getWindowHeight(): number; export declare function getWindowWidth(): number; -export declare function isBlocked(node: Node | null): boolean; +export declare function isBlocked(node: Node | null, blockClass: string): boolean; export declare function isAncestorRemoved(target: INode): boolean;