@openreplay/tracker 10.0.3 → 11.0.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/bun.lockb +0 -0
  3. package/cjs/app/canvas.d.ts +20 -0
  4. package/cjs/app/canvas.js +107 -0
  5. package/cjs/app/guards.d.ts +1 -0
  6. package/cjs/app/index.d.ts +3 -0
  7. package/cjs/app/index.js +36 -6
  8. package/cjs/app/messages.gen.d.ts +1 -0
  9. package/cjs/app/messages.gen.js +9 -1
  10. package/cjs/common/messages.gen.d.ts +8 -2
  11. package/cjs/index.js +1 -1
  12. package/cjs/modules/Network/fetchProxy.d.ts +1 -1
  13. package/cjs/modules/Network/fetchProxy.js +1 -1
  14. package/cjs/modules/userTesting/dnd.d.ts +1 -0
  15. package/cjs/modules/userTesting/dnd.js +40 -0
  16. package/cjs/modules/userTesting/index.d.ts +45 -0
  17. package/cjs/modules/userTesting/index.js +476 -0
  18. package/cjs/modules/userTesting/recorder.d.ts +24 -0
  19. package/cjs/modules/userTesting/recorder.js +119 -0
  20. package/cjs/modules/userTesting/styles.d.ts +260 -0
  21. package/cjs/modules/userTesting/styles.js +229 -0
  22. package/lib/app/canvas.d.ts +20 -0
  23. package/lib/app/canvas.js +105 -0
  24. package/lib/app/guards.d.ts +1 -0
  25. package/lib/app/index.d.ts +3 -0
  26. package/lib/app/index.js +36 -6
  27. package/lib/app/messages.gen.d.ts +1 -0
  28. package/lib/app/messages.gen.js +7 -0
  29. package/lib/common/messages.gen.d.ts +8 -2
  30. package/lib/common/tsconfig.tsbuildinfo +1 -1
  31. package/lib/index.js +1 -1
  32. package/lib/modules/Network/fetchProxy.d.ts +1 -1
  33. package/lib/modules/Network/fetchProxy.js +1 -1
  34. package/lib/modules/userTesting/dnd.d.ts +1 -0
  35. package/lib/modules/userTesting/dnd.js +37 -0
  36. package/lib/modules/userTesting/index.d.ts +45 -0
  37. package/lib/modules/userTesting/index.js +473 -0
  38. package/lib/modules/userTesting/recorder.d.ts +24 -0
  39. package/lib/modules/userTesting/recorder.js +115 -0
  40. package/lib/modules/userTesting/styles.d.ts +260 -0
  41. package/lib/modules/userTesting/styles.js +226 -0
  42. package/package.json +4 -3
@@ -0,0 +1,260 @@
1
+ export declare const bgStyle: {
2
+ position: string;
3
+ top: number;
4
+ left: number;
5
+ width: string;
6
+ height: string;
7
+ background: string;
8
+ display: string;
9
+ alignItems: string;
10
+ justifyContent: string;
11
+ zIndex: number;
12
+ };
13
+ export declare const containerStyle: {
14
+ display: string;
15
+ flexDirection: string;
16
+ gap: string;
17
+ alignItems: string;
18
+ padding: string;
19
+ borderRadius: string;
20
+ border: string;
21
+ background: string;
22
+ width: string;
23
+ };
24
+ export declare const containerWidgetStyle: {
25
+ display: string;
26
+ 'flex-direction': string;
27
+ gap: string;
28
+ 'align-items': string;
29
+ padding: string;
30
+ 'border-radius': string;
31
+ border: string;
32
+ background: string;
33
+ width: string;
34
+ };
35
+ export declare const titleStyle: {
36
+ fontFamily: string;
37
+ fontSize: string;
38
+ fontStyle: string;
39
+ fontWeight: string;
40
+ lineHeight: string;
41
+ color: string;
42
+ };
43
+ export declare const descriptionStyle: {
44
+ borderTop: string;
45
+ borderBottom: string;
46
+ padding: string;
47
+ color: string;
48
+ fontFamily: string;
49
+ fontSize: string;
50
+ fontStyle: string;
51
+ fontWeight: string;
52
+ lineHeight: string;
53
+ };
54
+ export declare const noticeStyle: {
55
+ color: string;
56
+ fontFamily: string;
57
+ fontSize: string;
58
+ fontStyle: string;
59
+ fontWeight: string;
60
+ lineHeight: string;
61
+ };
62
+ export declare const buttonStyle: {
63
+ display: string;
64
+ padding: string;
65
+ justifyContent: string;
66
+ alignItems: string;
67
+ gap: string;
68
+ borderRadius: string;
69
+ border: string;
70
+ background: string;
71
+ boxShadow: string;
72
+ color: string;
73
+ textAlign: string;
74
+ fontFamily: string;
75
+ fontSize: string;
76
+ fontStyle: string;
77
+ fontWeight: string;
78
+ lineHeight: string;
79
+ cursor: string;
80
+ };
81
+ export declare const sectionTitleStyle: {
82
+ fontFamily: string;
83
+ fontSize: string;
84
+ fontWeight: string;
85
+ lineHeight: string;
86
+ display: string;
87
+ justifyContent: string;
88
+ width: string;
89
+ cursor: string;
90
+ };
91
+ export declare const contentStyle: {
92
+ display: string;
93
+ flexDirection: string;
94
+ alignItems: string;
95
+ gap: string;
96
+ };
97
+ export declare const titleWidgetStyle: {
98
+ padding: string;
99
+ gap: string;
100
+ fontFamily: string;
101
+ fontSize: string;
102
+ fontStyle: string;
103
+ fontWeight: string;
104
+ lineHeight: string;
105
+ color: string;
106
+ display: string;
107
+ alignItems: string;
108
+ width: string;
109
+ borderRadius: string;
110
+ background: string;
111
+ boxSizing: string;
112
+ };
113
+ export declare const descriptionWidgetStyle: {
114
+ boxSizing: string;
115
+ display: string;
116
+ width: string;
117
+ borderRadius: string;
118
+ border: string;
119
+ background: string;
120
+ padding: string;
121
+ alignSelf: string;
122
+ color: string;
123
+ fontFamily: string;
124
+ fontSize: string;
125
+ fontStyle: string;
126
+ fontWeight: string;
127
+ lineHeight: string;
128
+ };
129
+ export declare const endSectionStyle: {
130
+ display: string;
131
+ flexDirection: string;
132
+ alignItems: string;
133
+ gap: string;
134
+ boxSizing: string;
135
+ width: string;
136
+ borderRadius: string;
137
+ border: string;
138
+ background: string;
139
+ padding: string;
140
+ alignSelf: string;
141
+ color: string;
142
+ fontFamily: string;
143
+ fontSize: string;
144
+ fontStyle: string;
145
+ fontWeight: string;
146
+ lineHeight: string;
147
+ };
148
+ export declare const symbolIcon: {
149
+ fontSize: string;
150
+ fontWeight: string;
151
+ cursor: string;
152
+ color: string;
153
+ };
154
+ export declare const buttonWidgetStyle: {
155
+ display: string;
156
+ padding: string;
157
+ justifyContent: string;
158
+ alignItems: string;
159
+ gap: string;
160
+ borderRadius: string;
161
+ border: string;
162
+ background: string;
163
+ boxShadow: string;
164
+ color: string;
165
+ textAlign: string;
166
+ fontFamily: string;
167
+ fontSize: string;
168
+ fontStyle: string;
169
+ fontWeight: string;
170
+ lineHeight: string;
171
+ width: string;
172
+ boxSizing: string;
173
+ cursor: string;
174
+ };
175
+ export declare const stopWidgetStyle: {
176
+ marginTop: string;
177
+ cursor: string;
178
+ display: string;
179
+ fontWeight: string;
180
+ };
181
+ export declare const paginationStyle: {
182
+ display: string;
183
+ justifyContent: string;
184
+ alignItems: string;
185
+ gap: string;
186
+ padding: string;
187
+ width: string;
188
+ boxSizing: string;
189
+ };
190
+ export declare const taskNumberActive: {
191
+ display: string;
192
+ padding: string;
193
+ flexDirection: string;
194
+ alignItems: string;
195
+ borderRadius: string;
196
+ outline: string;
197
+ };
198
+ export declare const taskNumberDone: {
199
+ display: string;
200
+ padding: string;
201
+ flexDirection: string;
202
+ alignItems: string;
203
+ borderRadius: string;
204
+ outline: string;
205
+ boxShadow: string;
206
+ background: string;
207
+ };
208
+ export declare const taskDescriptionCard: {
209
+ borderRadius: string;
210
+ border: string;
211
+ background: string;
212
+ boxShadow: string;
213
+ display: string;
214
+ flexDirection: string;
215
+ padding: string;
216
+ gap: string;
217
+ alignSelf: string;
218
+ };
219
+ export declare const taskTextStyle: {
220
+ fontWeight: string;
221
+ };
222
+ export declare const taskDescriptionStyle: {
223
+ color: string;
224
+ };
225
+ export declare const taskButtonStyle: {
226
+ marginRight: string;
227
+ cursor: string;
228
+ color: string;
229
+ textAlign: string;
230
+ fontFamily: string;
231
+ fontSize: string;
232
+ fontStyle: string;
233
+ fontWeight: string;
234
+ lineHeight: string;
235
+ };
236
+ export declare const taskButtonBorderedStyle: {
237
+ display: string;
238
+ padding: string;
239
+ justifyContent: string;
240
+ alignItems: string;
241
+ gap: string;
242
+ borderRadius: string;
243
+ border: string;
244
+ marginRight: string;
245
+ cursor: string;
246
+ color: string;
247
+ textAlign: string;
248
+ fontFamily: string;
249
+ fontSize: string;
250
+ fontStyle: string;
251
+ fontWeight: string;
252
+ lineHeight: string;
253
+ };
254
+ export declare const taskButtonsRow: {
255
+ display: string;
256
+ justifyContent: string;
257
+ alignItems: string;
258
+ width: string;
259
+ boxSizing: string;
260
+ };
@@ -0,0 +1,229 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.taskButtonsRow = exports.taskButtonBorderedStyle = exports.taskButtonStyle = exports.taskDescriptionStyle = exports.taskTextStyle = exports.taskDescriptionCard = exports.taskNumberDone = exports.taskNumberActive = exports.paginationStyle = exports.stopWidgetStyle = exports.buttonWidgetStyle = exports.symbolIcon = exports.endSectionStyle = exports.descriptionWidgetStyle = exports.titleWidgetStyle = exports.contentStyle = exports.sectionTitleStyle = exports.buttonStyle = exports.noticeStyle = exports.descriptionStyle = exports.titleStyle = exports.containerWidgetStyle = exports.containerStyle = exports.bgStyle = void 0;
4
+ exports.bgStyle = {
5
+ position: 'fixed',
6
+ top: 0,
7
+ left: 0,
8
+ width: '100vw',
9
+ height: '100vh',
10
+ background: 'rgba(0, 0, 0, 0.40)',
11
+ display: 'flex',
12
+ alignItems: 'center',
13
+ justifyContent: 'center',
14
+ zIndex: 999999,
15
+ };
16
+ exports.containerStyle = {
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ gap: '8px',
20
+ alignItems: 'center',
21
+ padding: '1.5rem',
22
+ borderRadius: '0.375rem',
23
+ border: '1px solid #D9D9D9',
24
+ background: '#FFF',
25
+ width: '29rem',
26
+ };
27
+ exports.containerWidgetStyle = {
28
+ display: 'flex',
29
+ 'flex-direction': 'column',
30
+ gap: '8px',
31
+ 'align-items': 'center',
32
+ padding: '1rem',
33
+ 'border-radius': '0.375rem',
34
+ border: '1px solid #D9D9D9',
35
+ background: '#FFF',
36
+ width: '29rem',
37
+ };
38
+ exports.titleStyle = {
39
+ fontFamily: 'Verdana, sans-serif',
40
+ fontSize: '1.25rem',
41
+ fontStyle: 'normal',
42
+ fontWeight: '500',
43
+ lineHeight: '1.75rem',
44
+ color: 'rgba(0, 0, 0, 0.85)',
45
+ };
46
+ exports.descriptionStyle = {
47
+ borderTop: '1px solid rgba(0, 0, 0, 0.06)',
48
+ borderBottom: '1px solid rgba(0, 0, 0, 0.06)',
49
+ padding: '1.25rem 0rem',
50
+ color: 'rgba(0, 0, 0, 0.85)',
51
+ fontFamily: 'Verdana, sans-serif',
52
+ fontSize: '1rem',
53
+ fontStyle: 'normal',
54
+ fontWeight: '400',
55
+ lineHeight: '1.5rem',
56
+ };
57
+ exports.noticeStyle = {
58
+ color: 'rgba(0, 0, 0, 0.85)',
59
+ fontFamily: 'Verdana, sans-serif',
60
+ fontSize: '0.875rem',
61
+ fontStyle: 'normal',
62
+ fontWeight: '400',
63
+ lineHeight: '1.375rem',
64
+ };
65
+ exports.buttonStyle = {
66
+ display: 'flex',
67
+ padding: '0.4rem 0.9375rem',
68
+ justifyContent: 'center',
69
+ alignItems: 'center',
70
+ gap: '0.625rem',
71
+ borderRadius: '0.25rem',
72
+ border: '1px solid #394EFF',
73
+ background: '#394EFF',
74
+ boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
75
+ color: '#FFF',
76
+ textAlign: 'center',
77
+ fontFamily: 'Verdana, sans-serif',
78
+ fontSize: '1rem',
79
+ fontStyle: 'normal',
80
+ fontWeight: '500',
81
+ lineHeight: '1.5rem',
82
+ cursor: 'pointer',
83
+ };
84
+ exports.sectionTitleStyle = {
85
+ fontFamily: 'Verdana, sans-serif',
86
+ fontSize: '0.875rem',
87
+ fontWeight: '500',
88
+ lineHeight: '1.375rem',
89
+ display: 'flex',
90
+ justifyContent: 'space-between',
91
+ width: '100%',
92
+ cursor: 'pointer',
93
+ };
94
+ exports.contentStyle = {
95
+ display: 'flex',
96
+ flexDirection: 'column',
97
+ alignItems: 'flex-start',
98
+ gap: '0.625rem',
99
+ };
100
+ // New widget styles
101
+ exports.titleWidgetStyle = {
102
+ padding: '0.5rem',
103
+ gap: '0.5rem',
104
+ fontFamily: 'Verdana, sans-serif',
105
+ fontSize: '1.25rem',
106
+ fontStyle: 'normal',
107
+ fontWeight: '500',
108
+ lineHeight: '1.75rem',
109
+ color: 'white',
110
+ display: 'flex',
111
+ alignItems: 'center',
112
+ width: '100%',
113
+ borderRadius: '0.375rem',
114
+ background: 'rgba(0, 0, 0, 0.60)',
115
+ boxSizing: 'border-box',
116
+ };
117
+ exports.descriptionWidgetStyle = {
118
+ boxSizing: 'border-box',
119
+ display: 'block',
120
+ width: '100%',
121
+ borderRadius: '0.375rem',
122
+ border: '1px solid #D9D9D9',
123
+ background: '#FFF',
124
+ padding: '0.625rem 1rem',
125
+ alignSelf: 'stretch',
126
+ color: '#000',
127
+ fontFamily: 'Verdana, sans-serif',
128
+ fontSize: '0.875rem',
129
+ fontStyle: 'normal',
130
+ fontWeight: '400',
131
+ lineHeight: '1.375rem',
132
+ };
133
+ exports.endSectionStyle = Object.assign(Object.assign({}, exports.descriptionWidgetStyle), { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '0.625rem' });
134
+ exports.symbolIcon = {
135
+ fontSize: '1.25rem',
136
+ fontWeight: '500',
137
+ cursor: 'pointer',
138
+ color: '#394EFF',
139
+ };
140
+ exports.buttonWidgetStyle = {
141
+ display: 'flex',
142
+ padding: '0.4rem 0.9375rem',
143
+ justifyContent: 'center',
144
+ alignItems: 'center',
145
+ gap: '0.625rem',
146
+ borderRadius: '0.25rem',
147
+ border: '1px solid #394EFF',
148
+ background: '#394EFF',
149
+ boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
150
+ color: '#FFF',
151
+ textAlign: 'center',
152
+ fontFamily: 'Verdana, sans-serif',
153
+ fontSize: '1rem',
154
+ fontStyle: 'normal',
155
+ fontWeight: '500',
156
+ lineHeight: '1.5rem',
157
+ width: '100%',
158
+ boxSizing: 'border-box',
159
+ cursor: 'pointer',
160
+ };
161
+ exports.stopWidgetStyle = {
162
+ marginTop: '2rem',
163
+ cursor: 'pointer',
164
+ display: 'block',
165
+ fontWeight: '600',
166
+ };
167
+ exports.paginationStyle = {
168
+ display: 'flex',
169
+ justifyContent: 'space-between',
170
+ alignItems: 'center',
171
+ gap: '1rem',
172
+ padding: '0.5rem',
173
+ width: '100%',
174
+ boxSizing: 'border-box',
175
+ };
176
+ exports.taskNumberActive = {
177
+ display: 'flex',
178
+ padding: '0.0625rem 0.5rem',
179
+ flexDirection: 'column',
180
+ alignItems: 'center',
181
+ borderRadius: '6.25em',
182
+ outline: '1px solid #394EFF',
183
+ };
184
+ exports.taskNumberDone = {
185
+ display: 'flex',
186
+ padding: '0.0625rem 0.5rem',
187
+ flexDirection: 'column',
188
+ alignItems: 'center',
189
+ borderRadius: '6.25em',
190
+ outline: '1px solid #D2DFFF',
191
+ boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
192
+ background: '#D2DFFF',
193
+ };
194
+ exports.taskDescriptionCard = {
195
+ borderRadius: '0.375rem',
196
+ border: '1px solid rgba(0, 0, 0, 0.06)',
197
+ background: '#F5F7FF',
198
+ boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
199
+ display: 'flex',
200
+ flexDirection: 'column',
201
+ padding: '0.625rem 0.9375rem',
202
+ gap: '0.5rem',
203
+ alignSelf: 'stretch',
204
+ };
205
+ exports.taskTextStyle = {
206
+ fontWeight: 'bold',
207
+ };
208
+ exports.taskDescriptionStyle = {
209
+ color: '#8C8C8C',
210
+ };
211
+ exports.taskButtonStyle = {
212
+ marginRight: '0.5rem',
213
+ cursor: 'pointer',
214
+ color: '#394EFF',
215
+ textAlign: 'center',
216
+ fontFamily: 'Verdana, sans-serif',
217
+ fontSize: '0.875rem',
218
+ fontStyle: 'normal',
219
+ fontWeight: '500',
220
+ lineHeight: '1.375rem',
221
+ };
222
+ exports.taskButtonBorderedStyle = Object.assign(Object.assign({}, exports.taskButtonStyle), { display: 'flex', padding: '0.25rem 0.9375rem', justifyContent: 'center', alignItems: 'center', gap: '0.5rem', borderRadius: '0.25rem', border: '1px solid #394EFF' });
223
+ exports.taskButtonsRow = {
224
+ display: 'flex',
225
+ justifyContent: 'space-between',
226
+ alignItems: 'center',
227
+ width: '100%',
228
+ boxSizing: 'border-box',
229
+ };
@@ -0,0 +1,20 @@
1
+ import App from '../app/index.js';
2
+ interface Options {
3
+ fps: number;
4
+ quality: 'low' | 'medium' | 'high';
5
+ }
6
+ declare class CanvasRecorder {
7
+ private readonly app;
8
+ private readonly options;
9
+ private snapshots;
10
+ private readonly intervals;
11
+ private readonly interval;
12
+ constructor(app: App, options: Options);
13
+ startTracking(): void;
14
+ sendSnaps(images: {
15
+ data: string;
16
+ id: number;
17
+ }[], canvasId: number, createdAt: number): void;
18
+ clear(): void;
19
+ }
20
+ export default CanvasRecorder;
@@ -0,0 +1,105 @@
1
+ import { hasTag } from './guards.js';
2
+ import { CanvasNode } from './messages.gen.js';
3
+ class CanvasRecorder {
4
+ constructor(app, options) {
5
+ this.app = app;
6
+ this.options = options;
7
+ this.snapshots = {};
8
+ this.intervals = [];
9
+ this.interval = 1000 / options.fps;
10
+ }
11
+ startTracking() {
12
+ this.app.nodes.attachNodeCallback((node) => {
13
+ const id = this.app.nodes.getID(node);
14
+ if (!id || !hasTag(node, 'canvas') || this.snapshots[id]) {
15
+ return;
16
+ }
17
+ const ts = this.app.timestamp();
18
+ this.snapshots[id] = {
19
+ images: [],
20
+ createdAt: ts,
21
+ };
22
+ const canvasMsg = CanvasNode(id.toString(), ts);
23
+ this.app.send(canvasMsg);
24
+ const int = setInterval(() => {
25
+ const cid = this.app.nodes.getID(node);
26
+ const canvas = cid ? this.app.nodes.getNode(cid) : undefined;
27
+ if (!canvas || !hasTag(canvas, 'canvas') || canvas !== node) {
28
+ console.log('Canvas element not in sync');
29
+ clearInterval(int);
30
+ }
31
+ else {
32
+ const snapshot = captureSnapshot(canvas, this.options.quality);
33
+ this.snapshots[id].images.push({ id: this.app.timestamp(), data: snapshot });
34
+ if (this.snapshots[id].images.length > 9) {
35
+ this.sendSnaps(this.snapshots[id].images, id, this.snapshots[id].createdAt);
36
+ this.snapshots[id].images = [];
37
+ }
38
+ }
39
+ }, this.interval);
40
+ this.intervals.push(int);
41
+ });
42
+ }
43
+ sendSnaps(images, canvasId, createdAt) {
44
+ var _a;
45
+ if (Object.keys(this.snapshots).length === 0) {
46
+ console.log(this.snapshots);
47
+ return;
48
+ }
49
+ const formData = new FormData();
50
+ images.forEach((snapshot) => {
51
+ const blob = dataUrlToBlob(snapshot.data)[0];
52
+ formData.append('snapshot', blob, `${createdAt}_${canvasId}_${snapshot.id}.jpeg`);
53
+ // saveImageData(snapshot.data, `${createdAt}_${canvasId}_${snapshot.id}.jpeg`)
54
+ });
55
+ fetch(this.app.options.ingestPoint + '/v1/web/images', {
56
+ method: 'POST',
57
+ headers: {
58
+ Authorization: `Bearer ${(_a = this.app.session.getSessionToken()) !== null && _a !== void 0 ? _a : ''}`,
59
+ },
60
+ body: formData,
61
+ })
62
+ .then((r) => {
63
+ console.log('done', r);
64
+ })
65
+ .catch((e) => {
66
+ console.error('error saving canvas', e);
67
+ });
68
+ }
69
+ clear() {
70
+ console.log('cleaning up');
71
+ this.intervals.forEach((int) => clearInterval(int));
72
+ this.snapshots = {};
73
+ }
74
+ }
75
+ const qualityInt = {
76
+ low: 0.33,
77
+ medium: 0.55,
78
+ high: 0.8,
79
+ };
80
+ function captureSnapshot(canvas, quality = 'medium') {
81
+ const imageFormat = 'image/jpeg'; // or /png'
82
+ return canvas.toDataURL(imageFormat, qualityInt[quality]);
83
+ }
84
+ function dataUrlToBlob(dataUrl) {
85
+ const [header, base64] = dataUrl.split(',');
86
+ // @ts-ignore
87
+ const mime = header.match(/:(.*?);/)[1];
88
+ const blobStr = atob(base64);
89
+ let n = blobStr.length;
90
+ const u8arr = new Uint8Array(n);
91
+ while (n--) {
92
+ u8arr[n] = blobStr.charCodeAt(n);
93
+ }
94
+ return [new Blob([u8arr], { type: mime }), u8arr];
95
+ }
96
+ function saveImageData(imageDataUrl, name) {
97
+ const link = document.createElement('a');
98
+ link.href = imageDataUrl;
99
+ link.download = name;
100
+ link.style.display = 'none';
101
+ document.body.appendChild(link);
102
+ link.click();
103
+ document.body.removeChild(link);
104
+ }
105
+ export default CanvasRecorder;
@@ -16,6 +16,7 @@ type TagTypeMap = {
16
16
  iframe: HTMLIFrameElement;
17
17
  style: HTMLStyleElement | SVGStyleElement;
18
18
  link: HTMLLinkElement;
19
+ canvas: HTMLCanvasElement;
19
20
  };
20
21
  export declare function hasTag<T extends keyof TagTypeMap>(el: Node, tagName: T): el is TagTypeMap[typeof tagName];
21
22
  export {};
@@ -54,6 +54,7 @@ type AppOptions = {
54
54
  sessionStorage: Storage | null;
55
55
  forceSingleTab?: boolean;
56
56
  disableStringDict?: boolean;
57
+ assistSocketHost?: string;
57
58
  onStart?: StartCallback;
58
59
  network?: NetworkOptions;
59
60
  } & WebworkerOptions & SessOptions;
@@ -85,6 +86,8 @@ export default class App {
85
86
  private readonly bc;
86
87
  private readonly contextId;
87
88
  attributeSender: AttributeSender;
89
+ private canvasRecorder;
90
+ private uxtManager;
88
91
  constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>);
89
92
  private _debug;
90
93
  private _usingOldFetchPlugin;