@atlaskit/editor-core 216.7.14 → 216.7.16
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 +16 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +12 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +12 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +12 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/docs/4-annotations.tsx +16 -16
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 216.7.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e504eea6e1d3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e504eea6e1d3f) -
|
|
8
|
+
EDITOR-4665: Clean up platform_editor_toolbar_aifc_responsive_improve feature flag
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 216.7.15
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`b17f23c9e3a68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b17f23c9e3a68) -
|
|
16
|
+
Avoid rendering entire primary toolbar container when primary toolbar is not registered
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 216.7.14
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -19,7 +19,6 @@ var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages
|
|
|
19
19
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
20
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
21
21
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
22
|
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
24
23
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
25
24
|
var _EditorContentContainer = _interopRequireDefault(require("../../EditorContentContainer/EditorContentContainer"));
|
|
@@ -174,7 +173,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
174
173
|
}
|
|
175
174
|
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
176
175
|
var customToolbarSlot = (0, _react2.jsx)("div", {
|
|
177
|
-
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled &&
|
|
176
|
+
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
|
|
178
177
|
}, customPrimaryToolbarComponents);
|
|
179
178
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
180
179
|
animate: maxContentSizeReached
|
|
@@ -70,6 +70,9 @@ var ToolbarPlaceholder = function ToolbarPlaceholder() {
|
|
|
70
70
|
className: (0, _runtime.ax)([styles.toolbarPlaceholder])
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
+
var shouldShowToolbarContainer = function shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents) {
|
|
74
|
+
return !!toolbar || !!customPrimaryToolbarComponents;
|
|
75
|
+
};
|
|
73
76
|
var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
74
77
|
var _editorAPI$toolbar, _editorAPI$toolbar2, _useToolbarPortal;
|
|
75
78
|
var editorAPI = _ref4.editorAPI,
|
|
@@ -107,6 +110,15 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
|
|
|
107
110
|
event.preventDefault();
|
|
108
111
|
event.stopPropagation();
|
|
109
112
|
}, [editorView]);
|
|
113
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_primary_toolbar_early_exit', 'isEnabled', true)) {
|
|
114
|
+
// Remove entire primary toolbar region if:
|
|
115
|
+
// - primary toolbar isn't registered
|
|
116
|
+
// - no custom primary toolbar components to render
|
|
117
|
+
// note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
|
|
118
|
+
if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(ToolbarPortal, null, null);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
110
122
|
return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref6) {
|
|
111
123
|
var ContextPanelWidth = _ref6.width;
|
|
112
124
|
return /*#__PURE__*/_react.default.createElement(_ExcludeFromHydration.default, {
|
|
@@ -15,7 +15,6 @@ import messages from '@atlaskit/editor-common/messages';
|
|
|
15
15
|
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
16
16
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
17
17
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
// Ignored via go/ees005
|
|
20
19
|
// eslint-disable-next-line import/no-named-as-default
|
|
21
20
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
@@ -162,7 +161,7 @@ export const CommentEditorWithIntl = props => {
|
|
|
162
161
|
}
|
|
163
162
|
const isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
164
163
|
const customToolbarSlot = jsx("div", {
|
|
165
|
-
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled &&
|
|
164
|
+
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
|
|
166
165
|
}, customPrimaryToolbarComponents);
|
|
167
166
|
return jsx(WithFlash, {
|
|
168
167
|
animate: maxContentSizeReached
|
|
@@ -64,6 +64,9 @@ const ToolbarPlaceholder = () => {
|
|
|
64
64
|
className: ax([styles.toolbarPlaceholder])
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
+
const shouldShowToolbarContainer = (toolbar, customPrimaryToolbarComponents) => {
|
|
68
|
+
return !!toolbar || !!customPrimaryToolbarComponents;
|
|
69
|
+
};
|
|
67
70
|
export const FullPageToolbarNext = ({
|
|
68
71
|
editorAPI,
|
|
69
72
|
beforeIcon,
|
|
@@ -101,6 +104,15 @@ export const FullPageToolbarNext = ({
|
|
|
101
104
|
event.preventDefault();
|
|
102
105
|
event.stopPropagation();
|
|
103
106
|
}, [editorView]);
|
|
107
|
+
if (expValEquals('platform_editor_primary_toolbar_early_exit', 'isEnabled', true)) {
|
|
108
|
+
// Remove entire primary toolbar region if:
|
|
109
|
+
// - primary toolbar isn't registered
|
|
110
|
+
// - no custom primary toolbar components to render
|
|
111
|
+
// note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
|
|
112
|
+
if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
|
|
113
|
+
return /*#__PURE__*/React.createElement(ToolbarPortal, null, null);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
104
116
|
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
|
|
105
117
|
width: ContextPanelWidth
|
|
106
118
|
}) => /*#__PURE__*/React.createElement(ExcludeFromHydration, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "
|
|
2
|
+
export const version = "0.0.0-development";
|
|
@@ -17,7 +17,6 @@ import messages from '@atlaskit/editor-common/messages';
|
|
|
17
17
|
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
18
18
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
19
19
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
20
|
// Ignored via go/ees005
|
|
22
21
|
// eslint-disable-next-line import/no-named-as-default
|
|
23
22
|
import ClickAreaBlock from '../../Addon/ClickAreaBlock';
|
|
@@ -163,7 +162,7 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
163
162
|
}
|
|
164
163
|
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
165
164
|
var customToolbarSlot = jsx("div", {
|
|
166
|
-
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled &&
|
|
165
|
+
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
|
|
167
166
|
}, customPrimaryToolbarComponents);
|
|
168
167
|
return jsx(WithFlash, {
|
|
169
168
|
animate: maxContentSizeReached
|
|
@@ -61,6 +61,9 @@ var ToolbarPlaceholder = function ToolbarPlaceholder() {
|
|
|
61
61
|
className: ax([styles.toolbarPlaceholder])
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
+
var shouldShowToolbarContainer = function shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents) {
|
|
65
|
+
return !!toolbar || !!customPrimaryToolbarComponents;
|
|
66
|
+
};
|
|
64
67
|
export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
65
68
|
var _editorAPI$toolbar, _editorAPI$toolbar2, _useToolbarPortal;
|
|
66
69
|
var editorAPI = _ref4.editorAPI,
|
|
@@ -98,6 +101,15 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
98
101
|
event.preventDefault();
|
|
99
102
|
event.stopPropagation();
|
|
100
103
|
}, [editorView]);
|
|
104
|
+
if (expValEquals('platform_editor_primary_toolbar_early_exit', 'isEnabled', true)) {
|
|
105
|
+
// Remove entire primary toolbar region if:
|
|
106
|
+
// - primary toolbar isn't registered
|
|
107
|
+
// - no custom primary toolbar components to render
|
|
108
|
+
// note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
|
|
109
|
+
if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
|
|
110
|
+
return /*#__PURE__*/React.createElement(ToolbarPortal, null, null);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
101
113
|
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref6) {
|
|
102
114
|
var ContextPanelWidth = _ref6.width;
|
|
103
115
|
return /*#__PURE__*/React.createElement(ExcludeFromHydration, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "
|
|
2
|
+
export var version = "0.0.0-development";
|
package/docs/4-annotations.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { code, md } from '@atlaskit/docs';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import { N20
|
|
6
|
+
import { N20 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { token } from '@atlaskit/tokens';
|
|
8
8
|
|
|
9
9
|
import { Editor } from '../src';
|
|
@@ -204,7 +204,7 @@ class SplitExample extends React.Component<{ initialAdf: object }> {
|
|
|
204
204
|
padding: token('space.100', '8px'),
|
|
205
205
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
206
206
|
backgroundColor: N20,
|
|
207
|
-
border: `${token('border.width')} solid ${
|
|
207
|
+
border: `${token('border.width')} solid ${token('color.border.accent.gray')}`,
|
|
208
208
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
209
209
|
flex: 1,
|
|
210
210
|
}}
|
|
@@ -245,20 +245,20 @@ Currently, there is only the \`inlineComment\` type of annotation. In the future
|
|
|
245
245
|
These denote a comment thread about the given text, and are denoted by a yellow highlight. This is commonly seen within Confluence after selecting some text in View mode.
|
|
246
246
|
|
|
247
247
|
${(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
248
|
+
<div
|
|
249
|
+
style={{
|
|
250
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
251
|
+
margin: token('space.100', '8px'),
|
|
252
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
253
|
+
padding: token('space.100', '8px'),
|
|
254
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
255
|
+
backgroundColor: N20,
|
|
256
|
+
border: `${token('border.width')} solid ${token('color.border.accent.gray')}`,
|
|
257
|
+
}}
|
|
258
|
+
>
|
|
259
|
+
{inlineCommentEditor(initialExample)}
|
|
260
|
+
</div>
|
|
261
|
+
)}
|
|
262
262
|
|
|
263
263
|
### Example ADF
|
|
264
264
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "216.7.
|
|
3
|
+
"version": "216.7.16",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/editor-plugins": "^11.3.0",
|
|
55
55
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
56
56
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
57
|
-
"@atlaskit/editor-ssr-renderer": "^2.
|
|
57
|
+
"@atlaskit/editor-ssr-renderer": "^2.1.0",
|
|
58
58
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
59
59
|
"@atlaskit/editor-toolbar-model": "^0.3.0",
|
|
60
60
|
"@atlaskit/emoji": "^69.10.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
67
67
|
"@atlaskit/react-ufo": "^5.0.0",
|
|
68
68
|
"@atlaskit/task-decision": "^19.2.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^17.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^17.7.0",
|
|
70
70
|
"@atlaskit/tokens": "^10.1.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.14.0",
|
|
72
72
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"uuid": "^3.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@atlaskit/editor-common": "^111.
|
|
86
|
+
"@atlaskit/editor-common": "^111.11.0",
|
|
87
87
|
"@atlaskit/link-provider": "^4.1.0",
|
|
88
88
|
"@atlaskit/media-core": "^37.0.0",
|
|
89
89
|
"react": "^18.2.0",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
"@af/visual-regression": "workspace:^",
|
|
97
97
|
"@atlaskit/adf-utils": "^19.27.0",
|
|
98
98
|
"@atlaskit/analytics-listeners": "^9.3.0",
|
|
99
|
-
"@atlaskit/collab-provider": "^15.
|
|
99
|
+
"@atlaskit/collab-provider": "^15.2.0",
|
|
100
100
|
"@atlaskit/editor-plugin-annotation": "^7.1.0",
|
|
101
|
-
"@atlaskit/editor-plugin-card": "^12.
|
|
101
|
+
"@atlaskit/editor-plugin-card": "^12.2.0",
|
|
102
102
|
"@atlaskit/editor-plugin-list": "^9.0.0",
|
|
103
103
|
"@atlaskit/editor-plugin-paste": "^8.1.0",
|
|
104
104
|
"@atlaskit/link-provider": "^4.1.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
108
108
|
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
109
109
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
110
|
-
"@atlaskit/renderer": "^126.
|
|
110
|
+
"@atlaskit/renderer": "^126.4.0",
|
|
111
111
|
"@atlaskit/section-message": "^8.12.0",
|
|
112
112
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
113
113
|
"@atlaskit/toggle": "^15.2.0",
|
|
@@ -338,9 +338,6 @@
|
|
|
338
338
|
"platform_editor_nov_a11y_fixes": {
|
|
339
339
|
"type": "boolean"
|
|
340
340
|
},
|
|
341
|
-
"platform_editor_toolbar_aifc_responsive_improve": {
|
|
342
|
-
"type": "boolean"
|
|
343
|
-
},
|
|
344
341
|
"rovo_chat_enable_skills_ui_m1": {
|
|
345
342
|
"type": "boolean"
|
|
346
343
|
},
|