@atlaskit/editor-core 150.0.0 → 150.0.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 +6 -0
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 150.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`52aed763767`](https://bitbucket.org/atlassian/atlassian-frontend/commits/52aed763767) - [ED-13879] deletes a placeholder text node when opening a typeahead
|
|
8
|
+
|
|
3
9
|
## 150.0.0
|
|
4
10
|
|
|
5
11
|
### Major Changes
|
|
@@ -25,9 +25,26 @@ var openTypeAheadAtCursor = function openTypeAheadAtCursor(_ref) {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
var selection = tr.selection;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
|
|
29
|
+
if (!(selection instanceof _prosemirrorState.TextSelection)) {
|
|
30
|
+
return tr;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (!selection.$cursor) {
|
|
34
|
+
tr.deleteSelection();
|
|
35
|
+
return tr;
|
|
36
|
+
} // Search & Destroy placeholder
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
var cursorPos = selection.$cursor.pos;
|
|
40
|
+
var nodeAtCursor = tr.doc.nodeAt(cursorPos);
|
|
41
|
+
var isPlaceholderAtCursorPosition = nodeAtCursor && nodeAtCursor.type.name === 'placeholder';
|
|
42
|
+
|
|
43
|
+
if (nodeAtCursor && isPlaceholderAtCursorPosition) {
|
|
44
|
+
tr.delete(cursorPos, cursorPos + nodeAtCursor.nodeSize);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return tr;
|
|
31
48
|
};
|
|
32
49
|
};
|
|
33
50
|
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.nextMajorVersion = exports.version = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "150.0.
|
|
9
|
+
var version = "150.0.1";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -17,7 +17,24 @@ export const openTypeAheadAtCursor = ({
|
|
|
17
17
|
const {
|
|
18
18
|
selection
|
|
19
19
|
} = tr;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
|
|
21
|
+
if (!(selection instanceof TextSelection)) {
|
|
22
|
+
return tr;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (!selection.$cursor) {
|
|
26
|
+
tr.deleteSelection();
|
|
27
|
+
return tr;
|
|
28
|
+
} // Search & Destroy placeholder
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
const cursorPos = selection.$cursor.pos;
|
|
32
|
+
const nodeAtCursor = tr.doc.nodeAt(cursorPos);
|
|
33
|
+
const isPlaceholderAtCursorPosition = nodeAtCursor && nodeAtCursor.type.name === 'placeholder';
|
|
34
|
+
|
|
35
|
+
if (nodeAtCursor && isPlaceholderAtCursorPosition) {
|
|
36
|
+
tr.delete(cursorPos, cursorPos + nodeAtCursor.nodeSize);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return tr;
|
|
23
40
|
};
|
package/dist/es2019/version.json
CHANGED
|
@@ -15,8 +15,25 @@ export var openTypeAheadAtCursor = function openTypeAheadAtCursor(_ref) {
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
var selection = tr.selection;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
|
|
19
|
+
if (!(selection instanceof TextSelection)) {
|
|
20
|
+
return tr;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!selection.$cursor) {
|
|
24
|
+
tr.deleteSelection();
|
|
25
|
+
return tr;
|
|
26
|
+
} // Search & Destroy placeholder
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var cursorPos = selection.$cursor.pos;
|
|
30
|
+
var nodeAtCursor = tr.doc.nodeAt(cursorPos);
|
|
31
|
+
var isPlaceholderAtCursorPosition = nodeAtCursor && nodeAtCursor.type.name === 'placeholder';
|
|
32
|
+
|
|
33
|
+
if (nodeAtCursor && isPlaceholderAtCursorPosition) {
|
|
34
|
+
tr.delete(cursorPos, cursorPos + nodeAtCursor.nodeSize);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return tr;
|
|
21
38
|
};
|
|
22
39
|
};
|
package/dist/esm/version.json
CHANGED