@atlaskit/editor-core 203.16.5 → 203.17.3

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 (70) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/afm-cc/tsconfig.json +6 -0
  3. package/afm-jira/tsconfig.json +6 -0
  4. package/afm-post-office/tsconfig.json +6 -0
  5. package/dist/cjs/composable-editor/core-editor.js +5 -2
  6. package/dist/cjs/composable-editor/core-performance-metrics.js +109 -0
  7. package/dist/cjs/index.js +13 -0
  8. package/dist/cjs/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +22 -0
  9. package/dist/cjs/ui/Addon/click-area-helper.js +5 -3
  10. package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -2
  11. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  12. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +32 -6
  13. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +11 -1
  14. package/dist/cjs/ui/ContentStyles/extension.js +1 -1
  15. package/dist/cjs/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
  16. package/dist/cjs/ui/Toolbar/ToolbarPortal.js +48 -0
  17. package/dist/cjs/version-wrapper.js +1 -1
  18. package/dist/es2019/composable-editor/core-editor.js +6 -3
  19. package/dist/es2019/composable-editor/core-performance-metrics.js +92 -0
  20. package/dist/es2019/index.js +1 -0
  21. package/dist/es2019/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +15 -0
  22. package/dist/es2019/ui/Addon/click-area-helper.js +5 -2
  23. package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -2
  24. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  25. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +31 -4
  26. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +11 -1
  27. package/dist/es2019/ui/ContentStyles/extension.js +5 -0
  28. package/dist/es2019/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
  29. package/dist/es2019/ui/Toolbar/ToolbarPortal.js +40 -0
  30. package/dist/es2019/version-wrapper.js +1 -1
  31. package/dist/esm/composable-editor/core-editor.js +6 -3
  32. package/dist/esm/composable-editor/core-performance-metrics.js +101 -0
  33. package/dist/esm/index.js +1 -0
  34. package/dist/esm/ui/Addon/ClickAreaBlock/contentComponentWrapper.js +15 -0
  35. package/dist/esm/ui/Addon/click-area-helper.js +5 -2
  36. package/dist/esm/ui/Appearance/Comment/Comment.js +3 -2
  37. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +3 -2
  38. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +32 -6
  39. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +11 -1
  40. package/dist/esm/ui/ContentStyles/extension.js +1 -1
  41. package/dist/esm/ui/Toolbar/ToolbarPortal.compiled.css +3 -0
  42. package/dist/esm/ui/Toolbar/ToolbarPortal.js +41 -0
  43. package/dist/esm/version-wrapper.js +1 -1
  44. package/dist/types/composable-editor/core-performance-metrics.d.ts +4 -0
  45. package/dist/types/create-editor/create-universal-preset.d.ts +52 -6
  46. package/dist/types/index.d.ts +1 -0
  47. package/dist/types/presets/universal.d.ts +52 -6
  48. package/dist/types/presets/useUniversalPreset.d.ts +52 -6
  49. package/dist/types/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +6 -0
  50. package/dist/types/ui/Addon/click-area-helper.d.ts +1 -0
  51. package/dist/types/ui/Toolbar/ToolbarPortal.d.ts +21 -0
  52. package/dist/types-ts4.5/composable-editor/core-performance-metrics.d.ts +4 -0
  53. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +56 -6
  54. package/dist/types-ts4.5/index.d.ts +1 -0
  55. package/dist/types-ts4.5/presets/universal.d.ts +56 -6
  56. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +56 -6
  57. package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/contentComponentWrapper.d.ts +6 -0
  58. package/dist/types-ts4.5/ui/Addon/click-area-helper.d.ts +1 -0
  59. package/dist/types-ts4.5/ui/Toolbar/ToolbarPortal.d.ts +21 -0
  60. package/package.json +38 -12
  61. package/dist/cjs/ui/Addon/ClickAreaInline/index.js +0 -41
  62. package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +0 -105
  63. package/dist/es2019/ui/Addon/ClickAreaInline/index.js +0 -34
  64. package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +0 -85
  65. package/dist/esm/ui/Addon/ClickAreaInline/index.js +0 -33
  66. package/dist/esm/ui/Addon/ClickAreaMobile/index.js +0 -103
  67. package/dist/types/ui/Addon/ClickAreaInline/index.d.ts +0 -13
  68. package/dist/types/ui/Addon/ClickAreaMobile/index.d.ts +0 -34
  69. package/dist/types-ts4.5/ui/Addon/ClickAreaInline/index.d.ts +0 -13
  70. package/dist/types-ts4.5/ui/Addon/ClickAreaMobile/index.d.ts +0 -34
@@ -12,11 +12,13 @@ import { injectIntl } from 'react-intl-next';
12
12
  import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
14
14
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
16
+ import { ToolbarPortalMountPoint, useToolbarPortal } from '../../Toolbar/ToolbarPortal';
15
17
  import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
16
18
  import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
17
19
  import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
18
20
  export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
19
- var _props$customPrimaryT;
21
+ var _useToolbarPortal, _props$customPrimaryT;
20
22
  var _useState = useState(false),
21
23
  _useState2 = _slicedToArray(_useState, 2),
22
24
  shouldSplitToolbar = _useState2[0],
@@ -25,6 +27,15 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
25
27
 
26
28
  // When primary toolbar components is undefined, do not show two line editor toolbar
27
29
  var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents;
30
+
31
+ // When a toolbar portal context is provided, render the toolbar inside a portal.
32
+ // Otherwise fall back to a fragment just to avoid forking rendering logic.
33
+ var _ref = (_useToolbarPortal = useToolbarPortal()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
34
+ Portal: React.Fragment
35
+ },
36
+ ToolbarPortal = _ref.Portal;
37
+ var hasToolbarPortal = ToolbarPortal !== React.Fragment;
38
+ var popupsMountPoint = hasToolbarPortal && fg('platform_editor_lcm_toolbar_portals') ? undefined : props.popupsMountPoint;
28
39
  var nonCustomToolbar =
29
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
30
41
  jsx("div", {
@@ -38,7 +49,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
38
49
  providerFactory: props.providerFactory,
39
50
  appearance: props.appearance,
40
51
  items: props.primaryToolbarComponents,
41
- popupsMountPoint: props.popupsMountPoint,
52
+ popupsMountPoint: popupsMountPoint,
42
53
  popupsBoundariesElement: props.popupsBoundariesElement,
43
54
  popupsScrollableElement: props.popupsScrollableElement,
44
55
  disabled: props.disabled,
@@ -55,7 +66,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
55
66
  beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
56
67
  }) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
57
68
  popupsBoundariesElement: props.popupsBoundariesElement,
58
- popupsMountPoint: props.popupsMountPoint,
69
+ popupsMountPoint: popupsMountPoint,
59
70
  popupsScrollableElement: props.popupsScrollableElement,
60
71
  editorView: props.editorView,
61
72
  containerElement: props.containerElement,
@@ -90,15 +101,30 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
90
101
  event.preventDefault();
91
102
  event.stopPropagation();
92
103
  };
93
- return jsx(ContextPanelConsumer, null, function (_ref) {
94
- var contextPanelWidth = _ref.width;
104
+ return jsx(ContextPanelConsumer, null, function (_ref2) {
105
+ var contextPanelWidth = _ref2.width;
95
106
  return jsx(ToolbarArrowKeyNavigationProvider, {
96
107
  editorView: props.editorView,
97
108
  childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
98
109
  isShortcutToFocusToolbar: isShortcutToFocusToolbar,
99
110
  handleEscape: handleEscape,
100
111
  intl: props.intl
112
+ }, fg('platform_editor_lcm_toolbar_portals') ? jsx(ToolbarPortal, null, jsx("div", {
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
114
+ css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
115
+ "data-testid": "ak-editor-main-toolbar"
101
116
  }, jsx("div", {
117
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
118
+ css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
119
+ role: "toolbar",
120
+ "aria-label": props.intl.formatMessage(messages.toolbarLabel)
121
+ }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), 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: mainToolbarSecondChildStyle(twoLineEditorToolbar),
124
+ "data-testid": "avatar-group-outside-plugin",
125
+ role: "region",
126
+ "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
127
+ }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), jsx(ToolbarPortalMountPoint, null))) : jsx("div", {
102
128
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
103
129
  css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
104
130
  "data-testid": "ak-editor-main-toolbar"
@@ -110,7 +136,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
110
136
  }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
111
137
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
112
138
  css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
113
- "data-testid": 'avatar-group-outside-plugin',
139
+ "data-testid": "avatar-group-outside-plugin",
114
140
  role: "region",
115
141
  "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
116
142
  }, shouldSplitToolbar ? nonCustomToolbar : customToolbar)));
@@ -83,7 +83,17 @@ export var contentAreaHeightNoToolbar = css({
83
83
  export var sidebarArea = css({
84
84
  height: '100%',
85
85
  boxSizing: 'border-box',
86
- alignSelf: 'flex-end'
86
+ alignSelf: 'flex-end',
87
+ // Make the sidebar sticky within the legacy content macro
88
+ // to prevent it from aligning to the bottom with large content.
89
+ // This style is only applied when opening inside the legacy content macro.
90
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
91
+ '.extension-editable-area &': {
92
+ height: 'auto',
93
+ position: 'sticky',
94
+ top: 0,
95
+ alignSelf: 'flex-start'
96
+ }
87
97
  });
88
98
 
89
99
  // initially hide until we have a containerWidth and can properly size them,
@@ -12,4 +12,4 @@ var dangerOverlayStyles = css({
12
12
  });
13
13
 
14
14
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
15
- export var extensionStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t.multiBodiedExtensionView-content-wrap {\n\t\t&.danger > span > .multiBodiedExtension--container {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t", "\n\n\t\t&.danger > span > .with-danger-overlay {\n\t\t\tbackground-color: transparent;\n\t\t\t.multiBodiedExtension--overlay {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&:not(.danger).", " {\n\t\t\t& > span > .multiBodiedExtension--container {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t\t.multiBodiedExtension--container {\n\t\t\twidth: 100%;\n\t\t\tmax-width: 100%; // ensure width can't go over 100%;\n\t\t}\n\t}\n\n\t.inlineExtensionView-content-wrap {\n\t\t&.danger > span > .extension-container {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t&.danger > span > .with-danger-overlay {\n\t\t\t// If the macro turned used to turn red before, not setting the background to be transparent will cause the\n\t\t\t// danger state to have two layers of red which we don't want.\n\t\t\tbackground-color: transparent;\n\t\t\t.extension-overlay {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&:not(.danger).", " {\n\t\t\t& > span > .extension-container {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t", "\n\t}\n\n\t// This is referenced in the toDOM of a bodied extension and is used to put\n\t// label content into the bodied extension.\n\t// We do this so that we don't serialise the label (which causes the label to be\n\t// be copied to the clipboard causing copy-paste issues).\n\t.bodied-extension-to-dom-label::after {\n\t\tcontent: attr(data-bodied-extension-label);\n\t}\n\n\t.extensionView-content-wrap,\n\t.multiBodiedExtensionView-content-wrap,\n\t.bodiedExtensionView-content-wrap {\n\t\tmargin: ", " 0;\n\n\t\t&:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t&:last-of-type {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t&:not(.danger).", " {\n\t\t\t& > span > .extension-container {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.danger > span > .extension-container {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t", "\n\n\t\t&.danger > span > .with-danger-overlay {\n\t\t\tbackground-color: transparent;\n\t\t\t.extension-overlay {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.inline {\n\t\t\tword-wrap: break-all;\n\t\t}\n\t}\n\n\t.extensionView-content-wrap .extension-container {\n\t\toverflow: hidden;\n\t}\n\n\t.bodiedExtensionView-content-wrap .extensionView-content-wrap .extension-container {\n\t\twidth: 100%;\n\t\tmax-width: 100%; // ensure width can't go over 100%;\n\t}\n\n\t[data-mark-type='fragment'] {\n\t\t& > .extensionView-content-wrap,\n\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\tmargin: ", " 0;\n\t\t}\n\n\t\t& > [data-mark-type='dataConsumer'] {\n\t\t\t& > .extensionView-content-wrap,\n\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\tmargin: ", " 0;\n\t\t\t}\n\t\t}\n\n\t\t&:first-child {\n\t\t\t& > .extensionView-content-wrap,\n\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n\t\t\t& > [data-mark-type='dataConsumer'] {\n\t\t\t\t& > .extensionView-content-wrap,\n\t\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&:nth-last-of-type(-n + 2):not(:first-of-type) {\n\t\t\t& > .extensionView-content-wrap,\n\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\n\t\t\t& > [data-mark-type='dataConsumer'] {\n\t\t\t\t& > .extensionView-content-wrap,\n\t\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), extensionLabelStyles, dangerOverlayStyles, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), dangerOverlayStyles, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), extensionLabelStyles, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), extensionLabelStyles, dangerOverlayStyles, blockNodesVerticalMargin, blockNodesVerticalMargin);
15
+ export var extensionStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t.multiBodiedExtensionView-content-wrap {\n\t\t&.danger > span > .multiBodiedExtension--container {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t", "\n\n\t\t&.danger > span > .with-danger-overlay {\n\t\t\tbackground-color: transparent;\n\t\t\t.multiBodiedExtension--overlay {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&:not(.danger).", " {\n\t\t\t& > span > .multiBodiedExtension--container {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t\t.multiBodiedExtension--container {\n\t\t\twidth: 100%;\n\t\t\tmax-width: 100%; // ensure width can't go over 100%;\n\t\t}\n\t}\n\n\t.inlineExtensionView-content-wrap {\n\t\t&.danger > span > .extension-container {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t&.danger > span > .with-danger-overlay {\n\t\t\t// If the macro turned used to turn red before, not setting the background to be transparent will cause the\n\t\t\t// danger state to have two layers of red which we don't want.\n\t\t\tbackground-color: transparent;\n\t\t\t.extension-overlay {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&:not(.danger).", " {\n\t\t\t& > span > .extension-container {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t", "\n\t}\n\n\t// This is referenced in the toDOM of a bodied extension and is used to put\n\t// label content into the bodied extension.\n\t// We do this so that we don't serialise the label (which causes the label to be\n\t// be copied to the clipboard causing copy-paste issues).\n\t.bodied-extension-to-dom-label::after {\n\t\tcontent: attr(data-bodied-extension-label);\n\t}\n\n\t.extensionView-content-wrap,\n\t.multiBodiedExtensionView-content-wrap,\n\t.bodiedExtensionView-content-wrap {\n\t\tmargin: ", " 0;\n\n\t\t&:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t&:last-of-type {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\t&:not(.danger).", " {\n\t\t\t& > span > .extension-container {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.danger > span > .extension-container {\n\t\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t\t", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\n\t\t", "\n\n\t\t&.danger > span > .with-danger-overlay {\n\t\t\tbackground-color: transparent;\n\t\t\t.extension-overlay {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.inline {\n\t\t\tword-wrap: break-all;\n\t\t}\n\t}\n\n\t.extensionView-content-wrap .extension-container {\n\t\toverflow: hidden;\n\n\t\t/* Don't hide overflow for editors inside extensions */\n\t\t&:has(.extension-editable-area) {\n\t\t\toverflow: visible;\n\t\t}\n\t}\n\n\t.bodiedExtensionView-content-wrap .extensionView-content-wrap .extension-container {\n\t\twidth: 100%;\n\t\tmax-width: 100%; // ensure width can't go over 100%;\n\t}\n\n\t[data-mark-type='fragment'] {\n\t\t& > .extensionView-content-wrap,\n\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\tmargin: ", " 0;\n\t\t}\n\n\t\t& > [data-mark-type='dataConsumer'] {\n\t\t\t& > .extensionView-content-wrap,\n\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\tmargin: ", " 0;\n\t\t\t}\n\t\t}\n\n\t\t&:first-child {\n\t\t\t& > .extensionView-content-wrap,\n\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n\t\t\t& > [data-mark-type='dataConsumer'] {\n\t\t\t\t& > .extensionView-content-wrap,\n\t\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&:nth-last-of-type(-n + 2):not(:first-of-type) {\n\t\t\t& > .extensionView-content-wrap,\n\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\tmargin-bottom: 0;\n\t\t\t}\n\n\t\t\t& > [data-mark-type='dataConsumer'] {\n\t\t\t\t& > .extensionView-content-wrap,\n\t\t\t\t& > .bodiedExtensionView-content-wrap {\n\t\t\t\t\tmargin-bottom: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), extensionLabelStyles, dangerOverlayStyles, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), dangerOverlayStyles, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), extensionLabelStyles, blockNodesVerticalMargin, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow]), akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), extensionLabelStyles, dangerOverlayStyles, blockNodesVerticalMargin, blockNodesVerticalMargin);
@@ -0,0 +1,3 @@
1
+ ._1r04ze3t{inset:var(--ds-space-0,0)}
2
+ ._fiawglyw:empty{display:none}
3
+ ._kqswstnw{position:absolute}
@@ -0,0 +1,41 @@
1
+ /* ToolbarPortal.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import "./ToolbarPortal.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ var ToolbarPortalContext = /*#__PURE__*/React.createContext(undefined);
6
+ export var ToolbarPortalContextProvider = function ToolbarPortalContextProvider(_ref) {
7
+ var children = _ref.children,
8
+ portal = _ref.portal,
9
+ isActive = _ref.isActive;
10
+ var value = React.useMemo(function () {
11
+ return {
12
+ Portal: portal,
13
+ isActive: isActive
14
+ };
15
+ }, [portal, isActive]);
16
+ return /*#__PURE__*/React.createElement(ToolbarPortalContext.Provider, {
17
+ value: value
18
+ }, children);
19
+ };
20
+
21
+ // NOTE: This doesn't throw on undefined context on purpose, as it is likely that
22
+ // the outer toolbar _won't_ have a context provider as it is unlikely to portal
23
+ // anywhere
24
+ export var useToolbarPortal = function useToolbarPortal() {
25
+ return React.useContext(ToolbarPortalContext);
26
+ };
27
+ var toolbarPortalStyles = {
28
+ portal: "_1r04ze3t _kqswstnw _fiawglyw"
29
+ };
30
+ export var ToolbarPortalMountPoint = function ToolbarPortalMountPoint() {
31
+ var portal = useToolbarPortal();
32
+
33
+ // Don't render a mountpoint when we're already inside a portal
34
+ if (portal) {
35
+ return null;
36
+ }
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
38
+ return /*#__PURE__*/React.createElement("div", {
39
+ className: ax([toolbarPortalStyles.portal, "ak-editor-toolbar-portal"])
40
+ });
41
+ };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "203.16.5";
2
+ export var version = "203.17.3";
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
+ export declare const EditorUFOBridge: import("react").MemoExoticComponent<() => jsx.JSX.Element>;
4
+ export declare const EditorPerformanceMetrics: import("react").MemoExoticComponent<() => jsx.JSX.Element>;
@@ -442,7 +442,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
442
442
  commands: {
443
443
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
444
444
  };
445
- }, undefined>>];
445
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
446
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
447
+ actions: {
448
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
449
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
450
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
451
+ };
452
+ sharedState: {
453
+ contents: import("react").ReactNode[] | undefined;
454
+ } | undefined;
455
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
446
456
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
447
457
  actions: {
448
458
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -495,7 +505,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
495
505
  commands: {
496
506
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
497
507
  };
498
- }, undefined>>];
508
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
509
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
510
+ actions: {
511
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
512
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
513
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
514
+ };
515
+ sharedState: {
516
+ contents: import("react").ReactNode[] | undefined;
517
+ } | undefined;
518
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
499
519
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
500
520
  actions: {
501
521
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -676,7 +696,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
676
696
  commands: {
677
697
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
678
698
  };
679
- }, undefined>>];
699
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
700
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
701
+ actions: {
702
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
703
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
704
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
705
+ };
706
+ sharedState: {
707
+ contents: import("react").ReactNode[] | undefined;
708
+ } | undefined;
709
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
680
710
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
681
711
  actions: {
682
712
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -705,7 +735,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
705
735
  }) => (tr: import("prosemirror-state").Transaction) => boolean;
706
736
  };
707
737
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
708
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
738
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
739
+ commands: {
740
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
741
+ };
709
742
  }, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
710
743
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
711
744
  actions: {
@@ -724,7 +757,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
724
757
  }) => void;
725
758
  };
726
759
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
727
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
760
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
761
+ commands: {
762
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
763
+ };
728
764
  }, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
729
765
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
730
766
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -747,7 +783,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
747
783
  commands: {
748
784
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
749
785
  };
750
- }, undefined>>];
786
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
787
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
788
+ actions: {
789
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
790
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
791
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
792
+ };
793
+ sharedState: {
794
+ contents: import("react").ReactNode[] | undefined;
795
+ } | undefined;
796
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
751
797
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
752
798
  actions: {
753
799
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -15,6 +15,7 @@ export { default as WithEditorActions } from './ui/WithEditorActions';
15
15
  */
16
16
  export { default as WithHelpTrigger } from './ui/WithHelpTrigger';
17
17
  export { default as CollapsedEditor } from './ui/CollapsedEditor';
18
+ export { ToolbarPortalContextProvider, useToolbarPortal } from './ui/Toolbar/ToolbarPortal';
18
19
  export { default as ToolbarHelp } from './ui/ToolbarHelp';
19
20
  export {
20
21
  /**
@@ -494,7 +494,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
494
494
  commands: {
495
495
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
496
496
  };
497
- }, undefined>>];
497
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
498
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
499
+ actions: {
500
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
501
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
502
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
503
+ };
504
+ sharedState: {
505
+ contents: import("react").ReactNode[] | undefined;
506
+ } | undefined;
507
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
498
508
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
499
509
  actions: {
500
510
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -547,7 +557,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
547
557
  commands: {
548
558
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
549
559
  };
550
- }, undefined>>];
560
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
561
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
562
+ actions: {
563
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
564
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
565
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
566
+ };
567
+ sharedState: {
568
+ contents: import("react").ReactNode[] | undefined;
569
+ } | undefined;
570
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
551
571
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
552
572
  actions: {
553
573
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -728,7 +748,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
728
748
  commands: {
729
749
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
730
750
  };
731
- }, undefined>>];
751
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
752
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
753
+ actions: {
754
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
755
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
756
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
757
+ };
758
+ sharedState: {
759
+ contents: import("react").ReactNode[] | undefined;
760
+ } | undefined;
761
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
732
762
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
733
763
  actions: {
734
764
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -757,7 +787,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
757
787
  }) => (tr: import("prosemirror-state").Transaction) => boolean;
758
788
  };
759
789
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
760
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
790
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
791
+ commands: {
792
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
793
+ };
761
794
  }, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
762
795
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
763
796
  actions: {
@@ -776,7 +809,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
776
809
  }) => void;
777
810
  };
778
811
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
779
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
812
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
813
+ commands: {
814
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
815
+ };
780
816
  }, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
781
817
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
782
818
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -799,7 +835,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
799
835
  commands: {
800
836
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
801
837
  };
802
- }, undefined>>];
838
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
839
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
840
+ actions: {
841
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
842
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
843
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
844
+ };
845
+ sharedState: {
846
+ contents: import("react").ReactNode[] | undefined;
847
+ } | undefined;
848
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
803
849
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
804
850
  actions: {
805
851
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -442,7 +442,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
442
442
  commands: {
443
443
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
444
444
  };
445
- }, undefined>>];
445
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
446
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
447
+ actions: {
448
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
449
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
450
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
451
+ };
452
+ sharedState: {
453
+ contents: import("react").ReactNode[] | undefined;
454
+ } | undefined;
455
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
446
456
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
447
457
  actions: {
448
458
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -495,7 +505,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
495
505
  commands: {
496
506
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
497
507
  };
498
- }, undefined>>];
508
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
509
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
510
+ actions: {
511
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
512
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
513
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
514
+ };
515
+ sharedState: {
516
+ contents: import("react").ReactNode[] | undefined;
517
+ } | undefined;
518
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
499
519
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
500
520
  actions: {
501
521
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -676,7 +696,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
676
696
  commands: {
677
697
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
678
698
  };
679
- }, undefined>>];
699
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
700
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
701
+ actions: {
702
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
703
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
704
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
705
+ };
706
+ sharedState: {
707
+ contents: import("react").ReactNode[] | undefined;
708
+ } | undefined;
709
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
680
710
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
681
711
  actions: {
682
712
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -705,7 +735,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
705
735
  }) => (tr: import("prosemirror-state").Transaction) => boolean;
706
736
  };
707
737
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
708
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
738
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
739
+ commands: {
740
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
741
+ };
709
742
  }, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
710
743
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
711
744
  actions: {
@@ -724,7 +757,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
724
757
  }) => void;
725
758
  };
726
759
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
727
- sharedState: import("@atlaskit/editor-plugins/history").HistoryPluginState | undefined;
760
+ sharedState: import("packages/editor/editor-plugin-history/dist/types/historyPluginType").HistoryPluginSharedState | undefined;
761
+ commands: {
762
+ updatePluginState: import("@atlaskit/editor-common/types").EditorCommand;
763
+ };
728
764
  }, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
729
765
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
730
766
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -747,7 +783,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
747
783
  commands: {
748
784
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
749
785
  };
750
- }, undefined>>];
786
+ }, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"contextPanel", {
787
+ pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
788
+ actions: {
789
+ applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
790
+ showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
791
+ closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
792
+ };
793
+ sharedState: {
794
+ contents: import("react").ReactNode[] | undefined;
795
+ } | undefined;
796
+ }, import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined>>];
751
797
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
752
798
  actions: {
753
799
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -0,0 +1,6 @@
1
+ import type { ReactComponents } from '../../../types';
2
+ export declare const ignoreAttribute = "data-editor-content-component";
3
+ /**
4
+ * Wraps content components in a data attribute to ignore
5
+ */
6
+ export declare const contentComponentClickWrapper: (reactComponents: ReactComponents | undefined) => ReactComponents | undefined;
@@ -10,4 +10,5 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
10
  */
11
11
  export declare const checkForModal: (target: HTMLElement | null) => boolean;
12
12
  declare const clickAreaClickHandler: (view: EditorView, event: React.MouseEvent<HTMLElement>) => false | undefined;
13
+ export declare const outsideProsemirrorEditorClickHandler: (view: EditorView, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
13
14
  export { clickAreaClickHandler };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ type ToolbarPortalContextValue = {
7
+ Portal: React.ComponentType<{
8
+ children: React.ReactNode;
9
+ }>;
10
+ isActive: boolean;
11
+ };
12
+ export declare const ToolbarPortalContextProvider: ({ children, portal, isActive, }: {
13
+ children: React.ReactNode;
14
+ portal: React.ComponentType<{
15
+ children: React.ReactNode;
16
+ }>;
17
+ isActive: boolean;
18
+ }) => JSX.Element;
19
+ export declare const useToolbarPortal: () => ToolbarPortalContextValue | undefined;
20
+ export declare const ToolbarPortalMountPoint: () => JSX.Element | null;
21
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
+ export declare const EditorUFOBridge: import("react").MemoExoticComponent<() => jsx.JSX.Element>;
4
+ export declare const EditorPerformanceMetrics: import("react").MemoExoticComponent<() => jsx.JSX.Element>;