@atlaskit/editor-plugin-block-type 3.14.3 → 3.14.5
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 +18 -0
- package/dist/cjs/plugin/commands/block-type.js +3 -3
- package/dist/cjs/plugin/pm-plugins/keymap.js +1 -1
- package/dist/cjs/plugin/pm-plugins/main.js +6 -6
- package/dist/cjs/plugin/ui/ToolbarBlockType/blocktype-button.js +10 -2
- package/dist/cjs/plugin/ui/ToolbarBlockType/index.js +1 -1
- package/dist/es2019/plugin/pm-plugins/main.js +1 -1
- package/dist/es2019/plugin/ui/ToolbarBlockType/blocktype-button.js +10 -2
- package/dist/esm/plugin/commands/block-type.js +3 -3
- package/dist/esm/plugin/pm-plugins/main.js +1 -1
- package/dist/esm/plugin/ui/ToolbarBlockType/blocktype-button.js +10 -2
- package/dist/esm/plugin/ui/ToolbarBlockType/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 3.14.5
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Updated dependencies
|
8
|
+
|
9
|
+
## 3.14.4
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- [#136367](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136367)
|
14
|
+
[`4d9450a7e1283`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4d9450a7e1283) -
|
15
|
+
[ux] Update new icons (text color, highlight, text style) with design change
|
16
|
+
- [#136348](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136348)
|
17
|
+
[`fb4fb56f1da7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fb4fb56f1da7c) -
|
18
|
+
Use optimised entry-points on editor-common for browser.
|
19
|
+
- Updated dependencies
|
20
|
+
|
3
21
|
## 3.14.3
|
4
22
|
|
5
23
|
### Patch Changes
|
@@ -15,9 +15,9 @@ var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
|
|
15
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
16
16
|
var _editorTables = require("@atlaskit/editor-tables");
|
17
17
|
var _blockTypes = require("../block-types");
|
18
|
-
function _createForOfIteratorHelper(
|
19
|
-
function _unsupportedIterableToArray(
|
20
|
-
function _arrayLikeToArray(
|
18
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
19
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
21
21
|
function setBlockType(name) {
|
22
22
|
return function (_ref) {
|
23
23
|
var tr = _ref.tr;
|
@@ -14,7 +14,7 @@ var blockTypes = _interopRequireWildcard(require("../block-types"));
|
|
14
14
|
var _commands2 = require("../commands");
|
15
15
|
var _utils2 = require("../utils");
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
18
18
|
var backspaceCommand = (0, _commands.chainCommands)(_commands2.cleanUpAtTheStartOfDocument, (0, _commands2.deleteBlockContent)(_utils2.isNodeAWrappingBlockNode), _commands2.deleteAndMoveCursor);
|
19
19
|
var del = (0, _commands.chainCommands)((0, _utils.deleteEmptyParagraphAndMoveBlockUp)(_utils2.isNodeAWrappingBlockNode), (0, _commands2.deleteBlockContent)(_utils2.isNodeAWrappingBlockNode), _commands2.deleteAndMoveCursor);
|
20
20
|
function keymapPlugin(editorAnalyticsApi, schema, _featureFlags) {
|
@@ -7,13 +7,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.pluginKey = exports.createPlugin = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
10
|
+
var _browser = require("@atlaskit/editor-common/browser");
|
10
11
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
11
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
13
13
|
var _blockTypes = require("../block-types");
|
14
14
|
var _commands = require("../commands");
|
15
15
|
var _consts = require("../consts");
|
16
|
-
var
|
16
|
+
var _utils = require("../utils");
|
17
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
18
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
19
19
|
var blockTypeForNode = function blockTypeForNode(node, schema) {
|
@@ -102,7 +102,7 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
102
102
|
});
|
103
103
|
return {
|
104
104
|
currentBlockType: detectBlockType(availableBlockTypes, state),
|
105
|
-
blockTypesDisabled: (0,
|
105
|
+
blockTypesDisabled: (0, _utils.areBlockTypesDisabled)(state),
|
106
106
|
availableBlockTypes: availableBlockTypes,
|
107
107
|
availableWrapperBlockTypes: availableWrapperBlockTypes
|
108
108
|
};
|
@@ -110,7 +110,7 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
110
110
|
apply: function apply(_tr, oldPluginState, _oldState, newState) {
|
111
111
|
var newPluginState = _objectSpread(_objectSpread({}, oldPluginState), {}, {
|
112
112
|
currentBlockType: detectBlockType(oldPluginState.availableBlockTypes, newState),
|
113
|
-
blockTypesDisabled: (0,
|
113
|
+
blockTypesDisabled: (0, _utils.areBlockTypesDisabled)(newState)
|
114
114
|
});
|
115
115
|
if (newPluginState.currentBlockType !== oldPluginState.currentBlockType || newPluginState.blockTypesDisabled !== oldPluginState.blockTypesDisabled) {
|
116
116
|
dispatch(pluginKey, newPluginState);
|
@@ -129,10 +129,10 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
129
129
|
handleKeyDown: function handleKeyDown(view, event) {
|
130
130
|
var headingLevel = _consts.HEADING_KEYS.indexOf(event.keyCode);
|
131
131
|
if (headingLevel > -1 && event.altKey) {
|
132
|
-
if (
|
132
|
+
if (_browser.browser.mac && event.metaKey) {
|
133
133
|
var _editorAPI$core$actio, _editorAPI$core;
|
134
134
|
return (_editorAPI$core$actio = editorAPI === null || editorAPI === void 0 || (_editorAPI$core = editorAPI.core) === null || _editorAPI$core === void 0 ? void 0 : _editorAPI$core.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio !== void 0 ? _editorAPI$core$actio : false;
|
135
|
-
} else if (!
|
135
|
+
} else if (!_browser.browser.mac && event.ctrlKey && altKeyLocation !== event.DOM_KEY_LOCATION_RIGHT) {
|
136
136
|
var _editorAPI$core$actio2, _editorAPI$core2;
|
137
137
|
return (_editorAPI$core$actio2 = editorAPI === null || editorAPI === void 0 || (_editorAPI$core2 = editorAPI.core) === null || _editorAPI$core2 === void 0 ? void 0 : _editorAPI$core2.actions.execute(autoformatHeading(headingLevel, editorAnalyticsApi))) !== null && _editorAPI$core$actio2 !== void 0 ? _editorAPI$core$actio2 : false;
|
138
138
|
}
|
@@ -12,7 +12,9 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _styles = require("@atlaskit/editor-common/styles");
|
13
13
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
14
14
|
var _textStyleEditorTextStyle = _interopRequireDefault(require("@atlaskit/icon/core/migration/text-style--editor-text-style"));
|
15
|
+
var _text = _interopRequireDefault(require("@atlaskit/icon/core/text"));
|
15
16
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
16
18
|
var _blockTypes = require("../../block-types");
|
17
19
|
var _styled = require("./styled");
|
18
20
|
/**
|
@@ -45,11 +47,17 @@ var BlockTypeButton = exports.BlockTypeButton = function BlockTypeButton(props)
|
|
45
47
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
46
48
|
css: [_styles.wrapperStyle, props.isSmall && _styled.wrapperSmallStyle],
|
47
49
|
"data-testid": "toolbar-block-type-text-styles-icon"
|
48
|
-
}, (0, _react2.jsx)(_react.default.Fragment, null, props.isSmall && (
|
50
|
+
}, (0, _react2.jsx)(_react.default.Fragment, null, props.isSmall && (
|
51
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
52
|
+
(0, _platformFeatureFlags.fg)('platform.design-system-team.enable-new-icons') ? (0, _react2.jsx)(_text.default, {
|
49
53
|
label: labelTextStyles,
|
50
54
|
spacing: "spacious",
|
51
55
|
color: "currentColor"
|
52
|
-
})
|
56
|
+
}) : (0, _react2.jsx)(_textStyleEditorTextStyle.default, {
|
57
|
+
color: "currentColor",
|
58
|
+
spacing: "spacious",
|
59
|
+
label: labelTextStyles
|
60
|
+
})), (0, _react2.jsx)("span", {
|
53
61
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
54
62
|
css: _styles.expandIconContainerStyle
|
55
63
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
@@ -23,7 +23,7 @@ var _blocktypeButton = require("./blocktype-button");
|
|
23
23
|
var _styled = require("./styled");
|
24
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
26
|
-
function _createSuper(
|
26
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
27
27
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
28
28
|
* @jsxRuntime classic
|
29
29
|
* @jsx jsx
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
2
|
+
import { browser } from '@atlaskit/editor-common/browser';
|
2
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
3
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
5
5
|
import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES } from '../block-types';
|
6
6
|
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from '../commands';
|
@@ -11,7 +11,9 @@ import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { expandIconContainerStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
12
12
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
13
13
|
import TextStyleIcon from '@atlaskit/icon/core/migration/text-style--editor-text-style';
|
14
|
+
import TextIcon from '@atlaskit/icon/core/text';
|
14
15
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
15
17
|
import { NORMAL_TEXT } from '../../block-types';
|
16
18
|
import { buttonContentReducedSpacingStyle, buttonContentStyle, wrapperSmallStyle } from './styled';
|
17
19
|
export const BlockTypeButton = props => {
|
@@ -37,11 +39,17 @@ export const BlockTypeButton = props => {
|
|
37
39
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
38
40
|
css: [wrapperStyle, props.isSmall && wrapperSmallStyle],
|
39
41
|
"data-testid": "toolbar-block-type-text-styles-icon"
|
40
|
-
}, jsx(React.Fragment, null, props.isSmall &&
|
42
|
+
}, jsx(React.Fragment, null, props.isSmall && (
|
43
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
44
|
+
fg('platform.design-system-team.enable-new-icons') ? jsx(TextIcon, {
|
41
45
|
label: labelTextStyles,
|
42
46
|
spacing: "spacious",
|
43
47
|
color: "currentColor"
|
44
|
-
})
|
48
|
+
}) : jsx(TextStyleIcon, {
|
49
|
+
color: "currentColor",
|
50
|
+
spacing: "spacious",
|
51
|
+
label: labelTextStyles
|
52
|
+
})), jsx("span", {
|
45
53
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
46
54
|
css: expandIconContainerStyle
|
47
55
|
}, jsx(ChevronDownIcon, {
|
@@ -1,6 +1,6 @@
|
|
1
|
-
function _createForOfIteratorHelper(
|
2
|
-
function _unsupportedIterableToArray(
|
3
|
-
function _arrayLikeToArray(
|
1
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
2
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
3
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
4
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
5
5
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
6
6
|
import { filterChildrenBetween, wrapSelectionIn } from '@atlaskit/editor-common/utils';
|
@@ -2,8 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
4
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
5
|
+
import { browser } from '@atlaskit/editor-common/browser';
|
5
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
6
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
7
7
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
8
8
|
import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES } from '../block-types';
|
9
9
|
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from '../commands';
|
@@ -11,7 +11,9 @@ import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
11
|
import { expandIconContainerStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
12
12
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
13
13
|
import TextStyleIcon from '@atlaskit/icon/core/migration/text-style--editor-text-style';
|
14
|
+
import TextIcon from '@atlaskit/icon/core/text';
|
14
15
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
15
17
|
import { NORMAL_TEXT } from '../../block-types';
|
16
18
|
import { buttonContentReducedSpacingStyle, buttonContentStyle, wrapperSmallStyle } from './styled';
|
17
19
|
export var BlockTypeButton = function BlockTypeButton(props) {
|
@@ -37,11 +39,17 @@ export var BlockTypeButton = function BlockTypeButton(props) {
|
|
37
39
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
38
40
|
css: [wrapperStyle, props.isSmall && wrapperSmallStyle],
|
39
41
|
"data-testid": "toolbar-block-type-text-styles-icon"
|
40
|
-
}, jsx(React.Fragment, null, props.isSmall &&
|
42
|
+
}, jsx(React.Fragment, null, props.isSmall && (
|
43
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
44
|
+
fg('platform.design-system-team.enable-new-icons') ? jsx(TextIcon, {
|
41
45
|
label: labelTextStyles,
|
42
46
|
spacing: "spacious",
|
43
47
|
color: "currentColor"
|
44
|
-
})
|
48
|
+
}) : jsx(TextStyleIcon, {
|
49
|
+
color: "currentColor",
|
50
|
+
spacing: "spacious",
|
51
|
+
label: labelTextStyles
|
52
|
+
})), jsx("span", {
|
45
53
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
46
54
|
css: expandIconContainerStyle
|
47
55
|
}, jsx(ChevronDownIcon, {
|
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
10
|
-
function _createSuper(
|
10
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
12
12
|
/**
|
13
13
|
* @jsxRuntime classic
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
3
|
-
"version": "3.14.
|
3
|
+
"version": "3.14.5",
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
5
5
|
"author": "Atlassian Pty Ltd",
|
6
6
|
"license": "Apache-2.0",
|
@@ -34,13 +34,13 @@
|
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
36
|
"@atlaskit/adf-schema": "^40.9.0",
|
37
|
-
"@atlaskit/editor-common": "^
|
37
|
+
"@atlaskit/editor-common": "^89.0.0",
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
39
39
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
40
40
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
42
42
|
"@atlaskit/editor-tables": "^2.8.0",
|
43
|
-
"@atlaskit/icon": "^22.
|
43
|
+
"@atlaskit/icon": "^22.16.0",
|
44
44
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
46
46
|
"@atlaskit/theme": "^13.0.0",
|