@atlaskit/editor-core 211.2.8 → 211.2.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.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/presets/default.js +4 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +4 -2
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +10 -8
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +4 -4
- package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +10 -8
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +4 -4
- package/dist/esm/ui/Appearance/Comment/Comment.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +10 -8
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +11 -1
- package/dist/types/presets/universal.d.ts +12 -1
- package/dist/types/presets/useUniversalPreset.d.ts +11 -1
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +18 -1
- package/dist/types-ts4.5/presets/universal.d.ts +19 -1
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +18 -1
- package/dist/types-ts4.5/ui/Appearance/Comment/Toolbar.d.ts +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 211.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`20056074447a2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/20056074447a2) -
|
|
8
|
+
Switch to more semantically accurate label prop in internal radio and radio group instances.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 211.2.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`0eac5a71c3834`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0eac5a71c3834) -
|
|
16
|
+
[ED-29037] Fix dynamic buttons (e.g. text style) in full page primary toolbar flickers during the
|
|
17
|
+
initial load
|
|
18
|
+
- [`c0113eeccb2df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0113eeccb2df) -
|
|
19
|
+
[ux] ED-29120 add a new config option for default editor preset
|
|
20
|
+
(`toolbar.enableNewToolbarExperience`) which allows the new toolbar to be disabled. This is needed
|
|
21
|
+
for editors that can't be excluded at the experiment level.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 211.2.8
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -55,7 +55,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
55
55
|
* @example
|
|
56
56
|
*/
|
|
57
57
|
function createDefaultPreset(options) {
|
|
58
|
-
var _options$featureFlags, _options$featureFlags2;
|
|
58
|
+
var _options$toolbar, _options$featureFlags, _options$featureFlags2;
|
|
59
59
|
var isFullPage = (0, _isFullPage.isFullPage)(options.appearance);
|
|
60
60
|
var preset = new _preset.EditorPresetBuilder().add([_featureFlags.featureFlagsPlugin, options.featureFlags || {}]).maybeAdd([_analytics.analyticsPlugin, {
|
|
61
61
|
createAnalyticsEvent: options.createAnalyticsEvent,
|
|
@@ -70,9 +70,9 @@ function createDefaultPreset(options) {
|
|
|
70
70
|
return (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin');
|
|
71
71
|
}).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
|
|
72
72
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
73
|
-
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([_toolbar.toolbarPlugin, options.toolbar || {}],
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([_toolbar.toolbarPlugin, options.toolbar || {}],
|
|
74
|
+
// if explicitly set to false, don't enable. If undefined treat as truthy and allow plugin to be enabled under experiment
|
|
75
|
+
Boolean((0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_exp_code_toggle', 'isEnabled', true) ? ((_options$toolbar = options.toolbar) === null || _options$toolbar === void 0 ? void 0 : _options$toolbar.enableNewToolbarExperience) !== false && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) : (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true))).add([_primaryToolbar.primaryToolbarPlugin, {
|
|
76
76
|
contextualFormattingEnabled: isFullPage
|
|
77
77
|
}]).maybeAdd(_undoRedo.undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([_blockType.blockTypePlugin, _objectSpread(_objectSpread({}, options.blockType), {}, {
|
|
78
78
|
includeBlockQuoteAsTextstyleOption: isFullPage
|
|
@@ -210,6 +210,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
210
210
|
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew] : /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */
|
|
211
211
|
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
212
212
|
}, customPrimaryToolbarComponents);
|
|
213
|
+
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true);
|
|
213
214
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
214
215
|
animate: maxContentSizeReached
|
|
215
216
|
}, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
|
|
@@ -225,8 +226,9 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
225
226
|
ref: wrapperElementRef
|
|
226
227
|
}, (0, _react2.jsx)(_Toolbar.MainToolbar, {
|
|
227
228
|
useStickyToolbar: useStickyToolbar,
|
|
228
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
229
|
-
|
|
229
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled,
|
|
230
|
+
isNewToolbarEnabled: isToolbarAIFCEnabled
|
|
231
|
+
}, isToolbarAIFCEnabled ? (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
|
|
230
232
|
editorAPI: editorAPI,
|
|
231
233
|
editorView: editorView,
|
|
232
234
|
editorAppearance: appearance
|
|
@@ -15,7 +15,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
18
|
var _templateObject, _templateObject2;
|
|
20
19
|
/**
|
|
21
20
|
* @jsxRuntime classic
|
|
@@ -113,11 +112,11 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
113
112
|
return (
|
|
114
113
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
115
114
|
(0, _react2.jsx)("div", {
|
|
116
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew,
|
|
115
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding] : [
|
|
117
116
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
118
117
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
119
118
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
120
|
-
|
|
119
|
+
props.isNewToolbarEnabled), stickyToolbarWrapperStyle]
|
|
121
120
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
122
121
|
,
|
|
123
122
|
style: {
|
|
@@ -134,11 +133,11 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
134
133
|
return (
|
|
135
134
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
136
135
|
(0, _react2.jsx)("div", {
|
|
137
|
-
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh,
|
|
136
|
+
css: (0, _expValEquals.expValEquals)('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding] :
|
|
138
137
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
139
138
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
140
139
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
141
|
-
|
|
140
|
+
props.isNewToolbarEnabled),
|
|
142
141
|
"data-testid": "ak-editor-main-toolbar"
|
|
143
142
|
}, props.children)
|
|
144
143
|
);
|
|
@@ -174,16 +173,19 @@ var getStickyParameters = function getStickyParameters(configuration) {
|
|
|
174
173
|
var MainToolbar = exports.MainToolbar = function MainToolbar(_ref) {
|
|
175
174
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
176
175
|
twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
177
|
-
children = _ref.children
|
|
176
|
+
children = _ref.children,
|
|
177
|
+
isNewToolbarEnabled = _ref.isNewToolbarEnabled;
|
|
178
178
|
if (useStickyToolbar) {
|
|
179
179
|
return (0, _react2.jsx)(StickyToolbar
|
|
180
180
|
// Ignored via go/ees005
|
|
181
181
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
182
182
|
, (0, _extends2.default)({}, getStickyParameters(useStickyToolbar), {
|
|
183
|
-
twoLineEditorToolbar: twoLineEditorToolbar
|
|
183
|
+
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
184
|
+
isNewToolbarEnabled: isNewToolbarEnabled
|
|
184
185
|
}), children);
|
|
185
186
|
}
|
|
186
187
|
return (0, _react2.jsx)(FixedToolbar, {
|
|
187
|
-
twoLineEditorToolbar: twoLineEditorToolbar
|
|
188
|
+
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
189
|
+
isNewToolbarEnabled: isNewToolbarEnabled
|
|
188
190
|
}, children);
|
|
189
191
|
};
|
|
@@ -153,7 +153,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
153
153
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
154
154
|
'--ak-editor-fullpage-toolbar-height': (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)()
|
|
155
155
|
}
|
|
156
|
-
}, !isEditorToolbarHidden && ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) ? (0, _react2.jsx)(_reactIntlNext.IntlProvider, {
|
|
156
|
+
}, !isEditorToolbarHidden && (Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) ? (0, _react2.jsx)(_reactIntlNext.IntlProvider, {
|
|
157
157
|
locale: "en"
|
|
158
158
|
}, (0, _react2.jsx)(_FullPageToolbarNext.FullPageToolbarNext, {
|
|
159
159
|
toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
|
|
@@ -111,7 +111,7 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
|
|
|
111
111
|
showKeyline: showKeyline || ContextPanelWidth > 0
|
|
112
112
|
}, beforeIcon && /*#__PURE__*/_react.default.createElement("div", {
|
|
113
113
|
className: (0, _runtime.ax)([styles.mainToolbarIconBefore, (0, _expValEquals.expValEquals)('platform_editor_toolbar_support_custom_components', 'isEnabled', true) && styles.mainToolbarIconBeforeNew])
|
|
114
|
-
}, beforeIcon), (0, _expValEquals.expValEquals)('platform_editor_toolbar_support_custom_components', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(FirstChildWrapper, null, toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
114
|
+
}, beforeIcon), (0, _expValEquals.expValEquals)('platform_editor_toolbar_support_custom_components', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(FirstChildWrapper, null, toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
115
115
|
toolbar: toolbar,
|
|
116
116
|
components: components,
|
|
117
117
|
editorView: editorView,
|
|
@@ -123,7 +123,7 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
|
|
|
123
123
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/_react.default.createElement("div", {
|
|
124
124
|
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
125
125
|
className: (0, _runtime.ax)([styles.beforePrimaryToolbarComponents])
|
|
126
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
126
|
+
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && (!(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
127
127
|
toolbar: toolbar,
|
|
128
128
|
components: components,
|
|
129
129
|
editorView: editorView,
|
|
@@ -47,7 +47,7 @@ import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
|
47
47
|
* @example
|
|
48
48
|
*/
|
|
49
49
|
export function createDefaultPreset(options) {
|
|
50
|
-
var _options$featureFlags, _options$featureFlags2;
|
|
50
|
+
var _options$toolbar, _options$featureFlags, _options$featureFlags2;
|
|
51
51
|
const isFullPage = fullPageCheck(options.appearance);
|
|
52
52
|
const preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).maybeAdd([analyticsPlugin, {
|
|
53
53
|
createAnalyticsEvent: options.createAnalyticsEvent,
|
|
@@ -61,9 +61,9 @@ export function createDefaultPreset(options) {
|
|
|
61
61
|
}
|
|
62
62
|
}], () => fg('platform_editor_use_preferences_plugin')).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
63
63
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
64
|
-
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}],
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}],
|
|
65
|
+
// if explicitly set to false, don't enable. If undefined treat as truthy and allow plugin to be enabled under experiment
|
|
66
|
+
Boolean(expValEquals('platform_editor_toolbar_aifc_exp_code_toggle', 'isEnabled', true) ? ((_options$toolbar = options.toolbar) === null || _options$toolbar === void 0 ? void 0 : _options$toolbar.enableNewToolbarExperience) !== false && editorExperiment('platform_editor_toolbar_aifc', true) : editorExperiment('platform_editor_toolbar_aifc', true))).add([primaryToolbarPlugin, {
|
|
67
67
|
contextualFormattingEnabled: isFullPage
|
|
68
68
|
}]).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([blockTypePlugin, {
|
|
69
69
|
...options.blockType,
|
|
@@ -211,6 +211,7 @@ export const CommentEditorWithIntl = props => {
|
|
|
211
211
|
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew] : /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */
|
|
212
212
|
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
213
213
|
}, customPrimaryToolbarComponents);
|
|
214
|
+
const isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true);
|
|
214
215
|
return jsx(WithFlash, {
|
|
215
216
|
animate: maxContentSizeReached
|
|
216
217
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
@@ -226,8 +227,9 @@ export const CommentEditorWithIntl = props => {
|
|
|
226
227
|
ref: wrapperElementRef
|
|
227
228
|
}, jsx(MainToolbar, {
|
|
228
229
|
useStickyToolbar: useStickyToolbar,
|
|
229
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
230
|
-
|
|
230
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled,
|
|
231
|
+
isNewToolbarEnabled: isToolbarAIFCEnabled
|
|
232
|
+
}, isToolbarAIFCEnabled ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
231
233
|
editorAPI: editorAPI,
|
|
232
234
|
editorView: editorView,
|
|
233
235
|
editorAppearance: appearance
|
|
@@ -10,7 +10,6 @@ import React, { useEffect, useState } from 'react';
|
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
13
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
15
14
|
const akEditorMenuZIndex = 500;
|
|
16
15
|
const akEditorToolbarKeylineHeight = 2;
|
|
@@ -158,11 +157,11 @@ const StickyToolbar = props => {
|
|
|
158
157
|
return (
|
|
159
158
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
160
159
|
jsx("div", {
|
|
161
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew,
|
|
160
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding] : [
|
|
162
161
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
163
162
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
164
163
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
165
|
-
|
|
164
|
+
props.isNewToolbarEnabled), stickyToolbarWrapperStyle]
|
|
166
165
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
167
166
|
,
|
|
168
167
|
style: {
|
|
@@ -178,11 +177,11 @@ const StickyToolbar = props => {
|
|
|
178
177
|
const FixedToolbar = props =>
|
|
179
178
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
180
179
|
jsx("div", {
|
|
181
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh,
|
|
180
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding] :
|
|
182
181
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
183
182
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
184
183
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
185
|
-
|
|
184
|
+
props.isNewToolbarEnabled),
|
|
186
185
|
"data-testid": "ak-editor-main-toolbar"
|
|
187
186
|
}, props.children);
|
|
188
187
|
|
|
@@ -216,17 +215,20 @@ const getStickyParameters = configuration => {
|
|
|
216
215
|
export const MainToolbar = ({
|
|
217
216
|
useStickyToolbar,
|
|
218
217
|
twoLineEditorToolbar,
|
|
219
|
-
children
|
|
218
|
+
children,
|
|
219
|
+
isNewToolbarEnabled
|
|
220
220
|
}) => {
|
|
221
221
|
if (useStickyToolbar) {
|
|
222
222
|
return jsx(StickyToolbar
|
|
223
223
|
// Ignored via go/ees005
|
|
224
224
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
225
225
|
, _extends({}, getStickyParameters(useStickyToolbar), {
|
|
226
|
-
twoLineEditorToolbar: twoLineEditorToolbar
|
|
226
|
+
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
227
|
+
isNewToolbarEnabled: isNewToolbarEnabled
|
|
227
228
|
}), children);
|
|
228
229
|
}
|
|
229
230
|
return jsx(FixedToolbar, {
|
|
230
|
-
twoLineEditorToolbar: twoLineEditorToolbar
|
|
231
|
+
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
232
|
+
isNewToolbarEnabled: isNewToolbarEnabled
|
|
231
233
|
}, children);
|
|
232
234
|
};
|
|
@@ -138,7 +138,7 @@ export const FullPageEditor = props => {
|
|
|
138
138
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
139
139
|
'--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
|
|
140
140
|
}
|
|
141
|
-
}, !isEditorToolbarHidden && (editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(IntlProvider, {
|
|
141
|
+
}, !isEditorToolbarHidden && (Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(IntlProvider, {
|
|
142
142
|
locale: "en"
|
|
143
143
|
}, jsx(FullPageToolbarNext, {
|
|
144
144
|
toolbarDockingPosition: (_toolbarDockingPositi = toolbarDockingPosition) !== null && _toolbarDockingPositi !== void 0 ? _toolbarDockingPositi : toolbarDocking,
|
|
@@ -106,7 +106,7 @@ export const FullPageToolbarNext = ({
|
|
|
106
106
|
showKeyline: showKeyline || ContextPanelWidth > 0
|
|
107
107
|
}, beforeIcon && /*#__PURE__*/React.createElement("div", {
|
|
108
108
|
className: ax([styles.mainToolbarIconBefore, expValEquals('platform_editor_toolbar_support_custom_components', 'isEnabled', true) && styles.mainToolbarIconBeforeNew])
|
|
109
|
-
}, beforeIcon), expValEquals('platform_editor_toolbar_support_custom_components', 'isEnabled', true) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
109
|
+
}, beforeIcon), expValEquals('platform_editor_toolbar_support_custom_components', 'isEnabled', true) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
110
110
|
toolbar: toolbar,
|
|
111
111
|
components: components,
|
|
112
112
|
editorView: editorView,
|
|
@@ -118,7 +118,7 @@ export const FullPageToolbarNext = ({
|
|
|
118
118
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
|
|
119
119
|
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
120
120
|
className: ax([styles.beforePrimaryToolbarComponents])
|
|
121
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
121
|
+
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
122
122
|
toolbar: toolbar,
|
|
123
123
|
components: components,
|
|
124
124
|
editorView: editorView,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "211.2.
|
|
2
|
+
export const version = "211.2.9";
|
|
@@ -50,7 +50,7 @@ import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
|
50
50
|
* @example
|
|
51
51
|
*/
|
|
52
52
|
export function createDefaultPreset(options) {
|
|
53
|
-
var _options$featureFlags, _options$featureFlags2;
|
|
53
|
+
var _options$toolbar, _options$featureFlags, _options$featureFlags2;
|
|
54
54
|
var isFullPage = fullPageCheck(options.appearance);
|
|
55
55
|
var preset = new EditorPresetBuilder().add([featureFlagsPlugin, options.featureFlags || {}]).maybeAdd([analyticsPlugin, {
|
|
56
56
|
createAnalyticsEvent: options.createAnalyticsEvent,
|
|
@@ -65,9 +65,9 @@ export function createDefaultPreset(options) {
|
|
|
65
65
|
return fg('platform_editor_use_preferences_plugin');
|
|
66
66
|
}).maybeAdd(interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(compositionPlugin).add([contextIdentifierPlugin, {
|
|
67
67
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
68
|
-
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}],
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
}]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).maybeAdd([toolbarPlugin, options.toolbar || {}],
|
|
69
|
+
// if explicitly set to false, don't enable. If undefined treat as truthy and allow plugin to be enabled under experiment
|
|
70
|
+
Boolean(expValEquals('platform_editor_toolbar_aifc_exp_code_toggle', 'isEnabled', true) ? ((_options$toolbar = options.toolbar) === null || _options$toolbar === void 0 ? void 0 : _options$toolbar.enableNewToolbarExperience) !== false && editorExperiment('platform_editor_toolbar_aifc', true) : editorExperiment('platform_editor_toolbar_aifc', true))).add([primaryToolbarPlugin, {
|
|
71
71
|
contextualFormattingEnabled: isFullPage
|
|
72
72
|
}]).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).add([blockTypePlugin, _objectSpread(_objectSpread({}, options.blockType), {}, {
|
|
73
73
|
includeBlockQuoteAsTextstyleOption: isFullPage
|
|
@@ -202,6 +202,7 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
202
202
|
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew] : /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766 */
|
|
203
203
|
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
204
204
|
}, customPrimaryToolbarComponents);
|
|
205
|
+
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true);
|
|
205
206
|
return jsx(WithFlash, {
|
|
206
207
|
animate: maxContentSizeReached
|
|
207
208
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
@@ -217,8 +218,9 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
217
218
|
ref: wrapperElementRef
|
|
218
219
|
}, jsx(MainToolbar, {
|
|
219
220
|
useStickyToolbar: useStickyToolbar,
|
|
220
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
221
|
-
|
|
221
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled,
|
|
222
|
+
isNewToolbarEnabled: isToolbarAIFCEnabled
|
|
223
|
+
}, isToolbarAIFCEnabled ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
222
224
|
editorAPI: editorAPI,
|
|
223
225
|
editorView: editorView,
|
|
224
226
|
editorAppearance: appearance
|
|
@@ -15,7 +15,6 @@ import React, { useEffect, useState } from 'react';
|
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
18
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
20
19
|
var akEditorMenuZIndex = 500;
|
|
21
20
|
var akEditorToolbarKeylineHeight = 2;
|
|
@@ -106,11 +105,11 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
106
105
|
return (
|
|
107
106
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
108
107
|
jsx("div", {
|
|
109
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew,
|
|
108
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding] : [
|
|
110
109
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
111
110
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
112
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
113
|
-
|
|
112
|
+
props.isNewToolbarEnabled), stickyToolbarWrapperStyle]
|
|
114
113
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
115
114
|
,
|
|
116
115
|
style: {
|
|
@@ -127,11 +126,11 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
127
126
|
return (
|
|
128
127
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
129
128
|
jsx("div", {
|
|
130
|
-
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh,
|
|
129
|
+
css: expValEquals('platform_editor_core_static_emotion_non_central', 'isEnabled', true) ? [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding] :
|
|
131
130
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
132
131
|
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
133
132
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
134
|
-
|
|
133
|
+
props.isNewToolbarEnabled),
|
|
135
134
|
"data-testid": "ak-editor-main-toolbar"
|
|
136
135
|
}, props.children)
|
|
137
136
|
);
|
|
@@ -167,16 +166,19 @@ var getStickyParameters = function getStickyParameters(configuration) {
|
|
|
167
166
|
export var MainToolbar = function MainToolbar(_ref) {
|
|
168
167
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
169
168
|
twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
170
|
-
children = _ref.children
|
|
169
|
+
children = _ref.children,
|
|
170
|
+
isNewToolbarEnabled = _ref.isNewToolbarEnabled;
|
|
171
171
|
if (useStickyToolbar) {
|
|
172
172
|
return jsx(StickyToolbar
|
|
173
173
|
// Ignored via go/ees005
|
|
174
174
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
175
175
|
, _extends({}, getStickyParameters(useStickyToolbar), {
|
|
176
|
-
twoLineEditorToolbar: twoLineEditorToolbar
|
|
176
|
+
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
177
|
+
isNewToolbarEnabled: isNewToolbarEnabled
|
|
177
178
|
}), children);
|
|
178
179
|
}
|
|
179
180
|
return jsx(FixedToolbar, {
|
|
180
|
-
twoLineEditorToolbar: twoLineEditorToolbar
|
|
181
|
+
twoLineEditorToolbar: twoLineEditorToolbar,
|
|
182
|
+
isNewToolbarEnabled: isNewToolbarEnabled
|
|
181
183
|
}, children);
|
|
182
184
|
};
|
|
@@ -143,7 +143,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
143
143
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
144
144
|
'--ak-editor-fullpage-toolbar-height': FULL_PAGE_EDITOR_TOOLBAR_HEIGHT()
|
|
145
145
|
}
|
|
146
|
-
}, !isEditorToolbarHidden && (editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(IntlProvider, {
|
|
146
|
+
}, !isEditorToolbarHidden && (Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true) ? jsx(IntlProvider, {
|
|
147
147
|
locale: "en"
|
|
148
148
|
}, jsx(FullPageToolbarNext, {
|
|
149
149
|
toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
|
|
@@ -103,7 +103,7 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
103
103
|
showKeyline: showKeyline || ContextPanelWidth > 0
|
|
104
104
|
}, beforeIcon && /*#__PURE__*/React.createElement("div", {
|
|
105
105
|
className: ax([styles.mainToolbarIconBefore, expValEquals('platform_editor_toolbar_support_custom_components', 'isEnabled', true) && styles.mainToolbarIconBeforeNew])
|
|
106
|
-
}, beforeIcon), expValEquals('platform_editor_toolbar_support_custom_components', 'isEnabled', true) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
106
|
+
}, beforeIcon), expValEquals('platform_editor_toolbar_support_custom_components', 'isEnabled', true) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
107
107
|
toolbar: toolbar,
|
|
108
108
|
components: components,
|
|
109
109
|
editorView: editorView,
|
|
@@ -115,7 +115,7 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
115
115
|
}, !!customPrimaryToolbarComponents && 'before' in customPrimaryToolbarComponents && /*#__PURE__*/React.createElement("div", {
|
|
116
116
|
"data-testid": 'before-primary-toolbar-components-plugin',
|
|
117
117
|
className: ax([styles.beforePrimaryToolbarComponents])
|
|
118
|
-
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
118
|
+
}, customPrimaryToolbarComponents.before), !!customPrimaryToolbarComponents && 'after' in customPrimaryToolbarComponents ? customPrimaryToolbarComponents.after : customPrimaryToolbarComponents))) : toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && (!expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) || editorView) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
119
119
|
toolbar: toolbar,
|
|
120
120
|
components: components,
|
|
121
121
|
editorView: editorView,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "211.2.
|
|
2
|
+
export var version = "211.2.9";
|
|
@@ -392,7 +392,17 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
392
392
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/interaction").InteractionPlugin>];
|
|
393
393
|
pluginConfiguration: import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined;
|
|
394
394
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
395
|
-
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined
|
|
395
|
+
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
396
|
+
actions: {
|
|
397
|
+
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
398
|
+
registerComponents: import("packages/editor/editor-plugin-toolbar/dist/types/types").RegisterComponentsAction;
|
|
399
|
+
};
|
|
400
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>];
|
|
401
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
402
|
+
sharedState: {
|
|
403
|
+
shouldShowToolbar: boolean;
|
|
404
|
+
};
|
|
405
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined>>];
|
|
396
406
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-block").CodeBlockPluginOptions | undefined;
|
|
397
407
|
sharedState: {
|
|
398
408
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
@@ -35,6 +35,7 @@ export type InitialPluginConfiguration = {
|
|
|
35
35
|
};
|
|
36
36
|
toolbarPlugin?: {
|
|
37
37
|
disableSelectionToolbar?: boolean;
|
|
38
|
+
enableNewToolbarExperience?: boolean;
|
|
38
39
|
};
|
|
39
40
|
trackChangesPlugin?: {
|
|
40
41
|
showOnToolbar?: boolean;
|
|
@@ -450,7 +451,17 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
450
451
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/interaction").InteractionPlugin>];
|
|
451
452
|
pluginConfiguration: import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined;
|
|
452
453
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
453
|
-
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined
|
|
454
|
+
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
455
|
+
actions: {
|
|
456
|
+
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
457
|
+
registerComponents: import("packages/editor/editor-plugin-toolbar/dist/types/types").RegisterComponentsAction;
|
|
458
|
+
};
|
|
459
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>];
|
|
460
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
461
|
+
sharedState: {
|
|
462
|
+
shouldShowToolbar: boolean;
|
|
463
|
+
};
|
|
464
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined>>];
|
|
454
465
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-block").CodeBlockPluginOptions | undefined;
|
|
455
466
|
sharedState: {
|
|
456
467
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
@@ -392,7 +392,17 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
392
392
|
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/interaction").InteractionPlugin>];
|
|
393
393
|
pluginConfiguration: import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined;
|
|
394
394
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
395
|
-
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined
|
|
395
|
+
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
396
|
+
actions: {
|
|
397
|
+
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
398
|
+
registerComponents: import("packages/editor/editor-plugin-toolbar/dist/types/types").RegisterComponentsAction;
|
|
399
|
+
};
|
|
400
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>];
|
|
401
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
402
|
+
sharedState: {
|
|
403
|
+
shouldShowToolbar: boolean;
|
|
404
|
+
};
|
|
405
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined>>];
|
|
396
406
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-block").CodeBlockPluginOptions | undefined;
|
|
397
407
|
sharedState: {
|
|
398
408
|
copyButtonHoverNode: import("prosemirror-model").Node;
|
|
@@ -3,8 +3,9 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
4
4
|
type MainToolbarProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
|
+
isNewToolbarEnabled?: boolean;
|
|
6
7
|
twoLineEditorToolbar?: boolean;
|
|
7
8
|
useStickyToolbar?: UseStickyToolbarType;
|
|
8
9
|
};
|
|
9
|
-
export declare const MainToolbar: ({ useStickyToolbar, twoLineEditorToolbar, children, }: MainToolbarProps) => jsx.JSX.Element;
|
|
10
|
+
export declare const MainToolbar: ({ useStickyToolbar, twoLineEditorToolbar, children, isNewToolbarEnabled, }: MainToolbarProps) => jsx.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -554,7 +554,24 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
554
554
|
];
|
|
555
555
|
pluginConfiguration: import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined;
|
|
556
556
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
557
|
-
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined
|
|
557
|
+
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined>>,
|
|
558
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
559
|
+
actions: {
|
|
560
|
+
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
561
|
+
registerComponents: import("packages/editor/editor-plugin-toolbar/dist/types/types").RegisterComponentsAction;
|
|
562
|
+
};
|
|
563
|
+
dependencies: [
|
|
564
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>,
|
|
565
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>,
|
|
566
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>,
|
|
567
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>,
|
|
568
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>
|
|
569
|
+
];
|
|
570
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
571
|
+
sharedState: {
|
|
572
|
+
shouldShowToolbar: boolean;
|
|
573
|
+
};
|
|
574
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined>>
|
|
558
575
|
];
|
|
559
576
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-block").CodeBlockPluginOptions | undefined;
|
|
560
577
|
sharedState: {
|
|
@@ -35,6 +35,7 @@ export type InitialPluginConfiguration = {
|
|
|
35
35
|
};
|
|
36
36
|
toolbarPlugin?: {
|
|
37
37
|
disableSelectionToolbar?: boolean;
|
|
38
|
+
enableNewToolbarExperience?: boolean;
|
|
38
39
|
};
|
|
39
40
|
trackChangesPlugin?: {
|
|
40
41
|
showOnToolbar?: boolean;
|
|
@@ -612,7 +613,24 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
612
613
|
];
|
|
613
614
|
pluginConfiguration: import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined;
|
|
614
615
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
615
|
-
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined
|
|
616
|
+
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined>>,
|
|
617
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
618
|
+
actions: {
|
|
619
|
+
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
620
|
+
registerComponents: import("packages/editor/editor-plugin-toolbar/dist/types/types").RegisterComponentsAction;
|
|
621
|
+
};
|
|
622
|
+
dependencies: [
|
|
623
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>,
|
|
624
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>,
|
|
625
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>,
|
|
626
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>,
|
|
627
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>
|
|
628
|
+
];
|
|
629
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
630
|
+
sharedState: {
|
|
631
|
+
shouldShowToolbar: boolean;
|
|
632
|
+
};
|
|
633
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined>>
|
|
616
634
|
];
|
|
617
635
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-block").CodeBlockPluginOptions | undefined;
|
|
618
636
|
sharedState: {
|
|
@@ -554,7 +554,24 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
554
554
|
];
|
|
555
555
|
pluginConfiguration: import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined;
|
|
556
556
|
sharedState: import("@atlaskit/editor-common/selection").SelectionSharedState;
|
|
557
|
-
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined
|
|
557
|
+
}, import("@atlaskit/editor-plugins/selection").SelectionPluginOptions | undefined>>,
|
|
558
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"toolbar", {
|
|
559
|
+
actions: {
|
|
560
|
+
getComponents: () => Array<import("@atlaskit/editor-toolbar-model").RegisterComponent>;
|
|
561
|
+
registerComponents: import("packages/editor/editor-plugin-toolbar/dist/types/types").RegisterComponentsAction;
|
|
562
|
+
};
|
|
563
|
+
dependencies: [
|
|
564
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/user-intent").UserIntentPlugin>,
|
|
565
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/selection").SelectionPlugin>,
|
|
566
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-user-preferences").UserPreferencesPlugin>,
|
|
567
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/editor-viewmode").EditorViewModePlugin>,
|
|
568
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/connectivity").ConnectivityPlugin>
|
|
569
|
+
];
|
|
570
|
+
pluginConfiguration?: import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions;
|
|
571
|
+
sharedState: {
|
|
572
|
+
shouldShowToolbar: boolean;
|
|
573
|
+
};
|
|
574
|
+
}, import("@atlaskit/editor-plugins/toolbar").ToolbarPluginOptions | undefined>>
|
|
558
575
|
];
|
|
559
576
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-block").CodeBlockPluginOptions | undefined;
|
|
560
577
|
sharedState: {
|
|
@@ -3,8 +3,9 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
4
4
|
type MainToolbarProps = {
|
|
5
5
|
children?: React.ReactNode;
|
|
6
|
+
isNewToolbarEnabled?: boolean;
|
|
6
7
|
twoLineEditorToolbar?: boolean;
|
|
7
8
|
useStickyToolbar?: UseStickyToolbarType;
|
|
8
9
|
};
|
|
9
|
-
export declare const MainToolbar: ({ useStickyToolbar, twoLineEditorToolbar, children, }: MainToolbarProps) => jsx.JSX.Element;
|
|
10
|
+
export declare const MainToolbar: ({ useStickyToolbar, twoLineEditorToolbar, children, isNewToolbarEnabled, }: MainToolbarProps) => jsx.JSX.Element;
|
|
10
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "211.2.
|
|
3
|
+
"version": "211.2.10",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@atlaskit/mention": "^24.2.0",
|
|
62
62
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
63
63
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
64
|
-
"@atlaskit/react-ufo": "^4.
|
|
64
|
+
"@atlaskit/react-ufo": "^4.6.0",
|
|
65
65
|
"@atlaskit/task-decision": "^19.2.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^12.8.0",
|
|
67
67
|
"@atlaskit/tokens": "^6.3.0",
|
|
68
68
|
"@atlaskit/tooltip": "^20.4.0",
|
|
69
69
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
95
95
|
"@atlaskit/collab-provider": "^12.0.0",
|
|
96
96
|
"@atlaskit/editor-plugin-annotation": "^4.0.0",
|
|
97
|
-
"@atlaskit/editor-plugin-card": "^8.
|
|
97
|
+
"@atlaskit/editor-plugin-card": "^8.1.0",
|
|
98
98
|
"@atlaskit/editor-plugin-list": "^6.0.0",
|
|
99
99
|
"@atlaskit/editor-plugin-paste": "^5.0.0",
|
|
100
100
|
"@atlaskit/link-provider": "^3.7.0",
|