@openreplay/tracker 11.0.0 → 11.0.2

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 (92) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/cjs/app/index.d.ts +3 -0
  3. package/cjs/app/index.js +27 -4
  4. package/cjs/index.d.ts +1 -0
  5. package/cjs/index.js +7 -1
  6. package/cjs/modules/Network/fetchProxy.js +4 -2
  7. package/cjs/modules/userTesting/SignalManager.d.ts +29 -0
  8. package/cjs/modules/userTesting/SignalManager.js +83 -0
  9. package/cjs/modules/userTesting/index.d.ts +5 -5
  10. package/cjs/modules/userTesting/index.js +156 -189
  11. package/cjs/modules/userTesting/styles.d.ts +28 -11
  12. package/cjs/modules/userTesting/styles.js +51 -29
  13. package/cjs/modules/userTesting/utils.d.ts +9 -0
  14. package/cjs/modules/userTesting/utils.js +87 -0
  15. package/coverage/clover.xml +1331 -562
  16. package/coverage/coverage-final.json +13 -6
  17. package/coverage/lcov-report/index.html +49 -34
  18. package/coverage/lcov-report/main/app/canvas.ts.html +1 -1
  19. package/coverage/lcov-report/main/app/guards.ts.html +42 -42
  20. package/coverage/lcov-report/main/app/index.html +24 -24
  21. package/coverage/lcov-report/main/app/index.ts.html +1046 -56
  22. package/coverage/lcov-report/main/app/logger.ts.html +1 -1
  23. package/coverage/lcov-report/main/app/messages.gen.ts.html +1 -1
  24. package/coverage/lcov-report/main/app/nodes.ts.html +1 -1
  25. package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
  26. package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
  27. package/coverage/lcov-report/main/app/observer/index.html +1 -1
  28. package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
  29. package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
  30. package/coverage/lcov-report/main/app/sanitizer.ts.html +1 -1
  31. package/coverage/lcov-report/main/app/session.ts.html +1 -1
  32. package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
  33. package/coverage/lcov-report/main/index.html +11 -11
  34. package/coverage/lcov-report/main/index.ts.html +274 -100
  35. package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +1 -1
  36. package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +1 -1
  37. package/coverage/lcov-report/main/modules/Network/index.html +1 -1
  38. package/coverage/lcov-report/main/modules/Network/index.ts.html +1 -1
  39. package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +1 -1
  40. package/coverage/lcov-report/main/modules/Network/utils.ts.html +1 -1
  41. package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +1 -1
  42. package/coverage/lcov-report/main/modules/attributeSender.ts.html +1 -1
  43. package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
  44. package/coverage/lcov-report/main/modules/conditionsManager.ts.html +799 -0
  45. package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
  46. package/coverage/lcov-report/main/modules/console.ts.html +1 -1
  47. package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +1 -1
  48. package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
  49. package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
  50. package/coverage/lcov-report/main/modules/featureFlags.ts.html +10 -7
  51. package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
  52. package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
  53. package/coverage/lcov-report/main/modules/img.ts.html +1 -1
  54. package/coverage/lcov-report/main/modules/index.html +27 -12
  55. package/coverage/lcov-report/main/modules/input.ts.html +1 -1
  56. package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
  57. package/coverage/lcov-report/main/modules/network.ts.html +1 -1
  58. package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
  59. package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
  60. package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
  61. package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
  62. package/coverage/lcov-report/main/modules/timing.ts.html +1 -1
  63. package/coverage/lcov-report/main/modules/userTesting/SignalManager.ts.html +370 -0
  64. package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +10 -22
  65. package/coverage/lcov-report/main/modules/userTesting/index.html +57 -27
  66. package/coverage/lcov-report/main/modules/userTesting/index.ts.html +814 -115
  67. package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +136 -67
  68. package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +111 -39
  69. package/coverage/lcov-report/main/modules/userTesting/utils.ts.html +364 -0
  70. package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
  71. package/coverage/lcov-report/main/utils.ts.html +48 -6
  72. package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
  73. package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +1 -1
  74. package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +1 -1
  75. package/coverage/lcov-report/webworker/QueueSender.ts.html +1 -1
  76. package/coverage/lcov-report/webworker/index.html +5 -5
  77. package/coverage/lcov-report/webworker/index.ts.html +15 -9
  78. package/coverage/lcov.info +2306 -900
  79. package/lib/app/index.d.ts +3 -0
  80. package/lib/app/index.js +27 -4
  81. package/lib/index.d.ts +1 -0
  82. package/lib/index.js +7 -1
  83. package/lib/modules/Network/fetchProxy.js +4 -2
  84. package/lib/modules/userTesting/SignalManager.d.ts +29 -0
  85. package/lib/modules/userTesting/SignalManager.js +80 -0
  86. package/lib/modules/userTesting/index.d.ts +5 -5
  87. package/lib/modules/userTesting/index.js +128 -161
  88. package/lib/modules/userTesting/styles.d.ts +28 -11
  89. package/lib/modules/userTesting/styles.js +50 -28
  90. package/lib/modules/userTesting/utils.d.ts +9 -0
  91. package/lib/modules/userTesting/utils.js +79 -0
  92. package/package.json +1 -1
@@ -9,28 +9,30 @@ export const bgStyle = {
9
9
  alignItems: 'center',
10
10
  justifyContent: 'center',
11
11
  zIndex: 999999,
12
+ fontFamily: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,
12
13
  };
13
14
  export const containerStyle = {
14
15
  display: 'flex',
15
16
  flexDirection: 'column',
16
- gap: '8px',
17
+ gap: '2rem',
17
18
  alignItems: 'center',
18
19
  padding: '1.5rem',
19
- borderRadius: '0.375rem',
20
+ borderRadius: '2px',
20
21
  border: '1px solid #D9D9D9',
21
22
  background: '#FFF',
22
- width: '29rem',
23
+ width: '22rem',
23
24
  };
24
25
  export const containerWidgetStyle = {
25
26
  display: 'flex',
26
27
  'flex-direction': 'column',
27
- gap: '8px',
28
+ gap: 'unset',
28
29
  'align-items': 'center',
29
- padding: '1rem',
30
- 'border-radius': '0.375rem',
30
+ padding: 'unset',
31
+ fontFamily: `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,
32
+ 'border-radius': '2px',
31
33
  border: '1px solid #D9D9D9',
32
- background: '#FFF',
33
- width: '29rem',
34
+ background: 'rgba(255, 255, 255, 0.75)',
35
+ width: '22rem',
34
36
  };
35
37
  export const titleStyle = {
36
38
  fontFamily: 'Verdana, sans-serif',
@@ -46,10 +48,11 @@ export const descriptionStyle = {
46
48
  padding: '1.25rem 0rem',
47
49
  color: 'rgba(0, 0, 0, 0.85)',
48
50
  fontFamily: 'Verdana, sans-serif',
49
- fontSize: '1rem',
51
+ fontSize: '13px',
50
52
  fontStyle: 'normal',
51
53
  fontWeight: '400',
52
- lineHeight: '1.5rem',
54
+ lineHeight: 'auto',
55
+ whiteSpace: 'pre-wrap',
53
56
  };
54
57
  export const noticeStyle = {
55
58
  color: 'rgba(0, 0, 0, 0.85)',
@@ -80,9 +83,9 @@ export const buttonStyle = {
80
83
  };
81
84
  export const sectionTitleStyle = {
82
85
  fontFamily: 'Verdana, sans-serif',
83
- fontSize: '0.875rem',
86
+ fontSize: '13px',
84
87
  fontWeight: '500',
85
- lineHeight: '1.375rem',
88
+ lineHeight: 'auto',
86
89
  display: 'flex',
87
90
  justifyContent: 'space-between',
88
91
  width: '100%',
@@ -93,39 +96,40 @@ export const contentStyle = {
93
96
  flexDirection: 'column',
94
97
  alignItems: 'flex-start',
95
98
  gap: '0.625rem',
99
+ fontSize: '13px',
100
+ lineHeight: 'auto',
96
101
  };
97
102
  // New widget styles
98
103
  export const titleWidgetStyle = {
99
104
  padding: '0.5rem',
100
105
  gap: '0.5rem',
101
106
  fontFamily: 'Verdana, sans-serif',
102
- fontSize: '1.25rem',
107
+ fontSize: '16px',
103
108
  fontStyle: 'normal',
104
109
  fontWeight: '500',
105
- lineHeight: '1.75rem',
110
+ lineHeight: 'auto',
106
111
  color: 'white',
107
112
  display: 'flex',
108
113
  alignItems: 'center',
109
114
  width: '100%',
110
- borderRadius: '0.375rem',
111
- background: 'rgba(0, 0, 0, 0.60)',
115
+ borderRadius: '2px',
116
+ background: 'rgba(0, 0, 0, 0.75)',
112
117
  boxSizing: 'border-box',
113
118
  };
114
119
  export const descriptionWidgetStyle = {
115
120
  boxSizing: 'border-box',
116
121
  display: 'block',
117
122
  width: '100%',
118
- borderRadius: '0.375rem',
119
- border: '1px solid #D9D9D9',
123
+ borderBottom: '1px solid #D9D9D9',
120
124
  background: '#FFF',
121
- padding: '0.625rem 1rem',
125
+ padding: '0.65rem',
122
126
  alignSelf: 'stretch',
123
127
  color: '#000',
124
128
  fontFamily: 'Verdana, sans-serif',
125
- fontSize: '0.875rem',
129
+ // fontSize: '0.875rem',
126
130
  fontStyle: 'normal',
127
131
  fontWeight: '400',
128
- lineHeight: '1.375rem',
132
+ // lineHeight: '1.375rem',
129
133
  };
130
134
  export const endSectionStyle = Object.assign(Object.assign({}, descriptionWidgetStyle), { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '0.625rem' });
131
135
  export const symbolIcon = {
@@ -156,10 +160,13 @@ export const buttonWidgetStyle = {
156
160
  cursor: 'pointer',
157
161
  };
158
162
  export const stopWidgetStyle = {
159
- marginTop: '2rem',
163
+ marginTop: '1rem',
164
+ marginBottom: '1rem',
160
165
  cursor: 'pointer',
161
166
  display: 'block',
162
- fontWeight: '600',
167
+ fontWeight: '500',
168
+ fontSize: '13px!important',
169
+ lineHeight: 'auto',
163
170
  };
164
171
  export const paginationStyle = {
165
172
  display: 'flex',
@@ -172,21 +179,27 @@ export const paginationStyle = {
172
179
  };
173
180
  export const taskNumberActive = {
174
181
  display: 'flex',
175
- padding: '0.0625rem 0.5rem',
176
182
  flexDirection: 'column',
177
183
  alignItems: 'center',
184
+ justifyContent: 'center',
178
185
  borderRadius: '6.25em',
179
186
  outline: '1px solid #394EFF',
187
+ fontSize: '13px',
188
+ height: '24px',
189
+ width: '24px',
180
190
  };
181
191
  export const taskNumberDone = {
182
192
  display: 'flex',
183
- padding: '0.0625rem 0.5rem',
184
193
  flexDirection: 'column',
185
194
  alignItems: 'center',
195
+ justifyContent: 'center',
186
196
  borderRadius: '6.25em',
187
197
  outline: '1px solid #D2DFFF',
188
198
  boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
189
199
  background: '#D2DFFF',
200
+ fontSize: '13px',
201
+ height: '24px',
202
+ width: '24px',
190
203
  };
191
204
  export const taskDescriptionCard = {
192
205
  borderRadius: '0.375rem',
@@ -203,7 +216,8 @@ export const taskTextStyle = {
203
216
  fontWeight: 'bold',
204
217
  };
205
218
  export const taskDescriptionStyle = {
206
- color: '#8C8C8C',
219
+ fontSize: '13px',
220
+ lineHeight: 'auto',
207
221
  };
208
222
  export const taskButtonStyle = {
209
223
  marginRight: '0.5rem',
@@ -211,10 +225,10 @@ export const taskButtonStyle = {
211
225
  color: '#394EFF',
212
226
  textAlign: 'center',
213
227
  fontFamily: 'Verdana, sans-serif',
214
- fontSize: '0.875rem',
228
+ fontSize: '13px',
215
229
  fontStyle: 'normal',
216
230
  fontWeight: '500',
217
- lineHeight: '1.375rem',
231
+ lineHeight: 'auto',
218
232
  };
219
233
  export const taskButtonBorderedStyle = Object.assign(Object.assign({}, taskButtonStyle), { display: 'flex', padding: '0.25rem 0.9375rem', justifyContent: 'center', alignItems: 'center', gap: '0.5rem', borderRadius: '0.25rem', border: '1px solid #394EFF' });
220
234
  export const taskButtonsRow = {
@@ -224,3 +238,11 @@ export const taskButtonsRow = {
224
238
  width: '100%',
225
239
  boxSizing: 'border-box',
226
240
  };
241
+ export const spinnerStyles = {
242
+ border: '4px solid rgba(255, 255, 255, 0.4)',
243
+ width: '16px',
244
+ height: '16px',
245
+ borderRadius: '50%',
246
+ borderLeftColor: '#fff',
247
+ animation: 'spin 0.5s linear infinite',
248
+ };
@@ -0,0 +1,9 @@
1
+ export declare function generateGrid(): HTMLDivElement;
2
+ export declare function generateChevron(): HTMLDivElement;
3
+ export declare function addKeyframes(): void;
4
+ export declare function createSpinner(): HTMLDivElement;
5
+ export declare function createElement(tag: string, className: string, styles: any, textContent?: string, id?: string): HTMLElement;
6
+ export declare const TEST_START = "or_uxt_test_start";
7
+ export declare const TASK_IND = "or_uxt_task_index";
8
+ export declare const SESSION_ID = "or_uxt_session_id";
9
+ export declare const TEST_ID = "or_uxt_test_id";
@@ -0,0 +1,79 @@
1
+ import { spinnerStyles } from './styles.js';
2
+ export function generateGrid() {
3
+ const grid = document.createElement('div');
4
+ grid.className = 'grid';
5
+ for (let i = 0; i < 16; i++) {
6
+ const cell = document.createElement('div');
7
+ Object.assign(cell.style, {
8
+ width: '2px',
9
+ height: '2px',
10
+ borderRadius: '10px',
11
+ background: 'white',
12
+ });
13
+ cell.className = 'cell';
14
+ grid.appendChild(cell);
15
+ }
16
+ Object.assign(grid.style, {
17
+ display: 'grid',
18
+ gridTemplateColumns: 'repeat(4, 1fr)',
19
+ gridTemplateRows: 'repeat(4, 1fr)',
20
+ gap: '2px',
21
+ cursor: 'grab',
22
+ });
23
+ return grid;
24
+ }
25
+ export function generateChevron() {
26
+ const triangle = document.createElement('div');
27
+ Object.assign(triangle.style, {
28
+ width: '0',
29
+ height: '0',
30
+ borderLeft: '7px solid transparent',
31
+ borderRight: '7px solid transparent',
32
+ borderBottom: '7px solid white',
33
+ });
34
+ const container = document.createElement('div');
35
+ container.appendChild(triangle);
36
+ Object.assign(container.style, {
37
+ display: 'flex',
38
+ alignItems: 'center',
39
+ justifyContent: 'center',
40
+ width: '16px',
41
+ height: '16px',
42
+ cursor: 'pointer',
43
+ marginLeft: 'auto',
44
+ transform: 'rotate(180deg)',
45
+ });
46
+ return container;
47
+ }
48
+ export function addKeyframes() {
49
+ const styleSheet = document.createElement('style');
50
+ styleSheet.type = 'text/css';
51
+ styleSheet.innerText = `@keyframes spin {
52
+ 0% { transform: rotate(0deg); }
53
+ 100% { transform: rotate(360deg); }
54
+ }`;
55
+ document.head.appendChild(styleSheet);
56
+ }
57
+ export function createSpinner() {
58
+ addKeyframes();
59
+ const spinner = document.createElement('div');
60
+ spinner.classList.add('spinner');
61
+ Object.assign(spinner.style, spinnerStyles);
62
+ return spinner;
63
+ }
64
+ export function createElement(tag, className, styles, textContent, id) {
65
+ const element = document.createElement(tag);
66
+ element.className = className;
67
+ Object.assign(element.style, styles);
68
+ if (textContent) {
69
+ element.textContent = textContent;
70
+ }
71
+ if (id) {
72
+ element.id = id;
73
+ }
74
+ return element;
75
+ }
76
+ export const TEST_START = 'or_uxt_test_start';
77
+ export const TASK_IND = 'or_uxt_task_index';
78
+ export const SESSION_ID = 'or_uxt_session_id';
79
+ export const TEST_ID = 'or_uxt_test_id';
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": "11.0.0",
4
+ "version": "11.0.2",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"