@atlaskit/editor-plugin-breakout 6.2.6 → 6.3.0
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 +12 -0
- package/dist/cjs/pm-plugins/get-guidelines.js +1 -1
- package/dist/cjs/pm-plugins/resizer-callbacks.js +4 -4
- package/dist/es2019/pm-plugins/get-guidelines.js +1 -1
- package/dist/es2019/pm-plugins/resizer-callbacks.js +4 -4
- package/dist/esm/pm-plugins/get-guidelines.js +1 -1
- package/dist/esm/pm-plugins/resizer-callbacks.js +4 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 6.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8677e7b660127`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8677e7b660127) -
|
|
8
|
+
EDITOR-3792 Rollup max width changes previously gated with editor_tinymce_full_width_mode into
|
|
9
|
+
combined frontend/backend flag confluence_max_width_content_appearance
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 6.2.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -55,7 +55,7 @@ var getGuidelines = exports.getGuidelines = (0, _memoizeOne.default)(function (i
|
|
|
55
55
|
exposure: true
|
|
56
56
|
}) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
|
|
57
57
|
var fullWidth = width ? Math.min(WIDTHS.FULL, width - 2 * padding - _editorSharedStyles.akEditorGutterPadding) : undefined;
|
|
58
|
-
var maxWidth = width && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? Math.min(WIDTHS.MAX, width - 2 * padding - _editorSharedStyles.akEditorGutterPadding) : undefined;
|
|
58
|
+
var maxWidth = width && ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) ? Math.min(WIDTHS.MAX, width - 2 * padding - _editorSharedStyles.akEditorGutterPadding) : undefined;
|
|
59
59
|
guidelines.push({
|
|
60
60
|
key: GUIDELINE_KEYS.lineLengthLeft,
|
|
61
61
|
position: {
|
|
@@ -40,7 +40,7 @@ function getProposedWidth(_ref) {
|
|
|
40
40
|
// the node width may be greater than the container width so we resize using the smaller value
|
|
41
41
|
var proposedWidth = Math.min(initialWidth, containerWidth) + diffX;
|
|
42
42
|
var snapPoints = [WIDTHS.MIN, WIDTHS.WIDE, Math.min(containerWidth, WIDTHS.FULL)];
|
|
43
|
-
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
43
|
+
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
44
44
|
snapPoints.push(Math.min(containerWidth, WIDTHS.MAX));
|
|
45
45
|
}
|
|
46
46
|
for (var _i = 0, _snapPoints = snapPoints; _i < _snapPoints.length; _i++) {
|
|
@@ -49,7 +49,7 @@ function getProposedWidth(_ref) {
|
|
|
49
49
|
return snapPoint;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
var hardMax = (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? Math.min(containerWidth, WIDTHS.MAX) : Math.min(containerWidth, WIDTHS.FULL);
|
|
52
|
+
var hardMax = (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true) ? Math.min(containerWidth, WIDTHS.MAX) : Math.min(containerWidth, WIDTHS.FULL);
|
|
53
53
|
return Math.max(WIDTHS.MIN, Math.min(proposedWidth, hardMax));
|
|
54
54
|
}
|
|
55
55
|
function createResizerCallbacks(_ref2) {
|
|
@@ -154,7 +154,7 @@ function createResizerCallbacks(_ref2) {
|
|
|
154
154
|
return guideline.key.startsWith('full_width') && guideline.active;
|
|
155
155
|
});
|
|
156
156
|
var isResizedToMaxWidth = false;
|
|
157
|
-
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
157
|
+
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
158
158
|
isResizedToMaxWidth = !!guidelines.find(function (guideline) {
|
|
159
159
|
return guideline.key.startsWith('max_width') && guideline.active;
|
|
160
160
|
});
|
|
@@ -172,7 +172,7 @@ function createResizerCallbacks(_ref2) {
|
|
|
172
172
|
api: api,
|
|
173
173
|
source: source
|
|
174
174
|
});
|
|
175
|
-
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
175
|
+
if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
176
176
|
if (isResizedToMaxWidth) {
|
|
177
177
|
newWidth = WIDTHS.MAX;
|
|
178
178
|
}
|
|
@@ -46,7 +46,7 @@ export const getGuidelines = memoizeOne((isResizing, newWidth, getEditorWidth, n
|
|
|
46
46
|
exposure: true
|
|
47
47
|
}) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
|
|
48
48
|
const fullWidth = width ? Math.min(WIDTHS.FULL, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
49
|
-
const maxWidth = width && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? Math.min(WIDTHS.MAX, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
49
|
+
const maxWidth = width && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? Math.min(WIDTHS.MAX, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
50
50
|
guidelines.push({
|
|
51
51
|
key: GUIDELINE_KEYS.lineLengthLeft,
|
|
52
52
|
position: {
|
|
@@ -34,7 +34,7 @@ export function getProposedWidth({
|
|
|
34
34
|
// the node width may be greater than the container width so we resize using the smaller value
|
|
35
35
|
const proposedWidth = Math.min(initialWidth, containerWidth) + diffX;
|
|
36
36
|
const snapPoints = [WIDTHS.MIN, WIDTHS.WIDE, Math.min(containerWidth, WIDTHS.FULL)];
|
|
37
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
37
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
38
38
|
snapPoints.push(Math.min(containerWidth, WIDTHS.MAX));
|
|
39
39
|
}
|
|
40
40
|
for (const snapPoint of snapPoints) {
|
|
@@ -42,7 +42,7 @@ export function getProposedWidth({
|
|
|
42
42
|
return snapPoint;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const hardMax = expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? Math.min(containerWidth, WIDTHS.MAX) : Math.min(containerWidth, WIDTHS.FULL);
|
|
45
|
+
const hardMax = expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true) ? Math.min(containerWidth, WIDTHS.MAX) : Math.min(containerWidth, WIDTHS.FULL);
|
|
46
46
|
return Math.max(WIDTHS.MIN, Math.min(proposedWidth, hardMax));
|
|
47
47
|
}
|
|
48
48
|
export function createResizerCallbacks({
|
|
@@ -150,7 +150,7 @@ export function createResizerCallbacks({
|
|
|
150
150
|
});
|
|
151
151
|
const isResizedToFullWidth = !!guidelines.find(guideline => guideline.key.startsWith('full_width') && guideline.active);
|
|
152
152
|
let isResizedToMaxWidth = false;
|
|
153
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
153
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
154
154
|
isResizedToMaxWidth = !!guidelines.find(guideline => guideline.key.startsWith('max_width') && guideline.active);
|
|
155
155
|
}
|
|
156
156
|
guidelines = getGuidelines(false, 0, getEditorWidth);
|
|
@@ -166,7 +166,7 @@ export function createResizerCallbacks({
|
|
|
166
166
|
api,
|
|
167
167
|
source
|
|
168
168
|
});
|
|
169
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
169
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
170
170
|
if (isResizedToMaxWidth) {
|
|
171
171
|
newWidth = WIDTHS.MAX;
|
|
172
172
|
}
|
|
@@ -48,7 +48,7 @@ export var getGuidelines = memoizeOne(function (isResizing, newWidth, getEditorW
|
|
|
48
48
|
exposure: true
|
|
49
49
|
}) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
|
|
50
50
|
var fullWidth = width ? Math.min(WIDTHS.FULL, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
51
|
-
var maxWidth = width && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? Math.min(WIDTHS.MAX, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
51
|
+
var maxWidth = width && (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) ? Math.min(WIDTHS.MAX, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
52
52
|
guidelines.push({
|
|
53
53
|
key: GUIDELINE_KEYS.lineLengthLeft,
|
|
54
54
|
position: {
|
|
@@ -33,7 +33,7 @@ export function getProposedWidth(_ref) {
|
|
|
33
33
|
// the node width may be greater than the container width so we resize using the smaller value
|
|
34
34
|
var proposedWidth = Math.min(initialWidth, containerWidth) + diffX;
|
|
35
35
|
var snapPoints = [WIDTHS.MIN, WIDTHS.WIDE, Math.min(containerWidth, WIDTHS.FULL)];
|
|
36
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
36
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
37
37
|
snapPoints.push(Math.min(containerWidth, WIDTHS.MAX));
|
|
38
38
|
}
|
|
39
39
|
for (var _i = 0, _snapPoints = snapPoints; _i < _snapPoints.length; _i++) {
|
|
@@ -42,7 +42,7 @@ export function getProposedWidth(_ref) {
|
|
|
42
42
|
return snapPoint;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
var hardMax = expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? Math.min(containerWidth, WIDTHS.MAX) : Math.min(containerWidth, WIDTHS.FULL);
|
|
45
|
+
var hardMax = expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true) ? Math.min(containerWidth, WIDTHS.MAX) : Math.min(containerWidth, WIDTHS.FULL);
|
|
46
46
|
return Math.max(WIDTHS.MIN, Math.min(proposedWidth, hardMax));
|
|
47
47
|
}
|
|
48
48
|
export function createResizerCallbacks(_ref2) {
|
|
@@ -147,7 +147,7 @@ export function createResizerCallbacks(_ref2) {
|
|
|
147
147
|
return guideline.key.startsWith('full_width') && guideline.active;
|
|
148
148
|
});
|
|
149
149
|
var isResizedToMaxWidth = false;
|
|
150
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
150
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
151
151
|
isResizedToMaxWidth = !!guidelines.find(function (guideline) {
|
|
152
152
|
return guideline.key.startsWith('max_width') && guideline.active;
|
|
153
153
|
});
|
|
@@ -165,7 +165,7 @@ export function createResizerCallbacks(_ref2) {
|
|
|
165
165
|
api: api,
|
|
166
166
|
source: source
|
|
167
167
|
});
|
|
168
|
-
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
168
|
+
if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
169
169
|
if (isResizedToMaxWidth) {
|
|
170
170
|
newWidth = WIDTHS.MAX;
|
|
171
171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
45
45
|
"@atlaskit/theme": "^21.0.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^15.8.0",
|
|
47
47
|
"@atlaskit/tokens": "^8.4.0",
|
|
48
48
|
"@atlaskit/tooltip": "^20.11.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|