@atlaskit/renderer 113.2.0 → 113.2.2

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.
@@ -0,0 +1,4 @@
1
+ import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
2
+ export const getBaseFontSize = appearance => {
3
+ return appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : 14;
4
+ };
@@ -22,7 +22,6 @@ import { FabricChannel } from '@atlaskit/analytics-listeners/types';
22
22
  import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
23
23
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
24
24
  import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
25
- import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
26
25
  import memoizeOne from 'memoize-one';
27
26
  import uuid from 'uuid/v4';
28
27
  import { ReactSerializer, renderDocument } from '../../';
@@ -40,13 +39,15 @@ import { ErrorBoundary } from './ErrorBoundary';
40
39
  import { BreakoutSSRInlineScript } from './breakout-ssr';
41
40
  import { isInteractiveElement } from './click-to-edit';
42
41
  import { countNodes } from './count-nodes';
43
- import { TELEPOINTER_ID, rendererStyles } from './style';
42
+ import { TELEPOINTER_ID } from './style';
44
43
  import { TruncatedWrapper } from './truncated-wrapper';
45
44
  import { ValidationContext } from './ValidationContext';
45
+ import { RendererStyleContainer } from './RendererStyleContainer';
46
+ import { getBaseFontSize } from './get-base-font-size';
46
47
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
47
48
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
48
49
  const packageName = "@atlaskit/renderer";
49
- const packageVersion = "113.2.0";
50
+ const packageVersion = "113.2.2";
50
51
  const setAsQueryContainerStyles = css({
51
52
  containerName: 'ak-renderer-wrapper',
52
53
  containerType: 'inline-size',
@@ -938,23 +939,19 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
938
939
  "data-appearance": appearance,
939
940
  shouldCheckExistingValue: isInsideOfInlineExtension
940
941
  }, jsx(BaseTheme, {
941
- baseFontSize: appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : undefined
942
+ baseFontSize: getBaseFontSize(appearance)
942
943
  }, jsx(EditorMediaClientProvider, {
943
944
  ssr: ssr
944
- }, jsx("div", {
945
- ref: innerRef,
945
+ }, jsx(RendererStyleContainer, {
946
+ innerRef: innerRef,
946
947
  onClick: onClick,
947
- onMouseDown: onMouseDown
948
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
949
- ,
950
- css: rendererStyles({
951
- appearance,
952
- allowNestedHeaderLinks,
953
- allowColumnSorting: !!allowColumnSorting,
954
- useBlockRenderForCodeBlock,
955
- allowAnnotations: props.allowAnnotations,
956
- allowTableResizing: allowTableResizing
957
- })
948
+ onMouseDown: onMouseDown,
949
+ appearance: appearance,
950
+ allowNestedHeaderLinks: allowNestedHeaderLinks,
951
+ allowColumnSorting: !!allowColumnSorting,
952
+ useBlockRenderForCodeBlock: useBlockRenderForCodeBlock,
953
+ allowAnnotations: props.allowAnnotations,
954
+ allowTableResizing: allowTableResizing
958
955
  }, children))));
959
956
 
960
957
  // We can only make the wrapper div query container when we have a known width.