@atlaskit/editor-core 208.3.2 → 208.3.4
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 +19 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +334 -7
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -189
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +329 -8
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -180
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +335 -8
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -187
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +0 -7
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +0 -7
- package/package.json +6 -13
|
@@ -9,10 +9,15 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
9
9
|
import { css, jsx, useTheme } from '@emotion/react';
|
|
10
10
|
import classnames from 'classnames';
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
|
+
import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
|
|
12
13
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
14
|
+
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
15
|
+
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT as FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_OLD, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
13
16
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
14
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
18
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
19
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
16
21
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
22
|
// Ignored via go/ees005
|
|
18
23
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -22,7 +27,313 @@ import { createEditorContentStyle } from '../../ContentStyles';
|
|
|
22
27
|
import { ContextPanel } from '../../ContextPanel';
|
|
23
28
|
import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
|
|
24
29
|
import PluginSlot from '../../PluginSlot';
|
|
25
|
-
import { contentArea,
|
|
30
|
+
import { contentArea, contentAreaWrapper, sidebarArea } from './StyledComponents';
|
|
31
|
+
const akEditorFullWidthLayoutWidth = 1800;
|
|
32
|
+
const akEditorSwoopCubicBezier = `cubic-bezier(0.15, 1, 0.3, 1)`;
|
|
33
|
+
const tableMarginFullWidthMode = 2;
|
|
34
|
+
const akLayoutGutterOffset = 12;
|
|
35
|
+
const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
|
|
36
|
+
const AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
37
|
+
const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = "var(--ds-space-500, 40px)";
|
|
38
|
+
const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE = '2.188rem';
|
|
39
|
+
const getTotalPadding = () => akEditorGutterPaddingDynamic() * 2;
|
|
40
|
+
|
|
41
|
+
// old styles - to be deleted when cleaning up experiment `platform_editor_core_static_emotion_non_central`
|
|
42
|
+
const editorContentAreaStyle = ({
|
|
43
|
+
layoutMaxWidth,
|
|
44
|
+
fullWidthMode,
|
|
45
|
+
isEditorToolbarHidden
|
|
46
|
+
}) => [editorContentArea, editorContentAreaProsemirrorStyle, fg('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth),
|
|
47
|
+
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
48
|
+
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlock() : editorContentAreaContainerStyle(), ...(fg('platform_editor_controls_no_toolbar_space') ? [] : [editorExperiment('platform_editor_controls', 'variant1') &&
|
|
49
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
50
|
+
contentAreaReducedHeaderSpace, isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') &&
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
52
|
+
contentAreaReservedPrimaryToolbarSpace])];
|
|
53
|
+
const editorContentAreaWithLayoutWith = layoutMaxWidth => css({
|
|
54
|
+
// this restricts max width
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
|
+
maxWidth: `${layoutMaxWidth + getTotalPadding()}px`
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/* Prevent horizontal scroll on page in full width mode */
|
|
60
|
+
const editorContentAreaContainerStyleExcludeCodeBlock = () => css({
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
62
|
+
'.fabric-editor--full-width-mode': {
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
64
|
+
'.extension-container, .multiBodiedExtension--container': {
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
66
|
+
maxWidth: `calc(100% - ${tableMarginFullWidthMode * 2}px)`
|
|
67
|
+
},
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
69
|
+
'.extension-container.inline': {
|
|
70
|
+
maxWidth: '100%'
|
|
71
|
+
},
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
73
|
+
'td .extension-container.inline': {
|
|
74
|
+
maxWidth: 'inherit'
|
|
75
|
+
},
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
77
|
+
'[data-layout-section]': {
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
79
|
+
maxWidth: `calc(100% + ${(akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)) * 2}px)`
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/* Prevent horizontal scroll on page in full width mode */
|
|
85
|
+
const editorContentAreaContainerStyle = () => css({
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
87
|
+
'.fabric-editor--full-width-mode': {
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
89
|
+
'.code-block, .extension-container, .multiBodiedExtension--container': {
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
91
|
+
maxWidth: `calc(100% - ${tableMarginFullWidthMode * 2}px)`
|
|
92
|
+
},
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
94
|
+
'.extension-container.inline': {
|
|
95
|
+
maxWidth: '100%'
|
|
96
|
+
},
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
98
|
+
'td .extension-container.inline': {
|
|
99
|
+
maxWidth: 'inherit'
|
|
100
|
+
},
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
102
|
+
'[data-layout-section]': {
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
104
|
+
maxWidth: `calc(100% + ${(akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)) * 2}px)`
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
const editorContentArea = css({
|
|
109
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
110
|
+
lineHeight: '24px',
|
|
111
|
+
paddingTop: "var(--ds-space-600, 48px)",
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
113
|
+
'.ak-editor-content-area-no-toolbar &': {
|
|
114
|
+
// When the toolbar is hidden, we don't want content to jump up
|
|
115
|
+
// the extra 1px is to account for the border on the toolbar
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
117
|
+
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_OLD()} + 1px)`
|
|
118
|
+
},
|
|
119
|
+
paddingBottom: "var(--ds-space-600, 48px)",
|
|
120
|
+
height: 'calc( 100% - 105px )',
|
|
121
|
+
width: '100%',
|
|
122
|
+
margin: 'auto',
|
|
123
|
+
flexDirection: 'column',
|
|
124
|
+
flexGrow: 1,
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
126
|
+
maxWidth: `${akEditorFullWidthLayoutWidth + getTotalPadding()}px`,
|
|
127
|
+
transition: `max-width ${SWOOP_ANIMATION}`
|
|
128
|
+
},
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
130
|
+
tableFullPageEditorStyles);
|
|
131
|
+
const editorContentAreaProsemirrorStyle = css({
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
133
|
+
'& .ProseMirror': {
|
|
134
|
+
flexGrow: 1,
|
|
135
|
+
boxSizing: 'border-box',
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
137
|
+
'& > *': {
|
|
138
|
+
clear: 'both'
|
|
139
|
+
},
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
141
|
+
[`> p, > ul, > ol:not(${taskListSelector}):not(${decisionListSelector}), > h1, > h2, > h3, > h4, > h5, > h6`]: {
|
|
142
|
+
clear: 'none'
|
|
143
|
+
},
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
145
|
+
'> p:last-child': {
|
|
146
|
+
marginBottom: "var(--ds-space-300, 24px)"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
const fullWidthModeBreakoutBlockTableStyle = css({
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
152
|
+
'.fabric-editor--full-width-mode': {
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
154
|
+
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
155
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
156
|
+
width: '100% !important'
|
|
157
|
+
},
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
159
|
+
'.fabric-editor-breakout-mark': {
|
|
160
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
161
|
+
marginLeft: 'unset !important',
|
|
162
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
163
|
+
transform: 'none !important'
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
const fullWidthNonChromelessBreakoutBlockTableStyle = css({
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
169
|
+
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
170
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
171
|
+
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
173
|
+
width: '100% !important'
|
|
174
|
+
},
|
|
175
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
176
|
+
'.fabric-editor-breakout-mark': {
|
|
177
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
178
|
+
marginLeft: 'unset !important',
|
|
179
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
180
|
+
transform: 'none !important'
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// An additional spacing applied at the top of the content area reserving space when the primary toolbar
|
|
186
|
+
// is hidden – this avoids layout shift when the toolbar is toggled under the editor controls feature
|
|
187
|
+
const contentAreaReservedPrimaryToolbarSpace = css({
|
|
188
|
+
// extra 1px to account for the bottom border on the toolbar
|
|
189
|
+
marginTop: `calc(${"var(--ds-space-500, 40px)"} + 1px)`
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// A reduced top spacing applied to the content area to compensate for the reserved space at the top
|
|
193
|
+
// of the page when the primary toolbar is hidden under the editor controls feature
|
|
194
|
+
const contentAreaReducedHeaderSpace = css({
|
|
195
|
+
paddingTop: "var(--ds-space-400, 32px)"
|
|
196
|
+
});
|
|
197
|
+
const editorContentGutterStyle = () => {
|
|
198
|
+
return css({
|
|
199
|
+
boxSizing: 'border-box',
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
201
|
+
padding: `0 ${akEditorGutterPaddingDynamic()}px`
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// new styles
|
|
206
|
+
const editorContentAreaNoToolbarLivePageJumpMitigation = css({
|
|
207
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
208
|
+
'.ak-editor-content-area-no-toolbar &': {
|
|
209
|
+
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE} + 1px)`
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
const editorContentAreaNoToolbarControls = css({
|
|
213
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
214
|
+
'.ak-editor-content-area-no-toolbar &': {
|
|
215
|
+
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT} + 1px)`
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
const editorContentAreaNew = css({
|
|
219
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
220
|
+
lineHeight: '24px',
|
|
221
|
+
paddingTop: "var(--ds-space-600, 48px)",
|
|
222
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
223
|
+
'.ak-editor-content-area-no-toolbar &': {
|
|
224
|
+
// When the toolbar is hidden, we don't want content to jump up
|
|
225
|
+
// the extra 1px is to account for the border on the toolbar
|
|
226
|
+
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT} + 1px)`
|
|
227
|
+
},
|
|
228
|
+
paddingBottom: "var(--ds-space-600, 48px)",
|
|
229
|
+
height: 'calc( 100% - 105px )',
|
|
230
|
+
width: '100%',
|
|
231
|
+
margin: 'auto',
|
|
232
|
+
flexDirection: 'column',
|
|
233
|
+
flexGrow: 1,
|
|
234
|
+
maxWidth: 'var(--ak-editor-content-area-max-width)',
|
|
235
|
+
transition: `max-width ${SWOOP_ANIMATION}`
|
|
236
|
+
});
|
|
237
|
+
const tableFullPageEditorStylesNew = css({
|
|
238
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
239
|
+
'.ProseMirror .pm-table-wrapper > table': {
|
|
240
|
+
marginLeft: 0,
|
|
241
|
+
/* 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212 */
|
|
242
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
243
|
+
marginRight: '-1px',
|
|
244
|
+
width: '100%'
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
const editorContentAreaContainerNestedDndStyle = css({
|
|
248
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
249
|
+
'.fabric-editor--full-width-mode': {
|
|
250
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
251
|
+
'[data-layout-section]': {
|
|
252
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
253
|
+
maxWidth: `calc(100% + ${(akLayoutGutterOffset + AK_NESTED_DND_GUTTER_OFFSET) * 2}px)`
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
/* Prevent horizontal scroll on page in full width mode */
|
|
259
|
+
const editorContentAreaContainerStyleExcludeCodeBlockNew = css({
|
|
260
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
261
|
+
'.fabric-editor--full-width-mode': {
|
|
262
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
263
|
+
'.extension-container, .multiBodiedExtension--container': {
|
|
264
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
265
|
+
maxWidth: `calc(100% - ${tableMarginFullWidthMode * 2}px)`
|
|
266
|
+
},
|
|
267
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
268
|
+
'.extension-container.inline': {
|
|
269
|
+
maxWidth: '100%'
|
|
270
|
+
},
|
|
271
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
272
|
+
'td .extension-container.inline': {
|
|
273
|
+
maxWidth: 'inherit'
|
|
274
|
+
},
|
|
275
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
276
|
+
'[data-layout-section]': {
|
|
277
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
278
|
+
maxWidth: `calc(100% + ${akLayoutGutterOffset * 2}px)`
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
/* Prevent horizontal scroll on page in full width mode */
|
|
284
|
+
const editorContentAreaContainerStyleNew = css({
|
|
285
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
286
|
+
'.fabric-editor--full-width-mode': {
|
|
287
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
288
|
+
'.code-block, .extension-container, .multiBodiedExtension--container': {
|
|
289
|
+
maxWidth: `calc(100% - ${tableMarginFullWidthMode * 2}px)`
|
|
290
|
+
},
|
|
291
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
292
|
+
'.extension-container.inline': {
|
|
293
|
+
maxWidth: '100%'
|
|
294
|
+
},
|
|
295
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
296
|
+
'td .extension-container.inline': {
|
|
297
|
+
maxWidth: 'inherit'
|
|
298
|
+
},
|
|
299
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
300
|
+
'[data-layout-section]': {
|
|
301
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
302
|
+
maxWidth: `calc(100% + ${akLayoutGutterOffset * 2}px)`
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
const editorContentGutterStyleFG = css({
|
|
307
|
+
padding: '0 72px'
|
|
308
|
+
});
|
|
309
|
+
const editorContentGutterStyles = css({
|
|
310
|
+
boxSizing: 'border-box',
|
|
311
|
+
padding: '0 52px'
|
|
312
|
+
});
|
|
313
|
+
const contentAreaNew = css({
|
|
314
|
+
display: 'flex',
|
|
315
|
+
flexDirection: 'row',
|
|
316
|
+
height: `calc(100% - ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT})`,
|
|
317
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
318
|
+
'&.ak-editor-content-area-no-toolbar': {
|
|
319
|
+
// The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
|
|
320
|
+
// to match the toolbar height
|
|
321
|
+
height: `calc(100% + 1px)`
|
|
322
|
+
},
|
|
323
|
+
boxSizing: 'border-box',
|
|
324
|
+
margin: 0,
|
|
325
|
+
padding: 0,
|
|
326
|
+
transition: `padding 0ms ${akEditorSwoopCubicBezier}`
|
|
327
|
+
});
|
|
328
|
+
const contentAreaHeightLivePageJumpMitigation = css({
|
|
329
|
+
height: `calc(100% - ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT_LIVE_PAGE})`
|
|
330
|
+
});
|
|
331
|
+
const contentAreaHeightControls = css({
|
|
332
|
+
height: `calc(100% - ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT})`
|
|
333
|
+
});
|
|
334
|
+
const contentAreaHeightNoToolbar = css({
|
|
335
|
+
height: '100%'
|
|
336
|
+
});
|
|
26
337
|
export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
27
338
|
export const EDITOR_CONTAINER = 'ak-editor-container';
|
|
28
339
|
const scrollStyles = css({
|
|
@@ -72,13 +383,13 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
72
383
|
return editorExperiment('platform_editor_controls', 'variant1');
|
|
73
384
|
};
|
|
74
385
|
return jsx("div", {
|
|
75
|
-
css: [
|
|
386
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew, fg('live_pages_content_jump_mitigation') && contentAreaHeightLivePageJumpMitigation, editorExperiment('platform_editor_controls', 'variant1', {
|
|
387
|
+
exposure: true
|
|
388
|
+
}) && contentAreaHeightControls, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
|
|
76
389
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
77
390
|
contentArea,
|
|
78
391
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
79
|
-
props.isEditorToolbarHidden &&
|
|
80
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
81
|
-
contentAreaHeightNoToolbar],
|
|
392
|
+
props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
82
393
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
83
394
|
ref: containerRef
|
|
84
395
|
}, jsx("div", {
|
|
@@ -100,13 +411,20 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
100
411
|
editorView: props.editorView,
|
|
101
412
|
editorDisabled: props.disabled
|
|
102
413
|
}, jsx("div", {
|
|
103
|
-
css: [
|
|
414
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fg('live_pages_content_jump_mitigation') && editorContentAreaNoToolbarLivePageJumpMitigation, editorExperiment('platform_editor_controls', 'variant1', {
|
|
415
|
+
exposure: true
|
|
416
|
+
}) && editorContentAreaNoToolbarControls, fg('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle,
|
|
417
|
+
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
418
|
+
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_width_changes') ? 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] : [
|
|
104
419
|
// 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
420
|
...editorContentAreaStyle({
|
|
106
421
|
fullWidthMode,
|
|
107
422
|
layoutMaxWidth: theme.layoutMaxWidth,
|
|
108
423
|
isEditorToolbarHidden: props.isEditorToolbarHidden
|
|
109
|
-
})]
|
|
424
|
+
})],
|
|
425
|
+
style: {
|
|
426
|
+
'--ak-editor-content-area-max-width': !fullWidthMode ? `${theme.layoutMaxWidth + getTotalPadding()}px` : `${akEditorFullWidthLayoutWidth + getTotalPadding()}px`
|
|
427
|
+
}
|
|
110
428
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
111
429
|
,
|
|
112
430
|
className: "ak-editor-content-area-region",
|
|
@@ -116,8 +434,11 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
116
434
|
"aria-label": props.intl.formatMessage(messages.editableContentLabel),
|
|
117
435
|
ref: contentAreaRef
|
|
118
436
|
}, jsx("div", {
|
|
437
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentGutterStyles,
|
|
438
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
439
|
+
fg('platform_editor_controls_increase_full_page_gutter') && editorExperiment('platform_editor_controls', 'variant1') && editorContentGutterStyleFG] : [
|
|
119
440
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
120
|
-
|
|
441
|
+
editorContentGutterStyle()]
|
|
121
442
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
122
443
|
,
|
|
123
444
|
className: fg('platform_editor_no_cursor_on_live_doc_init') ? classnames('ak-editor-content-area', 'appearance-full-page', {
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import {
|
|
4
|
-
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
5
|
-
import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
|
|
6
|
-
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akLayoutGutterOffset } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
11
|
-
const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
|
|
12
|
-
const getTotalPadding = () => akEditorGutterPaddingDynamic() * 2;
|
|
13
|
-
const AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
3
|
+
import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
14
4
|
|
|
15
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
16
6
|
export const fullPageEditorWrapper = css({
|
|
@@ -21,6 +11,7 @@ export const fullPageEditorWrapper = css({
|
|
|
21
11
|
boxSizing: 'border-box'
|
|
22
12
|
});
|
|
23
13
|
|
|
14
|
+
// delete when cleaning up experiment `platform_editor_core_static_emotion_non_central`
|
|
24
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
25
16
|
export const contentArea = () => {
|
|
26
17
|
const editorToolbarHeight = FULL_PAGE_EDITOR_TOOLBAR_HEIGHT();
|
|
@@ -56,11 +47,6 @@ export const contentAreaWrapper = css({
|
|
|
56
47
|
contain: 'layout style inline-size'
|
|
57
48
|
});
|
|
58
49
|
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
60
|
-
export const contentAreaHeightNoToolbar = css({
|
|
61
|
-
height: '100%'
|
|
62
|
-
});
|
|
63
|
-
|
|
64
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
65
51
|
export const sidebarArea = css({
|
|
66
52
|
height: '100%',
|
|
@@ -93,168 +79,4 @@ export const editorContentAreaHideContainer = css({
|
|
|
93
79
|
display: 'none'
|
|
94
80
|
}
|
|
95
81
|
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
/* Prevent horizontal scroll on page in full width mode */
|
|
99
|
-
const editorContentAreaContainerStyle = () => css({
|
|
100
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
101
|
-
'.fabric-editor--full-width-mode': {
|
|
102
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
103
|
-
'.code-block, .extension-container, .multiBodiedExtension--container': {
|
|
104
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
105
|
-
maxWidth: `calc(100% - ${tableMarginFullWidthMode * 2}px)`
|
|
106
|
-
},
|
|
107
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
108
|
-
'.extension-container.inline': {
|
|
109
|
-
maxWidth: '100%'
|
|
110
|
-
},
|
|
111
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
112
|
-
'td .extension-container.inline': {
|
|
113
|
-
maxWidth: 'inherit'
|
|
114
|
-
},
|
|
115
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
116
|
-
'[data-layout-section]': {
|
|
117
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
118
|
-
maxWidth: `calc(100% + ${(akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)) * 2}px)`
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
/* Prevent horizontal scroll on page in full width mode */
|
|
124
|
-
const editorContentAreaContainerStyleExcludeCodeBlock = () => css({
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
126
|
-
'.fabric-editor--full-width-mode': {
|
|
127
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
128
|
-
'.extension-container, .multiBodiedExtension--container': {
|
|
129
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
130
|
-
maxWidth: `calc(100% - ${tableMarginFullWidthMode * 2}px)`
|
|
131
|
-
},
|
|
132
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
133
|
-
'.extension-container.inline': {
|
|
134
|
-
maxWidth: '100%'
|
|
135
|
-
},
|
|
136
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
137
|
-
'td .extension-container.inline': {
|
|
138
|
-
maxWidth: 'inherit'
|
|
139
|
-
},
|
|
140
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
141
|
-
'[data-layout-section]': {
|
|
142
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
143
|
-
maxWidth: `calc(100% + ${(akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)) * 2}px)`
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
export const editorContentAreaStyle = ({
|
|
148
|
-
layoutMaxWidth,
|
|
149
|
-
fullWidthMode,
|
|
150
|
-
isEditorToolbarHidden
|
|
151
|
-
}) => [editorContentArea, fg('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle, !fullWidthMode && editorContentAreaWithLayoutWith(layoutMaxWidth),
|
|
152
|
-
// for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
|
|
153
|
-
expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_width_changes') ? editorContentAreaContainerStyleExcludeCodeBlock() : editorContentAreaContainerStyle(), ...(fg('platform_editor_controls_no_toolbar_space') ? [] : [editorExperiment('platform_editor_controls', 'variant1') &&
|
|
154
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
155
|
-
contentAreaReducedHeaderSpace, isEditorToolbarHidden && editorExperiment('platform_editor_controls', 'variant1') &&
|
|
156
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
157
|
-
contentAreaReservedPrimaryToolbarSpace])];
|
|
158
|
-
const editorContentAreaWithLayoutWith = layoutMaxWidth => css({
|
|
159
|
-
// this restricts max width
|
|
160
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
161
|
-
maxWidth: `${layoutMaxWidth + getTotalPadding()}px`
|
|
162
|
-
});
|
|
163
|
-
const fullWidthModeBreakoutBlockTableStyle = css({
|
|
164
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
165
|
-
'.fabric-editor--full-width-mode': {
|
|
166
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
167
|
-
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
168
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
169
|
-
width: '100% !important'
|
|
170
|
-
},
|
|
171
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
172
|
-
'.fabric-editor-breakout-mark': {
|
|
173
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
174
|
-
marginLeft: 'unset !important',
|
|
175
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
176
|
-
transform: 'none !important'
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
const fullWidthNonChromelessBreakoutBlockTableStyle = css({
|
|
181
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
|
|
182
|
-
'.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
|
|
183
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
184
|
-
'.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
|
|
185
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
186
|
-
width: '100% !important'
|
|
187
|
-
},
|
|
188
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
189
|
-
'.fabric-editor-breakout-mark': {
|
|
190
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
191
|
-
marginLeft: 'unset !important',
|
|
192
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
193
|
-
transform: 'none !important'
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
const editorContentArea = css({
|
|
198
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
199
|
-
lineHeight: '24px',
|
|
200
|
-
paddingTop: "var(--ds-space-600, 48px)",
|
|
201
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
202
|
-
'.ak-editor-content-area-no-toolbar &': {
|
|
203
|
-
// When the toolbar is hidden, we don't want content to jump up
|
|
204
|
-
// the extra 1px is to account for the border on the toolbar
|
|
205
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
206
|
-
paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()} + 1px)`
|
|
207
|
-
},
|
|
208
|
-
paddingBottom: "var(--ds-space-600, 48px)",
|
|
209
|
-
height: 'calc( 100% - 105px )',
|
|
210
|
-
width: '100%',
|
|
211
|
-
margin: 'auto',
|
|
212
|
-
flexDirection: 'column',
|
|
213
|
-
flexGrow: 1,
|
|
214
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
215
|
-
maxWidth: `${akEditorFullWidthLayoutWidth + getTotalPadding()}px`,
|
|
216
|
-
transition: `max-width ${SWOOP_ANIMATION}`,
|
|
217
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
218
|
-
'& .ProseMirror': {
|
|
219
|
-
flexGrow: 1,
|
|
220
|
-
boxSizing: 'border-box',
|
|
221
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
222
|
-
'& > *': {
|
|
223
|
-
clear: 'both'
|
|
224
|
-
},
|
|
225
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
226
|
-
[`> p, > ul, > ol:not(${taskListSelector}):not(${decisionListSelector}), > h1, > h2, > h3, > h4, > h5, > h6`]: {
|
|
227
|
-
clear: 'none'
|
|
228
|
-
},
|
|
229
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
230
|
-
'> p:last-child': {
|
|
231
|
-
marginBottom: "var(--ds-space-300, 24px)"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
236
|
-
tableFullPageEditorStyles);
|
|
237
|
-
|
|
238
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
239
|
-
export const editorContentGutterStyle = () => {
|
|
240
|
-
return css({
|
|
241
|
-
boxSizing: 'border-box',
|
|
242
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
243
|
-
padding: `0 ${akEditorGutterPaddingDynamic()}px`
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
// An additional spacing applied at the top of the content area reserving space when the primary toolbar
|
|
248
|
-
// is hidden – this avoids layout shift when the toolbar is toggled under the editor controls feature
|
|
249
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
250
|
-
const contentAreaReservedPrimaryToolbarSpace = css({
|
|
251
|
-
// extra 1px to account for the bottom border on the toolbar
|
|
252
|
-
marginTop: `calc(${"var(--ds-space-500, 40px)"} + 1px)`
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
// A reduced top spacing applied to the content area to compensate for the reserved space at the top
|
|
256
|
-
// of the page when the primary toolbar is hidden under the editor controls feature
|
|
257
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
258
|
-
const contentAreaReducedHeaderSpace = css({
|
|
259
|
-
paddingTop: "var(--ds-space-400, 32px)"
|
|
260
82
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "208.3.
|
|
2
|
+
export const version = "208.3.3";
|