@openreplay/tracker 16.3.0-beta.2 → 16.3.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.
@@ -27,6 +27,9 @@ export declare function UserAnonymousID(id: string): Messages.UserAnonymousID;
27
27
  export declare function Metadata(key: string, value: string): Messages.Metadata;
28
28
  export declare function StringDictGlobal(key: number, value: string): Messages.StringDictGlobal;
29
29
  export declare function SetNodeAttributeDictGlobal(id: number, name: number, value: number): Messages.SetNodeAttributeDictGlobal;
30
+ export declare function CSSInsertRule(id: number, rule: string, index: number): Messages.CSSInsertRule;
31
+ export declare function CSSDeleteRule(id: number, index: number): Messages.CSSDeleteRule;
32
+ export declare function Fetch(method: string, url: string, request: string, response: string, status: number, timestamp: number, duration: number): Messages.Fetch;
30
33
  export declare function Profiler(name: string, duration: number, args: string, result: string): Messages.Profiler;
31
34
  export declare function OTable(key: string, value: string): Messages.OTable;
32
35
  export declare function StateAction(type: string): Messages.StateAction;
@@ -45,10 +48,12 @@ export declare function ConnectionInformation(downlink: number, type: string): M
45
48
  export declare function SetPageVisibility(hidden: boolean): Messages.SetPageVisibility;
46
49
  export declare function LoadFontFace(parentID: number, family: string, source: string, descriptors: string): Messages.LoadFontFace;
47
50
  export declare function SetNodeFocus(id: number): Messages.SetNodeFocus;
51
+ export declare function LongTask(timestamp: number, duration: number, context: number, containerType: number, containerSrc: string, containerId: string, containerName: string): Messages.LongTask;
48
52
  export declare function SetNodeAttributeURLBased(id: number, name: string, value: string, baseURL: string): Messages.SetNodeAttributeURLBased;
49
53
  export declare function SetCSSDataURLBased(id: number, data: string, baseURL: string): Messages.SetCSSDataURLBased;
50
54
  export declare function TechnicalInfo(type: string, value: string): Messages.TechnicalInfo;
51
55
  export declare function CustomIssue(name: string, payload: string): Messages.CustomIssue;
56
+ export declare function CSSInsertRuleURLBased(id: number, rule: string, index: number, baseURL: string): Messages.CSSInsertRuleURLBased;
52
57
  export declare function MouseClick(id: number, hesitationTime: number, label: string, selector: string, normalizedX: number, normalizedY: number): Messages.MouseClick;
53
58
  export declare function MouseClickDeprecated(id: number, hesitationTime: number, label: string, selector: string): Messages.MouseClickDeprecated;
54
59
  export declare function CreateIFrameDocument(frameID: number, id: number): Messages.CreateIFrameDocument;
@@ -34,7 +34,6 @@ export default abstract class Observer {
34
34
  */
35
35
  private handleIframeSrcChange;
36
36
  private sendNodeAttribute;
37
- private throttledSetNodeData;
38
37
  private sendNodeData;
39
38
  private bindNode;
40
39
  private bindTree;
@@ -1,31 +1,13 @@
1
1
  import type App from '../app/index.js';
2
2
  export interface MouseHandlerOptions {
3
3
  disableClickmaps?: boolean;
4
- /** minimum length of an optimised selector.
5
- *
6
- * body > div > div > p => body > p for example
7
- *
8
- * default 2
9
- * */
10
- minSelectorDepth?: number;
11
- /** how many selectors to try before falling back to nth-child selectors
12
- * performance expensive operation
13
- *
14
- * default 1000
15
- * */
16
- nthThreshold?: number;
17
- /**
18
- * how many tries to optimise and shorten the selector
19
- *
20
- * default 10_000
21
- * */
22
- maxOptimiseTries?: number;
23
4
  /**
24
5
  * how many ticks to wait before capturing mouse position
25
6
  * (can affect performance)
26
7
  * 1 tick = 30ms
27
- * default 7
8
+ * default 7 = 210ms
28
9
  * */
29
10
  trackingOffset?: number;
30
11
  }
31
12
  export default function (app: App, options?: MouseHandlerOptions): void;
13
+ export declare function getCSSPath(el: any): string | false;
@@ -28,6 +28,3 @@ export declare function createEventListener(target: EventTarget, event: string,
28
28
  export declare function deleteEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean, forceNgOff?: boolean): void;
29
29
  export declare function requestIdleCb(callback: () => void): void;
30
30
  export declare function simpleMerge<T>(defaultObj: T, givenObj: Partial<T>): T;
31
- export declare function throttleWithTrailing<K, Args extends any[]>(fn: (key: K, ...args: Args) => void, interval: number): ((key: K, ...args: Args) => void) & {
32
- clear: () => void;
33
- };
@@ -26,6 +26,9 @@ export declare const enum Type {
26
26
  Metadata = 30,
27
27
  StringDictGlobal = 34,
28
28
  SetNodeAttributeDictGlobal = 35,
29
+ CSSInsertRule = 37,
30
+ CSSDeleteRule = 38,
31
+ Fetch = 39,
29
32
  Profiler = 40,
30
33
  OTable = 41,
31
34
  StateAction = 42,
@@ -44,10 +47,12 @@ export declare const enum Type {
44
47
  SetPageVisibility = 55,
45
48
  LoadFontFace = 57,
46
49
  SetNodeFocus = 58,
50
+ LongTask = 59,
47
51
  SetNodeAttributeURLBased = 60,
48
52
  SetCSSDataURLBased = 61,
49
53
  TechnicalInfo = 63,
50
54
  CustomIssue = 64,
55
+ CSSInsertRuleURLBased = 67,
51
56
  MouseClick = 68,
52
57
  MouseClickDeprecated = 69,
53
58
  CreateIFrameDocument = 70,
@@ -229,6 +234,27 @@ export type SetNodeAttributeDictGlobal = [
229
234
  number,
230
235
  number
231
236
  ];
237
+ export type CSSInsertRule = [
238
+ Type.CSSInsertRule,
239
+ number,
240
+ string,
241
+ number
242
+ ];
243
+ export type CSSDeleteRule = [
244
+ Type.CSSDeleteRule,
245
+ number,
246
+ number
247
+ ];
248
+ export type Fetch = [
249
+ Type.Fetch,
250
+ string,
251
+ string,
252
+ string,
253
+ string,
254
+ number,
255
+ number,
256
+ number
257
+ ];
232
258
  export type Profiler = [
233
259
  Type.Profiler,
234
260
  string,
@@ -335,6 +361,16 @@ export type SetNodeFocus = [
335
361
  Type.SetNodeFocus,
336
362
  number
337
363
  ];
364
+ export type LongTask = [
365
+ Type.LongTask,
366
+ number,
367
+ number,
368
+ number,
369
+ number,
370
+ string,
371
+ string,
372
+ string
373
+ ];
338
374
  export type SetNodeAttributeURLBased = [
339
375
  Type.SetNodeAttributeURLBased,
340
376
  number,
@@ -358,6 +394,13 @@ export type CustomIssue = [
358
394
  string,
359
395
  string
360
396
  ];
397
+ export type CSSInsertRuleURLBased = [
398
+ Type.CSSInsertRuleURLBased,
399
+ number,
400
+ string,
401
+ number,
402
+ string
403
+ ];
361
404
  export type MouseClick = [
362
405
  Type.MouseClick,
363
406
  number,
@@ -533,5 +576,5 @@ export type WebVitals = [
533
576
  string,
534
577
  string
535
578
  ];
536
- type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals;
579
+ type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTiming | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals;
537
580
  export default Message;