@atlaskit/editor-plugin-breakout 5.2.1 → 5.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 +19 -0
- package/dist/cjs/pm-plugins/get-guidelines.js +4 -2
- package/dist/cjs/pm-plugins/resizer-callbacks.js +4 -2
- package/dist/cjs/ui/LayoutButton.js +2 -2
- package/dist/es2019/pm-plugins/get-guidelines.js +4 -2
- package/dist/es2019/pm-plugins/resizer-callbacks.js +4 -2
- package/dist/es2019/ui/LayoutButton.js +2 -2
- package/dist/esm/pm-plugins/get-guidelines.js +4 -2
- package/dist/esm/pm-plugins/resizer-callbacks.js +4 -2
- package/dist/esm/ui/LayoutButton.js +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 5.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`687c1b8fa7801`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/687c1b8fa7801) -
|
|
8
|
+
EDITOR-1566 bump adf-schema + update validator
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 5.2.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`6b6eca9cee16d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b6eca9cee16d) -
|
|
19
|
+
Switch to use editorExperiment to use productKey for responsive preview panel changes.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 5.2.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -9,7 +9,7 @@ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
|
9
9
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var
|
|
12
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
13
|
var WIDTHS = {
|
|
14
14
|
MIN: _editorSharedStyles.akEditorDefaultLayoutWidth,
|
|
15
15
|
WIDE: _editorSharedStyles.akEditorCalculatedWideLayoutWidth,
|
|
@@ -49,7 +49,9 @@ var getGuidelines = exports.getGuidelines = (0, _memoizeOne.default)(function (i
|
|
|
49
49
|
var _ref = getEditorWidth() || {},
|
|
50
50
|
width = _ref.width,
|
|
51
51
|
lineLength = _ref.lineLength;
|
|
52
|
-
var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0,
|
|
52
|
+
var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
53
|
+
exposure: true
|
|
54
|
+
}) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
|
|
53
55
|
var fullWidth = width ? Math.min(WIDTHS.MAX, width - 2 * padding - _editorSharedStyles.akEditorGutterPadding) : undefined;
|
|
54
56
|
if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
55
57
|
guidelines.push({
|
|
@@ -7,7 +7,7 @@ exports.createResizerCallbacks = createResizerCallbacks;
|
|
|
7
7
|
exports.getProposedWidth = getProposedWidth;
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
-
var
|
|
10
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
11
|
var _setBreakoutWidth = require("../editor-commands/set-breakout-width");
|
|
12
12
|
var _getGuidelines = require("./get-guidelines");
|
|
13
13
|
var _resizingMarkView = require("./resizing-mark-view");
|
|
@@ -30,7 +30,9 @@ function getProposedWidth(_ref) {
|
|
|
30
30
|
var directionMultiplier = source.data.handleSide === 'left' ? -1 : 1;
|
|
31
31
|
var diffX = (location.current.input.clientX - location.initial.input.clientX) * RESIZE_RATIO * directionMultiplier;
|
|
32
32
|
var width = (api === null || api === void 0 || (_api$width$sharedStat = api.width.sharedState) === null || _api$width$sharedStat === void 0 || (_api$width$sharedStat = _api$width$sharedStat.currentState()) === null || _api$width$sharedStat === void 0 ? void 0 : _api$width$sharedStat.width) || 0;
|
|
33
|
-
var padding = width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0,
|
|
33
|
+
var padding = width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
|
|
34
|
+
exposure: true
|
|
35
|
+
}) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
|
|
34
36
|
var containerWidth = width - 2 * padding - _editorSharedStyles.akEditorGutterPadding;
|
|
35
37
|
|
|
36
38
|
// the node width may be greater than the container width so we resize using the smaller value
|
|
@@ -24,7 +24,7 @@ var _expand = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/expand
|
|
|
24
24
|
var _colors = require("@atlaskit/theme/colors");
|
|
25
25
|
var _constants = require("@atlaskit/theme/constants");
|
|
26
26
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
27
|
-
var
|
|
27
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
28
28
|
var _removeBreakout = require("../editor-commands/remove-breakout");
|
|
29
29
|
var _setBreakoutMode = require("../editor-commands/set-breakout-mode");
|
|
30
30
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
@@ -165,7 +165,7 @@ var LayoutButton = function LayoutButton(_ref) {
|
|
|
165
165
|
forcePlacement: true,
|
|
166
166
|
zIndex: belowOtherPopupsZIndex
|
|
167
167
|
}, (0, _react2.jsx)("div", {
|
|
168
|
-
css: [toolbarButtonWrapperStyles, (0,
|
|
168
|
+
css: [toolbarButtonWrapperStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && toolbarButtonNarrowScreenStyles]
|
|
169
169
|
}, (0, _react2.jsx)(_uiMenu.ToolbarButton, {
|
|
170
170
|
title: title,
|
|
171
171
|
testId: titleMessage.id,
|
|
@@ -2,7 +2,7 @@ import memoizeOne from 'memoize-one';
|
|
|
2
2
|
import { EXPAND_CONTAINER_PADDING, LAYOUT_COLUMN_PADDING, resizerHandleThumbWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorGutterPaddingDynamic, akEditorGutterPadding, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorCalculatedWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import {
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
6
|
const WIDTHS = {
|
|
7
7
|
MIN: akEditorDefaultLayoutWidth,
|
|
8
8
|
WIDE: akEditorCalculatedWideLayoutWidth,
|
|
@@ -40,7 +40,9 @@ export const getGuidelines = memoizeOne((isResizing, newWidth, getEditorWidth, n
|
|
|
40
40
|
width,
|
|
41
41
|
lineLength
|
|
42
42
|
} = getEditorWidth() || {};
|
|
43
|
-
const padding = width && width <= akEditorFullPageNarrowBreakout &&
|
|
43
|
+
const padding = width && width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
44
|
+
exposure: true
|
|
45
|
+
}) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
|
|
44
46
|
const fullWidth = width ? Math.min(WIDTHS.MAX, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
45
47
|
if (fg('platform_editor_breakout_resizing_hello_release')) {
|
|
46
48
|
guidelines.push({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { akEditorGutterPaddingDynamic, akEditorGutterPadding, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import {
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
4
|
import { setBreakoutWidth } from '../editor-commands/set-breakout-width';
|
|
5
5
|
import { getGuidelines } from './get-guidelines';
|
|
6
6
|
import { LOCAL_RESIZE_PROPERTY } from './resizing-mark-view';
|
|
@@ -24,7 +24,9 @@ export function getProposedWidth({
|
|
|
24
24
|
const directionMultiplier = source.data.handleSide === 'left' ? -1 : 1;
|
|
25
25
|
const diffX = (location.current.input.clientX - location.initial.input.clientX) * RESIZE_RATIO * directionMultiplier;
|
|
26
26
|
const width = (api === null || api === void 0 ? void 0 : (_api$width$sharedStat = api.width.sharedState) === null || _api$width$sharedStat === void 0 ? void 0 : (_api$width$sharedStat2 = _api$width$sharedStat.currentState()) === null || _api$width$sharedStat2 === void 0 ? void 0 : _api$width$sharedStat2.width) || 0;
|
|
27
|
-
const padding = width <= akEditorFullPageNarrowBreakout &&
|
|
27
|
+
const padding = width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
28
|
+
exposure: true
|
|
29
|
+
}) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
|
|
28
30
|
const containerWidth = width - 2 * padding - akEditorGutterPadding;
|
|
29
31
|
|
|
30
32
|
// the node width may be greater than the container width so we resize using the smaller value
|
|
@@ -22,7 +22,7 @@ import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
|
22
22
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
23
23
|
import { layers } from '@atlaskit/theme/constants';
|
|
24
24
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
25
|
-
import {
|
|
25
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
26
26
|
import { removeBreakout } from '../editor-commands/remove-breakout';
|
|
27
27
|
import { setBreakoutMode } from '../editor-commands/set-breakout-mode';
|
|
28
28
|
import { getPluginState } from '../pm-plugins/plugin-key';
|
|
@@ -163,7 +163,7 @@ const LayoutButton = ({
|
|
|
163
163
|
forcePlacement: true,
|
|
164
164
|
zIndex: belowOtherPopupsZIndex
|
|
165
165
|
}, jsx("div", {
|
|
166
|
-
css: [toolbarButtonWrapperStyles,
|
|
166
|
+
css: [toolbarButtonWrapperStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && toolbarButtonNarrowScreenStyles]
|
|
167
167
|
}, jsx(ToolbarButton, {
|
|
168
168
|
title: title,
|
|
169
169
|
testId: titleMessage.id,
|
|
@@ -2,7 +2,7 @@ import memoizeOne from 'memoize-one';
|
|
|
2
2
|
import { EXPAND_CONTAINER_PADDING, LAYOUT_COLUMN_PADDING, resizerHandleThumbWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorGutterPaddingDynamic, akEditorGutterPadding, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorCalculatedWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import {
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
6
|
var WIDTHS = {
|
|
7
7
|
MIN: akEditorDefaultLayoutWidth,
|
|
8
8
|
WIDE: akEditorCalculatedWideLayoutWidth,
|
|
@@ -42,7 +42,9 @@ export var getGuidelines = memoizeOne(function (isResizing, newWidth, getEditorW
|
|
|
42
42
|
var _ref = getEditorWidth() || {},
|
|
43
43
|
width = _ref.width,
|
|
44
44
|
lineLength = _ref.lineLength;
|
|
45
|
-
var padding = width && width <= akEditorFullPageNarrowBreakout &&
|
|
45
|
+
var padding = width && width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
46
|
+
exposure: true
|
|
47
|
+
}) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
|
|
46
48
|
var fullWidth = width ? Math.min(WIDTHS.MAX, width - 2 * padding - akEditorGutterPadding) : undefined;
|
|
47
49
|
if (fg('platform_editor_breakout_resizing_hello_release')) {
|
|
48
50
|
guidelines.push({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { akEditorGutterPaddingDynamic, akEditorGutterPadding, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import {
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
4
|
import { setBreakoutWidth } from '../editor-commands/set-breakout-width';
|
|
5
5
|
import { getGuidelines } from './get-guidelines';
|
|
6
6
|
import { LOCAL_RESIZE_PROPERTY } from './resizing-mark-view';
|
|
@@ -23,7 +23,9 @@ export function getProposedWidth(_ref) {
|
|
|
23
23
|
var directionMultiplier = source.data.handleSide === 'left' ? -1 : 1;
|
|
24
24
|
var diffX = (location.current.input.clientX - location.initial.input.clientX) * RESIZE_RATIO * directionMultiplier;
|
|
25
25
|
var width = (api === null || api === void 0 || (_api$width$sharedStat = api.width.sharedState) === null || _api$width$sharedStat === void 0 || (_api$width$sharedStat = _api$width$sharedStat.currentState()) === null || _api$width$sharedStat === void 0 ? void 0 : _api$width$sharedStat.width) || 0;
|
|
26
|
-
var padding = width <= akEditorFullPageNarrowBreakout &&
|
|
26
|
+
var padding = width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
27
|
+
exposure: true
|
|
28
|
+
}) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
|
|
27
29
|
var containerWidth = width - 2 * padding - akEditorGutterPadding;
|
|
28
30
|
|
|
29
31
|
// the node width may be greater than the container width so we resize using the smaller value
|
|
@@ -23,7 +23,7 @@ import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
|
23
23
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
24
24
|
import { layers } from '@atlaskit/theme/constants';
|
|
25
25
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
26
|
-
import {
|
|
26
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
27
27
|
import { removeBreakout } from '../editor-commands/remove-breakout';
|
|
28
28
|
import { setBreakoutMode } from '../editor-commands/set-breakout-mode';
|
|
29
29
|
import { getPluginState } from '../pm-plugins/plugin-key';
|
|
@@ -157,7 +157,7 @@ var LayoutButton = function LayoutButton(_ref) {
|
|
|
157
157
|
forcePlacement: true,
|
|
158
158
|
zIndex: belowOtherPopupsZIndex
|
|
159
159
|
}, jsx("div", {
|
|
160
|
-
css: [toolbarButtonWrapperStyles,
|
|
160
|
+
css: [toolbarButtonWrapperStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && toolbarButtonNarrowScreenStyles]
|
|
161
161
|
}, jsx(ToolbarButton, {
|
|
162
162
|
title: title,
|
|
163
163
|
testId: titleMessage.id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^51.
|
|
33
|
-
"@atlaskit/editor-plugin-block-controls": "^6.
|
|
32
|
+
"@atlaskit/adf-schema": "^51.2.0",
|
|
33
|
+
"@atlaskit/editor-plugin-block-controls": "^6.4.0",
|
|
34
34
|
"@atlaskit/editor-plugin-editor-disabled": "^5.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-guideline": "^5.0.0",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"@atlaskit/editor-plugin-width": "^6.0.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
42
|
-
"@atlaskit/icon": "^28.
|
|
42
|
+
"@atlaskit/icon": "^28.3.0",
|
|
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": "^12.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^12.30.0",
|
|
47
47
|
"@atlaskit/tokens": "^6.3.0",
|
|
48
48
|
"@atlaskit/tooltip": "^20.4.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"uuid": "^3.1.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^109.
|
|
56
|
+
"@atlaskit/editor-common": "^109.16.0",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
59
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@af/integration-testing": "workspace:^",
|
|
63
63
|
"@af/visual-regression": "workspace:^",
|
|
64
|
-
"@atlaskit/editor-plugin-code-block": "^7.
|
|
64
|
+
"@atlaskit/editor-plugin-code-block": "^7.3.0",
|
|
65
65
|
"@atlaskit/editor-plugin-composition": "^4.0.0",
|
|
66
66
|
"@atlaskit/editor-plugin-decorations": "^5.0.0",
|
|
67
67
|
"@atlaskit/ssr": "workspace:^",
|