Skip to content

Commit c206e10

Browse files
committed
Release 0.7.28
1 parent e4593ff commit c206e10

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rrweb-snapshot",
3-
"version": "0.7.27",
3+
"version": "0.7.28",
44
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
55
"scripts": {
66
"test": "cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.ts",

typings/snapshot.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { serializedNodeWithId, INode, idNodeMap } from './types';
1+
import { serializedNodeWithId, INode, idNodeMap, MaskInputOptions } from './types';
22
export declare function absoluteToStylesheet(cssText: string | null, href: string): string;
33
export declare function absoluteToDoc(doc: Document, attributeValue: string): string;
44
export declare function transformAttribute(doc: Document, name: string, value: string): string;
5-
export declare function serializeNodeWithId(n: Node | INode, doc: Document, map: idNodeMap, blockClass: string | RegExp, skipChild?: boolean, inlineStylesheet?: boolean, maskAllInputs?: boolean): serializedNodeWithId | null;
6-
declare function snapshot(n: Document, blockClass?: string | RegExp, inlineStylesheet?: boolean, maskAllInputs?: boolean): [serializedNodeWithId | null, idNodeMap];
5+
export declare function serializeNodeWithId(n: Node | INode, doc: Document, map: idNodeMap, blockClass: string | RegExp, skipChild?: boolean, inlineStylesheet?: boolean, maskInputOptions?: MaskInputOptions): serializedNodeWithId | null;
6+
declare function snapshot(n: Document, blockClass: string | RegExp | undefined, inlineStylesheet: boolean | undefined, maskAllInputsOrOptions: boolean | MaskInputOptions): [serializedNodeWithId | null, idNodeMap];
77
export default snapshot;

typings/types.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,18 @@ export interface INode extends Node {
5353
export declare type idNodeMap = {
5454
[key: number]: INode;
5555
};
56+
export declare type MaskInputOptions = Partial<{
57+
color: boolean;
58+
date: boolean;
59+
'datetime-local': boolean;
60+
email: boolean;
61+
month: boolean;
62+
number: boolean;
63+
range: boolean;
64+
search: boolean;
65+
tel: boolean;
66+
text: boolean;
67+
time: boolean;
68+
url: boolean;
69+
week: boolean;
70+
}>;

0 commit comments

Comments
 (0)