@atlaskit/renderer 120.1.6 → 120.1.8

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
+ ## 120.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#187914](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187914)
8
+ [`b0e2ddab3570f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b0e2ddab3570f) -
9
+ [ux] Fix avatar group alignment in block card container
10
+
11
+ ## 120.1.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [#184123](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/184123)
16
+ [`3b9f5e54172a8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3b9f5e54172a8) -
17
+ [COMPLEXIT-273] Clean up feature gate cc_complexit_reduce_portal_rerenders
18
+
3
19
  ## 120.1.6
4
20
 
5
21
  ### Patch Changes
@@ -0,0 +1,129 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.townsquare.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../townsquare/tsDist/@atlaskit__renderer/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*"
18
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../adf-utils/afm-townsquare/tsconfig.json"
22
+ },
23
+ {
24
+ "path": "../../../analytics/analytics-listeners/afm-townsquare/tsconfig.json"
25
+ },
26
+ {
27
+ "path": "../../../analytics/analytics-namespaced-context/afm-townsquare/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../../analytics/analytics-next/afm-townsquare/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../../design-system/button/afm-townsquare/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../../design-system/code/afm-townsquare/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../editor-json-transformer/afm-townsquare/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../editor-palette/afm-townsquare/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../editor-shared-styles/afm-townsquare/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../editor-tables/afm-townsquare/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../../elements/emoji/afm-townsquare/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../../measurement/feature-gate-js-client/afm-townsquare/tsconfig.json"
55
+ },
56
+ {
57
+ "path": "../../../design-system/icon/afm-townsquare/tsconfig.json"
58
+ },
59
+ {
60
+ "path": "../../../design-system/link/afm-townsquare/tsconfig.json"
61
+ },
62
+ {
63
+ "path": "../../../linking-platform/link-datasource/afm-townsquare/tsconfig.json"
64
+ },
65
+ {
66
+ "path": "../../../media/media-card/afm-townsquare/tsconfig.json"
67
+ },
68
+ {
69
+ "path": "../../../media/media-client/afm-townsquare/tsconfig.json"
70
+ },
71
+ {
72
+ "path": "../../../media/media-client-react/afm-townsquare/tsconfig.json"
73
+ },
74
+ {
75
+ "path": "../../../media/media-common/afm-townsquare/tsconfig.json"
76
+ },
77
+ {
78
+ "path": "../../../media/media-filmstrip/afm-townsquare/tsconfig.json"
79
+ },
80
+ {
81
+ "path": "../../../media/media-ui/afm-townsquare/tsconfig.json"
82
+ },
83
+ {
84
+ "path": "../../../media/media-viewer/afm-townsquare/tsconfig.json"
85
+ },
86
+ {
87
+ "path": "../../../platform/feature-flags/afm-townsquare/tsconfig.json"
88
+ },
89
+ {
90
+ "path": "../../../platform/feature-flags-react/afm-townsquare/tsconfig.json"
91
+ },
92
+ {
93
+ "path": "../../../react-ufo/atlaskit/afm-townsquare/tsconfig.json"
94
+ },
95
+ {
96
+ "path": "../../../linking-platform/smart-card/afm-townsquare/tsconfig.json"
97
+ },
98
+ {
99
+ "path": "../../../elements/status/afm-townsquare/tsconfig.json"
100
+ },
101
+ {
102
+ "path": "../../../elements/task-decision/afm-townsquare/tsconfig.json"
103
+ },
104
+ {
105
+ "path": "../../../design-system/theme/afm-townsquare/tsconfig.json"
106
+ },
107
+ {
108
+ "path": "../../tmp-editor-statsig/afm-townsquare/tsconfig.json"
109
+ },
110
+ {
111
+ "path": "../../../design-system/tokens/afm-townsquare/tsconfig.json"
112
+ },
113
+ {
114
+ "path": "../../../design-system/tooltip/afm-townsquare/tsconfig.json"
115
+ },
116
+ {
117
+ "path": "../../../design-system/visually-hidden/afm-townsquare/tsconfig.json"
118
+ },
119
+ {
120
+ "path": "../../editor-common/afm-townsquare/tsconfig.json"
121
+ },
122
+ {
123
+ "path": "../../../linking-platform/link-provider/afm-townsquare/tsconfig.json"
124
+ },
125
+ {
126
+ "path": "../../../media/media-core/afm-townsquare/tsconfig.json"
127
+ }
128
+ ]
129
+ }
@@ -11,6 +11,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
11
11
  var _styles = require("@atlaskit/editor-common/styles");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
13
  var _lists = require("../utils/lists");
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  function OrderedList(props) {
15
16
  var _props$content;
16
17
  var extraProps = {};
@@ -18,7 +19,7 @@ function OrderedList(props) {
18
19
  order: props.order,
19
20
  itemsCount: props === null || props === void 0 || (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
20
21
  });
21
- if (itemCounterDigitsSize && itemCounterDigitsSize > 2) {
22
+ if (itemCounterDigitsSize && itemCounterDigitsSize > ((0, _platformFeatureFlags.fg)('platform_editor_ol_padding_fix') ? 1 : 2)) {
22
23
  extraProps.style = (0, _styles.getOrderedListInlineStyles)(itemCounterDigitsSize, 'object');
23
24
  }
24
25
  if (props.order !== undefined) {
@@ -4,20 +4,12 @@ var _typeof = require("@babel/runtime/helpers/typeof");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.usePortal = exports.PortalContext = void 0;
7
+ exports.PortalContext = void 0;
8
+ exports.usePortal = usePortal;
8
9
  var _react = _interopRequireWildcard(require("react"));
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
11
11
  var PortalContext = exports.PortalContext = /*#__PURE__*/_react.default.createContext(undefined);
12
- var usePortal = exports.usePortal = function usePortal() {
13
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
14
- portalFromProps = _ref.portal;
12
+ function usePortal(props) {
15
13
  var portalFromContext = (0, _react.useContext)(PortalContext);
16
- if (portalFromProps) {
17
- return portalFromProps;
18
- }
19
- if ((0, _platformFeatureFlags.fg)('cc_complexit_reduce_portal_rerenders')) {
20
- return portalFromContext;
21
- }
22
- return undefined;
23
- };
14
+ return (props === null || props === void 0 ? void 0 : props.portal) || portalFromContext;
15
+ }
@@ -748,11 +748,20 @@ var smartCardStylesAvatarFix = (0, _react.css)((0, _defineProperty2.default)({},
748
748
  }
749
749
  /* EDM-11991: Fix list plugin add padding to ADS AvatarGroup end */
750
750
  }));
751
+
752
+ // fg smartcard_avatar_margin_fix
751
753
  var smartCardStylesAvatarMarginFix = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
752
754
  'ul, ol': {
753
755
  marginRight: 'inherit'
754
756
  }
755
757
  }));
758
+
759
+ // fg platform_editor_avatar_group_margin_fix
760
+ var smartCardStylesAvatarMarginFix2 = (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(_styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
761
+ 'ul, ol': {
762
+ marginTop: 0
763
+ }
764
+ }));
756
765
  var baseOtherStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
757
766
  '& .UnknownBlock': {
758
767
  fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
@@ -1422,7 +1431,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
1422
1431
  '--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
1423
1432
  '--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
1424
1433
  },
1425
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _platformFeatureFlags.fg)('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix,
1434
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _platformFeatureFlags.fg)('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, (0, _platformFeatureFlags.fg)('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
1426
1435
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
1427
1436
  (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1428
1437
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
@@ -62,7 +62,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
62
62
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
63
63
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  var packageName = "@atlaskit/renderer";
65
- var packageVersion = "120.1.5";
65
+ var packageVersion = "120.1.7";
66
66
  var setAsQueryContainerStyles = (0, _react2.css)({
67
67
  containerName: 'ak-renderer-wrapper',
68
68
  containerType: 'inline-size'
@@ -460,23 +460,18 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
460
460
  }
461
461
  };
462
462
  var RendererFunctionalComponentMemoized = /*#__PURE__*/_react.default.memo(RendererFunctionalComponent);
463
- var RendererFunctionalComponentWithPortalContext = function RendererFunctionalComponentWithPortalContext(props) {
463
+ var RendererFunctionalComponentWithPortalContext = /*#__PURE__*/_react.default.memo(function (props) {
464
+ // If nodeComponents are provided, we don't remove portal from props and use context instead,
465
+ // because we can't guarantee compatibility with existing Atlaskit Renderer consumers.
466
+ if (props.nodeComponents) {
467
+ return /*#__PURE__*/_react.default.createElement(RendererFunctionalComponentMemoized, props);
468
+ }
464
469
  var portal = props.portal,
465
470
  propsWithoutPortal = (0, _objectWithoutProperties2.default)(props, _excluded);
466
471
  return (0, _react2.jsx)(_PortalContext.PortalContext.Provider, {
467
472
  value: portal
468
- }, (0, _react2.jsx)(RendererFunctionalComponent, propsWithoutPortal));
469
- };
470
- var RendererFunctionalComponentWithPortalContextMemoized = /*#__PURE__*/_react.default.memo(RendererFunctionalComponentWithPortalContext);
471
- var getRendererComponent = function getRendererComponent(nodeComponents) {
472
- // If nodeComponents are provided, for now we don't want to remove portal from props
473
- // and use context instead because at this time we cannot guarantee that existing
474
- // consumers of Atlaskit Renderer will update to use the new portal context.
475
- if (!Boolean(nodeComponents) && (0, _platformFeatureFlags.fg)('cc_complexit_reduce_portal_rerenders')) {
476
- return RendererFunctionalComponentWithPortalContextMemoized;
477
- }
478
- return RendererFunctionalComponentMemoized;
479
- };
473
+ }, /*#__PURE__*/_react.default.createElement(RendererFunctionalComponent, propsWithoutPortal));
474
+ });
480
475
 
481
476
  /**
482
477
  *
@@ -497,8 +492,7 @@ function Renderer(props) {
497
492
  allowNestedTables: allowNestedTables
498
493
  };
499
494
  }, [allowNestedTables]);
500
- var RendererComponent = getRendererComponent(props.nodeComponents);
501
- return (0, _react2.jsx)(RendererComponent
495
+ return (0, _react2.jsx)(RendererFunctionalComponentWithPortalContext
502
496
  // Ignored via go/ees005
503
497
  // eslint-disable-next-line react/jsx-props-no-spreading
504
498
  , (0, _extends2.default)({}, props, {
@@ -4,6 +4,7 @@ import { orderedListSelector } from '@atlaskit/adf-schema';
4
4
  import { getOrderedListInlineStyles } from '@atlaskit/editor-common/styles';
5
5
  import { getItemCounterDigitsSize, resolveOrder } from '@atlaskit/editor-common/utils';
6
6
  import { getListIndentLevel } from '../utils/lists';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  export default function OrderedList(props) {
8
9
  var _props$content;
9
10
  const extraProps = {};
@@ -11,7 +12,7 @@ export default function OrderedList(props) {
11
12
  order: props.order,
12
13
  itemsCount: props === null || props === void 0 ? void 0 : (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
13
14
  });
14
- if (itemCounterDigitsSize && itemCounterDigitsSize > 2) {
15
+ if (itemCounterDigitsSize && itemCounterDigitsSize > (fg('platform_editor_ol_padding_fix') ? 1 : 2)) {
15
16
  extraProps.style = getOrderedListInlineStyles(itemCounterDigitsSize, 'object');
16
17
  }
17
18
  if (props.order !== undefined) {
@@ -1,15 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  export const PortalContext = /*#__PURE__*/React.createContext(undefined);
4
- export const usePortal = ({
5
- portal: portalFromProps
6
- } = {}) => {
3
+ export function usePortal(props) {
7
4
  const portalFromContext = useContext(PortalContext);
8
- if (portalFromProps) {
9
- return portalFromProps;
10
- }
11
- if (fg('cc_complexit_reduce_portal_rerenders')) {
12
- return portalFromContext;
13
- }
14
- return undefined;
15
- };
5
+ return (props === null || props === void 0 ? void 0 : props.portal) || portalFromContext;
6
+ }
@@ -876,6 +876,8 @@ const smartCardStylesAvatarFix = css({
876
876
  /* EDM-11991: Fix list plugin add padding to ADS AvatarGroup end */
877
877
  }
878
878
  });
879
+
880
+ // fg smartcard_avatar_margin_fix
879
881
  const smartCardStylesAvatarMarginFix = css({
880
882
  [`.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER}`]: {
881
883
  'ul, ol': {
@@ -883,6 +885,15 @@ const smartCardStylesAvatarMarginFix = css({
883
885
  }
884
886
  }
885
887
  });
888
+
889
+ // fg platform_editor_avatar_group_margin_fix
890
+ const smartCardStylesAvatarMarginFix2 = css({
891
+ [`.${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER}`]: {
892
+ 'ul, ol': {
893
+ marginTop: 0
894
+ }
895
+ }
896
+ });
886
897
  const baseOtherStyles = css({
887
898
  '& .UnknownBlock': {
888
899
  fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
@@ -1816,7 +1827,7 @@ export const RendererStyleContainer = props => {
1816
1827
  '--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
1817
1828
  '--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
1818
1829
  },
1819
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix,
1830
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
1820
1831
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
1821
1832
  fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1822
1833
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
@@ -48,7 +48,7 @@ import { PortalContext } from './PortalContext';
48
48
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  const packageName = "@atlaskit/renderer";
51
- const packageVersion = "120.1.5";
51
+ const packageVersion = "120.1.7";
52
52
  const setAsQueryContainerStyles = css({
53
53
  containerName: 'ak-renderer-wrapper',
54
54
  containerType: 'inline-size'
@@ -443,25 +443,20 @@ export const RendererFunctionalComponent = props => {
443
443
  }
444
444
  };
445
445
  const RendererFunctionalComponentMemoized = /*#__PURE__*/React.memo(RendererFunctionalComponent);
446
- const RendererFunctionalComponentWithPortalContext = props => {
446
+ const RendererFunctionalComponentWithPortalContext = /*#__PURE__*/React.memo(props => {
447
+ // If nodeComponents are provided, we don't remove portal from props and use context instead,
448
+ // because we can't guarantee compatibility with existing Atlaskit Renderer consumers.
449
+ if (props.nodeComponents) {
450
+ return /*#__PURE__*/React.createElement(RendererFunctionalComponentMemoized, props);
451
+ }
447
452
  const {
448
453
  portal,
449
454
  ...propsWithoutPortal
450
455
  } = props;
451
456
  return jsx(PortalContext.Provider, {
452
457
  value: portal
453
- }, jsx(RendererFunctionalComponent, propsWithoutPortal));
454
- };
455
- const RendererFunctionalComponentWithPortalContextMemoized = /*#__PURE__*/React.memo(RendererFunctionalComponentWithPortalContext);
456
- const getRendererComponent = nodeComponents => {
457
- // If nodeComponents are provided, for now we don't want to remove portal from props
458
- // and use context instead because at this time we cannot guarantee that existing
459
- // consumers of Atlaskit Renderer will update to use the new portal context.
460
- if (!Boolean(nodeComponents) && fg('cc_complexit_reduce_portal_rerenders')) {
461
- return RendererFunctionalComponentWithPortalContextMemoized;
462
- }
463
- return RendererFunctionalComponentMemoized;
464
- };
458
+ }, /*#__PURE__*/React.createElement(RendererFunctionalComponent, propsWithoutPortal));
459
+ });
465
460
 
466
461
  /**
467
462
  *
@@ -483,8 +478,7 @@ export function Renderer(props) {
483
478
  const validationOverrides = useMemo(() => ({
484
479
  allowNestedTables
485
480
  }), [allowNestedTables]);
486
- const RendererComponent = getRendererComponent(props.nodeComponents);
487
- return jsx(RendererComponent
481
+ return jsx(RendererFunctionalComponentWithPortalContext
488
482
  // Ignored via go/ees005
489
483
  // eslint-disable-next-line react/jsx-props-no-spreading
490
484
  , _extends({}, props, {
@@ -4,6 +4,7 @@ import { orderedListSelector } from '@atlaskit/adf-schema';
4
4
  import { getOrderedListInlineStyles } from '@atlaskit/editor-common/styles';
5
5
  import { getItemCounterDigitsSize, resolveOrder } from '@atlaskit/editor-common/utils';
6
6
  import { getListIndentLevel } from '../utils/lists';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  export default function OrderedList(props) {
8
9
  var _props$content;
9
10
  var extraProps = {};
@@ -11,7 +12,7 @@ export default function OrderedList(props) {
11
12
  order: props.order,
12
13
  itemsCount: props === null || props === void 0 || (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
13
14
  });
14
- if (itemCounterDigitsSize && itemCounterDigitsSize > 2) {
15
+ if (itemCounterDigitsSize && itemCounterDigitsSize > (fg('platform_editor_ol_padding_fix') ? 1 : 2)) {
15
16
  extraProps.style = getOrderedListInlineStyles(itemCounterDigitsSize, 'object');
16
17
  }
17
18
  if (props.order !== undefined) {
@@ -1,15 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  export var PortalContext = /*#__PURE__*/React.createContext(undefined);
4
- export var usePortal = function usePortal() {
5
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
6
- portalFromProps = _ref.portal;
3
+ export function usePortal(props) {
7
4
  var portalFromContext = useContext(PortalContext);
8
- if (portalFromProps) {
9
- return portalFromProps;
10
- }
11
- if (fg('cc_complexit_reduce_portal_rerenders')) {
12
- return portalFromContext;
13
- }
14
- return undefined;
15
- };
5
+ return (props === null || props === void 0 ? void 0 : props.portal) || portalFromContext;
6
+ }
@@ -741,11 +741,20 @@ var smartCardStylesAvatarFix = css(_defineProperty({}, ".".concat(SmartCardShare
741
741
  }
742
742
  /* EDM-11991: Fix list plugin add padding to ADS AvatarGroup end */
743
743
  }));
744
+
745
+ // fg smartcard_avatar_margin_fix
744
746
  var smartCardStylesAvatarMarginFix = css(_defineProperty({}, ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
745
747
  'ul, ol': {
746
748
  marginRight: 'inherit'
747
749
  }
748
750
  }));
751
+
752
+ // fg platform_editor_avatar_group_margin_fix
753
+ var smartCardStylesAvatarMarginFix2 = css(_defineProperty({}, ".".concat(SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER), {
754
+ 'ul, ol': {
755
+ marginTop: 0
756
+ }
757
+ }));
749
758
  var baseOtherStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
750
759
  '& .UnknownBlock': {
751
760
  fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
@@ -1415,7 +1424,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
1415
1424
  '--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
1416
1425
  '--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
1417
1426
  },
1418
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix,
1427
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
1419
1428
  // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
1420
1429
  fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1421
1430
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
@@ -53,7 +53,7 @@ import { PortalContext } from './PortalContext';
53
53
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
54
54
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
55
55
  var packageName = "@atlaskit/renderer";
56
- var packageVersion = "120.1.5";
56
+ var packageVersion = "120.1.7";
57
57
  var setAsQueryContainerStyles = css({
58
58
  containerName: 'ak-renderer-wrapper',
59
59
  containerType: 'inline-size'
@@ -451,23 +451,18 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
451
451
  }
452
452
  };
453
453
  var RendererFunctionalComponentMemoized = /*#__PURE__*/React.memo(RendererFunctionalComponent);
454
- var RendererFunctionalComponentWithPortalContext = function RendererFunctionalComponentWithPortalContext(props) {
454
+ var RendererFunctionalComponentWithPortalContext = /*#__PURE__*/React.memo(function (props) {
455
+ // If nodeComponents are provided, we don't remove portal from props and use context instead,
456
+ // because we can't guarantee compatibility with existing Atlaskit Renderer consumers.
457
+ if (props.nodeComponents) {
458
+ return /*#__PURE__*/React.createElement(RendererFunctionalComponentMemoized, props);
459
+ }
455
460
  var portal = props.portal,
456
461
  propsWithoutPortal = _objectWithoutProperties(props, _excluded);
457
462
  return jsx(PortalContext.Provider, {
458
463
  value: portal
459
- }, jsx(RendererFunctionalComponent, propsWithoutPortal));
460
- };
461
- var RendererFunctionalComponentWithPortalContextMemoized = /*#__PURE__*/React.memo(RendererFunctionalComponentWithPortalContext);
462
- var getRendererComponent = function getRendererComponent(nodeComponents) {
463
- // If nodeComponents are provided, for now we don't want to remove portal from props
464
- // and use context instead because at this time we cannot guarantee that existing
465
- // consumers of Atlaskit Renderer will update to use the new portal context.
466
- if (!Boolean(nodeComponents) && fg('cc_complexit_reduce_portal_rerenders')) {
467
- return RendererFunctionalComponentWithPortalContextMemoized;
468
- }
469
- return RendererFunctionalComponentMemoized;
470
- };
464
+ }, /*#__PURE__*/React.createElement(RendererFunctionalComponent, propsWithoutPortal));
465
+ });
471
466
 
472
467
  /**
473
468
  *
@@ -488,8 +483,7 @@ export function Renderer(props) {
488
483
  allowNestedTables: allowNestedTables
489
484
  };
490
485
  }, [allowNestedTables]);
491
- var RendererComponent = getRendererComponent(props.nodeComponents);
492
- return jsx(RendererComponent
486
+ return jsx(RendererFunctionalComponentWithPortalContext
493
487
  // Ignored via go/ees005
494
488
  // eslint-disable-next-line react/jsx-props-no-spreading
495
489
  , _extends({}, props, {
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { RendererProps } from '../renderer-props';
3
3
  export declare const PortalContext: React.Context<HTMLElement | undefined>;
4
- export declare const usePortal: ({ portal: portalFromProps, }?: {
5
- portal?: RendererProps['portal'];
6
- }) => HTMLElement | undefined;
4
+ export declare function usePortal(props?: Pick<RendererProps, 'portal'>): HTMLElement | undefined;
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { RendererProps } from '../renderer-props';
3
3
  export declare const PortalContext: React.Context<HTMLElement | undefined>;
4
- export declare const usePortal: ({ portal: portalFromProps, }?: {
5
- portal?: RendererProps['portal'];
6
- }) => HTMLElement | undefined;
4
+ export declare function usePortal(props?: Pick<RendererProps, 'portal'>): HTMLElement | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "120.1.6",
3
+ "version": "120.1.8",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,13 +33,13 @@
33
33
  "@atlaskit/editor-json-transformer": "^8.24.0",
34
34
  "@atlaskit/editor-palette": "^2.1.0",
35
35
  "@atlaskit/editor-prosemirror": "7.0.0",
36
- "@atlaskit/editor-shared-styles": "^3.4.0",
36
+ "@atlaskit/editor-shared-styles": "^3.5.0",
37
37
  "@atlaskit/editor-tables": "^2.9.0",
38
38
  "@atlaskit/emoji": "^69.3.0",
39
39
  "@atlaskit/feature-gate-js-client": "^5.5.0",
40
- "@atlaskit/icon": "^27.3.0",
40
+ "@atlaskit/icon": "^27.5.0",
41
41
  "@atlaskit/link": "^3.2.0",
42
- "@atlaskit/link-datasource": "^4.13.0",
42
+ "@atlaskit/link-datasource": "^4.14.0",
43
43
  "@atlaskit/media-card": "^79.4.0",
44
44
  "@atlaskit/media-client": "^35.1.0",
45
45
  "@atlaskit/media-client-react": "^4.1.0",
@@ -49,13 +49,13 @@
49
49
  "@atlaskit/media-viewer": "^52.4.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
52
- "@atlaskit/react-ufo": "^4.0.0",
53
- "@atlaskit/smart-card": "^40.2.0",
52
+ "@atlaskit/react-ufo": "^4.1.0",
53
+ "@atlaskit/smart-card": "^40.4.0",
54
54
  "@atlaskit/status": "^3.0.0",
55
55
  "@atlaskit/task-decision": "^19.2.0",
56
56
  "@atlaskit/theme": "^19.0.0",
57
- "@atlaskit/tmp-editor-statsig": "^9.7.0",
58
- "@atlaskit/tokens": "^5.5.0",
57
+ "@atlaskit/tmp-editor-statsig": "^9.9.0",
58
+ "@atlaskit/tokens": "^5.6.0",
59
59
  "@atlaskit/tooltip": "^20.3.0",
60
60
  "@atlaskit/visually-hidden": "^3.0.0",
61
61
  "@babel/runtime": "^7.0.0",
@@ -68,7 +68,7 @@
68
68
  "uuid": "^3.1.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "@atlaskit/editor-common": "^107.8.0",
71
+ "@atlaskit/editor-common": "^107.9.0",
72
72
  "@atlaskit/link-provider": "^3.4.0",
73
73
  "@atlaskit/media-core": "^37.0.0",
74
74
  "react": "^18.2.0",
@@ -82,12 +82,12 @@
82
82
  "@atlaskit/css-reset": "^7.3.0",
83
83
  "@atlaskit/link-provider": "^3.4.0",
84
84
  "@atlaskit/link-test-helpers": "^8.2.0",
85
- "@atlaskit/linking-common": "^9.1.0",
85
+ "@atlaskit/linking-common": "^9.2.0",
86
86
  "@atlaskit/media-core": "^37.0.0",
87
87
  "@atlaskit/media-integration-test-helpers": "workspace:^",
88
88
  "@atlaskit/media-test-helpers": "^37.0.0",
89
89
  "@atlaskit/mention": "^24.2.0",
90
- "@atlaskit/modal-dialog": "^14.2.0",
90
+ "@atlaskit/modal-dialog": "^14.3.0",
91
91
  "@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-d1445f2f74.patch",
92
92
  "@atlaskit/profilecard": "^23.21.0",
93
93
  "@atlaskit/util-data-test": "^18.0.0",
@@ -142,9 +142,6 @@
142
142
  "platform_fix_nested_num_column_scaling": {
143
143
  "type": "boolean"
144
144
  },
145
- "cc_complexit_reduce_portal_rerenders": {
146
- "type": "boolean"
147
- },
148
145
  "cc_complexit_fe_reduce_rerender_2": {
149
146
  "type": "boolean"
150
147
  },
@@ -273,6 +270,12 @@
273
270
  },
274
271
  "platform_custom_number_column": {
275
272
  "type": "boolean"
273
+ },
274
+ "platform_editor_ol_padding_fix": {
275
+ "type": "boolean"
276
+ },
277
+ "platform_editor_avatar_group_margin_fix": {
278
+ "type": "boolean"
276
279
  }
277
280
  },
278
281
  "af:exports": {