@atlaskit/editor-plugin-panel 2.3.4 → 2.3.6
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,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-panel
|
|
2
2
|
|
|
3
|
+
## 2.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.3.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#139335](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139335)
|
|
14
|
+
[`ac5e66fc71394`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ac5e66fc71394) -
|
|
15
|
+
ED-24798 bug-fix: pressing Backspace before media that is nested in a quote should move your
|
|
16
|
+
selection to the media
|
|
17
|
+
|
|
3
18
|
## 2.3.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -34,7 +34,9 @@ function keymapPlugin() {
|
|
|
34
34
|
var panel = nodes.panel,
|
|
35
35
|
blockquote = nodes.blockquote,
|
|
36
36
|
orderedList = nodes.orderedList,
|
|
37
|
-
bulletList = nodes.bulletList
|
|
37
|
+
bulletList = nodes.bulletList,
|
|
38
|
+
mediaSingle = nodes.mediaSingle,
|
|
39
|
+
mediaGroup = nodes.mediaGroup;
|
|
38
40
|
var $from = selection.$from,
|
|
39
41
|
$to = selection.$to;
|
|
40
42
|
// Don't do anything if selection is a range
|
|
@@ -52,12 +54,13 @@ function keymapPlugin() {
|
|
|
52
54
|
var isPreviousNodeAPanel = previousNodeType === panel;
|
|
53
55
|
var isParentNodeAPanel = parentNodeType === panel;
|
|
54
56
|
var nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
|
|
55
|
-
var
|
|
57
|
+
var isPreviousNodeMedia = previousNodeType === mediaSingle || previousNodeType === mediaGroup;
|
|
58
|
+
var isPreviousNodeAList = previousNodeType === bulletList || previousNodeType === orderedList;
|
|
56
59
|
|
|
57
60
|
// Stops merging panels when deleting empty paragraph in between
|
|
58
61
|
// Stops merging blockquotes with panels when deleting from start of blockquote
|
|
59
62
|
|
|
60
|
-
if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils2.hasParentNodeOfType)(blockquote)(selection) && !
|
|
63
|
+
if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _utils2.hasParentNodeOfType)(blockquote)(selection) && !isPreviousNodeAList && !isPreviousNodeMedia ||
|
|
61
64
|
// Lift line of panel content up and out of the panel, when backspacing
|
|
62
65
|
// at the start of a panel, if the node before the panel is an 'isolating' node
|
|
63
66
|
// (for e.g. a table, or an expand), otherwise the default prosemirror backspace
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -25,7 +25,7 @@ var _actions = require("./actions");
|
|
|
25
25
|
var _utils2 = require("./utils");
|
|
26
26
|
var _panelIconMap;
|
|
27
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
28
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
28
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
29
29
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
var panelIconMap = exports.panelIconMap = (_panelIconMap = {}, (0, _defineProperty2.default)(_panelIconMap, _adfSchema.PanelType.INFO, {
|
|
@@ -32,7 +32,9 @@ export function keymapPlugin() {
|
|
|
32
32
|
panel,
|
|
33
33
|
blockquote,
|
|
34
34
|
orderedList,
|
|
35
|
-
bulletList
|
|
35
|
+
bulletList,
|
|
36
|
+
mediaSingle,
|
|
37
|
+
mediaGroup
|
|
36
38
|
} = nodes;
|
|
37
39
|
const {
|
|
38
40
|
$from,
|
|
@@ -53,12 +55,13 @@ export function keymapPlugin() {
|
|
|
53
55
|
const isPreviousNodeAPanel = previousNodeType === panel;
|
|
54
56
|
const isParentNodeAPanel = parentNodeType === panel;
|
|
55
57
|
const nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
|
|
56
|
-
const
|
|
58
|
+
const isPreviousNodeMedia = previousNodeType === mediaSingle || previousNodeType === mediaGroup;
|
|
59
|
+
const isPreviousNodeAList = previousNodeType === bulletList || previousNodeType === orderedList;
|
|
57
60
|
|
|
58
61
|
// Stops merging panels when deleting empty paragraph in between
|
|
59
62
|
// Stops merging blockquotes with panels when deleting from start of blockquote
|
|
60
63
|
|
|
61
|
-
if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !
|
|
64
|
+
if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !isPreviousNodeAList && !isPreviousNodeMedia ||
|
|
62
65
|
// Lift line of panel content up and out of the panel, when backspacing
|
|
63
66
|
// at the start of a panel, if the node before the panel is an 'isolating' node
|
|
64
67
|
// (for e.g. a table, or an expand), otherwise the default prosemirror backspace
|
|
@@ -27,7 +27,9 @@ export function keymapPlugin() {
|
|
|
27
27
|
var panel = nodes.panel,
|
|
28
28
|
blockquote = nodes.blockquote,
|
|
29
29
|
orderedList = nodes.orderedList,
|
|
30
|
-
bulletList = nodes.bulletList
|
|
30
|
+
bulletList = nodes.bulletList,
|
|
31
|
+
mediaSingle = nodes.mediaSingle,
|
|
32
|
+
mediaGroup = nodes.mediaGroup;
|
|
31
33
|
var $from = selection.$from,
|
|
32
34
|
$to = selection.$to;
|
|
33
35
|
// Don't do anything if selection is a range
|
|
@@ -45,12 +47,13 @@ export function keymapPlugin() {
|
|
|
45
47
|
var isPreviousNodeAPanel = previousNodeType === panel;
|
|
46
48
|
var isParentNodeAPanel = parentNodeType === panel;
|
|
47
49
|
var nodeBeforePanel = $previousPos === null || $previousPos === void 0 ? void 0 : $previousPos.nodeBefore;
|
|
48
|
-
var
|
|
50
|
+
var isPreviousNodeMedia = previousNodeType === mediaSingle || previousNodeType === mediaGroup;
|
|
51
|
+
var isPreviousNodeAList = previousNodeType === bulletList || previousNodeType === orderedList;
|
|
49
52
|
|
|
50
53
|
// Stops merging panels when deleting empty paragraph in between
|
|
51
54
|
// Stops merging blockquotes with panels when deleting from start of blockquote
|
|
52
55
|
|
|
53
|
-
if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !
|
|
56
|
+
if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || hasParentNodeOfType(blockquote)(selection) && !isPreviousNodeAList && !isPreviousNodeMedia ||
|
|
54
57
|
// Lift line of panel content up and out of the panel, when backspacing
|
|
55
58
|
// at the start of a panel, if the node before the panel is an 'isolating' node
|
|
56
59
|
// (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": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
4
4
|
"description": "Panel plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^40.9.0",
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/editor-common": "^89.0.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.6.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|