@atlaskit/renderer 124.7.0 → 124.8.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 124.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`18aec70029328`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/18aec70029328) -
8
+ EDITOR-2420 Rename parameter values of `dense` contentMode to `compact`
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 124.7.1
15
+
16
+ ### Patch Changes
17
+
18
+ - [`5771b6f88f16a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5771b6f88f16a) -
19
+ Clean up platform_editor_fix_image_size_diff_during_ssr
20
+ - Updated dependencies
21
+
3
22
  ## 124.7.0
4
23
 
5
24
  ### Minor Changes
@@ -12,9 +12,9 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var _react2 = require("@emotion/react");
13
13
  var _reactIntlNext = require("react-intl-next");
14
14
  var _ui = require("@atlaskit/editor-common/ui");
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
17
  var _coreUtils = require("@atlaskit/editor-common/core-utils");
17
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
18
  var _style = require("../../../ui/Renderer/style");
19
19
  var _AnnotationRangeContext = require("../../../ui/annotations/contexts/AnnotationRangeContext");
20
20
  var _AnnotationHoverContext = require("../../../ui/annotations/contexts/AnnotationHoverContext");
@@ -148,7 +148,7 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
148
148
  height: "100%"
149
149
  };
150
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;
151
+ var _maxWidth = (0, _coreUtils.isSSR)() && widthAttr && typeof widthAttr === 'number' ? Math.max(widthAttr, containerWidth) : containerWidth;
152
152
  var maxHeight = height / width * _maxWidth;
153
153
  cardDimensions = {
154
154
  width: "".concat(_maxWidth, "px"),
@@ -227,7 +227,7 @@ function Expand(_ref2) {
227
227
  return setFocused(false);
228
228
  }, []);
229
229
  var isCompactModeSupported = (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp');
230
- var isDense = rendererContentMode === 'dense' && isCompactModeSupported;
230
+ var isCompact = rendererContentMode === ((0, _expValEquals.expValEquals)('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense') && isCompactModeSupported;
231
231
  return (0, _react.jsx)(Container, {
232
232
  "data-testid": "expand-container-".concat(nodeType, "-").concat(id),
233
233
  "data-node-type": nodeType,
@@ -287,7 +287,7 @@ function Expand(_ref2) {
287
287
  spacing: "spacious",
288
288
  size: "small"
289
289
  }))), (0, _react.jsx)("span", {
290
- css: [titleStyles, isDense && titleStylesDense],
290
+ css: [titleStyles, isCompact && titleStylesDense],
291
291
  id: id
292
292
  }, title || intl.formatMessage(_ui.expandMessages.expandDefaultTitle))), (0, _react.jsx)(ContentContainer, {
293
293
  expanded: expanded
@@ -49,7 +49,6 @@ function BreakoutSSRInlineScript(_ref) {
49
49
  }
50
50
  function createBreakoutInlineScript(id, shouldSkipScript) {
51
51
  var flags = {
52
- platform_editor_fix_image_size_diff_during_ssr: (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr'),
53
52
  platform_editor_fix_media_in_renderer: (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer')
54
53
  };
55
54
  return "(function(window){\nif(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) { return; }\n".concat(breakoutInlineScriptContext, ";\n(").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(JSON.stringify(shouldSkipScript), ", ").concat(JSON.stringify(flags), ");\n})(window);\n");
@@ -111,7 +110,7 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
111
110
  if (!mode || !WIDE_LAYOUT_MODES.includes(mode) ||
112
111
  // skip apply width styling to mediaSingle node with pixel width to avoid image size changing
113
112
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
114
- isMediaSingleWithPixelWidth && flags['platform_editor_fix_image_size_diff_during_ssr'] && flags['platform_editor_fix_media_in_renderer']) {
113
+ isMediaSingleWithPixelWidth && flags['platform_editor_fix_media_in_renderer']) {
115
114
  return;
116
115
  }
117
116
 
@@ -8,7 +8,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
8
8
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
9
  var getBaseFontSize = exports.getBaseFontSize = function getBaseFontSize(appearance, contentMode) {
10
10
  if ((0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test')) {
11
- if (contentMode === 'dense') {
11
+ if (contentMode === ((0, _expValEquals.expValEquals)('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense')) {
12
12
  return _editorSharedStyles.akEditorFullPageDenseFontSize;
13
13
  }
14
14
  }
@@ -68,7 +68,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
68
68
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
69
69
  var TABLE_WIDTH_INFO_TIMEOUT = 10000;
70
70
  var packageName = "@atlaskit/renderer";
71
- var packageVersion = "124.6.0";
71
+ var packageVersion = "0.0.0-development";
72
72
  var setAsQueryContainerStyles = (0, _react2.css)({
73
73
  containerName: 'ak-renderer-wrapper',
74
74
  containerType: 'inline-size'
@@ -9,9 +9,9 @@ import { default as React, Fragment, useCallback, useContext, useMemo, useEffect
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl-next';
11
11
  import { MediaSingle as UIMediaSingle, WidthContext } from '@atlaskit/editor-common/ui';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
13
14
  import { isSSR } from '@atlaskit/editor-common/core-utils';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import { FullPagePadding } from '../../../ui/Renderer/style';
16
16
  import { useAnnotationRangeDispatch } from '../../../ui/annotations/contexts/AnnotationRangeContext';
17
17
  import { useAnnotationHoverDispatch } from '../../../ui/annotations/contexts/AnnotationHoverContext';
@@ -135,7 +135,7 @@ const MediaSingleWithChildren = props => {
135
135
  height: `100%`
136
136
  };
137
137
  } else {
138
- const maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
138
+ const maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' ? Math.max(widthAttr, containerWidth) : containerWidth;
139
139
  const maxHeight = height / width * maxWidth;
140
140
  cardDimensions = {
141
141
  width: `${maxWidth}px`,
@@ -207,7 +207,7 @@ function Expand({
207
207
  const handleFocus = useCallback(() => setFocused(true), []);
208
208
  const handleBlur = useCallback(() => setFocused(false), []);
209
209
  const isCompactModeSupported = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp');
210
- const isDense = rendererContentMode === 'dense' && isCompactModeSupported;
210
+ const isCompact = rendererContentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense') && isCompactModeSupported;
211
211
  return jsx(Container, {
212
212
  "data-testid": `expand-container-${nodeType}-${id}`,
213
213
  "data-node-type": nodeType,
@@ -267,7 +267,7 @@ function Expand({
267
267
  spacing: "spacious",
268
268
  size: "small"
269
269
  }))), jsx("span", {
270
- css: [titleStyles, isDense && titleStylesDense],
270
+ css: [titleStyles, isCompact && titleStylesDense],
271
271
  id: id
272
272
  }, title || intl.formatMessage(expandMessages.expandDefaultTitle))), jsx(ContentContainer, {
273
273
  expanded: expanded
@@ -41,7 +41,6 @@ export function BreakoutSSRInlineScript({
41
41
  }
42
42
  export function createBreakoutInlineScript(id, shouldSkipScript) {
43
43
  const flags = {
44
- platform_editor_fix_image_size_diff_during_ssr: fg('platform_editor_fix_image_size_diff_during_ssr'),
45
44
  platform_editor_fix_media_in_renderer: fg('platform_editor_fix_media_in_renderer')
46
45
  };
47
46
  return `(function(window){
@@ -116,7 +115,7 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
116
115
  if (!mode || !WIDE_LAYOUT_MODES.includes(mode) ||
117
116
  // skip apply width styling to mediaSingle node with pixel width to avoid image size changing
118
117
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
119
- isMediaSingleWithPixelWidth && flags['platform_editor_fix_image_size_diff_during_ssr'] && flags['platform_editor_fix_media_in_renderer']) {
118
+ isMediaSingleWithPixelWidth && flags['platform_editor_fix_media_in_renderer']) {
120
119
  return;
121
120
  }
122
121
 
@@ -2,7 +2,7 @@ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
3
  export const getBaseFontSize = (appearance, contentMode) => {
4
4
  if (expValEquals('cc_editor_ai_content_mode', 'variant', 'test')) {
5
- if (contentMode === 'dense') {
5
+ if (contentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense')) {
6
6
  return akEditorFullPageDenseFontSize;
7
7
  }
8
8
  }
@@ -54,7 +54,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
54
54
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
55
55
  const TABLE_WIDTH_INFO_TIMEOUT = 10000;
56
56
  const packageName = "@atlaskit/renderer";
57
- const packageVersion = "124.6.0";
57
+ const packageVersion = "0.0.0-development";
58
58
  const setAsQueryContainerStyles = css({
59
59
  containerName: 'ak-renderer-wrapper',
60
60
  containerType: 'inline-size'
@@ -10,9 +10,9 @@ import { default as React, Fragment, useCallback, useContext, useMemo, useEffect
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { injectIntl } from 'react-intl-next';
12
12
  import { MediaSingle as UIMediaSingle, WidthContext } from '@atlaskit/editor-common/ui';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { akEditorFullWidthLayoutWidth, akEditorDefaultLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
14
15
  import { isSSR } from '@atlaskit/editor-common/core-utils';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
16
  import { FullPagePadding } from '../../../ui/Renderer/style';
17
17
  import { useAnnotationRangeDispatch } from '../../../ui/annotations/contexts/AnnotationRangeContext';
18
18
  import { useAnnotationHoverDispatch } from '../../../ui/annotations/contexts/AnnotationHoverContext';
@@ -138,7 +138,7 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
138
138
  height: "100%"
139
139
  };
140
140
  } else {
141
- var _maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
141
+ var _maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' ? Math.max(widthAttr, containerWidth) : containerWidth;
142
142
  var maxHeight = height / width * _maxWidth;
143
143
  cardDimensions = {
144
144
  width: "".concat(_maxWidth, "px"),
@@ -218,7 +218,7 @@ function Expand(_ref2) {
218
218
  return setFocused(false);
219
219
  }, []);
220
220
  var isCompactModeSupported = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp');
221
- var isDense = rendererContentMode === 'dense' && isCompactModeSupported;
221
+ var isCompact = rendererContentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense') && isCompactModeSupported;
222
222
  return jsx(Container, {
223
223
  "data-testid": "expand-container-".concat(nodeType, "-").concat(id),
224
224
  "data-node-type": nodeType,
@@ -278,7 +278,7 @@ function Expand(_ref2) {
278
278
  spacing: "spacious",
279
279
  size: "small"
280
280
  }))), jsx("span", {
281
- css: [titleStyles, isDense && titleStylesDense],
281
+ css: [titleStyles, isCompact && titleStylesDense],
282
282
  id: id
283
283
  }, title || intl.formatMessage(expandMessages.expandDefaultTitle))), jsx(ContentContainer, {
284
284
  expanded: expanded
@@ -40,7 +40,6 @@ export function BreakoutSSRInlineScript(_ref) {
40
40
  }
41
41
  export function createBreakoutInlineScript(id, shouldSkipScript) {
42
42
  var flags = {
43
- platform_editor_fix_image_size_diff_during_ssr: fg('platform_editor_fix_image_size_diff_during_ssr'),
44
43
  platform_editor_fix_media_in_renderer: fg('platform_editor_fix_media_in_renderer')
45
44
  };
46
45
  return "(function(window){\nif(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) { return; }\n".concat(breakoutInlineScriptContext, ";\n(").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(JSON.stringify(shouldSkipScript), ", ").concat(JSON.stringify(flags), ");\n})(window);\n");
@@ -102,7 +101,7 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
102
101
  if (!mode || !WIDE_LAYOUT_MODES.includes(mode) ||
103
102
  // skip apply width styling to mediaSingle node with pixel width to avoid image size changing
104
103
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
105
- isMediaSingleWithPixelWidth && flags['platform_editor_fix_image_size_diff_during_ssr'] && flags['platform_editor_fix_media_in_renderer']) {
104
+ isMediaSingleWithPixelWidth && flags['platform_editor_fix_media_in_renderer']) {
106
105
  return;
107
106
  }
108
107
 
@@ -2,7 +2,7 @@ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
3
  export var getBaseFontSize = function getBaseFontSize(appearance, contentMode) {
4
4
  if (expValEquals('cc_editor_ai_content_mode', 'variant', 'test')) {
5
- if (contentMode === 'dense') {
5
+ if (contentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense')) {
6
6
  return akEditorFullPageDenseFontSize;
7
7
  }
8
8
  }
@@ -59,7 +59,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
60
60
  var TABLE_WIDTH_INFO_TIMEOUT = 10000;
61
61
  var packageName = "@atlaskit/renderer";
62
- var packageVersion = "124.6.0";
62
+ var packageVersion = "0.0.0-development";
63
63
  var setAsQueryContainerStyles = css({
64
64
  containerName: 'ak-renderer-wrapper',
65
65
  containerType: 'inline-size'
@@ -1,5 +1,5 @@
1
1
  export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | undefined;
2
- export type RendererContentMode = 'standard' | 'dense' | undefined;
2
+ export type RendererContentMode = 'standard' | 'dense' | 'compact' | undefined;
3
3
  /**
4
4
  * DO NOT USE THESE OPTIONS
5
5
  * These StickyHeaderConfig_DO_NOT_USE options are being TEMPORARILY added so Confluence can use Sticky Table Headers
@@ -1,5 +1,5 @@
1
1
  export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | undefined;
2
- export type RendererContentMode = 'standard' | 'dense' | undefined;
2
+ export type RendererContentMode = 'standard' | 'dense' | 'compact' | undefined;
3
3
  /**
4
4
  * DO NOT USE THESE OPTIONS
5
5
  * These StickyHeaderConfig_DO_NOT_USE options are being TEMPORARILY added so Confluence can use Sticky Table Headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "124.7.0",
3
+ "version": "124.8.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/editor-json-transformer": "^8.31.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
38
- "@atlaskit/editor-shared-styles": "^3.7.0",
38
+ "@atlaskit/editor-shared-styles": "^3.8.0",
39
39
  "@atlaskit/editor-tables": "^2.9.0",
40
40
  "@atlaskit/emoji": "^69.6.0",
41
41
  "@atlaskit/feature-gate-js-client": "^5.5.0",
@@ -53,13 +53,13 @@
53
53
  "@atlaskit/platform-feature-flags": "^1.1.0",
54
54
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
55
55
  "@atlaskit/react-ufo": "^4.12.0",
56
- "@atlaskit/smart-card": "^43.1.0",
56
+ "@atlaskit/smart-card": "^43.2.0",
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.13.0",
60
+ "@atlaskit/tmp-editor-statsig": "^13.14.0",
61
61
  "@atlaskit/tokens": "^7.0.0",
62
- "@atlaskit/tooltip": "^20.5.0",
62
+ "@atlaskit/tooltip": "^20.6.0",
63
63
  "@atlaskit/visually-hidden": "^3.0.0",
64
64
  "@babel/runtime": "^7.0.0",
65
65
  "@emotion/react": "^11.7.1",
@@ -71,7 +71,7 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^110.14.0",
74
+ "@atlaskit/editor-common": "^110.15.0",
75
75
  "@atlaskit/link-provider": "^4.0.0",
76
76
  "@atlaskit/media-core": "^37.0.0",
77
77
  "react": "^18.2.0",
@@ -94,7 +94,7 @@
94
94
  "@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
95
95
  "@atlaskit/profilecard": "^24.20.0",
96
96
  "@atlaskit/util-data-test": "^18.3.0",
97
- "@atlassian/feature-flags-test-utils": "^0.3.0",
97
+ "@atlassian/feature-flags-test-utils": "^1.0.0",
98
98
  "@testing-library/react": "^13.4.0",
99
99
  "@testing-library/react-hooks": "^8.0.1",
100
100
  "@testing-library/user-event": "^14.4.3",
@@ -206,9 +206,6 @@
206
206
  "platform_editor_bordered_panel_nested_in_table": {
207
207
  "type": "boolean"
208
208
  },
209
- "platform_editor_fix_image_size_diff_during_ssr": {
210
- "type": "boolean"
211
- },
212
209
  "smartcard_avatar_margin_fix": {
213
210
  "type": "boolean"
214
211
  },