@oxvo/browser 7.1.0 → 7.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.
- package/dist/cjs/common/interaction.d.ts +12 -1
- package/dist/cjs/common/messages.gen.d.ts +4 -7
- package/dist/cjs/entry.js +991 -945
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +918 -913
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/app/canvas.d.ts +8 -0
- package/dist/cjs/main/app/index.d.ts +13 -5
- package/dist/cjs/main/app/messages.gen.d.ts +0 -1
- package/dist/cjs/main/app/observer/observer.d.ts +16 -0
- package/dist/cjs/main/app/sanitizer.d.ts +5 -3
- package/dist/cjs/main/index.d.ts +16 -0
- package/dist/cjs/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/cjs/main/modules/analytics/index.d.ts +5 -0
- package/dist/cjs/main/modules/input.d.ts +2 -1
- package/dist/cjs/main/modules/markerWatcher.d.ts +4 -8
- package/dist/cjs/main/modules/mouse.d.ts +1 -0
- package/dist/cjs/main/modules/tagMatcher.d.ts +28 -0
- package/dist/cjs/main/singleton.d.ts +24 -0
- package/dist/cjs/main/utils.d.ts +2 -0
- package/dist/lib/common/interaction.d.ts +12 -1
- package/dist/lib/common/messages.gen.d.ts +4 -7
- package/dist/lib/entry.js +991 -945
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +918 -913
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/app/canvas.d.ts +8 -0
- package/dist/lib/main/app/index.d.ts +13 -5
- package/dist/lib/main/app/messages.gen.d.ts +0 -1
- package/dist/lib/main/app/observer/observer.d.ts +16 -0
- package/dist/lib/main/app/sanitizer.d.ts +5 -3
- package/dist/lib/main/index.d.ts +16 -0
- package/dist/lib/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/lib/main/modules/analytics/index.d.ts +5 -0
- package/dist/lib/main/modules/input.d.ts +2 -1
- package/dist/lib/main/modules/markerWatcher.d.ts +4 -8
- package/dist/lib/main/modules/mouse.d.ts +1 -0
- package/dist/lib/main/modules/tagMatcher.d.ts +28 -0
- package/dist/lib/main/singleton.d.ts +24 -0
- package/dist/lib/main/utils.d.ts +2 -0
- package/dist/types/common/interaction.d.ts +12 -1
- package/dist/types/common/messages.gen.d.ts +4 -7
- package/dist/types/main/app/canvas.d.ts +8 -0
- package/dist/types/main/app/index.d.ts +13 -5
- package/dist/types/main/app/messages.gen.d.ts +0 -1
- package/dist/types/main/app/observer/observer.d.ts +16 -0
- package/dist/types/main/app/sanitizer.d.ts +5 -3
- package/dist/types/main/index.d.ts +16 -0
- package/dist/types/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/types/main/modules/analytics/index.d.ts +5 -0
- package/dist/types/main/modules/input.d.ts +2 -1
- package/dist/types/main/modules/markerWatcher.d.ts +4 -8
- package/dist/types/main/modules/mouse.d.ts +1 -0
- package/dist/types/main/modules/tagMatcher.d.ts +28 -0
- package/dist/types/main/singleton.d.ts +24 -0
- package/dist/types/main/utils.d.ts +2 -0
- package/package.json +11 -12
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type App from '../app/index.js';
|
|
2
2
|
type TextFieldElement = HTMLInputElement | HTMLTextAreaElement;
|
|
3
|
-
export declare function getInputLabel(node: TextFieldElement): string;
|
|
3
|
+
export declare function getInputLabel(node: TextFieldElement, customAttributes?: string[]): string;
|
|
4
4
|
export declare const InputMode: {
|
|
5
5
|
readonly Plain: 0;
|
|
6
6
|
readonly Obscured: 1;
|
|
@@ -29,6 +29,7 @@ export interface Options {
|
|
|
29
29
|
* will override other settings.
|
|
30
30
|
* */
|
|
31
31
|
inputPrivacyMode: InputModeT;
|
|
32
|
+
customAttributes?: string[];
|
|
32
33
|
}
|
|
33
34
|
export default function (app: App, opts: Partial<Options>): void;
|
|
34
35
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import TagMatcher, { type Tag } from './tagMatcher.js';
|
|
1
2
|
export declare const WATCHED_MARKERS_KEY = "__or__watched_markers__";
|
|
2
3
|
declare class MarkerWatcher {
|
|
3
4
|
interval: ReturnType<typeof setInterval> | null;
|
|
4
|
-
tags:
|
|
5
|
-
|
|
6
|
-
selector: string;
|
|
7
|
-
}[];
|
|
5
|
+
tags: Tag[];
|
|
6
|
+
readonly matcher: TagMatcher;
|
|
8
7
|
observer: IntersectionObserver;
|
|
9
8
|
private readonly sessionStorage;
|
|
10
9
|
private readonly errLog;
|
|
@@ -15,10 +14,7 @@ declare class MarkerWatcher {
|
|
|
15
14
|
onMarkerHit: (markerId: number) => void;
|
|
16
15
|
});
|
|
17
16
|
fetchTags(ingest: string, token: string): Promise<void>;
|
|
18
|
-
setTags(tags:
|
|
19
|
-
id: number;
|
|
20
|
-
selector: string;
|
|
21
|
-
}[]): void;
|
|
17
|
+
setTags(tags: Tag[]): void;
|
|
22
18
|
onMarkerRendered(markerId: number): void;
|
|
23
19
|
clear(): void;
|
|
24
20
|
}
|
|
@@ -8,6 +8,7 @@ export interface MouseHandlerOptions {
|
|
|
8
8
|
* default 7 = 210ms
|
|
9
9
|
* */
|
|
10
10
|
trackingOffset?: number;
|
|
11
|
+
customAttributes?: string[];
|
|
11
12
|
}
|
|
12
13
|
export default function (app: App, options?: MouseHandlerOptions): void;
|
|
13
14
|
export declare function getCSSPath(el: any): string | false;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type Tag = {
|
|
2
|
+
id: number;
|
|
3
|
+
selector: string;
|
|
4
|
+
location?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Two-tier tag matching:
|
|
8
|
+
* 1. Fast fingerprint lookup by id, data-attr,
|
|
9
|
+
* or class from the selector's last segment
|
|
10
|
+
* 2. Fallback iteration using native element.matches()
|
|
11
|
+
*/
|
|
12
|
+
declare class TagMatcher {
|
|
13
|
+
private tags;
|
|
14
|
+
private byId;
|
|
15
|
+
private byDataAttr;
|
|
16
|
+
private byClass;
|
|
17
|
+
private fallback;
|
|
18
|
+
setTags(tags: Tag[]): void;
|
|
19
|
+
getTags(): Tag[];
|
|
20
|
+
/** Match element, its parent, or direct children against known tag selectors */
|
|
21
|
+
match(el: Element): Tag | null;
|
|
22
|
+
private matchExact;
|
|
23
|
+
clear(): void;
|
|
24
|
+
}
|
|
25
|
+
export declare function matchesLocation(tag: {
|
|
26
|
+
location?: string;
|
|
27
|
+
}): boolean;
|
|
28
|
+
export default TagMatcher;
|
|
@@ -97,6 +97,30 @@ declare class BrowserSingleton {
|
|
|
97
97
|
forceFlushBatch(): void;
|
|
98
98
|
getSessionMeta(): import("./app/session.js").SessionInfo | null;
|
|
99
99
|
getTabId(): string | null;
|
|
100
|
+
/**
|
|
101
|
+
* Re-evaluates sanitization against the current DOM and re-emits whatever
|
|
102
|
+
* changed, updating already-recorded nodes mid-session. Call after toggling
|
|
103
|
+
* `data-oxvosessions-*` attributes or after changing whatever your `domSanitizer`
|
|
104
|
+
* keys on (class/id/etc).
|
|
105
|
+
*
|
|
106
|
+
* @param el - the highest node you changed; omit to re-scan the whole document.
|
|
107
|
+
* */
|
|
108
|
+
resanitize(el?: Element): void;
|
|
109
|
+
/**
|
|
110
|
+
* Returns the sanitization level the tracker currently has for a node
|
|
111
|
+
* (0 = Plain, 1 = Obscured, 2 = Hidden), or undefined if it isn't tracked.
|
|
112
|
+
* */
|
|
113
|
+
checkSanitization(el: Node): import("./index.js").SanitizeLevel | undefined;
|
|
114
|
+
incident(options: {
|
|
115
|
+
label?: string;
|
|
116
|
+
startTime: number;
|
|
117
|
+
endTime?: number;
|
|
118
|
+
}): void;
|
|
119
|
+
/**
|
|
120
|
+
* Use custom token for analytics events without session recording.
|
|
121
|
+
* */
|
|
122
|
+
setAnalyticsToken(token: string): void;
|
|
123
|
+
getAnalyticsToken(): string | undefined;
|
|
100
124
|
}
|
|
101
125
|
declare const browser: BrowserSingleton;
|
|
102
126
|
export default browser;
|
|
@@ -11,6 +11,8 @@ export declare const DOCS_HOST = "https://docs.oxvo.com";
|
|
|
11
11
|
export declare function isLoopbackHost(hostname: string): boolean;
|
|
12
12
|
export declare function canUseTrackerOrigin(protocol: string, hostname: string, devAllowInsecure?: boolean): boolean;
|
|
13
13
|
export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
|
|
14
|
+
export declare function getCustomAttributeLabel(e: Element, customAttributes?: string[]): string;
|
|
15
|
+
export declare function getClassSelector(e: Element): string;
|
|
14
16
|
export declare function getLabelAttribute(e: Element): string | null;
|
|
15
17
|
export declare function hasOxvoSessionsAttribute(e: Element, attr: string): boolean;
|
|
16
18
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxvo/browser",
|
|
3
3
|
"description": "OxvoSessions Browser SDK for session replay and frontend observability.",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.3.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"browser-sdk",
|
|
7
7
|
"session-replay",
|
|
@@ -51,24 +51,24 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@oxvo/network-instrumentation": "file:../../networkProxy",
|
|
54
|
-
"@babel/core": "^7.
|
|
54
|
+
"@babel/core": "^7.29.0",
|
|
55
55
|
"@jest/globals": "^29.7.0",
|
|
56
56
|
"@rollup/plugin-babel": "^6.1.0",
|
|
57
|
-
"@rollup/plugin-commonjs": "^
|
|
58
|
-
"@rollup/plugin-node-resolve": "^
|
|
59
|
-
"@rollup/plugin-replace": "^6.0.
|
|
57
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
58
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
59
|
+
"@rollup/plugin-replace": "^6.0.3",
|
|
60
60
|
"@rollup/plugin-terser": "0.4.4",
|
|
61
61
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
63
|
-
"@typescript-eslint/parser": "^8.
|
|
64
|
-
"eslint": "^9.
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
63
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
64
|
+
"eslint": "^9.39.2",
|
|
65
65
|
"eslint-config-prettier": "^9.1.0",
|
|
66
|
-
"eslint-plugin-prettier": "^5.5.
|
|
66
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
67
67
|
"jest": "^30.2.0",
|
|
68
68
|
"jest-environment-jsdom": "^30.2.0",
|
|
69
|
-
"prettier": "^3.
|
|
69
|
+
"prettier": "^3.8.1",
|
|
70
70
|
"replace-in-files": "^2.0.3",
|
|
71
|
-
"rollup": "^4.
|
|
71
|
+
"rollup": "^4.57.1",
|
|
72
72
|
"semver": "^6.3.0",
|
|
73
73
|
"ts-jest": "^29.4.6",
|
|
74
74
|
"tslib": "^2.8.1",
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"error-stack-parser": "^2.1.4",
|
|
79
79
|
"error-stack-parser-es": "^0.1.5",
|
|
80
|
-
"fflate": "^0.8.2",
|
|
81
80
|
"web-vitals": "^5.1.0"
|
|
82
81
|
},
|
|
83
82
|
"engines": {
|