@atlaskit/editor-core 221.5.0 → 221.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  3. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +275 -0
  4. package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +357 -0
  5. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -344
  6. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  7. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +191 -0
  8. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +428 -0
  9. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +10 -417
  10. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +19 -18
  11. package/dist/cjs/version-wrapper.js +1 -1
  12. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  13. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +262 -0
  14. package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +344 -0
  15. package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -337
  16. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  17. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +180 -0
  18. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +420 -0
  19. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +8 -415
  20. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +18 -17
  21. package/dist/es2019/version-wrapper.js +1 -1
  22. package/dist/esm/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
  23. package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +268 -0
  24. package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +346 -0
  25. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -339
  26. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +97 -0
  27. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +184 -0
  28. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +418 -0
  29. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +10 -413
  30. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +18 -17
  31. package/dist/esm/version-wrapper.js +1 -1
  32. package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +30 -0
  33. package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +20 -0
  34. package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -20
  35. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +56 -0
  36. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +56 -0
  37. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +6 -54
  38. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +15 -1
  39. package/package.json +1 -1
@@ -1,418 +1,15 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
6
-
7
- import React, { useImperativeHandle, useRef } from 'react';
8
-
9
- /* eslint-disable @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
10
- import { css, jsx, useTheme } from '@emotion/react';
11
- import classnames from 'classnames';
12
- import { injectIntl } from 'react-intl';
13
- import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
14
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
15
- import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
16
- import { akEditorFullPageNarrowBreakout, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
17
- import { fg } from '@atlaskit/platform-feature-flags';
1
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
18
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
20
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
- // Ignored via go/ees005
22
- // eslint-disable-next-line import/no-named-as-default
23
- import ClickAreaBlock from '../../Addon/ClickAreaBlock';
24
- import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
25
- import { ContextPanel } from '../../ContextPanel';
26
- import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
27
- import PluginSlot from '../../PluginSlot';
28
- import { contentAreaWrapper, sidebarArea } from './StyledComponents';
29
- var akEditorFullWidthLayoutWidth = 1800;
30
- var akEditorUltraWideLayoutWidth = 4000;
31
- var akEditorSwoopCubicBezier = "cubic-bezier(0.15, 1, 0.3, 1)";
32
- var tableMarginFullWidthMode = 2;
33
- var akLayoutGutterOffset = 12;
34
- var SWOOP_ANIMATION = "0.5s ".concat(akEditorSwoopCubicBezier);
35
- var AK_NESTED_DND_GUTTER_OFFSET = 8;
36
- var getTotalPadding = function getTotalPadding() {
37
- return akEditorGutterPaddingDynamic() * 2;
38
- };
39
- var editorContentAreaProsemirrorStyle = css({
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
- '& .ProseMirror': _defineProperty(_defineProperty({
42
- flexGrow: 1,
43
- boxSizing: 'border-box',
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
45
- '& > *': {
46
- clear: 'both'
47
- }
48
- }, "> p, > ul, > ol:not(".concat(taskListSelector, "):not(").concat(decisionListSelector, "), > h1, > h2, > h3, > h4, > h5, > h6"), {
49
- clear: 'none'
50
- }), '> p:last-child', {
51
- marginBottom: "var(--ds-space-300, 24px)"
52
- })
53
- });
54
-
55
- /*
56
- EDITOR-7249: Scope to the main editor's ProseMirror (direct child) so nested
57
- editors like the footer page-comment composer aren't hidden in Syntax view.
58
- */
59
- var hideEditorContentAreaProsemirrorWithAttributeStyle = css({
60
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
61
- '&[data-markdown-mode-hide-prosemirror="true"] > .ak-editor-content-area > .ProseMirror': {
62
- display: 'none'
63
- }
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
- });
74
- var fullWidthNonChromelessBreakoutBlockTableStyle = css({
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-1
76
- '.fabric-editor--full-width-mode:not(:has(#chromeless-editor))': {
77
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
78
- '.fabric-editor-breakout-mark, .extension-container.block, .pm-table-container': {
79
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
80
- width: '100% !important'
81
- },
82
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
83
- '.fabric-editor-breakout-mark': {
84
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
85
- marginLeft: 'unset !important',
86
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
87
- transform: 'none !important'
88
- }
89
- }
90
- });
91
-
92
- // An additional spacing applied at the top of the content area reserving space when the primary toolbar
93
- // is hidden – this avoids layout shift when the toolbar is toggled under the editor controls feature
94
- var contentAreaReservedPrimaryToolbarSpace = css({
95
- // extra 1px to account for the bottom border on the toolbar
96
- marginTop: "calc(".concat("var(--ds-space-500, 40px)", " + 1px)")
97
- });
98
-
99
- // A reduced top spacing applied to the content area to compensate for the reserved space at the top
100
- // of the page when the primary toolbar is hidden under the editor controls feature
101
- var contentAreaReducedHeaderSpace = css({
102
- paddingTop: "var(--ds-space-400, 32px)"
103
- });
104
-
105
- // new styles
106
- var editorContentAreaNew = css({
107
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
108
- lineHeight: '24px',
109
- paddingTop: "var(--ds-space-600, 48px)",
110
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
111
- '.ak-editor-content-area-no-toolbar &': {
112
- // When the toolbar is hidden, we don't want content to jump up
113
- // the extra 1px is to account for the border on the toolbar
114
- paddingTop: "calc(".concat("var(--ds-space-600, 48px)", " + var(--ak-editor-fullpage-toolbar-height) + 1px)")
115
- },
116
- paddingBottom: "var(--ds-space-600, 48px)",
117
- height: 'calc( 100% - 105px )',
118
- width: '100%',
119
- margin: 'auto',
120
- flexDirection: 'column',
121
- flexGrow: 1,
122
- maxWidth: 'var(--ak-editor-content-area-max-width)',
123
- transition: "max-width ".concat(SWOOP_ANIMATION)
124
- });
125
- var tableFullPageEditorStylesNew = css({
126
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
127
- '.ProseMirror .pm-table-wrapper > table': {
128
- marginLeft: 0,
129
- /* 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212 */
130
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-space
131
- marginRight: '-1px',
132
- width: '100%'
133
- }
134
- });
135
- var editorContentAreaContainerNestedDndStyle = css({
136
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
137
- '.fabric-editor--full-width-mode': {
138
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
139
- '[data-layout-section]': {
140
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
141
- maxWidth: "calc(100% + ".concat((akLayoutGutterOffset + AK_NESTED_DND_GUTTER_OFFSET) * 2, "px)")
142
- }
143
- }
144
- });
145
-
146
- /* Prevent horizontal scroll on page in full width mode */
147
- var editorContentAreaContainerStyleExcludeCodeBlockNew = css({
148
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
149
- '.fabric-editor--full-width-mode': {
150
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
151
- '.extension-container, .multiBodiedExtension--container': {
152
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
153
- maxWidth: "calc(100% - ".concat(tableMarginFullWidthMode * 2, "px)")
154
- },
155
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
156
- '.extension-container.inline': {
157
- maxWidth: '100%'
158
- },
159
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
160
- 'td .extension-container.inline': {
161
- maxWidth: 'inherit'
162
- },
163
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
164
- '[data-layout-section]': {
165
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
166
- maxWidth: "calc(100% + ".concat(akLayoutGutterOffset * 2, "px)")
167
- }
168
- }
169
- });
170
-
171
- /* Prevent horizontal scroll on page in full width mode */
172
- var editorContentAreaContainerStyleNew = css({
173
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
174
- '.fabric-editor--full-width-mode': {
175
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
176
- '.code-block, .extension-container, .multiBodiedExtension--container': {
177
- maxWidth: "calc(100% - ".concat(tableMarginFullWidthMode * 2, "px)")
178
- },
179
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
180
- '.extension-container.inline': {
181
- maxWidth: '100%'
182
- },
183
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
184
- 'td .extension-container.inline': {
185
- maxWidth: 'inherit'
186
- },
187
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
188
- '[data-layout-section]': {
189
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
190
- maxWidth: "calc(100% + ".concat(akLayoutGutterOffset * 2, "px)")
191
- }
192
- }
193
- });
194
- var editorContentGutterStyleFG = css({
195
- padding: '0 72px'
196
- });
197
- var editorContentGutterStyles = css({
198
- boxSizing: 'border-box',
199
- padding: '0 52px'
200
- });
201
- var editorContentReducedGutterStyles = css(_defineProperty({}, "@container editor-area (max-width: ".concat(akEditorFullPageNarrowBreakout, "px)"), {
202
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
203
- padding: "0 ".concat(akEditorGutterPaddingReduced, "px")
204
- }));
205
- var contentAreaNew = css({
206
- display: 'flex',
207
- flexDirection: 'row',
208
- height: "calc(100% - var(--ak-editor-fullpage-toolbar-height))",
209
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
210
- '&.ak-editor-content-area-no-toolbar': {
211
- // The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
212
- // to match the toolbar height
213
- height: "calc(100% + 1px)"
214
- },
215
- boxSizing: 'border-box',
216
- margin: 0,
217
- padding: 0,
218
- transition: "padding 0ms ".concat(akEditorSwoopCubicBezier)
219
- });
220
- var contentAreaHeightNoToolbar = css({
221
- height: '100%'
222
- });
223
-
224
- // When the markdown source view is shown (markdown mode toggled on and not in
225
- // the WYSIWYG "preview" view) we tint the whole editor container with the
226
- // sunken surface so the source editor reads as a distinct, inset surface.
227
- var markdownModeContainerBackgroundStyle = css({
228
- backgroundColor: "var(--ds-surface-sunken, #F8F8F8)",
229
- // In the markdown MVP layout the source view (CodeMirror) is bounded to the
230
- // viewport and owns its own scrolling, so the editor's scroll container must
231
- // not also own vertical scrolling — its always-on `overflow-y: scroll` track
232
- // would otherwise render a second, redundant scrollbar alongside CodeMirror's.
233
- // This style is only applied in markdown source mode, so WYSIWYG / preview
234
- // scrolling is unaffected.
235
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- scoped override of the descendant scroll container
236
- '& [data-editor-scroll-container="true"]': {
237
- overflowY: 'hidden'
238
- }
239
- });
240
- var markdownModeContentAreaStyle = css({
241
- boxSizing: 'border-box',
242
- height: '100%',
243
- margin: 0,
244
- maxWidth: 'none',
245
- minWidth: 0,
246
- paddingBottom: 0,
247
- // No top padding here: it would inset the whole source view (including
248
- // CodeMirror's `.cm-scroller`), leaving a gap above the editor's vertical
249
- // scrollbar. The top inset is applied inside the scroller instead (see the
250
- // `.cm-scroller` `paddingTop` in MarkdownSourceView) so the scrollbar still
251
- // spans the full height.
252
- paddingTop: 0,
253
- width: '100%',
254
- // The markdown source view is rendered through PluginSlot. Stretch those
255
- // intermediate wrappers so its in-flow footer can sit at the bottom without
256
- // overlaying the CodeMirror scrollbar.
257
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
258
- '> .ak-editor-content-area': {
259
- boxSizing: 'border-box',
260
- display: 'flex',
261
- flexDirection: 'column',
262
- height: '100%',
263
- minHeight: 0,
264
- minWidth: 0,
265
- padding: 0,
266
- width: '100%'
267
- },
268
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
269
- '> .ak-editor-content-area > [data-testid="plugins-components-wrapper"]': {
270
- display: 'flex',
271
- flex: '1 1 auto',
272
- minHeight: 0,
273
- minWidth: 0,
274
- width: '100%'
275
- }
276
- });
3
+ import { FullPageContentAreaCompiled } from './FullPageContentArea-compiled';
4
+ import { FullPageContentAreaEmotion } from './FullPageContentArea-emotion';
277
5
  export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
278
6
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
279
7
  export var EDITOR_CONTAINER = 'ak-editor-container';
280
- var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
281
- var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _contentAreaRef$curre, _allowScrollGutter$gu, _allowScrollGutter$gu2;
282
- var theme = useTheme();
283
- var fullWidthMode = props.appearance === 'full-width';
284
- var maxWidthMode = props.appearance === 'max';
285
- var scrollContainerRef = useRef(null);
286
- var contentAreaRef = useRef(null);
287
- var containerRef = useRef(null);
288
- var allowScrollGutter = (_props$editorAPI = props.editorAPI) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.base) === null || _props$editorAPI === void 0 || (_props$editorAPI = _props$editorAPI.sharedState.currentState()) === null || _props$editorAPI === void 0 ? void 0 : _props$editorAPI.allowScrollGutter;
289
- var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true) || expValEquals('platform_editor_core_static_css', 'isEnabled', true) ? akEditorDefaultLayoutWidth : theme.layoutMaxWidth : akEditorFullWidthLayoutWidth);
290
-
291
- // Get useStandardNodeWidth from block menu plugin shared state
292
- // Only access editorAPI when the experiment is enabled to avoid performance impact
293
- var useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
294
- useImperativeHandle(ref, function () {
295
- return {
296
- get scrollContainer() {
297
- return scrollContainerRef.current;
298
- },
299
- get contentArea() {
300
- return contentAreaRef.current;
301
- },
302
- get containerArea() {
303
- return containerRef.current;
304
- }
305
- };
306
- }, []);
307
- var markdownPluginCurrentView = useSharedPluginStateWithSelector(props.editorAPI, ['markdownMode'], function (states) {
308
- var _states$markdownModeS;
309
- return (_states$markdownModeS = states.markdownModeState) === null || _states$markdownModeS === void 0 ? void 0 : _states$markdownModeS.view;
310
- });
311
- var markdownPluginCurrentIsMarkdownMode = useSharedPluginStateWithSelector(props.editorAPI, ['markdownMode'], function (states) {
312
- var _states$markdownModeS2;
313
- return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
314
- });
315
- var isMarkdownModeExperimentEnabled = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true);
316
- var shouldHideProseMirrorForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
317
- var shouldHideScrollGutterForMarkdownMode = isMarkdownModeExperimentEnabled && markdownPluginCurrentIsMarkdownMode;
318
- var shouldUseMarkdownModeMvpLayout = shouldHideProseMirrorForMarkdownMode && fg('platform_editor_md_mvp_layout');
319
- return jsx("div", {
320
- css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
321
- "data-testid": CONTENT_AREA_TEST_ID,
322
- ref: containerRef
323
- }, jsx("div", {
324
- css: [
325
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
326
- contentAreaWrapper, shouldUseMarkdownModeMvpLayout && markdownModeContainerBackgroundStyle],
327
- "data-testid": EDITOR_CONTAINER,
328
- "data-editor-container": 'true'
329
- }, jsx(EditorContentContainer
330
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
331
- , {
332
- className: "fabric-editor-popup-scroll-parent",
333
- featureFlags: props.featureFlags,
334
- ref: scrollContainerRef,
335
- viewMode: props === null || props === void 0 ? void 0 : props.viewMode,
336
- isScrollable: true,
337
- appearance: props.appearance,
338
- contentMode: props.contentMode,
339
- useStandardNodeWidth: useStandardNodeWidth
340
- }, jsx(ClickAreaBlock, {
341
- editorView: props.editorView,
342
- editorDisabled: props.disabled
343
- }, jsx("div", {
344
- "data-markdown-mode-hide-prosemirror": shouldHideProseMirrorForMarkdownMode ? 'true' : undefined,
345
- "data-markdown-mode-hide-scroll-gutter": shouldHideScrollGutterForMarkdownMode ? 'true' : undefined,
346
- css: [editorContentAreaNew, editorContentAreaProsemirrorStyle,
347
- // EDITOR-6558: hide ProseMirror when the markdown-mode plugin
348
- // reports a non-WYSIWYG view.
349
- shouldHideProseMirrorForMarkdownMode && hideEditorContentAreaProsemirrorWithAttributeStyle, shouldHideScrollGutterForMarkdownMode && hideEditorContentAreaScrollGutterWithAttributeStyle, shouldUseMarkdownModeMvpLayout && markdownModeContentAreaStyle, tableFullPageEditorStylesNew, fullWidthNonChromelessBreakoutBlockTableStyle,
350
- // for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
351
- 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],
352
- style: {
353
- '--ak-editor-content-area-max-width': "".concat(contentAreaMaxWidth, "px")
354
- }
355
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
356
- ,
357
- className: "ak-editor-content-area-region",
358
- "data-editor-editable-content": true,
359
- role: "region",
360
- "aria-label": props.intl.formatMessage(messages.editableContentLabel),
361
- ref: contentAreaRef,
362
- "data-vc": "editor-content-area-region"
363
- }, jsx("div", {
364
- css: [editorContentGutterStyles,
365
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning
366
- fg('platform_editor_controls_increase_full_page_gutter') && editorExperiment('platform_editor_controls', 'variant1') && editorContentGutterStyleFG, editorExperiment('platform_editor_preview_panel_responsiveness', true, {
367
- exposure: true
368
- }) && editorContentReducedGutterStyles]
369
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
370
- ,
371
- className: classnames('ak-editor-content-area', 'appearance-full-page', {
372
- 'fabric-editor--full-width-mode': fullWidthMode,
373
- 'fabric-editor--max-width-mode': Boolean(maxWidthMode)
374
- }),
375
- ref: contentAreaRef
376
- }, !!props.customContentComponents && 'before' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.before) : contentComponentClickWrapper(props.customContentComponents), jsx(PluginSlot, {
377
- editorView: props.editorView,
378
- editorActions: props.editorActions,
379
- eventDispatcher: props.eventDispatcher,
380
- providerFactory: props.providerFactory,
381
- appearance: props.appearance,
382
- items: props.contentComponents,
383
- pluginHooks: props.pluginHooks,
384
- contentArea: (_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 ? _contentAreaRef$curre : undefined,
385
- popupsMountPoint: props.popupsMountPoint,
386
- popupsBoundariesElement: props.popupsBoundariesElement,
387
- popupsScrollableElement: props.popupsScrollableElement,
388
- disabled: !!props.disabled,
389
- containerElement: scrollContainerRef.current,
390
- dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
391
- wrapperElement: props.wrapperElement
392
- }), props.editorDOMElement, !!props.customContentComponents && 'after' in props.customContentComponents ? contentComponentClickWrapper(props.customContentComponents.after) : null, allowScrollGutter && (editorExperiment('platform_editor_blocks', true) ? jsx("div", {
393
- id: "editor-scroll-gutter",
394
- css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
395
- style: {
396
- paddingBottom: "".concat((_allowScrollGutter$gu = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu !== void 0 ? _allowScrollGutter$gu : '120', "px")
397
- },
398
- "data-vc": "scroll-gutter",
399
- "data-editor-scroll-gutter": "true"
400
- }) : jsx("div", {
401
- id: "editor-scroll-gutter",
402
- css: shouldHideScrollGutterForMarkdownMode && hideEditorScrollGutterStyle,
403
- style: {
404
- paddingBottom: "".concat((_allowScrollGutter$gu2 = allowScrollGutter.gutterSize) !== null && _allowScrollGutter$gu2 !== void 0 ? _allowScrollGutter$gu2 : '120', "px")
405
- },
406
- "data-vc": "scroll-gutter"
407
- }))))))), jsx("div", {
408
- css: sidebarArea
409
- }, props.contextPanel || jsx(ContextPanel, {
410
- editorAPI: props.editorAPI,
411
- visible: false
412
- })));
413
- });
414
8
 
415
- // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
416
- export var FullPageContentArea = injectIntl(Content, {
417
- forwardRef: true
418
- });
9
+ /**
10
+ * Compiled migration WIP under platform_editor_core_non_ecc_static_css
11
+ * Please ensure both styles are updated
12
+ */
13
+ export var FullPageContentArea = componentWithCondition(function () {
14
+ return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
15
+ }, FullPageContentAreaCompiled, FullPageContentAreaEmotion);
@@ -1,5 +1,11 @@
1
1
  /* eslint-disable @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 */
2
2
  import { css } from '@emotion/react';
3
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
4
+ /**
5
+ * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_non_ecc_static_css
6
+ * If you need to make changes here, also update the corresponding style in
7
+ * packages/editor/editor-core/src/ui/Appearance/FullPage/FullPage-compiled.tsx
8
+ */
3
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
4
10
  export var fullPageEditorWrapper = css({
5
11
  minWidth: '340px',
@@ -9,6 +15,12 @@ export var fullPageEditorWrapper = css({
9
15
  boxSizing: 'border-box'
10
16
  });
11
17
 
18
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
19
+ /**
20
+ * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_non_ecc_static_css
21
+ * If you need to make changes here, also update the corresponding style in
22
+ * packages/editor/editor-core/src/ui/Appearance/FullPage/FullPageContentArea-compiled.tsx
23
+ */
12
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/volt-strict-mode/no-multiple-exports
13
25
  export var contentAreaWrapper = css({
14
26
  width: '100%',
@@ -22,6 +34,12 @@ export var contentAreaWrapper = css({
22
34
  contain: 'layout style inline-size'
23
35
  });
24
36
 
37
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
38
+ /**
39
+ * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_non_ecc_static_css
40
+ * If you need to make changes here, also update the corresponding style in
41
+ * packages/editor/editor-core/src/ui/Appearance/FullPage/FullPageContentArea-compiled.tsx
42
+ */
25
43
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/volt-strict-mode/no-multiple-exports -- Ignored via go/DSP-18766
26
44
  export var sidebarArea = css({
27
45
  height: '100%',
@@ -37,21 +55,4 @@ export var sidebarArea = css({
37
55
  top: 0,
38
56
  alignSelf: 'flex-start'
39
57
  }
40
- });
41
-
42
- // initially hide until we have a containerWidth and can properly size them,
43
- // otherwise they can cause the editor width to extend which is non-recoverable
44
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/volt-strict-mode/no-multiple-exports -- Ignored via go/DSP-18766
45
- export var editorContentAreaHideContainer = css({
46
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
47
- '.fabric-editor--full-width-mode': {
48
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
49
- '.pm-table-container, .code-block, .extension-container': {
50
- display: 'none'
51
- },
52
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
53
- '.multiBodiedExtension--container': {
54
- display: 'none'
55
- }
56
- }
57
58
  });
@@ -1,3 +1,3 @@
1
1
  export var name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export var version = "221.4.1";
3
+ export var version = "221.5.0";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /**
6
+ * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
7
+ * Used via `componentWithCondition` in `Comment.tsx`.
8
+ *
9
+ * Cleanup: delete this file once the experiment has shipped.
10
+ */
11
+ import React from 'react';
12
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
13
+ import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
14
+ import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
15
+ import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
16
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
17
+ import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
18
+ import type { EditorAppearanceComponentProps } from '../../../types/editor-appearance-component';
19
+ type ComponentProps = EditorAppearanceComponentProps<[
20
+ OptionalPlugin<MediaPlugin>,
21
+ OptionalPlugin<MaxContentSizePlugin>,
22
+ OptionalPlugin<PrimaryToolbarPlugin>,
23
+ OptionalPlugin<ToolbarPlugin>,
24
+ OptionalPlugin<BlockMenuPlugin>
25
+ ]>;
26
+ export declare const CommentEditorWithIntlCompiled: {
27
+ (props: ComponentProps): React.JSX.Element;
28
+ displayName: string;
29
+ };
30
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsx } from '@emotion/react';
2
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
3
+ import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
4
+ import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
5
+ import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
6
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
7
+ import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
8
+ import type { EditorAppearanceComponentProps } from '../../../types/editor-appearance-component';
9
+ type ComponentProps = EditorAppearanceComponentProps<[
10
+ OptionalPlugin<MediaPlugin>,
11
+ OptionalPlugin<MaxContentSizePlugin>,
12
+ OptionalPlugin<PrimaryToolbarPlugin>,
13
+ OptionalPlugin<ToolbarPlugin>,
14
+ OptionalPlugin<BlockMenuPlugin>
15
+ ]>;
16
+ export declare const CommentEditorWithIntlEmotion: {
17
+ (props: ComponentProps): jsx.JSX.Element;
18
+ displayName: string;
19
+ };
20
+ export {};
@@ -1,20 +1,2 @@
1
- import { jsx } from '@emotion/react';
2
- import type { OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
4
- import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
5
- import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
6
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
7
- import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
8
- import type { EditorAppearanceComponentProps } from '../../../types/editor-appearance-component';
9
- type ComponentProps = EditorAppearanceComponentProps<[
10
- OptionalPlugin<MediaPlugin>,
11
- OptionalPlugin<MaxContentSizePlugin>,
12
- OptionalPlugin<PrimaryToolbarPlugin>,
13
- OptionalPlugin<ToolbarPlugin>,
14
- OptionalPlugin<BlockMenuPlugin>
15
- ]>;
16
- export declare const CommentEditorWithIntl: {
17
- (props: ComponentProps): jsx.JSX.Element;
18
- displayName: string;
19
- };
20
- export {};
1
+ import { CommentEditorWithIntlCompiled } from './Comment-compiled';
2
+ export declare const CommentEditorWithIntl: typeof CommentEditorWithIntlCompiled;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import type { ReactElement } from 'react';
6
+ import React from 'react';
7
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
8
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
9
+ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
10
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
11
+ import type { EditorAppearance, EditorContentMode, FeatureFlags, OptionalPlugin, PublicPluginAPI, ReactHookFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
12
+ import type { BasePlugin } from '@atlaskit/editor-plugins/base';
13
+ import type { BlockMenuPlugin } from '@atlaskit/editor-plugins/block-menu';
14
+ import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
15
+ import type { ViewMode } from '@atlaskit/editor-plugins/editor-viewmode';
16
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
17
+ import type EditorActions from '../../../actions';
18
+ import type { ContentComponents, ReactComponents } from '../../../types/editor-props';
19
+ import type { MarkdownModePlugin } from '../../../types/markdown-mode';
20
+ import type { ScrollContainerRefs } from './types';
21
+ type EditorAPI = PublicPluginAPI<[
22
+ OptionalPlugin<ContextPanelPlugin>,
23
+ BasePlugin,
24
+ OptionalPlugin<BlockMenuPlugin>,
25
+ OptionalPlugin<MarkdownModePlugin>
26
+ ]>;
27
+ interface FullPageEditorContentAreaProps {
28
+ appearance: EditorAppearance | undefined;
29
+ contentComponents: UIComponentFactory[] | undefined;
30
+ contentMode: EditorContentMode | undefined;
31
+ contextPanel: ReactComponents | undefined;
32
+ customContentComponents: ContentComponents | undefined;
33
+ disabled: boolean | undefined;
34
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent | undefined;
35
+ editorActions: EditorActions | undefined;
36
+ editorAPI: EditorAPI | undefined;
37
+ editorDOMElement: ReactElement;
38
+ editorView: EditorView;
39
+ eventDispatcher: EventDispatcher | undefined;
40
+ featureFlags?: FeatureFlags;
41
+ hasHadInteraction?: boolean;
42
+ isEditorToolbarHidden?: boolean;
43
+ pluginHooks: ReactHookFactory[] | undefined;
44
+ popupsBoundariesElement: HTMLElement | undefined;
45
+ popupsMountPoint: HTMLElement | undefined;
46
+ popupsScrollableElement: HTMLElement | undefined;
47
+ providerFactory: ProviderFactory;
48
+ viewMode: ViewMode | undefined;
49
+ wrapperElement: HTMLElement | null;
50
+ }
51
+ export declare const CONTENT_AREA_TEST_ID = "ak-editor-fp-content-area";
52
+ export declare const EDITOR_CONTAINER = "ak-editor-container";
53
+ export declare const FullPageContentAreaCompiled: React.ForwardRefExoticComponent<Omit<WithIntlProps<React.PropsWithChildren<FullPageEditorContentAreaProps & WrappedComponentProps & React.RefAttributes<ScrollContainerRefs>>>, 'ref'> & React.RefAttributes<any>> & {
54
+ WrappedComponent: React.ComponentType<FullPageEditorContentAreaProps & WrappedComponentProps & React.RefAttributes<ScrollContainerRefs>>;
55
+ };
56
+ export {};