@openreplay/tracker 14.0.10-beta.1 → 14.0.10

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 +27 -49
  2. package/dist/cjs/index.js.map +1 -0
  3. package/{cjs → dist/cjs/main}/app/index.d.ts +38 -6
  4. package/{lib → dist/cjs/main}/app/messages.gen.d.ts +2 -2
  5. package/{lib/app/nodes.d.ts → dist/cjs/main/app/nodes/index.d.ts} +15 -7
  6. package/dist/cjs/main/app/nodes/maintainer.d.ts +28 -0
  7. package/{cjs → dist/cjs/main}/app/observer/iframe_observer.d.ts +1 -1
  8. package/{lib → dist/cjs/main}/app/observer/iframe_offsets.d.ts +1 -1
  9. package/{lib → dist/cjs/main}/app/observer/observer.d.ts +6 -0
  10. package/{lib → dist/cjs/main}/app/observer/top_observer.d.ts +6 -2
  11. package/{cjs → dist/cjs/main}/app/sanitizer.d.ts +5 -2
  12. package/{cjs → dist/cjs/main}/app/session.d.ts +6 -3
  13. package/{lib → dist/cjs/main}/index.d.ts +2 -2
  14. package/{lib → dist/cjs/main}/modules/attributeSender.d.ts +5 -2
  15. package/{cjs → dist/cjs/main}/modules/conditionsManager.d.ts +1 -1
  16. package/{cjs → dist/cjs/main}/modules/tagWatcher.d.ts +8 -4
  17. package/{lib → dist/cjs/main}/modules/userTesting/SignalManager.d.ts +2 -2
  18. package/{lib → dist/cjs/main}/utils.d.ts +4 -3
  19. package/dist/lib/index.js +9323 -0
  20. package/dist/lib/index.js.map +1 -0
  21. package/{lib → dist/lib/main}/app/index.d.ts +38 -6
  22. package/{cjs → dist/lib/main}/app/messages.gen.d.ts +2 -2
  23. package/{cjs/app/nodes.d.ts → dist/lib/main/app/nodes/index.d.ts} +15 -7
  24. package/dist/lib/main/app/nodes/maintainer.d.ts +28 -0
  25. package/{lib → dist/lib/main}/app/observer/iframe_observer.d.ts +1 -1
  26. package/{cjs → dist/lib/main}/app/observer/iframe_offsets.d.ts +1 -1
  27. package/{cjs → dist/lib/main}/app/observer/observer.d.ts +6 -0
  28. package/{cjs → dist/lib/main}/app/observer/top_observer.d.ts +6 -2
  29. package/{lib → dist/lib/main}/app/sanitizer.d.ts +5 -2
  30. package/{lib → dist/lib/main}/app/session.d.ts +6 -3
  31. package/{cjs → dist/lib/main}/index.d.ts +2 -2
  32. package/{cjs → dist/lib/main}/modules/attributeSender.d.ts +5 -2
  33. package/{lib → dist/lib/main}/modules/conditionsManager.d.ts +1 -1
  34. package/{lib → dist/lib/main}/modules/tagWatcher.d.ts +8 -4
  35. package/{cjs → dist/lib/main}/modules/userTesting/SignalManager.d.ts +2 -2
  36. package/{cjs → dist/lib/main}/utils.d.ts +4 -3
  37. package/package.json +29 -10
  38. package/.eslintignore +0 -11
  39. package/.nvmrc +0 -1
  40. package/.prettierignore +0 -1
  41. package/CHANGELOG.md +0 -297
  42. package/bun.lockb +0 -0
  43. package/cjs/app/canvas.js +0 -204
  44. package/cjs/app/guards.js +0 -37
  45. package/cjs/app/index.js +0 -1366
  46. package/cjs/app/logger.js +0 -37
  47. package/cjs/app/messages.gen.js +0 -702
  48. package/cjs/app/nodes.js +0 -110
  49. package/cjs/app/observer/iframe_observer.js +0 -35
  50. package/cjs/app/observer/iframe_offsets.js +0 -56
  51. package/cjs/app/observer/observer.js +0 -352
  52. package/cjs/app/observer/shadow_root_observer.js +0 -24
  53. package/cjs/app/observer/top_observer.js +0 -134
  54. package/cjs/app/sanitizer.js +0 -82
  55. package/cjs/app/session.js +0 -140
  56. package/cjs/app/ticker.js +0 -48
  57. package/cjs/common/interaction.js +0 -2
  58. package/cjs/common/messages.gen.js +0 -4
  59. package/cjs/modules/attributeSender.js +0 -51
  60. package/cjs/modules/axiosSpy.js +0 -122
  61. package/cjs/modules/conditionsManager.js +0 -343
  62. package/cjs/modules/connection.js +0 -15
  63. package/cjs/modules/console.js +0 -127
  64. package/cjs/modules/constructedStyleSheets.js +0 -138
  65. package/cjs/modules/cssrules.js +0 -99
  66. package/cjs/modules/exception.js +0 -85
  67. package/cjs/modules/featureFlags.js +0 -89
  68. package/cjs/modules/focus.js +0 -45
  69. package/cjs/modules/fonts.js +0 -57
  70. package/cjs/modules/img.js +0 -110
  71. package/cjs/modules/input.js +0 -203
  72. package/cjs/modules/mouse.js +0 -195
  73. package/cjs/modules/network.js +0 -244
  74. package/cjs/modules/performance.js +0 -53
  75. package/cjs/modules/scroll.js +0 -84
  76. package/cjs/modules/selection.js +0 -37
  77. package/cjs/modules/tabs.js +0 -13
  78. package/cjs/modules/tagWatcher.js +0 -76
  79. package/cjs/modules/timing.js +0 -173
  80. package/cjs/modules/userTesting/SignalManager.js +0 -83
  81. package/cjs/modules/userTesting/dnd.js +0 -40
  82. package/cjs/modules/userTesting/index.js +0 -464
  83. package/cjs/modules/userTesting/recorder.js +0 -101
  84. package/cjs/modules/userTesting/styles.js +0 -266
  85. package/cjs/modules/userTesting/utils.js +0 -87
  86. package/cjs/modules/viewport.js +0 -43
  87. package/cjs/package.json +0 -1
  88. package/cjs/utils.js +0 -230
  89. package/coverage/clover.xml +0 -4304
  90. package/coverage/coverage-final.json +0 -55
  91. package/coverage/lcov-report/base.css +0 -224
  92. package/coverage/lcov-report/block-navigation.js +0 -87
  93. package/coverage/lcov-report/favicon.png +0 -0
  94. package/coverage/lcov-report/index.html +0 -206
  95. package/coverage/lcov-report/main/app/canvas.ts.html +0 -712
  96. package/coverage/lcov-report/main/app/guards.ts.html +0 -232
  97. package/coverage/lcov-report/main/app/index.html +0 -236
  98. package/coverage/lcov-report/main/app/index.ts.html +0 -3955
  99. package/coverage/lcov-report/main/app/logger.ts.html +0 -211
  100. package/coverage/lcov-report/main/app/messages.gen.ts.html +0 -3034
  101. package/coverage/lcov-report/main/app/nodes.ts.html +0 -406
  102. package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +0 -148
  103. package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +0 -289
  104. package/coverage/lcov-report/main/app/observer/index.html +0 -161
  105. package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +0 -142
  106. package/coverage/lcov-report/main/app/observer/top_observer.ts.html +0 -541
  107. package/coverage/lcov-report/main/app/sanitizer.ts.html +0 -403
  108. package/coverage/lcov-report/main/app/session.ts.html +0 -622
  109. package/coverage/lcov-report/main/app/ticker.ts.html +0 -250
  110. package/coverage/lcov-report/main/index.html +0 -131
  111. package/coverage/lcov-report/main/index.ts.html +0 -1597
  112. package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +0 -400
  113. package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +0 -1075
  114. package/coverage/lcov-report/main/modules/Network/index.html +0 -191
  115. package/coverage/lcov-report/main/modules/Network/index.ts.html +0 -244
  116. package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +0 -400
  117. package/coverage/lcov-report/main/modules/Network/utils.ts.html +0 -709
  118. package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +0 -877
  119. package/coverage/lcov-report/main/modules/attributeSender.ts.html +0 -241
  120. package/coverage/lcov-report/main/modules/axiosSpy.ts.html +0 -709
  121. package/coverage/lcov-report/main/modules/conditionsManager.ts.html +0 -1381
  122. package/coverage/lcov-report/main/modules/connection.ts.html +0 -160
  123. package/coverage/lcov-report/main/modules/console.ts.html +0 -541
  124. package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +0 -571
  125. package/coverage/lcov-report/main/modules/cssrules.ts.html +0 -418
  126. package/coverage/lcov-report/main/modules/exception.ts.html +0 -385
  127. package/coverage/lcov-report/main/modules/featureFlags.ts.html +0 -415
  128. package/coverage/lcov-report/main/modules/focus.ts.html +0 -220
  129. package/coverage/lcov-report/main/modules/fonts.ts.html +0 -289
  130. package/coverage/lcov-report/main/modules/img.ts.html +0 -436
  131. package/coverage/lcov-report/main/modules/index.html +0 -431
  132. package/coverage/lcov-report/main/modules/input.ts.html +0 -826
  133. package/coverage/lcov-report/main/modules/mouse.ts.html +0 -826
  134. package/coverage/lcov-report/main/modules/network.ts.html +0 -1123
  135. package/coverage/lcov-report/main/modules/performance.ts.html +0 -367
  136. package/coverage/lcov-report/main/modules/scroll.ts.html +0 -364
  137. package/coverage/lcov-report/main/modules/selection.ts.html +0 -202
  138. package/coverage/lcov-report/main/modules/tabs.ts.html +0 -124
  139. package/coverage/lcov-report/main/modules/tagWatcher.ts.html +0 -337
  140. package/coverage/lcov-report/main/modules/timing.ts.html +0 -877
  141. package/coverage/lcov-report/main/modules/userTesting/SignalManager.ts.html +0 -370
  142. package/coverage/lcov-report/main/modules/userTesting/dnd.ts.html +0 -220
  143. package/coverage/lcov-report/main/modules/userTesting/index.html +0 -191
  144. package/coverage/lcov-report/main/modules/userTesting/index.ts.html +0 -1909
  145. package/coverage/lcov-report/main/modules/userTesting/recorder.ts.html +0 -430
  146. package/coverage/lcov-report/main/modules/userTesting/styles.ts.html +0 -937
  147. package/coverage/lcov-report/main/modules/userTesting/utils.ts.html +0 -364
  148. package/coverage/lcov-report/main/modules/viewport.ts.html +0 -250
  149. package/coverage/lcov-report/main/utils.ts.html +0 -814
  150. package/coverage/lcov-report/prettify.css +0 -1
  151. package/coverage/lcov-report/prettify.js +0 -2
  152. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  153. package/coverage/lcov-report/sorter.js +0 -196
  154. package/coverage/lcov-report/webworker/BatchWriter.ts.html +0 -499
  155. package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +0 -1021
  156. package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +0 -436
  157. package/coverage/lcov-report/webworker/QueueSender.ts.html +0 -547
  158. package/coverage/lcov-report/webworker/index.html +0 -176
  159. package/coverage/lcov-report/webworker/index.ts.html +0 -667
  160. package/coverage/lcov.info +0 -8425
  161. package/jest.config.js +0 -13
  162. package/lib/app/canvas.js +0 -202
  163. package/lib/app/guards.js +0 -26
  164. package/lib/app/index.js +0 -1336
  165. package/lib/app/logger.js +0 -33
  166. package/lib/app/messages.gen.js +0 -622
  167. package/lib/app/nodes.js +0 -107
  168. package/lib/app/observer/iframe_observer.js +0 -29
  169. package/lib/app/observer/iframe_offsets.js +0 -53
  170. package/lib/app/observer/observer.js +0 -349
  171. package/lib/app/observer/shadow_root_observer.js +0 -18
  172. package/lib/app/observer/top_observer.js +0 -128
  173. package/lib/app/sanitizer.js +0 -77
  174. package/lib/app/session.js +0 -137
  175. package/lib/app/ticker.js +0 -45
  176. package/lib/common/interaction.js +0 -1
  177. package/lib/common/messages.gen.js +0 -3
  178. package/lib/common/tsconfig.tsbuildinfo +0 -1
  179. package/lib/index.js +0 -423
  180. package/lib/modules/attributeSender.js +0 -46
  181. package/lib/modules/axiosSpy.js +0 -119
  182. package/lib/modules/conditionsManager.js +0 -340
  183. package/lib/modules/connection.js +0 -12
  184. package/lib/modules/console.js +0 -124
  185. package/lib/modules/constructedStyleSheets.js +0 -133
  186. package/lib/modules/cssrules.js +0 -97
  187. package/lib/modules/exception.js +0 -76
  188. package/lib/modules/featureFlags.js +0 -86
  189. package/lib/modules/focus.js +0 -42
  190. package/lib/modules/fonts.js +0 -54
  191. package/lib/modules/img.js +0 -107
  192. package/lib/modules/input.js +0 -198
  193. package/lib/modules/mouse.js +0 -192
  194. package/lib/modules/network.js +0 -238
  195. package/lib/modules/performance.js +0 -49
  196. package/lib/modules/scroll.js +0 -81
  197. package/lib/modules/selection.js +0 -35
  198. package/lib/modules/tabs.js +0 -10
  199. package/lib/modules/tagWatcher.js +0 -73
  200. package/lib/modules/timing.js +0 -170
  201. package/lib/modules/userTesting/SignalManager.js +0 -80
  202. package/lib/modules/userTesting/dnd.js +0 -37
  203. package/lib/modules/userTesting/index.js +0 -435
  204. package/lib/modules/userTesting/recorder.js +0 -97
  205. package/lib/modules/userTesting/styles.js +0 -263
  206. package/lib/modules/userTesting/utils.js +0 -79
  207. package/lib/modules/viewport.js +0 -40
  208. package/lib/utils.js +0 -211
  209. package/rollup.config.js +0 -12
  210. package/scripts/checkver.cjs +0 -7
  211. package/tsconfig-base.json +0 -16
  212. /package/{cjs → dist/cjs}/common/interaction.d.ts +0 -0
  213. /package/{cjs → dist/cjs}/common/messages.gen.d.ts +0 -0
  214. /package/{cjs → dist/cjs/main}/app/canvas.d.ts +0 -0
  215. /package/{cjs → dist/cjs/main}/app/guards.d.ts +0 -0
  216. /package/{cjs → dist/cjs/main}/app/logger.d.ts +0 -0
  217. /package/{cjs → dist/cjs/main}/app/observer/shadow_root_observer.d.ts +0 -0
  218. /package/{cjs → dist/cjs/main}/app/ticker.d.ts +0 -0
  219. /package/{cjs → dist/cjs/main}/modules/axiosSpy.d.ts +0 -0
  220. /package/{cjs → dist/cjs/main}/modules/connection.d.ts +0 -0
  221. /package/{cjs → dist/cjs/main}/modules/console.d.ts +0 -0
  222. /package/{cjs → dist/cjs/main}/modules/constructedStyleSheets.d.ts +0 -0
  223. /package/{cjs → dist/cjs/main}/modules/cssrules.d.ts +0 -0
  224. /package/{cjs → dist/cjs/main}/modules/exception.d.ts +0 -0
  225. /package/{cjs → dist/cjs/main}/modules/featureFlags.d.ts +0 -0
  226. /package/{cjs → dist/cjs/main}/modules/focus.d.ts +0 -0
  227. /package/{cjs → dist/cjs/main}/modules/fonts.d.ts +0 -0
  228. /package/{cjs → dist/cjs/main}/modules/img.d.ts +0 -0
  229. /package/{cjs → dist/cjs/main}/modules/input.d.ts +0 -0
  230. /package/{cjs → dist/cjs/main}/modules/mouse.d.ts +0 -0
  231. /package/{cjs → dist/cjs/main}/modules/network.d.ts +0 -0
  232. /package/{cjs → dist/cjs/main}/modules/performance.d.ts +0 -0
  233. /package/{cjs → dist/cjs/main}/modules/scroll.d.ts +0 -0
  234. /package/{cjs → dist/cjs/main}/modules/selection.d.ts +0 -0
  235. /package/{cjs → dist/cjs/main}/modules/tabs.d.ts +0 -0
  236. /package/{cjs → dist/cjs/main}/modules/timing.d.ts +0 -0
  237. /package/{cjs → dist/cjs/main}/modules/userTesting/dnd.d.ts +0 -0
  238. /package/{cjs → dist/cjs/main}/modules/userTesting/index.d.ts +0 -0
  239. /package/{cjs → dist/cjs/main}/modules/userTesting/recorder.d.ts +0 -0
  240. /package/{cjs → dist/cjs/main}/modules/userTesting/styles.d.ts +0 -0
  241. /package/{cjs → dist/cjs/main}/modules/userTesting/utils.d.ts +0 -0
  242. /package/{cjs → dist/cjs/main}/modules/viewport.d.ts +0 -0
  243. /package/{lib → dist/lib}/common/interaction.d.ts +0 -0
  244. /package/{lib → dist/lib}/common/messages.gen.d.ts +0 -0
  245. /package/{lib → dist/lib/main}/app/canvas.d.ts +0 -0
  246. /package/{lib → dist/lib/main}/app/guards.d.ts +0 -0
  247. /package/{lib → dist/lib/main}/app/logger.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,211 +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) {
109
- const mObserver = ngSafeBrowserMethod('MutationObserver');
110
- return new window[mObserver](cb);
111
- }
112
- export function createEventListener(target, event, cb, capture) {
113
- const safeAddEventListener = ngSafeBrowserMethod('addEventListener');
114
- try {
115
- target[safeAddEventListener](event, cb, capture);
116
- }
117
- catch (e) {
118
- const msg = e.message;
119
- console.error(
120
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
121
- `Openreplay: ${msg}; if this error is caused by an IframeObserver, ignore it`, event);
122
- }
123
- }
124
- export function deleteEventListener(target, event, cb, capture) {
125
- const safeRemoveEventListener = ngSafeBrowserMethod('removeEventListener');
126
- try {
127
- target[safeRemoveEventListener](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);
134
- }
135
- }
136
- class FIFOTaskScheduler {
137
- constructor() {
138
- this.taskQueue = [];
139
- this.isRunning = false;
140
- }
141
- // Adds a task to the queue
142
- addTask(task) {
143
- this.taskQueue.push(task);
144
- this.runTasks();
145
- }
146
- // Runs tasks from the queue
147
- runTasks() {
148
- if (this.isRunning || this.taskQueue.length === 0) {
149
- return;
150
- }
151
- this.isRunning = true;
152
- const executeNextTask = () => {
153
- if (this.taskQueue.length === 0) {
154
- this.isRunning = false;
155
- return;
156
- }
157
- // Get the next task and execute it
158
- const nextTask = this.taskQueue.shift();
159
- Promise.resolve(nextTask()).then(() => {
160
- requestAnimationFrame(() => executeNextTask());
161
- });
162
- };
163
- executeNextTask();
164
- }
165
- }
166
- const scheduler = new FIFOTaskScheduler();
167
- export function requestIdleCb(callback) {
168
- // performance improvement experiment;
169
- scheduler.addTask(callback);
170
- /**
171
- * This is a brief polyfill that suits our needs
172
- * I took inspiration from Microsoft Clarity polyfill on this one
173
- * then adapted it a little bit
174
- *
175
- * I'm very grateful for their bright idea
176
- * */
177
- // const taskTimeout = 3000
178
- // if (window.requestIdleCallback) {
179
- // return window.requestIdleCallback(callback, { timeout: taskTimeout })
180
- // } else {
181
- // const channel = new MessageChannel()
182
- // const incoming = channel.port1
183
- // const outgoing = channel.port2
184
- //
185
- // incoming.onmessage = (): void => {
186
- // callback()
187
- // }
188
- // requestAnimationFrame((): void => {
189
- // outgoing.postMessage(1)
190
- // })
191
- // }
192
- }
193
- export function simpleMerge(defaultObj, givenObj) {
194
- const result = { ...defaultObj };
195
- for (const key in givenObj) {
196
- // eslint-disable-next-line no-prototype-builtins
197
- if (givenObj.hasOwnProperty(key)) {
198
- const userOptionValue = givenObj[key];
199
- const defaultOptionValue = defaultObj[key];
200
- if (typeof userOptionValue === 'object' &&
201
- !Array.isArray(userOptionValue) &&
202
- userOptionValue !== null) {
203
- result[key] = simpleMerge(defaultOptionValue || {}, userOptionValue);
204
- }
205
- else {
206
- result[key] = userOptionValue;
207
- }
208
- }
209
- }
210
- return result;
211
- }
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes