@atlaskit/editor-core 204.5.3 → 204.5.4

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 (29) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/composable-editor/editor-internal.js +2 -1
  3. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +4 -1
  4. package/dist/cjs/ui/Appearance/FullPage/getEditorViewModeSync.js +43 -0
  5. package/dist/cjs/ui/ContentStyles/layout.js +1 -2
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/composable-editor/editor-internal.js +2 -1
  8. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +4 -1
  9. package/dist/es2019/ui/Appearance/FullPage/getEditorViewModeSync.js +33 -0
  10. package/dist/es2019/ui/ContentStyles/layout.js +1 -2
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/composable-editor/editor-internal.js +2 -1
  13. package/dist/esm/ui/Appearance/FullPage/FullPage.js +4 -1
  14. package/dist/esm/ui/Appearance/FullPage/getEditorViewModeSync.js +36 -0
  15. package/dist/esm/ui/ContentStyles/layout.js +1 -2
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/create-editor/create-universal-preset.d.ts +17 -15
  18. package/dist/types/presets/universal.d.ts +17 -15
  19. package/dist/types/presets/useUniversalPreset.d.ts +17 -15
  20. package/dist/types/types/editor-appearance-component.d.ts +2 -0
  21. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -2
  22. package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +3 -0
  23. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +17 -15
  24. package/dist/types-ts4.5/presets/universal.d.ts +17 -15
  25. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +17 -15
  26. package/dist/types-ts4.5/types/editor-appearance-component.d.ts +2 -0
  27. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -2
  28. package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +3 -0
  29. package/package.json +14 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 204.5.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#128779](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128779)
8
+ [`ed8a7f2bc8c46`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed8a7f2bc8c46) -
9
+ Fix delayed initialisation of view mode which causes the toolbar to show unexpectedly in view
10
+ mode.
11
+ - Updated dependencies
12
+
3
13
  ## 204.5.3
4
14
 
5
15
  ### Patch Changes
@@ -137,7 +137,8 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
137
137
  useStickyToolbar: props.useStickyToolbar,
138
138
  featureFlags: featureFlags,
139
139
  pluginHooks: config.pluginHooks,
140
- __livePage: props.__livePage
140
+ __livePage: props.__livePage,
141
+ preset: preset
141
142
  }));
142
143
  }
143
144
  }), (0, _react2.jsx)(PortalRenderer, null), (0, _react2.jsx)(NodeViewPortalRenderer, null)))))));
@@ -13,9 +13,11 @@ var _browser = require("@atlaskit/editor-common/browser");
13
13
  var _hooks = require("@atlaskit/editor-common/hooks");
14
14
  var _ui = require("@atlaskit/editor-common/ui");
15
15
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
17
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
18
  var _FullPageContentArea = require("./FullPageContentArea");
18
19
  var _FullPageToolbar = require("./FullPageToolbar");
20
+ var _getEditorViewModeSync = require("./getEditorViewModeSync");
19
21
  var _StyledComponents = require("./StyledComponents");
20
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -75,12 +77,13 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
75
77
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['editorViewMode', 'primaryToolbar']),
76
78
  editorViewModeState = _useSharedPluginState.editorViewModeState,
77
79
  primaryToolbarState = _useSharedPluginState.primaryToolbarState;
80
+ var viewMode = (0, _getEditorViewModeSync.getEditorViewMode)(editorViewModeState, props.preset);
78
81
  var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
79
82
  var primaryToolbarComponents = props.primaryToolbarComponents;
80
83
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
81
84
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
82
85
  }
83
- var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
86
+ var isEditorToolbarHidden = (0, _platformFeatureFlags.fg)('platform_editor_sync_editor_view_mode_state') ? viewMode === 'view' : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
84
87
  if (props.__livePage && !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control')) {
85
88
  // the custom toolbar logic should only be applied when the experiment cohort is not control,
86
89
  // and the editor is in live page mode.
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getEditorViewMode = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
+ // Retrieve the initial config value from the editor view plugin preset
11
+ var getViewModeSync = function getViewModeSync(preset) {
12
+ var _editorViewModePlugin;
13
+ if (!(0, _platformFeatureFlags.fg)('platform_editor_sync_editor_view_mode_state')) {
14
+ return undefined;
15
+ }
16
+ // @ts-expect-error - data is a private property
17
+ var editorViewModePlugin = preset.data.find(function (p) {
18
+ if (Array.isArray(p)) {
19
+ var _p = (0, _slicedToArray2.default)(p, 2),
20
+ plugin = _p[0],
21
+ config = _p[1];
22
+ return plugin({
23
+ config: config
24
+ }).name === 'editorViewMode';
25
+ } else {
26
+ var _p2;
27
+ return (p === null || p === void 0 || (_p2 = p({
28
+ config: undefined
29
+ })) === null || _p2 === void 0 ? void 0 : _p2.name) === 'editorViewMode';
30
+ }
31
+ });
32
+ // If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
33
+ return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
34
+ };
35
+
36
+ // Temporary to ensure view mode is always set synchronously
37
+ // TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
38
+ var getEditorViewMode = exports.getEditorViewMode = function getEditorViewMode(editorViewModeState, preset) {
39
+ if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
40
+ return getViewModeSync(preset);
41
+ }
42
+ return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
43
+ };
@@ -11,7 +11,6 @@ var _styles = require("@atlaskit/editor-common/styles");
11
11
  var _types = require("@atlaskit/editor-plugins/table/types");
12
12
  var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
15
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
16
  var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
@@ -65,5 +64,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
65
64
 
66
65
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
67
66
  var layoutStyles = exports.layoutStyles = function layoutStyles(viewMode) {
68
- return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// Ignored via go/ees007\n\t\t\t// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) && (0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('nested-dnd', true) && (0, _experiments.editorExperiment)('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
67
+ return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// Ignored via go/ees007\n\t\t\t// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('nested-dnd', true) && (0, _experiments.editorExperiment)('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
69
68
  };
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "204.5.3";
8
+ var version = exports.version = "204.5.4";
@@ -126,7 +126,8 @@ export const EditorInternal = /*#__PURE__*/memo(({
126
126
  useStickyToolbar: props.useStickyToolbar,
127
127
  featureFlags: featureFlags,
128
128
  pluginHooks: config.pluginHooks,
129
- __livePage: props.__livePage
129
+ __livePage: props.__livePage,
130
+ preset: preset
130
131
  }));
131
132
  }
132
133
  }), jsx(PortalRenderer, null), jsx(NodeViewPortalRenderer, null)))))));
@@ -10,9 +10,11 @@ import { browser } from '@atlaskit/editor-common/browser';
10
10
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
11
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
12
12
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
15
  import { FullPageContentArea } from './FullPageContentArea';
15
16
  import { FullPageToolbar } from './FullPageToolbar';
17
+ import { getEditorViewMode } from './getEditorViewModeSync';
16
18
  import { fullPageEditorWrapper } from './StyledComponents';
17
19
  const useShowKeyline = contentAreaRef => {
18
20
  const [showKeyline, setShowKeyline] = useState(false);
@@ -57,12 +59,13 @@ export const FullPageEditor = props => {
57
59
  editorViewModeState,
58
60
  primaryToolbarState
59
61
  } = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar']);
62
+ const viewMode = getEditorViewMode(editorViewModeState, props.preset);
60
63
  const toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
61
64
  let primaryToolbarComponents = props.primaryToolbarComponents;
62
65
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
63
66
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
64
67
  }
65
- let isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
68
+ let isEditorToolbarHidden = fg('platform_editor_sync_editor_view_mode_state') ? viewMode === 'view' : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
66
69
  if (props.__livePage && !editorExperiment('live_pages_graceful_edit', 'control')) {
67
70
  // the custom toolbar logic should only be applied when the experiment cohort is not control,
68
71
  // and the editor is in live page mode.
@@ -0,0 +1,33 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
+ // Retrieve the initial config value from the editor view plugin preset
3
+ const getViewModeSync = preset => {
4
+ var _editorViewModePlugin;
5
+ if (!fg('platform_editor_sync_editor_view_mode_state')) {
6
+ return undefined;
7
+ }
8
+ // @ts-expect-error - data is a private property
9
+ const editorViewModePlugin = preset.data.find(p => {
10
+ if (Array.isArray(p)) {
11
+ const [plugin, config] = p;
12
+ return plugin({
13
+ config
14
+ }).name === 'editorViewMode';
15
+ } else {
16
+ var _p;
17
+ return (p === null || p === void 0 ? void 0 : (_p = p({
18
+ config: undefined
19
+ })) === null || _p === void 0 ? void 0 : _p.name) === 'editorViewMode';
20
+ }
21
+ });
22
+ // If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
23
+ return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
24
+ };
25
+
26
+ // Temporary to ensure view mode is always set synchronously
27
+ // TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
28
+ export const getEditorViewMode = (editorViewModeState, preset) => {
29
+ if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
30
+ return getViewModeSync(preset);
31
+ }
32
+ return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
33
+ };
@@ -4,7 +4,6 @@ import { columnLayoutResponsiveSharedStyle, columnLayoutSharedStyle, LAYOUT_COLU
4
4
  import { TableCssClassName } from '@atlaskit/editor-plugins/table/types';
5
5
  import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
6
6
  import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  const firstNodeWithNotMarginTop = () => editorExperiment('nested-dnd', true) ?
10
9
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
@@ -272,7 +271,7 @@ export const layoutStyles = viewMode => css`
272
271
  // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
273
272
  // TODO: Migrate away from gridSize
274
273
  // Recommendation: Replace directly with 7px
275
- margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (editorExperiment('nested-dnd', true) && fg('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0)}px 0;
274
+ margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (editorExperiment('nested-dnd', true) ? 8 : 0)}px 0;
276
275
  transition: border-color 0.3s ${akEditorSwoopCubicBezier};
277
276
  cursor: ${viewMode === 'view' ? 'default' : 'pointer'};
278
277
 
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "204.5.3";
2
+ export const version = "204.5.4";
@@ -133,7 +133,8 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
133
133
  useStickyToolbar: props.useStickyToolbar,
134
134
  featureFlags: featureFlags,
135
135
  pluginHooks: config.pluginHooks,
136
- __livePage: props.__livePage
136
+ __livePage: props.__livePage,
137
+ preset: preset
137
138
  }));
138
139
  }
139
140
  }), jsx(PortalRenderer, null), jsx(NodeViewPortalRenderer, null)))))));
@@ -11,9 +11,11 @@ import { browser } from '@atlaskit/editor-common/browser';
11
11
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
12
12
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
13
13
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
14
+ import { fg } from '@atlaskit/platform-feature-flags';
14
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
15
16
  import { FullPageContentArea } from './FullPageContentArea';
16
17
  import { FullPageToolbar } from './FullPageToolbar';
18
+ import { getEditorViewMode } from './getEditorViewModeSync';
17
19
  import { fullPageEditorWrapper } from './StyledComponents';
18
20
  var useShowKeyline = function useShowKeyline(contentAreaRef) {
19
21
  var _useState = useState(false),
@@ -64,12 +66,13 @@ export var FullPageEditor = function FullPageEditor(props) {
64
66
  var _useSharedPluginState = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar']),
65
67
  editorViewModeState = _useSharedPluginState.editorViewModeState,
66
68
  primaryToolbarState = _useSharedPluginState.primaryToolbarState;
69
+ var viewMode = getEditorViewMode(editorViewModeState, props.preset);
67
70
  var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
68
71
  var primaryToolbarComponents = props.primaryToolbarComponents;
69
72
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
70
73
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
71
74
  }
72
- var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
75
+ var isEditorToolbarHidden = fg('platform_editor_sync_editor_view_mode_state') ? viewMode === 'view' : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
73
76
  if (props.__livePage && !editorExperiment('live_pages_graceful_edit', 'control')) {
74
77
  // the custom toolbar logic should only be applied when the experiment cohort is not control,
75
78
  // and the editor is in live page mode.
@@ -0,0 +1,36 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
+ // Retrieve the initial config value from the editor view plugin preset
4
+ var getViewModeSync = function getViewModeSync(preset) {
5
+ var _editorViewModePlugin;
6
+ if (!fg('platform_editor_sync_editor_view_mode_state')) {
7
+ return undefined;
8
+ }
9
+ // @ts-expect-error - data is a private property
10
+ var editorViewModePlugin = preset.data.find(function (p) {
11
+ if (Array.isArray(p)) {
12
+ var _p = _slicedToArray(p, 2),
13
+ plugin = _p[0],
14
+ config = _p[1];
15
+ return plugin({
16
+ config: config
17
+ }).name === 'editorViewMode';
18
+ } else {
19
+ var _p2;
20
+ return (p === null || p === void 0 || (_p2 = p({
21
+ config: undefined
22
+ })) === null || _p2 === void 0 ? void 0 : _p2.name) === 'editorViewMode';
23
+ }
24
+ });
25
+ // If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
26
+ return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
27
+ };
28
+
29
+ // Temporary to ensure view mode is always set synchronously
30
+ // TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
31
+ export var getEditorViewMode = function getEditorViewMode(editorViewModeState, preset) {
32
+ if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
33
+ return getViewModeSync(preset);
34
+ }
35
+ return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
36
+ };
@@ -6,7 +6,6 @@ import { columnLayoutResponsiveSharedStyle, columnLayoutSharedStyle, LAYOUT_COLU
6
6
  import { TableCssClassName } from '@atlaskit/editor-plugins/table/types';
7
7
  import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
8
8
  import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
10
  var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
12
11
  return editorExperiment('nested-dnd', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
@@ -59,5 +58,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
59
58
 
60
59
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
61
60
  export var layoutStyles = function layoutStyles(viewMode) {
62
- return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// Ignored via go/ees007\n\t\t\t// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset + (editorExperiment('nested-dnd', true) && fg('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0), akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('nested-dnd', true) && editorExperiment('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
61
+ return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// Ignored via go/ees007\n\t\t\t// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset + (editorExperiment('nested-dnd', true) ? 8 : 0), akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('nested-dnd', true) && editorExperiment('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
63
62
  };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "204.5.3";
2
+ export var version = "204.5.4";
@@ -117,6 +117,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
117
117
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
118
118
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
119
119
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
120
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
120
121
  };
121
122
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
122
123
  pluginConfiguration: import("@atlaskit/editor-plugins/extension").ExtensionPluginOptions | undefined;
@@ -131,9 +132,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
131
132
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
132
133
  actions: {
133
134
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
134
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
135
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
136
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
135
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
136
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
137
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
137
138
  };
138
139
  sharedState: {
139
140
  contents: import("react").ReactNode[] | undefined;
@@ -270,6 +271,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
270
271
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
271
272
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
272
273
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
274
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
273
275
  };
274
276
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"grid", {
275
277
  pluginConfiguration: import("packages/editor/editor-plugin-grid/dist/types/gridPluginType").GridPluginConfiguration;
@@ -449,9 +451,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
449
451
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
450
452
  actions: {
451
453
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
452
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
453
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
454
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
454
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
455
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
456
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
455
457
  };
456
458
  sharedState: {
457
459
  contents: import("react").ReactNode[] | undefined;
@@ -513,9 +515,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
513
515
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
514
516
  actions: {
515
517
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
516
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
517
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
518
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
518
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
519
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
520
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
519
521
  };
520
522
  sharedState: {
521
523
  contents: import("react").ReactNode[] | undefined;
@@ -785,9 +787,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
785
787
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
786
788
  actions: {
787
789
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
788
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
789
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
790
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
790
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
791
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
792
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
791
793
  };
792
794
  sharedState: {
793
795
  contents: import("react").ReactNode[] | undefined;
@@ -877,9 +879,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
877
879
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
878
880
  actions: {
879
881
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
880
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
881
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
882
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
882
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
883
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
884
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
883
885
  };
884
886
  sharedState: {
885
887
  contents: import("react").ReactNode[] | undefined;
@@ -169,6 +169,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
169
169
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
170
170
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
171
171
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
172
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
172
173
  };
173
174
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
174
175
  pluginConfiguration: ExtensionPluginOptions | undefined;
@@ -183,9 +184,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
183
184
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
184
185
  actions: {
185
186
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
186
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
187
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
188
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
187
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
188
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
189
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
189
190
  };
190
191
  sharedState: {
191
192
  contents: import("react").ReactNode[] | undefined;
@@ -322,6 +323,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
322
323
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
323
324
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
324
325
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
326
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
325
327
  };
326
328
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"grid", {
327
329
  pluginConfiguration: import("packages/editor/editor-plugin-grid/dist/types/gridPluginType").GridPluginConfiguration;
@@ -501,9 +503,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
501
503
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
502
504
  actions: {
503
505
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
504
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
505
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
506
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
506
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
507
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
508
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
507
509
  };
508
510
  sharedState: {
509
511
  contents: import("react").ReactNode[] | undefined;
@@ -565,9 +567,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
565
567
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
566
568
  actions: {
567
569
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
568
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
569
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
570
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
570
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
571
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
572
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
571
573
  };
572
574
  sharedState: {
573
575
  contents: import("react").ReactNode[] | undefined;
@@ -837,9 +839,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
837
839
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
838
840
  actions: {
839
841
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
840
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
841
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
842
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
842
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
843
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
844
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
843
845
  };
844
846
  sharedState: {
845
847
  contents: import("react").ReactNode[] | undefined;
@@ -929,9 +931,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
929
931
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
930
932
  actions: {
931
933
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
932
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
933
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
934
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
934
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
935
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
936
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
935
937
  };
936
938
  sharedState: {
937
939
  contents: import("react").ReactNode[] | undefined;
@@ -117,6 +117,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
117
117
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
118
118
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
119
119
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
120
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
120
121
  };
121
122
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
122
123
  pluginConfiguration: import("@atlaskit/editor-plugins/extension").ExtensionPluginOptions | undefined;
@@ -131,9 +132,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
131
132
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
132
133
  actions: {
133
134
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
134
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
135
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
136
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
135
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
136
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
137
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
137
138
  };
138
139
  sharedState: {
139
140
  contents: import("react").ReactNode[] | undefined;
@@ -270,6 +271,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
270
271
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
271
272
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
272
273
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
274
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
273
275
  };
274
276
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"grid", {
275
277
  pluginConfiguration: import("packages/editor/editor-plugin-grid/dist/types/gridPluginType").GridPluginConfiguration;
@@ -449,9 +451,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
449
451
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
450
452
  actions: {
451
453
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
452
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
453
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
454
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
454
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
455
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
456
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
455
457
  };
456
458
  sharedState: {
457
459
  contents: import("react").ReactNode[] | undefined;
@@ -513,9 +515,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
513
515
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
514
516
  actions: {
515
517
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
516
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
517
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
518
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
518
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
519
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
520
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
519
521
  };
520
522
  sharedState: {
521
523
  contents: import("react").ReactNode[] | undefined;
@@ -785,9 +787,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
785
787
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
786
788
  actions: {
787
789
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
788
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
789
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
790
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
790
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
791
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
792
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
791
793
  };
792
794
  sharedState: {
793
795
  contents: import("react").ReactNode[] | undefined;
@@ -877,9 +879,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
877
879
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
878
880
  actions: {
879
881
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
880
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
881
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
882
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
882
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
883
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
884
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
883
885
  };
884
886
  sharedState: {
885
887
  contents: import("react").ReactNode[] | undefined;
@@ -3,6 +3,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
4
4
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
6
+ import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
6
7
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
8
  import type { EditorAppearance, FeatureFlags, NextEditorPlugin, PublicPluginAPI, ReactHookFactory, ToolbarUIComponentFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
8
9
  import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
@@ -14,6 +15,7 @@ export interface EditorAppearanceComponentProps<Plugins extends NextEditorPlugin
14
15
  editorAPI: PublicPluginAPI<Plugins> | undefined;
15
16
  appearance?: EditorAppearance;
16
17
  __livePage?: boolean;
18
+ preset?: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
17
19
  onSave?: (editorView: EditorView) => void;
18
20
  onCancel?: (editorView: EditorView) => void;
19
21
  providerFactory: ProviderFactory;
@@ -5,11 +5,10 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-tool
5
5
  import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
6
6
  import type { EditorAppearanceComponentProps } from '../../../types';
7
7
  import type { ToolbarEditorPlugins } from './FullPageToolbar';
8
- type ComponentProps = EditorAppearanceComponentProps<[
8
+ export type ComponentProps = EditorAppearanceComponentProps<[
9
9
  OptionalPlugin<EditorViewModePlugin>,
10
10
  OptionalPlugin<PrimaryToolbarPlugin>,
11
11
  OptionalPlugin<SelectionToolbarPlugin>,
12
12
  ...ToolbarEditorPlugins
13
13
  ]>;
14
14
  export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
15
- export {};
@@ -0,0 +1,3 @@
1
+ import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
2
+ import type { ComponentProps } from './FullPage';
3
+ export declare const getEditorViewMode: (editorViewModeState: EditorViewModePluginState | undefined | null, preset: ComponentProps['preset']) => ViewMode;
@@ -214,6 +214,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
214
214
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
215
215
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
216
216
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
217
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
217
218
  };
218
219
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined,
219
220
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
@@ -230,9 +231,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
230
231
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
231
232
  actions: {
232
233
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
233
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
234
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
235
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
234
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
235
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
236
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
236
237
  };
237
238
  sharedState: {
238
239
  contents: import("react").ReactNode[] | undefined;
@@ -385,6 +386,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
385
386
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
386
387
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
387
388
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
389
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
388
390
  };
389
391
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined,
390
392
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"grid", {
@@ -613,9 +615,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
613
615
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
614
616
  actions: {
615
617
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
616
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
617
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
618
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
618
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
619
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
620
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
619
621
  };
620
622
  sharedState: {
621
623
  contents: import("react").ReactNode[] | undefined;
@@ -687,9 +689,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
687
689
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
688
690
  actions: {
689
691
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
690
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
691
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
692
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
692
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
693
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
694
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
693
695
  };
694
696
  sharedState: {
695
697
  contents: import("react").ReactNode[] | undefined;
@@ -1004,9 +1006,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
1004
1006
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1005
1007
  actions: {
1006
1008
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1007
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1008
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1009
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
1009
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
1010
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
1011
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
1010
1012
  };
1011
1013
  sharedState: {
1012
1014
  contents: import("react").ReactNode[] | undefined;
@@ -1109,9 +1111,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
1109
1111
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1110
1112
  actions: {
1111
1113
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1112
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1113
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1114
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
1114
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
1115
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
1116
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
1115
1117
  };
1116
1118
  sharedState: {
1117
1119
  contents: import("react").ReactNode[] | undefined;
@@ -266,6 +266,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
266
266
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
267
267
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
268
268
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
269
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
269
270
  };
270
271
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined,
271
272
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
@@ -282,9 +283,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
282
283
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
283
284
  actions: {
284
285
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
285
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
286
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
287
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
286
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
287
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
288
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
288
289
  };
289
290
  sharedState: {
290
291
  contents: import("react").ReactNode[] | undefined;
@@ -437,6 +438,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
437
438
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
438
439
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
439
440
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
441
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
440
442
  };
441
443
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined,
442
444
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"grid", {
@@ -665,9 +667,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
665
667
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
666
668
  actions: {
667
669
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
668
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
669
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
670
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
670
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
671
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
672
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
671
673
  };
672
674
  sharedState: {
673
675
  contents: import("react").ReactNode[] | undefined;
@@ -739,9 +741,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
739
741
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
740
742
  actions: {
741
743
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
742
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
743
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
744
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
744
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
745
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
746
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
745
747
  };
746
748
  sharedState: {
747
749
  contents: import("react").ReactNode[] | undefined;
@@ -1056,9 +1058,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
1056
1058
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1057
1059
  actions: {
1058
1060
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1059
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1060
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1061
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
1061
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
1062
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
1063
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
1062
1064
  };
1063
1065
  sharedState: {
1064
1066
  contents: import("react").ReactNode[] | undefined;
@@ -1161,9 +1163,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
1161
1163
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1162
1164
  actions: {
1163
1165
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1164
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1165
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1166
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
1166
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
1167
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
1168
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
1167
1169
  };
1168
1170
  sharedState: {
1169
1171
  contents: import("react").ReactNode[] | undefined;
@@ -214,6 +214,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
214
214
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
215
215
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
216
216
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
217
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
217
218
  };
218
219
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined,
219
220
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"extension", {
@@ -230,9 +231,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
230
231
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
231
232
  actions: {
232
233
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
233
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
234
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
235
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
234
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
235
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
236
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
236
237
  };
237
238
  sharedState: {
238
239
  contents: import("react").ReactNode[] | undefined;
@@ -385,6 +386,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
385
386
  stripNonExistingAnnotations: (slice: import("prosemirror-model").Slice, state: import("prosemirror-state").EditorState) => boolean | undefined;
386
387
  setInlineCommentDraftState: (drafting: boolean, inputMethod: import("@atlaskit/editor-plugins/annotation").InlineCommentInputMethod, targetType?: import("@atlaskit/editor-plugins/annotation").TargetType | undefined, targetNodeId?: string | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
387
388
  showCommentForBlockNode: (node: import("prosemirror-model").Node | null, viewMethod?: import("@atlaskit/editor-common/analytics").VIEW_METHOD | undefined, isOpeningMediaCommentFromToolbar?: boolean | undefined) => import("@atlaskit/editor-common/types").Command;
389
+ hasAnyUnResolvedAnnotationInPage: (state: import("prosemirror-state").EditorState) => boolean;
388
390
  };
389
391
  }, import("@atlaskit/editor-plugins/annotation").AnnotationProviders | undefined> | undefined,
390
392
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"grid", {
@@ -613,9 +615,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
613
615
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
614
616
  actions: {
615
617
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
616
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
617
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
618
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
618
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
619
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
620
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
619
621
  };
620
622
  sharedState: {
621
623
  contents: import("react").ReactNode[] | undefined;
@@ -687,9 +689,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
687
689
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
688
690
  actions: {
689
691
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
690
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
691
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
692
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
692
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
693
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
694
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
693
695
  };
694
696
  sharedState: {
695
697
  contents: import("react").ReactNode[] | undefined;
@@ -1004,9 +1006,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
1004
1006
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1005
1007
  actions: {
1006
1008
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1007
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1008
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1009
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
1009
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
1010
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
1011
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
1010
1012
  };
1011
1013
  sharedState: {
1012
1014
  contents: import("react").ReactNode[] | undefined;
@@ -1109,9 +1111,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
1109
1111
  pluginConfiguration: import("@atlaskit/editor-plugins/context-panel").ContextPanelPluginOptions | undefined;
1110
1112
  actions: {
1111
1113
  applyChange: (tr: import("prosemirror-state").Transaction) => import("prosemirror-state").Transaction;
1112
- showPanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar;
1113
- closePanel: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar;
1114
- closePanelById: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById;
1114
+ showPanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").ShowObjectSidebar | undefined;
1115
+ closePanel?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebar | undefined;
1116
+ closePanelById?: import("packages/editor/editor-plugin-context-panel/dist/types/types/object-siderbar-types").HideObjectSidebarById | undefined;
1115
1117
  };
1116
1118
  sharedState: {
1117
1119
  contents: import("react").ReactNode[] | undefined;
@@ -3,6 +3,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
4
4
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
6
+ import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
6
7
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
8
  import type { EditorAppearance, FeatureFlags, NextEditorPlugin, PublicPluginAPI, ReactHookFactory, ToolbarUIComponentFactory, UIComponentFactory } from '@atlaskit/editor-common/types';
8
9
  import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
@@ -14,6 +15,7 @@ export interface EditorAppearanceComponentProps<Plugins extends NextEditorPlugin
14
15
  editorAPI: PublicPluginAPI<Plugins> | undefined;
15
16
  appearance?: EditorAppearance;
16
17
  __livePage?: boolean;
18
+ preset?: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
17
19
  onSave?: (editorView: EditorView) => void;
18
20
  onCancel?: (editorView: EditorView) => void;
19
21
  providerFactory: ProviderFactory;
@@ -5,11 +5,10 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-tool
5
5
  import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
6
6
  import type { EditorAppearanceComponentProps } from '../../../types';
7
7
  import type { ToolbarEditorPlugins } from './FullPageToolbar';
8
- type ComponentProps = EditorAppearanceComponentProps<[
8
+ export type ComponentProps = EditorAppearanceComponentProps<[
9
9
  OptionalPlugin<EditorViewModePlugin>,
10
10
  OptionalPlugin<PrimaryToolbarPlugin>,
11
11
  OptionalPlugin<SelectionToolbarPlugin>,
12
12
  ...ToolbarEditorPlugins
13
13
  ]>;
14
14
  export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
15
- export {};
@@ -0,0 +1,3 @@
1
+ import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
2
+ import type { ComponentProps } from './FullPage';
3
+ export declare const getEditorViewMode: (editorViewModeState: EditorViewModePluginState | undefined | null, preset: ComponentProps['preset']) => ViewMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "204.5.3",
3
+ "version": "204.5.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
47
47
  "@atlaskit/button": "^21.1.0",
48
48
  "@atlaskit/css": "^0.10.0",
49
- "@atlaskit/editor-common": "^102.10.0",
49
+ "@atlaskit/editor-common": "^102.11.0",
50
50
  "@atlaskit/editor-json-transformer": "^8.24.0",
51
51
  "@atlaskit/editor-performance-metrics": "^2.0.0",
52
52
  "@atlaskit/editor-plugin-quick-insert": "^2.1.0",
@@ -88,7 +88,7 @@
88
88
  "@af/visual-regression": "^1.3.0",
89
89
  "@atlaskit/adf-utils": "^19.19.0",
90
90
  "@atlaskit/analytics-listeners": "^9.0.0",
91
- "@atlaskit/collab-provider": "^10.9.0",
91
+ "@atlaskit/collab-provider": "^10.10.0",
92
92
  "@atlaskit/editor-plugin-annotation": "^2.1.0",
93
93
  "@atlaskit/editor-plugin-card": "^5.3.0",
94
94
  "@atlaskit/editor-plugin-list": "^4.1.0",
@@ -98,10 +98,10 @@
98
98
  "@atlaskit/media-core": "^35.0.0",
99
99
  "@atlaskit/media-integration-test-helpers": "^4.0.0",
100
100
  "@atlaskit/media-test-helpers": "^35.0.0",
101
- "@atlaskit/modal-dialog": "^13.1.0",
102
- "@atlaskit/primitives": "^14.1.0",
103
- "@atlaskit/renderer": "^114.3.0",
104
- "@atlaskit/smart-card": "^35.2.0",
101
+ "@atlaskit/modal-dialog": "^13.3.0",
102
+ "@atlaskit/primitives": "^14.2.0",
103
+ "@atlaskit/renderer": "^114.4.0",
104
+ "@atlaskit/smart-card": "^36.0.0",
105
105
  "@atlaskit/synchrony-test-helpers": "^3.1.0",
106
106
  "@atlaskit/toggle": "^15.0.0",
107
107
  "@atlaskit/util-data-test": "^18.0.0",
@@ -159,6 +159,9 @@
159
159
  "platform_editor_fe--ufo-bridge": {
160
160
  "type": "boolean"
161
161
  },
162
+ "platform_editor_sync_editor_view_mode_state": {
163
+ "type": "boolean"
164
+ },
162
165
  "annotations_defensive_node_name_calculations": {
163
166
  "type": "boolean",
164
167
  "referenceOnly": "true"
@@ -320,10 +323,6 @@
320
323
  "type": "boolean",
321
324
  "referenceOnly": true
322
325
  },
323
- "platform_editor_advanced_layouts_post_fix_patch_2": {
324
- "type": "boolean",
325
- "referenceOnly": true
326
- },
327
326
  "platform_editor_advanced_layouts_post_fix_patch_3": {
328
327
  "type": "boolean",
329
328
  "referenceOnly": true
@@ -560,6 +559,10 @@
560
559
  "platform_editor_elements_dnd_multi_select_patch_2": {
561
560
  "type": "boolean",
562
561
  "referenceOnly": true
562
+ },
563
+ "platform_editor_scroll_table_flickering_fix": {
564
+ "type": "boolean",
565
+ "referenceOnly": true
563
566
  }
564
567
  },
565
568
  "stricter": {