@atlaskit/editor-plugin-breakout 30.0.1 → 30.0.3
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 30.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c6079b605fb46`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c6079b605fb46) -
|
|
8
|
+
[EDITOR-9916] exclude native embeds from breakout resizing, removing breakout marks behind
|
|
9
|
+
platform_editor_lovability_resize_exts_patch_1 to avoid duplicate resize handles
|
|
10
|
+
|
|
11
|
+
## 30.0.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 30.0.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.resizingPluginKey = exports.createResizingPlugin = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _nativeEmbed = require("@atlaskit/editor-common/extensibility/native-embed");
|
|
9
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
10
11
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
11
12
|
var _document = require("@atlaskit/editor-common/utils/document");
|
|
@@ -54,6 +55,16 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
54
55
|
return mark.type === breakout;
|
|
55
56
|
});
|
|
56
57
|
var isExpand = node.type === expand;
|
|
58
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_exts_patch_1')) {
|
|
59
|
+
// native embeds own their resize functionality
|
|
60
|
+
// remove breakout marks added by any resizing normalization
|
|
61
|
+
if ((0, _nativeEmbed.isNativeEmbedExtension)(node)) {
|
|
62
|
+
return {
|
|
63
|
+
updatedTr: breakoutMark ? newTr.setNodeMarkup(pos, node.type, node.attrs, breakout.removeFromSet(node.marks)) : newTr,
|
|
64
|
+
updatedDocChanged: !!breakoutMark
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
57
68
|
if (!breakoutMark) {
|
|
58
69
|
var width = getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled);
|
|
59
70
|
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_extensions')) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNativeEmbedExtension } from '@atlaskit/editor-common/extensibility/native-embed';
|
|
1
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
3
|
import { getBreakoutResizableNodeTypes, getBreakoutResizableNodeTypesNew } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/utils/document';
|
|
@@ -49,6 +50,16 @@ const addBreakoutToResizableNode = ({
|
|
|
49
50
|
} = newState.schema.nodes;
|
|
50
51
|
const breakoutMark = node.marks.find(mark => mark.type === breakout);
|
|
51
52
|
const isExpand = node.type === expand;
|
|
53
|
+
if (isExperimentEnabled('platform_editor_lovability_resize_exts_patch_1')) {
|
|
54
|
+
// native embeds own their resize functionality
|
|
55
|
+
// remove breakout marks added by any resizing normalization
|
|
56
|
+
if (isNativeEmbedExtension(node)) {
|
|
57
|
+
return {
|
|
58
|
+
updatedTr: breakoutMark ? newTr.setNodeMarkup(pos, node.type, node.attrs, breakout.removeFromSet(node.marks)) : newTr,
|
|
59
|
+
updatedDocChanged: !!breakoutMark
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
52
63
|
if (!breakoutMark) {
|
|
53
64
|
const width = getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled);
|
|
54
65
|
if (isExperimentEnabled('platform_editor_lovability_resize_extensions')) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
|
+
import { isNativeEmbedExtension } from '@atlaskit/editor-common/extensibility/native-embed';
|
|
4
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
6
|
import { getBreakoutResizableNodeTypes, getBreakoutResizableNodeTypesNew } from '@atlaskit/editor-common/utils';
|
|
6
7
|
import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/utils/document';
|
|
@@ -47,6 +48,16 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
47
48
|
return mark.type === breakout;
|
|
48
49
|
});
|
|
49
50
|
var isExpand = node.type === expand;
|
|
51
|
+
if (isExperimentEnabled('platform_editor_lovability_resize_exts_patch_1')) {
|
|
52
|
+
// native embeds own their resize functionality
|
|
53
|
+
// remove breakout marks added by any resizing normalization
|
|
54
|
+
if (isNativeEmbedExtension(node)) {
|
|
55
|
+
return {
|
|
56
|
+
updatedTr: breakoutMark ? newTr.setNodeMarkup(pos, node.type, node.attrs, breakout.removeFromSet(node.marks)) : newTr,
|
|
57
|
+
updatedDocChanged: !!breakoutMark
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
50
61
|
if (!breakoutMark) {
|
|
51
62
|
var width = getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled);
|
|
52
63
|
if (isExperimentEnabled('platform_editor_lovability_resize_extensions')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "30.0.
|
|
3
|
+
"version": "30.0.3",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"atlaskit:src": "src/index.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/adf-schema": "^57.7.0",
|
|
25
|
-
"@atlaskit/editor-plugin-block-controls": "^31.
|
|
25
|
+
"@atlaskit/editor-plugin-block-controls": "^31.1.0",
|
|
26
26
|
"@atlaskit/editor-plugin-editor-disabled": "^30.0.0",
|
|
27
27
|
"@atlaskit/editor-plugin-editor-viewmode": "^32.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-guideline": "^30.0.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
37
37
|
"@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
|
|
38
38
|
"@atlaskit/theme": "^28.2.0",
|
|
39
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^248.1.0",
|
|
40
40
|
"@atlaskit/tokens": "^20.8.0",
|
|
41
41
|
"@atlaskit/tooltip": "^24.4.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"uuid": "^11.1.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^134.
|
|
49
|
+
"@atlaskit/editor-common": "^134.2.0",
|
|
50
50
|
"react": "^18.2.0 || ^19.2.0",
|
|
51
51
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
52
52
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
"@testing-library/react": "^16.3.0",
|
|
56
56
|
"react": "^19.2.0",
|
|
57
57
|
"react-dom": "^19.2.0",
|
|
58
|
-
"react-intl": "^7.0.0"
|
|
59
|
-
"wait-for-expect": "^1.2.0"
|
|
58
|
+
"react-intl": "^7.0.0"
|
|
60
59
|
},
|
|
61
60
|
"platform-feature-flags": {
|
|
62
61
|
"platform_editor_lovability_resize_exts_gracefully": {
|