@atlaskit/editor-plugin-paste 1.14.3 → 1.14.4
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,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 1.14.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#155735](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155735)
|
|
8
|
+
[`1beeeda29023a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1beeeda29023a) -
|
|
9
|
+
Upgrades editor packages to react 18
|
|
10
|
+
- [#155693](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155693)
|
|
11
|
+
[`172485595104b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/172485595104b) -
|
|
12
|
+
[ED-24685] Removing feature flag that gated multi bodied extensions being available in the editor
|
|
13
|
+
|
|
3
14
|
## 1.14.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -12,7 +12,6 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
14
14
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
function insertSliceIntoEmptyNode(_ref) {
|
|
17
16
|
var tr = _ref.tr,
|
|
18
17
|
slice = _ref.slice;
|
|
@@ -87,7 +86,7 @@ function insertSliceInsideOfPanelNodeSelected(panelNode) {
|
|
|
87
86
|
/* Adapting above logic to handle MBE, as it currently assumes that slice can be safely inserted after the panel node, which is not the case for MBE
|
|
88
87
|
If insertPosition is in MBE and current slice contains invalid content for MBE, we need to insert the slice after the MBE node
|
|
89
88
|
*/
|
|
90
|
-
if (schema
|
|
89
|
+
if (schema) {
|
|
91
90
|
var mbeParentOfPanel = (0, _utils2.findParentNodeOfType)(schema.nodes.multiBodiedExtension)(selection);
|
|
92
91
|
if (mbeParentOfPanel && !mbeParentOfPanel.node.type.validContent(_model.Fragment.from(slice.content))) {
|
|
93
92
|
insertPosition = mbeParentOfPanel.start + mbeParentOfPanel.node.nodeSize - 1;
|
|
@@ -3,7 +3,6 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { Transform } from '@atlaskit/editor-prosemirror/transform';
|
|
5
5
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
export function insertSliceIntoEmptyNode({
|
|
8
7
|
tr,
|
|
9
8
|
slice
|
|
@@ -93,7 +92,7 @@ export function insertSliceInsideOfPanelNodeSelected(panelNode) {
|
|
|
93
92
|
/* Adapting above logic to handle MBE, as it currently assumes that slice can be safely inserted after the panel node, which is not the case for MBE
|
|
94
93
|
If insertPosition is in MBE and current slice contains invalid content for MBE, we need to insert the slice after the MBE node
|
|
95
94
|
*/
|
|
96
|
-
if (schema
|
|
95
|
+
if (schema) {
|
|
97
96
|
const mbeParentOfPanel = findParentNodeOfType(schema.nodes.multiBodiedExtension)(selection);
|
|
98
97
|
if (mbeParentOfPanel && !mbeParentOfPanel.node.type.validContent(Fragment.from(slice.content))) {
|
|
99
98
|
insertPosition = mbeParentOfPanel.start + mbeParentOfPanel.node.nodeSize - 1;
|
|
@@ -3,7 +3,6 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { Transform } from '@atlaskit/editor-prosemirror/transform';
|
|
5
5
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
export function insertSliceIntoEmptyNode(_ref) {
|
|
8
7
|
var tr = _ref.tr,
|
|
9
8
|
slice = _ref.slice;
|
|
@@ -78,7 +77,7 @@ export function insertSliceInsideOfPanelNodeSelected(panelNode) {
|
|
|
78
77
|
/* Adapting above logic to handle MBE, as it currently assumes that slice can be safely inserted after the panel node, which is not the case for MBE
|
|
79
78
|
If insertPosition is in MBE and current slice contains invalid content for MBE, we need to insert the slice after the MBE node
|
|
80
79
|
*/
|
|
81
|
-
if (schema
|
|
80
|
+
if (schema) {
|
|
82
81
|
var mbeParentOfPanel = findParentNodeOfType(schema.nodes.multiBodiedExtension)(selection);
|
|
83
82
|
if (mbeParentOfPanel && !mbeParentOfPanel.node.type.validContent(Fragment.from(slice.content))) {
|
|
84
83
|
insertPosition = mbeParentOfPanel.start + mbeParentOfPanel.node.nodeSize - 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.4",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"atlassian": {
|
|
11
11
|
"team": "Editor: Lego",
|
|
12
12
|
"singleton": true,
|
|
13
|
-
"runReact18":
|
|
13
|
+
"runReact18": true
|
|
14
14
|
},
|
|
15
15
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
16
16
|
"main": "dist/cjs/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^94.
|
|
34
|
+
"@atlaskit/editor-common": "^94.2.0",
|
|
35
35
|
"@atlaskit/editor-markdown-transformer": "^5.13.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-annotation": "^1.21.0",
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
"uuid": "^3.1.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"react": "^16.8.0 || ^17.0.0 || ~18.2.0"
|
|
55
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
56
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.2.0"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
59
|
"@af/visual-regression": "*",
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
"@atlaskit/ssr": "*",
|
|
64
65
|
"@atlaskit/visual-regression": "*",
|
|
65
66
|
"@testing-library/react": "^12.1.5",
|
|
66
|
-
"react-dom": "^16.8.0",
|
|
67
67
|
"typescript": "~5.4.2",
|
|
68
68
|
"wait-for-expect": "^1.2.0"
|
|
69
69
|
},
|
|
@@ -112,9 +112,6 @@
|
|
|
112
112
|
"platform.editor.media.extended-resize-experience": {
|
|
113
113
|
"type": "boolean"
|
|
114
114
|
},
|
|
115
|
-
"platform.editor.multi-bodied-extension_0rygg": {
|
|
116
|
-
"type": "boolean"
|
|
117
|
-
},
|
|
118
115
|
"editor_inline_comments_paste_insert_nodes": {
|
|
119
116
|
"type": "boolean"
|
|
120
117
|
},
|