@atlaskit/editor-plugin-panel 0.1.9 → 0.1.11

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,18 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 0.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#60802](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60802) [`3ef8131264ff`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3ef8131264ff) - ED-20963 Allow normal backspace behaviour for lists inside quote
8
+ - Updated dependencies
9
+
10
+ ## 0.1.10
11
+
12
+ ### Patch Changes
13
+
14
+ - [#60808](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60808) [`f509a21be124`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f509a21be124) - ED-21506: @atlaskit/adf-schema upgraded to 35.1.1 to support renderer for MBE
15
+
3
16
  ## 0.1.9
4
17
 
5
18
  ### Patch Changes
@@ -32,7 +32,9 @@ function keymapPlugin() {
32
32
  nodes = state.schema.nodes,
33
33
  tr = state.tr;
34
34
  var panel = nodes.panel,
35
- blockquote = nodes.blockquote;
35
+ blockquote = nodes.blockquote,
36
+ orderedList = nodes.orderedList,
37
+ bulletList = nodes.bulletList;
36
38
  var $from = selection.$from,
37
39
  $to = selection.$to;
38
40
  // Don't do anything if selection is a range
@@ -50,11 +52,12 @@ function keymapPlugin() {
50
52
  var isPreviousNodeAPanel = previousNodeType === panel;
51
53
  var isParentNodeAPanel = parentNodeType === panel;
52
54
  var nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
55
+ var isPreviousNodeAList = previousNodeType === (bulletList || orderedList);
53
56
 
54
57
  // Stops merging panels when deleting empty paragraph in between
55
58
  // Stops merging blockquotes with panels when deleting from start of blockquote
56
59
 
57
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils2.hasParentNodeOfType)(blockquote)(selection) ||
60
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils2.hasParentNodeOfType)(blockquote)(selection) && !isPreviousNodeAList ||
58
61
  // Lift line of panel content up and out of the panel, when backspacing
59
62
  // at the start of a panel, if the node before the panel is an 'isolating' node
60
63
  // (for e.g. a table, or an expand), otherwise the default prosemirror backspace
@@ -30,7 +30,9 @@ export function keymapPlugin() {
30
30
  } = state;
31
31
  const {
32
32
  panel,
33
- blockquote
33
+ blockquote,
34
+ orderedList,
35
+ bulletList
34
36
  } = nodes;
35
37
  const {
36
38
  $from,
@@ -51,11 +53,12 @@ export function keymapPlugin() {
51
53
  const isPreviousNodeAPanel = previousNodeType === panel;
52
54
  const isParentNodeAPanel = parentNodeType === panel;
53
55
  const nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
56
+ const isPreviousNodeAList = previousNodeType === (bulletList || orderedList);
54
57
 
55
58
  // Stops merging panels when deleting empty paragraph in between
56
59
  // Stops merging blockquotes with panels when deleting from start of blockquote
57
60
 
58
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) ||
61
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !isPreviousNodeAList ||
59
62
  // Lift line of panel content up and out of the panel, when backspacing
60
63
  // at the start of a panel, if the node before the panel is an 'isolating' node
61
64
  // (for e.g. a table, or an expand), otherwise the default prosemirror backspace
@@ -25,7 +25,9 @@ export function keymapPlugin() {
25
25
  nodes = state.schema.nodes,
26
26
  tr = state.tr;
27
27
  var panel = nodes.panel,
28
- blockquote = nodes.blockquote;
28
+ blockquote = nodes.blockquote,
29
+ orderedList = nodes.orderedList,
30
+ bulletList = nodes.bulletList;
29
31
  var $from = selection.$from,
30
32
  $to = selection.$to;
31
33
  // Don't do anything if selection is a range
@@ -43,11 +45,12 @@ export function keymapPlugin() {
43
45
  var isPreviousNodeAPanel = previousNodeType === panel;
44
46
  var isParentNodeAPanel = parentNodeType === panel;
45
47
  var nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
48
+ var isPreviousNodeAList = previousNodeType === (bulletList || orderedList);
46
49
 
47
50
  // Stops merging panels when deleting empty paragraph in between
48
51
  // Stops merging blockquotes with panels when deleting from start of blockquote
49
52
 
50
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) ||
53
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !isPreviousNodeAList ||
51
54
  // Lift line of panel content up and out of the panel, when backspacing
52
55
  // at the start of a panel, if the node before the panel is an 'isolating' node
53
56
  // (for e.g. a table, or an expand), otherwise the default prosemirror backspace
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-panel",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,8 +31,8 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^35.1.0",
35
- "@atlaskit/editor-common": "^76.26.0",
34
+ "@atlaskit/adf-schema": "^35.1.1",
35
+ "@atlaskit/editor-common": "^76.27.0",
36
36
  "@atlaskit/editor-palette": "1.5.2",
37
37
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^0.2.0",