@atlaskit/editor-core 207.7.0 → 207.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/dist/cjs/create-editor/ReactEditorView.js +11 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +4 -65
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +15 -3
- package/dist/cjs/ui/EditorContentContainer/styles/blockMarksStyles.js +30 -0
- package/dist/cjs/ui/EditorContentContainer/styles/gridStyles.js +42 -0
- package/dist/cjs/ui/EditorContentContainer/styles/indentationStyles.js +45 -0
- package/dist/cjs/ui/EditorContentContainer/styles/paragraphStyles.js +54 -0
- package/dist/cjs/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +73 -0
- package/dist/cjs/ui/EditorContentContainer/styles/whitespaceStyles.js +14 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +11 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +5 -66
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +17 -7
- package/dist/es2019/ui/EditorContentContainer/styles/blockMarksStyles.js +23 -0
- package/dist/es2019/ui/EditorContentContainer/styles/gridStyles.js +35 -0
- package/dist/es2019/ui/EditorContentContainer/styles/indentationStyles.js +38 -0
- package/dist/es2019/ui/EditorContentContainer/styles/paragraphStyles.js +47 -0
- package/dist/es2019/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +73 -0
- package/dist/es2019/ui/EditorContentContainer/styles/whitespaceStyles.js +7 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +11 -0
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +5 -66
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -4
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +16 -4
- package/dist/esm/ui/EditorContentContainer/styles/blockMarksStyles.js +23 -0
- package/dist/esm/ui/EditorContentContainer/styles/gridStyles.js +35 -0
- package/dist/esm/ui/EditorContentContainer/styles/indentationStyles.js +38 -0
- package/dist/esm/ui/EditorContentContainer/styles/paragraphStyles.js +47 -0
- package/dist/esm/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.js +65 -0
- package/dist/esm/ui/EditorContentContainer/styles/whitespaceStyles.js +7 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +0 -3
- package/dist/types/presets/universal.d.ts +0 -3
- package/dist/types/presets/useUniversalPreset.d.ts +0 -3
- package/dist/types/ui/EditorContentContainer/styles/blockMarksStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/gridStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/indentationStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/paragraphStyles.d.ts +3 -0
- package/dist/types/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.d.ts +7 -0
- package/dist/types/ui/EditorContentContainer/styles/whitespaceStyles.d.ts +1 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +0 -3
- package/dist/types-ts4.5/presets/universal.d.ts +0 -3
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +0 -3
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/blockMarksStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/gridStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/indentationStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/paragraphStyles.d.ts +3 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/tasksAndDecisionsStyles.d.ts +7 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/whitespaceStyles.d.ts +1 -0
- package/package.json +14 -5
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import {
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
9
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
10
10
|
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
@@ -54,7 +54,6 @@ const useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(plug
|
|
|
54
54
|
}, pluginInjectionApi => {
|
|
55
55
|
const primaryToolbarComponents = useSharedPluginStateSelector(pluginInjectionApi, 'primaryToolbar.components');
|
|
56
56
|
const editorViewMode = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
|
|
57
|
-
const showTopToolbar = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode._showTopToolbar');
|
|
58
57
|
const hasHadInteraction = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.hasHadInteraction');
|
|
59
58
|
const interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
|
|
60
59
|
return {
|
|
@@ -62,8 +61,7 @@ const useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(plug
|
|
|
62
61
|
components: primaryToolbarComponents
|
|
63
62
|
},
|
|
64
63
|
editorViewModeState: !editorViewMode ? undefined : {
|
|
65
|
-
mode: editorViewMode
|
|
66
|
-
_showTopToolbar: showTopToolbar
|
|
64
|
+
mode: editorViewMode
|
|
67
65
|
},
|
|
68
66
|
interactionState: hasHadInteraction === undefined || interactionState === undefined ? undefined : {
|
|
69
67
|
hasHadInteraction,
|
|
@@ -72,7 +70,7 @@ const useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(plug
|
|
|
72
70
|
};
|
|
73
71
|
});
|
|
74
72
|
export const FullPageEditor = props => {
|
|
75
|
-
var _scrollContentContain, _scrollContentContain2, _scrollContentContain3,
|
|
73
|
+
var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _wrapperElementRef$cu;
|
|
76
74
|
const wrapperElementRef = useMemo(() => props.innerRef, [props.innerRef]);
|
|
77
75
|
const scrollContentContainerRef = useRef(null);
|
|
78
76
|
const showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
@@ -110,23 +108,6 @@ export const FullPageEditor = props => {
|
|
|
110
108
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
111
109
|
}
|
|
112
110
|
let isEditorToolbarHidden = fg('platform_editor_sync_editor_view_mode_state') ? viewMode === 'view' : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
113
|
-
if (props.__livePage && !editorExperiment('live_pages_graceful_edit', 'control')) {
|
|
114
|
-
// the custom toolbar logic should only be applied when the experiment cohort is not control,
|
|
115
|
-
// and the editor is in live page mode.
|
|
116
|
-
if (!editorViewModeState) {
|
|
117
|
-
// when first loading the editor, the toolbar should be hidden for all content modes
|
|
118
|
-
// the editorViewMode plugin state is not able to be relied as it will not be setup when
|
|
119
|
-
// the appearance component is being rendered.
|
|
120
|
-
// In this case we set the toolbar to be hidden by default.
|
|
121
|
-
isEditorToolbarHidden = true;
|
|
122
|
-
} else {
|
|
123
|
-
if (editorExperiment('live_pages_graceful_edit', 'initially-hide-toolbar')) {
|
|
124
|
-
// for the initially-hide-toolbar variant, the toolbar should be hidden based on
|
|
125
|
-
// a separate flag in the editorViewMode plugin state.
|
|
126
|
-
isEditorToolbarHidden = !editorViewModeState._showTopToolbar || false;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
111
|
const {
|
|
131
112
|
customPrimaryToolbarComponents
|
|
132
113
|
} = props;
|
|
@@ -158,10 +139,7 @@ export const FullPageEditor = props => {
|
|
|
158
139
|
,
|
|
159
140
|
className: "akEditor",
|
|
160
141
|
ref: wrapperElementRef
|
|
161
|
-
}, !
|
|
162
|
-
css: hiddenStyle,
|
|
163
|
-
"data-hidden": isEditorToolbarHidden
|
|
164
|
-
}, jsx(FullPageToolbar, {
|
|
142
|
+
}, !isEditorToolbarHidden && jsx(FullPageToolbar, {
|
|
165
143
|
appearance: props.appearance,
|
|
166
144
|
editorAPI: editorAPI,
|
|
167
145
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
@@ -188,33 +166,6 @@ export const FullPageEditor = props => {
|
|
|
188
166
|
providerFactory: props.providerFactory,
|
|
189
167
|
showKeyline: showKeyline,
|
|
190
168
|
featureFlags: props.featureFlags
|
|
191
|
-
})), editorExperiment('live_pages_graceful_edit', 'control') && !isEditorToolbarHidden && jsx(FullPageToolbar, {
|
|
192
|
-
appearance: props.appearance,
|
|
193
|
-
editorAPI: editorAPI,
|
|
194
|
-
beforeIcon: props.primaryToolbarIconBefore,
|
|
195
|
-
collabEdit: props.collabEdit,
|
|
196
|
-
containerElement: (_scrollContentContain4 = (_scrollContentContain5 = scrollContentContainerRef.current) === null || _scrollContentContain5 === void 0 ? void 0 : _scrollContentContain5.scrollContainer) !== null && _scrollContentContain4 !== void 0 ? _scrollContentContain4 : null,
|
|
197
|
-
customPrimaryToolbarComponents: props.customPrimaryToolbarComponents,
|
|
198
|
-
disabled: !!props.disabled,
|
|
199
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
200
|
-
editorActions: props.editorActions,
|
|
201
|
-
editorDOMElement: props.editorDOMElement
|
|
202
|
-
// Ignored via go/ees005
|
|
203
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
204
|
-
,
|
|
205
|
-
editorView: props.editorView
|
|
206
|
-
// Ignored via go/ees005
|
|
207
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
208
|
-
,
|
|
209
|
-
eventDispatcher: props.eventDispatcher,
|
|
210
|
-
hasMinWidth: props.enableToolbarMinWidth,
|
|
211
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
212
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
213
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
214
|
-
primaryToolbarComponents: primaryToolbarComponents,
|
|
215
|
-
providerFactory: props.providerFactory,
|
|
216
|
-
showKeyline: showKeyline,
|
|
217
|
-
featureFlags: props.featureFlags
|
|
218
169
|
}), jsx(FullPageContentArea, {
|
|
219
170
|
editorAPI: editorAPI,
|
|
220
171
|
ref: scrollContentContainerRef,
|
|
@@ -242,16 +193,4 @@ export const FullPageEditor = props => {
|
|
|
242
193
|
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
243
194
|
hasHadInteraction: hasHadInteraction
|
|
244
195
|
})));
|
|
245
|
-
};
|
|
246
|
-
const hiddenStyle = css({
|
|
247
|
-
visibility: 'visible',
|
|
248
|
-
opacity: 1,
|
|
249
|
-
transition: '200ms opacity, 200ms visibility, 200ms transform',
|
|
250
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
251
|
-
'&[data-hidden="true"]': {
|
|
252
|
-
height: 0,
|
|
253
|
-
visibility: 'hidden',
|
|
254
|
-
opacity: 0
|
|
255
|
-
// transition: '0ms opacity, 0ms visibility, 0ms transform',
|
|
256
|
-
}
|
|
257
|
-
});
|
|
196
|
+
};
|
|
@@ -86,14 +86,11 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
86
86
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
87
87
|
contentArea,
|
|
88
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
89
|
-
|
|
89
|
+
props.isEditorToolbarHidden &&
|
|
90
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
91
91
|
contentAreaHeightNoToolbar],
|
|
92
92
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
93
93
|
ref: containerRef
|
|
94
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
95
|
-
,
|
|
96
|
-
className: !editorExperiment('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden ? 'ak-editor-content-area-no-toolbar' : undefined
|
|
97
94
|
}, jsx("div", {
|
|
98
95
|
css:
|
|
99
96
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -13,7 +13,7 @@ import { telepointerStyle, telepointerStyleWithInitialOnly } from '@atlaskit/edi
|
|
|
13
13
|
import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-common/emoji';
|
|
14
14
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
15
15
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
16
|
-
import { GRID_GUTTER,
|
|
16
|
+
import { GRID_GUTTER, dateSharedStyle, getSmartCardSharedStyles, listsSharedStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, textColorStyles, unsupportedStyles } from '@atlaskit/editor-common/styles';
|
|
17
17
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
18
18
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
19
19
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
@@ -34,15 +34,21 @@ import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vani
|
|
|
34
34
|
import { aiPanelBaseStyles, aiPanelDarkStyles } from './styles/ai-panel';
|
|
35
35
|
import { annotationStyles } from './styles/annotationStyles';
|
|
36
36
|
import { backgroundColorStyles } from './styles/backgroundColorStyles';
|
|
37
|
+
import { blockMarksStyles } from './styles/blockMarksStyles';
|
|
37
38
|
import { codeBlockStyles, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
38
39
|
import { codeMarkStyles } from './styles/codeMarkStyles';
|
|
39
40
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
40
41
|
import { firstBlockNodeStyles, firstBlockNodeStylesOld } from './styles/firstBlockNodeStyles';
|
|
42
|
+
import { gridStyles } from './styles/gridStyles';
|
|
43
|
+
import { indentationStyles } from './styles/indentationStyles';
|
|
41
44
|
import { layoutBaseStyles, layoutViewStyles } from './styles/layout';
|
|
42
45
|
import { linkStyles, linkStylesOld } from './styles/link';
|
|
43
46
|
import { mediaStyles } from './styles/mediaStyles';
|
|
47
|
+
import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
|
|
44
48
|
import { resizerStyles, pragmaticResizerStyles } from './styles/resizerStyles';
|
|
45
49
|
import { ruleStyles } from './styles/rule';
|
|
50
|
+
import { tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
|
|
51
|
+
import { whitespaceStyles } from './styles/whitespaceStyles';
|
|
46
52
|
const vanillaMentionsStyles = css({
|
|
47
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
48
54
|
'.editor-mention-primitive': {
|
|
@@ -274,13 +280,11 @@ const contentStyles = () => css`
|
|
|
274
280
|
outline: none;
|
|
275
281
|
font-size: var(--ak-editor-base-font-size);
|
|
276
282
|
|
|
277
|
-
${
|
|
278
|
-
|
|
279
|
-
${paragraphSharedStyles()};
|
|
283
|
+
${whitespaceStyles};
|
|
280
284
|
|
|
281
285
|
${listsSharedStyles};
|
|
282
286
|
|
|
283
|
-
${
|
|
287
|
+
${indentationStyles};
|
|
284
288
|
|
|
285
289
|
${shadowSharedStyle};
|
|
286
290
|
|
|
@@ -386,7 +390,7 @@ const contentStyles = () => css`
|
|
|
386
390
|
|
|
387
391
|
${gridStyles}
|
|
388
392
|
|
|
389
|
-
${
|
|
393
|
+
${blockMarksStyles}
|
|
390
394
|
|
|
391
395
|
${dateSharedStyle}
|
|
392
396
|
|
|
@@ -574,7 +578,13 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
574
578
|
ref: ref,
|
|
575
579
|
css: [contentStyles(),
|
|
576
580
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
577
|
-
layoutBaseStyles(),
|
|
581
|
+
layoutBaseStyles(), fg('platform_editor_typography_ugc') ? fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed') ?
|
|
582
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
583
|
+
paragraphStylesUGCRefreshed :
|
|
584
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
585
|
+
paragraphStylesUGCModernized :
|
|
586
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
587
|
+
paragraphStylesOld,
|
|
578
588
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
579
589
|
fg('platform_editor_hyperlink_underline') ? linkStyles : linkStylesOld, editorExperiment('platform_editor_breakout_resizing', true) &&
|
|
580
590
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
export const blockMarksStyles = css({
|
|
5
|
+
// We need to remove margin-top from first item
|
|
6
|
+
// inside doc, tableCell, tableHeader, blockquote, etc.
|
|
7
|
+
//
|
|
8
|
+
// - For nested block marks apart from those with indentation mark.
|
|
9
|
+
// - Do not remove the margin top for nodes inside indentation marks.
|
|
10
|
+
// - Do not remove the margin top for nodes inside alignment marks.
|
|
11
|
+
//- If first element inside a block node has alignment mark, then remove the margin-top.
|
|
12
|
+
//- If first document element has indentation mark remove margin-top.
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
14
|
+
'*:not(.fabric-editor-block-mark) >, *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-of-type:not(.fabric-editor-indentation-mark):not(.fabric-editor-alignment), .fabric-editor-alignment:first-of-type:first-child, .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child': {
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
16
|
+
'p, h1, h2, h3, h4, h5, h6, .heading-wrapper': {
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
18
|
+
'&:first-child:not(style), style:first-child + *': {
|
|
19
|
+
marginTop: 0
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
+
export const gridStyles = css({
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
|
+
'.gridParent': {
|
|
7
|
+
width: `calc(100% + 24px)`,
|
|
8
|
+
marginLeft: "var(--ds-space-negative-150, -12px)",
|
|
9
|
+
marginRight: "var(--ds-space-negative-150, -12px)",
|
|
10
|
+
transform: 'scale(1)',
|
|
11
|
+
zIndex: 2
|
|
12
|
+
},
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
|
+
'.gridContainer': {
|
|
15
|
+
position: 'fixed',
|
|
16
|
+
height: '100vh',
|
|
17
|
+
width: '100%',
|
|
18
|
+
pointerEvents: 'none'
|
|
19
|
+
},
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
|
+
'.gridLine': {
|
|
22
|
+
borderLeft: `1px solid ${"var(--ds-border, #091E4224)"}`,
|
|
23
|
+
display: 'inline-block',
|
|
24
|
+
boxSizing: 'border-box',
|
|
25
|
+
height: '100%',
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
27
|
+
marginLeft: '-1px',
|
|
28
|
+
transition: 'border-color 0.15s linear',
|
|
29
|
+
zIndex: 0
|
|
30
|
+
},
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
32
|
+
'.highlight': {
|
|
33
|
+
borderLeft: `1px solid ${"var(--ds-border-focused, #388BFF)"}`
|
|
34
|
+
}
|
|
35
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
+
export const indentationStyles = css({
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
|
+
'.fabric-editor-indentation-mark': {
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
|
+
"&[data-level='1']": {
|
|
9
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
10
|
+
marginLeft: 30
|
|
11
|
+
},
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
+
"&[data-level='2']": {
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
15
|
+
marginLeft: 60
|
|
16
|
+
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
|
+
"&[data-level='3']": {
|
|
19
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
20
|
+
marginLeft: 90
|
|
21
|
+
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
23
|
+
"&[data-level='4']": {
|
|
24
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
25
|
+
marginLeft: 120
|
|
26
|
+
},
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
28
|
+
"&[data-level='5']": {
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
30
|
+
marginLeft: 150
|
|
31
|
+
},
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
33
|
+
"&[data-level='6']": {
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
35
|
+
marginLeft: 180
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
const blockNodesVerticalMargin = '0.75rem';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
6
|
+
export const paragraphStylesUGCRefreshed = css({
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
|
+
'.ProseMirror p': {
|
|
9
|
+
// The `editor.font.body` token is used for the UGC typography theme.
|
|
10
|
+
// We don't use `editorUGCToken('editor.font.body')` here because we want to build this styles statically.
|
|
11
|
+
// See platform/packages/editor/editor-common/src/ugc-tokens/get-editor-ugc-token.tsx
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
13
|
+
font: 'normal 400 1em/1.714 "Atlassian Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
14
|
+
marginTop: blockNodesVerticalMargin,
|
|
15
|
+
marginBottom: 0
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
20
|
+
export const paragraphStylesUGCModernized = css({
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
|
+
'.ProseMirror p': {
|
|
23
|
+
// The `editor.font.body` token is used for the UGC typography theme.
|
|
24
|
+
// We don't use `editorUGCToken('editor.font.body')` here because we want to build this styles statically.
|
|
25
|
+
// See platform/packages/editor/editor-common/src/ugc-tokens/get-editor-ugc-token.tsx
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
27
|
+
font: 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
28
|
+
marginTop: blockNodesVerticalMargin,
|
|
29
|
+
marginBottom: 0
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
34
|
+
export const paragraphStylesOld = css({
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
36
|
+
'.ProseMirror p': {
|
|
37
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
38
|
+
fontSize: '1em',
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
40
|
+
lineHeight: 1.714,
|
|
41
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
42
|
+
marginTop: blockNodesVerticalMargin,
|
|
43
|
+
marginBottom: 0,
|
|
44
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
45
|
+
letterSpacing: '-0.005em'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
const akEditorLineHeight = 1.714;
|
|
4
|
+
export const TaskDecisionSharedCssClassName = {
|
|
5
|
+
DECISION_CONTAINER: 'decisionItemView-content-wrap',
|
|
6
|
+
TASK_CONTAINER: 'taskItemView-content-wrap',
|
|
7
|
+
TASK_ITEM: 'task-item',
|
|
8
|
+
TASK_CHECKBOX_CONTAINER: 'task-item-checkbox-wrap'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
+
export const tasksAndDecisionsStyles = css({
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
14
|
+
'.ProseMirror': {
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
16
|
+
[`.taskItemView-content-wrap, .${TaskDecisionSharedCssClassName.DECISION_CONTAINER}`]: {
|
|
17
|
+
position: 'relative',
|
|
18
|
+
minWidth: 48
|
|
19
|
+
},
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
21
|
+
[`.${TaskDecisionSharedCssClassName.DECISION_CONTAINER}`]: {
|
|
22
|
+
marginTop: 0
|
|
23
|
+
},
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
25
|
+
[`.${TaskDecisionSharedCssClassName.TASK_CONTAINER}`]: {
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
27
|
+
"span[contenteditable='false']": {
|
|
28
|
+
height: `${akEditorLineHeight}em`
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
32
|
+
[`.${TaskDecisionSharedCssClassName.TASK_ITEM}`]: {
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
34
|
+
lineHeight: akEditorLineHeight
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
38
|
+
'div[data-task-local-id]': {
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
40
|
+
"span[contenteditable='false']": {
|
|
41
|
+
height: `${akEditorLineHeight}em`
|
|
42
|
+
},
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
44
|
+
"span[contenteditable='false'] + div": {
|
|
45
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
46
|
+
lineHeight: `${akEditorLineHeight}em`
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
50
|
+
'div[data-task-list-local-id]': {
|
|
51
|
+
margin: `${"var(--ds-space-150, 12px)"} 0 0 0`,
|
|
52
|
+
// If task item is not first in the list then set margin top to 4px.
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
54
|
+
'div + div': {
|
|
55
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
// If task list is not first in the document then set margin top to 4px.
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
60
|
+
'div[data-task-list-local-id] div[data-task-list-local-id]': {
|
|
61
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
62
|
+
marginLeft: "var(--ds-space-300, 24px)"
|
|
63
|
+
},
|
|
64
|
+
// When action list is inside panel
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
66
|
+
'.ak-editor-panel__content': {
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
68
|
+
'> div[data-task-list-local-id]:first-child': {
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
70
|
+
margin: '0 !important'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
export const whitespaceStyles = css({
|
|
5
|
+
wordWrap: 'break-word',
|
|
6
|
+
whiteSpace: 'pre-wrap'
|
|
7
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "207.
|
|
2
|
+
export const version = "207.9.0";
|
|
@@ -8,6 +8,7 @@ import uuid from 'uuid/v4';
|
|
|
8
8
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import { createDispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
10
10
|
import { useConstructor, usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
11
|
+
import { nodeVisibilityManager } from '@atlaskit/editor-common/node-visibility';
|
|
11
12
|
import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
12
13
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
13
14
|
import { getResponseEndTime } from '@atlaskit/editor-common/performance/navigation';
|
|
@@ -19,6 +20,7 @@ import { isEmptyDocument } from '@atlaskit/editor-common/utils/document';
|
|
|
19
20
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
20
21
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
21
22
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
22
24
|
import { useProviders } from '../composable-editor/hooks/useProviders';
|
|
23
25
|
import { createFeatureFlagsFromProps } from '../utils/feature-flags-from-props';
|
|
24
26
|
import { getNodesCount } from '../utils/getNodesCount';
|
|
@@ -481,6 +483,12 @@ export function ReactEditorView(props) {
|
|
|
481
483
|
}, [editorView, shouldFocus, __livePage, mitigateScrollJump]);
|
|
482
484
|
var handleEditorViewRef = useCallback(function (node) {
|
|
483
485
|
if (!viewRef.current && node) {
|
|
486
|
+
// make sure this doesn't expose the experiment
|
|
487
|
+
if (editorExperiment('platform_editor_nodevisibility', true, {
|
|
488
|
+
exposure: false
|
|
489
|
+
})) {
|
|
490
|
+
nodeVisibilityManager(node).initialiseNodeObserver();
|
|
491
|
+
}
|
|
484
492
|
var view = createEditorView(node);
|
|
485
493
|
if (fg('platform_editor_reduce_scroll_jump_on_editor_start')) {
|
|
486
494
|
if (mitigateScrollJump) {
|
|
@@ -551,6 +559,9 @@ export function ReactEditorView(props) {
|
|
|
551
559
|
} else {
|
|
552
560
|
viewRef.current.destroy(); // Destroys the dom node & all node views
|
|
553
561
|
}
|
|
562
|
+
if (editorExperiment('platform_editor_nodevisibility', true)) {
|
|
563
|
+
nodeVisibilityManager(viewRef.current.dom).disconnect();
|
|
564
|
+
}
|
|
554
565
|
viewRef.current = undefined;
|
|
555
566
|
}
|
|
556
567
|
}, [createEditorView, onEditorCreated, eventDispatcher, shouldFocus, __livePage, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
|
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
6
6
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import {
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
10
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
11
11
|
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
12
12
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
@@ -60,7 +60,6 @@ var useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(functi
|
|
|
60
60
|
}, function (pluginInjectionApi) {
|
|
61
61
|
var primaryToolbarComponents = useSharedPluginStateSelector(pluginInjectionApi, 'primaryToolbar.components');
|
|
62
62
|
var editorViewMode = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
|
|
63
|
-
var showTopToolbar = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode._showTopToolbar');
|
|
64
63
|
var hasHadInteraction = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.hasHadInteraction');
|
|
65
64
|
var interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
|
|
66
65
|
return {
|
|
@@ -68,8 +67,7 @@ var useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(functi
|
|
|
68
67
|
components: primaryToolbarComponents
|
|
69
68
|
},
|
|
70
69
|
editorViewModeState: !editorViewMode ? undefined : {
|
|
71
|
-
mode: editorViewMode
|
|
72
|
-
_showTopToolbar: showTopToolbar
|
|
70
|
+
mode: editorViewMode
|
|
73
71
|
},
|
|
74
72
|
interactionState: hasHadInteraction === undefined || interactionState === undefined ? undefined : {
|
|
75
73
|
hasHadInteraction: hasHadInteraction,
|
|
@@ -78,7 +76,7 @@ var useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(functi
|
|
|
78
76
|
};
|
|
79
77
|
});
|
|
80
78
|
export var FullPageEditor = function FullPageEditor(props) {
|
|
81
|
-
var _scrollContentContain, _scrollContentContain2, _scrollContentContain3,
|
|
79
|
+
var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _wrapperElementRef$cu;
|
|
82
80
|
var wrapperElementRef = useMemo(function () {
|
|
83
81
|
return props.innerRef;
|
|
84
82
|
}, [props.innerRef]);
|
|
@@ -117,23 +115,6 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
117
115
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
118
116
|
}
|
|
119
117
|
var isEditorToolbarHidden = fg('platform_editor_sync_editor_view_mode_state') ? viewMode === 'view' : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
120
|
-
if (props.__livePage && !editorExperiment('live_pages_graceful_edit', 'control')) {
|
|
121
|
-
// the custom toolbar logic should only be applied when the experiment cohort is not control,
|
|
122
|
-
// and the editor is in live page mode.
|
|
123
|
-
if (!editorViewModeState) {
|
|
124
|
-
// when first loading the editor, the toolbar should be hidden for all content modes
|
|
125
|
-
// the editorViewMode plugin state is not able to be relied as it will not be setup when
|
|
126
|
-
// the appearance component is being rendered.
|
|
127
|
-
// In this case we set the toolbar to be hidden by default.
|
|
128
|
-
isEditorToolbarHidden = true;
|
|
129
|
-
} else {
|
|
130
|
-
if (editorExperiment('live_pages_graceful_edit', 'initially-hide-toolbar')) {
|
|
131
|
-
// for the initially-hide-toolbar variant, the toolbar should be hidden based on
|
|
132
|
-
// a separate flag in the editorViewMode plugin state.
|
|
133
|
-
isEditorToolbarHidden = !editorViewModeState._showTopToolbar || false;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
118
|
var customPrimaryToolbarComponents = props.customPrimaryToolbarComponents;
|
|
138
119
|
if (editorExperiment('platform_editor_controls', 'variant1', {
|
|
139
120
|
exposure: true
|
|
@@ -163,10 +144,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
163
144
|
,
|
|
164
145
|
className: "akEditor",
|
|
165
146
|
ref: wrapperElementRef
|
|
166
|
-
}, !
|
|
167
|
-
css: hiddenStyle,
|
|
168
|
-
"data-hidden": isEditorToolbarHidden
|
|
169
|
-
}, jsx(FullPageToolbar, {
|
|
147
|
+
}, !isEditorToolbarHidden && jsx(FullPageToolbar, {
|
|
170
148
|
appearance: props.appearance,
|
|
171
149
|
editorAPI: editorAPI,
|
|
172
150
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
@@ -193,33 +171,6 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
193
171
|
providerFactory: props.providerFactory,
|
|
194
172
|
showKeyline: showKeyline,
|
|
195
173
|
featureFlags: props.featureFlags
|
|
196
|
-
})), editorExperiment('live_pages_graceful_edit', 'control') && !isEditorToolbarHidden && jsx(FullPageToolbar, {
|
|
197
|
-
appearance: props.appearance,
|
|
198
|
-
editorAPI: editorAPI,
|
|
199
|
-
beforeIcon: props.primaryToolbarIconBefore,
|
|
200
|
-
collabEdit: props.collabEdit,
|
|
201
|
-
containerElement: (_scrollContentContain4 = (_scrollContentContain5 = scrollContentContainerRef.current) === null || _scrollContentContain5 === void 0 ? void 0 : _scrollContentContain5.scrollContainer) !== null && _scrollContentContain4 !== void 0 ? _scrollContentContain4 : null,
|
|
202
|
-
customPrimaryToolbarComponents: props.customPrimaryToolbarComponents,
|
|
203
|
-
disabled: !!props.disabled,
|
|
204
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
205
|
-
editorActions: props.editorActions,
|
|
206
|
-
editorDOMElement: props.editorDOMElement
|
|
207
|
-
// Ignored via go/ees005
|
|
208
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
209
|
-
,
|
|
210
|
-
editorView: props.editorView
|
|
211
|
-
// Ignored via go/ees005
|
|
212
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
213
|
-
,
|
|
214
|
-
eventDispatcher: props.eventDispatcher,
|
|
215
|
-
hasMinWidth: props.enableToolbarMinWidth,
|
|
216
|
-
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
217
|
-
popupsMountPoint: props.popupsMountPoint,
|
|
218
|
-
popupsScrollableElement: props.popupsScrollableElement,
|
|
219
|
-
primaryToolbarComponents: primaryToolbarComponents,
|
|
220
|
-
providerFactory: props.providerFactory,
|
|
221
|
-
showKeyline: showKeyline,
|
|
222
|
-
featureFlags: props.featureFlags
|
|
223
174
|
}), jsx(FullPageContentArea, {
|
|
224
175
|
editorAPI: editorAPI,
|
|
225
176
|
ref: scrollContentContainerRef,
|
|
@@ -247,16 +198,4 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
247
198
|
viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
|
|
248
199
|
hasHadInteraction: hasHadInteraction
|
|
249
200
|
})));
|
|
250
|
-
};
|
|
251
|
-
var hiddenStyle = css({
|
|
252
|
-
visibility: 'visible',
|
|
253
|
-
opacity: 1,
|
|
254
|
-
transition: '200ms opacity, 200ms visibility, 200ms transform',
|
|
255
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
256
|
-
'&[data-hidden="true"]': {
|
|
257
|
-
height: 0,
|
|
258
|
-
visibility: 'hidden',
|
|
259
|
-
opacity: 0
|
|
260
|
-
// transition: '0ms opacity, 0ms visibility, 0ms transform',
|
|
261
|
-
}
|
|
262
|
-
});
|
|
201
|
+
};
|
|
@@ -91,14 +91,11 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
91
91
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
92
92
|
contentArea,
|
|
93
93
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
94
|
-
|
|
94
|
+
props.isEditorToolbarHidden &&
|
|
95
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
96
|
contentAreaHeightNoToolbar],
|
|
97
97
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
98
98
|
ref: containerRef
|
|
99
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
100
|
-
,
|
|
101
|
-
className: !editorExperiment('live_pages_graceful_edit', 'control') && props.isEditorToolbarHidden ? 'ak-editor-content-area-no-toolbar' : undefined
|
|
102
99
|
}, jsx("div", {
|
|
103
100
|
css:
|
|
104
101
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
|