@openreplay/tracker 16.2.0 → 16.2.1

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.
@@ -13,6 +13,7 @@ import type { Options as SessOptions } from './session.js';
13
13
  import Session from './session.js';
14
14
  import Ticker from './ticker.js';
15
15
  import { MaintainerOptions } from './nodes/maintainer.js';
16
+ export { InlineCssMode } from './observer/top_observer.js';
16
17
  export interface StartOptions {
17
18
  userID?: string;
18
19
  metadata?: Record<string, string>;
@@ -63,18 +64,12 @@ type AppOptions = {
63
64
  __is_snippet: boolean;
64
65
  __debug_report_edp: string | null;
65
66
  __debug__?: ILogLevel;
66
- /** @deprecated see canvas prop */
67
- __save_canvas_locally?: boolean;
68
- /** @deprecated see canvas prop */
69
- fixedCanvasScaling?: boolean;
70
67
  localStorage: Storage | null;
71
68
  sessionStorage: Storage | null;
72
69
  forceSingleTab?: boolean;
73
70
  /** Sometimes helps to prevent session breaking due to dict reset */
74
71
  disableStringDict?: boolean;
75
72
  assistSocketHost?: string;
76
- /** @deprecated see canvas prop */
77
- disableCanvas?: boolean;
78
73
  canvas: {
79
74
  disableCanvas?: boolean;
80
75
  /**
@@ -150,7 +145,7 @@ export default class App {
150
145
  private readonly startCallbacks;
151
146
  private readonly stopCallbacks;
152
147
  private readonly commitCallbacks;
153
- readonly options: AppOptions;
148
+ readonly options: Options;
154
149
  readonly networkOptions?: NetworkOptions;
155
150
  private readonly revID;
156
151
  private activityState;
@@ -172,7 +167,6 @@ export default class App {
172
167
  private frameOderNumber;
173
168
  private features;
174
169
  private emptyBatchCounter;
175
- private inlineCss;
176
170
  constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
177
171
  /** used by child iframes for crossdomain only */
178
172
  parentActive: boolean;
@@ -321,4 +315,3 @@ export default class App {
321
315
  trackWs(channelName: string): (msgType: string, data: string, dir: 'up' | 'down') => void;
322
316
  stop(stopWorker?: boolean): void;
323
317
  }
324
- export {};
@@ -1,7 +1,7 @@
1
1
  import App from '../index.js';
2
2
  interface Options {
3
- inlineRemoteCss?: boolean;
4
3
  disableSprites?: boolean;
4
+ inlineRemoteCss?: boolean;
5
5
  inlinerOptions?: {
6
6
  forceFetch?: boolean;
7
7
  forcePlain?: boolean;
@@ -2,10 +2,14 @@ import Observer from './observer.js';
2
2
  import { Offset } from './iframe_offsets.js';
3
3
  import App from '../index.js';
4
4
  export declare enum InlineCssMode {
5
- None = 0,
6
- RemoteOnly = 1,
7
- RemoteWithForceFetch = 2,
8
- All = 3
5
+ /** default behavior -- will parse and cache the css file on backend */
6
+ Disabled = 0,
7
+ /** will attempt to record the linked css file as AdoptedStyleSheet object */
8
+ Inline = 1,
9
+ /** will fetch the file, then simulated AdoptedStyleSheets behavior programmaticaly for the replay */
10
+ InlineFetched = 2,
11
+ /** will fetch the file, then save it as plain css inside <style> node */
12
+ PlainFetched = 3
9
13
  }
10
14
  export interface Options {
11
15
  captureIFrames: boolean;
@@ -15,7 +19,7 @@ export interface Options {
15
19
  * we will try to parse the css text instead and send it as css rules set
16
20
  * can (and probably will) affect performance to certain degree,
17
21
  * especially if the css itself is crossdomain
18
- * @default false
22
+ * @default InlineCssMode.None = 0
19
23
  * */
20
24
  inlineCss: InlineCssMode;
21
25
  }
@@ -13,6 +13,7 @@ import type { Options as SessOptions } from './session.js';
13
13
  import Session from './session.js';
14
14
  import Ticker from './ticker.js';
15
15
  import { MaintainerOptions } from './nodes/maintainer.js';
16
+ export { InlineCssMode } from './observer/top_observer.js';
16
17
  export interface StartOptions {
17
18
  userID?: string;
18
19
  metadata?: Record<string, string>;
@@ -63,18 +64,12 @@ type AppOptions = {
63
64
  __is_snippet: boolean;
64
65
  __debug_report_edp: string | null;
65
66
  __debug__?: ILogLevel;
66
- /** @deprecated see canvas prop */
67
- __save_canvas_locally?: boolean;
68
- /** @deprecated see canvas prop */
69
- fixedCanvasScaling?: boolean;
70
67
  localStorage: Storage | null;
71
68
  sessionStorage: Storage | null;
72
69
  forceSingleTab?: boolean;
73
70
  /** Sometimes helps to prevent session breaking due to dict reset */
74
71
  disableStringDict?: boolean;
75
72
  assistSocketHost?: string;
76
- /** @deprecated see canvas prop */
77
- disableCanvas?: boolean;
78
73
  canvas: {
79
74
  disableCanvas?: boolean;
80
75
  /**
@@ -150,7 +145,7 @@ export default class App {
150
145
  private readonly startCallbacks;
151
146
  private readonly stopCallbacks;
152
147
  private readonly commitCallbacks;
153
- readonly options: AppOptions;
148
+ readonly options: Options;
154
149
  readonly networkOptions?: NetworkOptions;
155
150
  private readonly revID;
156
151
  private activityState;
@@ -172,7 +167,6 @@ export default class App {
172
167
  private frameOderNumber;
173
168
  private features;
174
169
  private emptyBatchCounter;
175
- private inlineCss;
176
170
  constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>, signalError: (error: string, apis: string[]) => void, insideIframe: boolean);
177
171
  /** used by child iframes for crossdomain only */
178
172
  parentActive: boolean;
@@ -321,4 +315,3 @@ export default class App {
321
315
  trackWs(channelName: string): (msgType: string, data: string, dir: 'up' | 'down') => void;
322
316
  stop(stopWorker?: boolean): void;
323
317
  }
324
- export {};
@@ -1,7 +1,7 @@
1
1
  import App from '../index.js';
2
2
  interface Options {
3
- inlineRemoteCss?: boolean;
4
3
  disableSprites?: boolean;
4
+ inlineRemoteCss?: boolean;
5
5
  inlinerOptions?: {
6
6
  forceFetch?: boolean;
7
7
  forcePlain?: boolean;
@@ -2,10 +2,14 @@ import Observer from './observer.js';
2
2
  import { Offset } from './iframe_offsets.js';
3
3
  import App from '../index.js';
4
4
  export declare enum InlineCssMode {
5
- None = 0,
6
- RemoteOnly = 1,
7
- RemoteWithForceFetch = 2,
8
- All = 3
5
+ /** default behavior -- will parse and cache the css file on backend */
6
+ Disabled = 0,
7
+ /** will attempt to record the linked css file as AdoptedStyleSheet object */
8
+ Inline = 1,
9
+ /** will fetch the file, then simulated AdoptedStyleSheets behavior programmaticaly for the replay */
10
+ InlineFetched = 2,
11
+ /** will fetch the file, then save it as plain css inside <style> node */
12
+ PlainFetched = 3
9
13
  }
10
14
  export interface Options {
11
15
  captureIFrames: boolean;
@@ -15,7 +19,7 @@ export interface Options {
15
19
  * we will try to parse the css text instead and send it as css rules set
16
20
  * can (and probably will) affect performance to certain degree,
17
21
  * especially if the css itself is crossdomain
18
- * @default false
22
+ * @default InlineCssMode.None = 0
19
23
  * */
20
24
  inlineCss: InlineCssMode;
21
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": "16.2.0",
4
+ "version": "16.2.1",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"