@atlaskit/editor-plugin-list 3.8.5 → 3.8.7
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 +17 -0
- package/dist/cjs/commands/index.js +1 -13
- package/dist/cjs/pm-plugins/input-rules/wrapping-join-rule.js +1 -4
- package/dist/es2019/commands/index.js +2 -14
- package/dist/es2019/pm-plugins/input-rules/wrapping-join-rule.js +2 -5
- package/dist/esm/commands/index.js +2 -14
- package/dist/esm/pm-plugins/input-rules/wrapping-join-rule.js +2 -5
- package/package.json +3 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 3.8.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#141728](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141728)
|
|
8
|
+
[`4de004a0f879d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4de004a0f879d) -
|
|
9
|
+
[ux] EDF-1388: Cleanup platform.editor.ordered-list-auto-join-improvements_mrlv5 and paths
|
|
10
|
+
|
|
11
|
+
## 3.8.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#139334](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139334)
|
|
16
|
+
[`30793649657c0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/30793649657c0) -
|
|
17
|
+
[HOT-111629] We had an incident where the last character disappears when hitting the enter key on
|
|
18
|
+
windows OS for Korean characters. Bumping to prosemirror-view@1.34.2 for the fix.
|
|
19
|
+
|
|
3
20
|
## 3.8.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -29,7 +29,6 @@ var _commands2 = require("@atlaskit/editor-prosemirror/commands");
|
|
|
29
29
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
30
30
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
31
31
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
32
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
33
32
|
var _conversions = require("../actions/conversions");
|
|
34
33
|
var _wrapAndJoinLists = require("../actions/wrap-and-join-lists");
|
|
35
34
|
var _transforms = require("../transforms");
|
|
@@ -331,18 +330,7 @@ var joinToPreviousListItem = function joinToPreviousListItem(state, dispatch) {
|
|
|
331
330
|
// as in, [list, p, list] => [list with p, list], and we want [joined list]
|
|
332
331
|
var $postCut = tr.doc.resolve(tr.mapping.map($cut.pos + $cut.nodeAfter.nodeSize));
|
|
333
332
|
if ($postCut.nodeBefore && $postCut.nodeAfter && $postCut.nodeBefore.type === $postCut.nodeAfter.type && [bulletList, orderedList].indexOf($postCut.nodeBefore.type) > -1) {
|
|
334
|
-
|
|
335
|
-
var secondList = $postCut.nodeAfter;
|
|
336
|
-
if ((0, _platformFeatureFlags.fg)('platform.editor.ordered-list-auto-join-improvements_mrlv5')) {
|
|
337
|
-
// If lists are ordered, only join if second list continues from the first
|
|
338
|
-
if (!(0, _utils.isOrderedList)(firstList) ||
|
|
339
|
-
// both lists have the same type so one check is sufficient
|
|
340
|
-
(0, _utils.isOrderedListContinuous)(firstList, secondList)) {
|
|
341
|
-
tr = tr.join($postCut.pos);
|
|
342
|
-
}
|
|
343
|
-
} else {
|
|
344
|
-
tr = tr.join($postCut.pos);
|
|
345
|
-
}
|
|
333
|
+
tr = tr.join($postCut.pos);
|
|
346
334
|
}
|
|
347
335
|
if (dispatch) {
|
|
348
336
|
var _tr$doc$resolve$nodeB;
|
|
@@ -8,7 +8,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
8
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
10
10
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
12
|
|
|
14
13
|
var createWrappingJoinRule = exports.createWrappingJoinRule = function createWrappingJoinRule(_ref) {
|
|
@@ -52,9 +51,7 @@ var createWrappingJoinRule = exports.createWrappingJoinRule = function createWra
|
|
|
52
51
|
}
|
|
53
52
|
var before = tr.doc.resolve(fixedStart - 1).nodeBefore;
|
|
54
53
|
if (before && before.type === nodeType && (0, _transform.canJoin)(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before, _analytics.JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST.JOINED_TO_LIST_ABOVE))) {
|
|
55
|
-
|
|
56
|
-
tr.join(fixedStart - 1);
|
|
57
|
-
}
|
|
54
|
+
tr.join(fixedStart - 1);
|
|
58
55
|
}
|
|
59
56
|
return tr;
|
|
60
57
|
};
|
|
@@ -3,12 +3,11 @@ import { findCutBefore } from '@atlaskit/editor-common/commands';
|
|
|
3
3
|
import { getCommonListAnalyticsAttributes, moveTargetIntoList } from '@atlaskit/editor-common/lists';
|
|
4
4
|
import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
5
5
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
6
|
-
import { filterCommand as filter, hasVisibleContent, isEmptySelectionAtStart
|
|
6
|
+
import { filterCommand as filter, hasVisibleContent, isEmptySelectionAtStart } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
8
8
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
10
10
|
import { findPositionOfNodeBefore, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import { convertListType } from '../actions/conversions';
|
|
13
12
|
import { wrapInListAndJoin } from '../actions/wrap-and-join-lists';
|
|
14
13
|
import { liftFollowingList, liftNodeSelectionList, liftTextSelectionList } from '../transforms';
|
|
@@ -313,18 +312,7 @@ const joinToPreviousListItem = (state, dispatch) => {
|
|
|
313
312
|
// as in, [list, p, list] => [list with p, list], and we want [joined list]
|
|
314
313
|
let $postCut = tr.doc.resolve(tr.mapping.map($cut.pos + $cut.nodeAfter.nodeSize));
|
|
315
314
|
if ($postCut.nodeBefore && $postCut.nodeAfter && $postCut.nodeBefore.type === $postCut.nodeAfter.type && [bulletList, orderedList].indexOf($postCut.nodeBefore.type) > -1) {
|
|
316
|
-
|
|
317
|
-
const secondList = $postCut.nodeAfter;
|
|
318
|
-
if (fg('platform.editor.ordered-list-auto-join-improvements_mrlv5')) {
|
|
319
|
-
// If lists are ordered, only join if second list continues from the first
|
|
320
|
-
if (!isOrderedList(firstList) ||
|
|
321
|
-
// both lists have the same type so one check is sufficient
|
|
322
|
-
isOrderedListContinuous(firstList, secondList)) {
|
|
323
|
-
tr = tr.join($postCut.pos);
|
|
324
|
-
}
|
|
325
|
-
} else {
|
|
326
|
-
tr = tr.join($postCut.pos);
|
|
327
|
-
}
|
|
315
|
+
tr = tr.join($postCut.pos);
|
|
328
316
|
}
|
|
329
317
|
if (dispatch) {
|
|
330
318
|
var _tr$doc$resolve$nodeB;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { createRule
|
|
2
|
+
import { createRule } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
|
|
7
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
7
|
|
|
@@ -48,9 +47,7 @@ export const createWrappingJoinRule = ({
|
|
|
48
47
|
}
|
|
49
48
|
const before = tr.doc.resolve(fixedStart - 1).nodeBefore;
|
|
50
49
|
if (before && before.type === nodeType && canJoin(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST.JOINED_TO_LIST_ABOVE))) {
|
|
51
|
-
|
|
52
|
-
tr.join(fixedStart - 1);
|
|
53
|
-
}
|
|
50
|
+
tr.join(fixedStart - 1);
|
|
54
51
|
}
|
|
55
52
|
return tr;
|
|
56
53
|
};
|
|
@@ -6,12 +6,11 @@ import { findCutBefore } from '@atlaskit/editor-common/commands';
|
|
|
6
6
|
import { getCommonListAnalyticsAttributes, moveTargetIntoList } from '@atlaskit/editor-common/lists';
|
|
7
7
|
import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
9
|
-
import { filterCommand as filter, hasVisibleContent, isEmptySelectionAtStart
|
|
9
|
+
import { filterCommand as filter, hasVisibleContent, isEmptySelectionAtStart } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
11
11
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
12
12
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
13
13
|
import { findPositionOfNodeBefore, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { convertListType } from '../actions/conversions';
|
|
16
15
|
import { wrapInListAndJoin } from '../actions/wrap-and-join-lists';
|
|
17
16
|
import { liftFollowingList, liftNodeSelectionList, liftTextSelectionList } from '../transforms';
|
|
@@ -312,18 +311,7 @@ var joinToPreviousListItem = function joinToPreviousListItem(state, dispatch) {
|
|
|
312
311
|
// as in, [list, p, list] => [list with p, list], and we want [joined list]
|
|
313
312
|
var $postCut = tr.doc.resolve(tr.mapping.map($cut.pos + $cut.nodeAfter.nodeSize));
|
|
314
313
|
if ($postCut.nodeBefore && $postCut.nodeAfter && $postCut.nodeBefore.type === $postCut.nodeAfter.type && [bulletList, orderedList].indexOf($postCut.nodeBefore.type) > -1) {
|
|
315
|
-
|
|
316
|
-
var secondList = $postCut.nodeAfter;
|
|
317
|
-
if (fg('platform.editor.ordered-list-auto-join-improvements_mrlv5')) {
|
|
318
|
-
// If lists are ordered, only join if second list continues from the first
|
|
319
|
-
if (!isOrderedList(firstList) ||
|
|
320
|
-
// both lists have the same type so one check is sufficient
|
|
321
|
-
isOrderedListContinuous(firstList, secondList)) {
|
|
322
|
-
tr = tr.join($postCut.pos);
|
|
323
|
-
}
|
|
324
|
-
} else {
|
|
325
|
-
tr = tr.join($postCut.pos);
|
|
326
|
-
}
|
|
314
|
+
tr = tr.join($postCut.pos);
|
|
327
315
|
}
|
|
328
316
|
if (dispatch) {
|
|
329
317
|
var _tr$doc$resolve$nodeB;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { createRule
|
|
2
|
+
import { createRule } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
|
|
7
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
7
|
|
|
@@ -47,9 +46,7 @@ export var createWrappingJoinRule = function createWrappingJoinRule(_ref) {
|
|
|
47
46
|
}
|
|
48
47
|
var before = tr.doc.resolve(fixedStart - 1).nodeBefore;
|
|
49
48
|
if (before && before.type === nodeType && canJoin(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST.JOINED_TO_LIST_ABOVE))) {
|
|
50
|
-
|
|
51
|
-
tr.join(fixedStart - 1);
|
|
52
|
-
}
|
|
49
|
+
tr.join(fixedStart - 1);
|
|
53
50
|
}
|
|
54
51
|
return tr;
|
|
55
52
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.7",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,11 +32,10 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^40.9.0",
|
|
35
|
-
"@atlaskit/editor-common": "^89.
|
|
35
|
+
"@atlaskit/editor-common": "^89.3.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
38
|
-
"@atlaskit/editor-prosemirror": "
|
|
39
|
-
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
38
|
+
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
40
39
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
|
41
40
|
"@babel/runtime": "^7.0.0"
|
|
42
41
|
},
|
|
@@ -84,10 +83,5 @@
|
|
|
84
83
|
"no-unused-dependencies": {
|
|
85
84
|
"checkDevDependencies": true
|
|
86
85
|
}
|
|
87
|
-
},
|
|
88
|
-
"platform-feature-flags": {
|
|
89
|
-
"platform.editor.ordered-list-auto-join-improvements_mrlv5": {
|
|
90
|
-
"type": "boolean"
|
|
91
|
-
}
|
|
92
86
|
}
|
|
93
87
|
}
|