@atlaskit/editor-plugin-text-formatting 1.11.1 → 1.12.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 +23 -0
- package/dist/cjs/plugin.js +5 -8
- package/dist/cjs/ui/Toolbar/more-button.js +6 -1
- package/dist/es2019/plugin.js +5 -8
- package/dist/es2019/ui/Toolbar/more-button.js +6 -1
- package/dist/esm/plugin.js +5 -8
- package/dist/esm/ui/Toolbar/more-button.js +6 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-formatting
|
|
2
2
|
|
|
3
|
+
## 1.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#126478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126478)
|
|
8
|
+
[`ca1665ebbfe4d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca1665ebbfe4d) -
|
|
9
|
+
[ED-23435] Store primary toolbar component registry in a plugin variable instead of in plugin
|
|
10
|
+
state to avoid having to add effects to all plugins and enable SSR for the toolbar. [Breaking
|
|
11
|
+
change] Converted registerComponent from the primary toolbar plugin into an action.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 1.11.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#125353](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/125353)
|
|
22
|
+
[`77847728bf617`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77847728bf617) -
|
|
23
|
+
Migrate icons in Editor primary toolbar
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 1.11.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -24,7 +24,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
24
24
|
* from `@atlaskit/editor-core`.
|
|
25
25
|
*/
|
|
26
26
|
var textFormattingPlugin = exports.textFormattingPlugin = function textFormattingPlugin(_ref) {
|
|
27
|
-
var _api$analytics6, _api$analytics7, _api$analytics8, _api$analytics9, _api$analytics10, _api$analytics11, _api$analytics12;
|
|
27
|
+
var _api$primaryToolbar, _api$analytics6, _api$analytics7, _api$analytics8, _api$analytics9, _api$analytics10, _api$analytics11, _api$analytics12;
|
|
28
28
|
var options = _ref.config,
|
|
29
29
|
api = _ref.api;
|
|
30
30
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
@@ -45,6 +45,10 @@ var textFormattingPlugin = exports.textFormattingPlugin = function textFormattin
|
|
|
45
45
|
shouldUseResponsiveToolbar: Boolean(options === null || options === void 0 ? void 0 : options.responsiveToolbarMenu)
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
49
|
+
name: 'textFormatting',
|
|
50
|
+
component: primaryToolbarComponent
|
|
51
|
+
});
|
|
48
52
|
return {
|
|
49
53
|
name: 'textFormatting',
|
|
50
54
|
marks: function marks() {
|
|
@@ -124,13 +128,6 @@ var textFormattingPlugin = exports.textFormattingPlugin = function textFormattin
|
|
|
124
128
|
formattingIsPresent: (_clearFormattingPlugi = _clearFormatting.pluginKey.getState(editorState)) === null || _clearFormattingPlugi === void 0 ? void 0 : _clearFormattingPlugi.formattingIsPresent
|
|
125
129
|
});
|
|
126
130
|
},
|
|
127
|
-
usePluginHook: function usePluginHook() {
|
|
128
|
-
var _api$core, _api$primaryToolbar;
|
|
129
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
130
|
-
name: 'textFormatting',
|
|
131
|
-
component: primaryToolbarComponent
|
|
132
|
-
}));
|
|
133
|
-
},
|
|
134
131
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
|
135
132
|
commands: {
|
|
136
133
|
toggleSuperscript: (0, _commands.toggleSuperscriptWithAnalytics)(api === null || api === void 0 || (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions),
|
|
@@ -10,6 +10,8 @@ var _react2 = require("@emotion/react");
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
12
12
|
var _more = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/more"));
|
|
13
|
+
var _showMoreHorizontalEditorMore = _interopRequireDefault(require("@atlaskit/icon/utility/migration/show-more-horizontal--editor-more"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
15
|
/**
|
|
14
16
|
* @jsxRuntime classic
|
|
15
17
|
* @jsx jsx
|
|
@@ -36,7 +38,10 @@ var MoreButton = exports.MoreButton = /*#__PURE__*/_react.default.memo(function
|
|
|
36
38
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
37
39
|
(0, _react2.jsx)("div", {
|
|
38
40
|
css: _styles.triggerWrapperStyles
|
|
39
|
-
}, (0, _react2.jsx)(
|
|
41
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? (0, _react2.jsx)(_showMoreHorizontalEditorMore.default, {
|
|
42
|
+
label: "",
|
|
43
|
+
color: "currentColor"
|
|
44
|
+
}) : (0, _react2.jsx)(_more.default, {
|
|
40
45
|
label: ""
|
|
41
46
|
})),
|
|
42
47
|
"aria-expanded": ariaExpanded,
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -17,7 +17,7 @@ export const textFormattingPlugin = ({
|
|
|
17
17
|
config: options,
|
|
18
18
|
api
|
|
19
19
|
}) => {
|
|
20
|
-
var _api$analytics6, _api$analytics7, _api$analytics8, _api$analytics9, _api$analytics10, _api$analytics11, _api$analytics12;
|
|
20
|
+
var _api$primaryToolbar, _api$analytics6, _api$analytics7, _api$analytics8, _api$analytics9, _api$analytics10, _api$analytics11, _api$analytics12;
|
|
21
21
|
const primaryToolbarComponent = ({
|
|
22
22
|
editorView,
|
|
23
23
|
popupsMountPoint,
|
|
@@ -37,6 +37,10 @@ export const textFormattingPlugin = ({
|
|
|
37
37
|
shouldUseResponsiveToolbar: Boolean(options === null || options === void 0 ? void 0 : options.responsiveToolbarMenu)
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
+
api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
|
|
41
|
+
name: 'textFormatting',
|
|
42
|
+
component: primaryToolbarComponent
|
|
43
|
+
});
|
|
40
44
|
return {
|
|
41
45
|
name: 'textFormatting',
|
|
42
46
|
marks() {
|
|
@@ -117,13 +121,6 @@ export const textFormattingPlugin = ({
|
|
|
117
121
|
formattingIsPresent: (_clearFormattingPlugi = clearFormattingPluginKey.getState(editorState)) === null || _clearFormattingPlugi === void 0 ? void 0 : _clearFormattingPlugi.formattingIsPresent
|
|
118
122
|
};
|
|
119
123
|
},
|
|
120
|
-
usePluginHook: () => {
|
|
121
|
-
var _api$core, _api$primaryToolbar;
|
|
122
|
-
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
123
|
-
name: 'textFormatting',
|
|
124
|
-
component: primaryToolbarComponent
|
|
125
|
-
}));
|
|
126
|
-
},
|
|
127
124
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
|
128
125
|
commands: {
|
|
129
126
|
toggleSuperscript: toggleSuperscriptWithAnalytics(api === null || api === void 0 ? void 0 : (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions),
|
|
@@ -9,6 +9,8 @@ import { jsx } from '@emotion/react';
|
|
|
9
9
|
import { triggerWrapperStyles } from '@atlaskit/editor-common/styles';
|
|
10
10
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
11
11
|
import MoreIcon from '@atlaskit/icon/glyph/editor/more';
|
|
12
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/utility/migration/show-more-horizontal--editor-more';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
14
|
export const MoreButton = /*#__PURE__*/React.memo(({
|
|
13
15
|
label,
|
|
14
16
|
'aria-expanded': ariaExpanded,
|
|
@@ -29,7 +31,10 @@ export const MoreButton = /*#__PURE__*/React.memo(({
|
|
|
29
31
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
30
32
|
jsx("div", {
|
|
31
33
|
css: triggerWrapperStyles
|
|
32
|
-
}, jsx(
|
|
34
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(ShowMoreHorizontalIcon, {
|
|
35
|
+
label: "",
|
|
36
|
+
color: "currentColor"
|
|
37
|
+
}) : jsx(MoreIcon, {
|
|
33
38
|
label: ""
|
|
34
39
|
})),
|
|
35
40
|
"aria-expanded": ariaExpanded,
|
package/dist/esm/plugin.js
CHANGED
|
@@ -17,7 +17,7 @@ import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
|
|
|
17
17
|
* from `@atlaskit/editor-core`.
|
|
18
18
|
*/
|
|
19
19
|
export var textFormattingPlugin = function textFormattingPlugin(_ref) {
|
|
20
|
-
var _api$analytics6, _api$analytics7, _api$analytics8, _api$analytics9, _api$analytics10, _api$analytics11, _api$analytics12;
|
|
20
|
+
var _api$primaryToolbar, _api$analytics6, _api$analytics7, _api$analytics8, _api$analytics9, _api$analytics10, _api$analytics11, _api$analytics12;
|
|
21
21
|
var options = _ref.config,
|
|
22
22
|
api = _ref.api;
|
|
23
23
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
@@ -38,6 +38,10 @@ export var textFormattingPlugin = function textFormattingPlugin(_ref) {
|
|
|
38
38
|
shouldUseResponsiveToolbar: Boolean(options === null || options === void 0 ? void 0 : options.responsiveToolbarMenu)
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
42
|
+
name: 'textFormatting',
|
|
43
|
+
component: primaryToolbarComponent
|
|
44
|
+
});
|
|
41
45
|
return {
|
|
42
46
|
name: 'textFormatting',
|
|
43
47
|
marks: function marks() {
|
|
@@ -117,13 +121,6 @@ export var textFormattingPlugin = function textFormattingPlugin(_ref) {
|
|
|
117
121
|
formattingIsPresent: (_clearFormattingPlugi = clearFormattingPluginKey.getState(editorState)) === null || _clearFormattingPlugi === void 0 ? void 0 : _clearFormattingPlugi.formattingIsPresent
|
|
118
122
|
});
|
|
119
123
|
},
|
|
120
|
-
usePluginHook: function usePluginHook() {
|
|
121
|
-
var _api$core, _api$primaryToolbar;
|
|
122
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
123
|
-
name: 'textFormatting',
|
|
124
|
-
component: primaryToolbarComponent
|
|
125
|
-
}));
|
|
126
|
-
},
|
|
127
124
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
|
128
125
|
commands: {
|
|
129
126
|
toggleSuperscript: toggleSuperscriptWithAnalytics(api === null || api === void 0 || (_api$analytics6 = api.analytics) === null || _api$analytics6 === void 0 ? void 0 : _api$analytics6.actions),
|
|
@@ -9,6 +9,8 @@ import { jsx } from '@emotion/react';
|
|
|
9
9
|
import { triggerWrapperStyles } from '@atlaskit/editor-common/styles';
|
|
10
10
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
11
11
|
import MoreIcon from '@atlaskit/icon/glyph/editor/more';
|
|
12
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/utility/migration/show-more-horizontal--editor-more';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
14
|
export var MoreButton = /*#__PURE__*/React.memo(function (_ref) {
|
|
13
15
|
var label = _ref.label,
|
|
14
16
|
ariaExpanded = _ref['aria-expanded'],
|
|
@@ -28,7 +30,10 @@ export var MoreButton = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
28
30
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
29
31
|
jsx("div", {
|
|
30
32
|
css: triggerWrapperStyles
|
|
31
|
-
}, jsx(
|
|
33
|
+
}, fg('platform_editor_migration_icon_and_typography') ? jsx(ShowMoreHorizontalIcon, {
|
|
34
|
+
label: "",
|
|
35
|
+
color: "currentColor"
|
|
36
|
+
}) : jsx(MoreIcon, {
|
|
32
37
|
label: ""
|
|
33
38
|
})),
|
|
34
39
|
"aria-expanded": ariaExpanded,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-formatting",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Text-formatting plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^40.3.0",
|
|
36
|
-
"@atlaskit/editor-common": "^87.
|
|
36
|
+
"@atlaskit/editor-common": "^87.3.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.6.0",
|
|
38
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
38
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
40
40
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
41
41
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
42
|
-
"@atlaskit/icon": "^22.
|
|
42
|
+
"@atlaskit/icon": "^22.9.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
44
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
@@ -92,6 +92,9 @@
|
|
|
92
92
|
"platform-feature-flags": {
|
|
93
93
|
"platform.editor.simplify-inline-cards-in-code-blocks_jw6t1": {
|
|
94
94
|
"type": "boolean"
|
|
95
|
+
},
|
|
96
|
+
"platform_editor_migration_icon_and_typography": {
|
|
97
|
+
"type": "boolean"
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
}
|