@openreplay/tracker 16.1.4 → 16.2.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/entry.js +504 -332
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +504 -332
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/app/index.d.ts +2 -1
- package/dist/cjs/main/app/observer/cssInliner.d.ts +1 -0
- package/dist/cjs/main/app/observer/observer.d.ts +17 -3
- package/dist/cjs/main/app/observer/top_observer.d.ts +14 -0
- package/dist/lib/entry.js +504 -332
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +504 -332
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/app/index.d.ts +2 -1
- package/dist/lib/main/app/observer/cssInliner.d.ts +1 -0
- package/dist/lib/main/app/observer/observer.d.ts +17 -3
- package/dist/lib/main/app/observer/top_observer.d.ts +14 -0
- package/dist/types/main/app/index.d.ts +2 -1
- package/dist/types/main/app/observer/cssInliner.d.ts +1 -0
- package/dist/types/main/app/observer/observer.d.ts +17 -3
- package/dist/types/main/app/observer/top_observer.d.ts +14 -0
- package/package.json +1 -1
|
@@ -172,6 +172,7 @@ export default class App {
|
|
|
172
172
|
private frameOderNumber;
|
|
173
173
|
private features;
|
|
174
174
|
private emptyBatchCounter;
|
|
175
|
+
private inlineCss;
|
|
175
176
|
constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
|
|
176
177
|
/** used by child iframes for crossdomain only */
|
|
177
178
|
parentActive: boolean;
|
|
@@ -198,7 +199,7 @@ export default class App {
|
|
|
198
199
|
private initWorker;
|
|
199
200
|
private handleWorkerMsg;
|
|
200
201
|
private _debug;
|
|
201
|
-
send(message: Message, urgent?: boolean)
|
|
202
|
+
send: (message: Message, urgent?: boolean) => void;
|
|
202
203
|
/**
|
|
203
204
|
* Normal workflow: add timestamp and tab data to batch, then commit it
|
|
204
205
|
* every ~30ms
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function inlineRemoteCss(node: HTMLLinkElement, id: number, baseHref: string, getNextID: () => number, insertRule: (id: number, cssText: string, index: number, baseHref: string) => any[], addOwner: (sheetId: number, ownerId: number) => any[], forceFetch?: boolean, sendPlain?: boolean, onPlain?: (cssText: string, id: number) => void): void;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import App from '../index.js';
|
|
2
|
+
interface Options {
|
|
3
|
+
inlineRemoteCss?: boolean;
|
|
4
|
+
disableSprites?: boolean;
|
|
5
|
+
inlinerOptions?: {
|
|
6
|
+
forceFetch?: boolean;
|
|
7
|
+
forcePlain?: boolean;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
2
10
|
export default abstract class Observer {
|
|
3
11
|
protected readonly app: App;
|
|
4
12
|
protected readonly isTopContext: boolean;
|
|
@@ -9,10 +17,15 @@ export default abstract class Observer {
|
|
|
9
17
|
private readonly attributesMap;
|
|
10
18
|
private readonly textSet;
|
|
11
19
|
private readonly disableSprites;
|
|
20
|
+
/**
|
|
21
|
+
* this option means that, instead of using link element with href to load css,
|
|
22
|
+
* we will try to parse the css text instead and send it as css rules set
|
|
23
|
+
* can (and will) affect performance
|
|
24
|
+
* */
|
|
25
|
+
private readonly inlineRemoteCss;
|
|
26
|
+
private readonly inlinerOptions;
|
|
12
27
|
private readonly domParser;
|
|
13
|
-
constructor(app: App, isTopContext?: boolean, options?:
|
|
14
|
-
disableSprites: boolean;
|
|
15
|
-
});
|
|
28
|
+
constructor(app: App, isTopContext?: boolean, options?: Options);
|
|
16
29
|
private clear;
|
|
17
30
|
/**
|
|
18
31
|
* EXPERIMENTAL: Unbinds the removed nodes in case of iframe src change.
|
|
@@ -31,3 +44,4 @@ export default abstract class Observer {
|
|
|
31
44
|
protected observeRoot(node: Node, beforeCommit: (id?: number) => unknown, nodeToBind?: Node): void;
|
|
32
45
|
disconnect(): void;
|
|
33
46
|
}
|
|
47
|
+
export {};
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import Observer from './observer.js';
|
|
2
2
|
import { Offset } from './iframe_offsets.js';
|
|
3
3
|
import App from '../index.js';
|
|
4
|
+
export declare enum InlineCssMode {
|
|
5
|
+
None = 0,
|
|
6
|
+
RemoteOnly = 1,
|
|
7
|
+
RemoteWithForceFetch = 2,
|
|
8
|
+
All = 3
|
|
9
|
+
}
|
|
4
10
|
export interface Options {
|
|
5
11
|
captureIFrames: boolean;
|
|
6
12
|
disableSprites: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* with this option instead of using link element with href to load css,
|
|
15
|
+
* we will try to parse the css text instead and send it as css rules set
|
|
16
|
+
* can (and probably will) affect performance to certain degree,
|
|
17
|
+
* especially if the css itself is crossdomain
|
|
18
|
+
* @default false
|
|
19
|
+
* */
|
|
20
|
+
inlineCss: InlineCssMode;
|
|
7
21
|
}
|
|
8
22
|
type Context = Window & typeof globalThis;
|
|
9
23
|
type ContextCallback = (context: Context) => void;
|
|
@@ -172,6 +172,7 @@ export default class App {
|
|
|
172
172
|
private frameOderNumber;
|
|
173
173
|
private features;
|
|
174
174
|
private emptyBatchCounter;
|
|
175
|
+
private inlineCss;
|
|
175
176
|
constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
|
|
176
177
|
/** used by child iframes for crossdomain only */
|
|
177
178
|
parentActive: boolean;
|
|
@@ -198,7 +199,7 @@ export default class App {
|
|
|
198
199
|
private initWorker;
|
|
199
200
|
private handleWorkerMsg;
|
|
200
201
|
private _debug;
|
|
201
|
-
send(message: Message, urgent?: boolean)
|
|
202
|
+
send: (message: Message, urgent?: boolean) => void;
|
|
202
203
|
/**
|
|
203
204
|
* Normal workflow: add timestamp and tab data to batch, then commit it
|
|
204
205
|
* every ~30ms
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function inlineRemoteCss(node: HTMLLinkElement, id: number, baseHref: string, getNextID: () => number, insertRule: (id: number, cssText: string, index: number, baseHref: string) => any[], addOwner: (sheetId: number, ownerId: number) => any[], forceFetch?: boolean, sendPlain?: boolean, onPlain?: (cssText: string, id: number) => void): void;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import App from '../index.js';
|
|
2
|
+
interface Options {
|
|
3
|
+
inlineRemoteCss?: boolean;
|
|
4
|
+
disableSprites?: boolean;
|
|
5
|
+
inlinerOptions?: {
|
|
6
|
+
forceFetch?: boolean;
|
|
7
|
+
forcePlain?: boolean;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
2
10
|
export default abstract class Observer {
|
|
3
11
|
protected readonly app: App;
|
|
4
12
|
protected readonly isTopContext: boolean;
|
|
@@ -9,10 +17,15 @@ export default abstract class Observer {
|
|
|
9
17
|
private readonly attributesMap;
|
|
10
18
|
private readonly textSet;
|
|
11
19
|
private readonly disableSprites;
|
|
20
|
+
/**
|
|
21
|
+
* this option means that, instead of using link element with href to load css,
|
|
22
|
+
* we will try to parse the css text instead and send it as css rules set
|
|
23
|
+
* can (and will) affect performance
|
|
24
|
+
* */
|
|
25
|
+
private readonly inlineRemoteCss;
|
|
26
|
+
private readonly inlinerOptions;
|
|
12
27
|
private readonly domParser;
|
|
13
|
-
constructor(app: App, isTopContext?: boolean, options?:
|
|
14
|
-
disableSprites: boolean;
|
|
15
|
-
});
|
|
28
|
+
constructor(app: App, isTopContext?: boolean, options?: Options);
|
|
16
29
|
private clear;
|
|
17
30
|
/**
|
|
18
31
|
* EXPERIMENTAL: Unbinds the removed nodes in case of iframe src change.
|
|
@@ -31,3 +44,4 @@ export default abstract class Observer {
|
|
|
31
44
|
protected observeRoot(node: Node, beforeCommit: (id?: number) => unknown, nodeToBind?: Node): void;
|
|
32
45
|
disconnect(): void;
|
|
33
46
|
}
|
|
47
|
+
export {};
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import Observer from './observer.js';
|
|
2
2
|
import { Offset } from './iframe_offsets.js';
|
|
3
3
|
import App from '../index.js';
|
|
4
|
+
export declare enum InlineCssMode {
|
|
5
|
+
None = 0,
|
|
6
|
+
RemoteOnly = 1,
|
|
7
|
+
RemoteWithForceFetch = 2,
|
|
8
|
+
All = 3
|
|
9
|
+
}
|
|
4
10
|
export interface Options {
|
|
5
11
|
captureIFrames: boolean;
|
|
6
12
|
disableSprites: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* with this option instead of using link element with href to load css,
|
|
15
|
+
* we will try to parse the css text instead and send it as css rules set
|
|
16
|
+
* can (and probably will) affect performance to certain degree,
|
|
17
|
+
* especially if the css itself is crossdomain
|
|
18
|
+
* @default false
|
|
19
|
+
* */
|
|
20
|
+
inlineCss: InlineCssMode;
|
|
7
21
|
}
|
|
8
22
|
type Context = Window & typeof globalThis;
|
|
9
23
|
type ContextCallback = (context: Context) => void;
|