@atlaskit/editor-core 197.10.1 → 197.10.3
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 +17 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +5 -44
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +19 -20
- package/dist/cjs/ui/ContentStyles/index.js +14 -5
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +6 -45
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +18 -19
- package/dist/es2019/ui/ContentStyles/index.js +28 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +6 -45
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +18 -19
- package/dist/esm/ui/ContentStyles/index.js +13 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +24 -2
- package/dist/types/presets/universal.d.ts +25 -3
- package/dist/types/presets/useUniversalPreset.d.ts +24 -2
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -11
- package/dist/types/ui/ContentStyles/index.d.ts +4 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +28 -2
- package/dist/types-ts4.5/presets/universal.d.ts +29 -3
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +28 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -11
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +4 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 197.10.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#144122](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144122)
|
|
8
|
+
[`5edb8d0467311`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5edb8d0467311) -
|
|
9
|
+
fix layout shift issue on first block node on SSR
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 197.10.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#144162](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144162)
|
|
17
|
+
[`2b2233eed311a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2b2233eed311a) -
|
|
18
|
+
ED-24858: fixes layout shifts for tables under SSR
|
|
19
|
+
|
|
3
20
|
## 197.10.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -26,7 +26,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
26
26
|
|
|
27
27
|
var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
28
28
|
var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
29
|
-
var _contentAreaRef$curre
|
|
29
|
+
var _contentAreaRef$curre;
|
|
30
30
|
var theme = (0, _react2.useTheme)();
|
|
31
31
|
var fullWidthMode = props.appearance === 'full-width';
|
|
32
32
|
var scrollContainerRef = (0, _react.useRef)(null);
|
|
@@ -46,14 +46,16 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
46
46
|
};
|
|
47
47
|
}, []);
|
|
48
48
|
return (0, _react2.jsx)("div", {
|
|
49
|
-
css: [
|
|
49
|
+
css: [(0, _platformFeatureFlags.fg)('platform_editor_breakout_use_css') ?
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
51
|
+
_StyledComponents.contentAreaContainerTypeInlineSize :
|
|
50
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
51
53
|
_StyledComponents.contentArea,
|
|
52
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
53
55
|
props.isEditorToolbarHidden && _StyledComponents.contentAreaHeightNoToolbar],
|
|
54
56
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
55
57
|
ref: containerRef
|
|
56
|
-
}, (0,
|
|
58
|
+
}, (0, _react2.jsx)(_StyledComponents.ScrollContainer
|
|
57
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
58
60
|
, {
|
|
59
61
|
className: "fabric-editor-popup-scroll-parent",
|
|
@@ -94,47 +96,6 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
94
96
|
containerElement: scrollContainerRef.current,
|
|
95
97
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
96
98
|
wrapperElement: props.wrapperElement
|
|
97
|
-
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))) : (0, _react2.jsx)(_StyledComponents.ScrollContainer
|
|
98
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
99
|
-
, {
|
|
100
|
-
className: "fabric-editor-popup-scroll-parent",
|
|
101
|
-
featureFlags: props.featureFlags,
|
|
102
|
-
ref: scrollContainerRef
|
|
103
|
-
}, (0, _react2.jsx)(_Addon.ClickAreaBlock, {
|
|
104
|
-
editorView: props.editorView,
|
|
105
|
-
editorDisabled: props.disabled
|
|
106
|
-
}, (0, _react2.jsx)("div", {
|
|
107
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
108
|
-
css: (0, _StyledComponents.editorContentAreaStyle)({
|
|
109
|
-
fullWidthMode: fullWidthMode,
|
|
110
|
-
layoutMaxWidth: theme.layoutMaxWidth
|
|
111
|
-
}),
|
|
112
|
-
role: "region",
|
|
113
|
-
"aria-label": props.intl.formatMessage(_messages.fullPageMessages.editableContentLabel),
|
|
114
|
-
ref: contentAreaRef
|
|
115
|
-
}, (0, _react2.jsx)("div", {
|
|
116
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
117
|
-
css: (0, _StyledComponents.editorContentGutterStyle)()
|
|
118
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
119
|
-
,
|
|
120
|
-
className: ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
121
|
-
ref: contentAreaRef
|
|
122
|
-
}, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, (0, _react2.jsx)(_PluginSlot.default, {
|
|
123
|
-
editorView: props.editorView,
|
|
124
|
-
editorActions: props.editorActions,
|
|
125
|
-
eventDispatcher: props.eventDispatcher,
|
|
126
|
-
providerFactory: props.providerFactory,
|
|
127
|
-
appearance: props.appearance,
|
|
128
|
-
items: props.contentComponents,
|
|
129
|
-
pluginHooks: props.pluginHooks,
|
|
130
|
-
contentArea: (_contentAreaRef$curre2 = contentAreaRef.current) !== null && _contentAreaRef$curre2 !== void 0 ? _contentAreaRef$curre2 : undefined,
|
|
131
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
132
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
133
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
134
|
-
disabled: !!props.disabled,
|
|
135
|
-
containerElement: scrollContainerRef.current,
|
|
136
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
137
|
-
wrapperElement: props.wrapperElement
|
|
138
99
|
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), (0, _react2.jsx)("div", {
|
|
139
100
|
css: _StyledComponents.sidebarArea
|
|
140
101
|
}, props.contextPanel || (0, _react2.jsx)(_ContextPanel.ContextPanel, {
|
|
@@ -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.contentAreaHeightNoToolbar = exports.
|
|
7
|
+
exports.sidebarArea = exports.fullPageEditorWrapper = exports.editorContentGutterStyle = exports.editorContentAreaStyle = exports.editorContentAreaHideContainer = exports.contentAreaHeightNoToolbar = exports.contentAreaContainerTypeInlineSize = exports.contentArea = exports.ScrollContainer = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
@@ -41,29 +41,10 @@ var scrollStyles = (0, _react.css)({
|
|
|
41
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
42
|
_scrollbar.scrollbarStyles);
|
|
43
43
|
|
|
44
|
-
// Added containerType and containerName to enable breakout plugin to calculate the width of the container
|
|
45
|
-
var scrollStylesWitContainerType = (0, _react.css)({
|
|
46
|
-
flexGrow: 1,
|
|
47
|
-
height: '100%',
|
|
48
|
-
overflowY: 'scroll',
|
|
49
|
-
position: 'relative',
|
|
50
|
-
display: 'flex',
|
|
51
|
-
flexDirection: 'column',
|
|
52
|
-
scrollBehavior: 'smooth',
|
|
53
|
-
containerType: 'inline-size',
|
|
54
|
-
containerName: 'editor-area'
|
|
55
|
-
},
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
|
-
_scrollbar.scrollbarStyles);
|
|
58
|
-
|
|
59
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
60
45
|
var ScrollContainer = exports.ScrollContainer = (0, _ContentStyles.createEditorContentStyle)(scrollStyles);
|
|
61
46
|
ScrollContainer.displayName = 'ScrollContainer';
|
|
62
47
|
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
|
-
var ScrollContainerNext = exports.ScrollContainerNext = (0, _ContentStyles.createEditorContentStyle)(scrollStylesWitContainerType);
|
|
65
|
-
ScrollContainerNext.displayName = 'ScrollContainer';
|
|
66
|
-
|
|
67
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
68
49
|
var contentArea = exports.contentArea = function contentArea() {
|
|
69
50
|
var editorToolbarHeight = (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)();
|
|
@@ -80,6 +61,24 @@ var contentArea = exports.contentArea = function contentArea() {
|
|
|
80
61
|
});
|
|
81
62
|
};
|
|
82
63
|
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
65
|
+
var contentAreaContainerTypeInlineSize = exports.contentAreaContainerTypeInlineSize = function contentAreaContainerTypeInlineSize() {
|
|
66
|
+
var editorToolbarHeight = (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)();
|
|
67
|
+
return (0, _react.css)({
|
|
68
|
+
display: 'flex',
|
|
69
|
+
flexDirection: 'row',
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
|
+
height: "calc(100% - ".concat(editorToolbarHeight, ")"),
|
|
72
|
+
boxSizing: 'border-box',
|
|
73
|
+
margin: 0,
|
|
74
|
+
padding: 0,
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
76
|
+
transition: "padding 0ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
|
|
77
|
+
containerType: 'inline-size',
|
|
78
|
+
containerName: 'editor-area'
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
83
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
84
83
|
var contentAreaHeightNoToolbar = exports.contentAreaHeightNoToolbar = (0, _react.css)({
|
|
85
84
|
height: '100%'
|
|
@@ -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.placeholderStyles = exports.linkStyles = exports.default = exports.createEditorContentStyle = void 0;
|
|
8
|
+
exports.placeholderStyles = exports.linkStyles = exports.fixBlockControlStylesSSR = exports.default = exports.createEditorContentStyle = void 0;
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
@@ -14,6 +14,7 @@ var _collab = require("@atlaskit/editor-common/collab");
|
|
|
14
14
|
var _emoji = require("@atlaskit/editor-common/emoji");
|
|
15
15
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
16
16
|
var _mention = require("@atlaskit/editor-common/mention");
|
|
17
|
+
var _panel = require("@atlaskit/editor-common/panel");
|
|
17
18
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
18
19
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
19
20
|
var _styles2 = require("@atlaskit/editor-plugins/block-type/styles");
|
|
@@ -32,10 +33,10 @@ var _expand = require("./expand");
|
|
|
32
33
|
var _extension = require("./extension");
|
|
33
34
|
var _layout = require("./layout");
|
|
34
35
|
var _media = require("./media");
|
|
35
|
-
var
|
|
36
|
+
var _panel2 = require("./panel");
|
|
36
37
|
var _status = require("./status");
|
|
37
38
|
var _tasksAndDecisions = require("./tasks-and-decisions");
|
|
38
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
39
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
39
40
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
40
41
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
41
42
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
|
|
@@ -73,13 +74,21 @@ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
|
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
});
|
|
77
|
+
var firstBlockNodeStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (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);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* fix layout issue of first block node
|
|
81
|
+
*/
|
|
82
|
+
var fixBlockControlStylesSSR = exports.fixBlockControlStylesSSR = function fixBlockControlStylesSSR() {
|
|
83
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_block_controls') ? firstBlockNodeStyles : null;
|
|
84
|
+
};
|
|
76
85
|
|
|
77
86
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
78
87
|
var akEditorBreakpointForSmallDevice = "1266px";
|
|
79
88
|
var contentStyles = function contentStyles(props) {
|
|
80
|
-
return (0, _react2.css)(
|
|
89
|
+
return (0, _react2.css)(_templateObject7 || (_templateObject7 = (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: 52px;\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/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (min-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.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\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/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _editorSharedStyles.editorFontSize)({
|
|
81
90
|
theme: props.theme
|
|
82
|
-
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(
|
|
91
|
+
}), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject8 || (_templateObject8 = (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"]))), "var(--ds-border-focused, #8cf)", (0, _platformFeatureFlags.fg)('platform_editor_mark_boundary_cursor') ? (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t"]))) : null, _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), _media.mediaStyles, (0, _layout.layoutStyles)(props.viewMode), _collab.telepointerStyle, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(), (0, _styles.smartCardStyles)(), _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, (0, _aiPanels.aiPanelStyles)(props.colorMode), fixBlockControlStylesSSR(), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
83
92
|
};
|
|
84
93
|
var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
85
94
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
@@ -13,10 +13,10 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
13
13
|
import { ClickAreaBlock } from '../../Addon';
|
|
14
14
|
import { ContextPanel } from '../../ContextPanel';
|
|
15
15
|
import PluginSlot from '../../PluginSlot';
|
|
16
|
-
import { contentArea, contentAreaHeightNoToolbar, editorContentAreaStyle, editorContentGutterStyle, ScrollContainer,
|
|
16
|
+
import { contentArea, contentAreaContainerTypeInlineSize, contentAreaHeightNoToolbar, editorContentAreaStyle, editorContentGutterStyle, ScrollContainer, sidebarArea } from './StyledComponents';
|
|
17
17
|
export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
18
18
|
const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
19
|
-
var _contentAreaRef$curre
|
|
19
|
+
var _contentAreaRef$curre;
|
|
20
20
|
const theme = useTheme();
|
|
21
21
|
const fullWidthMode = props.appearance === 'full-width';
|
|
22
22
|
const scrollContainerRef = useRef(null);
|
|
@@ -34,14 +34,16 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
34
34
|
}
|
|
35
35
|
}), []);
|
|
36
36
|
return jsx("div", {
|
|
37
|
-
css: [
|
|
37
|
+
css: [fg('platform_editor_breakout_use_css') ?
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
39
|
+
contentAreaContainerTypeInlineSize :
|
|
38
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
39
41
|
contentArea,
|
|
40
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
41
43
|
props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
42
44
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
43
45
|
ref: containerRef
|
|
44
|
-
},
|
|
46
|
+
}, jsx(ScrollContainer
|
|
45
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
46
48
|
, {
|
|
47
49
|
className: "fabric-editor-popup-scroll-parent",
|
|
@@ -82,47 +84,6 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
82
84
|
containerElement: scrollContainerRef.current,
|
|
83
85
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
84
86
|
wrapperElement: props.wrapperElement
|
|
85
|
-
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))) : jsx(ScrollContainer
|
|
86
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
87
|
-
, {
|
|
88
|
-
className: "fabric-editor-popup-scroll-parent",
|
|
89
|
-
featureFlags: props.featureFlags,
|
|
90
|
-
ref: scrollContainerRef
|
|
91
|
-
}, jsx(ClickAreaBlock, {
|
|
92
|
-
editorView: props.editorView,
|
|
93
|
-
editorDisabled: props.disabled
|
|
94
|
-
}, jsx("div", {
|
|
95
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
96
|
-
css: editorContentAreaStyle({
|
|
97
|
-
fullWidthMode,
|
|
98
|
-
layoutMaxWidth: theme.layoutMaxWidth
|
|
99
|
-
}),
|
|
100
|
-
role: "region",
|
|
101
|
-
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
102
|
-
ref: contentAreaRef
|
|
103
|
-
}, jsx("div", {
|
|
104
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
105
|
-
css: editorContentGutterStyle()
|
|
106
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
107
|
-
,
|
|
108
|
-
className: ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
109
|
-
ref: contentAreaRef
|
|
110
|
-
}, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, jsx(PluginSlot, {
|
|
111
|
-
editorView: props.editorView,
|
|
112
|
-
editorActions: props.editorActions,
|
|
113
|
-
eventDispatcher: props.eventDispatcher,
|
|
114
|
-
providerFactory: props.providerFactory,
|
|
115
|
-
appearance: props.appearance,
|
|
116
|
-
items: props.contentComponents,
|
|
117
|
-
pluginHooks: props.pluginHooks,
|
|
118
|
-
contentArea: (_contentAreaRef$curre2 = contentAreaRef.current) !== null && _contentAreaRef$curre2 !== void 0 ? _contentAreaRef$curre2 : undefined,
|
|
119
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
120
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
121
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
122
|
-
disabled: !!props.disabled,
|
|
123
|
-
containerElement: scrollContainerRef.current,
|
|
124
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
125
|
-
wrapperElement: props.wrapperElement
|
|
126
87
|
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
|
|
127
88
|
css: sidebarArea
|
|
128
89
|
}, props.contextPanel || jsx(ContextPanel, {
|
|
@@ -32,29 +32,10 @@ const scrollStyles = css({
|
|
|
32
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
33
33
|
scrollbarStyles);
|
|
34
34
|
|
|
35
|
-
// Added containerType and containerName to enable breakout plugin to calculate the width of the container
|
|
36
|
-
const scrollStylesWitContainerType = css({
|
|
37
|
-
flexGrow: 1,
|
|
38
|
-
height: '100%',
|
|
39
|
-
overflowY: 'scroll',
|
|
40
|
-
position: 'relative',
|
|
41
|
-
display: 'flex',
|
|
42
|
-
flexDirection: 'column',
|
|
43
|
-
scrollBehavior: 'smooth',
|
|
44
|
-
containerType: 'inline-size',
|
|
45
|
-
containerName: 'editor-area'
|
|
46
|
-
},
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
|
-
scrollbarStyles);
|
|
49
|
-
|
|
50
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
51
36
|
export const ScrollContainer = createEditorContentStyle(scrollStyles);
|
|
52
37
|
ScrollContainer.displayName = 'ScrollContainer';
|
|
53
38
|
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
55
|
-
export const ScrollContainerNext = createEditorContentStyle(scrollStylesWitContainerType);
|
|
56
|
-
ScrollContainerNext.displayName = 'ScrollContainer';
|
|
57
|
-
|
|
58
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
59
40
|
export const contentArea = () => {
|
|
60
41
|
const editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
|
|
@@ -71,6 +52,24 @@ export const contentArea = () => {
|
|
|
71
52
|
});
|
|
72
53
|
};
|
|
73
54
|
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
56
|
+
export const contentAreaContainerTypeInlineSize = () => {
|
|
57
|
+
const editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
|
|
58
|
+
return css({
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexDirection: 'row',
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
62
|
+
height: `calc(100% - ${editorToolbarHeight})`,
|
|
63
|
+
boxSizing: 'border-box',
|
|
64
|
+
margin: 0,
|
|
65
|
+
padding: 0,
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
67
|
+
transition: `padding 0ms ${akEditorSwoopCubicBezier}`,
|
|
68
|
+
containerType: 'inline-size',
|
|
69
|
+
containerName: 'editor-area'
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
74
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
75
74
|
export const contentAreaHeightNoToolbar = css({
|
|
76
75
|
height: '100%'
|
|
@@ -16,8 +16,9 @@ import { telepointerStyle } from '@atlaskit/editor-common/collab';
|
|
|
16
16
|
import { EmojiSharedCssClassName } from '@atlaskit/editor-common/emoji';
|
|
17
17
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
18
18
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
19
|
+
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
19
20
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
20
|
-
import { annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, MediaSharedClassNames, paragraphSharedStyles, resizerStyles, ruleSharedStyles, shadowSharedStyle, SmartCardSharedCssClassName, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
21
|
+
import { annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, CodeBlockSharedCssClassName, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, MediaSharedClassNames, paragraphSharedStyles, resizerStyles, ruleSharedStyles, shadowSharedStyle, SmartCardSharedCssClassName, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
21
22
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
22
23
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
23
24
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
@@ -148,6 +149,31 @@ export const placeholderStyles = css({
|
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
151
|
});
|
|
152
|
+
const firstBlockNodeStyles = css`
|
|
153
|
+
.ProseMirror {
|
|
154
|
+
> .${PanelSharedCssClassName.prefix},
|
|
155
|
+
> .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER},
|
|
156
|
+
> .${SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER},
|
|
157
|
+
> div[data-task-list-local-id],
|
|
158
|
+
> div[data-layout-section],
|
|
159
|
+
> .${expandClassNames.prefix} {
|
|
160
|
+
&:first-child {
|
|
161
|
+
margin-top: 0;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
> hr:first-of-type {
|
|
166
|
+
margin-top: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
`;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* fix layout issue of first block node
|
|
173
|
+
*/
|
|
174
|
+
export const fixBlockControlStylesSSR = () => {
|
|
175
|
+
return fg('platform_editor_ssr_fix_block_controls') ? firstBlockNodeStyles : null;
|
|
176
|
+
};
|
|
151
177
|
|
|
152
178
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
153
179
|
const akEditorBreakpointForSmallDevice = `1266px`;
|
|
@@ -262,6 +288,7 @@ const contentStyles = props => css`
|
|
|
262
288
|
${unsupportedStyles}
|
|
263
289
|
${resizerStyles}
|
|
264
290
|
${aiPanelStyles(props.colorMode)}
|
|
291
|
+
${fixBlockControlStylesSSR()}
|
|
265
292
|
|
|
266
293
|
.panelView-content-wrap {
|
|
267
294
|
box-sizing: border-box;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "197.10.
|
|
2
|
+
export const version = "197.10.3";
|
|
@@ -13,10 +13,10 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
13
13
|
import { ClickAreaBlock } from '../../Addon';
|
|
14
14
|
import { ContextPanel } from '../../ContextPanel';
|
|
15
15
|
import PluginSlot from '../../PluginSlot';
|
|
16
|
-
import { contentArea, contentAreaHeightNoToolbar, editorContentAreaStyle, editorContentGutterStyle, ScrollContainer,
|
|
16
|
+
import { contentArea, contentAreaContainerTypeInlineSize, contentAreaHeightNoToolbar, editorContentAreaStyle, editorContentGutterStyle, ScrollContainer, sidebarArea } from './StyledComponents';
|
|
17
17
|
export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
18
18
|
var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
19
|
-
var _contentAreaRef$curre
|
|
19
|
+
var _contentAreaRef$curre;
|
|
20
20
|
var theme = useTheme();
|
|
21
21
|
var fullWidthMode = props.appearance === 'full-width';
|
|
22
22
|
var scrollContainerRef = useRef(null);
|
|
@@ -36,14 +36,16 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
36
36
|
};
|
|
37
37
|
}, []);
|
|
38
38
|
return jsx("div", {
|
|
39
|
-
css: [
|
|
39
|
+
css: [fg('platform_editor_breakout_use_css') ?
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
41
|
+
contentAreaContainerTypeInlineSize :
|
|
40
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
41
43
|
contentArea,
|
|
42
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
43
45
|
props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
44
46
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
45
47
|
ref: containerRef
|
|
46
|
-
},
|
|
48
|
+
}, jsx(ScrollContainer
|
|
47
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
48
50
|
, {
|
|
49
51
|
className: "fabric-editor-popup-scroll-parent",
|
|
@@ -84,47 +86,6 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
84
86
|
containerElement: scrollContainerRef.current,
|
|
85
87
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
86
88
|
wrapperElement: props.wrapperElement
|
|
87
|
-
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))) : jsx(ScrollContainer
|
|
88
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
89
|
-
, {
|
|
90
|
-
className: "fabric-editor-popup-scroll-parent",
|
|
91
|
-
featureFlags: props.featureFlags,
|
|
92
|
-
ref: scrollContainerRef
|
|
93
|
-
}, jsx(ClickAreaBlock, {
|
|
94
|
-
editorView: props.editorView,
|
|
95
|
-
editorDisabled: props.disabled
|
|
96
|
-
}, jsx("div", {
|
|
97
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
98
|
-
css: editorContentAreaStyle({
|
|
99
|
-
fullWidthMode: fullWidthMode,
|
|
100
|
-
layoutMaxWidth: theme.layoutMaxWidth
|
|
101
|
-
}),
|
|
102
|
-
role: "region",
|
|
103
|
-
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
104
|
-
ref: contentAreaRef
|
|
105
|
-
}, jsx("div", {
|
|
106
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
107
|
-
css: editorContentGutterStyle()
|
|
108
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
109
|
-
,
|
|
110
|
-
className: ['ak-editor-content-area', 'appearance-full-page', fullWidthMode ? 'fabric-editor--full-width-mode' : ''].join(' '),
|
|
111
|
-
ref: contentAreaRef
|
|
112
|
-
}, !!props.customContentComponents && 'before' in props.customContentComponents ? props.customContentComponents.before : props.customContentComponents, jsx(PluginSlot, {
|
|
113
|
-
editorView: props.editorView,
|
|
114
|
-
editorActions: props.editorActions,
|
|
115
|
-
eventDispatcher: props.eventDispatcher,
|
|
116
|
-
providerFactory: props.providerFactory,
|
|
117
|
-
appearance: props.appearance,
|
|
118
|
-
items: props.contentComponents,
|
|
119
|
-
pluginHooks: props.pluginHooks,
|
|
120
|
-
contentArea: (_contentAreaRef$curre2 = contentAreaRef.current) !== null && _contentAreaRef$curre2 !== void 0 ? _contentAreaRef$curre2 : undefined,
|
|
121
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
122
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
123
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
124
|
-
disabled: !!props.disabled,
|
|
125
|
-
containerElement: scrollContainerRef.current,
|
|
126
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
127
|
-
wrapperElement: props.wrapperElement
|
|
128
89
|
}), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? props.customContentComponents.after : null)))), jsx("div", {
|
|
129
90
|
css: sidebarArea
|
|
130
91
|
}, props.contextPanel || jsx(ContextPanel, {
|
|
@@ -36,29 +36,10 @@ var scrollStyles = css({
|
|
|
36
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
37
37
|
scrollbarStyles);
|
|
38
38
|
|
|
39
|
-
// Added containerType and containerName to enable breakout plugin to calculate the width of the container
|
|
40
|
-
var scrollStylesWitContainerType = css({
|
|
41
|
-
flexGrow: 1,
|
|
42
|
-
height: '100%',
|
|
43
|
-
overflowY: 'scroll',
|
|
44
|
-
position: 'relative',
|
|
45
|
-
display: 'flex',
|
|
46
|
-
flexDirection: 'column',
|
|
47
|
-
scrollBehavior: 'smooth',
|
|
48
|
-
containerType: 'inline-size',
|
|
49
|
-
containerName: 'editor-area'
|
|
50
|
-
},
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
|
-
scrollbarStyles);
|
|
53
|
-
|
|
54
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
55
40
|
export var ScrollContainer = createEditorContentStyle(scrollStyles);
|
|
56
41
|
ScrollContainer.displayName = 'ScrollContainer';
|
|
57
42
|
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
59
|
-
export var ScrollContainerNext = createEditorContentStyle(scrollStylesWitContainerType);
|
|
60
|
-
ScrollContainerNext.displayName = 'ScrollContainer';
|
|
61
|
-
|
|
62
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
63
44
|
export var contentArea = function contentArea() {
|
|
64
45
|
var editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
|
|
@@ -75,6 +56,24 @@ export var contentArea = function contentArea() {
|
|
|
75
56
|
});
|
|
76
57
|
};
|
|
77
58
|
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
60
|
+
export var contentAreaContainerTypeInlineSize = function contentAreaContainerTypeInlineSize() {
|
|
61
|
+
var editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
|
|
62
|
+
return css({
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
|
+
height: "calc(100% - ".concat(editorToolbarHeight, ")"),
|
|
67
|
+
boxSizing: 'border-box',
|
|
68
|
+
margin: 0,
|
|
69
|
+
padding: 0,
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
|
+
transition: "padding 0ms ".concat(akEditorSwoopCubicBezier),
|
|
72
|
+
containerType: 'inline-size',
|
|
73
|
+
containerName: 'editor-area'
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
78
77
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
79
78
|
export var contentAreaHeightNoToolbar = css({
|
|
80
79
|
height: '100%'
|