@atlaskit/editor-core 209.8.0 → 209.8.1
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 +9 -0
- package/afm-passionfruit/tsconfig.json +115 -0
- package/afm-volt/tsconfig.json +10 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -9
- package/dist/cjs/ui/Appearance/Comment/CommentToolbar.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -1
- package/dist/cjs/ui/Toolbar/Toolbar.js +5 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +10 -9
- package/dist/es2019/ui/Appearance/Comment/CommentToolbar.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -1
- package/dist/es2019/ui/Toolbar/Toolbar.js +6 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +10 -9
- package/dist/esm/ui/Appearance/Comment/CommentToolbar.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +2 -1
- package/dist/esm/ui/Toolbar/Toolbar.js +6 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +1 -0
- package/dist/types/presets/universal.d.ts +1 -0
- package/dist/types/presets/useUniversalPreset.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +2 -3
- package/dist/types/ui/Toolbar/Toolbar.d.ts +4 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +3 -0
- package/dist/types-ts4.5/presets/universal.d.ts +3 -0
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +3 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +4 -5
- package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +6 -1
- package/package.json +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 209.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#199957](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199957)
|
|
8
|
+
[`5c4cd82cd1ea3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c4cd82cd1ea3) -
|
|
9
|
+
Add unpinned version of menu item and hook up, add UiToolbarContext to primary toolbar components
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 209.8.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.passionfruit.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../passionfruit/tsDist/@atlaskit__editor-core/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/stories/*",
|
|
19
|
+
"../src/**/examples.*",
|
|
20
|
+
"../src/**/examples/*",
|
|
21
|
+
"../src/**/examples/**/*",
|
|
22
|
+
"../src/**/*.stories.*",
|
|
23
|
+
"../src/**/stories/*",
|
|
24
|
+
"../src/**/stories/**/*"
|
|
25
|
+
],
|
|
26
|
+
"references": [
|
|
27
|
+
{
|
|
28
|
+
"path": "../../activity-provider/afm-passionfruit/tsconfig.json"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"path": "../../../analytics/analytics-namespaced-context/afm-passionfruit/tsconfig.json"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "../../../analytics/analytics-next/afm-passionfruit/tsconfig.json"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"path": "../../../design-system/button/afm-passionfruit/tsconfig.json"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "../../../design-system/css/afm-passionfruit/tsconfig.json"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "../../editor-json-transformer/afm-passionfruit/tsconfig.json"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"path": "../../editor-performance-metrics/afm-passionfruit/tsconfig.json"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "../../editor-plugin-quick-insert/afm-passionfruit/tsconfig.json"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": "../../editor-plugin-user-preferences/afm-passionfruit/tsconfig.json"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"path": "../../editor-plugins/afm-passionfruit/tsconfig.json"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "../../editor-shared-styles/afm-passionfruit/tsconfig.json"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "../../editor-toolbar/afm-passionfruit/tsconfig.json"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"path": "../../editor-toolbar-model/afm-passionfruit/tsconfig.json"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"path": "../../../elements/emoji/afm-passionfruit/tsconfig.json"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"path": "../../../design-system/icon/afm-passionfruit/tsconfig.json"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"path": "../../../design-system/link/afm-passionfruit/tsconfig.json"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"path": "../../../media/media-card/afm-passionfruit/tsconfig.json"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"path": "../../../elements/mention/afm-passionfruit/tsconfig.json"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"path": "../../../platform/feature-flags/afm-passionfruit/tsconfig.json"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"path": "../../../platform/feature-flags-react/afm-passionfruit/tsconfig.json"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"path": "../../../react-ufo/atlaskit/afm-passionfruit/tsconfig.json"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"path": "../../../elements/task-decision/afm-passionfruit/tsconfig.json"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"path": "../../tmp-editor-statsig/afm-passionfruit/tsconfig.json"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"path": "../../../design-system/tokens/afm-passionfruit/tsconfig.json"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"path": "../../../design-system/tooltip/afm-passionfruit/tsconfig.json"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"path": "../../../design-system/width-detector/afm-passionfruit/tsconfig.json"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"path": "../../editor-common/afm-passionfruit/tsconfig.json"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"path": "../../../linking-platform/link-provider/afm-passionfruit/tsconfig.json"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"path": "../../../media/media-core/afm-passionfruit/tsconfig.json"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
package/afm-volt/tsconfig.json
CHANGED
|
@@ -15,7 +15,13 @@
|
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
17
|
"../src/**/test.*",
|
|
18
|
-
"../src/stories/*"
|
|
18
|
+
"../src/stories/*",
|
|
19
|
+
"../src/**/examples.*",
|
|
20
|
+
"../src/**/examples/*",
|
|
21
|
+
"../src/**/examples/**/*",
|
|
22
|
+
"../src/**/*.stories.*",
|
|
23
|
+
"../src/**/stories/*",
|
|
24
|
+
"../src/**/stories/**/*"
|
|
19
25
|
],
|
|
20
26
|
"references": [
|
|
21
27
|
{
|
|
@@ -33,9 +39,6 @@
|
|
|
33
39
|
{
|
|
34
40
|
"path": "../../../design-system/css/afm-volt/tsconfig.json"
|
|
35
41
|
},
|
|
36
|
-
{
|
|
37
|
-
"path": "../../editor-common/afm-volt/tsconfig.json"
|
|
38
|
-
},
|
|
39
42
|
{
|
|
40
43
|
"path": "../../editor-json-transformer/afm-volt/tsconfig.json"
|
|
41
44
|
},
|
|
@@ -93,6 +96,9 @@
|
|
|
93
96
|
{
|
|
94
97
|
"path": "../../../design-system/width-detector/afm-volt/tsconfig.json"
|
|
95
98
|
},
|
|
99
|
+
{
|
|
100
|
+
"path": "../../editor-common/afm-volt/tsconfig.json"
|
|
101
|
+
},
|
|
96
102
|
{
|
|
97
103
|
"path": "../../../linking-platform/link-provider/afm-volt/tsconfig.json"
|
|
98
104
|
},
|
|
@@ -227,6 +227,10 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
227
227
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
228
228
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
229
229
|
}
|
|
230
|
+
var customToolbarSlot = (0, _react2.jsx)("div", {
|
|
231
|
+
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 */
|
|
232
|
+
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
233
|
+
}, customPrimaryToolbarComponents);
|
|
230
234
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
231
235
|
animate: maxContentSizeReached
|
|
232
236
|
}, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
|
|
@@ -243,7 +247,10 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
243
247
|
}, (0, _react2.jsx)(_Toolbar.MainToolbar, {
|
|
244
248
|
useStickyToolbar: useStickyToolbar,
|
|
245
249
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
246
|
-
}, (0, _react2.jsx)(
|
|
250
|
+
}, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true) ? (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
|
|
251
|
+
editorAPI: editorAPI,
|
|
252
|
+
editorView: editorView
|
|
253
|
+
}), customToolbarSlot) : (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
247
254
|
editorView: editorView,
|
|
248
255
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
249
256
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -251,10 +258,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
251
258
|
editorAppearance: appearance,
|
|
252
259
|
useStickyToolbar: useStickyToolbar,
|
|
253
260
|
intl: intl
|
|
254
|
-
}, (0,
|
|
255
|
-
editorAPI: editorAPI,
|
|
256
|
-
editorView: editorView
|
|
257
|
-
}) : (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
|
|
261
|
+
}, (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
|
|
258
262
|
// Ignored via go/ees005
|
|
259
263
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
260
264
|
, {
|
|
@@ -277,10 +281,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
277
281
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
278
282
|
containerElement: containerElement.current,
|
|
279
283
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
280
|
-
}), (0, _react2.jsx)(
|
|
281
|
-
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 */
|
|
282
|
-
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
283
|
-
}, customPrimaryToolbarComponents))), (0, _react2.jsx)(_ClickAreaBlock.default, {
|
|
284
|
+
}), customToolbarSlot)), (0, _react2.jsx)(_ClickAreaBlock.default, {
|
|
284
285
|
editorView: editorView,
|
|
285
286
|
editorDisabled: disabled
|
|
286
287
|
}, (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref) {
|
|
@@ -26,6 +26,7 @@ var CommentToolbar = exports.CommentToolbar = function CommentToolbar(_ref) {
|
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
27
27
|
toolbar: toolbar,
|
|
28
28
|
components: components,
|
|
29
|
-
editorView: editorView
|
|
29
|
+
editorView: editorView,
|
|
30
|
+
editorAPI: editorAPI
|
|
30
31
|
});
|
|
31
32
|
};
|
|
@@ -63,6 +63,7 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
|
|
|
63
63
|
}, beforeIcon), toolbarDockingPosition !== 'none' && components && (0, _toolbar2.isToolbar)(toolbar) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
|
|
64
64
|
toolbar: toolbar,
|
|
65
65
|
components: components,
|
|
66
|
-
editorView: editorView
|
|
66
|
+
editorView: editorView,
|
|
67
|
+
editorAPI: editorAPI
|
|
67
68
|
})));
|
|
68
69
|
};
|
|
@@ -43,9 +43,12 @@ var Toolbar = exports.Toolbar = function Toolbar(props) {
|
|
|
43
43
|
var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
|
|
44
44
|
var toolbar = _ref.toolbar,
|
|
45
45
|
components = _ref.components,
|
|
46
|
-
editorView = _ref.editorView
|
|
46
|
+
editorView = _ref.editorView,
|
|
47
|
+
editorAPI = _ref.editorAPI;
|
|
47
48
|
return /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarProvider, {
|
|
48
49
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarUIProvider, {
|
|
51
|
+
api: editorAPI
|
|
49
52
|
}, /*#__PURE__*/_react.default.createElement(_editorToolbarModel.ToolbarModelRenderer, {
|
|
50
53
|
toolbar: toolbar,
|
|
51
54
|
components: components,
|
|
@@ -54,5 +57,5 @@ var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
|
|
|
54
57
|
section: _editorToolbar.ToolbarSection,
|
|
55
58
|
menuSection: _editorToolbar.ToolbarDropdownItemSection
|
|
56
59
|
}
|
|
57
|
-
}));
|
|
60
|
+
})));
|
|
58
61
|
};
|
|
@@ -229,6 +229,10 @@ export const CommentEditorWithIntl = props => {
|
|
|
229
229
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
230
230
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
231
231
|
}
|
|
232
|
+
const customToolbarSlot = jsx("div", {
|
|
233
|
+
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 */
|
|
234
|
+
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
235
|
+
}, customPrimaryToolbarComponents);
|
|
232
236
|
return jsx(WithFlash, {
|
|
233
237
|
animate: maxContentSizeReached
|
|
234
238
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
@@ -245,7 +249,10 @@ export const CommentEditorWithIntl = props => {
|
|
|
245
249
|
}, jsx(MainToolbar, {
|
|
246
250
|
useStickyToolbar: useStickyToolbar,
|
|
247
251
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
248
|
-
}, jsx(
|
|
252
|
+
}, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
253
|
+
editorAPI: editorAPI,
|
|
254
|
+
editorView: editorView
|
|
255
|
+
}), customToolbarSlot) : jsx(ToolbarArrowKeyNavigationProvider, {
|
|
249
256
|
editorView: editorView,
|
|
250
257
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
251
258
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -253,10 +260,7 @@ export const CommentEditorWithIntl = props => {
|
|
|
253
260
|
editorAppearance: appearance,
|
|
254
261
|
useStickyToolbar: useStickyToolbar,
|
|
255
262
|
intl: intl
|
|
256
|
-
},
|
|
257
|
-
editorAPI: editorAPI,
|
|
258
|
-
editorView: editorView
|
|
259
|
-
}) : jsx(Toolbar
|
|
263
|
+
}, jsx(Toolbar
|
|
260
264
|
// Ignored via go/ees005
|
|
261
265
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
262
266
|
, {
|
|
@@ -279,10 +283,7 @@ export const CommentEditorWithIntl = props => {
|
|
|
279
283
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
280
284
|
containerElement: containerElement.current,
|
|
281
285
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
282
|
-
}), jsx(
|
|
283
|
-
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 */
|
|
284
|
-
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
285
|
-
}, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
|
|
286
|
+
}), customToolbarSlot)), jsx(ClickAreaBlock, {
|
|
286
287
|
editorView: editorView,
|
|
287
288
|
editorDisabled: disabled
|
|
288
289
|
}, jsx(WidthConsumer, null, ({
|
|
@@ -57,6 +57,7 @@ export const FullPageToolbarNext = ({
|
|
|
57
57
|
}, beforeIcon), toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
58
58
|
toolbar: toolbar,
|
|
59
59
|
components: components,
|
|
60
|
-
editorView: editorView
|
|
60
|
+
editorView: editorView,
|
|
61
|
+
editorAPI: editorAPI
|
|
61
62
|
})));
|
|
62
63
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EditorToolbarProvider } from '@atlaskit/editor-common/toolbar';
|
|
2
|
+
import { EditorToolbarProvider, EditorToolbarUIProvider } from '@atlaskit/editor-common/toolbar';
|
|
3
3
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { ToolbarButtonGroup, ToolbarDropdownItemSection, ToolbarSection } from '@atlaskit/editor-toolbar';
|
|
5
5
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
@@ -37,10 +37,13 @@ export const Toolbar = props => {
|
|
|
37
37
|
export const ToolbarNext = ({
|
|
38
38
|
toolbar,
|
|
39
39
|
components,
|
|
40
|
-
editorView
|
|
40
|
+
editorView,
|
|
41
|
+
editorAPI
|
|
41
42
|
}) => {
|
|
42
43
|
return /*#__PURE__*/React.createElement(EditorToolbarProvider, {
|
|
43
44
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null
|
|
45
|
+
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
46
|
+
api: editorAPI
|
|
44
47
|
}, /*#__PURE__*/React.createElement(ToolbarModelRenderer, {
|
|
45
48
|
toolbar: toolbar,
|
|
46
49
|
components: components,
|
|
@@ -49,5 +52,5 @@ export const ToolbarNext = ({
|
|
|
49
52
|
section: ToolbarSection,
|
|
50
53
|
menuSection: ToolbarDropdownItemSection
|
|
51
54
|
}
|
|
52
|
-
}));
|
|
55
|
+
})));
|
|
53
56
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "209.
|
|
2
|
+
export const version = "209.8.0";
|
|
@@ -219,6 +219,10 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
219
219
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
220
220
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
221
221
|
}
|
|
222
|
+
var customToolbarSlot = jsx("div", {
|
|
223
|
+
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 */
|
|
224
|
+
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
225
|
+
}, customPrimaryToolbarComponents);
|
|
222
226
|
return jsx(WithFlash, {
|
|
223
227
|
animate: maxContentSizeReached
|
|
224
228
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
@@ -235,7 +239,10 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
235
239
|
}, jsx(MainToolbar, {
|
|
236
240
|
useStickyToolbar: useStickyToolbar,
|
|
237
241
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
238
|
-
}, jsx(
|
|
242
|
+
}, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
243
|
+
editorAPI: editorAPI,
|
|
244
|
+
editorView: editorView
|
|
245
|
+
}), customToolbarSlot) : jsx(ToolbarArrowKeyNavigationProvider, {
|
|
239
246
|
editorView: editorView,
|
|
240
247
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
241
248
|
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
@@ -243,10 +250,7 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
243
250
|
editorAppearance: appearance,
|
|
244
251
|
useStickyToolbar: useStickyToolbar,
|
|
245
252
|
intl: intl
|
|
246
|
-
},
|
|
247
|
-
editorAPI: editorAPI,
|
|
248
|
-
editorView: editorView
|
|
249
|
-
}) : jsx(Toolbar
|
|
253
|
+
}, jsx(Toolbar
|
|
250
254
|
// Ignored via go/ees005
|
|
251
255
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
252
256
|
, {
|
|
@@ -269,10 +273,7 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
269
273
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
270
274
|
containerElement: containerElement.current,
|
|
271
275
|
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
272
|
-
}), jsx(
|
|
273
|
-
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 */
|
|
274
|
-
mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
275
|
-
}, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
|
|
276
|
+
}), customToolbarSlot)), jsx(ClickAreaBlock, {
|
|
276
277
|
editorView: editorView,
|
|
277
278
|
editorDisabled: disabled
|
|
278
279
|
}, jsx(WidthConsumer, null, function (_ref) {
|
|
@@ -56,6 +56,7 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref2) {
|
|
|
56
56
|
}, beforeIcon), toolbarDockingPosition !== 'none' && components && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
|
|
57
57
|
toolbar: toolbar,
|
|
58
58
|
components: components,
|
|
59
|
-
editorView: editorView
|
|
59
|
+
editorView: editorView,
|
|
60
|
+
editorAPI: editorAPI
|
|
60
61
|
})));
|
|
61
62
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EditorToolbarProvider } from '@atlaskit/editor-common/toolbar';
|
|
2
|
+
import { EditorToolbarProvider, EditorToolbarUIProvider } from '@atlaskit/editor-common/toolbar';
|
|
3
3
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { ToolbarButtonGroup, ToolbarDropdownItemSection, ToolbarSection } from '@atlaskit/editor-toolbar';
|
|
5
5
|
import { ToolbarModelRenderer } from '@atlaskit/editor-toolbar-model';
|
|
@@ -37,9 +37,12 @@ export var Toolbar = function Toolbar(props) {
|
|
|
37
37
|
export var ToolbarNext = function ToolbarNext(_ref) {
|
|
38
38
|
var toolbar = _ref.toolbar,
|
|
39
39
|
components = _ref.components,
|
|
40
|
-
editorView = _ref.editorView
|
|
40
|
+
editorView = _ref.editorView,
|
|
41
|
+
editorAPI = _ref.editorAPI;
|
|
41
42
|
return /*#__PURE__*/React.createElement(EditorToolbarProvider, {
|
|
42
43
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null
|
|
44
|
+
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
45
|
+
api: editorAPI
|
|
43
46
|
}, /*#__PURE__*/React.createElement(ToolbarModelRenderer, {
|
|
44
47
|
toolbar: toolbar,
|
|
45
48
|
components: components,
|
|
@@ -48,5 +51,5 @@ export var ToolbarNext = function ToolbarNext(_ref) {
|
|
|
48
51
|
section: ToolbarSection,
|
|
49
52
|
menuSection: ToolbarDropdownItemSection
|
|
50
53
|
}
|
|
51
|
-
}));
|
|
54
|
+
})));
|
|
52
55
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "209.
|
|
2
|
+
export var version = "209.8.0";
|
|
@@ -5,6 +5,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
5
5
|
prevProps?: EditorProps;
|
|
6
6
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
7
7
|
}): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", string, string, "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
8
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/limited-mode").LimitedModePlugin>];
|
|
8
9
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
9
10
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
10
11
|
dependencies: import("@atlaskit/editor-plugins/paste-options-toolbar").PasteOptionsToolbarPluginDependencies;
|
|
@@ -56,6 +56,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
56
56
|
prevAppearance?: EditorAppearance;
|
|
57
57
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
58
58
|
}): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", string, string, "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
59
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/limited-mode").LimitedModePlugin>];
|
|
59
60
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
60
61
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
61
62
|
dependencies: import("@atlaskit/editor-plugins/paste-options-toolbar").PasteOptionsToolbarPluginDependencies;
|
|
@@ -5,6 +5,7 @@ interface PresetProps {
|
|
|
5
5
|
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
6
6
|
}
|
|
7
7
|
export default function useUniversalPreset({ props, initialPluginConfiguration }: PresetProps): import("@atlaskit/editor-common/preset").EditorPresetBuilder<["codeBidiWarning", "pasteOptionsToolbarPlugin", import("@atlaskit/editor-common/preset").MaybePluginName<"fragmentPlugin">, import("@atlaskit/editor-common/preset").MaybePluginName<"border">, import("@atlaskit/editor-common/preset").MaybePluginName<"findReplace">, "avatarGroup", import("@atlaskit/editor-common/preset").MaybePluginName<"beforePrimaryToolbar">, "insertBlock", "toolbarListsIndentation", import("@atlaskit/editor-common/preset").MaybePluginName<"scrollIntoView">, import("@atlaskit/editor-common/preset").MaybePluginName<"indentation">, import("@atlaskit/editor-common/preset").MaybePluginName<"status">, import("@atlaskit/editor-common/preset").MaybePluginName<"customAutoformat">, import("@atlaskit/editor-common/preset").MaybePluginName<"card">, import("@atlaskit/editor-common/preset").MaybePluginName<"layout">, import("@atlaskit/editor-common/preset").MaybePluginName<"placeholderText">, import("@atlaskit/editor-common/preset").MaybePluginName<"date">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"extension">, import("@atlaskit/editor-common/preset").MaybePluginName<"contextPanel">, import("@atlaskit/editor-common/preset").MaybePluginName<"panel">, import("@atlaskit/editor-common/preset").MaybePluginName<"maxContentSize">, import("@atlaskit/editor-common/preset").MaybePluginName<"collabEdit">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"imageUpload">, import("@atlaskit/editor-common/preset").MaybePluginName<"saveOnEnter">, import("@atlaskit/editor-common/preset").MaybePluginName<"helpDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"feedbackDialog">, import("@atlaskit/editor-common/preset").MaybePluginName<"taskDecision">, import("@atlaskit/editor-common/preset").MaybePluginName<"table">, import("@atlaskit/editor-common/preset").MaybePluginName<"emoji">, import("@atlaskit/editor-common/preset").MaybePluginName<"mention">, import("@atlaskit/editor-common/preset").MaybePluginName<"caption">, import("@atlaskit/editor-common/preset").MaybePluginName<"mediaInsert">, import("@atlaskit/editor-common/preset").MaybePluginName<"media">, import("@atlaskit/editor-common/preset").MaybePluginName<"annotation">, import("@atlaskit/editor-common/preset").MaybePluginName<"grid">, import("@atlaskit/editor-common/preset").MaybePluginName<"guideline">, import("@atlaskit/editor-common/preset").MaybePluginName<"expand">, import("@atlaskit/editor-common/preset").MaybePluginName<"rule">, "list", import("@atlaskit/editor-common/preset").MaybePluginName<"textColor">, import("@atlaskit/editor-common/preset").MaybePluginName<"alignment">, import("@atlaskit/editor-common/preset").MaybePluginName<"breakout">, "batchAttributeUpdates", "contentInsertion", "accessibilityUtils", "dataConsumer", "ufo", "codeBlock", "selection", "floatingToolbar", "copyButton", "submitEditor", "editorDisabled", "unsupportedContent", "placeholder", "quickInsert", "width", "textFormatting", "hyperlink", "selectionToolbar", "clearMarksOnEmptyDoc", "blockType", string, "primaryToolbar", string, string, "typeAhead", "decorations", "base", "contextIdentifier", "composition", string, string, "focus", "clipboard", "paste", "betterTypeHistory", string, "featureFlags"], [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
8
|
+
dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/limited-mode").LimitedModePlugin>];
|
|
8
9
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
9
10
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
10
11
|
dependencies: import("@atlaskit/editor-plugins/paste-options-toolbar").PasteOptionsToolbarPluginDependencies;
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type {
|
|
6
|
+
import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
8
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
-
type ToolbarEditorPlugins = [OptionalPlugin<ToolbarPlugin>];
|
|
10
9
|
type FullPageToolbarNextProps = {
|
|
11
10
|
beforeIcon?: React.ReactNode;
|
|
12
|
-
editorAPI?: PublicPluginAPI<
|
|
11
|
+
editorAPI?: PublicPluginAPI<[ToolbarPlugin]>;
|
|
13
12
|
toolbarDockingPosition?: 'top' | 'none';
|
|
14
13
|
editorView?: EditorView;
|
|
15
14
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
2
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
5
|
import type { RegisterComponent, RegisterToolbar } from '@atlaskit/editor-toolbar-model';
|
|
4
6
|
import type { ToolbarProps } from './toolbar-types';
|
|
@@ -12,6 +14,7 @@ type NewToolbarProps = {
|
|
|
12
14
|
toolbar: RegisterToolbar;
|
|
13
15
|
components: RegisterComponent[];
|
|
14
16
|
editorView?: EditorView;
|
|
17
|
+
editorAPI?: PublicPluginAPI<[ToolbarPlugin]>;
|
|
15
18
|
};
|
|
16
19
|
/**
|
|
17
20
|
* Renders a primary toolbar, driven by components registed by `editor-plugin-toolbar`. `ToolbarModelRenderer` will just
|
|
@@ -19,5 +22,5 @@ type NewToolbarProps = {
|
|
|
19
22
|
*
|
|
20
23
|
* The majority of components UI should use `@atlaskit/editor-toolbar` components.
|
|
21
24
|
*/
|
|
22
|
-
export declare const ToolbarNext: ({ toolbar, components, editorView }: NewToolbarProps) => React.JSX.Element;
|
|
25
|
+
export declare const ToolbarNext: ({ toolbar, components, editorView, editorAPI }: NewToolbarProps) => React.JSX.Element;
|
|
23
26
|
export {};
|
|
@@ -88,6 +88,9 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
88
88
|
"featureFlags"
|
|
89
89
|
], [
|
|
90
90
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
91
|
+
dependencies: [
|
|
92
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/limited-mode").LimitedModePlugin>
|
|
93
|
+
];
|
|
91
94
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
92
95
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>,
|
|
93
96
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
@@ -139,6 +139,9 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
139
139
|
"featureFlags"
|
|
140
140
|
], [
|
|
141
141
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
142
|
+
dependencies: [
|
|
143
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/limited-mode").LimitedModePlugin>
|
|
144
|
+
];
|
|
142
145
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
143
146
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>,
|
|
144
147
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
@@ -88,6 +88,9 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
88
88
|
"featureFlags"
|
|
89
89
|
], [
|
|
90
90
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"codeBidiWarning", {
|
|
91
|
+
dependencies: [
|
|
92
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/limited-mode").LimitedModePlugin>
|
|
93
|
+
];
|
|
91
94
|
pluginConfiguration: import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined;
|
|
92
95
|
}, import("@atlaskit/editor-plugins/code-bidi-warning").CodeBidiWarningPluginOptions | undefined>,
|
|
93
96
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"pasteOptionsToolbarPlugin", {
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type {
|
|
6
|
+
import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
8
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
-
type ToolbarEditorPlugins = [
|
|
10
|
-
OptionalPlugin<ToolbarPlugin>
|
|
11
|
-
];
|
|
12
9
|
type FullPageToolbarNextProps = {
|
|
13
10
|
beforeIcon?: React.ReactNode;
|
|
14
|
-
editorAPI?: PublicPluginAPI<
|
|
11
|
+
editorAPI?: PublicPluginAPI<[
|
|
12
|
+
ToolbarPlugin
|
|
13
|
+
]>;
|
|
15
14
|
toolbarDockingPosition?: 'top' | 'none';
|
|
16
15
|
editorView?: EditorView;
|
|
17
16
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
2
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
5
|
import type { RegisterComponent, RegisterToolbar } from '@atlaskit/editor-toolbar-model';
|
|
4
6
|
import type { ToolbarProps } from './toolbar-types';
|
|
@@ -12,6 +14,9 @@ type NewToolbarProps = {
|
|
|
12
14
|
toolbar: RegisterToolbar;
|
|
13
15
|
components: RegisterComponent[];
|
|
14
16
|
editorView?: EditorView;
|
|
17
|
+
editorAPI?: PublicPluginAPI<[
|
|
18
|
+
ToolbarPlugin
|
|
19
|
+
]>;
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
17
22
|
* Renders a primary toolbar, driven by components registed by `editor-plugin-toolbar`. `ToolbarModelRenderer` will just
|
|
@@ -19,5 +24,5 @@ type NewToolbarProps = {
|
|
|
19
24
|
*
|
|
20
25
|
* The majority of components UI should use `@atlaskit/editor-toolbar` components.
|
|
21
26
|
*/
|
|
22
|
-
export declare const ToolbarNext: ({ toolbar, components, editorView }: NewToolbarProps) => React.JSX.Element;
|
|
27
|
+
export declare const ToolbarNext: ({ toolbar, components, editorView, editorAPI }: NewToolbarProps) => React.JSX.Element;
|
|
23
28
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "209.8.
|
|
3
|
+
"version": "209.8.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"uuid": "^3.1.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@atlaskit/editor-common": "^107.
|
|
83
|
+
"@atlaskit/editor-common": "^107.22.0",
|
|
84
84
|
"@atlaskit/link-provider": "^3.4.0",
|
|
85
85
|
"@atlaskit/media-core": "^37.0.0",
|
|
86
86
|
"react": "^18.2.0",
|
|
@@ -253,10 +253,6 @@
|
|
|
253
253
|
"type": "boolean",
|
|
254
254
|
"referenceOnly": true
|
|
255
255
|
},
|
|
256
|
-
"platform_editor_plugin_selection_marker_bugfix": {
|
|
257
|
-
"type": "boolean",
|
|
258
|
-
"referenceOnly": true
|
|
259
|
-
},
|
|
260
256
|
"platform_editor_table_overflow_in_full_width_fix": {
|
|
261
257
|
"type": "boolean",
|
|
262
258
|
"referenceOnly": true
|