@atlaskit/editor-core 203.11.8 → 203.11.10

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 (33) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/composable-editor/editor-internal.js +2 -1
  3. package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +1 -11
  4. package/dist/cjs/editor-appearances/FullPageEditor.js +2 -1
  5. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +62 -3
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/composable-editor/editor-internal.js +2 -1
  8. package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +1 -11
  9. package/dist/es2019/editor-appearances/FullPageEditor.js +2 -1
  10. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +64 -5
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/composable-editor/editor-internal.js +2 -1
  13. package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +1 -11
  14. package/dist/esm/editor-appearances/FullPageEditor.js +2 -1
  15. package/dist/esm/ui/Appearance/FullPage/FullPage.js +63 -4
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/create-editor/create-universal-preset.d.ts +4 -0
  18. package/dist/types/editor-appearances/FullPageEditor.d.ts +1 -1
  19. package/dist/types/presets/default.d.ts +8 -0
  20. package/dist/types/presets/universal.d.ts +4 -0
  21. package/dist/types/presets/useUniversalPreset.d.ts +4 -0
  22. package/dist/types/types/editor-appearance-component.d.ts +1 -0
  23. package/dist/types/types/editor-props.d.ts +2 -4
  24. package/dist/types/utils/prepare-quick-insert-provider.d.ts +1 -2
  25. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +4 -0
  26. package/dist/types-ts4.5/editor-appearances/FullPageEditor.d.ts +1 -1
  27. package/dist/types-ts4.5/presets/default.d.ts +8 -0
  28. package/dist/types-ts4.5/presets/universal.d.ts +4 -0
  29. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +4 -0
  30. package/dist/types-ts4.5/types/editor-appearance-component.d.ts +1 -0
  31. package/dist/types-ts4.5/types/editor-props.d.ts +2 -4
  32. package/dist/types-ts4.5/utils/prepare-quick-insert-provider.d.ts +1 -2
  33. package/package.json +16 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 203.11.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#103370](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103370)
8
+ [`c121c95a0cf37`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c121c95a0cf37) -
9
+ Cleanup feature flag enable_datasource_react_sweet_state to always use react sweet state for
10
+ powering datasources
11
+ - [#105400](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105400)
12
+ [`cb3c65a390b04`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cb3c65a390b04) -
13
+ Removing onChangeCalled event as it is spamming GASV3.
14
+ - [#105278](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105278)
15
+ [`3fb1e0a806ca3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3fb1e0a806ca3) -
16
+ [ux] ED-25716 fixes issue with copying media nodes on safari when
17
+ platform_editor_exp_lazy_node_views is enabled
18
+ - Updated dependencies
19
+
20
+ ## 203.11.9
21
+
22
+ ### Patch Changes
23
+
24
+ - [#104847](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104847)
25
+ [`b55fc11242d17`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b55fc11242d17) -
26
+ Consolidate duplicate import statements
27
+
3
28
  ## 203.11.8
4
29
 
5
30
  ### Patch Changes
@@ -135,7 +135,8 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
135
135
  enableToolbarMinWidth: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.toolbarMinWidthOverflow) != null ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.toolbarMinWidthOverflow) : props.allowUndoRedoButtons,
136
136
  useStickyToolbar: props.useStickyToolbar,
137
137
  featureFlags: featureFlags,
138
- pluginHooks: config.pluginHooks
138
+ pluginHooks: config.pluginHooks,
139
+ __livePage: props.__livePage
139
140
  }));
140
141
  }
141
142
  }), (0, _react2.jsx)(PortalRenderer, null), (0, _react2.jsx)(NodeViewPortalRenderer, null)))))));
@@ -54,17 +54,7 @@ var useDispatchTransaction = exports.useDispatchTransaction = function useDispat
54
54
  onChangeRef.current(view, {
55
55
  source: source
56
56
  });
57
- (0, _performanceMeasures.stopMeasure)(_trackTransactions.EVENT_NAME_ON_CHANGE, function (duration, startTime) {
58
- dispatchAnalyticsEvent({
59
- action: _analytics.ACTION.ON_CHANGE_CALLBACK,
60
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
61
- eventType: _analytics.EVENT_TYPE.OPERATIONAL,
62
- attributes: {
63
- duration: duration,
64
- startTime: startTime
65
- }
66
- });
67
- });
57
+ (0, _performanceMeasures.stopMeasure)(_trackTransactions.EVENT_NAME_ON_CHANGE);
68
58
  }
69
59
  } else {
70
60
  var invalidNodes = nodes.filter(function (node) {
@@ -26,6 +26,7 @@ function FullPageEditor(props) {
26
26
  // eslint-disable-next-line react/jsx-props-no-spreading
27
27
  , (0, _extends2.default)({}, props, {
28
28
  appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
29
- AppearanceComponent: _FullPage.FullPageEditor
29
+ AppearanceComponent: _FullPage.FullPageEditor,
30
+ __livePage: props.__livePage
30
31
  }));
31
32
  }
@@ -12,6 +12,7 @@ var _react2 = require("@emotion/react");
12
12
  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
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
16
  var _FullPageContentArea = require("./FullPageContentArea");
16
17
  var _FullPageToolbar = require("./FullPageToolbar");
17
18
  var _StyledComponents = require("./StyledComponents");
@@ -54,7 +55,7 @@ var useShowKeyline = function useShowKeyline(contentAreaRef) {
54
55
  return showKeyline;
55
56
  };
56
57
  var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
57
- var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _wrapperElementRef$cu;
58
+ var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
58
59
  var wrapperElementRef = (0, _react.useMemo)(function () {
59
60
  return props.innerRef;
60
61
  }, [props.innerRef]);
@@ -69,6 +70,23 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
69
70
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
70
71
  }
71
72
  var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
73
+ if (props.__livePage && !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control')) {
74
+ // the custom toolbar logic should only be applied when the experiment cohort is not control,
75
+ // and the editor is in live page mode.
76
+ if (!editorViewModeState) {
77
+ // when first loading the editor, the toolbar should be hidden for all content modes
78
+ // the editorViewMode plugin state is not able to be relied as it will not be setup when
79
+ // the appearance component is being rendered.
80
+ // In this case we set the toolbar to be hidden by default.
81
+ isEditorToolbarHidden = true;
82
+ } else {
83
+ if ((0, _experiments.editorExperiment)('live_pages_graceful_edit', 'initially-hide-toolbar')) {
84
+ // for the initially-hide-toolbar variant, the toolbar should be hidden based on
85
+ // a separate flag in the editorViewMode plugin state.
86
+ isEditorToolbarHidden = !editorViewModeState._showTopToolbar || false;
87
+ }
88
+ }
89
+ }
72
90
  var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
73
91
  return (0, _react2.jsx)(_ui.ContextPanelWidthProvider, null, (0, _react2.jsx)("div", {
74
92
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
@@ -77,7 +95,10 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
77
95
  ,
78
96
  className: "akEditor",
79
97
  ref: wrapperElementRef
80
- }, !isEditorToolbarHidden && (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
98
+ }, !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && (0, _react2.jsx)("div", {
99
+ css: hiddenStyle,
100
+ "data-hidden": isEditorToolbarHidden
101
+ }, (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
81
102
  appearance: props.appearance,
82
103
  editorAPI: editorAPI,
83
104
  beforeIcon: props.primaryToolbarIconBefore,
@@ -104,6 +125,33 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
104
125
  providerFactory: props.providerFactory,
105
126
  showKeyline: showKeyline,
106
127
  featureFlags: props.featureFlags
128
+ })), (0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') && !isEditorToolbarHidden && (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
129
+ appearance: props.appearance,
130
+ editorAPI: editorAPI,
131
+ beforeIcon: props.primaryToolbarIconBefore,
132
+ collabEdit: props.collabEdit,
133
+ containerElement: (_scrollContentContain4 = (_scrollContentContain5 = scrollContentContainerRef.current) === null || _scrollContentContain5 === void 0 ? void 0 : _scrollContentContain5.scrollContainer) !== null && _scrollContentContain4 !== void 0 ? _scrollContentContain4 : null,
134
+ customPrimaryToolbarComponents: props.customPrimaryToolbarComponents,
135
+ disabled: !!props.disabled,
136
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
137
+ editorActions: props.editorActions,
138
+ editorDOMElement: props.editorDOMElement
139
+ // Ignored via go/ees005
140
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
141
+ ,
142
+ editorView: props.editorView
143
+ // Ignored via go/ees005
144
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
145
+ ,
146
+ eventDispatcher: props.eventDispatcher,
147
+ hasMinWidth: props.enableToolbarMinWidth,
148
+ popupsBoundariesElement: props.popupsBoundariesElement,
149
+ popupsMountPoint: props.popupsMountPoint,
150
+ popupsScrollableElement: props.popupsScrollableElement,
151
+ primaryToolbarComponents: primaryToolbarComponents,
152
+ providerFactory: props.providerFactory,
153
+ showKeyline: showKeyline,
154
+ featureFlags: props.featureFlags
107
155
  }), (0, _react2.jsx)(_FullPageContentArea.FullPageContentArea, {
108
156
  editorAPI: editorAPI,
109
157
  ref: scrollContentContainerRef,
@@ -130,4 +178,15 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
130
178
  isEditorToolbarHidden: isEditorToolbarHidden,
131
179
  viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
132
180
  })));
133
- };
181
+ };
182
+ var hiddenStyle = (0, _react2.css)({
183
+ visibility: 'visible',
184
+ opacity: 1,
185
+ transition: '200ms opacity, 200ms visibility, 200ms transform',
186
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
187
+ '&[data-hidden="true"]': {
188
+ visibility: 'hidden',
189
+ opacity: 0
190
+ // transition: '0ms opacity, 0ms visibility, 0ms transform',
191
+ }
192
+ });
@@ -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 = "203.11.8";
8
+ var version = exports.version = "203.11.10";
@@ -124,7 +124,8 @@ export const EditorInternal = /*#__PURE__*/memo(({
124
124
  enableToolbarMinWidth: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.toolbarMinWidthOverflow) != null ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.toolbarMinWidthOverflow) : props.allowUndoRedoButtons,
125
125
  useStickyToolbar: props.useStickyToolbar,
126
126
  featureFlags: featureFlags,
127
- pluginHooks: config.pluginHooks
127
+ pluginHooks: config.pluginHooks,
128
+ __livePage: props.__livePage
128
129
  }));
129
130
  }
130
131
  }), jsx(PortalRenderer, null), jsx(NodeViewPortalRenderer, null)))))));
@@ -50,17 +50,7 @@ export const useDispatchTransaction = ({
50
50
  onChangeRef.current(view, {
51
51
  source
52
52
  });
53
- stopMeasure(EVENT_NAME_ON_CHANGE, (duration, startTime) => {
54
- dispatchAnalyticsEvent({
55
- action: ACTION.ON_CHANGE_CALLBACK,
56
- actionSubject: ACTION_SUBJECT.EDITOR,
57
- eventType: EVENT_TYPE.OPERATIONAL,
58
- attributes: {
59
- duration,
60
- startTime
61
- }
62
- });
63
- });
53
+ stopMeasure(EVENT_NAME_ON_CHANGE);
64
54
  }
65
55
  } else {
66
56
  const invalidNodes = nodes.filter(node => !validNode(node)).map(node => getDocStructure(node, {
@@ -19,6 +19,7 @@ export function FullPageEditor(props) {
19
19
  // eslint-disable-next-line react/jsx-props-no-spreading
20
20
  , _extends({}, props, {
21
21
  appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
22
- AppearanceComponent: FullPage
22
+ AppearanceComponent: FullPage,
23
+ __livePage: props.__livePage
23
24
  }));
24
25
  }
@@ -5,10 +5,11 @@
5
5
  import React, { useEffect, useMemo, useRef, useState } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { jsx } from '@emotion/react';
8
+ import { jsx, css } from '@emotion/react';
9
9
  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
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
13
  import { FullPageContentArea } from './FullPageContentArea';
13
14
  import { FullPageToolbar } from './FullPageToolbar';
14
15
  import { fullPageEditorWrapper } from './StyledComponents';
@@ -37,7 +38,7 @@ const useShowKeyline = contentAreaRef => {
37
38
  return showKeyline;
38
39
  };
39
40
  export const FullPageEditor = props => {
40
- var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _wrapperElementRef$cu;
41
+ var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
41
42
  const wrapperElementRef = useMemo(() => props.innerRef, [props.innerRef]);
42
43
  const scrollContentContainerRef = useRef(null);
43
44
  const showKeyline = useShowKeyline(scrollContentContainerRef);
@@ -50,7 +51,24 @@ export const FullPageEditor = props => {
50
51
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
51
52
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
52
53
  }
53
- const isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
54
+ let isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
55
+ if (props.__livePage && !editorExperiment('live_pages_graceful_edit', 'control')) {
56
+ // the custom toolbar logic should only be applied when the experiment cohort is not control,
57
+ // and the editor is in live page mode.
58
+ if (!editorViewModeState) {
59
+ // when first loading the editor, the toolbar should be hidden for all content modes
60
+ // the editorViewMode plugin state is not able to be relied as it will not be setup when
61
+ // the appearance component is being rendered.
62
+ // In this case we set the toolbar to be hidden by default.
63
+ isEditorToolbarHidden = true;
64
+ } else {
65
+ if (editorExperiment('live_pages_graceful_edit', 'initially-hide-toolbar')) {
66
+ // for the initially-hide-toolbar variant, the toolbar should be hidden based on
67
+ // a separate flag in the editorViewMode plugin state.
68
+ isEditorToolbarHidden = !editorViewModeState._showTopToolbar || false;
69
+ }
70
+ }
71
+ }
54
72
  const popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 ? void 0 : (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
55
73
  return jsx(ContextPanelWidthProvider, null, jsx("div", {
56
74
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
@@ -59,7 +77,10 @@ export const FullPageEditor = props => {
59
77
  ,
60
78
  className: "akEditor",
61
79
  ref: wrapperElementRef
62
- }, !isEditorToolbarHidden && jsx(FullPageToolbar, {
80
+ }, !editorExperiment('live_pages_graceful_edit', 'control') && jsx("div", {
81
+ css: hiddenStyle,
82
+ "data-hidden": isEditorToolbarHidden
83
+ }, jsx(FullPageToolbar, {
63
84
  appearance: props.appearance,
64
85
  editorAPI: editorAPI,
65
86
  beforeIcon: props.primaryToolbarIconBefore,
@@ -86,6 +107,33 @@ export const FullPageEditor = props => {
86
107
  providerFactory: props.providerFactory,
87
108
  showKeyline: showKeyline,
88
109
  featureFlags: props.featureFlags
110
+ })), editorExperiment('live_pages_graceful_edit', 'control') && !isEditorToolbarHidden && jsx(FullPageToolbar, {
111
+ appearance: props.appearance,
112
+ editorAPI: editorAPI,
113
+ beforeIcon: props.primaryToolbarIconBefore,
114
+ collabEdit: props.collabEdit,
115
+ containerElement: (_scrollContentContain4 = (_scrollContentContain5 = scrollContentContainerRef.current) === null || _scrollContentContain5 === void 0 ? void 0 : _scrollContentContain5.scrollContainer) !== null && _scrollContentContain4 !== void 0 ? _scrollContentContain4 : null,
116
+ customPrimaryToolbarComponents: props.customPrimaryToolbarComponents,
117
+ disabled: !!props.disabled,
118
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
119
+ editorActions: props.editorActions,
120
+ editorDOMElement: props.editorDOMElement
121
+ // Ignored via go/ees005
122
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
123
+ ,
124
+ editorView: props.editorView
125
+ // Ignored via go/ees005
126
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
127
+ ,
128
+ eventDispatcher: props.eventDispatcher,
129
+ hasMinWidth: props.enableToolbarMinWidth,
130
+ popupsBoundariesElement: props.popupsBoundariesElement,
131
+ popupsMountPoint: props.popupsMountPoint,
132
+ popupsScrollableElement: props.popupsScrollableElement,
133
+ primaryToolbarComponents: primaryToolbarComponents,
134
+ providerFactory: props.providerFactory,
135
+ showKeyline: showKeyline,
136
+ featureFlags: props.featureFlags
89
137
  }), jsx(FullPageContentArea, {
90
138
  editorAPI: editorAPI,
91
139
  ref: scrollContentContainerRef,
@@ -112,4 +160,15 @@ export const FullPageEditor = props => {
112
160
  isEditorToolbarHidden: isEditorToolbarHidden,
113
161
  viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
114
162
  })));
115
- };
163
+ };
164
+ const hiddenStyle = css({
165
+ visibility: 'visible',
166
+ opacity: 1,
167
+ transition: '200ms opacity, 200ms visibility, 200ms transform',
168
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
169
+ '&[data-hidden="true"]': {
170
+ visibility: 'hidden',
171
+ opacity: 0
172
+ // transition: '0ms opacity, 0ms visibility, 0ms transform',
173
+ }
174
+ });
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "203.11.8";
2
+ export const version = "203.11.10";
@@ -131,7 +131,8 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
131
131
  enableToolbarMinWidth: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.toolbarMinWidthOverflow) != null ? !!((_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.toolbarMinWidthOverflow) : props.allowUndoRedoButtons,
132
132
  useStickyToolbar: props.useStickyToolbar,
133
133
  featureFlags: featureFlags,
134
- pluginHooks: config.pluginHooks
134
+ pluginHooks: config.pluginHooks,
135
+ __livePage: props.__livePage
135
136
  }));
136
137
  }
137
138
  }), jsx(PortalRenderer, null), jsx(NodeViewPortalRenderer, null)))))));
@@ -48,17 +48,7 @@ export var useDispatchTransaction = function useDispatchTransaction(_ref) {
48
48
  onChangeRef.current(view, {
49
49
  source: source
50
50
  });
51
- stopMeasure(EVENT_NAME_ON_CHANGE, function (duration, startTime) {
52
- dispatchAnalyticsEvent({
53
- action: ACTION.ON_CHANGE_CALLBACK,
54
- actionSubject: ACTION_SUBJECT.EDITOR,
55
- eventType: EVENT_TYPE.OPERATIONAL,
56
- attributes: {
57
- duration: duration,
58
- startTime: startTime
59
- }
60
- });
61
- });
51
+ stopMeasure(EVENT_NAME_ON_CHANGE);
62
52
  }
63
53
  } else {
64
54
  var invalidNodes = nodes.filter(function (node) {
@@ -19,6 +19,7 @@ export function FullPageEditor(props) {
19
19
  // eslint-disable-next-line react/jsx-props-no-spreading
20
20
  , _extends({}, props, {
21
21
  appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
22
- AppearanceComponent: FullPage
22
+ AppearanceComponent: FullPage,
23
+ __livePage: props.__livePage
23
24
  }));
24
25
  }
@@ -6,10 +6,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
6
  import React, { useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx } from '@emotion/react';
9
+ import { jsx, css } from '@emotion/react';
10
10
  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
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
14
  import { FullPageContentArea } from './FullPageContentArea';
14
15
  import { FullPageToolbar } from './FullPageToolbar';
15
16
  import { fullPageEditorWrapper } from './StyledComponents';
@@ -43,7 +44,7 @@ var useShowKeyline = function useShowKeyline(contentAreaRef) {
43
44
  return showKeyline;
44
45
  };
45
46
  export var FullPageEditor = function FullPageEditor(props) {
46
- var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _wrapperElementRef$cu;
47
+ var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
47
48
  var wrapperElementRef = useMemo(function () {
48
49
  return props.innerRef;
49
50
  }, [props.innerRef]);
@@ -58,6 +59,23 @@ export var FullPageEditor = function FullPageEditor(props) {
58
59
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
59
60
  }
60
61
  var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
62
+ if (props.__livePage && !editorExperiment('live_pages_graceful_edit', 'control')) {
63
+ // the custom toolbar logic should only be applied when the experiment cohort is not control,
64
+ // and the editor is in live page mode.
65
+ if (!editorViewModeState) {
66
+ // when first loading the editor, the toolbar should be hidden for all content modes
67
+ // the editorViewMode plugin state is not able to be relied as it will not be setup when
68
+ // the appearance component is being rendered.
69
+ // In this case we set the toolbar to be hidden by default.
70
+ isEditorToolbarHidden = true;
71
+ } else {
72
+ if (editorExperiment('live_pages_graceful_edit', 'initially-hide-toolbar')) {
73
+ // for the initially-hide-toolbar variant, the toolbar should be hidden based on
74
+ // a separate flag in the editorViewMode plugin state.
75
+ isEditorToolbarHidden = !editorViewModeState._showTopToolbar || false;
76
+ }
77
+ }
78
+ }
61
79
  var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
62
80
  return jsx(ContextPanelWidthProvider, null, jsx("div", {
63
81
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
@@ -66,7 +84,10 @@ export var FullPageEditor = function FullPageEditor(props) {
66
84
  ,
67
85
  className: "akEditor",
68
86
  ref: wrapperElementRef
69
- }, !isEditorToolbarHidden && jsx(FullPageToolbar, {
87
+ }, !editorExperiment('live_pages_graceful_edit', 'control') && jsx("div", {
88
+ css: hiddenStyle,
89
+ "data-hidden": isEditorToolbarHidden
90
+ }, jsx(FullPageToolbar, {
70
91
  appearance: props.appearance,
71
92
  editorAPI: editorAPI,
72
93
  beforeIcon: props.primaryToolbarIconBefore,
@@ -93,6 +114,33 @@ export var FullPageEditor = function FullPageEditor(props) {
93
114
  providerFactory: props.providerFactory,
94
115
  showKeyline: showKeyline,
95
116
  featureFlags: props.featureFlags
117
+ })), editorExperiment('live_pages_graceful_edit', 'control') && !isEditorToolbarHidden && jsx(FullPageToolbar, {
118
+ appearance: props.appearance,
119
+ editorAPI: editorAPI,
120
+ beforeIcon: props.primaryToolbarIconBefore,
121
+ collabEdit: props.collabEdit,
122
+ containerElement: (_scrollContentContain4 = (_scrollContentContain5 = scrollContentContainerRef.current) === null || _scrollContentContain5 === void 0 ? void 0 : _scrollContentContain5.scrollContainer) !== null && _scrollContentContain4 !== void 0 ? _scrollContentContain4 : null,
123
+ customPrimaryToolbarComponents: props.customPrimaryToolbarComponents,
124
+ disabled: !!props.disabled,
125
+ dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
126
+ editorActions: props.editorActions,
127
+ editorDOMElement: props.editorDOMElement
128
+ // Ignored via go/ees005
129
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
130
+ ,
131
+ editorView: props.editorView
132
+ // Ignored via go/ees005
133
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
134
+ ,
135
+ eventDispatcher: props.eventDispatcher,
136
+ hasMinWidth: props.enableToolbarMinWidth,
137
+ popupsBoundariesElement: props.popupsBoundariesElement,
138
+ popupsMountPoint: props.popupsMountPoint,
139
+ popupsScrollableElement: props.popupsScrollableElement,
140
+ primaryToolbarComponents: primaryToolbarComponents,
141
+ providerFactory: props.providerFactory,
142
+ showKeyline: showKeyline,
143
+ featureFlags: props.featureFlags
96
144
  }), jsx(FullPageContentArea, {
97
145
  editorAPI: editorAPI,
98
146
  ref: scrollContentContainerRef,
@@ -119,4 +167,15 @@ export var FullPageEditor = function FullPageEditor(props) {
119
167
  isEditorToolbarHidden: isEditorToolbarHidden,
120
168
  viewMode: editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode
121
169
  })));
122
- };
170
+ };
171
+ var hiddenStyle = css({
172
+ visibility: 'visible',
173
+ opacity: 1,
174
+ transition: '200ms opacity, 200ms visibility, 200ms transform',
175
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
176
+ '&[data-hidden="true"]': {
177
+ visibility: 'hidden',
178
+ opacity: 0
179
+ // transition: '0ms opacity, 0ms visibility, 0ms transform',
180
+ }
181
+ });
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "203.11.8";
2
+ export var version = "203.11.10";
@@ -362,6 +362,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
362
362
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
363
363
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
364
364
  }, import("@atlaskit/editor-common/types").FeatureFlags>>];
365
+ sharedState: {
366
+ copyButtonHoverNode: import("prosemirror-model").Node;
367
+ } | undefined;
365
368
  actions: {
366
369
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
367
370
  };
@@ -598,6 +601,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
598
601
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
599
602
  commands: {
600
603
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
604
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
601
605
  };
602
606
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>];
603
607
  actions?: {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type EditorNextProps } from '../types/editor-props';
3
- export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'performanceTracking' | 'contextIdentifierProvider' | 'searchProvider' | 'activityProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent'> & {
3
+ export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'performanceTracking' | 'contextIdentifierProvider' | 'searchProvider' | 'activityProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent' | '__livePage'> & {
4
4
  onChange?: () => void;
5
5
  onEditorReady?: () => void;
6
6
  appearance: 'full-page' | 'full-width';
@@ -73,6 +73,9 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
73
73
  pluginConfiguration: FeatureFlags;
74
74
  sharedState: FeatureFlags;
75
75
  }, FeatureFlags>>];
76
+ sharedState: {
77
+ copyButtonHoverNode: import("prosemirror-model").Node;
78
+ } | undefined;
76
79
  actions: {
77
80
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
78
81
  };
@@ -309,6 +312,7 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
309
312
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
310
313
  commands: {
311
314
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
315
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
312
316
  };
313
317
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>];
314
318
  actions?: {
@@ -555,6 +559,9 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
555
559
  pluginConfiguration: FeatureFlags;
556
560
  sharedState: FeatureFlags;
557
561
  }, FeatureFlags>>];
562
+ sharedState: {
563
+ copyButtonHoverNode: import("prosemirror-model").Node;
564
+ } | undefined;
558
565
  actions: {
559
566
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
560
567
  };
@@ -791,6 +798,7 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
791
798
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
792
799
  commands: {
793
800
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
801
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
794
802
  };
795
803
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>];
796
804
  actions?: {
@@ -414,6 +414,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
414
414
  pluginConfiguration: FeatureFlags;
415
415
  sharedState: FeatureFlags;
416
416
  }, FeatureFlags>>];
417
+ sharedState: {
418
+ copyButtonHoverNode: import("prosemirror-model").Node;
419
+ } | undefined;
417
420
  actions: {
418
421
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
419
422
  };
@@ -650,6 +653,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
650
653
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
651
654
  commands: {
652
655
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
656
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
653
657
  };
654
658
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>];
655
659
  actions?: {
@@ -362,6 +362,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
362
362
  pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
363
363
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
364
364
  }, import("@atlaskit/editor-common/types").FeatureFlags>>];
365
+ sharedState: {
366
+ copyButtonHoverNode: import("prosemirror-model").Node;
367
+ } | undefined;
365
368
  actions: {
366
369
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
367
370
  };
@@ -598,6 +601,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
598
601
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
599
602
  commands: {
600
603
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
604
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
601
605
  };
602
606
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>];
603
607
  actions?: {
@@ -13,6 +13,7 @@ import type { ContentComponents, PrimaryToolbarComponents, ReactComponents } fro
13
13
  export interface EditorAppearanceComponentProps<Plugins extends NextEditorPlugin<any, any>[]> {
14
14
  editorAPI: PublicPluginAPI<Plugins> | undefined;
15
15
  appearance?: EditorAppearance;
16
+ __livePage?: boolean;
16
17
  onSave?: (editorView: EditorView) => void;
17
18
  onCancel?: (editorView: EditorView) => void;
18
19
  providerFactory: ProviderFactory;
@@ -116,11 +116,9 @@ interface EditorBaseProps {
116
116
  [featureFlag: string]: string | boolean;
117
117
  };
118
118
  /**
119
- * There is expected to be temporary divergence between Live Page editor expand behaviour and the standard expand behaviour.
119
+ * This is required for accessing whether a page is a live page or not when rendering the appearance component.
120
120
  *
121
- * This is expected to be removed in Q4 as Editor and Live Page teams align on a singular behaviour.
122
- *
123
- * It is only supported for use by Confluence.
121
+ * All other consumers should use the editorViewModePlugin to access live page and content mode status.
124
122
  *
125
123
  * @default false
126
124
  */
@@ -2,8 +2,7 @@
2
2
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
3
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
4
4
  import type { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
5
- import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
6
- import { type PublicPluginAPI } from '@atlaskit/editor-common/types';
5
+ import type { QuickInsertOptions, PublicPluginAPI } from '@atlaskit/editor-common/types';
7
6
  import type { ExtensionPlugin } from '@atlaskit/editor-plugins/extension';
8
7
  import type EditorActions from '../actions';
9
8
  /**
@@ -506,6 +506,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
506
506
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
507
507
  }, import("@atlaskit/editor-common/types").FeatureFlags>>
508
508
  ];
509
+ sharedState: {
510
+ copyButtonHoverNode: import("prosemirror-model").Node;
511
+ } | undefined;
509
512
  actions: {
510
513
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
511
514
  };
@@ -788,6 +791,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
788
791
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
789
792
  commands: {
790
793
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
794
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
791
795
  };
792
796
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>
793
797
  ];
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type EditorNextProps } from '../types/editor-props';
3
- export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'performanceTracking' | 'contextIdentifierProvider' | 'searchProvider' | 'activityProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent'> & {
3
+ export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'performanceTracking' | 'contextIdentifierProvider' | 'searchProvider' | 'activityProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent' | '__livePage'> & {
4
4
  onChange?: () => void;
5
5
  onEditorReady?: () => void;
6
6
  appearance: 'full-page' | 'full-width';
@@ -112,6 +112,9 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
112
112
  sharedState: FeatureFlags;
113
113
  }, FeatureFlags>>
114
114
  ];
115
+ sharedState: {
116
+ copyButtonHoverNode: import("prosemirror-model").Node;
117
+ } | undefined;
115
118
  actions: {
116
119
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
117
120
  };
@@ -394,6 +397,7 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
394
397
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
395
398
  commands: {
396
399
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
400
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
397
401
  };
398
402
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>
399
403
  ];
@@ -723,6 +727,9 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
723
727
  sharedState: FeatureFlags;
724
728
  }, FeatureFlags>>
725
729
  ];
730
+ sharedState: {
731
+ copyButtonHoverNode: import("prosemirror-model").Node;
732
+ } | undefined;
726
733
  actions: {
727
734
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
728
735
  };
@@ -1005,6 +1012,7 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
1005
1012
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
1006
1013
  commands: {
1007
1014
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
1015
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
1008
1016
  };
1009
1017
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>
1010
1018
  ];
@@ -558,6 +558,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
558
558
  sharedState: FeatureFlags;
559
559
  }, FeatureFlags>>
560
560
  ];
561
+ sharedState: {
562
+ copyButtonHoverNode: import("prosemirror-model").Node;
563
+ } | undefined;
561
564
  actions: {
562
565
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
563
566
  };
@@ -840,6 +843,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
840
843
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
841
844
  commands: {
842
845
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
846
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
843
847
  };
844
848
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>
845
849
  ];
@@ -506,6 +506,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
506
506
  sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
507
507
  }, import("@atlaskit/editor-common/types").FeatureFlags>>
508
508
  ];
509
+ sharedState: {
510
+ copyButtonHoverNode: import("prosemirror-model").Node;
511
+ } | undefined;
509
512
  actions: {
510
513
  insertCodeBlock: (inputMethod: import("@atlaskit/editor-common/analytics").INPUT_METHOD) => import("@atlaskit/editor-common/types").Command;
511
514
  };
@@ -788,6 +791,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
788
791
  pluginConfiguration?: import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined;
789
792
  commands: {
790
793
  updateViewMode: (mode: import("@atlaskit/editor-plugins/editor-viewmode").ViewMode) => import("@atlaskit/editor-common/types").EditorCommand;
794
+ updateContentMode: (action: import("packages/editor/editor-plugin-editor-viewmode/dist/types/editorViewmodePluginType").UpdateContentModeAction) => import("@atlaskit/editor-common/types").EditorCommand;
791
795
  };
792
796
  }, import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePluginConfig | undefined>>
793
797
  ];
@@ -13,6 +13,7 @@ import type { ContentComponents, PrimaryToolbarComponents, ReactComponents } fro
13
13
  export interface EditorAppearanceComponentProps<Plugins extends NextEditorPlugin<any, any>[]> {
14
14
  editorAPI: PublicPluginAPI<Plugins> | undefined;
15
15
  appearance?: EditorAppearance;
16
+ __livePage?: boolean;
16
17
  onSave?: (editorView: EditorView) => void;
17
18
  onCancel?: (editorView: EditorView) => void;
18
19
  providerFactory: ProviderFactory;
@@ -116,11 +116,9 @@ interface EditorBaseProps {
116
116
  [featureFlag: string]: string | boolean;
117
117
  };
118
118
  /**
119
- * There is expected to be temporary divergence between Live Page editor expand behaviour and the standard expand behaviour.
119
+ * This is required for accessing whether a page is a live page or not when rendering the appearance component.
120
120
  *
121
- * This is expected to be removed in Q4 as Editor and Live Page teams align on a singular behaviour.
122
- *
123
- * It is only supported for use by Confluence.
121
+ * All other consumers should use the editorViewModePlugin to access live page and content mode status.
124
122
  *
125
123
  * @default false
126
124
  */
@@ -2,8 +2,7 @@
2
2
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
3
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
4
4
  import type { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
5
- import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
6
- import { type PublicPluginAPI } from '@atlaskit/editor-common/types';
5
+ import type { QuickInsertOptions, PublicPluginAPI } from '@atlaskit/editor-common/types';
7
6
  import type { ExtensionPlugin } from '@atlaskit/editor-plugins/extension';
8
7
  import type EditorActions from '../actions';
9
8
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "203.11.8",
3
+ "version": "203.11.10",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,10 +43,10 @@
43
43
  "@atlaskit/analytics-next": "^10.2.0",
44
44
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
45
45
  "@atlaskit/button": "^20.3.0",
46
- "@atlaskit/editor-common": "^99.4.0",
46
+ "@atlaskit/editor-common": "^99.5.0",
47
47
  "@atlaskit/editor-json-transformer": "^8.21.0",
48
48
  "@atlaskit/editor-plugin-quick-insert": "1.8.3",
49
- "@atlaskit/editor-plugins": "^6.4.0",
49
+ "@atlaskit/editor-plugins": "^7.0.0",
50
50
  "@atlaskit/editor-prosemirror": "6.2.1",
51
51
  "@atlaskit/editor-shared-styles": "^3.2.0",
52
52
  "@atlaskit/emoji": "^67.12.0",
@@ -55,8 +55,8 @@
55
55
  "@atlaskit/mention": "^23.9.0",
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/task-decision": "^17.11.0",
58
- "@atlaskit/tmp-editor-statsig": "^2.38.0",
59
- "@atlaskit/tokens": "^3.1.0",
58
+ "@atlaskit/tmp-editor-statsig": "^2.39.0",
59
+ "@atlaskit/tokens": "^3.2.0",
60
60
  "@atlaskit/tooltip": "^19.0.0",
61
61
  "@atlaskit/width-detector": "^4.3.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/adf-utils": "^19.17.0",
85
85
  "@atlaskit/analytics-listeners": "^8.13.0",
86
86
  "@atlaskit/collab-provider": "10.4.0",
87
- "@atlaskit/editor-plugin-annotation": "1.26.13",
87
+ "@atlaskit/editor-plugin-annotation": "1.26.14",
88
88
  "@atlaskit/editor-plugin-card": "^4.5.0",
89
89
  "@atlaskit/editor-plugin-list": "^3.9.0",
90
90
  "@atlaskit/editor-plugin-paste": "^2.0.0",
@@ -96,14 +96,14 @@
96
96
  "@atlaskit/modal-dialog": "^12.19.0",
97
97
  "@atlaskit/primitives": "^13.3.0",
98
98
  "@atlaskit/renderer": "^112.8.0",
99
- "@atlaskit/smart-card": "^34.5.0",
99
+ "@atlaskit/smart-card": "^34.6.0",
100
100
  "@atlaskit/synchrony-test-helpers": "^3.0.0",
101
101
  "@atlaskit/toggle": "^14.0.0",
102
102
  "@atlaskit/util-data-test": "^17.13.0",
103
103
  "@atlaskit/visual-regression": "*",
104
104
  "@atlassian/adf-schema-json": "^1.22.0",
105
105
  "@atlassian/feature-flags-test-utils": "*",
106
- "@atlassian/search-provider": "3.0.25",
106
+ "@atlassian/search-provider": "3.0.26",
107
107
  "@emotion/jest": "^11.8.0",
108
108
  "@storybook/addon-knobs": "^6.4.0",
109
109
  "@testing-library/react": "^12.1.5",
@@ -140,10 +140,6 @@
140
140
  }
141
141
  },
142
142
  "platform-feature-flags": {
143
- "enable_datasource_react_sweet_state": {
144
- "type": "boolean",
145
- "referenceOnly": "true"
146
- },
147
143
  "annotations_defensive_node_name_calculations": {
148
144
  "type": "boolean",
149
145
  "referenceOnly": "true"
@@ -398,6 +394,14 @@
398
394
  },
399
395
  "platform_editor_hide_cursor_when_pm_hideselection": {
400
396
  "type": "boolean"
397
+ },
398
+ "platform_editor_live_page_prevent_table_recreation": {
399
+ "type": "boolean",
400
+ "referenceOnly": true
401
+ },
402
+ "platform_editor_safari_media_clipboard_fix": {
403
+ "type": "boolean",
404
+ "referenceOnly": true
401
405
  }
402
406
  },
403
407
  "stricter": {