@atlaskit/editor-plugin-panel 0.1.13 → 0.1.14

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,12 @@
1
1
  # @atlaskit/editor-plugin-panel
2
2
 
3
+ ## 0.1.14
4
+
5
+ ### Patch Changes
6
+
7
+ - [#63930](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63930) [`ab09a2d6f8f4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ab09a2d6f8f4) - ED-21649 Fixed issue with media content getting lost on backspace
8
+ - Updated dependencies
9
+
3
10
  ## 0.1.13
4
11
 
5
12
  ### Patch Changes
@@ -52,12 +52,12 @@ function keymapPlugin() {
52
52
  var isPreviousNodeAPanel = previousNodeType === panel;
53
53
  var isParentNodeAPanel = parentNodeType === panel;
54
54
  var nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
55
- var isPreviousNodeAList = previousNodeType === bulletList || previousNodeType === orderedList;
55
+ var hasParentNodeofTypeList = (0, _utils2.hasParentNodeOfType)([bulletList, orderedList])(selection);
56
56
 
57
57
  // Stops merging panels when deleting empty paragraph in between
58
58
  // Stops merging blockquotes with panels when deleting from start of blockquote
59
59
 
60
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils2.hasParentNodeOfType)(blockquote)(selection) && !isPreviousNodeAList ||
60
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils2.hasParentNodeOfType)(blockquote)(selection) && !hasParentNodeofTypeList ||
61
61
  // Lift line of panel content up and out of the panel, when backspacing
62
62
  // at the start of a panel, if the node before the panel is an 'isolating' node
63
63
  // (for e.g. a table, or an expand), otherwise the default prosemirror backspace
@@ -53,12 +53,12 @@ export function keymapPlugin() {
53
53
  const isPreviousNodeAPanel = previousNodeType === panel;
54
54
  const isParentNodeAPanel = parentNodeType === panel;
55
55
  const nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
56
- const isPreviousNodeAList = previousNodeType === bulletList || previousNodeType === orderedList;
56
+ const hasParentNodeofTypeList = hasParentNodeOfType([bulletList, orderedList])(selection);
57
57
 
58
58
  // Stops merging panels when deleting empty paragraph in between
59
59
  // Stops merging blockquotes with panels when deleting from start of blockquote
60
60
 
61
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !isPreviousNodeAList ||
61
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !hasParentNodeofTypeList ||
62
62
  // Lift line of panel content up and out of the panel, when backspacing
63
63
  // at the start of a panel, if the node before the panel is an 'isolating' node
64
64
  // (for e.g. a table, or an expand), otherwise the default prosemirror backspace
@@ -45,12 +45,12 @@ export function keymapPlugin() {
45
45
  var isPreviousNodeAPanel = previousNodeType === panel;
46
46
  var isParentNodeAPanel = parentNodeType === panel;
47
47
  var nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
48
- var isPreviousNodeAList = previousNodeType === bulletList || previousNodeType === orderedList;
48
+ var hasParentNodeofTypeList = hasParentNodeOfType([bulletList, orderedList])(selection);
49
49
 
50
50
  // Stops merging panels when deleting empty paragraph in between
51
51
  // Stops merging blockquotes with panels when deleting from start of blockquote
52
52
 
53
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !isPreviousNodeAList ||
53
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !hasParentNodeofTypeList ||
54
54
  // Lift line of panel content up and out of the panel, when backspacing
55
55
  // at the start of a panel, if the node before the panel is an 'isolating' node
56
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.13",
3
+ "version": "0.1.14",
4
4
  "description": "Panel plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -10,7 +10,8 @@
10
10
  "atlassian": {
11
11
  "team": "Editor: Jenga",
12
12
  "inPublicMirror": false,
13
- "releaseModel": "continuous"
13
+ "releaseModel": "continuous",
14
+ "runReact18": false
14
15
  },
15
16
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
16
17
  "main": "dist/cjs/index.js",
@@ -32,7 +33,7 @@
32
33
  },
33
34
  "dependencies": {
34
35
  "@atlaskit/adf-schema": "^35.2.0",
35
- "@atlaskit/editor-common": "^76.27.0",
36
+ "@atlaskit/editor-common": "^76.33.0",
36
37
  "@atlaskit/editor-palette": "1.5.2",
37
38
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
38
39
  "@atlaskit/editor-plugin-decorations": "^0.2.0",