@atlaskit/editor-core 208.3.5 → 208.4.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +119 -0
  3. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -1
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +4 -28
  5. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +9 -9
  6. package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper.js +97 -0
  7. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -7
  8. package/dist/cjs/ui/EditorContentContainer/styles/findReplaceStyles.js +44 -5
  9. package/dist/cjs/version-wrapper.js +1 -1
  10. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +103 -0
  11. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -1
  12. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +6 -30
  13. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +10 -10
  14. package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper.js +92 -0
  15. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +5 -9
  16. package/dist/es2019/ui/EditorContentContainer/styles/findReplaceStyles.js +44 -5
  17. package/dist/es2019/version-wrapper.js +1 -1
  18. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +111 -0
  19. package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -1
  20. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +6 -30
  21. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +10 -10
  22. package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper.js +90 -0
  23. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +5 -9
  24. package/dist/esm/ui/EditorContentContainer/styles/findReplaceStyles.js +44 -5
  25. package/dist/esm/version-wrapper.js +1 -1
  26. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +15 -0
  27. package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +20 -0
  28. package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +15 -0
  29. package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +20 -0
  30. package/package.json +4 -7
@@ -10,6 +10,7 @@ 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';
12
12
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
13
+ import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
13
14
  import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
16
  import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
@@ -148,7 +149,11 @@ export const FullPageEditor = props => {
148
149
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
149
150
  ,
150
151
  className: "akEditor",
151
- ref: wrapperElementRef
152
+ ref: wrapperElementRef,
153
+ style: {
154
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
155
+ '--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
156
+ }
152
157
  }, !isEditorToolbarHidden && jsx(FullPageToolbar, {
153
158
  appearance: props.appearance,
154
159
  editorAPI: editorAPI,
@@ -12,7 +12,7 @@ import { injectIntl } from 'react-intl-next';
12
12
  import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
13
13
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
14
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';
15
+ import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
16
16
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
17
17
  import { fg } from '@atlaskit/platform-feature-flags';
18
18
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
@@ -34,8 +34,6 @@ const tableMarginFullWidthMode = 2;
34
34
  const akLayoutGutterOffset = 12;
35
35
  const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
36
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
37
  const getTotalPadding = () => akEditorGutterPaddingDynamic() * 2;
40
38
 
41
39
  // old styles - to be deleted when cleaning up experiment `platform_editor_core_static_emotion_non_central`
@@ -114,7 +112,7 @@ const editorContentArea = css({
114
112
  // When the toolbar is hidden, we don't want content to jump up
115
113
  // the extra 1px is to account for the border on the toolbar
116
114
  // 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)`
115
+ paddingTop: `calc(${"var(--ds-space-600, 48px)"} + ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()} + 1px)`
118
116
  },
119
117
  paddingBottom: "var(--ds-space-600, 48px)",
120
118
  height: 'calc( 100% - 105px )',
@@ -203,18 +201,6 @@ const editorContentGutterStyle = () => {
203
201
  };
204
202
 
205
203
  // 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
204
  const editorContentAreaNew = css({
219
205
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
220
206
  lineHeight: '24px',
@@ -223,7 +209,7 @@ const editorContentAreaNew = css({
223
209
  '.ak-editor-content-area-no-toolbar &': {
224
210
  // When the toolbar is hidden, we don't want content to jump up
225
211
  // 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)`
212
+ paddingTop: `calc(${"var(--ds-space-600, 48px)"} + var(--ak-editor-fullpage-toolbar-height) + 1px)`
227
213
  },
228
214
  paddingBottom: "var(--ds-space-600, 48px)",
229
215
  height: 'calc( 100% - 105px )',
@@ -313,7 +299,7 @@ const editorContentGutterStyles = css({
313
299
  const contentAreaNew = css({
314
300
  display: 'flex',
315
301
  flexDirection: 'row',
316
- height: `calc(100% - ${FULL_PAGE_EDITOR_TOOLBAR_HEIGHT})`,
302
+ height: `calc(100% - var(--ak-editor-fullpage-toolbar-height))`,
317
303
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
318
304
  '&.ak-editor-content-area-no-toolbar': {
319
305
  // The editor toolbar height is 1px off (from the border) -- so we need to add 1px to the height
@@ -325,12 +311,6 @@ const contentAreaNew = css({
325
311
  padding: 0,
326
312
  transition: `padding 0ms ${akEditorSwoopCubicBezier}`
327
313
  });
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
314
  const contentAreaHeightNoToolbar = css({
335
315
  height: '100%'
336
316
  });
@@ -383,9 +363,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
383
363
  return editorExperiment('platform_editor_controls', 'variant1');
384
364
  };
385
365
  return jsx("div", {
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] : [
366
+ css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar] : [
389
367
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
390
368
  contentArea,
391
369
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -411,9 +389,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
411
389
  editorView: props.editorView,
412
390
  editorDisabled: props.disabled
413
391
  }, jsx("div", {
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,
392
+ css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [editorContentAreaNew, editorContentAreaProsemirrorStyle, tableFullPageEditorStylesNew, fg('platform_editor_fix_table_width_inline_comment') ? fullWidthNonChromelessBreakoutBlockTableStyle : fullWidthModeBreakoutBlockTableStyle,
417
393
  // for breakout resizing, there's no need to restrict the width of codeblocks as they're always wrapped in a breakout mark
418
394
  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] : [
419
395
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
@@ -15,7 +15,9 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
15
  import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
16
16
  import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
17
17
  import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
18
- import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
18
+ import { MainToolbarForFirstChildWrapper, MainToolbarForSecondChildWrapper } from './CustomToolbarWrapper';
19
+ import { customToolbarWrapperStyle, mainToolbarIconBeforeStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
20
+ import { MainToolbarWrapper } from './MainToolbarWrapper';
19
21
  export const EditorToolbar = /*#__PURE__*/React.memo(props => {
20
22
  var _props$primaryToolbar, _useToolbarPortal, _props$customPrimaryT;
21
23
  const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
@@ -118,18 +120,16 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
118
120
  isShortcutToFocusToolbar: isShortcutToFocusToolbar,
119
121
  handleEscape: handleEscape,
120
122
  intl: props.intl
121
- }, jsx(ToolbarPortal, null, jsx("div", {
122
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
123
- css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
123
+ }, jsx(ToolbarPortal, null, jsx(MainToolbarWrapper, {
124
+ showKeyline: props.showKeyline || contextPanelWidth > 0,
125
+ twoLineEditorToolbar: twoLineEditorToolbar,
124
126
  "data-testid": "ak-editor-main-toolbar"
125
- }, jsx("div", {
126
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
127
- css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
127
+ }, jsx(MainToolbarForFirstChildWrapper, {
128
+ twoLineEditorToolbar: twoLineEditorToolbar,
128
129
  role: "toolbar",
129
130
  "aria-label": props.intl.formatMessage(messages.toolbarLabel)
130
- }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
131
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
132
- css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
131
+ }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx(MainToolbarForSecondChildWrapper, {
132
+ twoLineEditorToolbar: twoLineEditorToolbar,
133
133
  "data-testid": "avatar-group-outside-plugin",
134
134
  role: "region",
135
135
  "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ import { css, jsx } from '@emotion/react';
9
+ import { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
12
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
+ import { mainToolbarStyle as mainToolbarStyleDynamic, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
14
+
15
+ // Base styles that don't depend on feature flags
16
+ const baseToolbarStyles = css({
17
+ position: 'relative',
18
+ alignItems: 'center',
19
+ boxShadow: 'none',
20
+ borderBottom: `1px solid ${"var(--ds-border, #091E4224)"}`,
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
22
+ transition: `box-shadow 200ms ${akEditorSwoopCubicBezier}`,
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
24
+ zIndex: akEditorFloatingDialogZIndex,
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
26
+ display: 'flex',
27
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
28
+ flexShrink: 0,
29
+ backgroundColor: "var(--ds-surface, #FFFFFF)",
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
31
+ '& object': {
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
33
+ height: '0 !important'
34
+ }
35
+ });
36
+ const flexibleIconSize = css({
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
38
+ '& span svg': {
39
+ maxWidth: '100%'
40
+ }
41
+ });
42
+ // box-shadow is overriden by the mainToolbar
43
+ const mainToolbarWithKeyline = css({
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
45
+ boxShadow: `${"var(--ds-shadow-overflow, 0px 0px 8px #091E4228, 0px 0px 1px #091E421e)"}`
46
+ });
47
+ const mainToolbarTwoLineStyle = css({
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
49
+ [`@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px)`]: {
50
+ flexWrap: 'wrap',
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
52
+ height: `calc(var(--ak-editor-fullpage-toolbar-height) * 2)`
53
+ }
54
+ });
55
+ const MainToolbarWrapperNext = ({
56
+ showKeyline,
57
+ twoLineEditorToolbar,
58
+ children,
59
+ 'data-testid': testId
60
+ }) => {
61
+ return jsx("div", {
62
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
63
+ css: [baseToolbarStyles, fg('platform-visual-refresh-icons') && flexibleIconSize, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle],
64
+ "data-testid": testId
65
+ }, children);
66
+ };
67
+
68
+ /**
69
+ * Original version of the toolbar wrapper using dynamic styles
70
+ */
71
+ const MainToolbarWrapperOld = ({
72
+ showKeyline,
73
+ twoLineEditorToolbar,
74
+ children,
75
+ 'data-testid': testId
76
+ }) => {
77
+ return jsx("div", {
78
+ css:
79
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
80
+ mainToolbarStyleDynamic(showKeyline, twoLineEditorToolbar),
81
+ "data-testid": testId
82
+ }, children);
83
+ };
84
+
85
+ /**
86
+ * Wrapper component for the main toolbar that handles feature flag based styling
87
+ * @example
88
+ * <MainToolbarWrapper showKeyline={true} twoLineEditorToolbar={false}>
89
+ * <ToolbarContent />
90
+ * </MainToolbarWrapper>
91
+ */
92
+ export const MainToolbarWrapper = componentWithCondition(() => expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true), MainToolbarWrapperNext, MainToolbarWrapperOld);
@@ -25,7 +25,7 @@ import { codeMarkStyles } from './styles/codeMarkStyles';
25
25
  import { commentEditorStyles } from './styles/commentEditorStyles';
26
26
  import { cursorStyles } from './styles/cursorStyles';
27
27
  import { dateStyles, dateVanillaStyles } from './styles/dateStyles';
28
- import { editorUGCTokensDefault, editorUGCTokensModernized, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
28
+ import { editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
29
29
  import { embedCardStyles } from './styles/embedCardStyles';
30
30
  import { reactEmojiStyles, vanillaEmojiStyles } from './styles/emoji';
31
31
  import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes } from './styles/expandStyles';
@@ -44,7 +44,7 @@ import { listsStyles, listsStylesSafariFix } from './styles/list';
44
44
  import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
45
45
  import { mentionsStyles, mentionsSelectionStyles, mentionNodeStyles } from './styles/mentions';
46
46
  import { panelStyles, panelStylesMixin, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelViewStyles } from './styles/panelStyles';
47
- import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
47
+ import { paragraphStylesOld, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
48
48
  import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderTextStylesMixin_fg_platform_editor_system_fake_text_highlight_colour, placeholderWrapStyles } from './styles/placeholderStyles';
49
49
  import { pragmaticResizerStyles, pragmaticResizerStylesNew, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, resizerStyles } from './styles/resizerStyles';
50
50
  import { ruleStyles } from './styles/rule';
@@ -121,11 +121,9 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
121
121
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
122
122
  codeBlockStyles,
123
123
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
124
- !fg('platform_editor_typography_ugc') && editorUGCTokensDefault, (fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
124
+ !fg('platform_editor_typography_ugc') && editorUGCTokensDefault, fg('platform_editor_typography_ugc') &&
125
125
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
126
- editorUGCTokensRefreshed, !(fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
127
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
128
- editorUGCTokensModernized,
126
+ editorUGCTokensRefreshed,
129
127
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
130
128
  blocktypeStyles,
131
129
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -263,12 +261,10 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
263
261
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
264
262
  linkingVisualRefreshV1Styles,
265
263
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
266
- dateVanillaStyles, fg('platform_editor_typography_ugc') ? fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed') ?
264
+ dateVanillaStyles, fg('platform_editor_typography_ugc') ?
267
265
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
268
266
  paragraphStylesUGCRefreshed :
269
267
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
270
- paragraphStylesUGCModernized :
271
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
272
268
  paragraphStylesOld,
273
269
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
274
270
  fg('platform_editor_hyperlink_underline') ? linkStyles : linkStylesOld,
@@ -40,16 +40,26 @@ export const findReplaceStylesNew = css({
40
40
  inset 0 0 0 1px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"},
41
41
  inset 0 0 0 5px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"}
42
42
  `
43
+ },
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
45
+ '.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
46
+ boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"}`,
47
+ borderRadius: '3px'
43
48
  }
44
49
  },
45
50
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
46
- '.search-match-selected.search-match-block': {
51
+ '.search-match-block.search-match-block-selected': {
47
52
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
48
53
  '[data-smart-link-container="true"], .loader-wrapper>div::after': {
49
54
  boxShadow: `
50
55
  inset 0 0 0 1px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"},
51
56
  inset 0 0 0 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"}
52
57
  `
58
+ },
59
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
60
+ '.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
61
+ boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"}`,
62
+ borderRadius: '3px'
53
63
  }
54
64
  },
55
65
  /** With node selection */
@@ -62,10 +72,15 @@ export const findReplaceStylesNew = css({
62
72
  inset 0 0 0 5px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"},
63
73
  0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
64
74
  `
75
+ },
76
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
77
+ '.loader-wrapper>a, .lozenge-wrapper': {
78
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
79
+ boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtler, #F8E6A0)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"} !important`
65
80
  }
66
81
  },
67
82
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
68
- '.search-match-selected.search-match-block.ak-editor-selected-node': {
83
+ '.search-match-block.search-match-block-selected.ak-editor-selected-node': {
69
84
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
70
85
  '[data-smart-link-container="true"], .loader-wrapper>div::after': {
71
86
  boxShadow: `
@@ -73,10 +88,14 @@ export const findReplaceStylesNew = css({
73
88
  inset 0 0 0 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"},
74
89
  0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
75
90
  `
91
+ },
92
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
93
+ '.loader-wrapper>a, .lozenge-wrapper': {
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
95
+ boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-subtler-pressed, #E2B203)"} !important`
76
96
  }
77
97
  },
78
98
  /** Dark mode */
79
-
80
99
  /** Without node selection */
81
100
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
82
101
  '.search-match-block.search-match-dark': {
@@ -86,16 +105,26 @@ export const findReplaceStylesNew = css({
86
105
  inset 0 0 0 1px ${"var(--ds-background-accent-yellow-bolder, #946F00)"},
87
106
  inset 0 0 0 5px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"}
88
107
  `
108
+ },
109
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
110
+ '.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
111
+ boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"}`,
112
+ borderRadius: '3px'
89
113
  }
90
114
  },
91
115
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
92
- '.search-match-selected.search-match-block.search-match-dark': {
116
+ '.search-match-block.search-match-block-selected.search-match-dark': {
93
117
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
94
118
  '[data-smart-link-container="true"], .loader-wrapper>div::after': {
95
119
  boxShadow: `
96
120
  inset 0 0 0 1px ${"var(--ds-background-accent-yellow-bolder, #946F00)"},
97
121
  inset 0 0 0 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"}
98
122
  `
123
+ },
124
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
125
+ '.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container': {
126
+ boxShadow: `0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"}`,
127
+ borderRadius: '3px'
99
128
  }
100
129
  },
101
130
  /** With node selection */
@@ -108,10 +137,15 @@ export const findReplaceStylesNew = css({
108
137
  inset 0 0 0 5px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"},
109
138
  0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
110
139
  `
140
+ },
141
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
142
+ '.loader-wrapper>a, .lozenge-wrapper': {
143
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
144
+ boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-pressed, #533F04)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"} !important`
111
145
  }
112
146
  },
113
147
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
114
- '.search-match-selected.search-match-block.search-match-dark.ak-editor-selected-node': {
148
+ '.search-match-block.search-match-block-selected.search-match-dark.ak-editor-selected-node': {
115
149
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
116
150
  '[data-smart-link-container="true"], .loader-wrapper>div::after': {
117
151
  boxShadow: `
@@ -119,6 +153,11 @@ export const findReplaceStylesNew = css({
119
153
  inset 0 0 0 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"},
120
154
  0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}
121
155
  `
156
+ },
157
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
158
+ '.loader-wrapper>a, .lozenge-wrapper': {
159
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
160
+ boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}, 0px 0px 0px 4px ${"var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"}, 0px 0px 0px 5px ${"var(--ds-background-accent-yellow-bolder, #946F00)"} !important`
122
161
  }
123
162
  }
124
163
  });
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "208.3.4";
2
+ export const version = "208.3.6";
@@ -0,0 +1,111 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ import { css, jsx } from '@emotion/react';
9
+ import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
10
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
+ import { mainToolbarFirstChildStyle, mainToolbarSecondChildStyle } from './MainToolbar';
12
+ // Pre-computed static styles for first- and second-child wrappers.
13
+ // These contain no runtime logic and are safe for static-emotion mode.
14
+
15
+ var firstChildStaticBase = css({
16
+ display: 'flex',
17
+ flexGrow: 1
18
+ });
19
+
20
+ // we can't avoid some kind of function call here, so we need to disable the rule
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
+ var firstChildStaticTwoLine = css({
23
+ '@media (max-width: 868px)': {
24
+ flex: '1 1 100%',
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
27
+ justifyContent: 'flex-end',
28
+ minWidth: 'fit-content'
29
+ }
30
+ });
31
+ var secondChildStaticBase = css({
32
+ minWidth: 'fit-content'
33
+ });
34
+
35
+ // we can't avoid some kind of function call here, so we need to disable the rule
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
+ var secondChildStaticTwoLine = css({
38
+ '@media (max-width: 868px)': {
39
+ display: 'flex',
40
+ flexGrow: 1,
41
+ flex: '1 1 100%',
42
+ margin: 'auto',
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
+ height: 'var(--ak-editor-fullpage-toolbar-height)',
45
+ minWidth: 0
46
+ }
47
+ });
48
+
49
+ // ---------------- First child wrapper ----------------
50
+ var FirstChildWrapperStatic = function FirstChildWrapperStatic(_ref) {
51
+ var twoLineEditorToolbar = _ref.twoLineEditorToolbar,
52
+ children = _ref.children,
53
+ role = _ref.role,
54
+ ariaLabel = _ref['aria-label'],
55
+ testId = _ref['data-testid'];
56
+ return jsx("div", {
57
+ css: [firstChildStaticBase, twoLineEditorToolbar && firstChildStaticTwoLine],
58
+ role: role,
59
+ "aria-label": ariaLabel,
60
+ "data-testid": testId
61
+ }, children);
62
+ };
63
+ var FirstChildWrapperDynamic = function FirstChildWrapperDynamic(_ref2) {
64
+ var twoLineEditorToolbar = _ref2.twoLineEditorToolbar,
65
+ children = _ref2.children,
66
+ role = _ref2.role,
67
+ ariaLabel = _ref2['aria-label'],
68
+ testId = _ref2['data-testid'];
69
+ return jsx("div", {
70
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
71
+ css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
72
+ role: role,
73
+ "aria-label": ariaLabel,
74
+ "data-testid": testId
75
+ }, children);
76
+ };
77
+ export var MainToolbarForFirstChildWrapper = componentWithCondition(function () {
78
+ return expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
79
+ }, FirstChildWrapperStatic, FirstChildWrapperDynamic);
80
+
81
+ // ---------------- Second child wrapper ----------------
82
+ var SecondChildWrapperStatic = function SecondChildWrapperStatic(_ref3) {
83
+ var twoLineEditorToolbar = _ref3.twoLineEditorToolbar,
84
+ children = _ref3.children,
85
+ role = _ref3.role,
86
+ ariaLabel = _ref3['aria-label'],
87
+ testId = _ref3['data-testid'];
88
+ return jsx("div", {
89
+ css: [secondChildStaticBase, twoLineEditorToolbar && secondChildStaticTwoLine],
90
+ role: role,
91
+ "aria-label": ariaLabel,
92
+ "data-testid": testId
93
+ }, children);
94
+ };
95
+ var SecondChildWrapperDynamic = function SecondChildWrapperDynamic(_ref4) {
96
+ var twoLineEditorToolbar = _ref4.twoLineEditorToolbar,
97
+ children = _ref4.children,
98
+ role = _ref4.role,
99
+ ariaLabel = _ref4['aria-label'],
100
+ testId = _ref4['data-testid'];
101
+ return jsx("div", {
102
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage
103
+ css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
104
+ role: role,
105
+ "aria-label": ariaLabel,
106
+ "data-testid": testId
107
+ }, children);
108
+ };
109
+ export var MainToolbarForSecondChildWrapper = componentWithCondition(function () {
110
+ return expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true);
111
+ }, SecondChildWrapperStatic, SecondChildWrapperDynamic);
@@ -11,6 +11,7 @@ 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';
13
13
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
14
+ import { FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
14
15
  import { fg } from '@atlaskit/platform-feature-flags';
15
16
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
17
  import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
@@ -153,7 +154,11 @@ export var FullPageEditor = function FullPageEditor(props) {
153
154
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
154
155
  ,
155
156
  className: "akEditor",
156
- ref: wrapperElementRef
157
+ ref: wrapperElementRef,
158
+ style: {
159
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
160
+ '--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
161
+ }
157
162
  }, !isEditorToolbarHidden && jsx(FullPageToolbar, {
158
163
  appearance: props.appearance,
159
164
  editorAPI: editorAPI,