rename visit to visitSnapshot
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import snapshot, {
|
import snapshot, {
|
||||||
serializeNodeWithId,
|
serializeNodeWithId,
|
||||||
transformAttribute,
|
transformAttribute,
|
||||||
visit,
|
visitSnapshot,
|
||||||
} from './snapshot';
|
} from './snapshot';
|
||||||
import rebuild, { buildNodeWithSN, addHoverClass } from './rebuild';
|
import rebuild, { buildNodeWithSN, addHoverClass } from './rebuild';
|
||||||
export * from './types';
|
export * from './types';
|
||||||
@@ -13,5 +13,5 @@ export {
|
|||||||
buildNodeWithSN,
|
buildNodeWithSN,
|
||||||
addHoverClass,
|
addHoverClass,
|
||||||
transformAttribute,
|
transformAttribute,
|
||||||
visit,
|
visitSnapshot,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ function snapshot(
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function visit(
|
export function visitSnapshot(
|
||||||
node: serializedNodeWithId,
|
node: serializedNodeWithId,
|
||||||
onVisit: (node: serializedNodeWithId) => unknown,
|
onVisit: (node: serializedNodeWithId) => unknown,
|
||||||
) {
|
) {
|
||||||
|
|||||||
4
typings/index.d.ts
vendored
4
typings/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
import snapshot, { serializeNodeWithId, transformAttribute } from './snapshot';
|
import snapshot, { serializeNodeWithId, transformAttribute, visitSnapshot } from './snapshot';
|
||||||
import rebuild, { buildNodeWithSN, addHoverClass } from './rebuild';
|
import rebuild, { buildNodeWithSN, addHoverClass } from './rebuild';
|
||||||
export * from './types';
|
export * from './types';
|
||||||
export { snapshot, serializeNodeWithId, rebuild, buildNodeWithSN, addHoverClass, transformAttribute, };
|
export { snapshot, serializeNodeWithId, rebuild, buildNodeWithSN, addHoverClass, transformAttribute, visitSnapshot, };
|
||||||
|
|||||||
2
typings/rebuild.d.ts
vendored
2
typings/rebuild.d.ts
vendored
@@ -1,5 +1,5 @@
|
|||||||
import { serializedNodeWithId, idNodeMap, INode } from './types';
|
import { serializedNodeWithId, idNodeMap, INode } from './types';
|
||||||
export declare function addHoverClass(cssText: string): string;
|
export declare function addHoverClass(cssText: string): string;
|
||||||
export declare function buildNodeWithSN(n: serializedNodeWithId, doc: Document, map: idNodeMap, skipChild?: boolean, HACK_CSS?: boolean): INode | null;
|
export declare function buildNodeWithSN(n: serializedNodeWithId, doc: Document, map: idNodeMap, skipChild?: boolean, HACK_CSS?: boolean): INode | null;
|
||||||
declare function rebuild(n: serializedNodeWithId, doc: Document, HACK_CSS?: boolean): [Node | null, idNodeMap];
|
declare function rebuild(n: serializedNodeWithId, doc: Document, onVisit?: (node: INode) => unknown, HACK_CSS?: boolean): [Node | null, idNodeMap];
|
||||||
export default rebuild;
|
export default rebuild;
|
||||||
|
|||||||
1
typings/snapshot.d.ts
vendored
1
typings/snapshot.d.ts
vendored
@@ -4,4 +4,5 @@ export declare function absoluteToDoc(doc: Document, attributeValue: string): st
|
|||||||
export declare function transformAttribute(doc: Document, name: string, value: string): string;
|
export declare function transformAttribute(doc: Document, name: string, value: string): string;
|
||||||
export declare function serializeNodeWithId(n: Node | INode, doc: Document, map: idNodeMap, blockClass: string | RegExp, skipChild?: boolean, inlineStylesheet?: boolean, maskInputOptions?: MaskInputOptions): serializedNodeWithId | null;
|
export declare function serializeNodeWithId(n: Node | INode, doc: Document, map: idNodeMap, blockClass: string | RegExp, skipChild?: boolean, inlineStylesheet?: boolean, maskInputOptions?: MaskInputOptions): serializedNodeWithId | null;
|
||||||
declare function snapshot(n: Document, blockClass: string | RegExp | undefined, inlineStylesheet: boolean | undefined, maskAllInputsOrOptions: boolean | MaskInputOptions): [serializedNodeWithId | null, idNodeMap];
|
declare function snapshot(n: Document, blockClass: string | RegExp | undefined, inlineStylesheet: boolean | undefined, maskAllInputsOrOptions: boolean | MaskInputOptions): [serializedNodeWithId | null, idNodeMap];
|
||||||
|
export declare function visitSnapshot(node: serializedNodeWithId, onVisit: (node: serializedNodeWithId) => unknown): void;
|
||||||
export default snapshot;
|
export default snapshot;
|
||||||
|
|||||||
Reference in New Issue
Block a user