@atlaskit/editor-plugin-breakout 2.7.0 → 2.7.1

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,14 @@
1
1
  # @atlaskit/editor-plugin-breakout
2
2
 
3
+ ## 2.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#168578](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/168578)
8
+ [`41261a6eeacb3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/41261a6eeacb3) -
9
+ ED-28219 fix new resizing experience on full width pages
10
+ - Updated dependencies
11
+
3
12
  ## 2.7.0
4
13
 
5
14
  ### Minor Changes
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
11
  var _styles = require("@atlaskit/editor-common/styles");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _pragmaticResizer = require("./pragmatic-resizer");
13
14
  var _resizerCallbacks = require("./resizer-callbacks");
14
15
  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; }
@@ -44,14 +45,27 @@ var ResizingMarkView = exports.ResizingMarkView = /*#__PURE__*/function () {
44
45
  contentDOM.style.gridRow = '1';
45
46
  contentDOM.style.gridColumn = '1';
46
47
  contentDOM.style.zIndex = '1';
47
- if (mark.attrs.width) {
48
- contentDOM.style.minWidth = "min(var(".concat(LOCAL_RESIZE_PROPERTY, ", ").concat(mark.attrs.width, "px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))");
49
- } else {
50
- if (mark.attrs.mode === 'wide') {
51
- contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
48
+ if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
49
+ if (mark.attrs.width) {
50
+ contentDOM.style.width = "min(var(".concat(LOCAL_RESIZE_PROPERTY, ", ").concat(mark.attrs.width, "px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))");
51
+ } else {
52
+ if (mark.attrs.mode === 'wide') {
53
+ contentDOM.style.width = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
54
+ }
55
+ if (mark.attrs.mode === 'full-width') {
56
+ contentDOM.style.width = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
57
+ }
52
58
  }
53
- if (mark.attrs.mode === 'full-width') {
54
- contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
59
+ } else {
60
+ if (mark.attrs.width) {
61
+ contentDOM.style.minWidth = "min(var(".concat(LOCAL_RESIZE_PROPERTY, ", ").concat(mark.attrs.width, "px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))");
62
+ } else {
63
+ if (mark.attrs.mode === 'wide') {
64
+ contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
65
+ }
66
+ if (mark.attrs.mode === 'full-width') {
67
+ contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
68
+ }
55
69
  }
56
70
  }
57
71
  dom.appendChild(contentDOM);
@@ -1,4 +1,5 @@
1
1
  import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { createPragmaticResizer } from './pragmatic-resizer';
3
4
  import { createResizerCallbacks } from './resizer-callbacks';
4
5
  export const LOCAL_RESIZE_PROPERTY = '--local-resizing-width';
@@ -31,14 +32,27 @@ export class ResizingMarkView {
31
32
  contentDOM.style.gridRow = '1';
32
33
  contentDOM.style.gridColumn = '1';
33
34
  contentDOM.style.zIndex = '1';
34
- if (mark.attrs.width) {
35
- contentDOM.style.minWidth = `min(var(${LOCAL_RESIZE_PROPERTY}, ${mark.attrs.width}px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))`;
36
- } else {
37
- if (mark.attrs.mode === 'wide') {
38
- contentDOM.style.minWidth = `max(var(--ak-editor--line-length), min(var(${LOCAL_RESIZE_PROPERTY}, var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
35
+ if (fg('platform_editor_breakout_resizing_hello_release')) {
36
+ if (mark.attrs.width) {
37
+ contentDOM.style.width = `min(var(${LOCAL_RESIZE_PROPERTY}, ${mark.attrs.width}px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))`;
38
+ } else {
39
+ if (mark.attrs.mode === 'wide') {
40
+ contentDOM.style.width = `max(var(--ak-editor--line-length), min(var(${LOCAL_RESIZE_PROPERTY}, var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
41
+ }
42
+ if (mark.attrs.mode === 'full-width') {
43
+ contentDOM.style.width = `max(var(--ak-editor--line-length), min(var(${LOCAL_RESIZE_PROPERTY}, var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
44
+ }
39
45
  }
40
- if (mark.attrs.mode === 'full-width') {
41
- contentDOM.style.minWidth = `max(var(--ak-editor--line-length), min(var(${LOCAL_RESIZE_PROPERTY}, var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
46
+ } else {
47
+ if (mark.attrs.width) {
48
+ contentDOM.style.minWidth = `min(var(${LOCAL_RESIZE_PROPERTY}, ${mark.attrs.width}px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))`;
49
+ } else {
50
+ if (mark.attrs.mode === 'wide') {
51
+ contentDOM.style.minWidth = `max(var(--ak-editor--line-length), min(var(${LOCAL_RESIZE_PROPERTY}, var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
52
+ }
53
+ if (mark.attrs.mode === 'full-width') {
54
+ contentDOM.style.minWidth = `max(var(--ak-editor--line-length), min(var(${LOCAL_RESIZE_PROPERTY}, var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
55
+ }
42
56
  }
43
57
  }
44
58
  dom.appendChild(contentDOM);
@@ -4,6 +4,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
4
4
  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; }
5
5
  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; }
6
6
  import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { createPragmaticResizer } from './pragmatic-resizer';
8
9
  import { createResizerCallbacks } from './resizer-callbacks';
9
10
  export var LOCAL_RESIZE_PROPERTY = '--local-resizing-width';
@@ -37,14 +38,27 @@ export var ResizingMarkView = /*#__PURE__*/function () {
37
38
  contentDOM.style.gridRow = '1';
38
39
  contentDOM.style.gridColumn = '1';
39
40
  contentDOM.style.zIndex = '1';
40
- if (mark.attrs.width) {
41
- contentDOM.style.minWidth = "min(var(".concat(LOCAL_RESIZE_PROPERTY, ", ").concat(mark.attrs.width, "px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))");
42
- } else {
43
- if (mark.attrs.mode === 'wide') {
44
- contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
41
+ if (fg('platform_editor_breakout_resizing_hello_release')) {
42
+ if (mark.attrs.width) {
43
+ contentDOM.style.width = "min(var(".concat(LOCAL_RESIZE_PROPERTY, ", ").concat(mark.attrs.width, "px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))");
44
+ } else {
45
+ if (mark.attrs.mode === 'wide') {
46
+ contentDOM.style.width = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
47
+ }
48
+ if (mark.attrs.mode === 'full-width') {
49
+ contentDOM.style.width = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
50
+ }
45
51
  }
46
- if (mark.attrs.mode === 'full-width') {
47
- contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
52
+ } else {
53
+ if (mark.attrs.width) {
54
+ contentDOM.style.minWidth = "min(var(".concat(LOCAL_RESIZE_PROPERTY, ", ").concat(mark.attrs.width, "px), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding)))");
55
+ } else {
56
+ if (mark.attrs.mode === 'wide') {
57
+ contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--breakout-wide-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
58
+ }
59
+ if (mark.attrs.mode === 'full-width') {
60
+ contentDOM.style.minWidth = "max(var(--ak-editor--line-length), min(var(".concat(LOCAL_RESIZE_PROPERTY, ", var(--ak-editor--full-width-layout-width)), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))");
61
+ }
48
62
  }
49
63
  }
50
64
  dom.appendChild(contentDOM);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-breakout",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "Breakout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",