* introduce pako and add general packer interface

* add tests for packer

* use function API instead of class API for better tree shaking support

* refcatoring the rollup bundle config
This commit is contained in:
yz-yu
2020-04-07 18:03:47 +08:00
committed by GitHub
parent 18129bab70
commit 4f36d0e57d
23 changed files with 316 additions and 218 deletions

View File

@@ -1,4 +1,5 @@
import { serializedNodeWithId, idNodeMap, INode } from 'rrweb-snapshot';
import { PackFn, UnpackFn } from './packer/base';
export enum EventType {
DomContentLoaded,
@@ -125,8 +126,8 @@ export type eventWithTime = event & {
export type blockClass = string | RegExp;
export type recordOptions = {
emit?: (e: eventWithTime, isCheckout?: boolean) => void;
export type recordOptions<T> = {
emit?: (e: T, isCheckout?: boolean) => void;
checkoutEveryNth?: number;
checkoutEveryNms?: number;
blockClass?: blockClass;
@@ -135,6 +136,7 @@ export type recordOptions = {
inlineStylesheet?: boolean;
hooks?: hooksParam;
mousemoveWait?: number;
packFn?: PackFn;
};
export type observerParam = {
@@ -319,6 +321,7 @@ export type playerConfig = {
liveMode: boolean;
insertStyleRules: string[];
triggerFocus: boolean;
unpackFn?: UnpackFn;
};
export type playerMetaData = {