@atlaskit/editor-plugin-media 8.4.9 → 8.4.11

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-media
2
2
 
3
+ ## 8.4.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a05464ea42678`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a05464ea42678) -
8
+ EDITOR-2791 bump adf-schema
9
+ - Updated dependencies
10
+
11
+ ## 8.4.10
12
+
13
+ ### Patch Changes
14
+
15
+ - [`98517a05bfada`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/98517a05bfada) -
16
+ fix styling for full-width and wide media single
17
+ - Updated dependencies
18
+
3
19
  ## 8.4.9
4
20
 
5
21
  ### Patch Changes
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _adfSchema = require("@atlaskit/adf-schema");
10
10
  var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
11
11
  var _colors = require("@atlaskit/theme/colors");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
14
  var _toDOMAttrs = require("./toDOMAttrs");
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; }
@@ -55,9 +56,17 @@ var mediaWidthCSSCalc = exports.mediaWidthCSSCalc = function mediaWidthCSSCalc(_
55
56
  } else if (shouldHardCodePixelWidth) {
56
57
  cssCalc = "min(".concat(mediaSingleDimensionWidth, "px, ").concat(fullContainerWidth, ")");
57
58
  } else if (shouldUseBreakoutWideLogic) {
58
- cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
59
+ if ((0, _expValEquals.expValEquals)('platform_editor_media_vc_fixes', 'isEnabled', true)) {
60
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), var(--ak-editor-max-container-width)))";
61
+ } else {
62
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
63
+ }
59
64
  } else if (shouldUseBreakoutFullWidthLogic) {
60
- cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
65
+ if ((0, _expValEquals.expValEquals)('platform_editor_media_vc_fixes', 'isEnabled', true)) {
66
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), var(--ak-editor-max-container-width)))";
67
+ } else {
68
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
69
+ }
61
70
  } else {
62
71
  cssCalc = "max(min(".concat(baseWidth, "px, min(100cqw, 100%)), ").concat(GUTTER_SIZE, ")");
63
72
  }
@@ -1,6 +1,7 @@
1
1
  import { mediaSingleSpec } from '@atlaskit/adf-schema';
2
2
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
3
3
  import { N20, N50 } from '@atlaskit/theme/colors';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
6
  import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
6
7
  const WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
@@ -46,9 +47,17 @@ export const mediaWidthCSSCalc = ({
46
47
  } else if (shouldHardCodePixelWidth) {
47
48
  cssCalc = `min(${mediaSingleDimensionWidth}px, ${fullContainerWidth})`;
48
49
  } else if (shouldUseBreakoutWideLogic) {
49
- cssCalc = `max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
50
+ if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
51
+ cssCalc = `max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), var(--ak-editor-max-container-width)))`;
52
+ } else {
53
+ cssCalc = `max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
54
+ }
50
55
  } else if (shouldUseBreakoutFullWidthLogic) {
51
- cssCalc = `max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
56
+ if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
57
+ cssCalc = `max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), var(--ak-editor-max-container-width)))`;
58
+ } else {
59
+ cssCalc = `max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))`;
60
+ }
52
61
  } else {
53
62
  cssCalc = `max(min(${baseWidth}px, min(100cqw, 100%)), ${GUTTER_SIZE})`;
54
63
  }
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { mediaSingleSpec } from '@atlaskit/adf-schema';
5
5
  import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
6
6
  import { N20, N50 } from '@atlaskit/theme/colors';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
8
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
9
  import { getAttrsFromNodeMediaSingle } from './toDOMAttrs';
9
10
  var WRAPPED_LAYOUTS = ['wrap-left', 'wrap-right'];
@@ -48,9 +49,17 @@ export var mediaWidthCSSCalc = function mediaWidthCSSCalc(_ref) {
48
49
  } else if (shouldHardCodePixelWidth) {
49
50
  cssCalc = "min(".concat(mediaSingleDimensionWidth, "px, ").concat(fullContainerWidth, ")");
50
51
  } else if (shouldUseBreakoutWideLogic) {
51
- cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
52
+ if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
53
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), var(--ak-editor-max-container-width)))";
54
+ } else {
55
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--breakout-wide-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
56
+ }
52
57
  } else if (shouldUseBreakoutFullWidthLogic) {
53
- cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
58
+ if (expValEquals('platform_editor_media_vc_fixes', 'isEnabled', true)) {
59
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), var(--ak-editor-max-container-width)))";
60
+ } else {
61
+ cssCalc = "max(var(--ak-editor--line-length), min(var(--ak-editor--full-width-layout-width), calc(100cqw - var(--ak-editor--breakout-full-page-guttering-padding))))";
62
+ }
54
63
  } else {
55
64
  cssCalc = "max(min(".concat(baseWidth, "px, min(100cqw, 100%)), ").concat(GUTTER_SIZE, ")");
56
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "8.4.9",
3
+ "version": "8.4.11",
4
4
  "description": "Media 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.3.2",
33
- "@atlaskit/analytics-namespaced-context": "^7.1.0",
32
+ "@atlaskit/adf-schema": "^51.4.0",
33
+ "@atlaskit/analytics-namespaced-context": "^7.2.0",
34
34
  "@atlaskit/analytics-next": "^11.1.0",
35
35
  "@atlaskit/button": "^23.6.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
@@ -49,12 +49,12 @@
49
49
  "@atlaskit/editor-plugin-toolbar": "^3.4.0",
50
50
  "@atlaskit/editor-plugin-width": "^7.0.0",
51
51
  "@atlaskit/editor-prosemirror": "7.0.0",
52
- "@atlaskit/editor-shared-styles": "^3.9.0",
52
+ "@atlaskit/editor-shared-styles": "^3.10.0",
53
53
  "@atlaskit/editor-tables": "^2.9.0",
54
54
  "@atlaskit/form": "^14.2.0",
55
55
  "@atlaskit/icon": "^29.0.0",
56
56
  "@atlaskit/icon-lab": "^5.12.0",
57
- "@atlaskit/media-card": "^79.7.0",
57
+ "@atlaskit/media-card": "^79.8.0",
58
58
  "@atlaskit/media-client": "^35.6.0",
59
59
  "@atlaskit/media-client-react": "^4.1.0",
60
60
  "@atlaskit/media-common": "^12.3.0",
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/theme": "^21.0.0",
69
69
  "@atlaskit/tmp-editor-statsig": "^13.38.0",
70
70
  "@atlaskit/tokens": "^8.0.0",
71
- "@atlaskit/tooltip": "^20.8.0",
71
+ "@atlaskit/tooltip": "^20.9.0",
72
72
  "@babel/runtime": "^7.0.0",
73
73
  "@emotion/react": "^11.7.1",
74
74
  "bind-event-listener": "^3.0.0",
@@ -78,7 +78,7 @@
78
78
  "uuid": "^3.1.0"
79
79
  },
80
80
  "peerDependencies": {
81
- "@atlaskit/editor-common": "^110.29.0",
81
+ "@atlaskit/editor-common": "^110.32.0",
82
82
  "@atlaskit/media-core": "^37.0.0",
83
83
  "react": "^18.2.0",
84
84
  "react-dom": "^18.2.0",