@atlaskit/editor-core 207.2.1 → 207.3.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 (42) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/ui/Appearance/Chromeless.js +27 -11
  3. package/dist/cjs/ui/Appearance/Comment/Comment.js +25 -5
  4. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +26 -4
  5. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
  6. package/dist/cjs/ui/ContentStyles/layout.js +2 -2
  7. package/dist/cjs/ui/ContextPanel/index.js +10 -4
  8. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +3 -1
  9. package/dist/cjs/ui/EditorContentContainer/styles/annotationStyles.js +45 -0
  10. package/dist/cjs/ui/EditorContentContainer/styles/embedCardStyles.js +34 -0
  11. package/dist/cjs/version-wrapper.js +1 -1
  12. package/dist/es2019/ui/Appearance/Chromeless.js +28 -10
  13. package/dist/es2019/ui/Appearance/Comment/Comment.js +24 -3
  14. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +24 -2
  15. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
  16. package/dist/es2019/ui/ContentStyles/layout.js +3 -2
  17. package/dist/es2019/ui/ContextPanel/index.js +11 -5
  18. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +5 -3
  19. package/dist/es2019/ui/EditorContentContainer/styles/annotationStyles.js +47 -0
  20. package/dist/es2019/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
  21. package/dist/es2019/version-wrapper.js +1 -1
  22. package/dist/esm/ui/Appearance/Chromeless.js +28 -12
  23. package/dist/esm/ui/Appearance/Comment/Comment.js +26 -6
  24. package/dist/esm/ui/Appearance/FullPage/FullPage.js +27 -5
  25. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
  26. package/dist/esm/ui/ContentStyles/layout.js +2 -2
  27. package/dist/esm/ui/ContextPanel/index.js +11 -5
  28. package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +4 -2
  29. package/dist/esm/ui/EditorContentContainer/styles/annotationStyles.js +37 -0
  30. package/dist/esm/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
  31. package/dist/esm/version-wrapper.js +1 -1
  32. package/dist/types/ui/Appearance/Chromeless.d.ts +0 -4
  33. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  34. package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
  35. package/dist/types/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
  36. package/dist/types/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
  37. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +0 -4
  38. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
  39. package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
  40. package/dist/types-ts4.5/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
  41. package/dist/types-ts4.5/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
  42. package/package.json +1 -1
@@ -9,8 +9,9 @@ import React from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import Transition from 'react-transition-group/Transition';
12
- import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
12
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
13
13
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
14
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
14
15
  import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
15
16
  import { fg } from '@atlaskit/platform-feature-flags';
16
17
  const ANIM_SPEED_MS = 500;
@@ -151,12 +152,17 @@ export class SwappableContentArea extends React.PureComponent {
151
152
  });
152
153
  }
153
154
  }
154
- export function ContextPanel(props) {
155
- var _contextPanelState$co;
155
+ const useContextPanelSharedState = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
156
156
  const {
157
157
  contextPanelState
158
- } = useSharedPluginState(props.editorAPI, ['contextPanel']);
159
- const firstContent = contextPanelState && (contextPanelState === null || contextPanelState === void 0 ? void 0 : (_contextPanelState$co = contextPanelState.contents) === null || _contextPanelState$co === void 0 ? void 0 : _contextPanelState$co.find(Boolean));
158
+ } = useSharedPluginState(pluginInjectionApi, ['contextPanel']);
159
+ return contextPanelState === null || contextPanelState === void 0 ? void 0 : contextPanelState.contents;
160
+ }, pluginInjectionApi => {
161
+ return useSharedPluginStateSelector(pluginInjectionApi, 'contextPanel.contents');
162
+ });
163
+ export function ContextPanel(props) {
164
+ const contextPanelContents = useContextPanelSharedState(props.editorAPI);
165
+ const firstContent = contextPanelContents && contextPanelContents.find(Boolean);
160
166
  return (
161
167
  // Ignored via go/ees005
162
168
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -15,7 +15,7 @@ import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-co
15
15
  import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
16
16
  import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
17
17
  import { gapCursorStyles } from '@atlaskit/editor-common/selection';
18
- import { CodeBlockSharedCssClassName, GRID_GUTTER, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
18
+ import { CodeBlockSharedCssClassName, GRID_GUTTER, MediaSharedClassNames, SmartCardSharedCssClassName, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
19
19
  import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
20
20
  import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
21
21
  import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
@@ -36,7 +36,9 @@ import { panelStyles } from '../ContentStyles/panel';
36
36
  import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
37
37
  import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
38
38
  import { aiPanelBaseStyles, aiPanelDarkStyles } from './styles/ai-panel';
39
+ import { annotationStyles } from './styles/annotationStyles';
39
40
  import { backgroundColorStyles } from './styles/backgroundColorStyles';
41
+ import { embedCardStyles } from './styles/embedCardStyles';
40
42
  import { layoutBaseStyles, layoutViewStyles } from './styles/layout';
41
43
  import { linkStyles, linkStylesOld } from './styles/link';
42
44
  import { ruleStyles } from './styles/rule';
@@ -467,7 +469,7 @@ const contentStyles = () => css`
467
469
 
468
470
  ${editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null}
469
471
 
470
- ${annotationSharedStyles()}
472
+ ${annotationStyles}
471
473
 
472
474
  ${smartCardStyles()}
473
475
 
@@ -477,7 +479,7 @@ const contentStyles = () => css`
477
479
 
478
480
  ${dateStyles}
479
481
 
480
- ${embedCardStyles()}
482
+ ${embedCardStyles}
481
483
 
482
484
  ${unsupportedStyles}
483
485
 
@@ -0,0 +1,47 @@
1
+ import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
2
+
3
+ import { AnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
5
+ export const annotationStyles = css({
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
7
+ '.ProseMirror': {
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
9
+ [`.${AnnotationSharedClassNames.blur}, .${AnnotationSharedClassNames.focus}, .${AnnotationSharedClassNames.draft}, .${AnnotationSharedClassNames.hover}`]: {
10
+ borderBottom: '2px solid transparent',
11
+ cursor: 'pointer',
12
+ padding: '1px 0 2px',
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
14
+ '&:has(.card), &:has([data-inline-card])': {
15
+ padding: '5px 0 3px 0'
16
+ },
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
18
+ '&:has(.date-lozenger-container)': {
19
+ paddingTop: "var(--ds-space-025, 2px)"
20
+ }
21
+ },
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
23
+ [`.${AnnotationSharedClassNames.focus}`]: {
24
+ background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
25
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
26
+ boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
27
+ },
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
29
+ [`.${AnnotationSharedClassNames.draft}`]: {
30
+ background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
31
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
32
+ boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)",
33
+ cursor: 'initial'
34
+ },
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
36
+ [`.${AnnotationSharedClassNames.blur}`]: {
37
+ background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
38
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
39
+ },
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
41
+ [`.${AnnotationSharedClassNames.hover}`]: {
42
+ background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
43
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
44
+ boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
45
+ }
46
+ }
47
+ });
@@ -0,0 +1,27 @@
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 embedCardStyles = css({
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
6
+ '.ProseMirror': {
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
8
+ ".embedCardView-content-wrap[layout^='wrap-']": {
9
+ maxWidth: '100%',
10
+ position: 'relative',
11
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
12
+ zIndex: 2
13
+ },
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
+ ".embedCardView-content-wrap[layout='wrap-left']": {
16
+ float: 'left'
17
+ },
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
19
+ ".embedCardView-content-wrap[layout='wrap-right']": {
20
+ float: 'right'
21
+ },
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
23
+ ".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
24
+ clear: 'both'
25
+ }
26
+ }
27
+ });
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "207.2.1";
2
+ export const version = "207.3.0";
@@ -14,7 +14,8 @@ import React, { Fragment } from 'react';
14
14
 
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
16
  import { css, jsx } from '@emotion/react';
17
- import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
17
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
18
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
18
19
  import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
19
20
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
20
21
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -53,6 +54,13 @@ var EditorContainer = componentWithCondition(function () {
53
54
  exposure: true
54
55
  });
55
56
  }, EditorContentContainer, ContentArea);
57
+ var useEditorViewModePluginState = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
58
+ var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['editorViewMode']),
59
+ editorViewModeState = _useSharedPluginState.editorViewModeState;
60
+ return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
61
+ }, function (pluginInjectionApi) {
62
+ return useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
63
+ });
56
64
 
57
65
  /**
58
66
  * Render the editor in a chromeless appearance.
@@ -91,8 +99,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
91
99
  pluginHooks = _this$props.pluginHooks,
92
100
  featureFlags = _this$props.featureFlags;
93
101
  var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
94
- var _useSharedPluginState = useSharedPluginState(_this.props.editorAPI, ['editorViewMode']),
95
- editorViewModeState = _useSharedPluginState.editorViewModeState;
102
+ var editorViewMode = useEditorViewModePluginState(_this.props.editorAPI);
96
103
  return jsx(WithFlash, {
97
104
  animate: maxContentSizeReached
98
105
  }, jsx("div", {
@@ -116,7 +123,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
116
123
  , {
117
124
  className: "ak-editor-content-area",
118
125
  featureFlags: featureFlags,
119
- viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode,
126
+ viewMode: editorViewMode,
120
127
  appearance: _this.appearance
121
128
  }, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, jsx(PluginSlot, {
122
129
  editorView: editorView,
@@ -140,12 +147,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
140
147
  _inherits(Editor, _React$Component);
141
148
  return _createClass(Editor, [{
142
149
  key: "render",
143
- value:
144
- /**
145
- *
146
- * @example
147
- */
148
- function render() {
150
+ value: function render() {
149
151
  return jsx(RenderWithPluginState, {
150
152
  editorAPI: this.props.editorAPI,
151
153
  renderChrome: this.renderChrome
@@ -155,11 +157,25 @@ var Editor = /*#__PURE__*/function (_React$Component) {
155
157
  }(React.Component);
156
158
  _defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
157
159
  export { Editor as default };
160
+ var useMaxContentSizePluginState = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
161
+ var _useSharedPluginState2 = useSharedPluginState(pluginInjectionApi, ['maxContentSize']),
162
+ maxContentSizeState = _useSharedPluginState2.maxContentSizeState;
163
+ return {
164
+ maxContentSizeState: maxContentSizeState
165
+ };
166
+ }, function (pluginInjectionApi) {
167
+ var maxContentSizeReached = useSharedPluginStateSelector(pluginInjectionApi, 'maxContentSize.maxContentSizeReached');
168
+ return {
169
+ maxContentSizeState: maxContentSizeReached === undefined ? undefined : {
170
+ maxContentSizeReached: maxContentSizeReached
171
+ }
172
+ };
173
+ });
158
174
  function RenderWithPluginState(_ref3) {
159
175
  var renderChrome = _ref3.renderChrome,
160
176
  editorAPI = _ref3.editorAPI;
161
- var _useSharedPluginState2 = useSharedPluginState(editorAPI, ['maxContentSize']),
162
- maxContentSizeState = _useSharedPluginState2.maxContentSizeState;
177
+ var _useMaxContentSizePlu = useMaxContentSizePluginState(editorAPI),
178
+ maxContentSizeState = _useMaxContentSizePlu.maxContentSizeState;
163
179
  return jsx(Fragment, null, renderChrome({
164
180
  maxContentSize: maxContentSizeState
165
181
  }));
@@ -11,11 +11,12 @@ import classnames from 'classnames';
11
11
  import { useIntl } from 'react-intl-next';
12
12
  import ButtonGroup from '@atlaskit/button/button-group';
13
13
  import Button from '@atlaskit/button/new';
14
- import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
14
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
15
15
  import messages from '@atlaskit/editor-common/messages';
16
16
  import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
17
17
  import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
18
18
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
19
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
19
20
  import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
20
21
  import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
21
22
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
@@ -82,13 +83,32 @@ var EditorContainer = componentWithCondition(function () {
82
83
  exposure: true
83
84
  });
84
85
  }, EditorContentContainer, ContentArea);
86
+ var useCommentEditorPluginsStates = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
87
+ return useSharedPluginState(pluginInjectionApi, ['maxContentSize', 'primaryToolbar', 'editorViewMode']);
88
+ }, function (pluginInjectionApi) {
89
+ var maxContentSizeReached = useSharedPluginStateSelector(pluginInjectionApi, 'maxContentSize.maxContentSizeReached');
90
+ var primaryToolbarComponents = useSharedPluginStateSelector(pluginInjectionApi, 'primaryToolbar.components');
91
+ var editorViewMode = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
92
+ return {
93
+ maxContentSizeState: maxContentSizeReached === undefined ? undefined : {
94
+ maxContentSizeReached: maxContentSizeReached
95
+ },
96
+ primaryToolbarState: !primaryToolbarComponents ? undefined : {
97
+ components: primaryToolbarComponents
98
+ },
99
+ editorViewModeState: !editorViewMode ? undefined : {
100
+ mode: editorViewMode
101
+ }
102
+ };
103
+ });
85
104
  export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
86
105
  var editorAPI = props.editorAPI;
87
- var _useSharedPluginState = useSharedPluginState(editorAPI, ['media', 'maxContentSize', 'primaryToolbar', 'editorViewMode']),
88
- mediaState = _useSharedPluginState.mediaState,
89
- maxContentSizeState = _useSharedPluginState.maxContentSizeState,
90
- primaryToolbarState = _useSharedPluginState.primaryToolbarState,
91
- editorViewModeState = _useSharedPluginState.editorViewModeState;
106
+ var _useCommentEditorPlug = useCommentEditorPluginsStates(editorAPI),
107
+ maxContentSizeState = _useCommentEditorPlug.maxContentSizeState,
108
+ primaryToolbarState = _useCommentEditorPlug.primaryToolbarState,
109
+ editorViewModeState = _useCommentEditorPlug.editorViewModeState;
110
+ var _useSharedPluginState = useSharedPluginState(editorAPI, ['media']),
111
+ mediaState = _useSharedPluginState.mediaState;
92
112
  var intl = useIntl();
93
113
  var editorDOMElement = props.editorDOMElement,
94
114
  editorView = props.editorView,
@@ -8,7 +8,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { browser } from '@atlaskit/editor-common/browser';
11
- import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
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
14
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -55,6 +55,28 @@ var hasCustomComponents = function hasCustomComponents(components) {
55
55
  }
56
56
  return true;
57
57
  };
58
+ var useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
59
+ return useSharedPluginState(pluginInjectionApi, ['editorViewMode', 'primaryToolbar', 'interaction']);
60
+ }, function (pluginInjectionApi) {
61
+ var primaryToolbarComponents = useSharedPluginStateSelector(pluginInjectionApi, 'primaryToolbar.components');
62
+ var editorViewMode = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
63
+ var showTopToolbar = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode._showTopToolbar');
64
+ var hasHadInteraction = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.hasHadInteraction');
65
+ var interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
66
+ return {
67
+ primaryToolbarState: !primaryToolbarComponents ? undefined : {
68
+ components: primaryToolbarComponents
69
+ },
70
+ editorViewModeState: !editorViewMode ? undefined : {
71
+ mode: editorViewMode,
72
+ _showTopToolbar: showTopToolbar
73
+ },
74
+ interactionState: hasHadInteraction === undefined || interactionState === undefined ? undefined : {
75
+ hasHadInteraction: hasHadInteraction,
76
+ interactionState: interactionState
77
+ }
78
+ };
79
+ });
58
80
  export var FullPageEditor = function FullPageEditor(props) {
59
81
  var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
60
82
  var wrapperElementRef = useMemo(function () {
@@ -63,10 +85,10 @@ export var FullPageEditor = function FullPageEditor(props) {
63
85
  var scrollContentContainerRef = useRef(null);
64
86
  var showKeyline = useShowKeyline(scrollContentContainerRef);
65
87
  var editorAPI = props.editorAPI;
66
- var _useSharedPluginState = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar', 'interaction']),
67
- editorViewModeState = _useSharedPluginState.editorViewModeState,
68
- primaryToolbarState = _useSharedPluginState.primaryToolbarState,
69
- interactionState = _useSharedPluginState.interactionState;
88
+ var _useFullPageEditorPlu = useFullPageEditorPluginsStates(editorAPI),
89
+ editorViewModeState = _useFullPageEditorPlu.editorViewModeState,
90
+ primaryToolbarState = _useFullPageEditorPlu.primaryToolbarState,
91
+ interactionState = _useFullPageEditorPlu.interactionState;
70
92
  var viewMode = getEditorViewMode(editorViewModeState, props.preset);
71
93
  var hasHadInteraction = fg('platform_editor_interaction_api_refactor') ? (interactionState === null || interactionState === void 0 ? void 0 : interactionState.interactionState) !== 'hasNotHadInteraction' : Boolean(interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction);
72
94
  var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
@@ -13,7 +13,7 @@ var SWOOP_ANIMATION = "0.5s ".concat(akEditorSwoopCubicBezier);
13
13
  var getTotalPadding = function getTotalPadding() {
14
14
  return akEditorGutterPaddingDynamic() * 2;
15
15
  };
16
- var akNestedDndGutterOffset = 8;
16
+ var AK_NESTED_DND_GUTTER_OFFSET = 8;
17
17
 
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
19
19
  export var fullPageEditorWrapper = css({
@@ -119,7 +119,7 @@ var editorContentAreaContainerStyle = function editorContentAreaContainerStyle()
119
119
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
120
120
  '[data-layout-section]': {
121
121
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
122
- maxWidth: "calc(100% + ".concat((akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? akNestedDndGutterOffset : 0)) * 2, "px)")
122
+ maxWidth: "calc(100% + ".concat((akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)) * 2, "px)")
123
123
  }
124
124
  }
125
125
  });
@@ -15,7 +15,7 @@ import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/cons
15
15
  import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
- var akNestedDndGutterOffset = 8;
18
+ var AK_NESTED_DND_GUTTER_OFFSET = 8;
19
19
  var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
20
20
  return fg('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
21
21
  css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
@@ -71,5 +71,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
71
71
 
72
72
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
73
73
  export var layoutStyles = function layoutStyles(viewMode) {
74
- return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? akNestedDndGutterOffset : 0), akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (fg('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('advanced_layouts', false) && fg('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
74
+ return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px\n\t\t\t\t0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0), akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (fg('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('advanced_layouts', false) && fg('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
75
75
  };
@@ -18,8 +18,9 @@ import React from 'react';
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
19
  import { css, jsx } from '@emotion/react';
20
20
  import Transition from 'react-transition-group/Transition';
21
- import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
21
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
22
22
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
23
+ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
23
24
  import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
24
25
  import { fg } from '@atlaskit/platform-feature-flags';
25
26
  var ANIM_SPEED_MS = 500;
@@ -169,11 +170,16 @@ export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
169
170
  }
170
171
  }]);
171
172
  }(React.PureComponent);
172
- export function ContextPanel(props) {
173
- var _contextPanelState$co;
174
- var _useSharedPluginState = useSharedPluginState(props.editorAPI, ['contextPanel']),
173
+ var useContextPanelSharedState = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
174
+ var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['contextPanel']),
175
175
  contextPanelState = _useSharedPluginState.contextPanelState;
176
- var firstContent = contextPanelState && (contextPanelState === null || contextPanelState === void 0 || (_contextPanelState$co = contextPanelState.contents) === null || _contextPanelState$co === void 0 ? void 0 : _contextPanelState$co.find(Boolean));
176
+ return contextPanelState === null || contextPanelState === void 0 ? void 0 : contextPanelState.contents;
177
+ }, function (pluginInjectionApi) {
178
+ return useSharedPluginStateSelector(pluginInjectionApi, 'contextPanel.contents');
179
+ });
180
+ export function ContextPanel(props) {
181
+ var contextPanelContents = useContextPanelSharedState(props.editorAPI);
182
+ var firstContent = contextPanelContents && contextPanelContents.find(Boolean);
177
183
  return (
178
184
  // Ignored via go/ees005
179
185
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -17,7 +17,7 @@ import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-co
17
17
  import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
18
18
  import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
19
19
  import { gapCursorStyles } from '@atlaskit/editor-common/selection';
20
- import { CodeBlockSharedCssClassName, GRID_GUTTER, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
20
+ import { CodeBlockSharedCssClassName, GRID_GUTTER, MediaSharedClassNames, SmartCardSharedCssClassName, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
21
21
  import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
22
22
  import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
23
23
  import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
@@ -38,7 +38,9 @@ import { panelStyles } from '../ContentStyles/panel';
38
38
  import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
39
39
  import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
40
40
  import { aiPanelBaseStyles, aiPanelDarkStyles } from './styles/ai-panel';
41
+ import { annotationStyles } from './styles/annotationStyles';
41
42
  import { backgroundColorStyles } from './styles/backgroundColorStyles';
43
+ import { embedCardStyles } from './styles/embedCardStyles';
42
44
  import { layoutBaseStyles, layoutViewStyles } from './styles/layout';
43
45
  import { linkStyles, linkStylesOld } from './styles/link';
44
46
  import { ruleStyles } from './styles/rule';
@@ -153,7 +155,7 @@ var contentStyles = function contentStyles() {
153
155
  exposure: false
154
156
  }) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh, editorExperiment('platform_editor_vanilla_dom', true, {
155
157
  exposure: false
156
- }) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), fixBlockControlStylesSSR(), MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
158
+ }) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationStyles, smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles, unsupportedStyles, resizerStyles, pragmaticResizerStyles(), fixBlockControlStylesSSR(), MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
157
159
  };
158
160
  var CommentEditorMargin = 14;
159
161
 
@@ -0,0 +1,37 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
3
+
4
+ import { AnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
6
+ export var annotationStyles = css({
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
8
+ '.ProseMirror': _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ".".concat(AnnotationSharedClassNames.blur, ", .").concat(AnnotationSharedClassNames.focus, ", .").concat(AnnotationSharedClassNames.draft, ", .").concat(AnnotationSharedClassNames.hover), {
9
+ borderBottom: '2px solid transparent',
10
+ cursor: 'pointer',
11
+ padding: '1px 0 2px',
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
13
+ '&:has(.card), &:has([data-inline-card])': {
14
+ padding: '5px 0 3px 0'
15
+ },
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
17
+ '&:has(.date-lozenger-container)': {
18
+ paddingTop: "var(--ds-space-025, 2px)"
19
+ }
20
+ }), ".".concat(AnnotationSharedClassNames.focus), {
21
+ background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
22
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
23
+ boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
24
+ }), ".".concat(AnnotationSharedClassNames.draft), {
25
+ background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
26
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
27
+ boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)",
28
+ cursor: 'initial'
29
+ }), ".".concat(AnnotationSharedClassNames.blur), {
30
+ background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
31
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
32
+ }), ".".concat(AnnotationSharedClassNames.hover), {
33
+ background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
34
+ borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
35
+ boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
36
+ })
37
+ });
@@ -0,0 +1,27 @@
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 var embedCardStyles = css({
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
6
+ '.ProseMirror': {
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
8
+ ".embedCardView-content-wrap[layout^='wrap-']": {
9
+ maxWidth: '100%',
10
+ position: 'relative',
11
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
12
+ zIndex: 2
13
+ },
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
+ ".embedCardView-content-wrap[layout='wrap-left']": {
16
+ float: 'left'
17
+ },
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
19
+ ".embedCardView-content-wrap[layout='wrap-right']": {
20
+ float: 'right'
21
+ },
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
23
+ ".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
24
+ clear: 'both'
25
+ }
26
+ }
27
+ });
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "207.2.1";
2
+ export var version = "207.3.0";
@@ -30,10 +30,6 @@ export default class Editor extends React.Component<AppearanceProps> {
30
30
  private appearance;
31
31
  private containerElement;
32
32
  private renderChrome;
33
- /**
34
- *
35
- * @example
36
- */
37
33
  render(): jsx.JSX.Element;
38
34
  }
39
35
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
4
- import { type InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
4
+ import type { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
5
5
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
6
6
  import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
7
7
  import type { EditorAppearanceComponentProps } from '../../../types';
@@ -1,3 +1,3 @@
1
1
  import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
2
2
  import type { ComponentProps } from './FullPage';
3
- export declare const getEditorViewMode: (editorViewModeState: EditorViewModePluginState | undefined | null, preset: ComponentProps['preset']) => ViewMode;
3
+ export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, 'mode'> | undefined | null, preset: ComponentProps['preset']) => ViewMode;
@@ -0,0 +1 @@
1
+ export declare const annotationStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
@@ -30,10 +30,6 @@ export default class Editor extends React.Component<AppearanceProps> {
30
30
  private appearance;
31
31
  private containerElement;
32
32
  private renderChrome;
33
- /**
34
- *
35
- * @example
36
- */
37
33
  render(): jsx.JSX.Element;
38
34
  }
39
35
  export {};
@@ -1,7 +1,7 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { OptionalPlugin } from '@atlaskit/editor-common/types';
3
3
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
4
- import { type InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
4
+ import type { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
5
5
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
6
6
  import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
7
7
  import type { EditorAppearanceComponentProps } from '../../../types';
@@ -1,3 +1,3 @@
1
1
  import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
2
2
  import type { ComponentProps } from './FullPage';
3
- export declare const getEditorViewMode: (editorViewModeState: EditorViewModePluginState | undefined | null, preset: ComponentProps['preset']) => ViewMode;
3
+ export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, 'mode'> | undefined | null, preset: ComponentProps['preset']) => ViewMode;
@@ -0,0 +1 @@
1
+ export declare const annotationStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "207.2.1",
3
+ "version": "207.3.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"