@atlaskit/editor-plugin-floating-toolbar 6.0.0 → 6.0.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 +16 -0
- package/dist/cjs/floatingToolbarPlugin.js +1 -1
- package/dist/cjs/ui/ScrollButton.js +4 -4
- package/dist/cjs/ui/Toolbar.js +2 -3
- package/dist/es2019/floatingToolbarPlugin.js +1 -1
- package/dist/es2019/ui/ScrollButton.js +4 -4
- package/dist/es2019/ui/Toolbar.js +2 -3
- package/dist/esm/floatingToolbarPlugin.js +1 -1
- package/dist/esm/ui/ScrollButton.js +4 -4
- package/dist/esm/ui/Toolbar.js +2 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 6.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`db97eb262cc5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db97eb262cc5a) -
|
|
8
|
+
replace platform_editor_toolbar_aifc with separate experiements for jira and confluence
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`255837cfba315`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/255837cfba315) -
|
|
16
|
+
Internal changes to how border radius is applied.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 6.0.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -244,7 +244,7 @@ function ContentComponent(_ref5) {
|
|
|
244
244
|
node = configWithNodeInfo.node;
|
|
245
245
|
|
|
246
246
|
// When the new inline editor-toolbar is enabled, suppress floating toolbar for text selections.
|
|
247
|
-
if ((0,
|
|
247
|
+
if ((0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true)) {
|
|
248
248
|
var selection = editorView.state.selection;
|
|
249
249
|
var isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
250
250
|
var isTextSelected = selection instanceof _state.TextSelection && !selection.empty;
|
|
@@ -21,14 +21,14 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
21
21
|
var rightSideStyles = (0, _primitives.xcss)({
|
|
22
22
|
borderLeft: "solid ".concat("var(--ds-border, #091E4224)", " 1px"),
|
|
23
23
|
right: 'space.0',
|
|
24
|
-
borderTopRightRadius: '
|
|
25
|
-
borderBottomRightRadius: '
|
|
24
|
+
borderTopRightRadius: 'radius.small',
|
|
25
|
+
borderBottomRightRadius: 'radius.small'
|
|
26
26
|
});
|
|
27
27
|
var leftSideStyles = (0, _primitives.xcss)({
|
|
28
28
|
borderRight: "solid ".concat("var(--ds-border, #091E4224)", " 1px"),
|
|
29
29
|
left: 'space.0',
|
|
30
|
-
borderTopLeftRadius: '
|
|
31
|
-
borderBottomLeftRadius: '
|
|
30
|
+
borderTopLeftRadius: 'radius.small',
|
|
31
|
+
borderBottomLeftRadius: 'radius.small'
|
|
32
32
|
});
|
|
33
33
|
var buttonCommonStyles = (0, _primitives.xcss)({
|
|
34
34
|
backgroundColor: 'elevation.surface.overlay',
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -27,7 +27,6 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
|
27
27
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
28
28
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
29
29
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
31
30
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
32
31
|
var _forceFocus = require("../pm-plugins/force-focus");
|
|
33
32
|
var _commands = require("../pm-plugins/toolbar-data/commands");
|
|
@@ -200,7 +199,7 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
200
199
|
}
|
|
201
200
|
case 'overflow-dropdown':
|
|
202
201
|
return (0, _react2.jsx)(_Dropdown.default, {
|
|
203
|
-
alignX: (0,
|
|
202
|
+
alignX: (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) ? 'right' : undefined,
|
|
204
203
|
key: idx,
|
|
205
204
|
title: intl.formatMessage(_messages.default.viewMore),
|
|
206
205
|
icon: (0, _react2.jsx)(_showMoreHorizontal.default, {
|
|
@@ -410,7 +409,7 @@ var buttonGroupStylesNew = (0, _react2.css)({
|
|
|
410
409
|
var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstElementIsSelect) {
|
|
411
410
|
return (0, _react2.css)({
|
|
412
411
|
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
413
|
-
borderRadius: "var(--ds-
|
|
412
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
414
413
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"),
|
|
415
414
|
display: 'flex',
|
|
416
415
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
@@ -236,7 +236,7 @@ export function ContentComponent({
|
|
|
236
236
|
} = configWithNodeInfo;
|
|
237
237
|
|
|
238
238
|
// When the new inline editor-toolbar is enabled, suppress floating toolbar for text selections.
|
|
239
|
-
if (
|
|
239
|
+
if (editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
240
240
|
const selection = editorView.state.selection;
|
|
241
241
|
const isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
242
242
|
const isTextSelected = selection instanceof TextSelection && !selection.empty;
|
|
@@ -10,14 +10,14 @@ import { Box, xcss } from '@atlaskit/primitives';
|
|
|
10
10
|
const rightSideStyles = xcss({
|
|
11
11
|
borderLeft: `solid ${"var(--ds-border, #091E4224)"} 1px`,
|
|
12
12
|
right: 'space.0',
|
|
13
|
-
borderTopRightRadius: '
|
|
14
|
-
borderBottomRightRadius: '
|
|
13
|
+
borderTopRightRadius: 'radius.small',
|
|
14
|
+
borderBottomRightRadius: 'radius.small'
|
|
15
15
|
});
|
|
16
16
|
const leftSideStyles = xcss({
|
|
17
17
|
borderRight: `solid ${"var(--ds-border, #091E4224)"} 1px`,
|
|
18
18
|
left: 'space.0',
|
|
19
|
-
borderTopLeftRadius: '
|
|
20
|
-
borderBottomLeftRadius: '
|
|
19
|
+
borderTopLeftRadius: 'radius.small',
|
|
20
|
+
borderBottomLeftRadius: 'radius.small'
|
|
21
21
|
});
|
|
22
22
|
const buttonCommonStyles = xcss({
|
|
23
23
|
backgroundColor: 'elevation.surface.overlay',
|
|
@@ -20,7 +20,6 @@ import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/
|
|
|
20
20
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
21
21
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
22
22
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
24
23
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
25
24
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
26
25
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
@@ -178,7 +177,7 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
178
177
|
}
|
|
179
178
|
case 'overflow-dropdown':
|
|
180
179
|
return jsx(Dropdown, {
|
|
181
|
-
alignX:
|
|
180
|
+
alignX: editorExperiment('platform_editor_toolbar_aifc', true) ? 'right' : undefined,
|
|
182
181
|
key: idx,
|
|
183
182
|
title: intl.formatMessage(commonMessages.viewMore),
|
|
184
183
|
icon: jsx(ShowMoreHorizontalIcon, {
|
|
@@ -377,7 +376,7 @@ const buttonGroupStylesNew = css({
|
|
|
377
376
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
378
377
|
const toolbarContainer = (scrollable, hasSelect, firstElementIsSelect) => css({
|
|
379
378
|
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
380
|
-
borderRadius: "var(--ds-
|
|
379
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
381
380
|
boxShadow: `var(--ds-shadow-overlay, ${`0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)`})`,
|
|
382
381
|
display: 'flex',
|
|
383
382
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
@@ -235,7 +235,7 @@ export function ContentComponent(_ref5) {
|
|
|
235
235
|
node = configWithNodeInfo.node;
|
|
236
236
|
|
|
237
237
|
// When the new inline editor-toolbar is enabled, suppress floating toolbar for text selections.
|
|
238
|
-
if (
|
|
238
|
+
if (editorExperiment('platform_editor_toolbar_aifc', true)) {
|
|
239
239
|
var selection = editorView.state.selection;
|
|
240
240
|
var isCellSelection = '$anchorCell' in selection && !selection.empty;
|
|
241
241
|
var isTextSelected = selection instanceof TextSelection && !selection.empty;
|
|
@@ -11,14 +11,14 @@ import { Box, xcss } from '@atlaskit/primitives';
|
|
|
11
11
|
var rightSideStyles = xcss({
|
|
12
12
|
borderLeft: "solid ".concat("var(--ds-border, #091E4224)", " 1px"),
|
|
13
13
|
right: 'space.0',
|
|
14
|
-
borderTopRightRadius: '
|
|
15
|
-
borderBottomRightRadius: '
|
|
14
|
+
borderTopRightRadius: 'radius.small',
|
|
15
|
+
borderBottomRightRadius: 'radius.small'
|
|
16
16
|
});
|
|
17
17
|
var leftSideStyles = xcss({
|
|
18
18
|
borderRight: "solid ".concat("var(--ds-border, #091E4224)", " 1px"),
|
|
19
19
|
left: 'space.0',
|
|
20
|
-
borderTopLeftRadius: '
|
|
21
|
-
borderBottomLeftRadius: '
|
|
20
|
+
borderTopLeftRadius: 'radius.small',
|
|
21
|
+
borderBottomLeftRadius: 'radius.small'
|
|
22
22
|
});
|
|
23
23
|
var buttonCommonStyles = xcss({
|
|
24
24
|
backgroundColor: 'elevation.surface.overlay',
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -27,7 +27,6 @@ import { ColorPickerButton, ToolbarArrowKeyNavigationProvider } from '@atlaskit/
|
|
|
27
27
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
28
28
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
29
29
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
30
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
31
30
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
32
31
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
33
32
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
@@ -194,7 +193,7 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
194
193
|
}
|
|
195
194
|
case 'overflow-dropdown':
|
|
196
195
|
return jsx(Dropdown, {
|
|
197
|
-
alignX:
|
|
196
|
+
alignX: editorExperiment('platform_editor_toolbar_aifc', true) ? 'right' : undefined,
|
|
198
197
|
key: idx,
|
|
199
198
|
title: intl.formatMessage(commonMessages.viewMore),
|
|
200
199
|
icon: jsx(ShowMoreHorizontalIcon, {
|
|
@@ -404,7 +403,7 @@ var buttonGroupStylesNew = css({
|
|
|
404
403
|
var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstElementIsSelect) {
|
|
405
404
|
return css({
|
|
406
405
|
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
407
|
-
borderRadius: "var(--ds-
|
|
406
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
408
407
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"),
|
|
409
408
|
display: 'flex',
|
|
410
409
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
40
|
"@atlaskit/emoji": "^69.5.0",
|
|
41
41
|
"@atlaskit/icon": "^28.1.0",
|
|
42
|
-
"@atlaskit/menu": "^8.
|
|
42
|
+
"@atlaskit/menu": "^8.4.0",
|
|
43
43
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
|
-
"@atlaskit/primitives": "^14.
|
|
45
|
+
"@atlaskit/primitives": "^14.13.0",
|
|
46
46
|
"@atlaskit/select": "^21.2.0",
|
|
47
47
|
"@atlaskit/theme": "^20.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
49
|
-
"@atlaskit/tokens": "^6.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^12.5.0",
|
|
49
|
+
"@atlaskit/tokens": "^6.2.0",
|
|
50
50
|
"@atlaskit/tooltip": "^20.4.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react-loadable": "^5.1.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^108.
|
|
60
|
+
"@atlaskit/editor-common": "^108.3.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0"
|
|
63
63
|
},
|