@atlaskit/renderer 124.3.0 → 124.4.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,27 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 124.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`dbb9e84ab30e0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dbb9e84ab30e0) -
8
+ [ux] dense mode emoji icon in panel
9
+ - [`b647f715408c4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b647f715408c4) -
10
+ clean up platform_custom_number_column
11
+ - Updated dependencies
12
+
13
+ ## 124.4.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`2a9e8a0692fdc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2a9e8a0692fdc) -
18
+ [NO-ISSUE] Switch from using `cc_editor_ai_content_mode` param `baseFontSize` to having a proper
19
+ variable we can use for the sizing
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 124.3.0
4
26
 
5
27
  ### Minor Changes
@@ -116,7 +116,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
116
116
 
117
117
  // when table resized and number column is enabled, we need to scale down the table in render
118
118
  if (forceScaleForNumColumn) {
119
- var calculatedTableContainerWidth = rendererAppearance === 'comment' && (0, _platformFeatureFlags.fg)('platform_custom_number_column') ? sumOfColumns : tableContainerWidth;
119
+ var calculatedTableContainerWidth = rendererAppearance === 'comment' ? sumOfColumns : tableContainerWidth;
120
120
  var scalePercentage = +((calculatedTableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth) / calculatedTableContainerWidth);
121
121
  var targetMaxWidth = calculatedTableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth;
122
122
  var totalWidthAfterScale = 0;
@@ -1501,7 +1501,7 @@ var rendererAnnotationStylesCommentHeightFix = (0, _react.css)({
1501
1501
  // Default: 20px emoji at 16px base font
1502
1502
  // Scaled: 20px * (baseFontSize/16)
1503
1503
  // E.g., dense mode (13px base): 20px * (13/16) = 16.25px
1504
- var denseEmojiStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_emoji.EmojiSharedCssClassName.EMOJI_IMAGE), {
1504
+ var denseEmojiStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_emoji.EmojiSharedCssClassName.EMOJI_IMAGE), {
1505
1505
  height: "calc(".concat(_emoji.defaultEmojiHeight, " * var(--ak-renderer-base-font-size) / ").concat(_editorSharedStyles.akEditorFullPageDefaultFontSize, ")"),
1506
1506
  width: "calc(".concat(_emoji.defaultEmojiHeight, " * var(--ak-renderer-base-font-size) / ").concat(_editorSharedStyles.akEditorFullPageDefaultFontSize, ")"),
1507
1507
  maxHeight: "calc(".concat(_emoji.defaultEmojiHeight, " * var(--ak-renderer-base-font-size) / ").concat(_editorSharedStyles.akEditorFullPageDefaultFontSize, ")"),
@@ -1511,6 +1511,9 @@ var denseEmojiStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".".con
1511
1511
  height: '100%',
1512
1512
  objectFit: 'contain'
1513
1513
  }
1514
+ }), ".".concat(_consts.RendererCssClassName.DOCUMENT, " .ak-editor-panel .ak-editor-panel__icon"), {
1515
+ height: "var(--ds-space-250, 20px)",
1516
+ width: "var(--ds-space-250, 20px)"
1514
1517
  }));
1515
1518
  var RendererStyleContainer = exports.RendererStyleContainer = function RendererStyleContainer(props) {
1516
1519
  var onClick = props.onClick,
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getBaseFontSize = void 0;
7
7
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
8
- var _expVal = require("@atlaskit/tmp-editor-statsig/expVal");
9
8
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
9
  var getBaseFontSize = exports.getBaseFontSize = function getBaseFontSize(appearance, contentMode) {
11
10
  if ((0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test')) {
12
11
  if (contentMode === 'dense') {
13
- var baseFontSize = (0, _expVal.expVal)('cc_editor_ai_content_mode', 'baseFontSize', 13);
14
- return baseFontSize;
12
+ return _editorSharedStyles.akEditorFullPageDenseFontSize;
15
13
  }
16
14
  }
17
15
  return appearance && appearance !== 'comment' ? _editorSharedStyles.akEditorFullPageDefaultFontSize : 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.2.0";
71
+ var packageVersion = "124.4.0";
72
72
  var setAsQueryContainerStyles = (0, _react2.css)({
73
73
  containerName: 'ak-renderer-wrapper',
74
74
  containerType: 'inline-size'
@@ -103,7 +103,7 @@ const renderScaleDownColgroup = props => {
103
103
 
104
104
  // when table resized and number column is enabled, we need to scale down the table in render
105
105
  if (forceScaleForNumColumn) {
106
- const calculatedTableContainerWidth = rendererAppearance === 'comment' && fg('platform_custom_number_column') ? sumOfColumns : tableContainerWidth;
106
+ const calculatedTableContainerWidth = rendererAppearance === 'comment' ? sumOfColumns : tableContainerWidth;
107
107
  const scalePercentage = +((calculatedTableContainerWidth - akEditorTableNumberColumnWidth) / calculatedTableContainerWidth);
108
108
  const targetMaxWidth = calculatedTableContainerWidth - akEditorTableNumberColumnWidth;
109
109
  let totalWidthAfterScale = 0;
@@ -1914,6 +1914,12 @@ const denseEmojiStyles = css({
1914
1914
  height: '100%',
1915
1915
  objectFit: 'contain'
1916
1916
  }
1917
+ },
1918
+ // Scale panel icon
1919
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
1920
+ [`.${RendererCssClassName.DOCUMENT} .ak-editor-panel .ak-editor-panel__icon`]: {
1921
+ height: "var(--ds-space-250, 20px)",
1922
+ width: "var(--ds-space-250, 20px)"
1917
1923
  }
1918
1924
  });
1919
1925
  export const RendererStyleContainer = props => {
@@ -1,11 +1,9 @@
1
- import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
2
- import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
1
+ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '@atlaskit/editor-shared-styles';
3
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  export const getBaseFontSize = (appearance, contentMode) => {
5
4
  if (expValEquals('cc_editor_ai_content_mode', 'variant', 'test')) {
6
5
  if (contentMode === 'dense') {
7
- const baseFontSize = expVal('cc_editor_ai_content_mode', 'baseFontSize', 13);
8
- return baseFontSize;
6
+ return akEditorFullPageDenseFontSize;
9
7
  }
10
8
  }
11
9
  return appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : 14;
@@ -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.2.0";
57
+ const packageVersion = "124.4.0";
58
58
  const setAsQueryContainerStyles = css({
59
59
  containerName: 'ak-renderer-wrapper',
60
60
  containerType: 'inline-size'
@@ -110,7 +110,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
110
110
 
111
111
  // when table resized and number column is enabled, we need to scale down the table in render
112
112
  if (forceScaleForNumColumn) {
113
- var calculatedTableContainerWidth = rendererAppearance === 'comment' && fg('platform_custom_number_column') ? sumOfColumns : tableContainerWidth;
113
+ var calculatedTableContainerWidth = rendererAppearance === 'comment' ? sumOfColumns : tableContainerWidth;
114
114
  var scalePercentage = +((calculatedTableContainerWidth - akEditorTableNumberColumnWidth) / calculatedTableContainerWidth);
115
115
  var targetMaxWidth = calculatedTableContainerWidth - akEditorTableNumberColumnWidth;
116
116
  var totalWidthAfterScale = 0;
@@ -1494,7 +1494,7 @@ var rendererAnnotationStylesCommentHeightFix = css({
1494
1494
  // Default: 20px emoji at 16px base font
1495
1495
  // Scaled: 20px * (baseFontSize/16)
1496
1496
  // E.g., dense mode (13px base): 20px * (13/16) = 16.25px
1497
- var denseEmojiStyles = css(_defineProperty({}, ".".concat(EmojiSharedCssClassName.EMOJI_IMAGE), {
1497
+ var denseEmojiStyles = css(_defineProperty(_defineProperty({}, ".".concat(EmojiSharedCssClassName.EMOJI_IMAGE), {
1498
1498
  height: "calc(".concat(defaultEmojiHeight, " * var(--ak-renderer-base-font-size) / ").concat(akEditorFullPageDefaultFontSize, ")"),
1499
1499
  width: "calc(".concat(defaultEmojiHeight, " * var(--ak-renderer-base-font-size) / ").concat(akEditorFullPageDefaultFontSize, ")"),
1500
1500
  maxHeight: "calc(".concat(defaultEmojiHeight, " * var(--ak-renderer-base-font-size) / ").concat(akEditorFullPageDefaultFontSize, ")"),
@@ -1504,6 +1504,9 @@ var denseEmojiStyles = css(_defineProperty({}, ".".concat(EmojiSharedCssClassNam
1504
1504
  height: '100%',
1505
1505
  objectFit: 'contain'
1506
1506
  }
1507
+ }), ".".concat(RendererCssClassName.DOCUMENT, " .ak-editor-panel .ak-editor-panel__icon"), {
1508
+ height: "var(--ds-space-250, 20px)",
1509
+ width: "var(--ds-space-250, 20px)"
1507
1510
  }));
1508
1511
  export var RendererStyleContainer = function RendererStyleContainer(props) {
1509
1512
  var onClick = props.onClick,
@@ -1,11 +1,9 @@
1
- import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
2
- import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
1
+ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '@atlaskit/editor-shared-styles';
3
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  export var getBaseFontSize = function getBaseFontSize(appearance, contentMode) {
5
4
  if (expValEquals('cc_editor_ai_content_mode', 'variant', 'test')) {
6
5
  if (contentMode === 'dense') {
7
- var baseFontSize = expVal('cc_editor_ai_content_mode', 'baseFontSize', 13);
8
- return baseFontSize;
6
+ return akEditorFullPageDenseFontSize;
9
7
  }
10
8
  }
11
9
  return appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : 14;
@@ -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.2.0";
62
+ var packageVersion = "124.4.0";
63
63
  var setAsQueryContainerStyles = css({
64
64
  containerName: 'ak-renderer-wrapper',
65
65
  containerType: 'inline-size'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "124.3.0",
3
+ "version": "124.4.1",
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.30.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
38
- "@atlaskit/editor-shared-styles": "^3.6.0",
38
+ "@atlaskit/editor-shared-styles": "^3.7.0",
39
39
  "@atlaskit/editor-tables": "^2.9.0",
40
40
  "@atlaskit/emoji": "^69.5.0",
41
41
  "@atlaskit/feature-gate-js-client": "^5.5.0",
@@ -71,7 +71,7 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^110.10.0",
74
+ "@atlaskit/editor-common": "^110.11.0",
75
75
  "@atlaskit/link-provider": "^4.0.0",
76
76
  "@atlaskit/media-core": "^37.0.0",
77
77
  "react": "^18.2.0",
@@ -236,9 +236,6 @@
236
236
  "platform_table_number_column": {
237
237
  "type": "boolean"
238
238
  },
239
- "platform_custom_number_column": {
240
- "type": "boolean"
241
- },
242
239
  "platform_editor_numbered_column_in_include": {
243
240
  "type": "boolean"
244
241
  },