@atlaskit/renderer 109.40.11 → 109.41.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,21 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.41.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#118748](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118748)
8
+ [`10bb9e2def098`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10bb9e2def098) -
9
+ [ux] Reduce media single max width padding for all editors except full page
10
+
11
+ ### Patch Changes
12
+
13
+ - [#118372](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118372)
14
+ [`9f3d530e68972`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9f3d530e68972) -
15
+ Cleanup of table ff, when table is resized and num column is enabled, the table is not in
16
+ overflow.
17
+ - Updated dependencies
18
+
3
19
  ## 109.40.11
4
20
 
5
21
  ### Patch Changes
@@ -76,7 +76,8 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
76
76
  isInsideOfInlineExtension = _props$isInsideOfInli === void 0 ? false : _props$isInsideOfInli,
77
77
  dataAttributes = props.dataAttributes,
78
78
  media = props.media,
79
- caption = props.caption;
79
+ caption = props.caption,
80
+ editorAppearance = props.editorAppearance;
80
81
  var _React$useState = _react.default.useState({
81
82
  width: 0,
82
83
  height: 0
@@ -216,7 +217,8 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
216
217
  },
217
218
  fullWidthMode: isFullWidth,
218
219
  isInsideOfInlineExtension: isInsideOfInlineExtension,
219
- dataAttributes: dataAttributes
220
+ dataAttributes: dataAttributes,
221
+ editorAppearance: editorAppearance
220
222
  }, (0, _react2.jsx)(_react.Fragment, null, mediaComponent), allowCaptions && caption);
221
223
  };
222
224
  return renderMediaSingle();
@@ -85,8 +85,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
85
85
  // tables in the wild may be smaller than table container width (col resizing bugs, created before custom widths etc.)
86
86
  // this causes issues with num column scaling as we add a new table column in renderer
87
87
  var isTableSmallerThanContainer = sumOfColumns < tableContainerWidth - 1;
88
- var forceScaleForNumColumn = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.scale-table-when-number-column-in-table-resized_y4qh2') && isTableScalingEnabled && isNumberColumnEnabled && tableResized;
89
-
88
+ var forceScaleForNumColumn = isTableScalingEnabled && isNumberColumnEnabled && tableResized;
90
89
  // when table resized and number column is enabled, we need to scale down the table in render
91
90
  if (forceScaleForNumColumn) {
92
91
  var scalePercentage = +((tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth) / tableContainerWidth);
@@ -131,7 +130,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
131
130
  var scaleDownPercent = 0;
132
131
  var isTableScalingWithFixedColumnWidthsOptionEnabled = isTableScalingEnabled && isTableFixedColumnWidthsOptionEnabled;
133
132
  var isTableWidthFixed = isTableScalingWithFixedColumnWidthsOptionEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
134
- var maxScalingPercent = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.use-increased-scaling-percent') && isTableScalingWithFixedColumnWidthsOptionEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
133
+ var maxScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled && (0, _platformFeatureFlags.fg)('platform.editor.table.use-increased-scaling-percent') ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
135
134
 
136
135
  // fixes migration tables with zero-width columns
137
136
  if (zeroWidthColumnsCount > 0) {
@@ -56,7 +56,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
56
56
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
57
57
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
58
58
  var packageName = "@atlaskit/renderer";
59
- var packageVersion = "109.40.11";
59
+ var packageVersion = "109.41.0";
60
60
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
61
61
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
62
62
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -62,7 +62,8 @@ const MediaSingleWithChildren = props => {
62
62
  isInsideOfInlineExtension = false,
63
63
  dataAttributes,
64
64
  media,
65
- caption
65
+ caption,
66
+ editorAppearance
66
67
  } = props;
67
68
  const [externalImageDimensions, setExternalImageDimensions] = React.useState({
68
69
  width: 0,
@@ -202,7 +203,8 @@ const MediaSingleWithChildren = props => {
202
203
  },
203
204
  fullWidthMode: isFullWidth,
204
205
  isInsideOfInlineExtension: isInsideOfInlineExtension,
205
- dataAttributes: dataAttributes
206
+ dataAttributes: dataAttributes,
207
+ editorAppearance: editorAppearance
206
208
  }, jsx(Fragment, null, mediaComponent), allowCaptions && caption);
207
209
  };
208
210
  return renderMediaSingle();
@@ -3,7 +3,7 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
3
3
  import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
4
4
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
5
5
  import { isTableResizingEnabled } from '../table';
6
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import { useFeatureFlags } from '../../../use-feature-flags';
8
8
  // we allow scaling down column widths by no more than 30%
9
9
  // this intends to reduce unwanted scrolling in the Renderer in these scenarios:
@@ -72,8 +72,7 @@ const renderScaleDownColgroup = props => {
72
72
  // tables in the wild may be smaller than table container width (col resizing bugs, created before custom widths etc.)
73
73
  // this causes issues with num column scaling as we add a new table column in renderer
74
74
  const isTableSmallerThanContainer = sumOfColumns < tableContainerWidth - 1;
75
- const forceScaleForNumColumn = getBooleanFF('platform.editor.scale-table-when-number-column-in-table-resized_y4qh2') && isTableScalingEnabled && isNumberColumnEnabled && tableResized;
76
-
75
+ const forceScaleForNumColumn = isTableScalingEnabled && isNumberColumnEnabled && tableResized;
77
76
  // when table resized and number column is enabled, we need to scale down the table in render
78
77
  if (forceScaleForNumColumn) {
79
78
  const scalePercentage = +((tableContainerWidth - akEditorTableNumberColumnWidth) / tableContainerWidth);
@@ -118,7 +117,7 @@ const renderScaleDownColgroup = props => {
118
117
  let scaleDownPercent = 0;
119
118
  const isTableScalingWithFixedColumnWidthsOptionEnabled = isTableScalingEnabled && isTableFixedColumnWidthsOptionEnabled;
120
119
  const isTableWidthFixed = isTableScalingWithFixedColumnWidthsOptionEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
121
- const maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') && isTableScalingWithFixedColumnWidthsOptionEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
120
+ const maxScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled && fg('platform.editor.table.use-increased-scaling-percent') ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
122
121
 
123
122
  // fixes migration tables with zero-width columns
124
123
  if (zeroWidthColumnsCount > 0) {
@@ -38,7 +38,7 @@ import { nodeToReact } from '../../react/nodes';
38
38
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
39
39
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
40
40
  const packageName = "@atlaskit/renderer";
41
- const packageVersion = "109.40.11";
41
+ const packageVersion = "109.41.0";
42
42
  export const defaultNodeComponents = nodeToReact;
43
43
  export class Renderer extends PureComponent {
44
44
  constructor(props) {
@@ -65,7 +65,8 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
65
65
  isInsideOfInlineExtension = _props$isInsideOfInli === void 0 ? false : _props$isInsideOfInli,
66
66
  dataAttributes = props.dataAttributes,
67
67
  media = props.media,
68
- caption = props.caption;
68
+ caption = props.caption,
69
+ editorAppearance = props.editorAppearance;
69
70
  var _React$useState = React.useState({
70
71
  width: 0,
71
72
  height: 0
@@ -205,7 +206,8 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
205
206
  },
206
207
  fullWidthMode: isFullWidth,
207
208
  isInsideOfInlineExtension: isInsideOfInlineExtension,
208
- dataAttributes: dataAttributes
209
+ dataAttributes: dataAttributes,
210
+ editorAppearance: editorAppearance
209
211
  }, jsx(Fragment, null, mediaComponent), allowCaptions && caption);
210
212
  };
211
213
  return renderMediaSingle();
@@ -6,7 +6,7 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
6
6
  import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
7
7
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
8
8
  import { isTableResizingEnabled } from '../table';
9
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { useFeatureFlags } from '../../../use-feature-flags';
11
11
  // we allow scaling down column widths by no more than 30%
12
12
  // this intends to reduce unwanted scrolling in the Renderer in these scenarios:
@@ -78,8 +78,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
78
78
  // tables in the wild may be smaller than table container width (col resizing bugs, created before custom widths etc.)
79
79
  // this causes issues with num column scaling as we add a new table column in renderer
80
80
  var isTableSmallerThanContainer = sumOfColumns < tableContainerWidth - 1;
81
- var forceScaleForNumColumn = getBooleanFF('platform.editor.scale-table-when-number-column-in-table-resized_y4qh2') && isTableScalingEnabled && isNumberColumnEnabled && tableResized;
82
-
81
+ var forceScaleForNumColumn = isTableScalingEnabled && isNumberColumnEnabled && tableResized;
83
82
  // when table resized and number column is enabled, we need to scale down the table in render
84
83
  if (forceScaleForNumColumn) {
85
84
  var scalePercentage = +((tableContainerWidth - akEditorTableNumberColumnWidth) / tableContainerWidth);
@@ -124,7 +123,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
124
123
  var scaleDownPercent = 0;
125
124
  var isTableScalingWithFixedColumnWidthsOptionEnabled = isTableScalingEnabled && isTableFixedColumnWidthsOptionEnabled;
126
125
  var isTableWidthFixed = isTableScalingWithFixedColumnWidthsOptionEnabled && ((_props$tableNode = props.tableNode) === null || _props$tableNode === void 0 ? void 0 : _props$tableNode.attrs.displayMode) === 'fixed';
127
- var maxScalingPercent = getBooleanFF('platform.editor.table.use-increased-scaling-percent') && isTableScalingWithFixedColumnWidthsOptionEnabled ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
126
+ var maxScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled && fg('platform.editor.table.use-increased-scaling-percent') ? MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION : MAX_SCALING_PERCENT;
128
127
 
129
128
  // fixes migration tables with zero-width columns
130
129
  if (zeroWidthColumnsCount > 0) {
@@ -48,7 +48,7 @@ import { nodeToReact } from '../../react/nodes';
48
48
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  var packageName = "@atlaskit/renderer";
51
- var packageVersion = "109.40.11";
51
+ var packageVersion = "109.41.0";
52
52
  export var defaultNodeComponents = nodeToReact;
53
53
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
54
54
  _inherits(Renderer, _PureComponent);
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  import type { WrappedComponentProps } from 'react-intl-next';
3
3
  import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
4
4
  import type { MediaFeatureFlags } from '@atlaskit/media-common';
5
+ import type { EditorAppearance } from '@atlaskit/editor-common/types';
5
6
  import type { EventHandlers, MediaSingleWidthType } from '@atlaskit/editor-common/ui';
6
7
  import type { AnalyticsEventPayload } from '../../../analytics/events';
7
8
  import type { RendererAppearance } from '../../../ui/Renderer/types';
@@ -18,6 +19,7 @@ export interface Props {
18
19
  allowCaptions?: boolean;
19
20
  isInsideOfInlineExtension?: boolean;
20
21
  dataAttributes?: Record<string, any>;
22
+ editorAppearance?: EditorAppearance;
21
23
  }
22
24
  export declare const getMediaContainerWidth: (currentContainerWidth: number, layout: MediaSingleLayout) => number;
23
25
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  import type { WrappedComponentProps } from 'react-intl-next';
3
3
  import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
4
4
  import type { MediaFeatureFlags } from '@atlaskit/media-common';
5
+ import type { EditorAppearance } from '@atlaskit/editor-common/types';
5
6
  import type { EventHandlers, MediaSingleWidthType } from '@atlaskit/editor-common/ui';
6
7
  import type { AnalyticsEventPayload } from '../../../analytics/events';
7
8
  import type { RendererAppearance } from '../../../ui/Renderer/types';
@@ -18,6 +19,7 @@ export interface Props {
18
19
  allowCaptions?: boolean;
19
20
  isInsideOfInlineExtension?: boolean;
20
21
  dataAttributes?: Record<string, any>;
22
+ editorAppearance?: EditorAppearance;
21
23
  }
22
24
  export declare const getMediaContainerWidth: (currentContainerWidth: number, layout: MediaSingleLayout) => number;
23
25
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.40.11",
3
+ "version": "109.41.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,11 +31,11 @@
31
31
  "@atlaskit/analytics-next": "^9.3.0",
32
32
  "@atlaskit/button": "^18.3.0",
33
33
  "@atlaskit/code": "^15.4.0",
34
- "@atlaskit/editor-common": "^84.3.0",
34
+ "@atlaskit/editor-common": "^84.4.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.15.0",
36
36
  "@atlaskit/editor-palette": "1.6.0",
37
37
  "@atlaskit/editor-prosemirror": "4.0.1",
38
- "@atlaskit/editor-shared-styles": "^2.12.0",
38
+ "@atlaskit/editor-shared-styles": "^2.13.0",
39
39
  "@atlaskit/emoji": "^67.6.0",
40
40
  "@atlaskit/feature-gate-js-client": "^4.18.0",
41
41
  "@atlaskit/icon": "^22.6.0",
@@ -134,9 +134,6 @@
134
134
  "platform.editor.renderer-error-boundary-for-dom-errors": {
135
135
  "type": "boolean"
136
136
  },
137
- "platform.editor.scale-table-when-number-column-in-table-resized_y4qh2": {
138
- "type": "boolean"
139
- },
140
137
  "platform.editor.table.use-increased-scaling-percent": {
141
138
  "type": "boolean"
142
139
  },