@atlaskit/editor-common 110.14.0 → 110.14.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/messages/placeholder-text.js +5 -0
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/resizer/useBreakoutGuidelines.js +3 -4
  5. package/dist/cjs/styles/shared/sync-block.js +10 -2
  6. package/dist/cjs/sync-block.js +12 -0
  7. package/dist/cjs/ui/DropList/index.js +1 -1
  8. package/dist/cjs/ui/MediaSingle/index.js +1 -1
  9. package/dist/cjs/ui/MediaSingle/styled.js +1 -2
  10. package/dist/es2019/messages/placeholder-text.js +5 -0
  11. package/dist/es2019/monitoring/error.js +1 -1
  12. package/dist/es2019/resizer/useBreakoutGuidelines.js +3 -4
  13. package/dist/es2019/styles/shared/sync-block.js +9 -1
  14. package/dist/es2019/sync-block.js +1 -1
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/es2019/ui/MediaSingle/index.js +1 -1
  17. package/dist/es2019/ui/MediaSingle/styled.js +1 -2
  18. package/dist/esm/messages/placeholder-text.js +5 -0
  19. package/dist/esm/monitoring/error.js +1 -1
  20. package/dist/esm/resizer/useBreakoutGuidelines.js +3 -4
  21. package/dist/esm/styles/shared/sync-block.js +9 -1
  22. package/dist/esm/sync-block.js +1 -1
  23. package/dist/esm/ui/DropList/index.js +1 -1
  24. package/dist/esm/ui/MediaSingle/index.js +1 -1
  25. package/dist/esm/ui/MediaSingle/styled.js +1 -2
  26. package/dist/types/messages/placeholder-text.d.ts +5 -0
  27. package/dist/types/styles/shared/sync-block.d.ts +7 -1
  28. package/dist/types/sync-block.d.ts +1 -1
  29. package/dist/types-ts4.5/messages/placeholder-text.d.ts +5 -0
  30. package/dist/types-ts4.5/styles/shared/sync-block.d.ts +7 -1
  31. package/dist/types-ts4.5/sync-block.d.ts +1 -1
  32. package/package.json +4 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`10882b2fab738`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/10882b2fab738) -
8
+ [ux] Introduced bodiedSyncBlock nodeview
9
+
10
+ ## 110.14.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [`5771b6f88f16a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5771b6f88f16a) -
15
+ Clean up platform_editor_fix_image_size_diff_during_ssr
16
+ - [`637c29651f8ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/637c29651f8ab) -
17
+ clean up platform_editor_table_drag_menu_flickers_fix
18
+ - Updated dependencies
19
+
3
20
  ## 110.14.0
4
21
 
5
22
  ### Minor Changes
@@ -20,5 +20,10 @@ var placeholderTextMessages = exports.placeholderTextMessages = (0, _reactIntlNe
20
20
  id: 'fabric.editor.longEmptyNodePlaceholderText',
21
21
  defaultMessage: 'Type / to insert elements',
22
22
  description: 'Long placeholder text for empty nodes'
23
+ },
24
+ syncBlockPlaceholderText: {
25
+ id: 'fabric.editor.syncBlockPlaceholderText',
26
+ defaultMessage: 'Add content then copy this synced block to access it across spaces',
27
+ description: 'Placeholder text for sync block'
23
28
  }
24
29
  });
@@ -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 = "110.13.2";
19
+ var packageVersion = "110.14.1";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -9,7 +9,6 @@ exports.useBreakoutGuidelines = useBreakoutGuidelines;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = require("react");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
13
  var SNAP_GAP = exports.SNAP_GAP = 8;
15
14
  var GUIDELINE_KEYS = {
@@ -41,7 +40,7 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
41
40
  // But the lineLength variable here is being used like a const 760.
42
41
  // when the page is full width, the calculation of wide is wrong.
43
42
  // Actuall the wide is the wide breakout point, which is
44
- var wide = (0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
43
+ var wide = (0, _experiments.editorExperiment)('single_column_layouts', true) ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
45
44
  var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
46
45
  exposure: true
47
46
  }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
@@ -52,7 +51,7 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
52
51
  fullWidth: fullWidth,
53
52
  // When page is full width, lineLength from widthState can be much wider than 760.
54
53
  // But the lineLength variable here is being used like a const 760.
55
- lineLength: (0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorDefaultLayoutWidth : lineLength
54
+ lineLength: (0, _experiments.editorExperiment)('single_column_layouts', true) ? _editorSharedStyles.akEditorDefaultLayoutWidth : lineLength
56
55
  };
57
56
  }, [widthState, isResizing, dynamicFullWidthGuidelineOffset]),
58
57
  lineLength = _useMemo.lineLength,
@@ -61,7 +60,7 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
61
60
 
62
61
  // calculate snapping width
63
62
  var defaultSnappingWidths = (0, _react.useMemo)(function () {
64
- if (!fullWidth || !wide || !lineLength || fullWidth <= ((0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorDefaultLayoutWidth : lineLength)) {
63
+ if (!fullWidth || !wide || !lineLength || fullWidth <= ((0, _experiments.editorExperiment)('single_column_layouts', true) ? _editorSharedStyles.akEditorDefaultLayoutWidth : lineLength)) {
65
64
  return null;
66
65
  }
67
66
  if (fullWidth - wide > SNAP_GAP) {
@@ -3,10 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SyncBlockSharedCssClassName = void 0;
6
+ exports.SyncBlockSharedCssClassName = exports.SyncBlockLabelSharedCssClassName = exports.BodiedSyncBlockSharedCssClassName = void 0;
7
7
  var prefix = 'ak-editor-sync-block';
8
8
  var SyncBlockSharedCssClassName = exports.SyncBlockSharedCssClassName = {
9
9
  prefix: prefix,
10
- editor: "".concat(prefix, "__editor"),
11
10
  renderer: "".concat(prefix, "__renderer")
11
+ };
12
+ var bodiedPrefix = 'ak-editor-bodied-sync-block';
13
+ var BodiedSyncBlockSharedCssClassName = exports.BodiedSyncBlockSharedCssClassName = {
14
+ prefix: bodiedPrefix,
15
+ content: "".concat(bodiedPrefix, "__content")
16
+ };
17
+ var labelClassName = 'ak-editor-sync-block__label';
18
+ var SyncBlockLabelSharedCssClassName = exports.SyncBlockLabelSharedCssClassName = {
19
+ labelClassName: labelClassName
12
20
  };
@@ -3,6 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "BodiedSyncBlockSharedCssClassName", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _syncBlock.BodiedSyncBlockSharedCssClassName;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "SyncBlockLabelSharedCssClassName", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _syncBlock.SyncBlockLabelSharedCssClassName;
16
+ }
17
+ });
6
18
  Object.defineProperty(exports, "SyncBlockSharedCssClassName", {
7
19
  enumerable: true,
8
20
  get: function get() {
@@ -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 = "110.13.2";
27
+ var packageVersion = "110.14.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -132,7 +132,7 @@ function MediaSingle(_ref) {
132
132
  nodeType: nodeType
133
133
  })
134
134
  // eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/platform/no-preconditioning
135
- }, (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') && !(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') ? {} : {
135
+ }, !(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') ? {} : {
136
136
  'data-layout': layout
137
137
  }, {
138
138
  "data-width": mediaSingleWidth,
@@ -15,7 +15,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _react2 = require("@emotion/react");
17
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
18
  var _isSsr = require("../../core-utils/is-ssr");
20
19
  var _utils = require("../../utils");
21
20
  var _breakout = require("../../utils/breakout");
@@ -229,7 +228,7 @@ var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function M
229
228
  because full-width layout will remain, causing node to be edge-to-edge */
230
229
  !isExtendedResizeExperienceOn && (0, _react2.css)({
231
230
  minWidth: '100%'
232
- }), (0, _isSsr.isSSR)() && !calculatedMaxWidth.endsWith('%') && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth, isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
231
+ }), (0, _isSsr.isSSR)() && !calculatedMaxWidth.endsWith('%') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth, isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
233
232
  };
234
233
  var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
235
234
  var hasFallbackContainer = _ref2.hasFallbackContainer,
@@ -14,5 +14,10 @@ export const placeholderTextMessages = defineMessages({
14
14
  id: 'fabric.editor.longEmptyNodePlaceholderText',
15
15
  defaultMessage: 'Type / to insert elements',
16
16
  description: 'Long placeholder text for empty nodes'
17
+ },
18
+ syncBlockPlaceholderText: {
19
+ id: 'fabric.editor.syncBlockPlaceholderText',
20
+ defaultMessage: 'Add content then copy this synced block to access it across spaces',
21
+ description: 'Placeholder text for sync block'
17
22
  }
18
23
  });
@@ -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 = "110.13.2";
4
+ const packageVersion = "110.14.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -1,6 +1,5 @@
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
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
4
  export const SNAP_GAP = 8;
6
5
  const GUIDELINE_KEYS = {
@@ -33,7 +32,7 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing, dynamicFullWid
33
32
  // But the lineLength variable here is being used like a const 760.
34
33
  // when the page is full width, the calculation of wide is wrong.
35
34
  // Actuall the wide is the wide breakout point, which is
36
- const wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
35
+ const wide = editorExperiment('single_column_layouts', true) ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
37
36
  const padding = width && width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
38
37
  exposure: true
39
38
  }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
@@ -44,13 +43,13 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing, dynamicFullWid
44
43
  fullWidth,
45
44
  // When page is full width, lineLength from widthState can be much wider than 760.
46
45
  // But the lineLength variable here is being used like a const 760.
47
- lineLength: editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength
46
+ lineLength: editorExperiment('single_column_layouts', true) ? akEditorDefaultLayoutWidth : lineLength
48
47
  };
49
48
  }, [widthState, isResizing, dynamicFullWidthGuidelineOffset]);
50
49
 
51
50
  // calculate snapping width
52
51
  const defaultSnappingWidths = useMemo(() => {
53
- if (!fullWidth || !wide || !lineLength || fullWidth <= (editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength)) {
52
+ if (!fullWidth || !wide || !lineLength || fullWidth <= (editorExperiment('single_column_layouts', true) ? akEditorDefaultLayoutWidth : lineLength)) {
54
53
  return null;
55
54
  }
56
55
  if (fullWidth - wide > SNAP_GAP) {
@@ -1,6 +1,14 @@
1
1
  const prefix = 'ak-editor-sync-block';
2
2
  export const SyncBlockSharedCssClassName = {
3
3
  prefix,
4
- editor: `${prefix}__editor`,
5
4
  renderer: `${prefix}__renderer`
5
+ };
6
+ const bodiedPrefix = 'ak-editor-bodied-sync-block';
7
+ export const BodiedSyncBlockSharedCssClassName = {
8
+ prefix: bodiedPrefix,
9
+ content: `${bodiedPrefix}__content`
10
+ };
11
+ const labelClassName = 'ak-editor-sync-block__label';
12
+ export const SyncBlockLabelSharedCssClassName = {
13
+ labelClassName
6
14
  };
@@ -1,4 +1,4 @@
1
1
  // Disable no-re-export rule for entry point files
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
- export { SyncBlockSharedCssClassName } from './styles/shared/sync-block';
4
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName } from './styles/shared/sync-block';
@@ -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 = "110.13.2";
17
+ const packageVersion = "110.14.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -117,7 +117,7 @@ export default function MediaSingle({
117
117
  nodeType
118
118
  })
119
119
  // eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/platform/no-preconditioning
120
- }, fg('platform_editor_fix_image_size_diff_during_ssr') && !fg('platform_editor_fix_media_in_renderer') ? {} : {
120
+ }, !fg('platform_editor_fix_media_in_renderer') ? {} : {
121
121
  'data-layout': layout
122
122
  }, {
123
123
  "data-width": mediaSingleWidth,
@@ -8,7 +8,6 @@ import React from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { akEditorDefaultLayoutWidth, akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { isSSR } from '../../core-utils/is-ssr';
13
12
  import { nonWrappedLayouts } from '../../utils';
14
13
  import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
@@ -220,7 +219,7 @@ export const MediaSingleDimensionHelper = ({
220
219
  })}
221
220
 
222
221
  /* If container doesn't exists, it will fallback to this */
223
- max-width: ${isSSR() && !calculatedMaxWidth.endsWith('%') && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth};
222
+ max-width: ${isSSR() && !calculatedMaxWidth.endsWith('%') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth};
224
223
  ${isExtendedResizeExperienceOn && `&[class*='is-resizing'] {
225
224
  .new-file-experience-wrapper {
226
225
  box-shadow: none !important;
@@ -14,5 +14,10 @@ export var placeholderTextMessages = defineMessages({
14
14
  id: 'fabric.editor.longEmptyNodePlaceholderText',
15
15
  defaultMessage: 'Type / to insert elements',
16
16
  description: 'Long placeholder text for empty nodes'
17
+ },
18
+ syncBlockPlaceholderText: {
19
+ id: 'fabric.editor.syncBlockPlaceholderText',
20
+ defaultMessage: 'Add content then copy this synced block to access it across spaces',
21
+ description: 'Placeholder text for sync block'
17
22
  }
18
23
  });
@@ -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 = "110.13.2";
10
+ var packageVersion = "110.14.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -1,7 +1,6 @@
1
1
  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
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  export var SNAP_GAP = 8;
7
6
  var GUIDELINE_KEYS = {
@@ -33,7 +32,7 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
33
32
  // But the lineLength variable here is being used like a const 760.
34
33
  // when the page is full width, the calculation of wide is wrong.
35
34
  // Actuall the wide is the wide breakout point, which is
36
- var wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
35
+ var wide = editorExperiment('single_column_layouts', true) ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
37
36
  var padding = width && width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
38
37
  exposure: true
39
38
  }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
@@ -44,7 +43,7 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
44
43
  fullWidth: fullWidth,
45
44
  // When page is full width, lineLength from widthState can be much wider than 760.
46
45
  // But the lineLength variable here is being used like a const 760.
47
- lineLength: editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength
46
+ lineLength: editorExperiment('single_column_layouts', true) ? akEditorDefaultLayoutWidth : lineLength
48
47
  };
49
48
  }, [widthState, isResizing, dynamicFullWidthGuidelineOffset]),
50
49
  lineLength = _useMemo.lineLength,
@@ -53,7 +52,7 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
53
52
 
54
53
  // calculate snapping width
55
54
  var defaultSnappingWidths = useMemo(function () {
56
- if (!fullWidth || !wide || !lineLength || fullWidth <= (editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength)) {
55
+ if (!fullWidth || !wide || !lineLength || fullWidth <= (editorExperiment('single_column_layouts', true) ? akEditorDefaultLayoutWidth : lineLength)) {
57
56
  return null;
58
57
  }
59
58
  if (fullWidth - wide > SNAP_GAP) {
@@ -1,6 +1,14 @@
1
1
  var prefix = 'ak-editor-sync-block';
2
2
  export var SyncBlockSharedCssClassName = {
3
3
  prefix: prefix,
4
- editor: "".concat(prefix, "__editor"),
5
4
  renderer: "".concat(prefix, "__renderer")
5
+ };
6
+ var bodiedPrefix = 'ak-editor-bodied-sync-block';
7
+ export var BodiedSyncBlockSharedCssClassName = {
8
+ prefix: bodiedPrefix,
9
+ content: "".concat(bodiedPrefix, "__content")
10
+ };
11
+ var labelClassName = 'ak-editor-sync-block__label';
12
+ export var SyncBlockLabelSharedCssClassName = {
13
+ labelClassName: labelClassName
6
14
  };
@@ -1,4 +1,4 @@
1
1
  // Disable no-re-export rule for entry point files
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
- export { SyncBlockSharedCssClassName } from './styles/shared/sync-block';
4
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName } from './styles/shared/sync-block';
@@ -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 = "110.13.2";
24
+ var packageVersion = "110.14.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -124,7 +124,7 @@ export default function MediaSingle(_ref) {
124
124
  nodeType: nodeType
125
125
  })
126
126
  // eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/platform/no-preconditioning
127
- }, fg('platform_editor_fix_image_size_diff_during_ssr') && !fg('platform_editor_fix_media_in_renderer') ? {} : {
127
+ }, !fg('platform_editor_fix_media_in_renderer') ? {} : {
128
128
  'data-layout': layout
129
129
  }, {
130
130
  "data-width": mediaSingleWidth,
@@ -12,7 +12,6 @@ import React from 'react';
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
13
  import { css, jsx } from '@emotion/react';
14
14
  import { akEditorDefaultLayoutWidth, akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { isSSR } from '../../core-utils/is-ssr';
17
16
  import { nonWrappedLayouts } from '../../utils';
18
17
  import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
@@ -219,7 +218,7 @@ export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref
219
218
  because full-width layout will remain, causing node to be edge-to-edge */
220
219
  !isExtendedResizeExperienceOn && css({
221
220
  minWidth: '100%'
222
- }), isSSR() && !calculatedMaxWidth.endsWith('%') && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth, isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
221
+ }), isSSR() && !calculatedMaxWidth.endsWith('%') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth, isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
223
222
  };
224
223
  var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
225
224
  var hasFallbackContainer = _ref2.hasFallbackContainer,
@@ -14,4 +14,9 @@ export declare const placeholderTextMessages: {
14
14
  defaultMessage: string;
15
15
  description: string;
16
16
  };
17
+ syncBlockPlaceholderText: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
17
22
  };
@@ -1,5 +1,11 @@
1
1
  export declare const SyncBlockSharedCssClassName: {
2
2
  prefix: string;
3
- editor: string;
4
3
  renderer: string;
5
4
  };
5
+ export declare const BodiedSyncBlockSharedCssClassName: {
6
+ prefix: string;
7
+ content: string;
8
+ };
9
+ export declare const SyncBlockLabelSharedCssClassName: {
10
+ labelClassName: string;
11
+ };
@@ -1 +1 @@
1
- export { SyncBlockSharedCssClassName } from './styles/shared/sync-block';
1
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, } from './styles/shared/sync-block';
@@ -14,4 +14,9 @@ export declare const placeholderTextMessages: {
14
14
  defaultMessage: string;
15
15
  description: string;
16
16
  };
17
+ syncBlockPlaceholderText: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
17
22
  };
@@ -1,5 +1,11 @@
1
1
  export declare const SyncBlockSharedCssClassName: {
2
2
  prefix: string;
3
- editor: string;
4
3
  renderer: string;
5
4
  };
5
+ export declare const BodiedSyncBlockSharedCssClassName: {
6
+ prefix: string;
7
+ content: string;
8
+ };
9
+ export declare const SyncBlockLabelSharedCssClassName: {
10
+ labelClassName: string;
11
+ };
@@ -1 +1 @@
1
- export { SyncBlockSharedCssClassName } from './styles/shared/sync-block';
1
+ export { BodiedSyncBlockSharedCssClassName, SyncBlockSharedCssClassName, SyncBlockLabelSharedCssClassName, } from './styles/shared/sync-block';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.14.0",
3
+ "version": "110.14.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/"
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/editor-json-transformer": "^8.31.0",
47
47
  "@atlaskit/editor-palette": "^2.1.0",
48
48
  "@atlaskit/editor-prosemirror": "7.0.0",
49
- "@atlaskit/editor-shared-styles": "^3.7.0",
49
+ "@atlaskit/editor-shared-styles": "^3.8.0",
50
50
  "@atlaskit/editor-tables": "^2.9.0",
51
51
  "@atlaskit/editor-toolbar": "^0.15.0",
52
52
  "@atlaskit/editor-toolbar-model": "^0.2.0",
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/prosemirror-history": "^0.2.0",
76
76
  "@atlaskit/react-ufo": "^4.12.0",
77
77
  "@atlaskit/section-message": "^8.7.0",
78
- "@atlaskit/smart-card": "^43.1.0",
78
+ "@atlaskit/smart-card": "^43.2.0",
79
79
  "@atlaskit/smart-user-picker": "^8.3.0",
80
80
  "@atlaskit/spinner": "^19.0.0",
81
81
  "@atlaskit/status": "^3.0.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/theme": "^21.0.0",
85
85
  "@atlaskit/tmp-editor-statsig": "^13.13.0",
86
86
  "@atlaskit/tokens": "^7.0.0",
87
- "@atlaskit/tooltip": "^20.5.0",
87
+ "@atlaskit/tooltip": "^20.6.0",
88
88
  "@atlaskit/width-detector": "^5.0.0",
89
89
  "@babel/runtime": "^7.0.0",
90
90
  "@compiled/react": "^0.18.6",
@@ -200,9 +200,6 @@
200
200
  "platform_editor_inline_node_virt_threshold_override": {
201
201
  "type": "boolean"
202
202
  },
203
- "platform_editor_layout_guideline_full_width_fix": {
204
- "type": "boolean"
205
- },
206
203
  "confluence-issue-terminology-refresh": {
207
204
  "type": "boolean"
208
205
  },
@@ -218,9 +215,6 @@
218
215
  "editor_a11y_aria_label_removal_popup": {
219
216
  "type": "boolean"
220
217
  },
221
- "platform_editor_fix_image_size_diff_during_ssr": {
222
- "type": "boolean"
223
- },
224
218
  "platform_editor_replace_document_shortcircuit": {
225
219
  "type": "boolean"
226
220
  },