@atlaskit/editor-common 107.8.2 → 107.8.4

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/editor-common
2
2
 
3
+ ## 107.8.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#185940](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185940)
8
+ [`456bee393c4d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/456bee393c4d3) -
9
+ [ux] When editor-area is less than 768px wide, we reduce editor gutters to 24px in Full-page
10
+ editor.
11
+ - [#183772](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183772)
12
+ [`8b2280a6cd32a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b2280a6cd32a) -
13
+ [ux] ED-28391: Added panel hover button for jira in edit mode"
14
+ - Updated dependencies
15
+
16
+ ## 107.8.3
17
+
18
+ ### Patch Changes
19
+
20
+ - [#187144](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187144)
21
+ [`a16147d8fbdfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a16147d8fbdfe) -
22
+ Bump @atlaskit/adf-schema to v49.0.5
23
+ - Updated dependencies
24
+
3
25
  ## 107.8.2
4
26
 
5
27
  ### Patch Changes
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
14
  var _hooks = require("../../../hooks");
14
15
  var _ui = require("../../../ui");
15
16
  var _Lozenge = _interopRequireDefault(require("../Lozenge"));
@@ -65,7 +66,15 @@ var InlineExtension = function InlineExtension(props) {
65
66
  'with-danger-overlay': showMacroInteractionDesignUpdates,
66
67
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
67
68
  });
68
- var rendererContainerWidth = widthState.width ? widthState.width - (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 : 0;
69
+ var rendererContainerWidth = 0;
70
+ if ((0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
71
+ if (widthState.width) {
72
+ var padding = widthState.width > _editorSharedStyles.akEditorFullPageNarrowBreakout ? (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() : _editorSharedStyles.akEditorGutterPaddingReduced;
73
+ rendererContainerWidth = widthState.width - padding * 2;
74
+ }
75
+ } else {
76
+ rendererContainerWidth = widthState.width ? widthState.width - (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 : 0;
77
+ }
69
78
  var handleMouseEvent = function handleMouseEvent(didHover) {
70
79
  if (setIsNodeHovered) {
71
80
  setIsNodeHovered(didHover);
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.isVerticalPosition = exports.isRange = exports.isNumber = exports.getMediaSingleDimensions = exports.getGuidelineTypeFromKey = exports.getContainerWidthOrFullEditorWidth = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
10
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
11
  var _mediaSingle = require("../media-single");
11
12
  var isNumber = exports.isNumber = function isNumber(x) {
12
13
  return typeof x === 'number' && !isNaN(x) && isFinite(x);
@@ -60,7 +61,8 @@ var getGuidelineTypeFromKey = exports.getGuidelineTypeFromKey = function getGuid
60
61
  * width and editor gutter padding.
61
62
  */
62
63
  var getContainerWidthOrFullEditorWidth = exports.getContainerWidthOrFullEditorWidth = function getContainerWidthOrFullEditorWidth(containerWidth) {
63
- return Math.min(containerWidth - (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2, _editorSharedStyles.akEditorFullWidthLayoutWidth) / 2;
64
+ var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
65
+ return Math.min(containerWidth - padding * 2, _editorSharedStyles.akEditorFullWidthLayoutWidth) / 2;
64
66
  };
65
67
 
66
68
  /**
@@ -10,6 +10,7 @@ exports.getMediaSinglePixelWidth = getMediaSinglePixelWidth;
10
10
  exports.roundToNearest = exports.getParentWidthForNestedMediaSingleNodeForInsertion = exports.getParentWidthForNestedMediaSingleNode = void 0;
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
14
  var _richMediaUtils = require("../utils/rich-media-utils");
14
15
  var _constants = require("./constants");
15
16
  /**
@@ -102,7 +103,8 @@ var calcLegacyWideWidth = function calcLegacyWideWidth(containerWidth, origWidth
102
103
  * @param containerWidth width of editor container
103
104
  */
104
105
  var calcMediaSingleMaxWidth = exports.calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth, editorAppearance) {
105
- var fullWidthPadding = editorAppearance === 'full-page' ? (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 : _editorSharedStyles.akEditorGutterPadding * 2;
106
+ var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
107
+ var fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : _editorSharedStyles.akEditorGutterPadding * 2;
106
108
  return Math.min(containerWidth - fullWidthPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
107
109
  };
108
110
 
@@ -66,6 +66,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
66
66
  defaultMessage: 'Open',
67
67
  description: 'Title for a button that opens a link when clicked.'
68
68
  },
69
+ panelButtonTitle: {
70
+ id: 'fabric.editor.panelButtonTitle',
71
+ defaultMessage: 'Panel',
72
+ description: 'Title for a button that opens side panel when clicked.'
73
+ },
69
74
  embedTitle: {
70
75
  id: 'fabric.editor.embedTitle',
71
76
  defaultMessage: 'Embed',
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "107.8.1";
19
+ var packageVersion = "107.8.3";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -11,6 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
11
11
  var _bindEventListener = require("bind-event-listener");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
13
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
15
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
16
  var _analytics = require("../analytics");
16
17
  var _styles = require("../styles");
@@ -159,7 +160,8 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
159
160
  state = editorView.state;
160
161
  displayGapCursor(false);
161
162
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
162
- newMaxWidth = Math.min(widthState.width - (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 - _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
163
+ var padding = widthState.width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
164
+ newMaxWidth = Math.min(widthState.width - padding * 2 - _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
163
165
  newMinWidth = Math.min(widthState.lineLength, _editorSharedStyles.akEditorDefaultLayoutWidth, newMaxWidth);
164
166
  }
165
167
  setResizingState({
@@ -10,6 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = require("react");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
14
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
15
  var SNAP_GAP = exports.SNAP_GAP = 8;
15
16
  var GUIDELINE_KEYS = {
@@ -42,7 +43,8 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
42
43
  // when the page is full width, the calculation of wide is wrong.
43
44
  // Actuall the wide is the wide breakout point, which is
44
45
  var wide = (0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
45
- var layoutCalculatedWidth = width ? width - ((0, _editorSharedStyles.akEditorGutterPaddingDynamic)() + dynamicFullWidthGuidelineOffset) * 2 : undefined;
46
+ var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
47
+ var layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
46
48
  var fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth) : undefined;
47
49
  return {
48
50
  wide: wide,
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "107.8.1";
26
+ var packageVersion = "107.8.3";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -7,7 +7,8 @@ import React, { Fragment } from 'react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
- import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
10
+ import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../../hooks';
12
13
  import { createWidthContext, WidthContext } from '../../../ui';
13
14
  import ExtensionLozenge from '../Lozenge';
@@ -61,7 +62,15 @@ const InlineExtension = props => {
61
62
  'with-danger-overlay': showMacroInteractionDesignUpdates,
62
63
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
63
64
  });
64
- const rendererContainerWidth = widthState.width ? widthState.width - akEditorGutterPaddingDynamic() * 2 : 0;
65
+ let rendererContainerWidth = 0;
66
+ if (expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
67
+ if (widthState.width) {
68
+ const padding = widthState.width > akEditorFullPageNarrowBreakout ? akEditorGutterPaddingDynamic() : akEditorGutterPaddingReduced;
69
+ rendererContainerWidth = widthState.width - padding * 2;
70
+ }
71
+ } else {
72
+ rendererContainerWidth = widthState.width ? widthState.width - akEditorGutterPaddingDynamic() * 2 : 0;
73
+ }
65
74
  const handleMouseEvent = didHover => {
66
75
  if (setIsNodeHovered) {
67
76
  setIsNodeHovered(didHover);
@@ -1,4 +1,5 @@
1
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
1
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
3
  import { getMediaSinglePixelWidth, roundToNearest } from '../media-single';
3
4
  export const isNumber = x => typeof x === 'number' && !isNaN(x) && isFinite(x);
4
5
  export const isRange = range => !!(typeof range === 'object' && range && 'start' in range && 'end' in range);
@@ -33,7 +34,10 @@ export const getGuidelineTypeFromKey = (keys, guidelines) => {
33
34
  * Calculates container or full editor width taking in account editor full width layout
34
35
  * width and editor gutter padding.
35
36
  */
36
- export const getContainerWidthOrFullEditorWidth = containerWidth => Math.min(containerWidth - akEditorGutterPaddingDynamic() * 2, akEditorFullWidthLayoutWidth) / 2;
37
+ export const getContainerWidthOrFullEditorWidth = containerWidth => {
38
+ const padding = containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
+ return Math.min(containerWidth - padding * 2, akEditorFullWidthLayoutWidth) / 2;
40
+ };
37
41
 
38
42
  /**
39
43
  *
@@ -1,5 +1,6 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
4
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
4
5
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
5
6
 
@@ -90,7 +91,8 @@ const calcLegacyWideWidth = (containerWidth, origWidth, contentWidth) => {
90
91
  * @param containerWidth width of editor container
91
92
  */
92
93
  export const calcMediaSingleMaxWidth = (containerWidth, editorAppearance) => {
93
- const fullWidthPadding = editorAppearance === 'full-page' ? akEditorGutterPaddingDynamic() * 2 : akEditorGutterPadding * 2;
94
+ const fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
95
+ const fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : akEditorGutterPadding * 2;
94
96
  return Math.min(containerWidth - fullWidthPadding, akEditorFullWidthLayoutWidth);
95
97
  };
96
98
 
@@ -60,6 +60,11 @@ export const messages = defineMessages({
60
60
  defaultMessage: 'Open',
61
61
  description: 'Title for a button that opens a link when clicked.'
62
62
  },
63
+ panelButtonTitle: {
64
+ id: 'fabric.editor.panelButtonTitle',
65
+ defaultMessage: 'Panel',
66
+ description: 'Title for a button that opens side panel when clicked.'
67
+ },
63
68
  embedTitle: {
64
69
  id: 'fabric.editor.embedTitle',
65
70
  defaultMessage: 'Embed',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "107.8.1";
4
+ const packageVersion = "107.8.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -1,7 +1,8 @@
1
1
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2
2
  import { bind, bindAll } from 'bind-event-listener';
3
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
3
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
7
8
  import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
@@ -152,7 +153,8 @@ const BreakoutResizer = ({
152
153
  } = editorView;
153
154
  displayGapCursor(false);
154
155
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
155
- newMaxWidth = Math.min(widthState.width - akEditorGutterPaddingDynamic() * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
156
+ const padding = widthState.width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
157
+ newMaxWidth = Math.min(widthState.width - padding * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
156
158
  newMinWidth = Math.min(widthState.lineLength, akEditorDefaultLayoutWidth, newMaxWidth);
157
159
  }
158
160
  setResizingState({
@@ -1,6 +1,7 @@
1
1
  import { useCallback, useMemo, useState } from 'react';
2
- import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
+ import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
6
  export const SNAP_GAP = 8;
6
7
  const GUIDELINE_KEYS = {
@@ -34,7 +35,8 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing, dynamicFullWid
34
35
  // when the page is full width, the calculation of wide is wrong.
35
36
  // Actuall the wide is the wide breakout point, which is
36
37
  const wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
37
- const layoutCalculatedWidth = width ? width - (akEditorGutterPaddingDynamic() + dynamicFullWidthGuidelineOffset) * 2 : undefined;
38
+ const padding = width && width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
+ const layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
38
40
  const fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, akEditorFullWidthLayoutWidth) : undefined;
39
41
  return {
40
42
  wide,
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "107.8.1";
16
+ const packageVersion = "107.8.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -7,7 +7,8 @@ import React, { Fragment } from 'react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
- import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
10
+ import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../../hooks';
12
13
  import { createWidthContext, WidthContext } from '../../../ui';
13
14
  import ExtensionLozenge from '../Lozenge';
@@ -55,7 +56,15 @@ var InlineExtension = function InlineExtension(props) {
55
56
  'with-danger-overlay': showMacroInteractionDesignUpdates,
56
57
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
57
58
  });
58
- var rendererContainerWidth = widthState.width ? widthState.width - akEditorGutterPaddingDynamic() * 2 : 0;
59
+ var rendererContainerWidth = 0;
60
+ if (expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
61
+ if (widthState.width) {
62
+ var padding = widthState.width > akEditorFullPageNarrowBreakout ? akEditorGutterPaddingDynamic() : akEditorGutterPaddingReduced;
63
+ rendererContainerWidth = widthState.width - padding * 2;
64
+ }
65
+ } else {
66
+ rendererContainerWidth = widthState.width ? widthState.width - akEditorGutterPaddingDynamic() * 2 : 0;
67
+ }
59
68
  var handleMouseEvent = function handleMouseEvent(didHover) {
60
69
  if (setIsNodeHovered) {
61
70
  setIsNodeHovered(didHover);
@@ -1,5 +1,6 @@
1
1
  import _typeof from "@babel/runtime/helpers/typeof";
2
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
2
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
4
  import { getMediaSinglePixelWidth, roundToNearest } from '../media-single';
4
5
  export var isNumber = function isNumber(x) {
5
6
  return typeof x === 'number' && !isNaN(x) && isFinite(x);
@@ -53,7 +54,8 @@ export var getGuidelineTypeFromKey = function getGuidelineTypeFromKey(keys, guid
53
54
  * width and editor gutter padding.
54
55
  */
55
56
  export var getContainerWidthOrFullEditorWidth = function getContainerWidthOrFullEditorWidth(containerWidth) {
56
- return Math.min(containerWidth - akEditorGutterPaddingDynamic() * 2, akEditorFullWidthLayoutWidth) / 2;
57
+ var padding = containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
58
+ return Math.min(containerWidth - padding * 2, akEditorFullWidthLayoutWidth) / 2;
57
59
  };
58
60
 
59
61
  /**
@@ -1,5 +1,6 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
4
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
4
5
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
5
6
 
@@ -93,7 +94,8 @@ var calcLegacyWideWidth = function calcLegacyWideWidth(containerWidth, origWidth
93
94
  * @param containerWidth width of editor container
94
95
  */
95
96
  export var calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth, editorAppearance) {
96
- var fullWidthPadding = editorAppearance === 'full-page' ? akEditorGutterPaddingDynamic() * 2 : akEditorGutterPadding * 2;
97
+ var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
98
+ var fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : akEditorGutterPadding * 2;
97
99
  return Math.min(containerWidth - fullWidthPadding, akEditorFullWidthLayoutWidth);
98
100
  };
99
101
 
@@ -60,6 +60,11 @@ export var messages = defineMessages({
60
60
  defaultMessage: 'Open',
61
61
  description: 'Title for a button that opens a link when clicked.'
62
62
  },
63
+ panelButtonTitle: {
64
+ id: 'fabric.editor.panelButtonTitle',
65
+ defaultMessage: 'Panel',
66
+ description: 'Title for a button that opens side panel when clicked.'
67
+ },
63
68
  embedTitle: {
64
69
  id: 'fabric.editor.embedTitle',
65
70
  defaultMessage: 'Embed',
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "107.8.1";
10
+ var packageVersion = "107.8.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -1,8 +1,9 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3
3
  import { bind, bindAll } from 'bind-event-listener';
4
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
4
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
8
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
8
9
  import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
@@ -150,7 +151,8 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
150
151
  state = editorView.state;
151
152
  displayGapCursor(false);
152
153
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
153
- newMaxWidth = Math.min(widthState.width - akEditorGutterPaddingDynamic() * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
154
+ var padding = widthState.width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
155
+ newMaxWidth = Math.min(widthState.width - padding * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
154
156
  newMinWidth = Math.min(widthState.lineLength, akEditorDefaultLayoutWidth, newMaxWidth);
155
157
  }
156
158
  setResizingState({
@@ -1,7 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useCallback, useMemo, useState } from 'react';
3
- import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
+ import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  export var SNAP_GAP = 8;
7
8
  var GUIDELINE_KEYS = {
@@ -34,7 +35,8 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
34
35
  // when the page is full width, the calculation of wide is wrong.
35
36
  // Actuall the wide is the wide breakout point, which is
36
37
  var wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
37
- var layoutCalculatedWidth = width ? width - (akEditorGutterPaddingDynamic() + dynamicFullWidthGuidelineOffset) * 2 : undefined;
38
+ var padding = width && width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
+ var layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
38
40
  var fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, akEditorFullWidthLayoutWidth) : undefined;
39
41
  return {
40
42
  wide: wide,
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "107.8.1";
23
+ var packageVersion = "107.8.3";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -59,6 +59,11 @@ export declare const messages: {
59
59
  defaultMessage: string;
60
60
  description: string;
61
61
  };
62
+ panelButtonTitle: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
62
67
  embedTitle: {
63
68
  id: string;
64
69
  defaultMessage: string;
@@ -59,6 +59,11 @@ export declare const messages: {
59
59
  defaultMessage: string;
60
60
  description: string;
61
61
  };
62
+ panelButtonTitle: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
62
67
  embedTitle: {
63
68
  id: string;
64
69
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "107.8.2",
3
+ "version": "107.8.4",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -137,7 +137,7 @@
137
137
  "@atlaskit/editor-json-transformer": "^8.24.0",
138
138
  "@atlaskit/editor-palette": "^2.1.0",
139
139
  "@atlaskit/editor-prosemirror": "7.0.0",
140
- "@atlaskit/editor-shared-styles": "^3.4.0",
140
+ "@atlaskit/editor-shared-styles": "^3.5.0",
141
141
  "@atlaskit/editor-tables": "^2.9.0",
142
142
  "@atlaskit/emoji": "^69.3.0",
143
143
  "@atlaskit/icon": "^27.3.0",
@@ -170,7 +170,7 @@
170
170
  "@atlaskit/task-decision": "^19.2.0",
171
171
  "@atlaskit/textfield": "^8.0.0",
172
172
  "@atlaskit/theme": "^19.0.0",
173
- "@atlaskit/tmp-editor-statsig": "^9.7.0",
173
+ "@atlaskit/tmp-editor-statsig": "^9.8.0",
174
174
  "@atlaskit/tokens": "^5.5.0",
175
175
  "@atlaskit/tooltip": "^20.3.0",
176
176
  "@atlaskit/width-detector": "^5.0.0",