@atlaskit/editor-plugin-selection 6.1.1 → 6.1.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/CHANGELOG.md +14 -0
- package/dist/cjs/editor-actions/index.js +2 -5
- package/dist/cjs/pm-plugins/utils.js +1 -1
- package/dist/es2019/editor-actions/index.js +2 -5
- package/dist/es2019/pm-plugins/utils.js +1 -1
- package/dist/esm/editor-actions/index.js +2 -5
- package/dist/esm/pm-plugins/utils.js +1 -1
- package/package.json +7 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 6.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 6.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`0aa25bbbbea0d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0aa25bbbbea0d) -
|
|
14
|
+
Cleaned platform_editor_fix_right_arrow_bug_list_in_layout FG
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.1.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
9
9
|
var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
|
|
10
10
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
11
11
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
14
13
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
14
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -65,10 +64,8 @@ var getSliceFromSelection = exports.getSliceFromSelection = function getSliceFro
|
|
|
65
64
|
selection instanceof _state.TextSelection && $from.parent.eq($to.parent) ? Math.max(0, $from.sharedDepth(_to) - 1) : $from.sharedDepth(_to);
|
|
66
65
|
var finalDepth = depth;
|
|
67
66
|
// For block-level lists (non-nested) specifically use the selection
|
|
68
|
-
if ((
|
|
69
|
-
|
|
70
|
-
finalDepth = $from.depth - listDepth;
|
|
71
|
-
}
|
|
67
|
+
if (selectionCoversAllListItems($from, $to)) {
|
|
68
|
+
finalDepth = $from.depth - listDepth;
|
|
72
69
|
}
|
|
73
70
|
var start = $from.start(finalDepth);
|
|
74
71
|
var node = $from.node(finalDepth);
|
|
@@ -270,7 +270,7 @@ var isSelectionAtEndOfParentNode = exports.isSelectionAtEndOfParentNode = functi
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
// Handle lists: if in a list inside container and not at the end, return false
|
|
273
|
-
if ((0, _utils2.hasParentNode)(_utils.isListItemNode)(selection) && isListItemWithinContainerNotAtEnd($pos, selection)
|
|
273
|
+
if ((0, _utils2.hasParentNode)(_utils.isListItemNode)(selection) && isListItemWithinContainerNotAtEnd($pos, selection)) {
|
|
274
274
|
return false;
|
|
275
275
|
}
|
|
276
276
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { nodeToJSON } from '@atlaskit/editor-json-transformer';
|
|
2
2
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
const listDepth = 3;
|
|
6
5
|
const selectionCoversAllListItems = ($from, $to) => {
|
|
7
6
|
// Block level lists
|
|
@@ -52,10 +51,8 @@ export const getSliceFromSelection = selection => {
|
|
|
52
51
|
selection instanceof TextSelection && $from.parent.eq($to.parent) ? Math.max(0, $from.sharedDepth(to) - 1) : $from.sharedDepth(to);
|
|
53
52
|
let finalDepth = depth;
|
|
54
53
|
// For block-level lists (non-nested) specifically use the selection
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
finalDepth = $from.depth - listDepth;
|
|
58
|
-
}
|
|
54
|
+
if (selectionCoversAllListItems($from, $to)) {
|
|
55
|
+
finalDepth = $from.depth - listDepth;
|
|
59
56
|
}
|
|
60
57
|
const start = $from.start(finalDepth);
|
|
61
58
|
const node = $from.node(finalDepth);
|
|
@@ -257,7 +257,7 @@ export const isSelectionAtEndOfParentNode = ($pos, selection) => {
|
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
// Handle lists: if in a list inside container and not at the end, return false
|
|
260
|
-
if (hasParentNode(isListItemNode)(selection) && isListItemWithinContainerNotAtEnd($pos, selection)
|
|
260
|
+
if (hasParentNode(isListItemNode)(selection) && isListItemWithinContainerNotAtEnd($pos, selection)) {
|
|
261
261
|
return false;
|
|
262
262
|
}
|
|
263
263
|
|
|
@@ -5,7 +5,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
5
5
|
import { nodeToJSON } from '@atlaskit/editor-json-transformer';
|
|
6
6
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
var listDepth = 3;
|
|
10
9
|
var selectionCoversAllListItems = function selectionCoversAllListItems($from, $to) {
|
|
11
10
|
// Block level lists
|
|
@@ -58,10 +57,8 @@ export var getSliceFromSelection = function getSliceFromSelection(selection) {
|
|
|
58
57
|
selection instanceof TextSelection && $from.parent.eq($to.parent) ? Math.max(0, $from.sharedDepth(_to) - 1) : $from.sharedDepth(_to);
|
|
59
58
|
var finalDepth = depth;
|
|
60
59
|
// For block-level lists (non-nested) specifically use the selection
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
finalDepth = $from.depth - listDepth;
|
|
64
|
-
}
|
|
60
|
+
if (selectionCoversAllListItems($from, $to)) {
|
|
61
|
+
finalDepth = $from.depth - listDepth;
|
|
65
62
|
}
|
|
66
63
|
var start = $from.start(finalDepth);
|
|
67
64
|
var node = $from.node(finalDepth);
|
|
@@ -262,7 +262,7 @@ export var isSelectionAtEndOfParentNode = function isSelectionAtEndOfParentNode(
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// Handle lists: if in a list inside container and not at the end, return false
|
|
265
|
-
if (hasParentNode(isListItemNode)(selection) && isListItemWithinContainerNotAtEnd($pos, selection)
|
|
265
|
+
if (hasParentNode(isListItemNode)(selection) && isListItemWithinContainerNotAtEnd($pos, selection)) {
|
|
266
266
|
return false;
|
|
267
267
|
}
|
|
268
268
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.3",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"singleton": true
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
23
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
22
|
+
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
23
|
+
"@atlaskit/editor-plugin-interaction": "^10.0.0",
|
|
24
24
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
25
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
25
|
+
"@atlaskit/editor-shared-styles": "^3.8.0",
|
|
26
26
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
28
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
29
|
-
"@atlaskit/tokens": "^
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^13.32.0",
|
|
29
|
+
"@atlaskit/tokens": "^8.0.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@atlaskit/editor-common": "^110.
|
|
33
|
+
"@atlaskit/editor-common": "^110.24.0",
|
|
34
34
|
"react": "^18.2.0"
|
|
35
35
|
},
|
|
36
36
|
"techstack": {
|
|
@@ -81,12 +81,6 @@
|
|
|
81
81
|
"platform_editor_nested_tables_gap_cursor": {
|
|
82
82
|
"type": "boolean"
|
|
83
83
|
},
|
|
84
|
-
"platform_editor_expand_selection_context": {
|
|
85
|
-
"type": "boolean"
|
|
86
|
-
},
|
|
87
|
-
"platform_editor_fix_right_arrow_bug_list_in_layout": {
|
|
88
|
-
"type": "boolean"
|
|
89
|
-
},
|
|
90
84
|
"platform_editor_fix_right_arrow_nav_bug_in_layout": {
|
|
91
85
|
"type": "boolean"
|
|
92
86
|
},
|