@atlaskit/editor-plugin-alignment 1.14.9 → 1.15.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 +20 -0
- package/dist/cjs/alignmentPlugin.js +2 -0
- package/dist/cjs/pm-plugins/main.js +0 -2
- package/dist/cjs/ui/ToolbarAlignment/index.js +5 -1
- package/dist/es2019/alignmentPlugin.js +2 -0
- package/dist/es2019/pm-plugins/main.js +0 -2
- package/dist/es2019/ui/ToolbarAlignment/index.js +5 -1
- package/dist/esm/alignmentPlugin.js +2 -0
- package/dist/esm/pm-plugins/main.js +0 -2
- package/dist/esm/ui/ToolbarAlignment/index.js +5 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 1.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
|
|
8
|
+
[`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
|
|
9
|
+
Update `React` from v16 to v18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 1.14.10
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#107473](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107473)
|
|
20
|
+
[`962b3297548df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b3297548df) -
|
|
21
|
+
[ux] Implement variation 2 for editor contextual toolbar formatting experiment
|
|
22
|
+
|
|
3
23
|
## 1.14.9
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -75,6 +75,8 @@ var alignmentPlugin = exports.alignmentPlugin = function alignmentPlugin(_ref) {
|
|
|
75
75
|
selectionToolbar: function selectionToolbar() {
|
|
76
76
|
if ((0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
|
|
77
77
|
exposure: true
|
|
78
|
+
}) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
79
|
+
exposure: true
|
|
78
80
|
}) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
79
81
|
exposure: true
|
|
80
82
|
})) {
|
|
@@ -28,8 +28,6 @@ function createPlugin(dispatch, pluginConfig) {
|
|
|
28
28
|
init: function init(_, editorState) {
|
|
29
29
|
return createInitialPluginState(editorState, pluginConfig);
|
|
30
30
|
},
|
|
31
|
-
// Ignored via go/ees005
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
33
31
|
apply: function apply(_tr, state, _prevState, nextState) {
|
|
34
32
|
// Ignored via go/ees005
|
|
35
33
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -97,7 +97,11 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
97
97
|
api = _this$props.api;
|
|
98
98
|
var alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
|
|
99
99
|
var title = intl.formatMessage(_messages.alignmentMessages.alignment);
|
|
100
|
-
var reducedSpacing = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', '
|
|
100
|
+
var reducedSpacing = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
101
|
+
exposure: true
|
|
102
|
+
}) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
103
|
+
exposure: true
|
|
104
|
+
}) ? 'compact' : 'none';
|
|
101
105
|
return (
|
|
102
106
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
103
107
|
(0, _react2.jsx)("span", {
|
|
@@ -67,6 +67,8 @@ export const alignmentPlugin = ({
|
|
|
67
67
|
selectionToolbar: () => {
|
|
68
68
|
if (editorExperiment('contextual_formatting_toolbar', true, {
|
|
69
69
|
exposure: true
|
|
70
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
71
|
+
exposure: true
|
|
70
72
|
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
71
73
|
exposure: true
|
|
72
74
|
})) {
|
|
@@ -16,8 +16,6 @@ export function createPlugin(dispatch, pluginConfig) {
|
|
|
16
16
|
init(_, editorState) {
|
|
17
17
|
return createInitialPluginState(editorState, pluginConfig);
|
|
18
18
|
},
|
|
19
|
-
// Ignored via go/ees005
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
21
19
|
apply(_tr, state, _prevState, nextState) {
|
|
22
20
|
// Ignored via go/ees005
|
|
23
21
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -79,7 +79,11 @@ export class AlignmentToolbar extends React.Component {
|
|
|
79
79
|
} = this.props;
|
|
80
80
|
const alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
|
|
81
81
|
const title = intl.formatMessage(messages.alignment);
|
|
82
|
-
const reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', '
|
|
82
|
+
const reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
83
|
+
exposure: true
|
|
84
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
85
|
+
exposure: true
|
|
86
|
+
}) ? 'compact' : 'none';
|
|
83
87
|
return (
|
|
84
88
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
85
89
|
jsx("span", {
|
|
@@ -68,6 +68,8 @@ export var alignmentPlugin = function alignmentPlugin(_ref) {
|
|
|
68
68
|
selectionToolbar: function selectionToolbar() {
|
|
69
69
|
if (editorExperiment('contextual_formatting_toolbar', true, {
|
|
70
70
|
exposure: true
|
|
71
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
72
|
+
exposure: true
|
|
71
73
|
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
72
74
|
exposure: true
|
|
73
75
|
})) {
|
|
@@ -19,8 +19,6 @@ export function createPlugin(dispatch, pluginConfig) {
|
|
|
19
19
|
init: function init(_, editorState) {
|
|
20
20
|
return createInitialPluginState(editorState, pluginConfig);
|
|
21
21
|
},
|
|
22
|
-
// Ignored via go/ees005
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
24
22
|
apply: function apply(_tr, state, _prevState, nextState) {
|
|
25
23
|
// Ignored via go/ees005
|
|
26
24
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -93,7 +93,11 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
93
93
|
api = _this$props.api;
|
|
94
94
|
var alignment = (_pluginState$align = pluginState === null || pluginState === void 0 ? void 0 : pluginState.align) !== null && _pluginState$align !== void 0 ? _pluginState$align : 'start';
|
|
95
95
|
var title = intl.formatMessage(messages.alignment);
|
|
96
|
-
var reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', '
|
|
96
|
+
var reducedSpacing = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
97
|
+
exposure: true
|
|
98
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
99
|
+
exposure: true
|
|
100
|
+
}) ? 'compact' : 'none';
|
|
97
101
|
return (
|
|
98
102
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
99
103
|
jsx("span", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
24
|
-
"@atlaskit/editor-common": "^99.
|
|
24
|
+
"@atlaskit/editor-common": "^99.6.0",
|
|
25
25
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
|
|
26
26
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
27
27
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
28
|
-
"@atlaskit/icon": "^23.
|
|
28
|
+
"@atlaskit/icon": "^23.5.0",
|
|
29
29
|
"@atlaskit/platform-feature-flags": "0.3.0",
|
|
30
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
31
|
-
"@atlaskit/tokens": "^3.
|
|
30
|
+
"@atlaskit/tmp-editor-statsig": "^2.41.0",
|
|
31
|
+
"@atlaskit/tokens": "^3.3.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/react": "^11.7.1"
|
|
34
34
|
},
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/editor-plugin-list": "^3.9.0",
|
|
44
44
|
"@atlaskit/ssr": "*",
|
|
45
45
|
"@atlaskit/visual-regression": "*",
|
|
46
|
-
"@testing-library/react": "^
|
|
46
|
+
"@testing-library/react": "^13.4.0",
|
|
47
47
|
"@testing-library/user-event": "^14.4.3",
|
|
48
48
|
"typescript": "~5.4.2",
|
|
49
49
|
"wait-for-expect": "^1.2.0"
|