@atlaskit/editor-plugin-floating-toolbar 2.0.0 → 2.0.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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#117485](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/117485)
|
|
8
|
+
[`e9a8d9ba26963`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e9a8d9ba26963) -
|
|
9
|
+
Reorder icons, and remove some based on new editor controls. Changes under
|
|
10
|
+
`editor_plugin_controls` experiment.
|
|
11
|
+
- [#118657](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/118657)
|
|
12
|
+
[`849aa409da86d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/849aa409da86d) -
|
|
13
|
+
[ux] ED-26673 Toolbar overflow menu shows active docking preference
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 2.0.0
|
|
4
17
|
|
|
5
18
|
### Major Changes
|
|
@@ -41,7 +41,7 @@ var separatorStyles = (0, _react2.css)({
|
|
|
41
41
|
height: "var(--ds-space-025, 1px)"
|
|
42
42
|
});
|
|
43
43
|
var headingStyles = (0, _react2.css)({
|
|
44
|
-
padding: "var(--ds-space-
|
|
44
|
+
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -190,7 +190,7 @@ var DropdownMenuItem = function DropdownMenuItem(props) {
|
|
|
190
190
|
};
|
|
191
191
|
});
|
|
192
192
|
var itemContent = (0, _react2.jsx)(DropdownButtonItem, {
|
|
193
|
-
isSelected:
|
|
193
|
+
isSelected: itemSelected,
|
|
194
194
|
iconBefore: iconBefore,
|
|
195
195
|
iconAfter: item.elemAfter,
|
|
196
196
|
onClick: handleItemClick,
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -453,7 +453,7 @@ var ToolbarItemsCollapsable = /*#__PURE__*/_react.default.memo(function (_ref2)
|
|
|
453
453
|
|
|
454
454
|
// NOTE: Unsure if collapse/expand logic will be needed, for now hard code for cards
|
|
455
455
|
var isCard = node.type.name === 'inlineCard' || node.type.name === 'blockCard' || node.type.name === 'embedCard';
|
|
456
|
-
var updatedItems = isCard ? getFormattedItems(items.map(function (item) {
|
|
456
|
+
var updatedItems = isCard && items.length > 1 ? getFormattedItems(items.map(function (item) {
|
|
457
457
|
if ('id' in item && (item.id === 'editor.link.openLink' || item.id === 'editor.floatingToolbar.copy' || item.id === 'editor.link.commentLink')) {
|
|
458
458
|
return item;
|
|
459
459
|
}
|
|
@@ -31,7 +31,7 @@ const separatorStyles = css({
|
|
|
31
31
|
height: "var(--ds-space-025, 1px)"
|
|
32
32
|
});
|
|
33
33
|
const headingStyles = css({
|
|
34
|
-
padding: `${"var(--ds-space-100, 8px)"}
|
|
34
|
+
padding: `${"var(--ds-space-200, 16px)"} 0 ${"var(--ds-space-100, 8px)"}`
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -181,7 +181,7 @@ const DropdownMenuItem = props => {
|
|
|
181
181
|
};
|
|
182
182
|
});
|
|
183
183
|
const itemContent = jsx(DropdownButtonItem, {
|
|
184
|
-
isSelected:
|
|
184
|
+
isSelected: itemSelected,
|
|
185
185
|
iconBefore: iconBefore,
|
|
186
186
|
iconAfter: item.elemAfter,
|
|
187
187
|
onClick: handleItemClick,
|
|
@@ -411,7 +411,7 @@ const ToolbarItemsCollapsable = /*#__PURE__*/React.memo(({
|
|
|
411
411
|
|
|
412
412
|
// NOTE: Unsure if collapse/expand logic will be needed, for now hard code for cards
|
|
413
413
|
const isCard = node.type.name === 'inlineCard' || node.type.name === 'blockCard' || node.type.name === 'embedCard';
|
|
414
|
-
const updatedItems = isCard ? getFormattedItems(items.map(item => {
|
|
414
|
+
const updatedItems = isCard && items.length > 1 ? getFormattedItems(items.map(item => {
|
|
415
415
|
if ('id' in item && (item.id === 'editor.link.openLink' || item.id === 'editor.floatingToolbar.copy' || item.id === 'editor.link.commentLink')) {
|
|
416
416
|
return item;
|
|
417
417
|
}
|
|
@@ -32,7 +32,7 @@ var separatorStyles = css({
|
|
|
32
32
|
height: "var(--ds-space-025, 1px)"
|
|
33
33
|
});
|
|
34
34
|
var headingStyles = css({
|
|
35
|
-
padding: "var(--ds-space-
|
|
35
|
+
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
@@ -181,7 +181,7 @@ var DropdownMenuItem = function DropdownMenuItem(props) {
|
|
|
181
181
|
};
|
|
182
182
|
});
|
|
183
183
|
var itemContent = jsx(DropdownButtonItem, {
|
|
184
|
-
isSelected:
|
|
184
|
+
isSelected: itemSelected,
|
|
185
185
|
iconBefore: iconBefore,
|
|
186
186
|
iconAfter: item.elemAfter,
|
|
187
187
|
onClick: handleItemClick,
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -446,7 +446,7 @@ var ToolbarItemsCollapsable = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
446
446
|
|
|
447
447
|
// NOTE: Unsure if collapse/expand logic will be needed, for now hard code for cards
|
|
448
448
|
var isCard = node.type.name === 'inlineCard' || node.type.name === 'blockCard' || node.type.name === 'embedCard';
|
|
449
|
-
var updatedItems = isCard ? getFormattedItems(items.map(function (item) {
|
|
449
|
+
var updatedItems = isCard && items.length > 1 ? getFormattedItems(items.map(function (item) {
|
|
450
450
|
if ('id' in item && (item.id === 'editor.link.openLink' || item.id === 'editor.floatingToolbar.copy' || item.id === 'editor.link.commentLink')) {
|
|
451
451
|
return item;
|
|
452
452
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/adf-utils": "^19.18.0",
|
|
27
|
-
"@atlaskit/button": "^21.
|
|
27
|
+
"@atlaskit/button": "^21.1.0",
|
|
28
28
|
"@atlaskit/checkbox": "^16.0.0",
|
|
29
|
-
"@atlaskit/editor-common": "^100.
|
|
29
|
+
"@atlaskit/editor-common": "^100.1.0",
|
|
30
30
|
"@atlaskit/editor-palette": "2.0.0",
|
|
31
|
-
"@atlaskit/editor-plugin-block-controls": "^3.
|
|
31
|
+
"@atlaskit/editor-plugin-block-controls": "^3.1.0",
|
|
32
32
|
"@atlaskit/editor-plugin-context-panel": "^3.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-copy-button": "^2.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-emoji": "^3.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-extension": "^4.0.0",
|
|
39
|
-
"@atlaskit/editor-plugin-table": "^10.
|
|
39
|
+
"@atlaskit/editor-plugin-table": "^10.1.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/emoji": "^68.0.0",
|
|
42
|
-
"@atlaskit/icon": "^24.
|
|
43
|
-
"@atlaskit/menu": "^3.
|
|
42
|
+
"@atlaskit/icon": "^24.1.0",
|
|
43
|
+
"@atlaskit/menu": "^3.1.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^13.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
46
|
-
"@atlaskit/primitives": "^14.
|
|
46
|
+
"@atlaskit/primitives": "^14.1.0",
|
|
47
47
|
"@atlaskit/select": "^19.0.0",
|
|
48
48
|
"@atlaskit/theme": "^17.0.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^3.
|
|
50
|
-
"@atlaskit/tokens": "^4.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^3.2.0",
|
|
50
|
+
"@atlaskit/tokens": "^4.2.0",
|
|
51
51
|
"@atlaskit/tooltip": "^20.0.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1",
|