@atlaskit/renderer 124.5.1 → 124.5.3

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,22 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 124.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e22968790f2b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e22968790f2b5) -
8
+ [ux] [EDITOR-2374] prevent style overrides on codemarks in excerpts
9
+ - Updated dependencies
10
+
11
+ ## 124.5.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`eec573b4a7a6a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eec573b4a7a6a) -
16
+ Passing the precise Pixel width when available instead of the container width, and passing height
17
+ 100% to avoid attempting height calculations to remove changes for VC
18
+ - Updated dependencies
19
+
3
20
  ## 124.5.1
4
21
 
5
22
  ### Patch Changes
@@ -140,12 +140,21 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
140
140
  var padding = isFullPage ? _style.FullPagePadding * 2 : 0;
141
141
  var calcDimensions = (0, _react.useCallback)(function (mediaContainerWidth) {
142
142
  var containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
143
- var maxWidth = (0, _coreUtils.isSSR)() && widthAttr && typeof widthAttr === 'number' && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
144
- var maxHeight = height / width * maxWidth;
145
- var cardDimensions = {
146
- width: "".concat(maxWidth, "px"),
147
- height: "".concat(maxHeight, "px")
148
- };
143
+ var cardDimensions = {};
144
+ if ((0, _platformFeatureFlags.fg)('media-perf-uplift-mutation-fix')) {
145
+ var maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
146
+ cardDimensions = {
147
+ width: "".concat(maxWidth, "px"),
148
+ height: "100%"
149
+ };
150
+ } else {
151
+ var _maxWidth = (0, _coreUtils.isSSR)() && widthAttr && typeof widthAttr === 'number' && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
152
+ var maxHeight = height / width * _maxWidth;
153
+ cardDimensions = {
154
+ width: "".concat(_maxWidth, "px"),
155
+ height: "".concat(maxHeight, "px")
156
+ };
157
+ }
149
158
  var nonFullWidthSize = containerWidth;
150
159
  if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
151
160
  var isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= _editorSharedStyles.akEditorDefaultLayoutWidth;
@@ -717,7 +717,7 @@ var codeMarkSharedStyles = (0, _react.css)({
717
717
  });
718
718
  var extensionStyle = (0, _react.css)({
719
719
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
720
- '.ak-renderer-extension :not([data-inline-card-lozenge] *)': {
720
+ '.ak-renderer-extension :not([data-inline-card-lozenge] *, code)': {
721
721
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
722
722
  fontSize: 'var(--ak-renderer-base-font-size)'
723
723
  }
@@ -127,12 +127,21 @@ const MediaSingleWithChildren = props => {
127
127
  const padding = isFullPage ? FullPagePadding * 2 : 0;
128
128
  const calcDimensions = useCallback(mediaContainerWidth => {
129
129
  const containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
130
- const maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
131
- const maxHeight = height / width * maxWidth;
132
- const cardDimensions = {
133
- width: `${maxWidth}px`,
134
- height: `${maxHeight}px`
135
- };
130
+ let cardDimensions = {};
131
+ if (fg('media-perf-uplift-mutation-fix')) {
132
+ const maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
133
+ cardDimensions = {
134
+ width: `${maxWidth}px`,
135
+ height: `100%`
136
+ };
137
+ } else {
138
+ const maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
139
+ const maxHeight = height / width * maxWidth;
140
+ cardDimensions = {
141
+ width: `${maxWidth}px`,
142
+ height: `${maxHeight}px`
143
+ };
144
+ }
136
145
  let nonFullWidthSize = containerWidth;
137
146
  if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
138
147
  const isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= akEditorDefaultLayoutWidth;
@@ -824,7 +824,7 @@ const codeMarkSharedStyles = css({
824
824
  });
825
825
  const extensionStyle = css({
826
826
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
827
- '.ak-renderer-extension :not([data-inline-card-lozenge] *)': {
827
+ '.ak-renderer-extension :not([data-inline-card-lozenge] *, code)': {
828
828
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
829
829
  fontSize: 'var(--ak-renderer-base-font-size)'
830
830
  }
@@ -130,12 +130,21 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
130
130
  var padding = isFullPage ? FullPagePadding * 2 : 0;
131
131
  var calcDimensions = useCallback(function (mediaContainerWidth) {
132
132
  var containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
133
- var maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
134
- var maxHeight = height / width * maxWidth;
135
- var cardDimensions = {
136
- width: "".concat(maxWidth, "px"),
137
- height: "".concat(maxHeight, "px")
138
- };
133
+ var cardDimensions = {};
134
+ if (fg('media-perf-uplift-mutation-fix')) {
135
+ var maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
136
+ cardDimensions = {
137
+ width: "".concat(maxWidth, "px"),
138
+ height: "100%"
139
+ };
140
+ } else {
141
+ var _maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
142
+ var maxHeight = height / width * _maxWidth;
143
+ cardDimensions = {
144
+ width: "".concat(_maxWidth, "px"),
145
+ height: "".concat(maxHeight, "px")
146
+ };
147
+ }
139
148
  var nonFullWidthSize = containerWidth;
140
149
  if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
141
150
  var isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= akEditorDefaultLayoutWidth;
@@ -710,7 +710,7 @@ var codeMarkSharedStyles = css({
710
710
  });
711
711
  var extensionStyle = css({
712
712
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
713
- '.ak-renderer-extension :not([data-inline-card-lozenge] *)': {
713
+ '.ak-renderer-extension :not([data-inline-card-lozenge] *, code)': {
714
714
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
715
715
  fontSize: 'var(--ak-renderer-base-font-size)'
716
716
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "124.5.1",
3
+ "version": "124.5.3",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -57,8 +57,8 @@
57
57
  "@atlaskit/status": "^3.0.0",
58
58
  "@atlaskit/task-decision": "^19.2.0",
59
59
  "@atlaskit/theme": "^21.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^13.12.0",
61
- "@atlaskit/tokens": "^6.5.0",
60
+ "@atlaskit/tmp-editor-statsig": "^13.13.0",
61
+ "@atlaskit/tokens": "^7.0.0",
62
62
  "@atlaskit/tooltip": "^20.5.0",
63
63
  "@atlaskit/visually-hidden": "^3.0.0",
64
64
  "@babel/runtime": "^7.0.0",
@@ -250,6 +250,9 @@
250
250
  },
251
251
  "hot-121622_lazy_load_expand_content": {
252
252
  "type": "boolean"
253
+ },
254
+ "media-perf-uplift-mutation-fix": {
255
+ "type": "boolean"
253
256
  }
254
257
  }
255
258
  }