@atlaskit/editor-common 109.10.0 → 109.10.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 109.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`45c6f8d40f9ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/45c6f8d40f9ac) -
8
+ Bump i18n pkg versions for atlaskit packages for including license field
9
+ - Updated dependencies
10
+
11
+ ## 109.10.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`6b6eca9cee16d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b6eca9cee16d) -
16
+ Switch to use editorExperiment to use productKey for responsive preview panel changes.
17
+ - Updated dependencies
18
+
3
19
  ## 109.10.0
4
20
 
5
21
  ### Minor Changes
@@ -10,7 +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
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
14
  var _hooks = require("../../../hooks");
15
15
  var _ui = require("../../../ui");
16
16
  var _Lozenge = _interopRequireDefault(require("../Lozenge"));
@@ -50,7 +50,9 @@ var InlineExtension = function InlineExtension(props) {
50
50
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
51
51
  });
52
52
  var rendererContainerWidth = 0;
53
- if ((0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
53
+ if ((0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
54
+ exposure: true
55
+ })) {
54
56
  if (width) {
55
57
  var padding = width > _editorSharedStyles.akEditorFullPageNarrowBreakout ? (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() : _editorSharedStyles.akEditorGutterPaddingReduced;
56
58
  rendererContainerWidth = width - padding * 2;
@@ -7,7 +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
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
11
  var _mediaSingle = require("../media-single");
12
12
  var isNumber = exports.isNumber = function isNumber(x) {
13
13
  return typeof x === 'number' && !isNaN(x) && isFinite(x);
@@ -61,7 +61,9 @@ var getGuidelineTypeFromKey = exports.getGuidelineTypeFromKey = function getGuid
61
61
  * width and editor gutter padding.
62
62
  */
63
63
  var getContainerWidthOrFullEditorWidth = exports.getContainerWidthOrFullEditorWidth = function getContainerWidthOrFullEditorWidth(containerWidth) {
64
- var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
64
+ var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
65
+ exposure: true
66
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
65
67
  return Math.min(containerWidth - padding * 2, _editorSharedStyles.akEditorFullWidthLayoutWidth) / 2;
66
68
  };
67
69
 
@@ -10,7 +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
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
14
  var _richMediaUtils = require("../utils/rich-media-utils");
15
15
  var _constants = require("./constants");
16
16
  /**
@@ -103,7 +103,9 @@ var calcLegacyWideWidth = function calcLegacyWideWidth(containerWidth, origWidth
103
103
  * @param containerWidth width of editor container
104
104
  */
105
105
  var calcMediaSingleMaxWidth = exports.calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth, editorAppearance) {
106
- var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
106
+ var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
107
+ exposure: true
108
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
107
109
  var fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : _editorSharedStyles.akEditorGutterPadding * 2;
108
110
  return Math.min(containerWidth - fullWidthPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
109
111
  };
@@ -135,7 +137,7 @@ function calculateOffsetLeft(insideInlineLike, insideLayout, pmViewDom, wrapper)
135
137
  * Returns the number rounded to the nearest interval.
136
138
  * @param {number} value The number to round
137
139
  * @param {number} interval The numeric interval to round to, default to 0.5
138
- * @return {number} the rounded number
140
+ * @returns {number} the rounded number
139
141
  */
140
142
  var roundToNearest = exports.roundToNearest = function roundToNearest(value) {
141
143
  var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.DEFAULT_ROUNDING_INTERVAL;
@@ -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 = "109.9.0";
19
+ var packageVersion = "109.10.1";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -11,7 +11,6 @@ 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");
15
14
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
15
  var _analytics = require("../analytics");
17
16
  var _styles = require("../styles");
@@ -173,7 +172,9 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
173
172
  state = editorView.state;
174
173
  displayGapCursor(false);
175
174
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
176
- var padding = widthState.width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
175
+ var padding = widthState.width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
176
+ exposure: true
177
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
177
178
  newMaxWidth = Math.min(widthState.width - padding * 2 - _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
178
179
  newMinWidth = Math.min(widthState.lineLength, _editorSharedStyles.akEditorDefaultLayoutWidth, newMaxWidth);
179
180
  }
@@ -10,7 +10,6 @@ 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");
14
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
14
  var SNAP_GAP = exports.SNAP_GAP = 8;
16
15
  var GUIDELINE_KEYS = {
@@ -43,7 +42,9 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
43
42
  // when the page is full width, the calculation of wide is wrong.
44
43
  // Actuall the wide is the wide breakout point, which is
45
44
  var wide = (0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
46
- var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
45
+ var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
46
+ exposure: true
47
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
47
48
  var layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
48
49
  var fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth) : undefined;
49
50
  return {
@@ -329,7 +329,7 @@ var pragmaticResizerStyles = exports.pragmaticResizerStyles = function pragmatic
329
329
  });
330
330
  };
331
331
  var pragmaticResizerStylesWithReducedEditorGutter = exports.pragmaticResizerStylesWithReducedEditorGutter = function pragmaticResizerStylesWithReducedEditorGutter() {
332
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) && ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('advanced_layouts', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true))) {
332
+ if ((0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('advanced_layouts', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true))) {
333
333
  return (0, _react.css)((0, _defineProperty2.default)({}, "@container editor-area (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
334
334
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
335
335
  '.fabric-editor-breakout-mark': {
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "109.9.0";
27
+ var packageVersion = "109.10.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -8,7 +8,7 @@ import React, { Fragment } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
12
  import { useSharedPluginStateWithSelector } from '../../../hooks';
13
13
  import { createWidthContext, WidthContext } from '../../../ui';
14
14
  import ExtensionLozenge from '../Lozenge';
@@ -44,7 +44,9 @@ const InlineExtension = props => {
44
44
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
45
45
  });
46
46
  let rendererContainerWidth = 0;
47
- if (expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
47
+ if (editorExperiment('platform_editor_preview_panel_responsiveness', true, {
48
+ exposure: true
49
+ })) {
48
50
  if (width) {
49
51
  const padding = width > akEditorFullPageNarrowBreakout ? akEditorGutterPaddingDynamic() : akEditorGutterPaddingReduced;
50
52
  rendererContainerWidth = width - padding * 2;
@@ -1,5 +1,5 @@
1
1
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { getMediaSinglePixelWidth, roundToNearest } from '../media-single';
4
4
  export const isNumber = x => typeof x === 'number' && !isNaN(x) && isFinite(x);
5
5
  export const isRange = range => !!(typeof range === 'object' && range && 'start' in range && 'end' in range);
@@ -35,7 +35,9 @@ export const getGuidelineTypeFromKey = (keys, guidelines) => {
35
35
  * width and editor gutter padding.
36
36
  */
37
37
  export const getContainerWidthOrFullEditorWidth = containerWidth => {
38
- const padding = containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
38
+ const padding = containerWidth <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
39
+ exposure: true
40
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
41
  return Math.min(containerWidth - padding * 2, akEditorFullWidthLayoutWidth) / 2;
40
42
  };
41
43
 
@@ -1,6 +1,6 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
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
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
5
5
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
6
6
 
@@ -91,7 +91,9 @@ const calcLegacyWideWidth = (containerWidth, origWidth, contentWidth) => {
91
91
  * @param containerWidth width of editor container
92
92
  */
93
93
  export const calcMediaSingleMaxWidth = (containerWidth, editorAppearance) => {
94
- const fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
94
+ const fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
95
+ exposure: true
96
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
95
97
  const fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : akEditorGutterPadding * 2;
96
98
  return Math.min(containerWidth - fullWidthPadding, akEditorFullWidthLayoutWidth);
97
99
  };
@@ -120,7 +122,7 @@ export function calculateOffsetLeft(insideInlineLike, insideLayout, pmViewDom, w
120
122
  * Returns the number rounded to the nearest interval.
121
123
  * @param {number} value The number to round
122
124
  * @param {number} interval The numeric interval to round to, default to 0.5
123
- * @return {number} the rounded number
125
+ * @returns {number} the rounded number
124
126
  */
125
127
  export const roundToNearest = (value, interval = DEFAULT_ROUNDING_INTERVAL) => Math.round(value / interval) * interval;
126
128
 
@@ -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 = "109.9.0";
4
+ const packageVersion = "109.10.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -2,7 +2,6 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useSta
2
2
  import { bind, bindAll } from 'bind-event-listener';
3
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';
6
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
6
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
8
7
  import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
@@ -165,7 +164,9 @@ const BreakoutResizer = ({
165
164
  } = editorView;
166
165
  displayGapCursor(false);
167
166
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
168
- const padding = widthState.width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
167
+ const padding = widthState.width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
168
+ exposure: true
169
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
169
170
  newMaxWidth = Math.min(widthState.width - padding * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
170
171
  newMinWidth = Math.min(widthState.lineLength, akEditorDefaultLayoutWidth, newMaxWidth);
171
172
  }
@@ -1,7 +1,6 @@
1
1
  import { useCallback, useMemo, useState } from 'react';
2
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';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  export const SNAP_GAP = 8;
7
6
  const GUIDELINE_KEYS = {
@@ -35,7 +34,9 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing, dynamicFullWid
35
34
  // when the page is full width, the calculation of wide is wrong.
36
35
  // Actuall the wide is the wide breakout point, which is
37
36
  const wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
38
- const padding = width && width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
37
+ const padding = width && width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
38
+ exposure: true
39
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
40
  const layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
40
41
  const fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, akEditorFullWidthLayoutWidth) : undefined;
41
42
  return {
@@ -515,7 +515,7 @@ export const pragmaticResizerStyles = () => {
515
515
  });
516
516
  };
517
517
  export const pragmaticResizerStylesWithReducedEditorGutter = () => {
518
- if (expValEqualsNoExposure('platform_editor_preview_panel_responsiveness', 'isEnabled', true) && (expValEqualsNoExposure('advanced_layouts', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true))) {
518
+ if (editorExperiment('platform_editor_preview_panel_responsiveness', true) && (expValEqualsNoExposure('advanced_layouts', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true))) {
519
519
  return css({
520
520
  /* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */
521
521
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "109.9.0";
17
+ const packageVersion = "109.10.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -8,7 +8,7 @@ import React, { Fragment } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
12
  import { useSharedPluginStateWithSelector } from '../../../hooks';
13
13
  import { createWidthContext, WidthContext } from '../../../ui';
14
14
  import ExtensionLozenge from '../Lozenge';
@@ -40,7 +40,9 @@ var InlineExtension = function InlineExtension(props) {
40
40
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
41
41
  });
42
42
  var rendererContainerWidth = 0;
43
- if (expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
43
+ if (editorExperiment('platform_editor_preview_panel_responsiveness', true, {
44
+ exposure: true
45
+ })) {
44
46
  if (width) {
45
47
  var padding = width > akEditorFullPageNarrowBreakout ? akEditorGutterPaddingDynamic() : akEditorGutterPaddingReduced;
46
48
  rendererContainerWidth = width - padding * 2;
@@ -1,6 +1,6 @@
1
1
  import _typeof from "@babel/runtime/helpers/typeof";
2
2
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { getMediaSinglePixelWidth, roundToNearest } from '../media-single';
5
5
  export var isNumber = function isNumber(x) {
6
6
  return typeof x === 'number' && !isNaN(x) && isFinite(x);
@@ -54,7 +54,9 @@ export var getGuidelineTypeFromKey = function getGuidelineTypeFromKey(keys, guid
54
54
  * width and editor gutter padding.
55
55
  */
56
56
  export var getContainerWidthOrFullEditorWidth = function getContainerWidthOrFullEditorWidth(containerWidth) {
57
- var padding = containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
57
+ var padding = containerWidth <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
58
+ exposure: true
59
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
58
60
  return Math.min(containerWidth - padding * 2, akEditorFullWidthLayoutWidth) / 2;
59
61
  };
60
62
 
@@ -1,6 +1,6 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
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
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
5
5
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
6
6
 
@@ -94,7 +94,9 @@ var calcLegacyWideWidth = function calcLegacyWideWidth(containerWidth, origWidth
94
94
  * @param containerWidth width of editor container
95
95
  */
96
96
  export var calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth, editorAppearance) {
97
- var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
97
+ var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
98
+ exposure: true
99
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
98
100
  var fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : akEditorGutterPadding * 2;
99
101
  return Math.min(containerWidth - fullWidthPadding, akEditorFullWidthLayoutWidth);
100
102
  };
@@ -126,7 +128,7 @@ export function calculateOffsetLeft(insideInlineLike, insideLayout, pmViewDom, w
126
128
  * Returns the number rounded to the nearest interval.
127
129
  * @param {number} value The number to round
128
130
  * @param {number} interval The numeric interval to round to, default to 0.5
129
- * @return {number} the rounded number
131
+ * @returns {number} the rounded number
130
132
  */
131
133
  export var roundToNearest = function roundToNearest(value) {
132
134
  var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_ROUNDING_INTERVAL;
@@ -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 = "109.9.0";
10
+ var packageVersion = "109.10.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useSta
3
3
  import { bind, bindAll } from 'bind-event-listener';
4
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';
7
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
9
8
  import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
@@ -164,7 +163,9 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
164
163
  state = editorView.state;
165
164
  displayGapCursor(false);
166
165
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
167
- var padding = widthState.width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
166
+ var padding = widthState.width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
167
+ exposure: true
168
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
168
169
  newMaxWidth = Math.min(widthState.width - padding * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
169
170
  newMinWidth = Math.min(widthState.lineLength, akEditorDefaultLayoutWidth, newMaxWidth);
170
171
  }
@@ -2,7 +2,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useCallback, useMemo, useState } from 'react';
3
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';
6
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
6
  export var SNAP_GAP = 8;
8
7
  var GUIDELINE_KEYS = {
@@ -35,7 +34,9 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
35
34
  // when the page is full width, the calculation of wide is wrong.
36
35
  // Actuall the wide is the wide breakout point, which is
37
36
  var wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
38
- var padding = width && width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
37
+ var padding = width && width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
38
+ exposure: true
39
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
40
  var layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
40
41
  var fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, akEditorFullWidthLayoutWidth) : undefined;
41
42
  return {
@@ -323,7 +323,7 @@ export var pragmaticResizerStyles = function pragmaticResizerStyles() {
323
323
  });
324
324
  };
325
325
  export var pragmaticResizerStylesWithReducedEditorGutter = function pragmaticResizerStylesWithReducedEditorGutter() {
326
- if (expValEqualsNoExposure('platform_editor_preview_panel_responsiveness', 'isEnabled', true) && (expValEqualsNoExposure('advanced_layouts', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true))) {
326
+ if (editorExperiment('platform_editor_preview_panel_responsiveness', true) && (expValEqualsNoExposure('advanced_layouts', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true))) {
327
327
  return css(_defineProperty({}, "@container editor-area (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
328
328
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
329
329
  '.fabric-editor-breakout-mark': {
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "109.9.0";
24
+ var packageVersion = "109.10.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -55,7 +55,7 @@ export declare function calculateOffsetLeft(insideInlineLike: boolean, insideLay
55
55
  * Returns the number rounded to the nearest interval.
56
56
  * @param {number} value The number to round
57
57
  * @param {number} interval The numeric interval to round to, default to 0.5
58
- * @return {number} the rounded number
58
+ * @returns {number} the rounded number
59
59
  */
60
60
  export declare const roundToNearest: (value: number, interval?: number) => number;
61
61
  /**
@@ -55,7 +55,7 @@ export declare function calculateOffsetLeft(insideInlineLike: boolean, insideLay
55
55
  * Returns the number rounded to the nearest interval.
56
56
  * @param {number} value The number to round
57
57
  * @param {number} interval The numeric interval to round to, default to 0.5
58
- * @return {number} the rounded number
58
+ * @returns {number} the rounded number
59
59
  */
60
60
  export declare const roundToNearest: (value: number, interval?: number) => number;
61
61
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "109.10.0",
3
+ "version": "109.10.2",
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/"
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/activity-provider": "^2.5.0",
33
33
  "@atlaskit/adf-schema": "^51.1.2",
34
34
  "@atlaskit/adf-utils": "^19.23.0",
35
- "@atlaskit/afm-i18n-platform-editor-editor-common": "2.5.0",
35
+ "@atlaskit/afm-i18n-platform-editor-editor-common": "2.7.0",
36
36
  "@atlaskit/analytics-listeners": "^9.0.0",
37
37
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
38
38
  "@atlaskit/analytics-next": "^11.1.0",