@atlaskit/editor-plugin-analytics 12.0.0 → 12.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-analytics
|
|
2
2
|
|
|
3
|
+
## 12.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`5331d96345ae9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5331d96345ae9) -
|
|
14
|
+
Clean up stale experiment platform_editor_insert_location_check
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 12.0.0
|
|
4
18
|
|
|
5
19
|
### Major Changes
|
|
@@ -10,7 +10,6 @@ var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
|
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
12
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
13
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
14
|
function getSelectionType(selection) {
|
|
16
15
|
var _selection$constructo;
|
|
@@ -57,10 +56,8 @@ function findInsertedLocation(oldSelection, newSelection, tr) {
|
|
|
57
56
|
return node.type !== paragraph;
|
|
58
57
|
})(oldSelection);
|
|
59
58
|
var pos = (insertLocationInfo === null || insertLocationInfo === void 0 ? void 0 : insertLocationInfo.start) || 0;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
pos = tr.mapping.map(pos);
|
|
63
|
-
}
|
|
59
|
+
// Map the old document position through the transaction's steps
|
|
60
|
+
pos = tr.mapping.map(pos);
|
|
64
61
|
var parentNodePos = newDoc.resolve(pos);
|
|
65
62
|
|
|
66
63
|
// Keep going one level above the attempted insert position till we find a node that contains the current cursor position in it's range
|
|
@@ -3,7 +3,6 @@ import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
7
|
export function getSelectionType(selection) {
|
|
9
8
|
var _selection$constructo;
|
|
@@ -55,10 +54,8 @@ function findInsertedLocation(oldSelection, newSelection, tr) {
|
|
|
55
54
|
const newDoc = newSelection.$from.doc;
|
|
56
55
|
const insertLocationInfo = findParentNode(node => node.type !== paragraph)(oldSelection);
|
|
57
56
|
let pos = (insertLocationInfo === null || insertLocationInfo === void 0 ? void 0 : insertLocationInfo.start) || 0;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
pos = tr.mapping.map(pos);
|
|
61
|
-
}
|
|
57
|
+
// Map the old document position through the transaction's steps
|
|
58
|
+
pos = tr.mapping.map(pos);
|
|
62
59
|
let parentNodePos = newDoc.resolve(pos);
|
|
63
60
|
|
|
64
61
|
// Keep going one level above the attempted insert position till we find a node that contains the current cursor position in it's range
|
|
@@ -3,7 +3,6 @@ import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { findParentNode, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
7
|
export function getSelectionType(selection) {
|
|
9
8
|
var _selection$constructo;
|
|
@@ -50,10 +49,8 @@ function findInsertedLocation(oldSelection, newSelection, tr) {
|
|
|
50
49
|
return node.type !== paragraph;
|
|
51
50
|
})(oldSelection);
|
|
52
51
|
var pos = (insertLocationInfo === null || insertLocationInfo === void 0 ? void 0 : insertLocationInfo.start) || 0;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
pos = tr.mapping.map(pos);
|
|
56
|
-
}
|
|
52
|
+
// Map the old document position through the transaction's steps
|
|
53
|
+
pos = tr.mapping.map(pos);
|
|
57
54
|
var parentNodePos = newDoc.resolve(pos);
|
|
58
55
|
|
|
59
56
|
// Keep going one level above the attempted insert position till we find a node that contains the current cursor position in it's range
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-analytics",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "Analytics plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
27
27
|
"@atlaskit/editor-tables": "^3.0.0",
|
|
28
28
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
29
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
29
|
+
"@atlaskit/tmp-editor-statsig": "^106.0.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@atlaskit/editor-common": "^116.
|
|
33
|
+
"@atlaskit/editor-common": "^116.2.0",
|
|
34
34
|
"react": "^18.2.0"
|
|
35
35
|
},
|
|
36
36
|
"techstack": {
|