@atlaskit/editor-plugin-alignment 1.16.2 → 1.17.0
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 +12 -0
- package/dist/cjs/alignmentPlugin.js +6 -0
- package/dist/cjs/ui/ToolbarAlignment/icon-map.js +6 -6
- package/dist/es2019/alignmentPlugin.js +6 -0
- package/dist/es2019/ui/ToolbarAlignment/icon-map.js +6 -6
- package/dist/esm/alignmentPlugin.js +6 -0
- package/dist/esm/ui/ToolbarAlignment/icon-map.js +6 -6
- package/dist/types/alignmentPluginType.d.ts +5 -1
- package/dist/types-ts4.5/alignmentPluginType.d.ts +3 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 1.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#116949](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116949)
|
|
8
|
+
[`9154f7b89e3d2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9154f7b89e3d2) -
|
|
9
|
+
[ux] ED-26674 Hiding contextual toolbar menu items when the menu is docked to top
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 1.16.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -73,6 +73,12 @@ var alignmentPlugin = exports.alignmentPlugin = function alignmentPlugin(_ref) {
|
|
|
73
73
|
},
|
|
74
74
|
pluginsOptions: {
|
|
75
75
|
selectionToolbar: function selectionToolbar() {
|
|
76
|
+
var _api$selectionToolbar;
|
|
77
|
+
if ((api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking) === 'top' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
78
|
+
exposure: true
|
|
79
|
+
})) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
76
82
|
if ((0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
|
|
77
83
|
exposure: true
|
|
78
84
|
}) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
@@ -8,20 +8,20 @@ exports.IconMap = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _alignTextCenterEditorAlignCenter = _interopRequireDefault(require("@atlaskit/icon/core/migration/align-text-center--editor-align-center"));
|
|
12
|
+
var _alignTextLeftEditorAlignLeft = _interopRequireDefault(require("@atlaskit/icon/core/migration/align-text-left--editor-align-left"));
|
|
13
|
+
var _alignTextRightEditorAlignRight = _interopRequireDefault(require("@atlaskit/icon/core/migration/align-text-right--editor-align-right"));
|
|
14
14
|
var iconAndMessageMap = {
|
|
15
15
|
start: {
|
|
16
|
-
Component:
|
|
16
|
+
Component: _alignTextLeftEditorAlignLeft.default,
|
|
17
17
|
label: _messages.alignmentMessages.alignLeft
|
|
18
18
|
},
|
|
19
19
|
end: {
|
|
20
|
-
Component:
|
|
20
|
+
Component: _alignTextRightEditorAlignRight.default,
|
|
21
21
|
label: _messages.alignmentMessages.alignRight
|
|
22
22
|
},
|
|
23
23
|
center: {
|
|
24
|
-
Component:
|
|
24
|
+
Component: _alignTextCenterEditorAlignCenter.default,
|
|
25
25
|
label: _messages.alignmentMessages.alignCenter
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -65,6 +65,12 @@ export const alignmentPlugin = ({
|
|
|
65
65
|
},
|
|
66
66
|
pluginsOptions: {
|
|
67
67
|
selectionToolbar: () => {
|
|
68
|
+
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
69
|
+
if ((api === null || api === void 0 ? void 0 : (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 ? void 0 : (_api$selectionToolbar2 = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.currentState()) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.toolbarDocking) === 'top' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
70
|
+
exposure: true
|
|
71
|
+
})) {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
68
74
|
if (editorExperiment('contextual_formatting_toolbar', true, {
|
|
69
75
|
exposure: true
|
|
70
76
|
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import AlignTextCenterIcon from '@atlaskit/icon/core/migration/align-text-center--editor-align-center';
|
|
5
|
+
import AlignTextLeftIcon from '@atlaskit/icon/core/migration/align-text-left--editor-align-left';
|
|
6
|
+
import AlignTextRightIcon from '@atlaskit/icon/core/migration/align-text-right--editor-align-right';
|
|
7
7
|
const iconAndMessageMap = {
|
|
8
8
|
start: {
|
|
9
|
-
Component:
|
|
9
|
+
Component: AlignTextLeftIcon,
|
|
10
10
|
label: messages.alignLeft
|
|
11
11
|
},
|
|
12
12
|
end: {
|
|
13
|
-
Component:
|
|
13
|
+
Component: AlignTextRightIcon,
|
|
14
14
|
label: messages.alignRight
|
|
15
15
|
},
|
|
16
16
|
center: {
|
|
17
|
-
Component:
|
|
17
|
+
Component: AlignTextCenterIcon,
|
|
18
18
|
label: messages.alignCenter
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -66,6 +66,12 @@ export var alignmentPlugin = function alignmentPlugin(_ref) {
|
|
|
66
66
|
},
|
|
67
67
|
pluginsOptions: {
|
|
68
68
|
selectionToolbar: function selectionToolbar() {
|
|
69
|
+
var _api$selectionToolbar;
|
|
70
|
+
if ((api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking) === 'top' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
71
|
+
exposure: true
|
|
72
|
+
})) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
69
75
|
if (editorExperiment('contextual_formatting_toolbar', true, {
|
|
70
76
|
exposure: true
|
|
71
77
|
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import AlignTextCenterIcon from '@atlaskit/icon/core/migration/align-text-center--editor-align-center';
|
|
5
|
+
import AlignTextLeftIcon from '@atlaskit/icon/core/migration/align-text-left--editor-align-left';
|
|
6
|
+
import AlignTextRightIcon from '@atlaskit/icon/core/migration/align-text-right--editor-align-right';
|
|
7
7
|
var iconAndMessageMap = {
|
|
8
8
|
start: {
|
|
9
|
-
Component:
|
|
9
|
+
Component: AlignTextLeftIcon,
|
|
10
10
|
label: messages.alignLeft
|
|
11
11
|
},
|
|
12
12
|
end: {
|
|
13
|
-
Component:
|
|
13
|
+
Component: AlignTextRightIcon,
|
|
14
14
|
label: messages.alignRight
|
|
15
15
|
},
|
|
16
16
|
center: {
|
|
17
|
-
Component:
|
|
17
|
+
Component: AlignTextCenterIcon,
|
|
18
18
|
label: messages.alignCenter
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
3
|
+
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
3
4
|
import type { AlignmentPluginState } from './pm-plugins/types';
|
|
4
|
-
export type AlignmentPluginDependencies = [
|
|
5
|
+
export type AlignmentPluginDependencies = [
|
|
6
|
+
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
7
|
+
OptionalPlugin<SelectionToolbarPlugin>
|
|
8
|
+
];
|
|
5
9
|
export type AlignmentPlugin = NextEditorPlugin<'alignment', {
|
|
6
10
|
sharedState: AlignmentPluginState | undefined;
|
|
7
11
|
dependencies: AlignmentPluginDependencies;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
3
|
+
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
3
4
|
import type { AlignmentPluginState } from './pm-plugins/types';
|
|
4
5
|
export type AlignmentPluginDependencies = [
|
|
5
|
-
OptionalPlugin<PrimaryToolbarPlugin
|
|
6
|
+
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
7
|
+
OptionalPlugin<SelectionToolbarPlugin>
|
|
6
8
|
];
|
|
7
9
|
export type AlignmentPlugin = NextEditorPlugin<'alignment', {
|
|
8
10
|
sharedState: AlignmentPluginState | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/adf-schema": "^47.2.1",
|
|
24
|
-
"@atlaskit/editor-common": "^99.
|
|
25
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^2.
|
|
24
|
+
"@atlaskit/editor-common": "^99.18.0",
|
|
25
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.3.0",
|
|
26
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^1.9.0",
|
|
26
27
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
27
28
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
28
|
-
"@atlaskit/icon": "^23.
|
|
29
|
+
"@atlaskit/icon": "^23.11.0",
|
|
29
30
|
"@atlaskit/platform-feature-flags": "1.1.0",
|
|
30
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
31
|
+
"@atlaskit/tmp-editor-statsig": "^2.47.0",
|
|
31
32
|
"@atlaskit/tokens": "^3.3.0",
|
|
32
33
|
"@babel/runtime": "^7.0.0",
|
|
33
34
|
"@emotion/react": "^11.7.1"
|