@highlight-run/rrweb 0.12.13 → 1.1.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/dist/types.d.ts CHANGED
@@ -132,7 +132,7 @@ export declare type SamplingStrategy = Partial<{
132
132
  }>;
133
133
  export declare type RecordPlugin<TOptions = unknown> = {
134
134
  name: string;
135
- observer: (cb: Function, options: TOptions) => listenerHandler;
135
+ observer: (cb: Function, win: Window, options: TOptions) => listenerHandler;
136
136
  options: TOptions;
137
137
  };
138
138
  export declare type recordOptions<T> = {
@@ -227,16 +227,20 @@ export declare type textMutation = {
227
227
  id: number;
228
228
  value: string | null;
229
229
  };
230
+ export declare type styleAttributeValue = {
231
+ [key: string]: styleValueWithPriority | string | false;
232
+ };
233
+ export declare type styleValueWithPriority = [string, string];
230
234
  export declare type attributeCursor = {
231
235
  node: Node;
232
236
  attributes: {
233
- [key: string]: string | null;
237
+ [key: string]: string | styleAttributeValue | null;
234
238
  };
235
239
  };
236
240
  export declare type attributeMutation = {
237
241
  id: number;
238
242
  attributes: {
239
- [key: string]: string | null;
243
+ [key: string]: string | styleAttributeValue | null;
240
244
  };
241
245
  };
242
246
  export declare type removedNodeMutation = {
@@ -284,6 +288,24 @@ export declare enum MouseInteractions {
284
288
  TouchEnd = 9,
285
289
  TouchCancel = 10
286
290
  }
291
+ export declare enum CanvasContext {
292
+ '2D' = 0,
293
+ WebGL = 1,
294
+ WebGL2 = 2
295
+ }
296
+ export declare type SerializedWebGlArg = {
297
+ rr_type: 'ArrayBuffer';
298
+ base64: string;
299
+ } | {
300
+ rr_type: string;
301
+ src: string;
302
+ } | {
303
+ rr_type: string;
304
+ args: Array<SerializedWebGlArg>;
305
+ } | {
306
+ rr_type: string;
307
+ index: number;
308
+ } | string | number | boolean | null | SerializedWebGlArg[];
287
309
  declare type mouseInteractionParam = {
288
310
  type: MouseInteractions;
289
311
  id: number;
@@ -326,9 +348,11 @@ export declare type styleDeclarationCallback = (s: styleDeclarationParam) => voi
326
348
  export declare type canvasMutationCallback = (p: canvasMutationParam) => void;
327
349
  export declare type canvasMutationParam = {
328
350
  id: number;
351
+ type: CanvasContext;
329
352
  property: string;
330
353
  args: Array<unknown>;
331
354
  setter?: true;
355
+ newFrame?: true;
332
356
  };
333
357
  export declare type fontParam = {
334
358
  family: string;
@@ -400,7 +424,6 @@ export declare type playerConfig = {
400
424
  triggerFocus: boolean;
401
425
  UNSAFE_replayCanvas: boolean;
402
426
  pauseAnimation?: boolean;
403
- userTriggeredOnInput: boolean;
404
427
  mouseTail: boolean | {
405
428
  duration?: number;
406
429
  lineCap?: string;
@@ -427,6 +450,7 @@ export declare type missingNodeMap = {
427
450
  export declare type actionWithDelay = {
428
451
  doAction: () => void;
429
452
  delay: number;
453
+ newFrame: boolean;
430
454
  };
431
455
  export declare type Handler = (event?: unknown) => void;
432
456
  export declare type Emitter = {
@@ -463,6 +487,8 @@ export interface HighlightConfiguration {
463
487
  declare global {
464
488
  interface Window {
465
489
  HIG_CONFIGURATION: HighlightConfiguration;
490
+ FontFace: typeof FontFace;
466
491
  }
467
492
  }
493
+ export declare type IWindow = Window & typeof globalThis;
468
494
  export {};
package/dist/utils.d.ts CHANGED
@@ -45,6 +45,7 @@ export declare class TreeIndex {
45
45
  inputMap: TreeIndex['inputMap'];
46
46
  };
47
47
  private reset;
48
+ idRemoved(id: number): boolean;
48
49
  }
49
50
  declare type ResolveTree = {
50
51
  value: addedNodeMutation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highlight-run/rrweb",
3
- "version": "0.12.13",
3
+ "version": "1.1.0",
4
4
  "description": "record and replay the web",
5
5
  "scripts": {
6
6
  "test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",
@@ -43,13 +43,13 @@
43
43
  "chai": "^4.2.0",
44
44
  "cross-env": "^5.2.0",
45
45
  "css-loader": "^5.0.1",
46
- "mini-css-extract-plugin": "^1.3.8",
47
46
  "fast-mhtml": "^1.1.9",
48
47
  "ignore-styles": "^5.0.1",
49
48
  "inquirer": "^6.2.1",
50
49
  "jest-snapshot": "^23.6.0",
51
50
  "jsdom": "^16.6.0",
52
51
  "jsdom-global": "^3.0.2",
52
+ "mini-css-extract-plugin": "^1.3.8",
53
53
  "mocha": "^5.2.0",
54
54
  "node-libtidy": "^0.4.0",
55
55
  "prettier": "2.2.1",
@@ -76,7 +76,9 @@
76
76
  "dependencies": {
77
77
  "@types/css-font-loading-module": "0.0.4",
78
78
  "@xstate/fsm": "^1.4.0",
79
+ "base64-arraybuffer": "^1.0.1",
79
80
  "fflate": "^0.4.4",
81
+ "identity-obj-proxy": "^3.0.0",
80
82
  "mitt": "^1.1.3"
81
83
  }
82
84
  }