@atlaskit/editor-core 203.16.4 → 203.17.2

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 +28 -4
  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 +27 -2
  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 +28 -4
  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 +55 -6
  46. package/dist/types/index.d.ts +1 -0
  47. package/dist/types/presets/universal.d.ts +55 -6
  48. package/dist/types/presets/useUniversalPreset.d.ts +55 -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 +59 -6
  54. package/dist/types-ts4.5/index.d.ts +1 -0
  55. package/dist/types-ts4.5/presets/universal.d.ts +59 -6
  56. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +59 -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 +44 -18
  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 _props$customPrimaryT, _useToolbarPortal;
20
22
  var _useState = useState(false),
21
23
  _useState2 = _slicedToArray(_useState, 2),
22
24
  shouldSplitToolbar = _useState2[0],
@@ -90,15 +92,37 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
90
92
  event.preventDefault();
91
93
  event.stopPropagation();
92
94
  };
93
- return jsx(ContextPanelConsumer, null, function (_ref) {
94
- var contextPanelWidth = _ref.width;
95
+
96
+ // When a toolbar portal context is provided, render the toolbar inside a portal.
97
+ // Otherwise fall back to a fragment just to avoid forking rendering logic.
98
+ var _ref = (_useToolbarPortal = useToolbarPortal()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
99
+ Portal: React.Fragment
100
+ },
101
+ ToolbarPortal = _ref.Portal;
102
+ return jsx(ContextPanelConsumer, null, function (_ref2) {
103
+ var contextPanelWidth = _ref2.width;
95
104
  return jsx(ToolbarArrowKeyNavigationProvider, {
96
105
  editorView: props.editorView,
97
106
  childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
98
107
  isShortcutToFocusToolbar: isShortcutToFocusToolbar,
99
108
  handleEscape: handleEscape,
100
109
  intl: props.intl
110
+ }, fg('platform_editor_lcm_toolbar_portals') ? jsx(ToolbarPortal, null, jsx("div", {
111
+ // 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
+ css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
113
+ "data-testid": "ak-editor-main-toolbar"
101
114
  }, jsx("div", {
115
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
116
+ css: mainToolbarFirstChildStyle(twoLineEditorToolbar),
117
+ role: "toolbar",
118
+ "aria-label": props.intl.formatMessage(messages.toolbarLabel)
119
+ }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
120
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
121
+ css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
122
+ "data-testid": "avatar-group-outside-plugin",
123
+ role: "region",
124
+ "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
125
+ }, shouldSplitToolbar ? nonCustomToolbar : customToolbar), jsx(ToolbarPortalMountPoint, null))) : jsx("div", {
102
126
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
103
127
  css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, twoLineEditorToolbar),
104
128
  "data-testid": "ak-editor-main-toolbar"
@@ -110,7 +134,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
110
134
  }, shouldSplitToolbar ? customToolbar : nonCustomToolbar), jsx("div", {
111
135
  // 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
136
  css: mainToolbarSecondChildStyle(twoLineEditorToolbar),
113
- "data-testid": 'avatar-group-outside-plugin',
137
+ "data-testid": "avatar-group-outside-plugin",
114
138
  role: "region",
115
139
  "aria-label": props.intl.formatMessage(messages.pageActionsLabel)
116
140
  }, 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.4";
2
+ export var version = "203.17.2";
@@ -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>;
@@ -413,6 +413,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
413
413
  sharedState: import("@atlaskit/editor-plugins/editor-disabled").EditorDisabledPluginState;
414
414
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"placeholder", {
415
415
  pluginConfiguration: import("@atlaskit/editor-plugins/placeholder").PlaceholderPluginOptions | undefined;
416
+ commands: {
417
+ setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
418
+ };
416
419
  dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
417
420
  sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
418
421
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
@@ -439,7 +442,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
439
442
  commands: {
440
443
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
441
444
  };
442
- }, 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>>];
443
456
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
444
457
  actions: {
445
458
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -492,7 +505,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
492
505
  commands: {
493
506
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
494
507
  };
495
- }, 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>>];
496
519
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
497
520
  actions: {
498
521
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -673,7 +696,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
673
696
  commands: {
674
697
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
675
698
  };
676
- }, 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>>];
677
710
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
678
711
  actions: {
679
712
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -702,7 +735,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
702
735
  }) => (tr: import("prosemirror-state").Transaction) => boolean;
703
736
  };
704
737
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
705
- 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
+ };
706
742
  }, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
707
743
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
708
744
  actions: {
@@ -721,7 +757,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
721
757
  }) => void;
722
758
  };
723
759
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
724
- 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
+ };
725
764
  }, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
726
765
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
727
766
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -744,7 +783,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
744
783
  commands: {
745
784
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
746
785
  };
747
- }, 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>>];
748
797
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
749
798
  actions: {
750
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
  /**
@@ -465,6 +465,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
465
465
  sharedState: import("@atlaskit/editor-plugins/editor-disabled").EditorDisabledPluginState;
466
466
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"placeholder", {
467
467
  pluginConfiguration: import("@atlaskit/editor-plugins/placeholder").PlaceholderPluginOptions | undefined;
468
+ commands: {
469
+ setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
470
+ };
468
471
  dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
469
472
  sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
470
473
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
@@ -491,7 +494,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
491
494
  commands: {
492
495
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
493
496
  };
494
- }, 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>>];
495
508
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
496
509
  actions: {
497
510
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -544,7 +557,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
544
557
  commands: {
545
558
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
546
559
  };
547
- }, 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>>];
548
571
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
549
572
  actions: {
550
573
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -725,7 +748,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
725
748
  commands: {
726
749
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
727
750
  };
728
- }, 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>>];
729
762
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
730
763
  actions: {
731
764
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -754,7 +787,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
754
787
  }) => (tr: import("prosemirror-state").Transaction) => boolean;
755
788
  };
756
789
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
757
- 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
+ };
758
794
  }, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
759
795
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
760
796
  actions: {
@@ -773,7 +809,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
773
809
  }) => void;
774
810
  };
775
811
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
776
- 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
+ };
777
816
  }, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
778
817
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
779
818
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -796,7 +835,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
796
835
  commands: {
797
836
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
798
837
  };
799
- }, 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>>];
800
849
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
801
850
  actions: {
802
851
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -413,6 +413,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
413
413
  sharedState: import("@atlaskit/editor-plugins/editor-disabled").EditorDisabledPluginState;
414
414
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"unsupportedContent", {}, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"placeholder", {
415
415
  pluginConfiguration: import("@atlaskit/editor-plugins/placeholder").PlaceholderPluginOptions | undefined;
416
+ commands: {
417
+ setPlaceholder: (placeholder: string) => import("@atlaskit/editor-common/types").EditorCommand;
418
+ };
416
419
  dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"focus", {
417
420
  sharedState: import("@atlaskit/editor-plugins/focus").FocusState;
418
421
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"composition", {
@@ -439,7 +442,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
439
442
  commands: {
440
443
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
441
444
  };
442
- }, 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>>];
443
456
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
444
457
  actions: {
445
458
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -492,7 +505,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
492
505
  commands: {
493
506
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
494
507
  };
495
- }, 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>>];
496
519
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
497
520
  actions: {
498
521
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -673,7 +696,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
673
696
  commands: {
674
697
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
675
698
  };
676
- }, 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>>];
677
710
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
678
711
  actions: {
679
712
  isOpen: (editorState: import("prosemirror-state").EditorState) => boolean;
@@ -702,7 +735,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
702
735
  }) => (tr: import("prosemirror-state").Transaction) => boolean;
703
736
  };
704
737
  }, import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
705
- 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
+ };
706
742
  }, undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"primaryToolbar", {
707
743
  sharedState: import("@atlaskit/editor-plugins/primary-toolbar").PrimaryToolbarPluginState | undefined;
708
744
  actions: {
@@ -721,7 +757,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
721
757
  }) => void;
722
758
  };
723
759
  }, undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"history", {
724
- 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
+ };
725
764
  }, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"typeAhead", {
726
765
  pluginConfiguration: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginOptions | undefined;
727
766
  dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
@@ -744,7 +783,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
744
783
  commands: {
745
784
  setMode: (mode: import("@atlaskit/editor-plugins/connectivity").Mode | null) => import("@atlaskit/editor-common/types").EditorCommand;
746
785
  };
747
- }, 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>>];
748
797
  sharedState: import("@atlaskit/editor-plugins/type-ahead").TypeAheadPluginSharedState;
749
798
  actions: {
750
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>;