@openreplay/tracker 14.0.10-beta.2 → 14.0.11

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 (273) hide show
  1. package/{cjs → dist/cjs}/index.js +29 -49
  2. package/dist/cjs/index.js.map +1 -0
  3. package/{cjs → dist/cjs/main}/app/index.d.ts +17 -5
  4. package/{lib → dist/cjs/main}/app/logger.d.ts +1 -0
  5. package/{lib → dist/cjs/main}/app/messages.gen.d.ts +2 -2
  6. package/{lib/app/nodes.d.ts → dist/cjs/main/app/nodes/index.d.ts} +14 -7
  7. package/dist/cjs/main/app/nodes/maintainer.d.ts +28 -0
  8. package/{lib → dist/cjs/main}/app/observer/iframe_observer.d.ts +2 -0
  9. package/{lib → dist/cjs/main}/app/observer/iframe_offsets.d.ts +1 -1
  10. package/{lib → dist/cjs/main}/app/observer/observer.d.ts +3 -1
  11. package/{lib → dist/cjs/main}/app/observer/top_observer.d.ts +7 -1
  12. package/{cjs → dist/cjs/main}/app/sanitizer.d.ts +5 -2
  13. package/{cjs → dist/cjs/main}/app/session.d.ts +6 -3
  14. package/{cjs → dist/cjs/main}/index.d.ts +2 -2
  15. package/{cjs → dist/cjs/main}/modules/attributeSender.d.ts +5 -2
  16. package/{cjs → dist/cjs/main}/modules/conditionsManager.d.ts +1 -1
  17. package/{cjs → dist/cjs/main}/modules/tagWatcher.d.ts +8 -4
  18. package/{lib → dist/cjs/main}/modules/userTesting/SignalManager.d.ts +2 -2
  19. package/{lib → dist/cjs/main}/utils.d.ts +4 -3
  20. package/dist/lib/index.js +9358 -0
  21. package/dist/lib/index.js.map +1 -0
  22. package/{lib → dist/lib/main}/app/index.d.ts +17 -5
  23. package/{cjs → dist/lib/main}/app/logger.d.ts +1 -0
  24. package/{cjs → dist/lib/main}/app/messages.gen.d.ts +2 -2
  25. package/{cjs/app/nodes.d.ts → dist/lib/main/app/nodes/index.d.ts} +14 -7
  26. package/dist/lib/main/app/nodes/maintainer.d.ts +28 -0
  27. package/{cjs → dist/lib/main}/app/observer/iframe_observer.d.ts +2 -0
  28. package/{cjs → dist/lib/main}/app/observer/iframe_offsets.d.ts +1 -1
  29. package/{cjs → dist/lib/main}/app/observer/observer.d.ts +3 -1
  30. package/{cjs → dist/lib/main}/app/observer/top_observer.d.ts +7 -1
  31. package/{lib → dist/lib/main}/app/sanitizer.d.ts +5 -2
  32. package/{lib → dist/lib/main}/app/session.d.ts +6 -3
  33. package/{lib → dist/lib/main}/index.d.ts +2 -2
  34. package/{lib → dist/lib/main}/modules/attributeSender.d.ts +5 -2
  35. package/{lib → dist/lib/main}/modules/conditionsManager.d.ts +1 -1
  36. package/{lib → dist/lib/main}/modules/tagWatcher.d.ts +8 -4
  37. package/{cjs → dist/lib/main}/modules/userTesting/SignalManager.d.ts +2 -2
  38. package/{cjs → dist/lib/main}/utils.d.ts +4 -3
  39. package/package.json +31 -20
  40. package/.eslintignore +0 -11
  41. package/.nvmrc +0 -1
  42. package/.prettierignore +0 -1
  43. package/CHANGELOG.md +0 -297
  44. package/bun.lockb +0 -0
  45. package/cjs/app/canvas.js +0 -204
  46. package/cjs/app/guards.js +0 -37
  47. package/cjs/app/index.js +0 -1397
  48. package/cjs/app/logger.js +0 -37
  49. package/cjs/app/messages.gen.js +0 -702
  50. package/cjs/app/nodes.js +0 -111
  51. package/cjs/app/observer/iframe_observer.js +0 -35
  52. package/cjs/app/observer/iframe_offsets.js +0 -56
  53. package/cjs/app/observer/observer.js +0 -383
  54. package/cjs/app/observer/shadow_root_observer.js +0 -24
  55. package/cjs/app/observer/top_observer.js +0 -134
  56. package/cjs/app/sanitizer.js +0 -82
  57. package/cjs/app/session.js +0 -140
  58. package/cjs/app/ticker.js +0 -48
  59. package/cjs/common/interaction.js +0 -2
  60. package/cjs/common/messages.gen.js +0 -4
  61. package/cjs/modules/attributeSender.js +0 -51
  62. package/cjs/modules/axiosSpy.js +0 -122
  63. package/cjs/modules/conditionsManager.js +0 -343
  64. package/cjs/modules/connection.js +0 -15
  65. package/cjs/modules/console.js +0 -127
  66. package/cjs/modules/constructedStyleSheets.js +0 -138
  67. package/cjs/modules/cssrules.js +0 -99
  68. package/cjs/modules/exception.js +0 -85
  69. package/cjs/modules/featureFlags.js +0 -89
  70. package/cjs/modules/focus.js +0 -45
  71. package/cjs/modules/fonts.js +0 -57
  72. package/cjs/modules/img.js +0 -110
  73. package/cjs/modules/input.js +0 -203
  74. package/cjs/modules/mouse.js +0 -195
  75. package/cjs/modules/network.js +0 -244
  76. package/cjs/modules/performance.js +0 -53
  77. package/cjs/modules/scroll.js +0 -84
  78. package/cjs/modules/selection.js +0 -37
  79. package/cjs/modules/tabs.js +0 -13
  80. package/cjs/modules/tagWatcher.js +0 -76
  81. package/cjs/modules/timing.js +0 -173
  82. package/cjs/modules/userTesting/SignalManager.js +0 -83
  83. package/cjs/modules/userTesting/dnd.js +0 -40
  84. package/cjs/modules/userTesting/index.js +0 -464
  85. package/cjs/modules/userTesting/recorder.js +0 -101
  86. package/cjs/modules/userTesting/styles.js +0 -266
  87. package/cjs/modules/userTesting/utils.js +0 -87
  88. package/cjs/modules/viewport.js +0 -43
  89. package/cjs/package.json +0 -1
  90. package/cjs/utils.js +0 -249
  91. package/coverage/clover.xml +0 -4304
  92. package/coverage/coverage-final.json +0 -55
  93. package/coverage/lcov-report/base.css +0 -224
  94. package/coverage/lcov-report/block-navigation.js +0 -87
  95. package/coverage/lcov-report/favicon.png +0 -0
  96. package/coverage/lcov-report/index.html +0 -206
  97. package/coverage/lcov-report/main/app/canvas.ts.html +0 -712
  98. package/coverage/lcov-report/main/app/guards.ts.html +0 -232
  99. package/coverage/lcov-report/main/app/index.html +0 -236
  100. package/coverage/lcov-report/main/app/index.ts.html +0 -3955
  101. package/coverage/lcov-report/main/app/logger.ts.html +0 -211
  102. package/coverage/lcov-report/main/app/messages.gen.ts.html +0 -3034
  103. package/coverage/lcov-report/main/app/nodes.ts.html +0 -406
  104. package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +0 -148
  105. package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +0 -289
  106. package/coverage/lcov-report/main/app/observer/index.html +0 -161
  107. package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +0 -142
  108. package/coverage/lcov-report/main/app/observer/top_observer.ts.html +0 -541
  109. package/coverage/lcov-report/main/app/sanitizer.ts.html +0 -403
  110. package/coverage/lcov-report/main/app/session.ts.html +0 -622
  111. package/coverage/lcov-report/main/app/ticker.ts.html +0 -250
  112. package/coverage/lcov-report/main/index.html +0 -131
  113. package/coverage/lcov-report/main/index.ts.html +0 -1597
  114. package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +0 -400
  115. package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +0 -1075
  116. package/coverage/lcov-report/main/modules/Network/index.html +0 -191
  117. package/coverage/lcov-report/main/modules/Network/index.ts.html +0 -244
  118. package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +0 -400
  119. package/coverage/lcov-report/main/modules/Network/utils.ts.html +0 -709
  120. package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +0 -877
  121. package/coverage/lcov-report/main/modules/attributeSender.ts.html +0 -241
  122. package/coverage/lcov-report/main/modules/axiosSpy.ts.html +0 -709
  123. package/coverage/lcov-report/main/modules/conditionsManager.ts.html +0 -1381
  124. package/coverage/lcov-report/main/modules/connection.ts.html +0 -160
  125. package/coverage/lcov-report/main/modules/console.ts.html +0 -541
  126. package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +0 -571
  127. package/coverage/lcov-report/main/modules/cssrules.ts.html +0 -418
  128. package/coverage/lcov-report/main/modules/exception.ts.html +0 -385
  129. package/coverage/lcov-report/main/modules/featureFlags.ts.html +0 -415
  130. package/coverage/lcov-report/main/modules/focus.ts.html +0 -220
  131. package/coverage/lcov-report/main/modules/fonts.ts.html +0 -289
  132. package/coverage/lcov-report/main/modules/img.ts.html +0 -436
  133. package/coverage/lcov-report/main/modules/index.html +0 -431
  134. package/coverage/lcov-report/main/modules/input.ts.html +0 -826
  135. package/coverage/lcov-report/main/modules/mouse.ts.html +0 -826
  136. package/coverage/lcov-report/main/modules/network.ts.html +0 -1123
  137. package/coverage/lcov-report/main/modules/performance.ts.html +0 -367
  138. package/coverage/lcov-report/main/modules/scroll.ts.html +0 -364
  139. package/coverage/lcov-report/main/modules/selection.ts.html +0 -202
  140. package/coverage/lcov-report/main/modules/tabs.ts.html +0 -124
  141. package/coverage/lcov-report/main/modules/tagWatcher.ts.html +0 -337
  142. package/coverage/lcov-report/main/modules/timing.ts.html +0 -877
  143. package/coverage/lcov-report/main/modules/userTesting/SignalManager.ts.html +0 -370
  144. package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +0 -220
  145. package/coverage/lcov-report/main/modules/userTesting/index.html +0 -191
  146. package/coverage/lcov-report/main/modules/userTesting/index.ts.html +0 -1909
  147. package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +0 -430
  148. package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +0 -937
  149. package/coverage/lcov-report/main/modules/userTesting/utils.ts.html +0 -364
  150. package/coverage/lcov-report/main/modules/viewport.ts.html +0 -250
  151. package/coverage/lcov-report/main/utils.ts.html +0 -814
  152. package/coverage/lcov-report/prettify.css +0 -1
  153. package/coverage/lcov-report/prettify.js +0 -2
  154. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  155. package/coverage/lcov-report/sorter.js +0 -196
  156. package/coverage/lcov-report/webworker/BatchWriter.ts.html +0 -499
  157. package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +0 -1021
  158. package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +0 -436
  159. package/coverage/lcov-report/webworker/QueueSender.ts.html +0 -547
  160. package/coverage/lcov-report/webworker/index.html +0 -176
  161. package/coverage/lcov-report/webworker/index.ts.html +0 -667
  162. package/coverage/lcov.info +0 -8425
  163. package/jest.config.js +0 -13
  164. package/lib/app/canvas.js +0 -202
  165. package/lib/app/guards.js +0 -26
  166. package/lib/app/index.js +0 -1367
  167. package/lib/app/logger.js +0 -33
  168. package/lib/app/messages.gen.js +0 -622
  169. package/lib/app/nodes.js +0 -108
  170. package/lib/app/observer/iframe_observer.js +0 -29
  171. package/lib/app/observer/iframe_offsets.js +0 -53
  172. package/lib/app/observer/observer.js +0 -380
  173. package/lib/app/observer/shadow_root_observer.js +0 -18
  174. package/lib/app/observer/top_observer.js +0 -128
  175. package/lib/app/sanitizer.js +0 -77
  176. package/lib/app/session.js +0 -137
  177. package/lib/app/ticker.js +0 -45
  178. package/lib/common/interaction.js +0 -1
  179. package/lib/common/messages.gen.js +0 -3
  180. package/lib/common/tsconfig.tsbuildinfo +0 -1
  181. package/lib/index.js +0 -423
  182. package/lib/modules/attributeSender.js +0 -46
  183. package/lib/modules/axiosSpy.js +0 -119
  184. package/lib/modules/conditionsManager.js +0 -340
  185. package/lib/modules/connection.js +0 -12
  186. package/lib/modules/console.js +0 -124
  187. package/lib/modules/constructedStyleSheets.js +0 -133
  188. package/lib/modules/cssrules.js +0 -97
  189. package/lib/modules/exception.js +0 -76
  190. package/lib/modules/featureFlags.js +0 -86
  191. package/lib/modules/focus.js +0 -42
  192. package/lib/modules/fonts.js +0 -54
  193. package/lib/modules/img.js +0 -107
  194. package/lib/modules/input.js +0 -198
  195. package/lib/modules/mouse.js +0 -192
  196. package/lib/modules/network.js +0 -238
  197. package/lib/modules/performance.js +0 -49
  198. package/lib/modules/scroll.js +0 -81
  199. package/lib/modules/selection.js +0 -35
  200. package/lib/modules/tabs.js +0 -10
  201. package/lib/modules/tagWatcher.js +0 -73
  202. package/lib/modules/timing.js +0 -170
  203. package/lib/modules/userTesting/SignalManager.js +0 -80
  204. package/lib/modules/userTesting/dnd.js +0 -37
  205. package/lib/modules/userTesting/index.js +0 -435
  206. package/lib/modules/userTesting/recorder.js +0 -97
  207. package/lib/modules/userTesting/styles.js +0 -263
  208. package/lib/modules/userTesting/utils.js +0 -79
  209. package/lib/modules/viewport.js +0 -40
  210. package/lib/utils.js +0 -230
  211. package/rollup.config.js +0 -12
  212. package/scripts/checkver.cjs +0 -7
  213. package/tsconfig-base.json +0 -16
  214. /package/{cjs → dist/cjs}/common/interaction.d.ts +0 -0
  215. /package/{cjs → dist/cjs}/common/messages.gen.d.ts +0 -0
  216. /package/{cjs → dist/cjs/main}/app/canvas.d.ts +0 -0
  217. /package/{cjs → dist/cjs/main}/app/guards.d.ts +0 -0
  218. /package/{cjs → dist/cjs/main}/app/observer/shadow_root_observer.d.ts +0 -0
  219. /package/{cjs → dist/cjs/main}/app/ticker.d.ts +0 -0
  220. /package/{cjs → dist/cjs/main}/modules/axiosSpy.d.ts +0 -0
  221. /package/{cjs → dist/cjs/main}/modules/connection.d.ts +0 -0
  222. /package/{cjs → dist/cjs/main}/modules/console.d.ts +0 -0
  223. /package/{cjs → dist/cjs/main}/modules/constructedStyleSheets.d.ts +0 -0
  224. /package/{cjs → dist/cjs/main}/modules/cssrules.d.ts +0 -0
  225. /package/{cjs → dist/cjs/main}/modules/exception.d.ts +0 -0
  226. /package/{cjs → dist/cjs/main}/modules/featureFlags.d.ts +0 -0
  227. /package/{cjs → dist/cjs/main}/modules/focus.d.ts +0 -0
  228. /package/{cjs → dist/cjs/main}/modules/fonts.d.ts +0 -0
  229. /package/{cjs → dist/cjs/main}/modules/img.d.ts +0 -0
  230. /package/{cjs → dist/cjs/main}/modules/input.d.ts +0 -0
  231. /package/{cjs → dist/cjs/main}/modules/mouse.d.ts +0 -0
  232. /package/{cjs → dist/cjs/main}/modules/network.d.ts +0 -0
  233. /package/{cjs → dist/cjs/main}/modules/performance.d.ts +0 -0
  234. /package/{cjs → dist/cjs/main}/modules/scroll.d.ts +0 -0
  235. /package/{cjs → dist/cjs/main}/modules/selection.d.ts +0 -0
  236. /package/{cjs → dist/cjs/main}/modules/tabs.d.ts +0 -0
  237. /package/{cjs → dist/cjs/main}/modules/timing.d.ts +0 -0
  238. /package/{cjs → dist/cjs/main}/modules/userTesting/dnd.d.ts +0 -0
  239. /package/{cjs → dist/cjs/main}/modules/userTesting/index.d.ts +0 -0
  240. /package/{cjs → dist/cjs/main}/modules/userTesting/recorder.d.ts +0 -0
  241. /package/{cjs → dist/cjs/main}/modules/userTesting/styles.d.ts +0 -0
  242. /package/{cjs → dist/cjs/main}/modules/userTesting/utils.d.ts +0 -0
  243. /package/{cjs → dist/cjs/main}/modules/viewport.d.ts +0 -0
  244. /package/{lib → dist/lib}/common/interaction.d.ts +0 -0
  245. /package/{lib → dist/lib}/common/messages.gen.d.ts +0 -0
  246. /package/{lib → dist/lib/main}/app/canvas.d.ts +0 -0
  247. /package/{lib → dist/lib/main}/app/guards.d.ts +0 -0
  248. /package/{lib → dist/lib/main}/app/observer/shadow_root_observer.d.ts +0 -0
  249. /package/{lib → dist/lib/main}/app/ticker.d.ts +0 -0
  250. /package/{lib → dist/lib/main}/modules/axiosSpy.d.ts +0 -0
  251. /package/{lib → dist/lib/main}/modules/connection.d.ts +0 -0
  252. /package/{lib → dist/lib/main}/modules/console.d.ts +0 -0
  253. /package/{lib → dist/lib/main}/modules/constructedStyleSheets.d.ts +0 -0
  254. /package/{lib → dist/lib/main}/modules/cssrules.d.ts +0 -0
  255. /package/{lib → dist/lib/main}/modules/exception.d.ts +0 -0
  256. /package/{lib → dist/lib/main}/modules/featureFlags.d.ts +0 -0
  257. /package/{lib → dist/lib/main}/modules/focus.d.ts +0 -0
  258. /package/{lib → dist/lib/main}/modules/fonts.d.ts +0 -0
  259. /package/{lib → dist/lib/main}/modules/img.d.ts +0 -0
  260. /package/{lib → dist/lib/main}/modules/input.d.ts +0 -0
  261. /package/{lib → dist/lib/main}/modules/mouse.d.ts +0 -0
  262. /package/{lib → dist/lib/main}/modules/network.d.ts +0 -0
  263. /package/{lib → dist/lib/main}/modules/performance.d.ts +0 -0
  264. /package/{lib → dist/lib/main}/modules/scroll.d.ts +0 -0
  265. /package/{lib → dist/lib/main}/modules/selection.d.ts +0 -0
  266. /package/{lib → dist/lib/main}/modules/tabs.d.ts +0 -0
  267. /package/{lib → dist/lib/main}/modules/timing.d.ts +0 -0
  268. /package/{lib → dist/lib/main}/modules/userTesting/dnd.d.ts +0 -0
  269. /package/{lib → dist/lib/main}/modules/userTesting/index.d.ts +0 -0
  270. /package/{lib → dist/lib/main}/modules/userTesting/recorder.d.ts +0 -0
  271. /package/{lib → dist/lib/main}/modules/userTesting/styles.d.ts +0 -0
  272. /package/{lib → dist/lib/main}/modules/userTesting/utils.d.ts +0 -0
  273. /package/{lib → dist/lib/main}/modules/viewport.d.ts +0 -0
@@ -1,263 +0,0 @@
1
- export const bgStyle = {
2
- position: 'fixed',
3
- top: 0,
4
- left: 0,
5
- width: '100vw',
6
- height: '100vh',
7
- background: 'rgba(0, 0, 0, 0.40)',
8
- display: 'flex',
9
- alignItems: 'center',
10
- justifyContent: 'center',
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"`,
13
- };
14
- export const containerStyle = {
15
- display: 'flex',
16
- flexDirection: 'column',
17
- gap: '2rem',
18
- alignItems: 'center',
19
- padding: '1.5rem',
20
- borderRadius: '2px',
21
- border: '1px solid #D9D9D9',
22
- background: '#FFF',
23
- width: '22rem',
24
- };
25
- export const containerWidgetStyle = {
26
- display: 'flex',
27
- 'flex-direction': 'column',
28
- gap: 'unset',
29
- 'align-items': 'center',
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',
33
- border: '1px solid #D9D9D9',
34
- background: 'rgba(255, 255, 255, 0.75)',
35
- width: '22rem',
36
- };
37
- export const titleStyle = {
38
- fontFamily: 'Verdana, sans-serif',
39
- fontSize: '1.25rem',
40
- fontStyle: 'normal',
41
- fontWeight: '500',
42
- lineHeight: '1.75rem',
43
- color: 'rgba(0, 0, 0, 0.85)',
44
- };
45
- export const descriptionStyle = {
46
- borderTop: '1px solid rgba(0, 0, 0, 0.06)',
47
- borderBottom: '1px solid rgba(0, 0, 0, 0.06)',
48
- padding: '1.25rem 0rem',
49
- color: 'rgba(0, 0, 0, 0.85)',
50
- fontFamily: 'Verdana, sans-serif',
51
- fontSize: '13px',
52
- fontStyle: 'normal',
53
- fontWeight: '400',
54
- lineHeight: 'auto',
55
- whiteSpace: 'pre-wrap',
56
- };
57
- export const 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
- export const 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
- export const sectionTitleStyle = {
85
- fontFamily: 'Verdana, sans-serif',
86
- fontSize: '13px',
87
- fontWeight: '500',
88
- lineHeight: 'auto',
89
- display: 'flex',
90
- justifyContent: 'space-between',
91
- width: '100%',
92
- cursor: 'pointer',
93
- };
94
- export const contentStyle = {
95
- display: 'flex',
96
- flexDirection: 'column',
97
- alignItems: 'flex-start',
98
- gap: '0.625rem',
99
- fontSize: '13px',
100
- lineHeight: 'auto',
101
- };
102
- // New widget styles
103
- export const titleWidgetStyle = {
104
- padding: '0.5rem',
105
- gap: '0.5rem',
106
- fontFamily: 'Verdana, sans-serif',
107
- fontSize: '16px',
108
- fontStyle: 'normal',
109
- fontWeight: '500',
110
- lineHeight: 'auto',
111
- color: 'white',
112
- display: 'flex',
113
- alignItems: 'center',
114
- width: '100%',
115
- borderRadius: '2px',
116
- background: 'rgba(0, 0, 0, 0.75)',
117
- boxSizing: 'border-box',
118
- };
119
- export const descriptionWidgetStyle = {
120
- boxSizing: 'border-box',
121
- display: 'block',
122
- width: '100%',
123
- borderBottom: '1px solid #D9D9D9',
124
- background: '#FFF',
125
- padding: '0.65rem',
126
- alignSelf: 'stretch',
127
- color: '#000',
128
- fontFamily: 'Verdana, sans-serif',
129
- // fontSize: '0.875rem',
130
- fontStyle: 'normal',
131
- fontWeight: '400',
132
- // lineHeight: '1.375rem',
133
- };
134
- export const endSectionStyle = {
135
- ...descriptionWidgetStyle,
136
- display: 'flex',
137
- flexDirection: 'column',
138
- alignItems: 'center',
139
- gap: '0.625rem',
140
- };
141
- export const symbolIcon = {
142
- fontSize: '1.25rem',
143
- fontWeight: '500',
144
- cursor: 'pointer',
145
- color: '#394EFF',
146
- };
147
- export const buttonWidgetStyle = {
148
- display: 'flex',
149
- padding: '0.4rem 0.9375rem',
150
- justifyContent: 'center',
151
- alignItems: 'center',
152
- gap: '0.625rem',
153
- borderRadius: '0.25rem',
154
- border: '1px solid #394EFF',
155
- background: '#394EFF',
156
- boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
157
- color: '#FFF',
158
- textAlign: 'center',
159
- fontFamily: 'Verdana, sans-serif',
160
- fontSize: '1rem',
161
- fontStyle: 'normal',
162
- fontWeight: '500',
163
- lineHeight: '1.5rem',
164
- width: '100%',
165
- boxSizing: 'border-box',
166
- cursor: 'pointer',
167
- };
168
- export const stopWidgetStyle = {
169
- marginTop: '1rem',
170
- marginBottom: '1rem',
171
- cursor: 'pointer',
172
- display: 'block',
173
- fontWeight: '500',
174
- fontSize: '13px!important',
175
- lineHeight: 'auto',
176
- };
177
- export const paginationStyle = {
178
- display: 'flex',
179
- justifyContent: 'space-between',
180
- alignItems: 'center',
181
- gap: '1rem',
182
- padding: '0.5rem',
183
- width: '100%',
184
- boxSizing: 'border-box',
185
- };
186
- export const taskNumberActive = {
187
- display: 'flex',
188
- flexDirection: 'column',
189
- alignItems: 'center',
190
- justifyContent: 'center',
191
- borderRadius: '6.25em',
192
- outline: '1px solid #394EFF',
193
- fontSize: '13px',
194
- height: '24px',
195
- width: '24px',
196
- };
197
- export const taskNumberDone = {
198
- display: 'flex',
199
- flexDirection: 'column',
200
- alignItems: 'center',
201
- justifyContent: 'center',
202
- borderRadius: '6.25em',
203
- outline: '1px solid #D2DFFF',
204
- boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
205
- background: '#D2DFFF',
206
- fontSize: '13px',
207
- height: '24px',
208
- width: '24px',
209
- };
210
- export const taskDescriptionCard = {
211
- borderRadius: '0.375rem',
212
- border: '1px solid rgba(0, 0, 0, 0.06)',
213
- background: '#F5F7FF',
214
- boxShadow: '0px 2px 0px 0px rgba(0, 0, 0, 0.04)',
215
- display: 'flex',
216
- flexDirection: 'column',
217
- padding: '0.625rem 0.9375rem',
218
- gap: '0.5rem',
219
- alignSelf: 'stretch',
220
- };
221
- export const taskTextStyle = {
222
- fontWeight: 'bold',
223
- };
224
- export const taskDescriptionStyle = {
225
- fontSize: '13px',
226
- lineHeight: 'auto',
227
- };
228
- export const taskButtonStyle = {
229
- marginRight: '0.5rem',
230
- cursor: 'pointer',
231
- color: '#394EFF',
232
- textAlign: 'center',
233
- fontFamily: 'Verdana, sans-serif',
234
- fontSize: '13px',
235
- fontStyle: 'normal',
236
- fontWeight: '500',
237
- lineHeight: 'auto',
238
- };
239
- export const taskButtonBorderedStyle = {
240
- ...taskButtonStyle,
241
- display: 'flex',
242
- padding: '0.25rem 0.9375rem',
243
- justifyContent: 'center',
244
- alignItems: 'center',
245
- gap: '0.5rem',
246
- borderRadius: '0.25rem',
247
- border: '1px solid #394EFF',
248
- };
249
- export const taskButtonsRow = {
250
- display: 'flex',
251
- justifyContent: 'space-between',
252
- alignItems: 'center',
253
- width: '100%',
254
- boxSizing: 'border-box',
255
- };
256
- export const spinnerStyles = {
257
- border: '4px solid rgba(255, 255, 255, 0.4)',
258
- width: '16px',
259
- height: '16px',
260
- borderRadius: '50%',
261
- borderLeftColor: '#fff',
262
- animation: 'spin 0.5s linear infinite',
263
- };
@@ -1,79 +0,0 @@
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';
@@ -1,40 +0,0 @@
1
- import { getTimeOrigin } from '../utils.js';
2
- import { SetPageLocation, SetViewportSize, SetPageVisibility } from '../app/messages.gen.js';
3
- export default function (app) {
4
- let url, width, height;
5
- let navigationStart;
6
- let referrer = document.referrer;
7
- const sendSetPageLocation = app.safe(() => {
8
- const { URL } = document;
9
- if (URL !== url) {
10
- url = URL;
11
- app.send(SetPageLocation(url, referrer, navigationStart, document.title));
12
- navigationStart = 0;
13
- referrer = url;
14
- }
15
- });
16
- const sendSetViewportSize = app.safe(() => {
17
- const { innerWidth, innerHeight } = window;
18
- if (innerWidth !== width || innerHeight !== height) {
19
- width = innerWidth;
20
- height = innerHeight;
21
- app.send(SetViewportSize(width, height));
22
- }
23
- });
24
- const sendSetPageVisibility = document.hidden === undefined
25
- ? Function.prototype
26
- : app.safe(() => app.send(SetPageVisibility(document.hidden)));
27
- app.attachStartCallback(() => {
28
- url = null;
29
- navigationStart = getTimeOrigin();
30
- width = height = -1;
31
- sendSetPageLocation();
32
- sendSetViewportSize();
33
- sendSetPageVisibility();
34
- });
35
- if (document.hidden !== undefined) {
36
- app.attachEventListener(document, 'visibilitychange', sendSetPageVisibility, false, false);
37
- }
38
- app.ticker.attach(sendSetPageLocation, 1, false);
39
- app.ticker.attach(sendSetViewportSize, 5, false);
40
- }
package/lib/utils.js DELETED
@@ -1,230 +0,0 @@
1
- const DEPRECATED_ATTRS = { htmlmasked: 'hidden', masked: 'obscured' };
2
- export const IN_BROWSER = !(typeof window === 'undefined');
3
- export const IS_FIREFOX = IN_BROWSER && navigator.userAgent.match(/firefox|fxios/i);
4
- export const MAX_STR_LEN = 1e5;
5
- // Buggy to use `performance.timeOrigin || performance.timing.navigationStart`
6
- // https://github.com/mdn/content/issues/4713
7
- // Maybe move to timer/ticker
8
- let timeOrigin = IN_BROWSER ? Date.now() - performance.now() : 0;
9
- export function adjustTimeOrigin() {
10
- timeOrigin = Date.now() - performance.now();
11
- }
12
- export function getTimeOrigin() {
13
- return timeOrigin;
14
- }
15
- export const now = IN_BROWSER && !!performance.now
16
- ? () => Math.round(performance.now() + timeOrigin)
17
- : () => Date.now();
18
- export const stars = 'repeat' in String.prototype
19
- ? (str) => '*'.repeat(str.length)
20
- : (str) => str.replace(/./g, '*');
21
- export function normSpaces(str) {
22
- return str.trim().replace(/\s+/g, ' ');
23
- }
24
- // isAbsoluteUrl regexp: /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url)
25
- export function isURL(s) {
26
- return s.startsWith('https://') || s.startsWith('http://');
27
- }
28
- // TODO: JOIN IT WITH LOGGER somehow (use logging decorators?); Don't forget about index.js loggin when there is no logger instance.
29
- export const DOCS_HOST = 'https://docs.openreplay.com';
30
- const warnedFeatures = {};
31
- export function deprecationWarn(nameOfFeature, useInstead, docsPath = '/') {
32
- if (warnedFeatures[nameOfFeature]) {
33
- return;
34
- }
35
- console.warn(`OpenReplay: ${nameOfFeature} is deprecated. ${useInstead ? `Please, use ${useInstead} instead.` : ''} Visit ${DOCS_HOST}${docsPath} for more information.`);
36
- warnedFeatures[nameOfFeature] = true;
37
- }
38
- export function getLabelAttribute(e) {
39
- let value = e.getAttribute('data-openreplay-label');
40
- if (value !== null) {
41
- return value;
42
- }
43
- value = e.getAttribute('data-asayer-label');
44
- if (value !== null) {
45
- deprecationWarn('"data-asayer-label" attribute', '"data-openreplay-label" attribute', '/');
46
- }
47
- return value;
48
- }
49
- export function hasOpenreplayAttribute(e, attr) {
50
- const newName = `data-openreplay-${attr}`;
51
- if (e.hasAttribute(newName)) {
52
- // @ts-ignore
53
- if (DEPRECATED_ATTRS[attr]) {
54
- deprecationWarn(`"${newName}" attribute`,
55
- // @ts-ignore
56
- `"${DEPRECATED_ATTRS[attr]}" attribute`, '/installation/sanitize-data');
57
- }
58
- return true;
59
- }
60
- return false;
61
- }
62
- /**
63
- * checks if iframe is accessible
64
- **/
65
- export function canAccessIframe(iframe) {
66
- try {
67
- return Boolean(iframe.contentDocument);
68
- }
69
- catch (e) {
70
- return false;
71
- }
72
- }
73
- function dec2hex(dec) {
74
- return dec.toString(16).padStart(2, '0');
75
- }
76
- export function generateRandomId(len) {
77
- const arr = new Uint8Array((len || 40) / 2);
78
- // msCrypto = IE11
79
- // @ts-ignore
80
- const safeCrypto = window.crypto || window.msCrypto;
81
- if (safeCrypto) {
82
- safeCrypto.getRandomValues(arr);
83
- return Array.from(arr, dec2hex).join('');
84
- }
85
- else {
86
- return Array.from({ length: len || 40 }, () => dec2hex(Math.floor(Math.random() * 16))).join('');
87
- }
88
- }
89
- export function inIframe() {
90
- try {
91
- return window.self && window.top && window.self !== window.top;
92
- }
93
- catch (e) {
94
- return true;
95
- }
96
- }
97
- /**
98
- * Because angular devs decided that its a good idea to override a browser apis
99
- * we need to use this to achieve safe behavior
100
- * */
101
- export function ngSafeBrowserMethod(method) {
102
- // @ts-ignore
103
- return window.Zone && '__symbol__' in window.Zone
104
- ? // @ts-ignore
105
- window['Zone']['__symbol__'](method)
106
- : method;
107
- }
108
- export function createMutationObserver(cb, angularMode) {
109
- if (angularMode) {
110
- const mObserver = ngSafeBrowserMethod('MutationObserver');
111
- return new window[mObserver](cb);
112
- }
113
- else {
114
- return new MutationObserver(cb);
115
- }
116
- }
117
- export function createEventListener(target, event, cb, capture, angularMode) {
118
- let safeAddEventListener;
119
- if (angularMode) {
120
- safeAddEventListener = ngSafeBrowserMethod('addEventListener');
121
- }
122
- else {
123
- safeAddEventListener = 'addEventListener';
124
- }
125
- try {
126
- target[safeAddEventListener](event, cb, capture);
127
- target.addEventListener(event, cb, capture);
128
- }
129
- catch (e) {
130
- const msg = e.message;
131
- console.error(
132
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
133
- `Openreplay: ${msg}; if this error is caused by an IframeObserver, ignore it`, event, target);
134
- }
135
- }
136
- export function deleteEventListener(target, event, cb, capture, angularMode) {
137
- let safeRemoveEventListener;
138
- if (angularMode) {
139
- safeRemoveEventListener = ngSafeBrowserMethod('removeEventListener');
140
- }
141
- else {
142
- safeRemoveEventListener = 'removeEventListener';
143
- }
144
- try {
145
- target[safeRemoveEventListener](event, cb, capture);
146
- target.removeEventListener(event, cb, capture);
147
- }
148
- catch (e) {
149
- const msg = e.message;
150
- console.error(
151
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
152
- `Openreplay: ${msg}; if this error is caused by an IframeObserver, ignore it`, event, target);
153
- }
154
- }
155
- class FIFOTaskScheduler {
156
- constructor() {
157
- this.taskQueue = [];
158
- this.isRunning = false;
159
- }
160
- // Adds a task to the queue
161
- addTask(task) {
162
- this.taskQueue.push(task);
163
- this.runTasks();
164
- }
165
- // Runs tasks from the queue
166
- runTasks() {
167
- if (this.isRunning || this.taskQueue.length === 0) {
168
- return;
169
- }
170
- this.isRunning = true;
171
- const executeNextTask = () => {
172
- if (this.taskQueue.length === 0) {
173
- this.isRunning = false;
174
- return;
175
- }
176
- // Get the next task and execute it
177
- const nextTask = this.taskQueue.shift();
178
- Promise.resolve(nextTask()).then(() => {
179
- requestAnimationFrame(() => executeNextTask());
180
- });
181
- };
182
- executeNextTask();
183
- }
184
- }
185
- const scheduler = new FIFOTaskScheduler();
186
- export function requestIdleCb(callback) {
187
- // performance improvement experiment;
188
- scheduler.addTask(callback);
189
- /**
190
- * This is a brief polyfill that suits our needs
191
- * I took inspiration from Microsoft Clarity polyfill on this one
192
- * then adapted it a little bit
193
- *
194
- * I'm very grateful for their bright idea
195
- * */
196
- // const taskTimeout = 3000
197
- // if (window.requestIdleCallback) {
198
- // return window.requestIdleCallback(callback, { timeout: taskTimeout })
199
- // } else {
200
- // const channel = new MessageChannel()
201
- // const incoming = channel.port1
202
- // const outgoing = channel.port2
203
- //
204
- // incoming.onmessage = (): void => {
205
- // callback()
206
- // }
207
- // requestAnimationFrame((): void => {
208
- // outgoing.postMessage(1)
209
- // })
210
- // }
211
- }
212
- export function simpleMerge(defaultObj, givenObj) {
213
- const result = { ...defaultObj };
214
- for (const key in givenObj) {
215
- // eslint-disable-next-line no-prototype-builtins
216
- if (givenObj.hasOwnProperty(key)) {
217
- const userOptionValue = givenObj[key];
218
- const defaultOptionValue = defaultObj[key];
219
- if (typeof userOptionValue === 'object' &&
220
- !Array.isArray(userOptionValue) &&
221
- userOptionValue !== null) {
222
- result[key] = simpleMerge(defaultOptionValue || {}, userOptionValue);
223
- }
224
- else {
225
- result[key] = userOptionValue;
226
- }
227
- }
228
- }
229
- return result;
230
- }
package/rollup.config.js DELETED
@@ -1,12 +0,0 @@
1
- import resolve from '@rollup/plugin-node-resolve'
2
- import { babel } from '@rollup/plugin-babel'
3
- import { terser } from 'rollup-plugin-terser'
4
-
5
- export default {
6
- input: 'build/webworker/index.js',
7
- output: {
8
- file: 'build/webworker.js',
9
- format: 'cjs',
10
- },
11
- plugins: [resolve(), babel({ babelHelpers: 'bundled' }), terser({ mangle: { reserved: ['$'] } })],
12
- }
@@ -1,7 +0,0 @@
1
- const semver = require("semver");
2
- const { engines } = require("../package");
3
- const version = engines.node;
4
- if (!semver.satisfies(process.version, version)) {
5
- console.error(`Required node version ${version}, got ${process.version}.`)
6
- process.exit(1);
7
- }
@@ -1,16 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "rootDir": "src",
4
- "outDir": "build",
5
- "declaration": true,
6
- "noImplicitAny": true,
7
- "noImplicitThis": true,
8
- "strictNullChecks": true,
9
- "alwaysStrict": true,
10
- "target": "es2020",
11
- "module": "es6",
12
- "moduleResolution": "node",
13
- "esModuleInterop": true,
14
- },
15
- "exclude": ["**/*.test.ts"]
16
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes