@gemx-dev/clarity-visualize 3.5.1 → 3.5.3
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.
- package/.prettierignore +13 -0
- package/.prettierrc.json +9 -0
- package/CHANGELOG.md +12 -0
- package/README.md +1 -26
- package/package.json +10 -28
- package/src/interaction.ts +10 -10
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @gemx-dev/clarity-visualize
|
|
2
2
|
|
|
3
|
+
## 3.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5e9d540`](https://github.com/ducky0209/gemx-sdk/commit/5e9d5401afda160251a62c6e0116e91d63f08ab9) Thanks [@ducky0209](https://github.com/ducky0209)! - Update contend readme
|
|
8
|
+
|
|
9
|
+
## 3.5.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#31](https://github.com/ducky0209/gemx-sdk/pull/31) [`6fa4bcd`](https://github.com/ducky0209/gemx-sdk/commit/6fa4bcd7f83694df9b012d41fe6cc257fa74a37b) Thanks [@ducky0209](https://github.com/ducky0209)! - Update type and eslint
|
|
14
|
+
|
|
3
15
|
## 3.5.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,26 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Clarity is an open-source behavioral analytics library written in typescript, with two key goals: privacy & performance.
|
|
3
|
-
|
|
4
|
-
It helps you understand how users view and use your website across all modern devices and browsers. Understanding how users navigate, interact and browse your website can provide new insights about your users. Empathizing with your users and seeing where features fail or succeed can help improve your product, grow revenue and improve user retention.
|
|
5
|
-
|
|
6
|
-
This package takes the decoded data from [clarity-decode](https://github.com/microsoft/clarity/tree/master/packages/clarity-decode) and turns it into pixel-perfect session replay, exactly how the user saw it.
|
|
7
|
-
|
|
8
|
-
We encourage the community to join us in building the best behavioral analytics library, that puts privacy first and prioritizes performance.
|
|
9
|
-
|
|
10
|
-
## Examples
|
|
11
|
-
Here are some example sessions on popular websites visualized to demonstrate the telemetry captured:
|
|
12
|
-
1. CNN (Web)
|
|
13
|
-
</br><a href="https://thumbs.gfycat.com/AggressiveLankyAbyssiniangroundhornbill-size_restricted.gif"><img src="https://thumbs.gfycat.com/AggressiveLankyAbyssiniangroundhornbill-size_restricted.gif" title="Clarity - CNN Example"/></a>
|
|
14
|
-
|
|
15
|
-
2. Cook with Manali (Mobile)
|
|
16
|
-
</br><a href="https://thumbs.gfycat.com/CoolDependableAdamsstaghornedbeetle-size_restricted.gif"><img src="https://thumbs.gfycat.com/CoolDependableAdamsstaghornedbeetle-size_restricted.gif" title="Clarity - Cook With Manali Example"/></a>
|
|
17
|
-
|
|
18
|
-
## Privacy Notice
|
|
19
|
-
Clarity handles sensitive data with care. By default sensitive content on the page is masked before uploading to the server.
|
|
20
|
-
|
|
21
|
-
## Improving Clarity
|
|
22
|
-
If you haven't already done so, start contributing by following instructions **[here](https://github.com/microsoft/clarity/blob/master/CONTRIBUTING.md)**.
|
|
23
|
-
|
|
24
|
-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
25
|
-
|
|
26
|
-
Happy coding!
|
|
1
|
+
## GemX Heatmap Visualize — `@gemx-dev/clarity-visualize`
|
package/package.json
CHANGED
|
@@ -1,44 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gemx-dev/clarity-visualize",
|
|
3
|
-
"version": "3.5.
|
|
4
|
-
"description": "
|
|
5
|
-
"author": "Microsoft Corp.",
|
|
3
|
+
"version": "3.5.3",
|
|
4
|
+
"description": "GemX Heatmap Visualize (Clarity) fork",
|
|
6
5
|
"license": "MIT",
|
|
7
6
|
"main": "build/clarity.visualize.js",
|
|
8
7
|
"module": "build/clarity.visualize.module.js",
|
|
9
8
|
"unpkg": "build/clarity.visualize.min.js",
|
|
10
9
|
"types": "types/index.d.ts",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"clarity",
|
|
13
|
-
"Microsoft",
|
|
14
|
-
"interactions",
|
|
15
|
-
"cursor",
|
|
16
|
-
"pointer",
|
|
17
|
-
"instrumentation",
|
|
18
|
-
"analytics",
|
|
19
|
-
"visualization"
|
|
20
|
-
],
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "https://github.com/microsoft/clarity.git",
|
|
24
|
-
"directory": "packages/clarity-visualize"
|
|
25
|
-
},
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/Microsoft/clarity/issues"
|
|
28
|
-
},
|
|
29
10
|
"dependencies": {
|
|
30
11
|
"clarity-decode": "^0.8.38"
|
|
31
12
|
},
|
|
32
13
|
"devDependencies": {
|
|
33
|
-
"@rollup/plugin-commonjs": "
|
|
34
|
-
"@rollup/plugin-node-resolve": "
|
|
35
|
-
"@rollup/plugin-terser": "
|
|
36
|
-
"@rollup/plugin-typescript": "
|
|
37
|
-
"rollup-plugin-string-import": "
|
|
14
|
+
"@rollup/plugin-commonjs": "24.1.0",
|
|
15
|
+
"@rollup/plugin-node-resolve": "15.2.3",
|
|
16
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
17
|
+
"@rollup/plugin-typescript": "11.1.6",
|
|
18
|
+
"rollup-plugin-string-import": "1.2.6",
|
|
38
19
|
"del-cli": "^5.0.0",
|
|
39
20
|
"husky": "^8.0.0",
|
|
40
21
|
"lint-staged": "^13.1.0",
|
|
41
|
-
"rollup": "
|
|
22
|
+
"rollup": "3.29.5",
|
|
42
23
|
"ts-node": "^10.1.0",
|
|
43
24
|
"tslint": "^6.1.3",
|
|
44
25
|
"typescript": "^4.3.5"
|
|
@@ -48,7 +29,8 @@
|
|
|
48
29
|
"build:main": "rollup -c rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
49
30
|
"build:clean": "del-cli build/*",
|
|
50
31
|
"tslint": "tslint --project ./",
|
|
51
|
-
"tslint:fix": "tslint --fix --project ./ --force"
|
|
32
|
+
"tslint:fix": "tslint --fix --project ./ --force",
|
|
33
|
+
"format": "prettier --write \"**/*.{ts,json}\""
|
|
52
34
|
},
|
|
53
35
|
"husky": {
|
|
54
36
|
"hooks": {
|
package/src/interaction.ts
CHANGED
|
@@ -54,8 +54,8 @@ export class InteractionHelper {
|
|
|
54
54
|
|
|
55
55
|
// Position canvas relative to scroll events on the parent page
|
|
56
56
|
if (scrollTarget === de || scrollTarget === doc.body) {
|
|
57
|
-
if (!scrollable) {
|
|
58
|
-
this.state.window.scrollTo(data.x, data.y);
|
|
57
|
+
if (!scrollable) {
|
|
58
|
+
this.state.window.scrollTo(data.x, data.y);
|
|
59
59
|
}
|
|
60
60
|
let canvas = this.overlay();
|
|
61
61
|
if (canvas) {
|
|
@@ -189,11 +189,11 @@ export class InteractionHelper {
|
|
|
189
189
|
this.state.options.onclickMismatch({
|
|
190
190
|
time: event.time,
|
|
191
191
|
x: data.x,
|
|
192
|
-
y: data.y,
|
|
192
|
+
y: data.y,
|
|
193
193
|
nodeId: data.target as number});
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
|
|
197
197
|
p.className = Constant.PointerNone;
|
|
198
198
|
break;
|
|
199
199
|
case Data.Event.DoubleClick:
|
|
@@ -245,7 +245,7 @@ export class InteractionHelper {
|
|
|
245
245
|
this.fadeOutElement(click.click, click.doc);
|
|
246
246
|
this.visualizedClicks.splice(this.visualizedClicks.indexOf(click), 1);
|
|
247
247
|
});
|
|
248
|
-
}
|
|
248
|
+
}
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
private fadeOutElement = (element: HTMLElement, document: HTMLElement): void => {
|
|
@@ -310,7 +310,7 @@ export class InteractionHelper {
|
|
|
310
310
|
let de = doc.documentElement;
|
|
311
311
|
let click = doc.createElement("DIV");
|
|
312
312
|
click.className = Constant.ClickLayer;
|
|
313
|
-
|
|
313
|
+
|
|
314
314
|
click.setAttribute(Constant.Title, `${title} (${x}${Constant.Pixel}, ${y}${Constant.Pixel})`);
|
|
315
315
|
click.style.left = (x - Setting.ClickRadius / 2) + Constant.Pixel;
|
|
316
316
|
click.style.top = (y - Setting.ClickRadius / 2) + Constant.Pixel
|
|
@@ -328,18 +328,18 @@ export class InteractionHelper {
|
|
|
328
328
|
let center = doc.createElement("DIV");
|
|
329
329
|
center.className = `${Constant.ClickLayer}-center`;
|
|
330
330
|
click.appendChild(center);
|
|
331
|
-
} else {
|
|
331
|
+
} else {
|
|
332
332
|
// Second pulsating ring
|
|
333
333
|
let ringTwo = ringOne.cloneNode() as HTMLElement;
|
|
334
334
|
ringTwo.style.animation = "pulsate-two 1 1s";
|
|
335
335
|
click.appendChild(ringTwo);
|
|
336
336
|
}
|
|
337
337
|
de.appendChild(click);
|
|
338
|
-
|
|
338
|
+
|
|
339
339
|
// Play sound
|
|
340
340
|
if (typeof Audio !== Constant.Undefined) {
|
|
341
|
-
if (this.clickAudio === null) {
|
|
342
|
-
this.clickAudio = new Audio(Asset.Sound);
|
|
341
|
+
if (this.clickAudio === null) {
|
|
342
|
+
this.clickAudio = new Audio(Asset.Sound);
|
|
343
343
|
click.appendChild(this.clickAudio);
|
|
344
344
|
}
|
|
345
345
|
this.clickAudio.play();
|