@atlaskit/editor-plugin-block-controls 1.4.19 → 1.4.20

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,14 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 1.4.20
4
+
5
+ ### Patch Changes
6
+
7
+ - [#111514](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111514)
8
+ [`a1b90bef5f34b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1b90bef5f34b) -
9
+ [ux] Revert: Fix cursor and handle position when changing node type
10
+ - Updated dependencies
11
+
3
12
  ## 1.4.19
4
13
 
5
14
  ### Patch Changes
@@ -112,14 +112,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api) {
112
112
  var mouseWrapperDecs = (0, _decorations.mouseMoveWrapperDecorations)(newState, api);
113
113
  decorations = decorations.add(newState.doc, [].concat((0, _toConsumableArray2.default)(nodeDecs), (0, _toConsumableArray2.default)(mouseWrapperDecs)));
114
114
  if (activeNode) {
115
- var newActiveNode = activeNode && tr.doc.nodeAt(activeNode.pos);
116
- var nodeType = activeNode.nodeType;
117
- var anchorName = activeNode.anchorName;
118
- if (newActiveNode && (newActiveNode === null || newActiveNode === void 0 ? void 0 : newActiveNode.type.name) !== activeNode.nodeType && !(meta !== null && meta !== void 0 && meta.nodeMoved)) {
119
- nodeType = newActiveNode.type.name;
120
- anchorName = activeNode.anchorName.replace(activeNode.nodeType, nodeType);
121
- }
122
- var draghandleDec = (0, _decorations.dragHandleDecoration)(activeNode.pos, anchorName, nodeType, api);
115
+ var draghandleDec = (0, _decorations.dragHandleDecoration)(activeNode.pos, activeNode.anchorName, activeNode.nodeType, api);
123
116
  decorations = decorations.add(newState.doc, [draghandleDec]);
124
117
  }
125
118
  }
@@ -107,14 +107,7 @@ export const createPlugin = api => {
107
107
  const mouseWrapperDecs = mouseMoveWrapperDecorations(newState, api);
108
108
  decorations = decorations.add(newState.doc, [...nodeDecs, ...mouseWrapperDecs]);
109
109
  if (activeNode) {
110
- const newActiveNode = activeNode && tr.doc.nodeAt(activeNode.pos);
111
- let nodeType = activeNode.nodeType;
112
- let anchorName = activeNode.anchorName;
113
- if (newActiveNode && (newActiveNode === null || newActiveNode === void 0 ? void 0 : newActiveNode.type.name) !== activeNode.nodeType && !(meta !== null && meta !== void 0 && meta.nodeMoved)) {
114
- nodeType = newActiveNode.type.name;
115
- anchorName = activeNode.anchorName.replace(activeNode.nodeType, nodeType);
116
- }
117
- const draghandleDec = dragHandleDecoration(activeNode.pos, anchorName, nodeType, api);
110
+ const draghandleDec = dragHandleDecoration(activeNode.pos, activeNode.anchorName, activeNode.nodeType, api);
118
111
  decorations = decorations.add(newState.doc, [draghandleDec]);
119
112
  }
120
113
  }
@@ -105,14 +105,7 @@ export var createPlugin = function createPlugin(api) {
105
105
  var mouseWrapperDecs = mouseMoveWrapperDecorations(newState, api);
106
106
  decorations = decorations.add(newState.doc, [].concat(_toConsumableArray(nodeDecs), _toConsumableArray(mouseWrapperDecs)));
107
107
  if (activeNode) {
108
- var newActiveNode = activeNode && tr.doc.nodeAt(activeNode.pos);
109
- var nodeType = activeNode.nodeType;
110
- var anchorName = activeNode.anchorName;
111
- if (newActiveNode && (newActiveNode === null || newActiveNode === void 0 ? void 0 : newActiveNode.type.name) !== activeNode.nodeType && !(meta !== null && meta !== void 0 && meta.nodeMoved)) {
112
- nodeType = newActiveNode.type.name;
113
- anchorName = activeNode.anchorName.replace(activeNode.nodeType, nodeType);
114
- }
115
- var draghandleDec = dragHandleDecoration(activeNode.pos, anchorName, nodeType, api);
108
+ var draghandleDec = dragHandleDecoration(activeNode.pos, activeNode.anchorName, activeNode.nodeType, api);
116
109
  decorations = decorations.add(newState.doc, [draghandleDec]);
117
110
  }
118
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "1.4.19",
3
+ "version": "1.4.20",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -19,7 +19,10 @@
19
19
  "types": "dist/types/index.d.ts",
20
20
  "typesVersions": {
21
21
  ">=4.5 <4.9": {
22
- "*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
22
+ "*": [
23
+ "dist/types-ts4.5/*",
24
+ "dist/types-ts4.5/index.d.ts"
25
+ ]
23
26
  }
24
27
  },
25
28
  "sideEffects": false,
@@ -28,7 +31,7 @@
28
31
  ".": "./src/index.ts"
29
32
  },
30
33
  "dependencies": {
31
- "@atlaskit/editor-common": "^82.6.0",
34
+ "@atlaskit/editor-common": "^82.7.0",
32
35
  "@atlaskit/editor-plugin-analytics": "^1.2.3",
33
36
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.5",
34
37
  "@atlaskit/editor-plugin-feature-flags": "^1.1.0",
@@ -52,18 +55,37 @@
52
55
  },
53
56
  "techstack": {
54
57
  "@atlassian/frontend": {
55
- "import-structure": ["atlassian-conventions"],
56
- "circular-dependencies": ["file-and-folder-level"]
58
+ "import-structure": [
59
+ "atlassian-conventions"
60
+ ],
61
+ "circular-dependencies": [
62
+ "file-and-folder-level"
63
+ ]
57
64
  },
58
65
  "@repo/internal": {
59
66
  "dom-events": "use-bind-event-listener",
60
- "analytics": ["analytics-next"],
61
- "design-tokens": ["color"],
62
- "theming": ["react-context"],
63
- "ui-components": ["lite-mode"],
64
- "deprecation": ["no-deprecated-imports"],
65
- "styling": ["emotion", "compiled"],
66
- "imports": ["import-no-extraneous-disable-for-examples-and-docs"]
67
+ "analytics": [
68
+ "analytics-next"
69
+ ],
70
+ "design-tokens": [
71
+ "color"
72
+ ],
73
+ "theming": [
74
+ "react-context"
75
+ ],
76
+ "ui-components": [
77
+ "lite-mode"
78
+ ],
79
+ "deprecation": [
80
+ "no-deprecated-imports"
81
+ ],
82
+ "styling": [
83
+ "emotion",
84
+ "compiled"
85
+ ],
86
+ "imports": [
87
+ "import-no-extraneous-disable-for-examples-and-docs"
88
+ ]
67
89
  }
68
90
  },
69
91
  "platform-feature-flags": {