@atlaskit/editor-core 203.11.9 → 203.11.11
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.
- package/CHANGELOG.md +25 -0
- package/codemods/utils.ts +0 -2
- package/dist/cjs/actions/index.js +0 -2
- package/dist/cjs/composable-editor/editor-internal.js +2 -1
- package/dist/cjs/composable-editor/hooks/useProviderFactory.js +0 -2
- package/dist/cjs/composable-editor/utils/handleProviders.js +0 -2
- package/dist/cjs/create-editor/ReactEditorView/useDispatchTransaction.js +1 -11
- package/dist/cjs/editor-appearances/FullPageEditor.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +62 -3
- package/dist/cjs/utils/extensions.js +0 -3
- package/dist/cjs/utils/findChangedNodesFromTransaction.js +0 -2
- package/dist/cjs/utils/prepare-quick-insert-provider.js +0 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +0 -2
- package/dist/es2019/composable-editor/editor-internal.js +2 -1
- package/dist/es2019/composable-editor/hooks/useProviderFactory.js +0 -2
- package/dist/es2019/composable-editor/utils/handleProviders.js +0 -2
- package/dist/es2019/create-editor/ReactEditorView/useDispatchTransaction.js +1 -11
- package/dist/es2019/editor-appearances/FullPageEditor.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +64 -5
- package/dist/es2019/utils/extensions.js +0 -3
- package/dist/es2019/utils/findChangedNodesFromTransaction.js +0 -2
- package/dist/es2019/utils/prepare-quick-insert-provider.js +0 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +0 -2
- package/dist/esm/composable-editor/editor-internal.js +2 -1
- package/dist/esm/composable-editor/hooks/useProviderFactory.js +0 -2
- package/dist/esm/composable-editor/utils/handleProviders.js +0 -2
- package/dist/esm/create-editor/ReactEditorView/useDispatchTransaction.js +1 -11
- package/dist/esm/editor-appearances/FullPageEditor.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +63 -4
- package/dist/esm/utils/extensions.js +0 -3
- package/dist/esm/utils/findChangedNodesFromTransaction.js +0 -2
- package/dist/esm/utils/prepare-quick-insert-provider.js +0 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +4 -0
- package/dist/types/editor-appearances/FullPageEditor.d.ts +1 -1
- package/dist/types/presets/default.d.ts +8 -0
- package/dist/types/presets/universal.d.ts +4 -0
- package/dist/types/presets/useUniversalPreset.d.ts +4 -0
- package/dist/types/types/editor-appearance-component.d.ts +1 -0
- package/dist/types/types/editor-props.d.ts +2 -4
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +4 -0
- package/dist/types-ts4.5/editor-appearances/FullPageEditor.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +8 -0
- package/dist/types-ts4.5/presets/universal.d.ts +4 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +4 -0
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +1 -0
- package/dist/types-ts4.5/types/editor-props.d.ts +2 -4
- package/package.json +22 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 203.11.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#107139](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107139)
|
|
8
|
+
[`3721ee9d53429`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3721ee9d53429) -
|
|
9
|
+
[ux] ED-26378 Editor Implementation - Clean up previous project FF in blockQuote
|
|
10
|
+
|
|
11
|
+
## 203.11.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#103370](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103370)
|
|
16
|
+
[`c121c95a0cf37`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c121c95a0cf37) -
|
|
17
|
+
Cleanup feature flag enable_datasource_react_sweet_state to always use react sweet state for
|
|
18
|
+
powering datasources
|
|
19
|
+
- [#105400](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105400)
|
|
20
|
+
[`cb3c65a390b04`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cb3c65a390b04) -
|
|
21
|
+
Removing onChangeCalled event as it is spamming GASV3.
|
|
22
|
+
- [#105278](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105278)
|
|
23
|
+
[`3fb1e0a806ca3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3fb1e0a806ca3) -
|
|
24
|
+
[ux] ED-25716 fixes issue with copying media nodes on safari when
|
|
25
|
+
platform_editor_exp_lazy_node_views is enabled
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 203.11.9
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/codemods/utils.ts
CHANGED
|
@@ -52,8 +52,6 @@ export const findImportFromPackage = (
|
|
|
52
52
|
source: Collection<unknown>,
|
|
53
53
|
pkg: string,
|
|
54
54
|
importName: string,
|
|
55
|
-
// Ignored via go/ees005
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
57
55
|
): string[] => {
|
|
58
56
|
// Find regular or renamed imports
|
|
59
57
|
return (
|
|
@@ -121,8 +121,6 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// This method needs to be public for EditorContext component.
|
|
124
|
-
// Ignored via go/ees005
|
|
125
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
126
124
|
}, {
|
|
127
125
|
key: "_privateRegisterEditor",
|
|
128
126
|
value: function _privateRegisterEditor(editorView, eventDispatcher, contentTransformer) {
|
|
@@ -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)))))));
|
|
@@ -23,8 +23,6 @@ preset) {
|
|
|
23
23
|
}, [preset === null || preset === void 0 ? void 0 : preset.apiResolver]);
|
|
24
24
|
return apiRef;
|
|
25
25
|
}
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
28
26
|
function prepareProviders(editorActions, apiRef, quickInsert, extensionProviders, createAnalyticsEvent) {
|
|
29
27
|
var extensionProvider = (0, _prepareExtensionProvider.default)(function () {
|
|
30
28
|
return editorActions;
|
|
@@ -13,8 +13,6 @@ exports.default = handleProviders;
|
|
|
13
13
|
* @param extensionProvider
|
|
14
14
|
* @param quickInsertProvider
|
|
15
15
|
*/
|
|
16
|
-
// Ignored via go/ees005
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
18
16
|
function handleProviders(providerFactory, _ref, extensionProvider, quickInsertProvider) {
|
|
19
17
|
var mentionProvider = _ref.mentionProvider,
|
|
20
18
|
contextIdentifierProvider = _ref.contextIdentifierProvider,
|
|
@@ -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
|
|
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
|
-
}, !
|
|
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
|
+
});
|
|
@@ -35,9 +35,6 @@ function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
// Ignored via go/ees005
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
41
38
|
function extensionProviderToQuickInsertProvider(_x, _x2, _x3, _x4) {
|
|
42
39
|
return _extensionProviderToQuickInsertProvider.apply(this, arguments);
|
|
43
40
|
} // Ignored via go/ees005
|
|
@@ -13,8 +13,6 @@ var findChangedNodesFromTransaction = exports.findChangedNodesFromTransaction =
|
|
|
13
13
|
var nodes = [];
|
|
14
14
|
var steps = tr.steps || [];
|
|
15
15
|
steps.forEach(function (step) {
|
|
16
|
-
// Ignored via go/ees005
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
18
16
|
step.getMap().forEach(function (oldStart, oldEnd, newStart, newEnd) {
|
|
19
17
|
tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), function (node) {
|
|
20
18
|
if (!nodes.find(function (n) {
|
|
@@ -15,8 +15,6 @@ var _extensions = require("./extensions");
|
|
|
15
15
|
* @param createAnalyticsEvent
|
|
16
16
|
* @returns Quick insert provider if available
|
|
17
17
|
*/
|
|
18
|
-
// Ignored via go/ees005
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
20
18
|
function prepareQuickInsertProvider(editorActions, apiRef, extensionProvider, quickInsert, createAnalyticsEvent) {
|
|
21
19
|
var quickInsertProvider = quickInsert && typeof quickInsert !== 'boolean' && quickInsert.provider;
|
|
22
20
|
var extensionQuickInsertProvider = extensionProvider && (0, _extensions.extensionProviderToQuickInsertProvider)(extensionProvider, editorActions, apiRef, createAnalyticsEvent);
|
|
@@ -87,8 +87,6 @@ export default class EditorActions {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// This method needs to be public for EditorContext component.
|
|
90
|
-
// Ignored via go/ees005
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
92
90
|
_privateRegisterEditor(editorView, eventDispatcher, contentTransformer, getFeatureFlags = () => ({})) {
|
|
93
91
|
this.contentTransformer = contentTransformer;
|
|
94
92
|
this.eventDispatcher = eventDispatcher;
|
|
@@ -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)))))));
|
|
@@ -16,8 +16,6 @@ preset) {
|
|
|
16
16
|
}, [preset === null || preset === void 0 ? void 0 : preset.apiResolver]);
|
|
17
17
|
return apiRef;
|
|
18
18
|
}
|
|
19
|
-
// Ignored via go/ees005
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
21
19
|
function prepareProviders(editorActions, apiRef, quickInsert, extensionProviders, createAnalyticsEvent) {
|
|
22
20
|
const extensionProvider = prepareExtensionProvider(() => editorActions)(extensionProviders);
|
|
23
21
|
const quickInsertProvider = prepareQuickInsertProvider(editorActions, apiRef, extensionProvider, quickInsert, createAnalyticsEvent);
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
* @param extensionProvider
|
|
8
8
|
* @param quickInsertProvider
|
|
9
9
|
*/
|
|
10
|
-
// Ignored via go/ees005
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
12
10
|
export default function handleProviders(providerFactory, {
|
|
13
11
|
mentionProvider,
|
|
14
12
|
contextIdentifierProvider,
|
|
@@ -50,17 +50,7 @@ export const useDispatchTransaction = ({
|
|
|
50
50
|
onChangeRef.current(view, {
|
|
51
51
|
source
|
|
52
52
|
});
|
|
53
|
-
stopMeasure(EVENT_NAME_ON_CHANGE
|
|
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
|
-
|
|
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
|
-
}, !
|
|
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
|
+
});
|
|
@@ -25,9 +25,6 @@ function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
// Ignored via go/ees005
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
31
28
|
export async function extensionProviderToQuickInsertProvider(extensionProvider, editorActions, apiRef, createAnalyticsEvent) {
|
|
32
29
|
const extensions = await extensionProvider.getExtensions();
|
|
33
30
|
return {
|
|
@@ -7,8 +7,6 @@ export const findChangedNodesFromTransaction = tr => {
|
|
|
7
7
|
const nodes = [];
|
|
8
8
|
const steps = tr.steps || [];
|
|
9
9
|
steps.forEach(step => {
|
|
10
|
-
// Ignored via go/ees005
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
12
10
|
step.getMap().forEach((oldStart, oldEnd, newStart, newEnd) => {
|
|
13
11
|
tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), node => {
|
|
14
12
|
if (!nodes.find(n => n === node)) {
|
|
@@ -10,8 +10,6 @@ import { combineQuickInsertProviders, extensionProviderToQuickInsertProvider } f
|
|
|
10
10
|
* @param createAnalyticsEvent
|
|
11
11
|
* @returns Quick insert provider if available
|
|
12
12
|
*/
|
|
13
|
-
// Ignored via go/ees005
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
15
13
|
export default function prepareQuickInsertProvider(editorActions, apiRef, extensionProvider, quickInsert, createAnalyticsEvent) {
|
|
16
14
|
const quickInsertProvider = quickInsert && typeof quickInsert !== 'boolean' && quickInsert.provider;
|
|
17
15
|
const extensionQuickInsertProvider = extensionProvider && extensionProviderToQuickInsertProvider(extensionProvider, editorActions, apiRef, createAnalyticsEvent);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "203.11.
|
|
2
|
+
export const version = "203.11.11";
|
|
@@ -115,8 +115,6 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
// This method needs to be public for EditorContext component.
|
|
118
|
-
// Ignored via go/ees005
|
|
119
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
120
118
|
}, {
|
|
121
119
|
key: "_privateRegisterEditor",
|
|
122
120
|
value: function _privateRegisterEditor(editorView, eventDispatcher, contentTransformer) {
|
|
@@ -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)))))));
|
|
@@ -16,8 +16,6 @@ preset) {
|
|
|
16
16
|
}, [preset === null || preset === void 0 ? void 0 : preset.apiResolver]);
|
|
17
17
|
return apiRef;
|
|
18
18
|
}
|
|
19
|
-
// Ignored via go/ees005
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
21
19
|
function prepareProviders(editorActions, apiRef, quickInsert, extensionProviders, createAnalyticsEvent) {
|
|
22
20
|
var extensionProvider = prepareExtensionProvider(function () {
|
|
23
21
|
return editorActions;
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
* @param extensionProvider
|
|
8
8
|
* @param quickInsertProvider
|
|
9
9
|
*/
|
|
10
|
-
// Ignored via go/ees005
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
12
10
|
export default function handleProviders(providerFactory, _ref, extensionProvider, quickInsertProvider) {
|
|
13
11
|
var mentionProvider = _ref.mentionProvider,
|
|
14
12
|
contextIdentifierProvider = _ref.contextIdentifierProvider,
|
|
@@ -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
|
|
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
|
-
}, !
|
|
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
|
+
});
|
|
@@ -27,9 +27,6 @@ function sendExtensionQuickInsertAnalytics(item, createAnalyticsEvent, source) {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
// Ignored via go/ees005
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
33
30
|
export function extensionProviderToQuickInsertProvider(_x, _x2, _x3, _x4) {
|
|
34
31
|
return _extensionProviderToQuickInsertProvider.apply(this, arguments);
|
|
35
32
|
}
|
|
@@ -7,8 +7,6 @@ export var findChangedNodesFromTransaction = function findChangedNodesFromTransa
|
|
|
7
7
|
var nodes = [];
|
|
8
8
|
var steps = tr.steps || [];
|
|
9
9
|
steps.forEach(function (step) {
|
|
10
|
-
// Ignored via go/ees005
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
12
10
|
step.getMap().forEach(function (oldStart, oldEnd, newStart, newEnd) {
|
|
13
11
|
tr.doc.nodesBetween(newStart, Math.min(newEnd, tr.doc.content.size), function (node) {
|
|
14
12
|
if (!nodes.find(function (n) {
|
|
@@ -10,8 +10,6 @@ import { combineQuickInsertProviders, extensionProviderToQuickInsertProvider } f
|
|
|
10
10
|
* @param createAnalyticsEvent
|
|
11
11
|
* @returns Quick insert provider if available
|
|
12
12
|
*/
|
|
13
|
-
// Ignored via go/ees005
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
15
13
|
export default function prepareQuickInsertProvider(editorActions, apiRef, extensionProvider, quickInsert, createAnalyticsEvent) {
|
|
16
14
|
var quickInsertProvider = quickInsert && typeof quickInsert !== 'boolean' && quickInsert.provider;
|
|
17
15
|
var extensionQuickInsertProvider = extensionProvider && extensionProviderToQuickInsertProvider(extensionProvider, editorActions, apiRef, createAnalyticsEvent);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "203.11.
|
|
2
|
+
export var version = "203.11.11";
|
|
@@ -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
|
-
*
|
|
119
|
+
* This is required for accessing whether a page is a live page or not when rendering the appearance component.
|
|
120
120
|
*
|
|
121
|
-
*
|
|
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
|
*/
|
|
@@ -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
|
-
*
|
|
119
|
+
* This is required for accessing whether a page is a live page or not when rendering the appearance component.
|
|
120
120
|
*
|
|
121
|
-
*
|
|
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
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "203.11.
|
|
3
|
+
"version": "203.11.11",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -43,20 +43,20 @@
|
|
|
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.
|
|
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": "^
|
|
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",
|
|
53
53
|
"@atlaskit/icon": "^23.4.0",
|
|
54
54
|
"@atlaskit/media-card": "^78.18.0",
|
|
55
|
-
"@atlaskit/mention": "^23.
|
|
55
|
+
"@atlaskit/mention": "^23.10.0",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
57
57
|
"@atlaskit/task-decision": "^17.11.0",
|
|
58
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
59
|
-
"@atlaskit/tokens": "^3.
|
|
58
|
+
"@atlaskit/tmp-editor-statsig": "^2.41.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.
|
|
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",
|
|
@@ -95,15 +95,15 @@
|
|
|
95
95
|
"@atlaskit/media-test-helpers": "^34.7.0",
|
|
96
96
|
"@atlaskit/modal-dialog": "^12.19.0",
|
|
97
97
|
"@atlaskit/primitives": "^13.3.0",
|
|
98
|
-
"@atlaskit/renderer": "^112.
|
|
99
|
-
"@atlaskit/smart-card": "^34.
|
|
98
|
+
"@atlaskit/renderer": "^112.11.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.
|
|
106
|
+
"@atlassian/search-provider": "3.0.27",
|
|
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"
|
|
@@ -209,9 +205,6 @@
|
|
|
209
205
|
"editor_load_conf_collab_docs_without_checks": {
|
|
210
206
|
"type": "boolean"
|
|
211
207
|
},
|
|
212
|
-
"platform_editor_nest_in_quotes_adf_change": {
|
|
213
|
-
"type": "boolean"
|
|
214
|
-
},
|
|
215
208
|
"platform_editor_toolbar_responsive_fixes": {
|
|
216
209
|
"type": "boolean"
|
|
217
210
|
},
|
|
@@ -398,6 +391,18 @@
|
|
|
398
391
|
},
|
|
399
392
|
"platform_editor_hide_cursor_when_pm_hideselection": {
|
|
400
393
|
"type": "boolean"
|
|
394
|
+
},
|
|
395
|
+
"platform_editor_live_page_prevent_table_recreation": {
|
|
396
|
+
"type": "boolean",
|
|
397
|
+
"referenceOnly": true
|
|
398
|
+
},
|
|
399
|
+
"platform_editor_safari_media_clipboard_fix": {
|
|
400
|
+
"type": "boolean",
|
|
401
|
+
"referenceOnly": true
|
|
402
|
+
},
|
|
403
|
+
"live_pages_content_jump_mitigation": {
|
|
404
|
+
"type": "boolean",
|
|
405
|
+
"referenceOnly": true
|
|
401
406
|
}
|
|
402
407
|
},
|
|
403
408
|
"stricter": {
|