@atlaskit/editor-core 206.0.3 → 206.1.1

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 (37) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/ui/Appearance/Chromeless.js +12 -4
  3. package/dist/cjs/ui/Appearance/Comment/Comment.js +9 -2
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +25 -2
  5. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  6. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +1 -18
  7. package/dist/cjs/ui/ContentStyles/index.js +11 -4
  8. package/dist/cjs/ui/ContentStyles/layout.js +4 -0
  9. package/dist/cjs/ui/EditorContentContainer.js +260 -0
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/es2019/ui/Appearance/Chromeless.js +9 -3
  12. package/dist/es2019/ui/Appearance/Comment/Comment.js +7 -2
  13. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +25 -4
  14. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  15. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +0 -18
  16. package/dist/es2019/ui/ContentStyles/index.js +11 -4
  17. package/dist/es2019/ui/ContentStyles/layout.js +4 -0
  18. package/dist/es2019/ui/EditorContentContainer.js +624 -0
  19. package/dist/es2019/version-wrapper.js +1 -1
  20. package/dist/esm/ui/Appearance/Chromeless.js +11 -3
  21. package/dist/esm/ui/Appearance/Comment/Comment.js +9 -2
  22. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +27 -4
  23. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  24. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +0 -18
  25. package/dist/esm/ui/ContentStyles/index.js +11 -4
  26. package/dist/esm/ui/ContentStyles/layout.js +4 -0
  27. package/dist/esm/ui/EditorContentContainer.js +251 -0
  28. package/dist/esm/version-wrapper.js +1 -1
  29. package/dist/types/ui/Appearance/Chromeless.d.ts +10 -1
  30. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +0 -9
  31. package/dist/types/ui/ContentStyles/index.d.ts +2 -1
  32. package/dist/types/ui/EditorContentContainer.d.ts +39 -0
  33. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +10 -1
  34. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +0 -9
  35. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -1
  36. package/dist/types-ts4.5/ui/EditorContentContainer.d.ts +39 -0
  37. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 206.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#150122](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/150122)
8
+ [`92cc72b849cd4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/92cc72b849cd4) -
9
+ EDITOR-705 - cleanup FG platform_editor_update_insert_link_mark_end_pos
10
+ - Updated dependencies
11
+
12
+ ## 206.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#149914](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149914)
17
+ [`069cd0cee4bdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/069cd0cee4bdd) -
18
+ migrate editor core styles under new experiment to prepare optimization
19
+
20
+ ### Patch Changes
21
+
22
+ - [#143034](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/143034)
23
+ [`13c53d8240b22`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13c53d8240b22) -
24
+ [ux] [ED-27219] remove duplicated find and replace from custom toolbar for embedded pages under
25
+ experiment platform_editor_controls and FG platform_editor_find_and_replace_duplication
26
+ - Updated dependencies
27
+
3
28
  ## 206.0.3
4
29
 
5
30
  ### Patch Changes
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = void 0;
8
+ exports.default = exports.ContentArea = void 0;
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
11
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
@@ -16,7 +16,10 @@ var _react = _interopRequireWildcard(require("react"));
16
16
  var _react2 = require("@emotion/react");
17
17
  var _hooks = require("@atlaskit/editor-common/hooks");
18
18
  var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
19
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
20
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
19
21
  var _ContentStyles = require("../ContentStyles");
22
+ var _EditorContentContainer = _interopRequireDefault(require("../EditorContentContainer"));
20
23
  var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
21
24
  var _WithFlash = _interopRequireDefault(require("../WithFlash"));
22
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -50,8 +53,12 @@ _scrollbar.scrollbarStyles, {
50
53
  }
51
54
  }
52
55
  });
53
- var ContentArea = (0, _ContentStyles.createEditorContentStyle)();
56
+ var ContentArea = exports.ContentArea = (0, _ContentStyles.createEditorContentStyle)();
54
57
  ContentArea.displayName = 'ContentArea';
58
+ var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
59
+ return (0, _experiments.editorExperiment)('platform_editor_core_static_emotion', true);
60
+ }, _EditorContentContainer.default, ContentArea);
61
+
55
62
  // Ignored via go/ees005
56
63
  // eslint-disable-next-line @repo/internal/react/no-class-components
57
64
  var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
@@ -105,12 +112,13 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
105
112
  ref: function ref(_ref2) {
106
113
  return _this.containerElement = _ref2;
107
114
  }
108
- }, (0, _react2.jsx)(ContentArea
115
+ }, (0, _react2.jsx)(EditorContainer
109
116
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
110
117
  , {
111
118
  className: "ak-editor-content-area",
112
119
  featureFlags: featureFlags,
113
- viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
120
+ viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
121
+ appearance: _this.appearance
114
122
  }, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, (0, _react2.jsx)(_PluginSlot.default, {
115
123
  editorView: editorView,
116
124
  editorActions: editorActions,
@@ -20,9 +20,12 @@ var _ui = require("@atlaskit/editor-common/ui");
20
20
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
21
  var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
22
22
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
23
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
24
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
23
25
  var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
24
26
  var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
25
27
  var _ContentStyles = require("../../ContentStyles");
28
+ var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer"));
26
29
  var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
27
30
  var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
28
31
  var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
@@ -86,6 +89,9 @@ var secondaryToolbarStyles = (0, _react2.css)({
86
89
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
87
90
  });
88
91
  var appearance = 'comment';
92
+ var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
93
+ return (0, _experiments.editorExperiment)('platform_editor_core_static_emotion', true);
94
+ }, _EditorContentContainer.default, ContentArea);
89
95
  var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
90
96
  var editorAPI = props.editorAPI;
91
97
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['media', 'maxContentSize', 'primaryToolbar', 'editorViewMode']),
@@ -220,7 +226,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
220
226
  editorDisabled: disabled
221
227
  }, (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref) {
222
228
  var width = _ref.width;
223
- return (0, _react2.jsx)(ContentArea, {
229
+ return (0, _react2.jsx)(EditorContainer, {
224
230
  ref: containerElement,
225
231
  css: maxHeight ?
226
232
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -239,7 +245,8 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
239
245
  'less-margin': width < _editorSharedStyles.akEditorMobileBreakoutPoint
240
246
  }),
241
247
  featureFlags: featureFlags,
242
- viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
248
+ viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
249
+ appearance: appearance
243
250
  }, customContentComponents && 'before' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents), (0, _react2.jsx)(_PluginSlot.default, {
244
251
  editorView: editorView,
245
252
  editorActions: editorActions,
@@ -12,11 +12,15 @@ var _react2 = require("@emotion/react");
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _reactIntlNext = require("react-intl-next");
14
14
  var _messages = require("@atlaskit/editor-common/messages");
15
+ var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
15
16
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
16
18
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
19
  var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
18
20
  var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
21
+ var _ContentStyles = require("../../ContentStyles");
19
22
  var _ContextPanel = require("../../ContextPanel");
23
+ var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer"));
20
24
  var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
21
25
  var _StyledComponents = require("./StyledComponents");
22
26
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -33,6 +37,24 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
33
37
 
34
38
  var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
35
39
  var EDITOR_CONTAINER = exports.EDITOR_CONTAINER = 'ak-editor-container';
40
+ var scrollStyles = (0, _react2.css)({
41
+ flexGrow: 1,
42
+ height: '100%',
43
+ overflowY: 'scroll',
44
+ position: 'relative',
45
+ display: 'flex',
46
+ flexDirection: 'column',
47
+ scrollBehavior: 'smooth'
48
+ },
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
+ _scrollbar.scrollbarStyles);
51
+
52
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
53
+ var ScrollContainer = (0, _ContentStyles.createEditorContentStyle)(scrollStyles);
54
+ ScrollContainer.displayName = 'ScrollContainer';
55
+ var EditorContainer = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
56
+ return (0, _experiments.editorExperiment)('platform_editor_core_static_emotion', true);
57
+ }, _EditorContentContainer.default, ScrollContainer);
36
58
  var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
37
59
  var _contentAreaRef$curre;
38
60
  var theme = (0, _react2.useTheme)();
@@ -76,14 +98,15 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
76
98
  _StyledComponents.contentAreaWrapper,
77
99
  "data-testid": EDITOR_CONTAINER,
78
100
  "data-editor-container": 'true'
79
- }, (0, _react2.jsx)(_StyledComponents.ScrollContainer
101
+ }, (0, _react2.jsx)(EditorContainer
80
102
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
81
103
  , {
82
104
  className: "fabric-editor-popup-scroll-parent",
83
105
  featureFlags: props.featureFlags,
84
106
  ref: scrollContainerRef,
85
107
  viewMode: props === null || props === void 0 ? void 0 : props.viewMode,
86
- isScrollable: true
108
+ isScrollable: true,
109
+ appearance: props.appearance
87
110
  }, (0, _react2.jsx)(_ClickAreaBlock.default, {
88
111
  editorView: props.editorView,
89
112
  editorDisabled: props.disabled
@@ -13,6 +13,7 @@ var _reactIntlNext = require("react-intl-next");
13
13
  var _messages = require("@atlaskit/editor-common/messages");
14
14
  var _ui = require("@atlaskit/editor-common/ui");
15
15
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
18
  var _ToolbarPortal = require("../../Toolbar/ToolbarPortal");
18
19
  var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
@@ -74,7 +75,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
74
75
  css: _MainToolbar.customToolbarWrapperStyle
75
76
  }, !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
76
77
  beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
77
- }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
78
+ }) : null, !((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_duplication')) && editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.registerToolbarButton({
78
79
  popupsBoundariesElement: props.popupsBoundariesElement,
79
80
  popupsMountPoint: popupsMountPoint,
80
81
  popupsScrollableElement: props.popupsScrollableElement,
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.sidebarArea = exports.fullPageEditorWrapper = exports.editorContentGutterStyle = exports.editorContentAreaStyle = exports.editorContentAreaHideContainer = exports.contentAreaWrapper = exports.contentAreaHeightNoToolbar = exports.contentArea = exports.ScrollContainer = void 0;
7
+ exports.sidebarArea = exports.fullPageEditorWrapper = exports.editorContentGutterStyle = exports.editorContentAreaStyle = exports.editorContentAreaHideContainer = exports.contentAreaWrapper = exports.contentAreaHeightNoToolbar = exports.contentArea = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _react = require("@emotion/react");
@@ -12,10 +12,8 @@ var _adfSchema = require("@atlaskit/adf-schema");
12
12
  var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
13
13
  var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
- var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
16
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
- var _ContentStyles = require("../../ContentStyles");
19
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
20
18
 
21
19
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -32,21 +30,6 @@ var fullPageEditorWrapper = exports.fullPageEditorWrapper = (0, _react.css)({
32
30
  flexDirection: 'column',
33
31
  boxSizing: 'border-box'
34
32
  });
35
- var scrollStyles = (0, _react.css)({
36
- flexGrow: 1,
37
- height: '100%',
38
- overflowY: 'scroll',
39
- position: 'relative',
40
- display: 'flex',
41
- flexDirection: 'column',
42
- scrollBehavior: 'smooth'
43
- },
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
45
- _scrollbar.scrollbarStyles);
46
-
47
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
48
- var ScrollContainer = exports.ScrollContainer = (0, _ContentStyles.createEditorContentStyle)(scrollStyles);
49
- ScrollContainer.displayName = 'ScrollContainer';
50
33
 
51
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
52
35
  var contentArea = exports.contentArea = function contentArea() {
@@ -150,7 +150,12 @@ var fixBlockControlStylesSSR = exports.fixBlockControlStylesSSR = function fixBl
150
150
 
151
151
  // The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
152
152
  var akEditorBreakpointForSmallDevice = "1266px";
153
- var contentStyles = function contentStyles(props) {
153
+
154
+ // We are going to deprecate this in near future
155
+ // Currently, we are migrating content styles in packages/editor/editor-core/src/ui/EditorContentContainer.tsx
156
+ // Under editor experiment platform_editor_core_static_emotion
157
+ // If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
158
+ var legacyContentStyles = function legacyContentStyles(props) {
154
159
  return (0, _react2.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n /* Switch between the two icons based on the visual refresh feature gate */\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t/* For FullPage only when inside a table\n\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn the \"editorContentAreaContainerStyle\" function */\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _editorSharedStyles.editorFontSize)({
155
160
  theme: props.theme
156
161
  }), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
@@ -179,7 +184,7 @@ var createEditorContentStyle = exports.createEditorContentStyle = function creat
179
184
  colorMode = _useThemeObserver.colorMode,
180
185
  typography = _useThemeObserver.typography;
181
186
  var memoizedStyle = (0, _react.useMemo)(function () {
182
- return contentStyles({
187
+ return legacyContentStyles({
183
188
  theme: theme,
184
189
  colorMode: colorMode,
185
190
  featureFlags: featureFlags,
@@ -193,14 +198,16 @@ var createEditorContentStyle = exports.createEditorContentStyle = function creat
193
198
  className: className,
194
199
  ref: ref,
195
200
  css: [memoizedStyle, styles],
196
- "data-editor-scroll-container": "true"
201
+ "data-editor-scroll-container": "true",
202
+ "data-testid": "editor-content-container"
197
203
  }, children);
198
204
  }
199
205
  return (0, _react2.jsx)("div", {
200
206
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
201
207
  className: className,
202
208
  ref: ref,
203
- css: [memoizedStyle, styles]
209
+ css: [memoizedStyle, styles],
210
+ "data-testid": "editor-content-container"
204
211
  }, children);
205
212
  });
206
213
  };
@@ -46,6 +46,8 @@ var columnSeparatorStyles = function columnSeparatorStyles(viewMode) {
46
46
  var rowSeparatorStyles = function rowSeparatorStyles(viewMode) {
47
47
  return (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tcontent: '';\n\t\tborder-top: ", "px solid\n\t\t\t", ";\n\t\tposition: absolute;\n\t\twidth: calc(100% - 32px);\n\t\tmargin-top: -13px;\n\n\t\t/* clear styles for column separator */\n\t\tborder-left: unset;\n\t\tmargin-left: unset;\n\t\theight: unset;\n\t}\n"])), viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
48
48
  };
49
+
50
+ // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
49
51
  var layoutWithSeparatorBorderResponsiveStyles = function layoutWithSeparatorBorderResponsiveStyles(breakpoint, viewMode
50
52
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
51
53
  ) {
@@ -57,6 +59,8 @@ var layoutWithSeparatorBorderStyles = function layoutWithSeparatorBorderStyles(v
57
59
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
58
60
  return (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t\t&.selected [data-layout-column]:not(:first-of-type),\n\t\t[data-empty-layout='true'] [data-layout-column]:not(:first-of-type),\n\t\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\n\t\t&.selected.danger [data-layout-section] {\n\t\t\tbackground-color: ", ";\n\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tborder-radius: 4px;\n\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.", ":not(.danger) [data-layout-section] {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tborder-radius: 4px;\n\t\t\tbackground-color: ", ";\n\t\t\t[data-layout-column] {\n\t\t\t\t", "\n\t\t\t\tborder: 0px;\n\t\t\t\t::before {\n\t\t\t\t\tbackground-color: transparent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), columnSeparatorStyles(viewMode), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, columnSeparatorStyles(viewMode), _editorSharedStyles.akEditorSelectedNodeClassName, viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", "var(--ds-background-selected, #E9F2FF)", (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket]), columnSeparatorStyles(viewMode));
59
61
  };
62
+
63
+ // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
60
64
  var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
61
65
  return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
62
66
  (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t\t/* not resized layout in full-width editor */\n\t\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:724px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* not resized layout in fixed-width editor */\n\t\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t\t> .layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:788px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* resized layout in full/fixed-width editor */\n\t\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t\t.layoutSectionView-content-wrap {\n\t\t\t\t[data-layout-section] {\n\t\t\t\t\t@container editor-area (max-width:820px) {\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), layoutWithSeparatorBorderResponsiveStyles(724, viewMode), layoutWithSeparatorBorderResponsiveStyles(788, viewMode), layoutWithSeparatorBorderResponsiveStyles(820, viewMode))
@@ -0,0 +1,260 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.placeholderStyles = exports.linkStyles = exports.fixBlockControlStylesSSR = exports.default = void 0;
9
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _react2 = require("@emotion/react");
12
+ var _browser = require("@atlaskit/editor-common/browser");
13
+ var _collab = require("@atlaskit/editor-common/collab");
14
+ var _emoji = require("@atlaskit/editor-common/emoji");
15
+ var _mention = require("@atlaskit/editor-common/mention");
16
+ var _panel = require("@atlaskit/editor-common/panel");
17
+ var _selection = require("@atlaskit/editor-common/selection");
18
+ var _styles = require("@atlaskit/editor-common/styles");
19
+ var _styles2 = require("@atlaskit/editor-plugins/block-type/styles");
20
+ var _styles3 = require("@atlaskit/editor-plugins/find-replace/styles");
21
+ var _styles4 = require("@atlaskit/editor-plugins/paste-options-toolbar/styles");
22
+ var _styles5 = require("@atlaskit/editor-plugins/placeholder-text/styles");
23
+ var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
24
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
25
+ var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
26
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
28
+ var _tokens = require("@atlaskit/tokens");
29
+ var _getInlineNodeViewProducer = require("../nodeviews/getInlineNodeViewProducer.styles");
30
+ var _aiPanels = require("./ContentStyles/ai-panels");
31
+ var _codeBlock = require("./ContentStyles/code-block");
32
+ var _date = require("./ContentStyles/date");
33
+ var _expand = require("./ContentStyles/expand");
34
+ var _extension = require("./ContentStyles/extension");
35
+ var _layout = require("./ContentStyles/layout");
36
+ var _media = require("./ContentStyles/media");
37
+ var _panel2 = require("./ContentStyles/panel");
38
+ var _status = require("./ContentStyles/status");
39
+ var _tasksAndDecisions = require("./ContentStyles/tasks-and-decisions");
40
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
41
+ /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
42
+ /* eslint-disable react-hooks/rules-of-hooks */
43
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
44
+ /**
45
+ * @jsxRuntime classic
46
+ * @jsx jsx
47
+ */
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
49
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
50
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
52
+ var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), (0, _styles.linkSharedStyle)());
53
+ var ruleStyles = function ruleStyles() {
54
+ return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", ";\n\n\t\thr {\n\t\t\tcursor: pointer;\n\t\t\tpadding: ", " 0;\n\t\t\tmargin: ", " 0;\n\t\t\tbackground-clip: content-box;\n\n\t\t\t&.", " {\n\t\t\t\toutline: none;\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _styles.ruleSharedStyles)(), "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
55
+ };
56
+ var vanillaMentionsStyles = (0, _react2.css)({
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
58
+ '.editor-mention-primitive': {
59
+ display: 'inline',
60
+ borderRadius: '20px',
61
+ cursor: 'pointer',
62
+ padding: '0 0.3em 2px 0.23em',
63
+ fontWeight: "var(--ds-font-weight-regular, 400)",
64
+ wordBreak: 'break-word',
65
+ background: "var(--ds-background-neutral, #091E420F)",
66
+ border: '1px solid transparent',
67
+ color: "var(--ds-text-subtle, #44546F)",
68
+ '&:hover': {
69
+ background: "var(--ds-background-neutral-hovered, #091E4224)"
70
+ },
71
+ '&:active': {
72
+ background: "var(--ds-background-neutral-pressed, #091E424F)"
73
+ }
74
+ },
75
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
76
+ '.editor-mention-primitive.mention-restricted': {
77
+ background: 'transparent',
78
+ border: "1px solid ".concat("var(--ds-border-bold, #758195)"),
79
+ color: "var(--ds-text, #172B4D)",
80
+ '&:hover': {
81
+ background: 'transparent'
82
+ },
83
+ '&:active': {
84
+ background: 'transparent'
85
+ }
86
+ },
87
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
88
+ '.editor-mention-primitive.mention-self': {
89
+ background: "var(--ds-background-brand-bold, #0C66E4)",
90
+ border: '1px solid transparent',
91
+ color: "var(--ds-text-inverse, #FFFFFF)",
92
+ '&:hover': {
93
+ background: "var(--ds-background-brand-bold-hovered, #0055CC)"
94
+ },
95
+ '&:active': {
96
+ background: "var(--ds-background-brand-bold-pressed, #09326C)"
97
+ }
98
+ }
99
+ });
100
+ var vanillaSelectionStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.danger {\n\t\t.editor-mention-primitive {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t.", " > .editor-mention-primitive,\n\t.", " > .editor-mention-primitive.mention-self,\n\t.", " > .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)");
101
+ var mentionsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\t&.", " [data-mention-id] > span {\n\t\t\t", "\n\n\t\t\t/* need to specify dark text colour because personal mentions\n\t\t (in dark blue) have white text by default */\n\t color: ", ";\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t> span\n\t\t\t> span\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t\t.", " > span > span > span {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)");
102
+ var listsStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\tli {\n\t\t\tposition: relative;\n\n\t\t\t> p:not(:first-child) {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\n\t\t\t// In SSR the above rule will apply to all p tags because first-child would be a style tag.\n\t\t\t// The following rule resets the first p tag back to its original margin\n\t\t\t// defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n\t\t\t> style:first-child + p {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n\t// This prevents https://product-fabric.atlassian.net/browse/ED-20924\n\t&:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _browser.browser.safari ? _styles.codeBlockInListSafariFix : '');
103
+ var reactEmojiStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tdisplay: inline-block;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t&.", " > span {\n\t\t\t\t/** needed for selection style to cover custom emoji image properly */\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", ", .", " {\n\t\t\t\tborder-radius: 2px;\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_NODE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
104
+ var emojiStyles = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-prosemirror-node-view-type='vanilla'] {\n\t\t.", " {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t.", ", .", " {\n\t\t\tbackground: no-repeat transparent;\n\t\t\tdisplay: inline-block;\n\t\t\theight: ", "px;\n\t\t\tmax-height: ", "px;\n\t\t\tcursor: pointer;\n\t\t\tvertical-align: middle;\n\t\t\tuser-select: all;\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", ", .", " {\n\t\t\t\tborder-radius: 2px;\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _emoji.defaultEmojiHeight, _emoji.defaultEmojiHeight, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
105
+
106
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
107
+ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
108
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
109
+ '.ProseMirror .placeholder-decoration': {
110
+ color: "var(--ds-text-subtlest, #626F86)",
111
+ width: '100%',
112
+ pointerEvents: 'none',
113
+ userSelect: 'none',
114
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
115
+ '.placeholder-android': {
116
+ pointerEvents: 'none',
117
+ outline: 'none',
118
+ userSelect: 'none',
119
+ position: 'absolute'
120
+ }
121
+ }
122
+ });
123
+ var placeholderOverflowStyles = (0, _react2.css)({
124
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
125
+ '.ProseMirror p:has(.placeholder-decoration-hide-overflow)': {
126
+ overflow: 'hidden',
127
+ whiteSpace: 'nowrap',
128
+ textOverflow: 'ellipsis'
129
+ }
130
+ });
131
+ var placeholderWrapStyles = (0, _react2.css)({
132
+ // As part of controls work, we add placeholder `Search` to quick insert command
133
+ // This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
134
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
135
+ '.ProseMirror mark[data-type-ahead-query="true"]:has(.placeholder-decoration-wrap)': {
136
+ whiteSpace: 'nowrap'
137
+ }
138
+ });
139
+ var firstBlockNodeStyles = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> div[data-task-list-local-id],\n\t\t> div[data-layout-section],\n\t\t> .", " {\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t> hr:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n"])), _panel.PanelSharedCssClassName.prefix, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.expandClassNames.prefix);
140
+ var firstBlockNodeStylesNew = (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> div[data-task-list-local-id],\n\t\t> div[data-layout-section],\n\t\t> .", " {\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t> hr:first-child,\n\t\t> .ProseMirror-widget:first-child + hr {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n"])), _panel.PanelSharedCssClassName.prefix, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.expandClassNames.prefix);
141
+
142
+ /**
143
+ * fix layout issue of first block node
144
+ */
145
+ var fixBlockControlStylesSSR = exports.fixBlockControlStylesSSR = function fixBlockControlStylesSSR() {
146
+ if ((0, _platformFeatureFlags.fg)('platform_editor_element_dnd_nested_fix_patch_6')) {
147
+ return firstBlockNodeStylesNew;
148
+ }
149
+ return firstBlockNodeStyles;
150
+ };
151
+
152
+ // The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
153
+ var akEditorBreakpointForSmallDevice = "1266px";
154
+
155
+ // jest warning: JSDOM version (22) doesn't support the new @container CSS rule
156
+ var contentStyles = function contentStyles(props) {
157
+ return (0, _react2.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _editorSharedStyles.editorFontSize)({
158
+ theme: props.theme
159
+ }), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
160
+ exposure: false
161
+ }) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
162
+ exposure: false
163
+ }) && vanillaSelectionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
164
+ exposure: false
165
+ }) ? emojiStyles : reactEmojiStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
166
+ exposure: false
167
+ }) && _tasksAndDecisions.vanillaTaskItemStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
168
+ exposure: false
169
+ }) && _tasksAndDecisions.vanillaTaskDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
170
+ exposure: false
171
+ }) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
172
+ exposure: false
173
+ }) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _status.vanillaStatusStyles : null, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, (0, _styles.embedCardStyles)(), _styles.unsupportedStyles, _styles.resizerStyles, (0, _aiPanels.aiPanelStyles)(props.colorMode), fixBlockControlStylesSSR(), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
174
+ };
175
+ var CommentEditorMargin = 14;
176
+
177
+ // Originally copied from packages/editor/editor-core/src/ui/Appearance/Comment/Comment.tsx
178
+ var commentEditorStyles = (0, _react2.css)({
179
+ flexGrow: 1,
180
+ overflowX: 'clip',
181
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
182
+ lineHeight: '24px',
183
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
184
+ '.ProseMirror': {
185
+ margin: "var(--ds-space-150, 12px)"
186
+ },
187
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
188
+ '.gridParent': {
189
+ marginLeft: "var(--ds-space-025, 2px)",
190
+ marginRight: "var(--ds-space-025, 2px)",
191
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
192
+ width: "calc(100% + ".concat(CommentEditorMargin - _styles.GRID_GUTTER, "px)")
193
+ },
194
+ padding: "var(--ds-space-250, 20px)"
195
+ },
196
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
197
+ _commonStyles.tableCommentEditorStyles);
198
+
199
+ // Originally copied from scrollStyles in packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts
200
+ var fullPageEditorStyles = (0, _react2.css)({
201
+ flexGrow: 1,
202
+ height: '100%',
203
+ overflowY: 'scroll',
204
+ position: 'relative',
205
+ display: 'flex',
206
+ flexDirection: 'column',
207
+ scrollBehavior: 'smooth'
208
+ },
209
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
210
+ _scrollbar.scrollbarStyles);
211
+
212
+ /**
213
+ * EditorContentStyles is a wrapper component that applies styles to its children
214
+ * based on the provided feature flags, view mode, and other props.
215
+ * It uses Emotion for styling and supports scrollable content.
216
+ * The component is memoized to optimize performance.
217
+ *
218
+ * This will be used in near future to replace the current editor content styles from index.tsx
219
+ *
220
+ * @param {EditorContentContainerProps} props - The props for the component.
221
+ * @param {string} props.className - Additional class name for the component.
222
+ * @param {React.ReactNode} props.children - The content to be rendered inside the component.
223
+ * @param {FeatureFlags} props.featureFlags - Feature flags to control the styles.
224
+ * @param {'view' | 'edit'} props.viewMode - The view mode of the editor.
225
+ * @param {boolean} props.isScrollable - Whether the content is scrollable.
226
+ * @param {'full-page' | 'full-width' | 'comment' | 'chromeless'} props.appearance - The appearance of the editor.
227
+ * @returns {JSX.Element} The styled content component.
228
+ */
229
+ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
230
+ var className = props.className,
231
+ children = props.children,
232
+ featureFlags = props.featureFlags,
233
+ viewMode = props.viewMode,
234
+ isScrollable = props.isScrollable,
235
+ appearance = props.appearance;
236
+ var theme = (0, _react2.useTheme)();
237
+ var _useThemeObserver = (0, _tokens.useThemeObserver)(),
238
+ colorMode = _useThemeObserver.colorMode,
239
+ typography = _useThemeObserver.typography;
240
+ var memoizedStyle = (0, _react.useMemo)(function () {
241
+ return contentStyles({
242
+ theme: theme,
243
+ colorMode: colorMode,
244
+ featureFlags: featureFlags,
245
+ viewMode: viewMode,
246
+ typographyTheme: typography
247
+ });
248
+ }, [theme, colorMode, featureFlags, viewMode, typography]);
249
+ var isFullPage = appearance === 'full-page' || appearance === 'full-width';
250
+ var isComment = appearance === 'comment';
251
+ return (0, _react2.jsx)("div", {
252
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
253
+ className: className,
254
+ ref: ref,
255
+ css: [memoizedStyle, isComment && commentEditorStyles, isFullPage && fullPageEditorStyles],
256
+ "data-editor-scroll-container": isScrollable ? 'true' : undefined,
257
+ "data-testid": "editor-content-container"
258
+ }, children);
259
+ });
260
+ var _default = exports.default = EditorContentContainer;
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "206.0.3";
8
+ var version = exports.version = "206.1.1";