@atlaskit/editor-core 209.8.0 → 209.8.2
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 +22 -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/Comment/Toolbar.js +15 -8
- 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/Comment/Toolbar.js +16 -7
- 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/Comment/Toolbar.js +15 -8
- 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 +7 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 209.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#199851](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199851)
|
|
8
|
+
[`a37fa5c2adf4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a37fa5c2adf4a) -
|
|
9
|
+
[ux] EDITOR-346 Clean up nested tables feature gate
|
|
10
|
+
`platform_editor_nested_tables_number_column_fixes`
|
|
11
|
+
- [#201076](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/201076)
|
|
12
|
+
[`f77782099391b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f77782099391b) -
|
|
13
|
+
Add css overrides for comment toolbar to remove left padding overrides
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 209.8.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [#199957](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199957)
|
|
21
|
+
[`5c4cd82cd1ea3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c4cd82cd1ea3) -
|
|
22
|
+
Add unpinned version of menu item and hook up, add UiToolbarContext to primary toolbar components
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 209.8.0
|
|
4
26
|
|
|
5
27
|
### 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
|
};
|
|
@@ -25,12 +25,10 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
25
25
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
26
26
|
var akEditorMenuZIndex = 500;
|
|
27
27
|
var akEditorToolbarKeylineHeight = 2;
|
|
28
|
-
|
|
29
|
-
/* eslint-disable @atlaskit/platform/ensure-feature-flag-registration */
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
31
28
|
var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
|
|
32
29
|
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
33
|
-
|
|
30
|
+
var isToolbarAifcEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
31
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\t", "\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n\n\t", "\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", isToolbarAifcEnabled ? '' : "padding-left: ".concat("var(--ds-space-250, 20px)", ";"), isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n /* make this more explicit for a toolbar */\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "), (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && 'span svg { max-width: 100%; }');
|
|
34
32
|
};
|
|
35
33
|
var mainToolbarWrapperStyleNew = (0, _react2.css)({
|
|
36
34
|
position: 'relative',
|
|
@@ -53,6 +51,11 @@ var mainToolbarWrapperStyleNew = (0, _react2.css)({
|
|
|
53
51
|
paddingLeft: 0
|
|
54
52
|
}
|
|
55
53
|
});
|
|
54
|
+
|
|
55
|
+
/** keep default padding for entire toolbar */
|
|
56
|
+
var mainToolbarWithoutLeftPadding = (0, _react2.css)({
|
|
57
|
+
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)", " 0")
|
|
58
|
+
});
|
|
56
59
|
var mainToolbarTwoLineStylesNew = (0, _react2.css)({
|
|
57
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
58
61
|
'& > div': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
@@ -109,9 +112,11 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
109
112
|
return (
|
|
110
113
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
111
114
|
(0, _react2.jsx)("div", {
|
|
112
|
-
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, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true) && mainToolbarWithoutLeftPadding] : [
|
|
113
116
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
114
|
-
|
|
117
|
+
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
118
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
119
|
+
(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)), stickyToolbarWrapperStyle]
|
|
115
120
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
116
121
|
,
|
|
117
122
|
style: {
|
|
@@ -128,9 +133,11 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
128
133
|
return (
|
|
129
134
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
130
135
|
(0, _react2.jsx)("div", {
|
|
131
|
-
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, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true) && mainToolbarWithoutLeftPadding] :
|
|
132
137
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
133
|
-
mainToolbarWrapperStyle(props.twoLineEditorToolbar
|
|
138
|
+
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
140
|
+
(0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc', 'isEnabled', true)),
|
|
134
141
|
"data-testid": "ak-editor-main-toolbar"
|
|
135
142
|
}, props.children)
|
|
136
143
|
);
|
|
@@ -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, ({
|
|
@@ -13,10 +13,10 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
13
13
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
14
14
|
const akEditorMenuZIndex = 500;
|
|
15
15
|
const akEditorToolbarKeylineHeight = 2;
|
|
16
|
-
|
|
16
|
+
const mainToolbarWrapperStyle = (isTwoLineEditorToolbar = false, isToolbarAifcEnabled = false
|
|
17
17
|
/* eslint-disable @atlaskit/platform/ensure-feature-flag-registration */
|
|
18
18
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
19
|
-
|
|
19
|
+
) => css`
|
|
20
20
|
position: relative;
|
|
21
21
|
align-items: center;
|
|
22
22
|
padding: ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} 0;
|
|
@@ -24,7 +24,7 @@ const mainToolbarWrapperStyle = (isTwoLineEditorToolbar = false) => css`
|
|
|
24
24
|
height: auto;
|
|
25
25
|
background-color: ${"var(--ds-surface, white)"};
|
|
26
26
|
box-shadow: none;
|
|
27
|
-
padding-left: ${"var(--ds-space-250, 20px)"}
|
|
27
|
+
${isToolbarAifcEnabled ? '' : `padding-left: ${"var(--ds-space-250, 20px)"};`}
|
|
28
28
|
|
|
29
29
|
& > div {
|
|
30
30
|
> :first-child:not(style),
|
|
@@ -78,6 +78,11 @@ const mainToolbarWrapperStyleNew = css({
|
|
|
78
78
|
paddingLeft: 0
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
+
|
|
82
|
+
/** keep default padding for entire toolbar */
|
|
83
|
+
const mainToolbarWithoutLeftPadding = css({
|
|
84
|
+
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} 0`
|
|
85
|
+
});
|
|
81
86
|
const mainToolbarTwoLineStylesNew = css({
|
|
82
87
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
83
88
|
'& > div': {
|
|
@@ -152,9 +157,11 @@ const StickyToolbar = props => {
|
|
|
152
157
|
return (
|
|
153
158
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
154
159
|
jsx("div", {
|
|
155
|
-
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, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) && mainToolbarWithoutLeftPadding] : [
|
|
156
161
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
157
|
-
|
|
162
|
+
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
163
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
164
|
+
expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)), stickyToolbarWrapperStyle]
|
|
158
165
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
159
166
|
,
|
|
160
167
|
style: {
|
|
@@ -170,9 +177,11 @@ const StickyToolbar = props => {
|
|
|
170
177
|
const FixedToolbar = props =>
|
|
171
178
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
172
179
|
jsx("div", {
|
|
173
|
-
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, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) && mainToolbarWithoutLeftPadding] :
|
|
174
181
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
175
|
-
mainToolbarWrapperStyle(props.twoLineEditorToolbar
|
|
182
|
+
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
183
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
184
|
+
expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)),
|
|
176
185
|
"data-testid": "ak-editor-main-toolbar"
|
|
177
186
|
}, props.children);
|
|
178
187
|
|
|
@@ -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.1";
|
|
@@ -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) {
|
|
@@ -18,12 +18,10 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
18
18
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
19
19
|
var akEditorMenuZIndex = 500;
|
|
20
20
|
var akEditorToolbarKeylineHeight = 2;
|
|
21
|
-
|
|
22
|
-
/* eslint-disable @atlaskit/platform/ensure-feature-flag-registration */
|
|
23
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
24
21
|
var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
|
|
25
22
|
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
26
|
-
|
|
23
|
+
var isToolbarAifcEnabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
24
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tposition: relative;\n\talign-items: center;\n\tpadding: ", " ", " 0;\n\tdisplay: flex;\n\theight: auto;\n\tbackground-color: ", ";\n\tbox-shadow: none;\n\t", "\n\n\t& > div {\n\t\t> :first-child:not(style),\n\t\t> style:first-child + * {\n\t\t\tmargin-left: 0;\n\t\t}\n\t\t", "\n\t}\n\n\t.block-type-btn {\n\t\tpadding-left: 0;\n\t}\n\n\t", "\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", isToolbarAifcEnabled ? '' : "padding-left: ".concat("var(--ds-space-250, 20px)", ";"), isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n /* make this more explicit for a toolbar */\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "), fg('platform-visual-refresh-icons') && 'span svg { max-width: 100%; }');
|
|
27
25
|
};
|
|
28
26
|
var mainToolbarWrapperStyleNew = css({
|
|
29
27
|
position: 'relative',
|
|
@@ -46,6 +44,11 @@ var mainToolbarWrapperStyleNew = css({
|
|
|
46
44
|
paddingLeft: 0
|
|
47
45
|
}
|
|
48
46
|
});
|
|
47
|
+
|
|
48
|
+
/** keep default padding for entire toolbar */
|
|
49
|
+
var mainToolbarWithoutLeftPadding = css({
|
|
50
|
+
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)", " 0")
|
|
51
|
+
});
|
|
49
52
|
var mainToolbarTwoLineStylesNew = css({
|
|
50
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
54
|
'& > div': _defineProperty(_defineProperty({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
@@ -102,9 +105,11 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
102
105
|
return (
|
|
103
106
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
104
107
|
jsx("div", {
|
|
105
|
-
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, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) && mainToolbarWithoutLeftPadding] : [
|
|
106
109
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
107
|
-
|
|
110
|
+
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
112
|
+
expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)), stickyToolbarWrapperStyle]
|
|
108
113
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
109
114
|
,
|
|
110
115
|
style: {
|
|
@@ -121,9 +126,11 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
121
126
|
return (
|
|
122
127
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
123
128
|
jsx("div", {
|
|
124
|
-
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, expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true) && mainToolbarWithoutLeftPadding] :
|
|
125
130
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
126
|
-
mainToolbarWrapperStyle(props.twoLineEditorToolbar
|
|
131
|
+
mainToolbarWrapperStyle(props.twoLineEditorToolbar,
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
133
|
+
expValEquals('platform_editor_toolbar_aifc', 'isEnabled', true)),
|
|
127
134
|
"data-testid": "ak-editor-main-toolbar"
|
|
128
135
|
}, props.children)
|
|
129
136
|
);
|
|
@@ -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.1";
|
|
@@ -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.2",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/editor-toolbar": "^0.2.0",
|
|
56
56
|
"@atlaskit/editor-toolbar-model": "^0.1.0",
|
|
57
57
|
"@atlaskit/emoji": "^69.3.0",
|
|
58
|
-
"@atlaskit/icon": "^27.
|
|
58
|
+
"@atlaskit/icon": "^27.12.0",
|
|
59
59
|
"@atlaskit/link": "^3.2.0",
|
|
60
60
|
"@atlaskit/media-card": "^79.5.0",
|
|
61
61
|
"@atlaskit/mention": "^24.2.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
64
64
|
"@atlaskit/react-ufo": "^4.2.0",
|
|
65
65
|
"@atlaskit/task-decision": "^19.2.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^9.28.0",
|
|
67
67
|
"@atlaskit/tokens": "^6.0.0",
|
|
68
68
|
"@atlaskit/tooltip": "^20.4.0",
|
|
69
69
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -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.23.0",
|
|
84
84
|
"@atlaskit/link-provider": "^3.4.0",
|
|
85
85
|
"@atlaskit/media-core": "^37.0.0",
|
|
86
86
|
"react": "^18.2.0",
|
|
@@ -94,19 +94,19 @@
|
|
|
94
94
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
95
95
|
"@atlaskit/collab-provider": "^11.2.0",
|
|
96
96
|
"@atlaskit/editor-plugin-annotation": "^3.2.0",
|
|
97
|
-
"@atlaskit/editor-plugin-card": "^7.
|
|
97
|
+
"@atlaskit/editor-plugin-card": "^7.4.0",
|
|
98
98
|
"@atlaskit/editor-plugin-list": "^5.1.0",
|
|
99
99
|
"@atlaskit/editor-plugin-paste": "^4.1.0",
|
|
100
100
|
"@atlaskit/link-provider": "^3.4.0",
|
|
101
101
|
"@atlaskit/logo": "^19.6.0",
|
|
102
102
|
"@atlaskit/media-core": "^37.0.0",
|
|
103
103
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
104
|
-
"@atlaskit/media-test-helpers": "^
|
|
104
|
+
"@atlaskit/media-test-helpers": "^38.0.0",
|
|
105
105
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
106
106
|
"@atlaskit/primitives": "^14.11.0",
|
|
107
107
|
"@atlaskit/renderer": "^120.4.0",
|
|
108
108
|
"@atlaskit/section-message": "^8.5.0",
|
|
109
|
-
"@atlaskit/smart-card": "^40.
|
|
109
|
+
"@atlaskit/smart-card": "^40.10.0",
|
|
110
110
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
111
111
|
"@atlaskit/toggle": "^15.1.0",
|
|
112
112
|
"@atlaskit/util-data-test": "^18.1.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
|
|
@@ -338,10 +334,6 @@
|
|
|
338
334
|
"type": "boolean",
|
|
339
335
|
"referenceOnly": true
|
|
340
336
|
},
|
|
341
|
-
"platform_editor_nested_tables_number_column_fixes": {
|
|
342
|
-
"type": "boolean",
|
|
343
|
-
"referenceOnly": true
|
|
344
|
-
},
|
|
345
337
|
"platform_editor_elements_dnd_multi_select_patch_1": {
|
|
346
338
|
"type": "boolean",
|
|
347
339
|
"referenceOnly": true
|