@atlaskit/editor-core 221.2.1 → 221.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +50 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +50 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +50 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 221.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`036b4169b1a86`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/036b4169b1a86) -
|
|
8
|
+
[ux] Make Footer sit at the bottom of the page
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`ee28cf33718b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ee28cf33718b0) -
|
|
13
|
+
Add @atlassian/react-compiler-gating as a runtime dependency to enable React Compiler platform
|
|
14
|
+
gating.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 221.2.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
{
|
|
117
117
|
"path": "../../../design-system/width-detector/afm-products/tsconfig.json"
|
|
118
118
|
},
|
|
119
|
+
{
|
|
120
|
+
"path": "../../../react-compiler/react-compiler-gating/afm-products/tsconfig.json"
|
|
121
|
+
},
|
|
119
122
|
{
|
|
120
123
|
"path": "../../editor-common/afm-products/tsconfig.json"
|
|
121
124
|
},
|
|
@@ -72,6 +72,15 @@ var hideEditorContentAreaProsemirrorWithAttributeStyle = (0, _react2.css)({
|
|
|
72
72
|
display: 'none'
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
+
var hideEditorContentAreaScrollGutterWithAttributeStyle = (0, _react2.css)({
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
77
|
+
'&[data-markdown-mode-hide-scroll-gutter="true"] > .ak-editor-content-area > [data-vc="scroll-gutter"]': {
|
|
78
|
+
display: 'none'
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
var hideEditorScrollGutterStyle = (0, _react2.css)({
|
|
82
|
+
display: 'none'
|
|
83
|
+
});
|
|
75
84
|
var fullWidthNonChromelessBreakoutBlockTableStyle = (0, _react2.css)({
|
|
76
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
77
86
|
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
@@ -228,6 +237,38 @@ var contentAreaHeightNoToolbar = (0, _react2.css)({
|
|
|
228
237
|
var markdownModeContainerBackgroundStyle = (0, _react2.css)({
|
|
229
238
|
backgroundColor: "var(--ds-surface-sunken, #F8F8F8)"
|
|
230
239
|
});
|
|
240
|
+
var markdownModeContentAreaStyle = (0, _react2.css)({
|
|
241
|
+
boxSizing: 'border-box',
|
|
242
|
+
height: '100%',
|
|
243
|
+
margin: 0,
|
|
244
|
+
maxWidth: 'none',
|
|
245
|
+
minWidth: 0,
|
|
246
|
+
paddingBottom: 0,
|
|
247
|
+
paddingTop: 0,
|
|
248
|
+
width: '100%',
|
|
249
|
+
// The markdown source view is rendered through PluginSlot. Stretch those
|
|
250
|
+
// intermediate wrappers so its in-flow footer can sit at the bottom without
|
|
251
|
+
// overlaying the CodeMirror scrollbar.
|
|
252
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
253
|
+
'> .ak-editor-content-area': {
|
|
254
|
+
boxSizing: 'border-box',
|
|
255
|
+
display: 'flex',
|
|
256
|
+
flexDirection: 'column',
|
|
257
|
+
height: '100%',
|
|
258
|
+
minHeight: 0,
|
|
259
|
+
minWidth: 0,
|
|
260
|
+
padding: 0,
|
|
261
|
+
width: '100%'
|
|
262
|
+
},
|
|
263
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
264
|
+
'> .ak-editor-content-area > [data-testid="plugins-components-wrapper"]': {
|
|
265
|
+
display: 'flex',
|
|
266
|
+
flex: '1 1 auto',
|
|
267
|
+
minHeight: 0,
|
|
268
|
+
minWidth: 0,
|
|
269
|
+
width: '100%'
|
|
270
|
+
}
|
|
271
|
+
});
|
|
231
272
|
var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
232
273
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
233
274
|
var EDITOR_CONTAINER = exports.EDITOR_CONTAINER = 'ak-editor-container';
|
|
@@ -266,7 +307,10 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
266
307
|
var _states$markdownModeS2;
|
|
267
308
|
return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
|
|
268
309
|
});
|
|
269
|
-
var
|
|
310
|
+
var isMarkdownModeExperimentEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true);
|
|
311
|
+
var shouldHideProseMirrorForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
|
|
312
|
+
var shouldHideScrollGutterForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentIsMarkdownMode;
|
|
313
|
+
var shouldUseMarkdownModeMvpLayout = shouldHideProseMirrorForMarkdownMode && (0, _platformFeatureFlags.fg)('platform_editor_md_mvp_layout');
|
|
270
314
|
return (0, _react2.jsx)("div", {
|
|
271
315
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
272
316
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -274,7 +318,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
274
318
|
}, (0, _react2.jsx)("div", {
|
|
275
319
|
css: [
|
|
276
320
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
277
|
-
_StyledComponents.contentAreaWrapper,
|
|
321
|
+
_StyledComponents.contentAreaWrapper, shouldUseMarkdownModeMvpLayout && markdownModeContainerBackgroundStyle],
|
|
278
322
|
"data-testid": EDITOR_CONTAINER,
|
|
279
323
|
"data-editor-container": 'true'
|
|
280
324
|
}, (0, _react2.jsx)(_EditorContentContainer.default
|
|
@@ -293,10 +337,11 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
293
337
|
editorDisabled: props.disabled
|
|
294
338
|
}, (0, _react2.jsx)("div", {
|
|
295
339
|
"data-markdown-mode-hide-prosemirror": shouldHideProseMirrorForMarkdownMode ? 'true' : undefined,
|
|
340
|
+
"data-markdown-mode-hide-scroll-gutter": shouldHideScrollGutterForMarkdownMode ? 'true' : undefined,
|
|
296
341
|
css: [editorContentAreaNew, editorContentAreaProsemirrorStyle,
|
|
297
342
|
// EDITOR-6558: hide ProseMirror when the markdown-mode plugin
|
|
298
343
|
// reports a non-WYSIWYG view.
|
|
299
|
-
shouldHideProseMirrorForMarkdownMode && hideEditorContentAreaProsemirrorWithAttributeStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
344
|
+
shouldHideProseMirrorForMarkdownMode && hideEditorContentAreaProsemirrorWithAttributeStyle, shouldHideScrollGutterForMarkdownMode && hideEditorContentAreaScrollGutterWithAttributeStyle, shouldUseMarkdownModeMvpLayout && markdownModeContentAreaStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
300
345
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
301
346
|
(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !(0, _platformFeatureFlags.fg)('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace],
|
|
302
347
|
style: {
|
|
@@ -341,6 +386,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
341
386
|
wrapperElement: props.wrapperElement
|
|
342
387
|
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(props.customContentComponents.after) : null, allowScrollGutter && ((0, _experiments.editorExperiment)('platform_editor_blocks', true) ? (0, _react2.jsx)("div", {
|
|
343
388
|
id: "editor-scroll-gutter",
|
|
389
|
+
css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
|
|
344
390
|
style: {
|
|
345
391
|
paddingBottom: "".concat((_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120', "px")
|
|
346
392
|
},
|
|
@@ -348,6 +394,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
348
394
|
"data-editor-scroll-gutter": "true"
|
|
349
395
|
}) : (0, _react2.jsx)("div", {
|
|
350
396
|
id: "editor-scroll-gutter",
|
|
397
|
+
css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
|
|
351
398
|
style: {
|
|
352
399
|
paddingBottom: "".concat((_allowScrollGutter$gu2 = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu2 !== void 0 ? _allowScrollGutter$gu2 : '120', "px")
|
|
353
400
|
},
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
8
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
9
|
-
var version = exports.version = "221.2.
|
|
9
|
+
var version = exports.version = "221.2.1";
|
|
@@ -63,6 +63,15 @@ const hideEditorContentAreaProsemirrorWithAttributeStyle = css({
|
|
|
63
63
|
display: 'none'
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
+
const hideEditorContentAreaScrollGutterWithAttributeStyle = css({
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
68
|
+
'&[data-markdown-mode-hide-scroll-gutter="true"] > .ak-editor-content-area > [data-vc="scroll-gutter"]': {
|
|
69
|
+
display: 'none'
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const hideEditorScrollGutterStyle = css({
|
|
73
|
+
display: 'none'
|
|
74
|
+
});
|
|
66
75
|
const fullWidthNonChromelessBreakoutBlockTableStyle = css({
|
|
67
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
68
77
|
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
@@ -222,6 +231,38 @@ const contentAreaHeightNoToolbar = css({
|
|
|
222
231
|
const markdownModeContainerBackgroundStyle = css({
|
|
223
232
|
backgroundColor: "var(--ds-surface-sunken, #F8F8F8)"
|
|
224
233
|
});
|
|
234
|
+
const markdownModeContentAreaStyle = css({
|
|
235
|
+
boxSizing: 'border-box',
|
|
236
|
+
height: '100%',
|
|
237
|
+
margin: 0,
|
|
238
|
+
maxWidth: 'none',
|
|
239
|
+
minWidth: 0,
|
|
240
|
+
paddingBottom: 0,
|
|
241
|
+
paddingTop: 0,
|
|
242
|
+
width: '100%',
|
|
243
|
+
// The markdown source view is rendered through PluginSlot. Stretch those
|
|
244
|
+
// intermediate wrappers so its in-flow footer can sit at the bottom without
|
|
245
|
+
// overlaying the CodeMirror scrollbar.
|
|
246
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
247
|
+
'> .ak-editor-content-area': {
|
|
248
|
+
boxSizing: 'border-box',
|
|
249
|
+
display: 'flex',
|
|
250
|
+
flexDirection: 'column',
|
|
251
|
+
height: '100%',
|
|
252
|
+
minHeight: 0,
|
|
253
|
+
minWidth: 0,
|
|
254
|
+
padding: 0,
|
|
255
|
+
width: '100%'
|
|
256
|
+
},
|
|
257
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
258
|
+
'> .ak-editor-content-area > [data-testid="plugins-components-wrapper"]': {
|
|
259
|
+
display: 'flex',
|
|
260
|
+
flex: '1 1 auto',
|
|
261
|
+
minHeight: 0,
|
|
262
|
+
minWidth: 0,
|
|
263
|
+
width: '100%'
|
|
264
|
+
}
|
|
265
|
+
});
|
|
225
266
|
export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
226
267
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
227
268
|
export const EDITOR_CONTAINER = 'ak-editor-container';
|
|
@@ -258,7 +299,10 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
258
299
|
var _states$markdownModeS2;
|
|
259
300
|
return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
|
|
260
301
|
});
|
|
261
|
-
const
|
|
302
|
+
const isMarkdownModeExperimentEnabled = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true);
|
|
303
|
+
const shouldHideProseMirrorForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
|
|
304
|
+
const shouldHideScrollGutterForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentIsMarkdownMode;
|
|
305
|
+
const shouldUseMarkdownModeMvpLayout = shouldHideProseMirrorForMarkdownMode && fg('platform_editor_md_mvp_layout');
|
|
262
306
|
return jsx("div", {
|
|
263
307
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
264
308
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -266,7 +310,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
266
310
|
}, jsx("div", {
|
|
267
311
|
css: [
|
|
268
312
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
269
|
-
contentAreaWrapper,
|
|
313
|
+
contentAreaWrapper, shouldUseMarkdownModeMvpLayout && markdownModeContainerBackgroundStyle],
|
|
270
314
|
"data-testid": EDITOR_CONTAINER,
|
|
271
315
|
"data-editor-container": 'true'
|
|
272
316
|
}, jsx(EditorContentContainer
|
|
@@ -285,10 +329,11 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
285
329
|
editorDisabled: props.disabled
|
|
286
330
|
}, jsx("div", {
|
|
287
331
|
"data-markdown-mode-hide-prosemirror": shouldHideProseMirrorForMarkdownMode ? 'true' : undefined,
|
|
332
|
+
"data-markdown-mode-hide-scroll-gutter": shouldHideScrollGutterForMarkdownMode ? 'true' : undefined,
|
|
288
333
|
css: [editorContentAreaNew, editorContentAreaProsemirrorStyle,
|
|
289
334
|
// EDITOR-6558: hide ProseMirror when the markdown-mode plugin
|
|
290
335
|
// reports a non-WYSIWYG view.
|
|
291
|
-
shouldHideProseMirrorForMarkdownMode && hideEditorContentAreaProsemirrorWithAttributeStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
336
|
+
shouldHideProseMirrorForMarkdownMode && hideEditorContentAreaProsemirrorWithAttributeStyle, shouldHideScrollGutterForMarkdownMode && hideEditorContentAreaScrollGutterWithAttributeStyle, shouldUseMarkdownModeMvpLayout && markdownModeContentAreaStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
292
337
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
293
338
|
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, fg('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !fg('platform_editor_controls_no_toolbar_space') && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !fg('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace],
|
|
294
339
|
style: {
|
|
@@ -333,6 +378,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
333
378
|
wrapperElement: props.wrapperElement
|
|
334
379
|
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.after) : null, allowScrollGutter && (editorExperiment('platform_editor_blocks', true) ? jsx("div", {
|
|
335
380
|
id: "editor-scroll-gutter",
|
|
381
|
+
css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
|
|
336
382
|
style: {
|
|
337
383
|
paddingBottom: `${(_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120'}px`
|
|
338
384
|
},
|
|
@@ -340,6 +386,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
340
386
|
"data-editor-scroll-gutter": "true"
|
|
341
387
|
}) : jsx("div", {
|
|
342
388
|
id: "editor-scroll-gutter",
|
|
389
|
+
css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
|
|
343
390
|
style: {
|
|
344
391
|
paddingBottom: `${(_allowScrollGutter$gu2 = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu2 !== void 0 ? _allowScrollGutter$gu2 : '120'}px`
|
|
345
392
|
},
|
|
@@ -62,6 +62,15 @@ var hideEditorContentAreaProsemirrorWithAttributeStyle = css({
|
|
|
62
62
|
display: 'none'
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
+
var hideEditorContentAreaScrollGutterWithAttributeStyle = css({
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
67
|
+
'&[data-markdown-mode-hide-scroll-gutter="true"] > .ak-editor-content-area > [data-vc="scroll-gutter"]': {
|
|
68
|
+
display: 'none'
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
var hideEditorScrollGutterStyle = css({
|
|
72
|
+
display: 'none'
|
|
73
|
+
});
|
|
65
74
|
var fullWidthNonChromelessBreakoutBlockTableStyle = css({
|
|
66
75
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
67
76
|
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
@@ -218,6 +227,38 @@ var contentAreaHeightNoToolbar = css({
|
|
|
218
227
|
var markdownModeContainerBackgroundStyle = css({
|
|
219
228
|
backgroundColor: "var(--ds-surface-sunken, #F8F8F8)"
|
|
220
229
|
});
|
|
230
|
+
var markdownModeContentAreaStyle = css({
|
|
231
|
+
boxSizing: 'border-box',
|
|
232
|
+
height: '100%',
|
|
233
|
+
margin: 0,
|
|
234
|
+
maxWidth: 'none',
|
|
235
|
+
minWidth: 0,
|
|
236
|
+
paddingBottom: 0,
|
|
237
|
+
paddingTop: 0,
|
|
238
|
+
width: '100%',
|
|
239
|
+
// The markdown source view is rendered through PluginSlot. Stretch those
|
|
240
|
+
// intermediate wrappers so its in-flow footer can sit at the bottom without
|
|
241
|
+
// overlaying the CodeMirror scrollbar.
|
|
242
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
243
|
+
'> .ak-editor-content-area': {
|
|
244
|
+
boxSizing: 'border-box',
|
|
245
|
+
display: 'flex',
|
|
246
|
+
flexDirection: 'column',
|
|
247
|
+
height: '100%',
|
|
248
|
+
minHeight: 0,
|
|
249
|
+
minWidth: 0,
|
|
250
|
+
padding: 0,
|
|
251
|
+
width: '100%'
|
|
252
|
+
},
|
|
253
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
254
|
+
'> .ak-editor-content-area > [data-testid="plugins-components-wrapper"]': {
|
|
255
|
+
display: 'flex',
|
|
256
|
+
flex: '1 1 auto',
|
|
257
|
+
minHeight: 0,
|
|
258
|
+
minWidth: 0,
|
|
259
|
+
width: '100%'
|
|
260
|
+
}
|
|
261
|
+
});
|
|
221
262
|
export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
222
263
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
223
264
|
export var EDITOR_CONTAINER = 'ak-editor-container';
|
|
@@ -256,7 +297,10 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
256
297
|
var _states$markdownModeS2;
|
|
257
298
|
return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
|
|
258
299
|
});
|
|
259
|
-
var
|
|
300
|
+
var isMarkdownModeExperimentEnabled = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true);
|
|
301
|
+
var shouldHideProseMirrorForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
|
|
302
|
+
var shouldHideScrollGutterForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentIsMarkdownMode;
|
|
303
|
+
var shouldUseMarkdownModeMvpLayout = shouldHideProseMirrorForMarkdownMode && fg('platform_editor_md_mvp_layout');
|
|
260
304
|
return jsx("div", {
|
|
261
305
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
262
306
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -264,7 +308,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
264
308
|
}, jsx("div", {
|
|
265
309
|
css: [
|
|
266
310
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
267
|
-
contentAreaWrapper,
|
|
311
|
+
contentAreaWrapper, shouldUseMarkdownModeMvpLayout && markdownModeContainerBackgroundStyle],
|
|
268
312
|
"data-testid": EDITOR_CONTAINER,
|
|
269
313
|
"data-editor-container": 'true'
|
|
270
314
|
}, jsx(EditorContentContainer
|
|
@@ -283,10 +327,11 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
283
327
|
editorDisabled: props.disabled
|
|
284
328
|
}, jsx("div", {
|
|
285
329
|
"data-markdown-mode-hide-prosemirror": shouldHideProseMirrorForMarkdownMode ? 'true' : undefined,
|
|
330
|
+
"data-markdown-mode-hide-scroll-gutter": shouldHideScrollGutterForMarkdownMode ? 'true' : undefined,
|
|
286
331
|
css: [editorContentAreaNew, editorContentAreaProsemirrorStyle,
|
|
287
332
|
// EDITOR-6558: hide ProseMirror when the markdown-mode plugin
|
|
288
333
|
// reports a non-WYSIWYG view.
|
|
289
|
-
shouldHideProseMirrorForMarkdownMode && hideEditorContentAreaProsemirrorWithAttributeStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
334
|
+
shouldHideProseMirrorForMarkdownMode && hideEditorContentAreaProsemirrorWithAttributeStyle, shouldHideScrollGutterForMarkdownMode && hideEditorContentAreaScrollGutterWithAttributeStyle, shouldUseMarkdownModeMvpLayout && markdownModeContentAreaStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
|
|
290
335
|
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
291
336
|
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) ? editorContentAreaContainerStyleExcludeCodeBlockNew : editorContentAreaContainerStyleNew, fg('platform_editor_nested_dnd_styles_changes') && editorContentAreaContainerNestedDndStyle, !fg('platform_editor_controls_no_toolbar_space') && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReducedHeaderSpace, !fg('platform_editor_controls_no_toolbar_space') && props.isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') && contentAreaReservedPrimaryToolbarSpace],
|
|
292
337
|
style: {
|
|
@@ -331,6 +376,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
331
376
|
wrapperElement: props.wrapperElement
|
|
332
377
|
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.after) : null, allowScrollGutter && (editorExperiment('platform_editor_blocks', true) ? jsx("div", {
|
|
333
378
|
id: "editor-scroll-gutter",
|
|
379
|
+
css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
|
|
334
380
|
style: {
|
|
335
381
|
paddingBottom: "".concat((_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120', "px")
|
|
336
382
|
},
|
|
@@ -338,6 +384,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
338
384
|
"data-editor-scroll-gutter": "true"
|
|
339
385
|
}) : jsx("div", {
|
|
340
386
|
id: "editor-scroll-gutter",
|
|
387
|
+
css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
|
|
341
388
|
style: {
|
|
342
389
|
paddingBottom: "".concat((_allowScrollGutter$gu2 = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu2 !== void 0 ? _allowScrollGutter$gu2 : '120', "px")
|
|
343
390
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "221.
|
|
3
|
+
"version": "221.3.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -66,10 +66,11 @@
|
|
|
66
66
|
"@atlaskit/platform-feature-flags-react": "^1.0.0",
|
|
67
67
|
"@atlaskit/react-ufo": "^7.1.0",
|
|
68
68
|
"@atlaskit/task-decision": "^21.2.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
70
|
-
"@atlaskit/tokens": "^
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^110.0.0",
|
|
70
|
+
"@atlaskit/tokens": "^15.0.0",
|
|
71
71
|
"@atlaskit/tooltip": "^23.0.0",
|
|
72
72
|
"@atlaskit/width-detector": "^6.0.0",
|
|
73
|
+
"@atlassian/react-compiler-gating": "^0.2.0",
|
|
73
74
|
"@babel/runtime": "^7.0.0",
|
|
74
75
|
"@compiled/react": "^0.20.0",
|
|
75
76
|
"@emotion/react": "^11.7.1",
|
|
@@ -84,7 +85,7 @@
|
|
|
84
85
|
"uuid": "^3.1.0"
|
|
85
86
|
},
|
|
86
87
|
"peerDependencies": {
|
|
87
|
-
"@atlaskit/editor-common": "^116.
|
|
88
|
+
"@atlaskit/editor-common": "^116.11.0",
|
|
88
89
|
"@atlaskit/link-provider": "^5.0.0",
|
|
89
90
|
"@atlaskit/media-core": "^38.0.0",
|
|
90
91
|
"react": "^18.2.0",
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
"@atlaskit/collab-provider": "^21.0.0",
|
|
102
103
|
"@atlaskit/editor-plugin-annotation": "^12.0.0",
|
|
103
104
|
"@atlaskit/editor-plugin-card": "^18.0.0",
|
|
104
|
-
"@atlaskit/editor-plugin-list": "^14.
|
|
105
|
+
"@atlaskit/editor-plugin-list": "^14.1.0",
|
|
105
106
|
"@atlaskit/editor-plugin-paste": "^13.1.0",
|
|
106
107
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
107
108
|
"@atlaskit/link-provider": "^5.0.0",
|
|
@@ -114,7 +115,7 @@
|
|
|
114
115
|
"@atlaskit/popper": "^8.0.0",
|
|
115
116
|
"@atlaskit/portal": "^6.0.0",
|
|
116
117
|
"@atlaskit/renderer": "^133.5.0",
|
|
117
|
-
"@atlaskit/section-message": "^9.
|
|
118
|
+
"@atlaskit/section-message": "^9.1.0",
|
|
118
119
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
119
120
|
"@atlaskit/toggle": "^17.0.0",
|
|
120
121
|
"@atlaskit/util-data-test": "^19.0.0",
|
|
@@ -123,7 +124,6 @@
|
|
|
123
124
|
"@atlassian/adf-schema-json": "^1.33.0",
|
|
124
125
|
"@atlassian/editor-rovo-bridge": "^10.0.0",
|
|
125
126
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
126
|
-
"@atlassian/react-compiler-gating": "workspace:^",
|
|
127
127
|
"@atlassian/search-client": "^1.16.0",
|
|
128
128
|
"@atlassian/search-provider": "^13.0.0",
|
|
129
129
|
"@atlassian/structured-docs-types": "workspace:^",
|