@openreplay/tracker 18.1.4 → 18.1.5

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.
@@ -1,4 +1,10 @@
1
1
  import type App from '../app/index.js';
2
+ export declare function isDeepClickable(element: Element): boolean;
3
+ /**
4
+ * cursor is inherited, so every child of a clickable div reports a pointer too;
5
+ * climb to the outermost element that still owns the pointer
6
+ * */
7
+ export declare function resolvePointerRoot(element: Element): Element;
2
8
  export interface MouseHandlerOptions {
3
9
  disableClickmaps?: boolean;
4
10
  /**
@@ -11,4 +17,4 @@ export interface MouseHandlerOptions {
11
17
  customAttributes?: string[];
12
18
  }
13
19
  export default function (app: App, options?: MouseHandlerOptions): void;
14
- export declare function getCSSPath(el: any): string | false;
20
+ export declare function getCSSPath(el: any, customAttributes?: string[]): string | false;
@@ -11,6 +11,15 @@ export declare const DOCS_HOST = "https://docs.openreplay.com";
11
11
  export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
12
12
  export declare function getCustomAttributeLabel(e: Element, customAttributes?: string[]): string;
13
13
  export declare function getClassSelector(e: Element): string;
14
+ export declare const cssEscape: (str: string) => string;
15
+ /** escape a value that goes inside a quoted css attribute selector */
16
+ export declare function cssAttrValue(value: string): string;
17
+ export declare function getCustomAttributeSelector(e: Element, customAttributes?: string[]): string;
18
+ /**
19
+ * human readable label of a clicked element: its own text/description,
20
+ * then the same for a few ancestors (a click on an icon inside a card)
21
+ * */
22
+ export declare function getTextualLabel(e: Element, getInnerText: (el: HTMLElement) => string, maxAncestors?: number): string;
14
23
  export declare function getLabelAttribute(e: Element): string | null;
15
24
  export declare function hasOpenreplayAttribute(e: Element, attr: string): boolean;
16
25
  /**
@@ -1,4 +1,10 @@
1
1
  import type App from '../app/index.js';
2
+ export declare function isDeepClickable(element: Element): boolean;
3
+ /**
4
+ * cursor is inherited, so every child of a clickable div reports a pointer too;
5
+ * climb to the outermost element that still owns the pointer
6
+ * */
7
+ export declare function resolvePointerRoot(element: Element): Element;
2
8
  export interface MouseHandlerOptions {
3
9
  disableClickmaps?: boolean;
4
10
  /**
@@ -11,4 +17,4 @@ export interface MouseHandlerOptions {
11
17
  customAttributes?: string[];
12
18
  }
13
19
  export default function (app: App, options?: MouseHandlerOptions): void;
14
- export declare function getCSSPath(el: any): string | false;
20
+ export declare function getCSSPath(el: any, customAttributes?: string[]): string | false;
@@ -11,6 +11,15 @@ export declare const DOCS_HOST = "https://docs.openreplay.com";
11
11
  export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
12
12
  export declare function getCustomAttributeLabel(e: Element, customAttributes?: string[]): string;
13
13
  export declare function getClassSelector(e: Element): string;
14
+ export declare const cssEscape: (str: string) => string;
15
+ /** escape a value that goes inside a quoted css attribute selector */
16
+ export declare function cssAttrValue(value: string): string;
17
+ export declare function getCustomAttributeSelector(e: Element, customAttributes?: string[]): string;
18
+ /**
19
+ * human readable label of a clicked element: its own text/description,
20
+ * then the same for a few ancestors (a click on an icon inside a card)
21
+ * */
22
+ export declare function getTextualLabel(e: Element, getInnerText: (el: HTMLElement) => string, maxAncestors?: number): string;
14
23
  export declare function getLabelAttribute(e: Element): string | null;
15
24
  export declare function hasOpenreplayAttribute(e: Element, attr: string): boolean;
16
25
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "18.1.4",
4
+ "version": "18.1.5",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"
@@ -62,6 +62,7 @@
62
62
  "@rollup/plugin-typescript": "^12.3.0",
63
63
  "@typescript-eslint/eslint-plugin": "^8.65.0",
64
64
  "@typescript-eslint/parser": "^8.65.0",
65
+ "babel-jest": "^30.4.2",
65
66
  "eslint": "^9.39.5",
66
67
  "eslint-config-prettier": "^10.1.8",
67
68
  "eslint-plugin-prettier": "^5.5.6",