@atlaskit/editor-core 221.5.0 → 221.5.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 (42) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +6 -0
  3. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  4. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +275 -0
  5. package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +357 -0
  6. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -344
  7. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  8. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +191 -0
  9. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +428 -0
  10. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +10 -417
  11. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +19 -18
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/create-editor/ReactEditorView.js +6 -0
  14. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  15. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +262 -0
  16. package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +344 -0
  17. package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -337
  18. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  19. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +180 -0
  20. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +420 -0
  21. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +8 -415
  22. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +18 -17
  23. package/dist/es2019/version-wrapper.js +1 -1
  24. package/dist/esm/create-editor/ReactEditorView.js +6 -0
  25. package/dist/esm/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  26. package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +268 -0
  27. package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +346 -0
  28. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -339
  29. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  30. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +184 -0
  31. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +418 -0
  32. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +10 -413
  33. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +18 -17
  34. package/dist/esm/version-wrapper.js +1 -1
  35. package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +30 -0
  36. package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +20 -0
  37. package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -20
  38. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +56 -0
  39. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +56 -0
  40. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +6 -54
  41. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +15 -1
  42. package/package.json +9 -6
@@ -1,351 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.CommentEditorWithIntl = void 0;
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _react = _interopRequireWildcard(require("react"));
12
- var _react2 = require("@emotion/react");
13
- var _classnames = _interopRequireDefault(require("classnames"));
14
- var _reactIntl = require("react-intl");
15
- var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
16
- var _new = _interopRequireDefault(require("@atlaskit/button/new"));
17
- var _hooks = require("@atlaskit/editor-common/hooks");
18
- var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
19
- var _ui = require("@atlaskit/editor-common/ui");
20
- var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
7
+ var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
22
8
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
24
- var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
25
- var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
26
- var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
27
- var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
28
- var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
29
- var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
30
- var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
31
- var _CommentToolbar = require("./CommentToolbar");
32
- var _Toolbar = require("./Toolbar");
33
- 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); }
34
- /**
35
- * @jsxRuntime classic
36
- * @jsx jsx
37
- */
38
-
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
40
-
41
- // Ignored via go/ees005
42
- // eslint-disable-next-line import/no-named-as-default
43
-
44
- var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
45
-
46
- // Remove when platform_editor_comment_editor_border_radius is cleaned up
47
- var commentEditorStylesOld = (0, _react2.css)({
48
- display: 'flex',
49
- flexDirection: 'column',
50
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
51
- '.less-margin > .ProseMirror': {
52
- margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
53
- },
54
- minWidth: '272px',
55
- height: 'auto',
56
- backgroundColor: "var(--ds-background-input, #FFFFFF)",
57
- border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8C8F97)"),
58
- boxSizing: 'border-box',
59
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
60
- borderRadius: "var(--ds-radius-small, 3px)",
61
- maxWidth: 'inherit',
62
- wordWrap: 'break-word'
63
- });
64
- var commentEditorStyles = (0, _react2.css)({
65
- display: 'flex',
66
- flexDirection: 'column',
67
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
68
- '.less-margin > .ProseMirror': {
69
- margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
70
- },
71
- minWidth: '272px',
72
- height: 'auto',
73
- backgroundColor: "var(--ds-background-input, #FFFFFF)",
74
- border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8C8F97)"),
75
- boxSizing: 'border-box',
76
- borderRadius: "var(--ds-radius-medium, 6px)",
77
- maxWidth: 'inherit',
78
- wordWrap: 'break-word'
79
- });
80
- var modernisedEditorStyles = (0, _react2.css)({
81
- borderRadius: "var(--ds-radius-xlarge, 12px)"
82
- });
83
- var secondaryToolbarStyles = (0, _react2.css)({
84
- boxSizing: 'border-box',
85
- justifyContent: 'flex-end',
86
- alignItems: 'center',
87
- display: 'flex',
88
- padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
89
- });
90
- var mainToolbarCustomComponentsSlotStyleNew = (0, _react2.css)({
91
- display: 'flex',
92
- justifyContent: 'flex-end',
93
- alignItems: 'center',
94
- flexGrow: 1,
95
- paddingRight: "var(--ds-space-250, 20px)",
96
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
97
- '> div': {
98
- display: 'flex',
99
- flexShrink: 0
100
- }
101
- });
102
- var mainToolbarCustomComponentsSlotStylePaddingOverride = (0, _react2.css)({
103
- paddingRight: 0
104
- });
105
- var mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
106
- paddingRight: 0
107
- }));
108
- var appearance = 'comment';
109
- var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
110
- var _editorAPI$blockMenu$, _editorAPI$blockMenu;
111
- var editorAPI = props.editorAPI;
112
-
113
- // Get useStandardNodeWidth from block menu plugin shared state
114
- // Only access editorAPI when the experiment is enabled to avoid performance impact
115
- var useStandardNodeWidth = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.currentState()) === null || _editorAPI$blockMenu === void 0 ? void 0 : _editorAPI$blockMenu.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
116
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
117
- var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
118
- return {
119
- maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
120
- primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
121
- editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
122
- };
123
- }),
124
- editorViewMode = _useSharedPluginState.editorViewMode,
125
- primaryToolbarComponentsState = _useSharedPluginState.primaryToolbarComponentsState,
126
- maxContentSizeReached = _useSharedPluginState.maxContentSizeReached;
127
- var primaryToolbarState = (0, _getPrimaryToolbarComponents.getPrimaryToolbarComponents)(editorAPI, primaryToolbarComponentsState);
128
- var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(editorAPI, ['media']),
129
- mediaState = _useSharedPluginState2.mediaState;
130
- var intl = (0, _reactIntl.useIntl)();
131
- var editorDOMElement = props.editorDOMElement,
132
- editorView = props.editorView,
133
- editorActions = props.editorActions,
134
- eventDispatcher = props.eventDispatcher,
135
- providerFactory = props.providerFactory,
136
- contentComponents = props.contentComponents,
137
- customContentComponents = props.customContentComponents,
138
- customPrimaryToolbarComponents = props.customPrimaryToolbarComponents,
139
- primaryToolbarComponentsProp = props.primaryToolbarComponents,
140
- customSecondaryToolbarComponents = props.customSecondaryToolbarComponents,
141
- popupsMountPoint = props.popupsMountPoint,
142
- popupsBoundariesElement = props.popupsBoundariesElement,
143
- popupsScrollableElement = props.popupsScrollableElement,
144
- maxHeight = props.maxHeight,
145
- _props$minHeight = props.minHeight,
146
- minHeight = _props$minHeight === void 0 ? 150 : _props$minHeight,
147
- onSave = props.onSave,
148
- onCancel = props.onCancel,
149
- disabled = props.disabled,
150
- dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
151
- useStickyToolbar = props.useStickyToolbar,
152
- pluginHooks = props.pluginHooks,
153
- featureFlags = props.featureFlags,
154
- innerRef = props.innerRef,
155
- isEditorModernisationEnabled = props.isEditorModernisationEnabled;
156
- var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
157
- var containerElement = _react.default.useRef(null);
158
-
159
- // Wrapper container for toolbar and content area
160
- var wrapperElementRef = (0, _react.useMemo)(function () {
161
- return innerRef || /*#__PURE__*/_react.default.createRef();
162
- }, [innerRef]);
163
- var _useState = (0, _react.useState)(false),
164
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
165
- saveButtonDisabled = _useState2[0],
166
- setSaveButtonDisabled = _useState2[1];
167
- (0, _react.useEffect)(function () {
168
- if (mediaState) {
169
- mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
170
- }
171
- return function () {
172
- return mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
173
- };
174
- }, [mediaState]);
175
- var handleSave = (0, _react.useCallback)(function () {
176
- if (editorView && onSave) {
177
- onSave(editorView);
178
- }
179
- }, [editorView, onSave]);
180
- var handleCancel = (0, _react.useCallback)(function () {
181
- if (editorView && onCancel) {
182
- onCancel(editorView);
183
- }
184
- }, [editorView, onCancel]);
185
- var isShortcutToFocusToolbar = (0, _react.useCallback)(function (event) {
186
- //Alt + F9 to reach first element in this main toolbar
187
- return event.altKey && (event.key === 'F9' || event.keyCode === 120);
188
- }, []);
189
-
190
- // When primary toolbar components is undefined, do not show two line editor toolbar
191
- var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
192
- var handleEscape = (0, _react.useCallback)(function (event) {
193
- if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
194
- editorView === null || editorView === void 0 || editorView.focus();
195
- }
196
- event.preventDefault();
197
- event.stopPropagation();
198
- }, [editorView]);
199
- var primaryToolbarComponents = primaryToolbarComponentsProp;
200
- if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
201
- primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
202
- }
203
- var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
204
- var memoizedContentAreaStyles = (0, _react.useMemo)(function () {
205
- return [maxHeight ?
206
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
207
- (0, _react2.css)({
208
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
209
- maxHeight: "".concat(maxHeight, "px"),
210
- // When maxHeight is set, content area should have overflow-y explicitly set as auto
211
- // As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
212
- // This will cause the content area to have content overflowing the container
213
- // so need to set overflow-y as auto to make sure the content area is scrollable
214
- overflowY: 'auto'
215
- }) : null];
216
- }, [maxHeight]);
217
- var contentAreaStyles = (0, _expValEquals.expValEquals)('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? memoizedContentAreaStyles : [maxHeight ?
218
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
219
- (0, _react2.css)({
220
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
221
- maxHeight: "".concat(maxHeight, "px"),
222
- // When maxHeight is set, content area should have overflow-y explicitly set as auto
223
- // As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
224
- // This will cause the content area to have content overflowing the container
225
- // so need to set overflow-y as auto to make sure the content area is scrollable
226
- overflowY: 'auto'
227
- }) : null];
228
- var customToolbarSlot = (0, _react2.jsx)("div", {
229
- css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
230
- }, customPrimaryToolbarComponents);
231
- return (0, _react2.jsx)(_WithFlash.default, {
232
- animate: maxContentSizeReached
233
- }, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
234
- css: [(0, _expValEquals.expValEquals)('platform_editor_comment_editor_border_radius', 'isEnabled', true) ? commentEditorStyles : commentEditorStylesOld, isEditorModernisationEnabled && modernisedEditorStyles,
235
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
236
- (0, _react2.css)({
237
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
238
- minHeight: "".concat(minHeight, "px")
239
- })]
240
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
241
- ,
242
- className: "akEditor",
243
- ref: wrapperElementRef
244
- }, (0, _react2.jsx)(_Toolbar.MainToolbar, {
245
- isEditorModernisationEnabled: isEditorModernisationEnabled,
246
- useStickyToolbar: useStickyToolbar,
247
- twoLineEditorToolbar: isTwoLineToolbarEnabled,
248
- isNewToolbarEnabled: isToolbarAIFCEnabled
249
- }, isToolbarAIFCEnabled ? (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
250
- editorView: editorView,
251
- childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
252
- isShortcutToFocusToolbar: isShortcutToFocusToolbar,
253
- handleEscape: handleEscape,
254
- editorAppearance: appearance,
255
- useStickyToolbar: useStickyToolbar,
256
- intl: intl
257
- }, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
258
- editorAPI: editorAPI,
259
- editorView: editorView,
260
- editorAppearance: appearance,
261
- disabled: !!disabled,
262
- popupsBoundariesElement: popupsBoundariesElement,
263
- popupsScrollableElement: popupsScrollableElement,
264
- popupsMountPoint: popupsMountPoint
265
- }), customPrimaryToolbarComponents ? customToolbarSlot : null) : (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
266
- editorView: editorView,
267
- childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
268
- isShortcutToFocusToolbar: isShortcutToFocusToolbar,
269
- handleEscape: handleEscape,
270
- editorAppearance: appearance,
271
- useStickyToolbar: useStickyToolbar,
272
- intl: intl
273
- }, (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
274
- // Ignored via go/ees005
275
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
276
- , {
277
- editorView: editorView,
278
- editorActions: editorActions
279
- // Ignored via go/ees005
280
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
281
- ,
282
- eventDispatcher: eventDispatcher
283
- // Ignored via go/ees005
284
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
285
- ,
286
- providerFactory: providerFactory,
287
- appearance: appearance,
288
- items: primaryToolbarComponents,
289
- popupsMountPoint: popupsMountPoint,
290
- popupsBoundariesElement: popupsBoundariesElement,
291
- popupsScrollableElement: popupsScrollableElement,
292
- disabled: !!disabled,
293
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
294
- containerElement: containerElement.current,
295
- twoLineEditorToolbar: isTwoLineToolbarEnabled
296
- }), customToolbarSlot)), (0, _react2.jsx)(_ClickAreaBlock.default, {
297
- editorView: editorView,
298
- editorDisabled: disabled
299
- }, (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref) {
300
- var width = _ref.width;
301
- return (0, _react2.jsx)(_EditorContentContainer.default, {
302
- ref: containerElement,
303
- css: contentAreaStyles,
304
- isScrollable: maxHeight ? true : undefined
305
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
306
- ,
307
- className: (0, _classnames.default)('ak-editor-content-area', {
308
- 'less-margin': width < _editorSharedStyles.akEditorMobileBreakoutPoint
309
- }),
310
- featureFlags: featureFlags,
311
- viewMode: editorViewMode,
312
- appearance: appearance,
313
- useStandardNodeWidth: useStandardNodeWidth
314
- }, customContentComponents && 'before' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents), (0, _react2.jsx)(_PluginSlot.default, {
315
- editorView: editorView,
316
- editorActions: editorActions,
317
- eventDispatcher: eventDispatcher,
318
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
319
- providerFactory: providerFactory,
320
- appearance: appearance,
321
- items: contentComponents,
322
- popupsMountPoint: popupsMountPoint,
323
- popupsBoundariesElement: popupsBoundariesElement,
324
- popupsScrollableElement: popupsScrollableElement,
325
- containerElement: containerElement.current,
326
- disabled: !!disabled,
327
- wrapperElement: wrapperElementRef.current,
328
- pluginHooks: pluginHooks
329
- }), editorDOMElement, customContentComponents && 'after' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.after) : null);
330
- }))), showSecondaryToolbar && (0, _react2.jsx)("div", {
331
- css: secondaryToolbarStyles,
332
- "data-testid": "ak-editor-secondary-toolbar"
333
- }, (0, _react2.jsx)(_buttonGroup.default, null, !!onSave && (0, _react2.jsx)(_new.default, {
334
- appearance: "primary",
335
- onClick: handleSave,
336
- testId: "comment-save-button",
337
- isDisabled: disabled || saveButtonDisabled,
338
- interactionName: "editor-comment-save-button"
339
- }, intl.formatMessage(_messages.default.saveButton)), !!onCancel && (0, _react2.jsx)(_new.default, {
340
- appearance: "subtle",
341
- onClick: handleCancel,
342
- testId: "comment-cancel-button",
343
- isDisabled: disabled,
344
- interactionName: "editor-comment-cancel-button"
345
- }, intl.formatMessage(_messages.default.cancelButton))), (0, _react2.jsx)("span", {
346
- style: {
347
- flexGrow: 1
348
- }
349
- }), customSecondaryToolbarComponents)));
350
- };
351
- CommentEditorWithIntl.displayName = 'CommentEditorAppearance';
9
+ var _CommentCompiled = require("./Comment-compiled");
10
+ var _CommentEmotion = require("./Comment-emotion");
11
+ var CommentEditorWithIntl = exports.CommentEditorWithIntl = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
12
+ return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
13
+ }, _CommentCompiled.CommentEditorWithIntlCompiled, _CommentEmotion.CommentEditorWithIntlEmotion);
@@ -0,0 +1,97 @@
1
+
2
+ ._v5641fxv{transition:max-width .5s cubic-bezier(.15,1,.3,1)}
3
+ ._v5642kub{transition:padding 0ms cubic-bezier(.15,1,.3,1)}._101j15vq [data-editor-scroll-container=true]{overflow-y:hidden}
4
+ ._11bl1txw >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{display:flex}
5
+ ._12glglyw[data-markdown-mode-hide-prosemirror=true]>.ak-editor-content-area>.ProseMirror{display:none}
6
+ ._13jk1txw >.ak-editor-content-area{display:flex}
7
+ ._13svglyw .ProseMirror>ol:not([data-node-type=actionList]):not([data-node-type=decisionList]){clear:none}
8
+ ._13t61wug >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{flex-basis:auto}
9
+ ._142emslj .fabric-editor--full-width-mode .code-block{max-width:calc(100% - 4px)}
10
+ ._1593idpf >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{min-height:0}
11
+ ._16jlkb7n{flex-grow:1}
12
+ ._17q71osq .fabric-editor--full-width-mode .extension-container.inline{max-width:100%}
13
+ ._18q6usvi .ProseMirror{box-sizing:border-box}
14
+ ._18u01wug{margin-left:auto}
15
+ ._18u0idpf{margin-left:0}
16
+ ._19bv1ex1{padding-left:52px}
17
+ ._19bvidpf{padding-left:0}
18
+ ._19bvt9kd{padding-left:72px}
19
+ ._19pk1wug{margin-top:auto}
20
+ ._19pkidpf{margin-top:0}
21
+ ._19pknm9q{margin-top:calc(var(--ds-space-500, 40px) + 1px)}
22
+ ._1a1d1osq >.ak-editor-content-area{height:100%}
23
+ ._1b7c1kw7 .fabric-editor--full-width-mode td .extension-container.inline{max-width:inherit}
24
+ ._1bsb1osq{width:100%}
25
+ ._1e0c1txw{display:flex}
26
+ ._1e0cglyw{display:none}
27
+ ._1e8kkb7n >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{flex-grow:1}
28
+ ._1f38dez1{container-name:editor-area}
29
+ ._1gl01ejb .ProseMirror>p:last-child{margin-bottom:var(--ds-space-300,24px)}
30
+ ._1k8i1osq .ProseMirror .pm-table-wrapper>table{width:100%}
31
+ ._1n5qidpf >.ak-editor-content-area{padding-left:0}
32
+ ._1nw4glyw .ProseMirror>h1{clear:none}
33
+ ._1qzyglyw .ProseMirror>h3{clear:none}
34
+ ._1rnyglyw .ProseMirror>h5{clear:none}
35
+ ._1tb2idpf .ProseMirror .pm-table-wrapper>table{margin-left:0}
36
+ ._1ul9idpf{min-width:0}
37
+ ._1vbxidpf >.ak-editor-content-area{min-height:0}
38
+ ._1wpzesu3{align-self:flex-end}
39
+ ._1wrrusvi >.ak-editor-content-area{box-sizing:border-box}
40
+ ._1wxymslj .fabric-editor--full-width-mode .extension-container{max-width:calc(100% - 4px)}
41
+ ._1xouidpf >.ak-editor-content-area{min-width:0}
42
+ ._2hwx1wug{margin-right:auto}
43
+ ._2hwxidpf{margin-right:0}
44
+ ._2lx21bp4{flex-direction:column}
45
+ ._2lx2vrvc{flex-direction:row}
46
+ ._4t3i1ap5{height:calc(100% - 105px)}
47
+ ._4t3i1osq{height:100%}
48
+ ._4t3ibhu0{height:calc(100% - var(--ak-editor-fullpage-toolbar-height))}
49
+ ._4tbp1osq >.ak-editor-content-area{width:100%}
50
+ ._71ybidpf >.ak-editor-content-area{padding-right:0}
51
+ ._7cca15wb{container-type:inline-size}
52
+ ._7uc0glyw .ProseMirror>ul{clear:none}
53
+ ._8j6w1lxk.ak-editor-content-area-no-toolbar{height:calc(100% + 1px)}
54
+ ._8vye1n1a .ProseMirror .pm-table-wrapper>table{margin-right:-1px}
55
+ ._9dtbmslj .fabric-editor--full-width-mode .multiBodiedExtension--container{max-width:calc(100% - 4px)}
56
+ ._amwgglyw[data-markdown-mode-hide-scroll-gutter=true]>.ak-editor-content-area>[data-vc=scroll-gutter]{display:none}
57
+ ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
58
+ ._boivkb7n >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{flex-shrink:1}
59
+ ._ca0qidpf{padding-top:0}
60
+ ._ca0qoahv{padding-top:var(--ds-space-600,3pc)}
61
+ ._ca0qxy5q{padding-top:var(--ds-space-400,2pc)}
62
+ ._evz0idpf >.ak-editor-content-area{padding-bottom:0}
63
+ ._fh67idpf >.ak-editor-content-area{padding-top:0}
64
+ ._i92uagmp .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .fabric-editor-breakout-mark{transform:none!important}
65
+ ._j9k7kb7n .ProseMirror{flex-grow:1}
66
+ ._l4a11hrf .ProseMirror>*{clear:both}
67
+ ._li931osq >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{width:100%}
68
+ ._n3tdidpf{padding-bottom:0}
69
+ ._n3tdoahv{padding-bottom:var(--ds-space-600,3pc)}
70
+ ._njlp131u{contain:layout style inline-size}
71
+ ._ongaglyw .ProseMirror>h4{clear:none}
72
+ ._otyr1wug{margin-bottom:auto}
73
+ ._otyridpf{margin-bottom:0}
74
+ ._p12f5kin{max-width:var(--ak-editor-content-area-max-width)}
75
+ ._p12fglyw{max-width:none}
76
+ ._pnffaq80 .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .fabric-editor-breakout-mark{width:100%!important}
77
+ ._q0l01bp4 >.ak-editor-content-area{flex-direction:column}
78
+ ._qgzyidpf >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{min-width:0}
79
+ ._qkfz261p .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .fabric-editor-breakout-mark{margin-left:unset!important}
80
+ ._t2fzglyw .ProseMirror>p{clear:none}
81
+ ._tynl4diq .fabric-editor--full-width-mode [data-layout-section]{max-width:calc(100% + 40px)}
82
+ ._tynlfknx .fabric-editor--full-width-mode [data-layout-section]{max-width:calc(100% + 24px)}
83
+ ._u5f31ex1{padding-right:52px}
84
+ ._u5f3idpf{padding-right:0}
85
+ ._u5f3t9kd{padding-right:72px}
86
+ ._vchhusvi{box-sizing:border-box}
87
+ ._vtulglyw .ProseMirror>h6{clear:none}
88
+ ._vwz41tcg{line-height:24px}
89
+ ._xpemaq80 .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .extension-container.block{width:100%!important}
90
+ ._yq1qglyw .ProseMirror>h2{clear:none}
91
+ ._zr7faq80 .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .pm-table-container{width:100%!important}
92
+ .ak-editor-content-area-no-toolbar ._1uizkqmb{padding-top:calc(var(--ds-space-600, 3pc) + var(--ak-editor-fullpage-toolbar-height) + 1px)}
93
+ .extension-editable-area ._13hh1y6m{align-self:flex-start}
94
+ .extension-editable-area ._1hgw1wug{height:auto}
95
+ .extension-editable-area ._1t1q1if8{position:sticky}
96
+ .extension-editable-area ._uj9widpf{top:0}
97
+ @container editor-area (max-width: 600px){._1d7gidpf{padding-top:0}._n2nw1tcg{padding-right:24px}._d329idpf{padding-bottom:0}._105p1tcg{padding-left:24px}}
@@ -0,0 +1,191 @@
1
+ /* FullPageContentArea-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.FullPageContentAreaCompiled = exports.EDITOR_CONTAINER = exports.CONTENT_AREA_TEST_ID = void 0;
10
+ require("./FullPageContentArea-compiled.compiled.css");
11
+ var _runtime = require("@compiled/react/runtime");
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var _classnames = _interopRequireDefault(require("classnames"));
14
+ var _reactIntl = require("react-intl");
15
+ var _hooks = require("@atlaskit/editor-common/hooks");
16
+ var _messages = require("@atlaskit/editor-common/messages");
17
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
+ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
20
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
21
+ var _ClickAreaBlock = require("../../Addon/ClickAreaBlock");
22
+ var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
23
+ var _ContextPanel = require("../../ContextPanel");
24
+ var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
25
+ var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
26
+ 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); }
27
+ // Ignored via go/ees005
28
+ // eslint-disable-next-line import/no-named-as-default
29
+ var akEditorFullWidthLayoutWidth = 1800;
30
+ var akEditorUltraWideLayoutWidth = 4000;
31
+ var akEditorSwoopCubicBezier = "cubic-bezier(0.15, 1, 0.3, 1)";
32
+ var tableMarginFullWidthMode = 2;
33
+ var akLayoutGutterOffset = 12;
34
+ var SWOOP_ANIMATION = "0.5s ".concat(akEditorSwoopCubicBezier);
35
+ var AK_NESTED_DND_GUTTER_OFFSET = 8;
36
+ var getTotalPadding = function getTotalPadding() {
37
+ return (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2;
38
+ };
39
+ var compiledStyles = {
40
+ contentAreaWrapper: "_1bsb1osq _7cca15wb _1f38dez1 _njlp131u",
41
+ sidebarArea: "_4t3i1osq _vchhusvi _1wpzesu3 _1hgw1wug _1t1q1if8 _uj9widpf _13hh1y6m",
42
+ editorContentAreaProsemirrorStyle: "_j9k7kb7n _18q6usvi _l4a11hrf _1nw4glyw _yq1qglyw _1qzyglyw _ongaglyw _1rnyglyw _vtulglyw _13svglyw _t2fzglyw _7uc0glyw _1gl01ejb",
43
+ hideEditorContentAreaProsemirrorWithAttributeStyle: "_12glglyw",
44
+ hideEditorContentAreaScrollGutterWithAttributeStyle: "_amwgglyw",
45
+ hideEditorScrollGutterStyle: "_1e0cglyw",
46
+ fullWidthNonChromelessBreakoutBlockTableStyle: "_xpemaq80 _pnffaq80 _zr7faq80 _qkfz261p _i92uagmp",
47
+ contentAreaReservedPrimaryToolbarSpace: "_19pknm9q",
48
+ contentAreaReducedHeaderSpace: "_ca0qxy5q",
49
+ editorContentAreaNew: "_19pk1wug _2hwx1wug _otyr1wug _18u01wug _v5641fxv _vwz41tcg _ca0qoahv _n3tdoahv _4t3i1ap5 _1bsb1osq _2lx21bp4 _16jlkb7n _p12f5kin _1uizkqmb",
50
+ tableFullPageEditorStylesNew: "_1tb2idpf _8vye1n1a _1k8i1osq",
51
+ editorContentAreaContainerNestedDndStyle: "_tynl4diq",
52
+ editorContentAreaContainerStyleExcludeCodeBlockNew: "_1wxymslj _9dtbmslj _17q71osq _1b7c1kw7 _tynlfknx",
53
+ editorContentAreaContainerStyleNew: "_142emslj _1wxymslj _9dtbmslj _17q71osq _1b7c1kw7 _tynlfknx",
54
+ editorContentGutterStyleFG: "_ca0qidpf _u5f3t9kd _n3tdidpf _19bvt9kd",
55
+ editorContentGutterStyles: "_ca0qidpf _u5f31ex1 _n3tdidpf _19bv1ex1 _vchhusvi",
56
+ editorContentReducedGutterStyles: "_1d7gidpf _n2nw1tcg _d329idpf _105p1tcg",
57
+ contentAreaNew: "_19pkidpf _2hwxidpf _otyridpf _18u0idpf _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _v5642kub _1e0c1txw _2lx2vrvc _4t3ibhu0 _vchhusvi _8j6w1lxk",
58
+ contentAreaHeightNoToolbar: "_4t3i1osq",
59
+ markdownModeContainerBackgroundStyle: "_bfhkhfxm _101j15vq",
60
+ markdownModeContentAreaStyle: "_19pkidpf _2hwxidpf _otyridpf _18u0idpf _vchhusvi _4t3i1osq _p12fglyw _1ul9idpf _n3tdidpf _ca0qidpf _1bsb1osq _fh67idpf _71ybidpf _evz0idpf _1n5qidpf _1wrrusvi _13jk1txw _q0l01bp4 _1a1d1osq _1vbxidpf _1xouidpf _4tbp1osq _1e8kkb7n _boivkb7n _13t61wug _11bl1txw _1593idpf _qgzyidpf _li931osq"
61
+ };
62
+ var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
63
+ // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
64
+ var EDITOR_CONTAINER = exports.EDITOR_CONTAINER = 'ak-editor-container';
65
+ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
66
+ var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _contentAreaRef$curre, _allowScrollGutter$gu, _allowScrollGutter$gu2;
67
+ var fullWidthMode = props.appearance === 'full-width';
68
+ var maxWidthMode = props.appearance === 'max';
69
+ var scrollContainerRef = (0, _react.useRef)(null);
70
+ var contentAreaRef = (0, _react.useRef)(null);
71
+ var containerRef = (0, _react.useRef)(null);
72
+ var allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.base) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.sharedState.currentState()) === null || _props$editorAPI === void 0 ? void 0 : _props$editorAPI.allowScrollGutter;
73
+ var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : _editorSharedStyles.akEditorDefaultLayoutWidth : akEditorFullWidthLayoutWidth);
74
+
75
+ // Get useStandardNodeWidth from block menu plugin shared state
76
+ // Only access editorAPI when the experiment is enabled to avoid performance impact
77
+ var useStandardNodeWidth = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
78
+ (0, _react.useImperativeHandle)(ref, function () {
79
+ return {
80
+ get scrollContainer() {
81
+ return scrollContainerRef.current;
82
+ },
83
+ get contentArea() {
84
+ return contentAreaRef.current;
85
+ },
86
+ get containerArea() {
87
+ return containerRef.current;
88
+ }
89
+ };
90
+ }, []);
91
+ var markdownPluginCurrentView = (0, _hooks.useSharedPluginStateWithSelector)(props.editorAPI, ['markdownMode'], function (states) {
92
+ var _states$markdownModeS;
93
+ return (_states$markdownModeS = states.markdownModeState) === null || _states$markdownModeS === void 0 ? void 0 : _states$markdownModeS.view;
94
+ });
95
+ var markdownPluginCurrentIsMarkdownMode = (0, _hooks.useSharedPluginStateWithSelector)(props.editorAPI, ['markdownMode'], function (states) {
96
+ var _states$markdownModeS2;
97
+ return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
98
+ });
99
+ var isMarkdownModeExperimentEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true);
100
+ var shouldHideProseMirrorForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
101
+ var shouldHideScrollGutterForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentIsMarkdownMode;
102
+ var shouldUseMarkdownModeMvpLayout = shouldHideProseMirrorForMarkdownMode && (0, _platformFeatureFlags.fg)('platform_editor_md_mvp_layout');
103
+ return /*#__PURE__*/_react.default.createElement("div", {
104
+ "data-testid": CONTENT_AREA_TEST_ID,
105
+ ref: containerRef,
106
+ className: (0, _runtime.ax)([compiledStyles.contentAreaNew, props.isEditorToolbarHidden && compiledStyles.contentAreaHeightNoToolbar])
107
+ }, /*#__PURE__*/_react.default.createElement("div", {
108
+ "data-testid": EDITOR_CONTAINER,
109
+ "data-editor-container": 'true',
110
+ className: (0, _runtime.ax)([compiledStyles.contentAreaWrapper, shouldUseMarkdownModeMvpLayout && compiledStyles.markdownModeContainerBackgroundStyle])
111
+ }, /*#__PURE__*/_react.default.createElement(_EditorContentContainer.default
112
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
113
+ , {
114
+ className: "fabric-editor-popup-scroll-parent",
115
+ featureFlags: props.featureFlags,
116
+ ref: scrollContainerRef,
117
+ viewMode: props === null || props === void 0 ? void 0 : props.viewMode,
118
+ isScrollable: true,
119
+ appearance: props.appearance,
120
+ contentMode: props.contentMode,
121
+ useStandardNodeWidth: useStandardNodeWidth
122
+ }, /*#__PURE__*/_react.default.createElement(_ClickAreaBlock.ClickAreaBlock, {
123
+ editorView: props.editorView,
124
+ editorDisabled: props.disabled
125
+ }, /*#__PURE__*/_react.default.createElement("div", {
126
+ "data-markdown-mode-hide-prosemirror": shouldHideProseMirrorForMarkdownMode ? 'true' : undefined,
127
+ "data-markdown-mode-hide-scroll-gutter": shouldHideScrollGutterForMarkdownMode ? 'true' : undefined,
128
+ style: {
129
+ '--ak-editor-content-area-max-width': "".concat(contentAreaMaxWidth, "px")
130
+ }
131
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
132
+ ,
133
+ className: (0, _runtime.ax)([compiledStyles.editorContentAreaNew, compiledStyles.editorContentAreaProsemirrorStyle, shouldHideProseMirrorForMarkdownMode && compiledStyles.hideEditorContentAreaProsemirrorWithAttributeStyle, shouldHideScrollGutterForMarkdownMode && compiledStyles.hideEditorContentAreaScrollGutterWithAttributeStyle, shouldUseMarkdownModeMvpLayout && compiledStyles.markdownModeContentAreaStyle, compiledStyles.tableFullPageEditorStylesNew, compiledStyles.fullWidthNonChromelessBreakoutBlockTableStyle, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) ? compiledStyles.editorContentAreaContainerStyleExcludeCodeBlockNew : compiledStyles.editorContentAreaContainerStyleNew, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && compiledStyles.editorContentAreaContainerNestedDndStyle, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && compiledStyles.contentAreaReducedHeaderSpace, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && compiledStyles.contentAreaReservedPrimaryToolbarSpace, "ak-editor-content-area-region"]),
134
+ "data-editor-editable-content": true,
135
+ role: "region",
136
+ "aria-label": props.intl.formatMessage(_messages.fullPageMessages.editableContentLabel),
137
+ ref: contentAreaRef,
138
+ "data-vc": "editor-content-area-region"
139
+ }, /*#__PURE__*/_react.default.createElement("div", {
140
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
141
+ className: (0, _runtime.ax)([compiledStyles.editorContentGutterStyles, (0, _platformFeatureFlags.fg)('platform_editor_controls_increase_full_page_gutter') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && compiledStyles.editorContentGutterStyleFG, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
142
+ exposure: true
143
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
144
+ }) && compiledStyles.editorContentReducedGutterStyles, (0, _classnames.default)('ak-editor-content-area', 'appearance-full-page', {
145
+ 'fabric-editor--full-width-mode': fullWidthMode,
146
+ 'fabric-editor--max-width-mode': Boolean(maxWidthMode)
147
+ })]),
148
+ ref: contentAreaRef
149
+ }, !!props.customContentComponents && 'before' in props.customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents), /*#__PURE__*/_react.default.createElement(_PluginSlot.default, {
150
+ editorView: props.editorView,
151
+ editorActions: props.editorActions,
152
+ eventDispatcher: props.eventDispatcher,
153
+ providerFactory: props.providerFactory,
154
+ appearance: props.appearance,
155
+ items: props.contentComponents,
156
+ pluginHooks: props.pluginHooks,
157
+ contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
158
+ popupsMountPoint: props.popupsMountPoint,
159
+ popupsBoundariesElement: props.popupsBoundariesElement,
160
+ popupsScrollableElement: props.popupsScrollableElement,
161
+ disabled: !!props.disabled,
162
+ containerElement: scrollContainerRef.current,
163
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
164
+ wrapperElement: props.wrapperElement
165
+ }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents.after) : null, allowScrollGutter && ((0, _experiments.editorExperiment)('platform_editor_blocks', true) ? /*#__PURE__*/_react.default.createElement("div", {
166
+ id: "editor-scroll-gutter",
167
+ style: {
168
+ paddingBottom: "".concat((_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120', "px")
169
+ },
170
+ "data-vc": "scroll-gutter",
171
+ "data-editor-scroll-gutter": "true",
172
+ className: (0, _runtime.ax)([shouldHideScrollGutterForMarkdownMode && compiledStyles.hideEditorScrollGutterStyle])
173
+ }) : /*#__PURE__*/_react.default.createElement("div", {
174
+ id: "editor-scroll-gutter",
175
+ style: {
176
+ paddingBottom: "".concat((_allowScrollGutter$gu2 = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu2 !== void 0 ? _allowScrollGutter$gu2 : '120', "px")
177
+ },
178
+ "data-vc": "scroll-gutter",
179
+ className: (0, _runtime.ax)([shouldHideScrollGutterForMarkdownMode && compiledStyles.hideEditorScrollGutterStyle])
180
+ }))))))), /*#__PURE__*/_react.default.createElement("div", {
181
+ className: (0, _runtime.ax)([compiledStyles.sidebarArea])
182
+ }, props.contextPanel || /*#__PURE__*/_react.default.createElement(_ContextPanel.ContextPanel, {
183
+ editorAPI: props.editorAPI,
184
+ visible: false
185
+ })));
186
+ });
187
+
188
+ // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
189
+ var FullPageContentAreaCompiled = exports.FullPageContentAreaCompiled = (0, _reactIntl.injectIntl)(Content, {
190
+ forwardRef: true
191
+ });