@atlaskit/editor-plugin-text-formatting 0.4.16 → 0.4.18

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-text-formatting
2
2
 
3
+ ## 0.4.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.4.17
10
+
11
+ ### Patch Changes
12
+
13
+ - [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147) [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) - Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
14
+
3
15
  ## 0.4.16
4
16
 
5
17
  ### Patch Changes
@@ -5,12 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useClearIcon = void 0;
7
7
  var _react = require("react");
8
+ var _react2 = require("@emotion/react");
8
9
  var _analytics = require("@atlaskit/editor-common/analytics");
9
10
  var _keymaps = require("@atlaskit/editor-common/keymaps");
10
11
  var _messages = require("@atlaskit/editor-common/messages");
11
12
  var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
12
13
  var _clearFormatting = require("../../../commands/clear-formatting");
13
14
  var _clearFormatting2 = require("../../../pm-plugins/clear-formatting");
15
+ /** @jsx jsx */
16
+
14
17
  var useClearFormattingPluginState = function useClearFormattingPluginState(editorState) {
15
18
  return (0, _react.useMemo)(function () {
16
19
  return _clearFormatting2.pluginKey.getState(editorState);
@@ -36,9 +39,8 @@ var useClearIcon = exports.useClearIcon = function useClearIcon(_ref) {
36
39
  command: clearFormattingToolbar,
37
40
  content: clearFormattingLabel,
38
41
  elemAfter:
39
- /*#__PURE__*/
40
42
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
41
- React.createElement("div", {
43
+ (0, _react2.jsx)("div", {
42
44
  css: _shortcut.shortcutStyle
43
45
  }, (0, _keymaps.tooltip)(_keymaps.clearFormatting)),
44
46
  value: {
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.useHasFormattingActived = exports.useFormattingIcons = void 0;
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
+ var _react2 = require("@emotion/react");
11
12
  var _analytics = require("@atlaskit/editor-common/analytics");
12
13
  var _keymaps = require("@atlaskit/editor-common/keymaps");
13
14
  var _messages = require("@atlaskit/editor-common/messages");
@@ -19,6 +20,7 @@ var _commands = require("../../../commands");
19
20
  var _pluginKey = require("../../../pm-plugins/plugin-key");
20
21
  var _types = require("../types");
21
22
  var _IconsMarkSchema;
23
+ /** @jsx jsx */
22
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
25
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
26
  var withToolbarInputMethod = function withToolbarInputMethod(func) {
@@ -32,7 +34,7 @@ var IconButtons = function IconButtons(editorAnalyticsAPI) {
32
34
  message: _messages.toolbarMessages.bold,
33
35
  tooltipKeymap: _keymaps.toggleBold,
34
36
  component: function component() {
35
- return /*#__PURE__*/_react.default.createElement(_bold.default, {
37
+ return (0, _react2.jsx)(_bold.default, {
36
38
  label: ""
37
39
  });
38
40
  }
@@ -43,7 +45,7 @@ var IconButtons = function IconButtons(editorAnalyticsAPI) {
43
45
  message: _messages.toolbarMessages.italic,
44
46
  tooltipKeymap: _keymaps.toggleItalic,
45
47
  component: function component() {
46
- return /*#__PURE__*/_react.default.createElement(_italic.default, {
48
+ return (0, _react2.jsx)(_italic.default, {
47
49
  label: ""
48
50
  });
49
51
  }
@@ -91,14 +93,13 @@ var getIcon = function getIcon(_ref) {
91
93
  key: iconType,
92
94
  command: icon.command,
93
95
  iconElement: icon.component ? icon.component() : undefined,
94
- tooltipElement: tooltipKeymap ? /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
96
+ tooltipElement: tooltipKeymap ? (0, _react2.jsx)(_keymaps.ToolTipContent, {
95
97
  description: content,
96
98
  keymap: tooltipKeymap
97
99
  }) : undefined,
98
100
  elemAfter: tooltipKeymap ?
99
- /*#__PURE__*/
100
101
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
101
- _react.default.createElement("div", {
102
+ (0, _react2.jsx)("div", {
102
103
  css: _shortcut.shortcutStyle
103
104
  }, (0, _keymaps.tooltip)(tooltipKeymap)) : undefined,
104
105
  value: {
@@ -8,6 +8,7 @@ exports.default = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = require("react");
11
+ var _react2 = require("@emotion/react");
11
12
  var _reactIntlNext = require("react-intl-next");
12
13
  var _hooks = require("@atlaskit/editor-common/hooks");
13
14
  var _messages = require("@atlaskit/editor-common/messages");
@@ -20,6 +21,8 @@ var _formattingIcons = require("./hooks/formatting-icons");
20
21
  var _responsiveToolbarButtons = require("./hooks/responsive-toolbar-buttons");
21
22
  var _moreButton = require("./more-button");
22
23
  var _singleToolbarButtons = require("./single-toolbar-buttons");
24
+ /** @jsx jsx */
25
+
23
26
  var ToolbarFormatting = function ToolbarFormatting(_ref) {
24
27
  var _usePreviousState;
25
28
  var shouldUseResponsiveToolbar = _ref.shouldUseResponsiveToolbar,
@@ -119,29 +122,28 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
119
122
  }
120
123
  }, [screenReaderMessage]);
121
124
  return (
122
- /*#__PURE__*/
123
125
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
124
- React.createElement("span", {
126
+ (0, _react2.jsx)("span", {
125
127
  css: _styles.buttonGroupStyle
126
- }, message && /*#__PURE__*/React.createElement(_ui.Announcer, {
128
+ }, message && (0, _react2.jsx)(_ui.Announcer, {
127
129
  ariaLive: "assertive",
128
130
  text: message,
129
131
  ariaRelevant: "additions",
130
132
  delay: 250
131
- }), /*#__PURE__*/React.createElement(_singleToolbarButtons.SingleToolbarButtons, {
133
+ }), (0, _react2.jsx)(_singleToolbarButtons.SingleToolbarButtons, {
132
134
  items: singleItems,
133
135
  editorView: editorView,
134
136
  isReducedSpacing: isReducedSpacing
135
- }), /*#__PURE__*/React.createElement("span", {
137
+ }), (0, _react2.jsx)("span", {
136
138
  css: _styles.wrapperStyle
137
- }, isToolbarDisabled ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_moreButton.MoreButton, {
139
+ }, isToolbarDisabled ? (0, _react2.jsx)("div", null, (0, _react2.jsx)(_moreButton.MoreButton, {
138
140
  label: moreFormattingButtonLabel,
139
141
  isReducedSpacing: isReducedSpacing,
140
142
  isDisabled: true,
141
143
  isSelected: false,
142
144
  "aria-expanded": undefined,
143
145
  "aria-pressed": undefined
144
- })) : /*#__PURE__*/React.createElement(_dropdownMenu.FormattingTextDropdownMenu, {
146
+ })) : (0, _react2.jsx)(_dropdownMenu.FormattingTextDropdownMenu, {
145
147
  popupsMountPoint: popupsMountPoint,
146
148
  popupsBoundariesElement: popupsBoundariesElement,
147
149
  popupsScrollableElement: popupsScrollableElement,
@@ -150,7 +152,7 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
150
152
  moreButtonLabel: moreFormattingButtonLabel,
151
153
  hasFormattingActive: hasFormattingActive,
152
154
  items: items
153
- }), /*#__PURE__*/React.createElement("span", {
155
+ }), (0, _react2.jsx)("span", {
154
156
  css: _styles.separatorStyles
155
157
  })))
156
158
  );
@@ -165,7 +167,7 @@ var Toolbar = function Toolbar(_ref2) {
165
167
  shouldUseResponsiveToolbar = _ref2.shouldUseResponsiveToolbar,
166
168
  intl = _ref2.intl,
167
169
  editorAnalyticsAPI = _ref2.editorAnalyticsAPI;
168
- return /*#__PURE__*/React.createElement(ToolbarFormatting, {
170
+ return (0, _react2.jsx)(ToolbarFormatting, {
169
171
  popupsMountPoint: popupsMountPoint,
170
172
  popupsScrollableElement: popupsScrollableElement,
171
173
  toolbarSize: toolbarSize,
@@ -6,9 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.MoreButton = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _react2 = require("@emotion/react");
9
10
  var _styles = require("@atlaskit/editor-common/styles");
10
11
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
11
12
  var _more = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/more"));
13
+ /** @jsx jsx */
14
+
12
15
  var MoreButton = exports.MoreButton = /*#__PURE__*/_react.default.memo(function (_ref) {
13
16
  var label = _ref.label,
14
17
  ariaExpanded = _ref['aria-expanded'],
@@ -17,7 +20,7 @@ var MoreButton = exports.MoreButton = /*#__PURE__*/_react.default.memo(function
17
20
  isDisabled = _ref.isDisabled,
18
21
  onClick = _ref.onClick,
19
22
  onKeyDown = _ref.onKeyDown;
20
- return /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarButton, {
23
+ return (0, _react2.jsx)(_uiMenu.ToolbarButton, {
21
24
  disabled: isDisabled,
22
25
  selected: isSelected,
23
26
  onClick: onClick,
@@ -25,11 +28,10 @@ var MoreButton = exports.MoreButton = /*#__PURE__*/_react.default.memo(function
25
28
  spacing: isReducedSpacing ? 'none' : 'default',
26
29
  title: label,
27
30
  iconBefore:
28
- /*#__PURE__*/
29
31
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
30
- _react.default.createElement("div", {
32
+ (0, _react2.jsx)("div", {
31
33
  css: _styles.triggerWrapperStyles
32
- }, /*#__PURE__*/_react.default.createElement(_more.default, {
34
+ }, (0, _react2.jsx)(_more.default, {
33
35
  label: ""
34
36
  })),
35
37
  "aria-expanded": ariaExpanded,
@@ -6,10 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.SingleToolbarButtons = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _react2 = require("@emotion/react");
9
10
  var _styles = require("@atlaskit/editor-common/styles");
10
11
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
11
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ /** @jsx jsx */
15
+
13
16
  var SingleToolbarButtons = exports.SingleToolbarButtons = /*#__PURE__*/_react.default.memo(function (_ref) {
14
17
  var items = _ref.items,
15
18
  isReducedSpacing = _ref.isReducedSpacing,
@@ -21,13 +24,12 @@ var SingleToolbarButtons = exports.SingleToolbarButtons = /*#__PURE__*/_react.de
21
24
  };
22
25
  }, [editorView.state, editorView.dispatch]);
23
26
  return (
24
- /*#__PURE__*/
25
27
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
26
- _react.default.createElement("span", {
28
+ (0, _react2.jsx)("span", {
27
29
  css: _styles.buttonGroupStyle
28
30
  }, items.map(function (item) {
29
31
  var _item$ariaLabel;
30
- return /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarButton, {
32
+ return (0, _react2.jsx)(_uiMenu.ToolbarButton, {
31
33
  key: item.key,
32
34
  testId: "editor-toolbar__".concat(String(item.content)),
33
35
  buttonId: item.buttonId,
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { useCallback, useMemo } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
5
  import { clearFormatting as clearFormattingKeymap, tooltip } from '@atlaskit/editor-common/keymaps';
4
6
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
@@ -27,9 +29,8 @@ export const useClearIcon = ({
27
29
  command: clearFormattingToolbar,
28
30
  content: clearFormattingLabel,
29
31
  elemAfter:
30
- /*#__PURE__*/
31
32
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
32
- React.createElement("div", {
33
+ jsx("div", {
33
34
  css: shortcutStyle
34
35
  }, tooltip(clearFormattingKeymap)),
35
36
  value: {
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React, { useMemo } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { INPUT_METHOD, TOOLBAR_ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
3
5
  import { getAriaKeyshortcuts, toggleBold, toggleCode, toggleItalic, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleUnderline, tooltip, ToolTipContent } from '@atlaskit/editor-common/keymaps';
4
6
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
@@ -16,7 +18,7 @@ const IconButtons = editorAnalyticsAPI => ({
16
18
  command: withToolbarInputMethod(toggleStrongWithAnalytics(editorAnalyticsAPI)),
17
19
  message: toolbarMessages.bold,
18
20
  tooltipKeymap: toggleBold,
19
- component: () => /*#__PURE__*/React.createElement(BoldIcon, {
21
+ component: () => jsx(BoldIcon, {
20
22
  label: ""
21
23
  })
22
24
  },
@@ -25,7 +27,7 @@ const IconButtons = editorAnalyticsAPI => ({
25
27
  command: withToolbarInputMethod(toggleEmWithAnalytics(editorAnalyticsAPI)),
26
28
  message: toolbarMessages.italic,
27
29
  tooltipKeymap: toggleItalic,
28
- component: () => /*#__PURE__*/React.createElement(ItalicIcon, {
30
+ component: () => jsx(ItalicIcon, {
29
31
  label: ""
30
32
  })
31
33
  },
@@ -74,14 +76,13 @@ const getIcon = ({
74
76
  key: iconType,
75
77
  command: icon.command,
76
78
  iconElement: icon.component ? icon.component() : undefined,
77
- tooltipElement: tooltipKeymap ? /*#__PURE__*/React.createElement(ToolTipContent, {
79
+ tooltipElement: tooltipKeymap ? jsx(ToolTipContent, {
78
80
  description: content,
79
81
  keymap: tooltipKeymap
80
82
  }) : undefined,
81
83
  elemAfter: tooltipKeymap ?
82
- /*#__PURE__*/
83
84
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
84
- React.createElement("div", {
85
+ jsx("div", {
85
86
  css: shortcutStyle
86
87
  }, tooltip(tooltipKeymap)) : undefined,
87
88
  value: {
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { useEffect, useMemo, useState } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { injectIntl } from 'react-intl-next';
3
5
  import { usePreviousState } from '@atlaskit/editor-common/hooks';
4
6
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
@@ -105,29 +107,28 @@ const ToolbarFormatting = ({
105
107
  }
106
108
  }, [screenReaderMessage]);
107
109
  return (
108
- /*#__PURE__*/
109
110
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
110
- React.createElement("span", {
111
+ jsx("span", {
111
112
  css: buttonGroupStyle
112
- }, message && /*#__PURE__*/React.createElement(Announcer, {
113
+ }, message && jsx(Announcer, {
113
114
  ariaLive: "assertive",
114
115
  text: message,
115
116
  ariaRelevant: "additions",
116
117
  delay: 250
117
- }), /*#__PURE__*/React.createElement(SingleToolbarButtons, {
118
+ }), jsx(SingleToolbarButtons, {
118
119
  items: singleItems,
119
120
  editorView: editorView,
120
121
  isReducedSpacing: isReducedSpacing
121
- }), /*#__PURE__*/React.createElement("span", {
122
+ }), jsx("span", {
122
123
  css: wrapperStyle
123
- }, isToolbarDisabled ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MoreButton, {
124
+ }, isToolbarDisabled ? jsx("div", null, jsx(MoreButton, {
124
125
  label: moreFormattingButtonLabel,
125
126
  isReducedSpacing: isReducedSpacing,
126
127
  isDisabled: true,
127
128
  isSelected: false,
128
129
  "aria-expanded": undefined,
129
130
  "aria-pressed": undefined
130
- })) : /*#__PURE__*/React.createElement(FormattingTextDropdownMenu, {
131
+ })) : jsx(FormattingTextDropdownMenu, {
131
132
  popupsMountPoint: popupsMountPoint,
132
133
  popupsBoundariesElement: popupsBoundariesElement,
133
134
  popupsScrollableElement: popupsScrollableElement,
@@ -136,7 +137,7 @@ const ToolbarFormatting = ({
136
137
  moreButtonLabel: moreFormattingButtonLabel,
137
138
  hasFormattingActive: hasFormattingActive,
138
139
  items: items
139
- }), /*#__PURE__*/React.createElement("span", {
140
+ }), jsx("span", {
140
141
  css: separatorStyles
141
142
  })))
142
143
  );
@@ -152,7 +153,7 @@ const Toolbar = ({
152
153
  intl,
153
154
  editorAnalyticsAPI
154
155
  }) => {
155
- return /*#__PURE__*/React.createElement(ToolbarFormatting, {
156
+ return jsx(ToolbarFormatting, {
156
157
  popupsMountPoint: popupsMountPoint,
157
158
  popupsScrollableElement: popupsScrollableElement,
158
159
  toolbarSize: toolbarSize,
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { triggerWrapperStyles } from '@atlaskit/editor-common/styles';
3
5
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
4
6
  import MoreIcon from '@atlaskit/icon/glyph/editor/more';
@@ -11,7 +13,7 @@ export const MoreButton = /*#__PURE__*/React.memo(({
11
13
  onClick,
12
14
  onKeyDown
13
15
  }) => {
14
- return /*#__PURE__*/React.createElement(ToolbarButton, {
16
+ return jsx(ToolbarButton, {
15
17
  disabled: isDisabled,
16
18
  selected: isSelected,
17
19
  onClick: onClick,
@@ -19,11 +21,10 @@ export const MoreButton = /*#__PURE__*/React.memo(({
19
21
  spacing: isReducedSpacing ? 'none' : 'default',
20
22
  title: label,
21
23
  iconBefore:
22
- /*#__PURE__*/
23
24
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
24
- React.createElement("div", {
25
+ jsx("div", {
25
26
  css: triggerWrapperStyles
26
- }, /*#__PURE__*/React.createElement(MoreIcon, {
27
+ }, jsx(MoreIcon, {
27
28
  label: ""
28
29
  })),
29
30
  "aria-expanded": ariaExpanded,
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React, { useCallback } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { buttonGroupStyle } from '@atlaskit/editor-common/styles';
3
5
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
4
6
  export const SingleToolbarButtons = /*#__PURE__*/React.memo(({
@@ -13,13 +15,12 @@ export const SingleToolbarButtons = /*#__PURE__*/React.memo(({
13
15
  };
14
16
  }, [editorView.state, editorView.dispatch]);
15
17
  return (
16
- /*#__PURE__*/
17
18
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
18
- React.createElement("span", {
19
+ jsx("span", {
19
20
  css: buttonGroupStyle
20
21
  }, items.map(item => {
21
22
  var _item$ariaLabel;
22
- return /*#__PURE__*/React.createElement(ToolbarButton, {
23
+ return jsx(ToolbarButton, {
23
24
  key: item.key,
24
25
  testId: `editor-toolbar__${String(item.content)}`,
25
26
  buttonId: item.buttonId,
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { useCallback, useMemo } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
5
  import { clearFormatting as clearFormattingKeymap, tooltip } from '@atlaskit/editor-common/keymaps';
4
6
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
@@ -30,9 +32,8 @@ export var useClearIcon = function useClearIcon(_ref) {
30
32
  command: clearFormattingToolbar,
31
33
  content: clearFormattingLabel,
32
34
  elemAfter:
33
- /*#__PURE__*/
34
35
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
35
- React.createElement("div", {
36
+ jsx("div", {
36
37
  css: shortcutStyle
37
38
  }, tooltip(clearFormattingKeymap)),
38
39
  value: {
@@ -1,6 +1,8 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  var _IconsMarkSchema;
3
+ /** @jsx jsx */
3
4
  import React, { useMemo } from 'react';
5
+ import { jsx } from '@emotion/react';
4
6
  import { INPUT_METHOD, TOOLBAR_ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
5
7
  import { getAriaKeyshortcuts, toggleBold, toggleCode, toggleItalic, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleUnderline, tooltip, ToolTipContent } from '@atlaskit/editor-common/keymaps';
6
8
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
@@ -22,7 +24,7 @@ var IconButtons = function IconButtons(editorAnalyticsAPI) {
22
24
  message: toolbarMessages.bold,
23
25
  tooltipKeymap: toggleBold,
24
26
  component: function component() {
25
- return /*#__PURE__*/React.createElement(BoldIcon, {
27
+ return jsx(BoldIcon, {
26
28
  label: ""
27
29
  });
28
30
  }
@@ -33,7 +35,7 @@ var IconButtons = function IconButtons(editorAnalyticsAPI) {
33
35
  message: toolbarMessages.italic,
34
36
  tooltipKeymap: toggleItalic,
35
37
  component: function component() {
36
- return /*#__PURE__*/React.createElement(ItalicIcon, {
38
+ return jsx(ItalicIcon, {
37
39
  label: ""
38
40
  });
39
41
  }
@@ -81,14 +83,13 @@ var getIcon = function getIcon(_ref) {
81
83
  key: iconType,
82
84
  command: icon.command,
83
85
  iconElement: icon.component ? icon.component() : undefined,
84
- tooltipElement: tooltipKeymap ? /*#__PURE__*/React.createElement(ToolTipContent, {
86
+ tooltipElement: tooltipKeymap ? jsx(ToolTipContent, {
85
87
  description: content,
86
88
  keymap: tooltipKeymap
87
89
  }) : undefined,
88
90
  elemAfter: tooltipKeymap ?
89
- /*#__PURE__*/
90
91
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
91
- React.createElement("div", {
92
+ jsx("div", {
92
93
  css: shortcutStyle
93
94
  }, tooltip(tooltipKeymap)) : undefined,
94
95
  value: {
@@ -1,6 +1,8 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ /** @jsx jsx */
3
4
  import { useEffect, useMemo, useState } from 'react';
5
+ import { jsx } from '@emotion/react';
4
6
  import { injectIntl } from 'react-intl-next';
5
7
  import { usePreviousState } from '@atlaskit/editor-common/hooks';
6
8
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
@@ -112,29 +114,28 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
112
114
  }
113
115
  }, [screenReaderMessage]);
114
116
  return (
115
- /*#__PURE__*/
116
117
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
117
- React.createElement("span", {
118
+ jsx("span", {
118
119
  css: buttonGroupStyle
119
- }, message && /*#__PURE__*/React.createElement(Announcer, {
120
+ }, message && jsx(Announcer, {
120
121
  ariaLive: "assertive",
121
122
  text: message,
122
123
  ariaRelevant: "additions",
123
124
  delay: 250
124
- }), /*#__PURE__*/React.createElement(SingleToolbarButtons, {
125
+ }), jsx(SingleToolbarButtons, {
125
126
  items: singleItems,
126
127
  editorView: editorView,
127
128
  isReducedSpacing: isReducedSpacing
128
- }), /*#__PURE__*/React.createElement("span", {
129
+ }), jsx("span", {
129
130
  css: wrapperStyle
130
- }, isToolbarDisabled ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MoreButton, {
131
+ }, isToolbarDisabled ? jsx("div", null, jsx(MoreButton, {
131
132
  label: moreFormattingButtonLabel,
132
133
  isReducedSpacing: isReducedSpacing,
133
134
  isDisabled: true,
134
135
  isSelected: false,
135
136
  "aria-expanded": undefined,
136
137
  "aria-pressed": undefined
137
- })) : /*#__PURE__*/React.createElement(FormattingTextDropdownMenu, {
138
+ })) : jsx(FormattingTextDropdownMenu, {
138
139
  popupsMountPoint: popupsMountPoint,
139
140
  popupsBoundariesElement: popupsBoundariesElement,
140
141
  popupsScrollableElement: popupsScrollableElement,
@@ -143,7 +144,7 @@ var ToolbarFormatting = function ToolbarFormatting(_ref) {
143
144
  moreButtonLabel: moreFormattingButtonLabel,
144
145
  hasFormattingActive: hasFormattingActive,
145
146
  items: items
146
- }), /*#__PURE__*/React.createElement("span", {
147
+ }), jsx("span", {
147
148
  css: separatorStyles
148
149
  })))
149
150
  );
@@ -158,7 +159,7 @@ var Toolbar = function Toolbar(_ref2) {
158
159
  shouldUseResponsiveToolbar = _ref2.shouldUseResponsiveToolbar,
159
160
  intl = _ref2.intl,
160
161
  editorAnalyticsAPI = _ref2.editorAnalyticsAPI;
161
- return /*#__PURE__*/React.createElement(ToolbarFormatting, {
162
+ return jsx(ToolbarFormatting, {
162
163
  popupsMountPoint: popupsMountPoint,
163
164
  popupsScrollableElement: popupsScrollableElement,
164
165
  toolbarSize: toolbarSize,
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { triggerWrapperStyles } from '@atlaskit/editor-common/styles';
3
5
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
4
6
  import MoreIcon from '@atlaskit/icon/glyph/editor/more';
@@ -10,7 +12,7 @@ export var MoreButton = /*#__PURE__*/React.memo(function (_ref) {
10
12
  isDisabled = _ref.isDisabled,
11
13
  onClick = _ref.onClick,
12
14
  onKeyDown = _ref.onKeyDown;
13
- return /*#__PURE__*/React.createElement(ToolbarButton, {
15
+ return jsx(ToolbarButton, {
14
16
  disabled: isDisabled,
15
17
  selected: isSelected,
16
18
  onClick: onClick,
@@ -18,11 +20,10 @@ export var MoreButton = /*#__PURE__*/React.memo(function (_ref) {
18
20
  spacing: isReducedSpacing ? 'none' : 'default',
19
21
  title: label,
20
22
  iconBefore:
21
- /*#__PURE__*/
22
23
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
23
- React.createElement("div", {
24
+ jsx("div", {
24
25
  css: triggerWrapperStyles
25
- }, /*#__PURE__*/React.createElement(MoreIcon, {
26
+ }, jsx(MoreIcon, {
26
27
  label: ""
27
28
  })),
28
29
  "aria-expanded": ariaExpanded,
@@ -1,4 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import React, { useCallback } from 'react';
3
+ import { jsx } from '@emotion/react';
2
4
  import { buttonGroupStyle } from '@atlaskit/editor-common/styles';
3
5
  import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
4
6
  export var SingleToolbarButtons = /*#__PURE__*/React.memo(function (_ref) {
@@ -12,13 +14,12 @@ export var SingleToolbarButtons = /*#__PURE__*/React.memo(function (_ref) {
12
14
  };
13
15
  }, [editorView.state, editorView.dispatch]);
14
16
  return (
15
- /*#__PURE__*/
16
17
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
17
- React.createElement("span", {
18
+ jsx("span", {
18
19
  css: buttonGroupStyle
19
20
  }, items.map(function (item) {
20
21
  var _item$ariaLabel;
21
- return /*#__PURE__*/React.createElement(ToolbarButton, {
22
+ return jsx(ToolbarButton, {
22
23
  key: item.key,
23
24
  testId: "editor-toolbar__".concat(String(item.content)),
24
25
  buttonId: item.buttonId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-formatting",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "description": "Text-formatting plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^35.0.0",
35
- "@atlaskit/editor-common": "^76.24.0",
36
- "@atlaskit/editor-plugin-analytics": "^0.3.0",
35
+ "@atlaskit/editor-common": "^76.26.0",
36
+ "@atlaskit/editor-plugin-analytics": "^0.4.0",
37
37
  "@atlaskit/editor-prosemirror": "1.1.0",
38
38
  "@atlaskit/editor-shared-styles": "^2.8.0",
39
39
  "@atlaskit/editor-tables": "^2.3.0",