@atlaskit/editor-plugin-breakout 27.0.4 → 27.0.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,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 27.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b49a53d3c425a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b49a53d3c425a) -
|
|
8
|
+
EDITOR-8579 Remove extension layout controls and size extensions with the breakout mark. Legacy
|
|
9
|
+
wide and full-width layouts are translated to breakout widths, and the layout attr is kept for
|
|
10
|
+
rollback (behind experiment platform_editor_lovability_resize_extensions)
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 27.0.5
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 27.0.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -19,6 +19,22 @@ var _resizingMarkView = require("./resizing-mark-view");
|
|
|
19
19
|
var _singlePlayerExpand = require("./utils/single-player-expand");
|
|
20
20
|
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; }
|
|
21
21
|
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; }
|
|
22
|
+
var getInitialBreakoutWidth = function getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled) {
|
|
23
|
+
if (isMaxWidthEnabled) {
|
|
24
|
+
return _constants.akEditorMaxWidthLayoutWidth;
|
|
25
|
+
}
|
|
26
|
+
if (isFullWidthEnabled) {
|
|
27
|
+
return _constants.akEditorFullWidthLayoutWidth;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// extensions store their legacy size in the `layout` attr, translate it so existing
|
|
31
|
+
// wide and full-width extensions keep their width. `layout` is left unchanged for rollback.
|
|
32
|
+
var layout = node.attrs.layout;
|
|
33
|
+
if ((layout === 'wide' || layout === 'full-width') && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_extensions')) {
|
|
34
|
+
return layout === 'wide' ? _constants.akEditorCalculatedWideLayoutWidth : _constants.akEditorFullWidthLayoutWidth;
|
|
35
|
+
}
|
|
36
|
+
return _constants.akEditorDefaultLayoutWidth;
|
|
37
|
+
};
|
|
22
38
|
var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
23
39
|
var node = _ref.node,
|
|
24
40
|
pos = _ref.pos,
|
|
@@ -39,7 +55,7 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
39
55
|
});
|
|
40
56
|
var isExpand = node.type === expand;
|
|
41
57
|
if (!breakoutMark) {
|
|
42
|
-
var width =
|
|
58
|
+
var width = getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled);
|
|
43
59
|
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_extensions')) {
|
|
44
60
|
var marks = breakout.create({
|
|
45
61
|
width: width
|
|
@@ -9,6 +9,24 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
9
9
|
import { handleKeyDown } from './handle-key-down';
|
|
10
10
|
import { ResizingMarkView } from './resizing-mark-view';
|
|
11
11
|
import { updateExpandedStateNew } from './utils/single-player-expand';
|
|
12
|
+
const getInitialBreakoutWidth = (node, isFullWidthEnabled, isMaxWidthEnabled) => {
|
|
13
|
+
if (isMaxWidthEnabled) {
|
|
14
|
+
return akEditorMaxWidthLayoutWidth;
|
|
15
|
+
}
|
|
16
|
+
if (isFullWidthEnabled) {
|
|
17
|
+
return akEditorFullWidthLayoutWidth;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// extensions store their legacy size in the `layout` attr, translate it so existing
|
|
21
|
+
// wide and full-width extensions keep their width. `layout` is left unchanged for rollback.
|
|
22
|
+
const {
|
|
23
|
+
layout
|
|
24
|
+
} = node.attrs;
|
|
25
|
+
if ((layout === 'wide' || layout === 'full-width') && isExperimentEnabled('platform_editor_lovability_resize_extensions')) {
|
|
26
|
+
return layout === 'wide' ? akEditorCalculatedWideLayoutWidth : akEditorFullWidthLayoutWidth;
|
|
27
|
+
}
|
|
28
|
+
return akEditorDefaultLayoutWidth;
|
|
29
|
+
};
|
|
12
30
|
const addBreakoutToResizableNode = ({
|
|
13
31
|
node,
|
|
14
32
|
pos,
|
|
@@ -32,7 +50,7 @@ const addBreakoutToResizableNode = ({
|
|
|
32
50
|
const breakoutMark = node.marks.find(mark => mark.type === breakout);
|
|
33
51
|
const isExpand = node.type === expand;
|
|
34
52
|
if (!breakoutMark) {
|
|
35
|
-
const width =
|
|
53
|
+
const width = getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled);
|
|
36
54
|
if (isExperimentEnabled('platform_editor_lovability_resize_extensions')) {
|
|
37
55
|
const marks = breakout.create({
|
|
38
56
|
width: width
|
|
@@ -12,6 +12,22 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
12
12
|
import { handleKeyDown } from './handle-key-down';
|
|
13
13
|
import { ResizingMarkView } from './resizing-mark-view';
|
|
14
14
|
import { updateExpandedStateNew } from './utils/single-player-expand';
|
|
15
|
+
var getInitialBreakoutWidth = function getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled) {
|
|
16
|
+
if (isMaxWidthEnabled) {
|
|
17
|
+
return akEditorMaxWidthLayoutWidth;
|
|
18
|
+
}
|
|
19
|
+
if (isFullWidthEnabled) {
|
|
20
|
+
return akEditorFullWidthLayoutWidth;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// extensions store their legacy size in the `layout` attr, translate it so existing
|
|
24
|
+
// wide and full-width extensions keep their width. `layout` is left unchanged for rollback.
|
|
25
|
+
var layout = node.attrs.layout;
|
|
26
|
+
if ((layout === 'wide' || layout === 'full-width') && isExperimentEnabled('platform_editor_lovability_resize_extensions')) {
|
|
27
|
+
return layout === 'wide' ? akEditorCalculatedWideLayoutWidth : akEditorFullWidthLayoutWidth;
|
|
28
|
+
}
|
|
29
|
+
return akEditorDefaultLayoutWidth;
|
|
30
|
+
};
|
|
15
31
|
var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
16
32
|
var node = _ref.node,
|
|
17
33
|
pos = _ref.pos,
|
|
@@ -32,7 +48,7 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
32
48
|
});
|
|
33
49
|
var isExpand = node.type === expand;
|
|
34
50
|
if (!breakoutMark) {
|
|
35
|
-
var width =
|
|
51
|
+
var width = getInitialBreakoutWidth(node, isFullWidthEnabled, isMaxWidthEnabled);
|
|
36
52
|
if (isExperimentEnabled('platform_editor_lovability_resize_extensions')) {
|
|
37
53
|
var marks = breakout.create({
|
|
38
54
|
width: width
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "27.0.
|
|
3
|
+
"version": "27.0.6",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"@atlaskit/editor-plugin-user-intent": "^25.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-width": "^28.0.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
33
|
-
"@atlaskit/editor-shared-styles": "^4.
|
|
33
|
+
"@atlaskit/editor-shared-styles": "^4.5.0",
|
|
34
34
|
"@atlaskit/icon": "^38.0.0",
|
|
35
35
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
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": "^
|
|
40
|
-
"@atlaskit/tokens": "^20.
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^240.0.0",
|
|
40
|
+
"@atlaskit/tokens": "^20.6.0",
|
|
41
41
|
"@atlaskit/tooltip": "^24.4.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"@emotion/react": "^11.7.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"uuid": "^11.1.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^131.
|
|
49
|
+
"@atlaskit/editor-common": "^131.6.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"
|