@atlaskit/editor-plugin-interactivity 1.2.0 → 1.2.1
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/CHANGELOG.md +9 -0
- package/dist/cjs/collector/interaction-events.js +4 -0
- package/dist/cjs/collector/interactivity-collector.js +5 -0
- package/dist/es2019/collector/interaction-events.js +4 -0
- package/dist/es2019/collector/interactivity-collector.js +5 -0
- package/dist/esm/collector/interaction-events.js +4 -0
- package/dist/esm/collector/interactivity-collector.js +5 -0
- package/package.json +2 -38
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-interactivity
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f1f320e43a22e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1f320e43a22e) -
|
|
8
|
+
Ignore untrusted events in the `editor interactivity` collector, so events a script dispatched are
|
|
9
|
+
no longer counted as interactions with the editor.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 1.2.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -18,6 +18,10 @@ exports.interactionEventKind = interactionEventKind;
|
|
|
18
18
|
* every repeat of a held key, and nothing cancels a key press. Pointing is counted on `pointerup`,
|
|
19
19
|
* since a press cannot repeat but can be taken over by a scroll — which the browser does not count
|
|
20
20
|
* either, and in that case `pointerup` never arrives.
|
|
21
|
+
*
|
|
22
|
+
* Counting events is also why an editor group's `totalCount` is not comparable with `page`'s, which
|
|
23
|
+
* is told `performance.interactionCount`: when an event is counted the collector cannot know whether
|
|
24
|
+
* the browser will open an interaction for it.
|
|
21
25
|
*/
|
|
22
26
|
var INTERACTION_EVENTS = {
|
|
23
27
|
keydown: {
|
|
@@ -256,6 +256,11 @@ var InteractivityCollector = exports.InteractivityCollector = /*#__PURE__*/funct
|
|
|
256
256
|
if (this.stopped) {
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
|
+
|
|
260
|
+
// An event a script dispatched is no interaction: the browser counts none of them either.
|
|
261
|
+
if (!event.isTrusted) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
259
264
|
var group = this.session.tracker.recordEditorEvent(event);
|
|
260
265
|
if (!group) {
|
|
261
266
|
return;
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
* every repeat of a held key, and nothing cancels a key press. Pointing is counted on `pointerup`,
|
|
12
12
|
* since a press cannot repeat but can be taken over by a scroll — which the browser does not count
|
|
13
13
|
* either, and in that case `pointerup` never arrives.
|
|
14
|
+
*
|
|
15
|
+
* Counting events is also why an editor group's `totalCount` is not comparable with `page`'s, which
|
|
16
|
+
* is told `performance.interactionCount`: when an event is counted the collector cannot know whether
|
|
17
|
+
* the browser will open an interaction for it.
|
|
14
18
|
*/
|
|
15
19
|
const INTERACTION_EVENTS = {
|
|
16
20
|
keydown: {
|
|
@@ -198,6 +198,11 @@ export class InteractivityCollector {
|
|
|
198
198
|
if (this.stopped) {
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
|
+
|
|
202
|
+
// An event a script dispatched is no interaction: the browser counts none of them either.
|
|
203
|
+
if (!event.isTrusted) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
201
206
|
const group = this.session.tracker.recordEditorEvent(event);
|
|
202
207
|
if (!group) {
|
|
203
208
|
return;
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
* every repeat of a held key, and nothing cancels a key press. Pointing is counted on `pointerup`,
|
|
12
12
|
* since a press cannot repeat but can be taken over by a scroll — which the browser does not count
|
|
13
13
|
* either, and in that case `pointerup` never arrives.
|
|
14
|
+
*
|
|
15
|
+
* Counting events is also why an editor group's `totalCount` is not comparable with `page`'s, which
|
|
16
|
+
* is told `performance.interactionCount`: when an event is counted the collector cannot know whether
|
|
17
|
+
* the browser will open an interaction for it.
|
|
14
18
|
*/
|
|
15
19
|
var INTERACTION_EVENTS = {
|
|
16
20
|
keydown: {
|
|
@@ -249,6 +249,11 @@ export var InteractivityCollector = /*#__PURE__*/function () {
|
|
|
249
249
|
if (this.stopped) {
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
|
+
|
|
253
|
+
// An event a script dispatched is no interaction: the browser counts none of them either.
|
|
254
|
+
if (!event.isTrusted) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
252
257
|
var group = this.session.tracker.recordEditorEvent(event);
|
|
253
258
|
if (!group) {
|
|
254
259
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-interactivity",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Interactivity plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,47 +28,11 @@
|
|
|
28
28
|
"bind-event-listener": "^3.0.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@atlaskit/editor-common": "^120.
|
|
31
|
+
"@atlaskit/editor-common": "^120.11.0",
|
|
32
32
|
"react": "^18.2.0 || ^19.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"react": "^19.2.0",
|
|
36
36
|
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
37
|
-
},
|
|
38
|
-
"techstack": {
|
|
39
|
-
"@atlassian/frontend": {
|
|
40
|
-
"code-structure": [
|
|
41
|
-
"editor-plugin"
|
|
42
|
-
],
|
|
43
|
-
"import-structure": [
|
|
44
|
-
"atlassian-conventions"
|
|
45
|
-
],
|
|
46
|
-
"circular-dependencies": [
|
|
47
|
-
"file-and-folder-level"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"@repo/internal": {
|
|
51
|
-
"dom-events": "use-bind-event-listener",
|
|
52
|
-
"analytics": [
|
|
53
|
-
"analytics-next"
|
|
54
|
-
],
|
|
55
|
-
"design-tokens": [
|
|
56
|
-
"color"
|
|
57
|
-
],
|
|
58
|
-
"theming": [
|
|
59
|
-
"react-context"
|
|
60
|
-
],
|
|
61
|
-
"ui-components": [
|
|
62
|
-
"lite-mode"
|
|
63
|
-
],
|
|
64
|
-
"deprecation": "no-deprecated-imports",
|
|
65
|
-
"styling": [
|
|
66
|
-
"emotion",
|
|
67
|
-
"emotion"
|
|
68
|
-
],
|
|
69
|
-
"imports": [
|
|
70
|
-
"import-no-extraneous-disable-for-examples-and-docs"
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
37
|
}
|
|
74
38
|
}
|