@atlaskit/editor-common 93.5.2 → 93.5.3

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/card/LinkToolbarButtonGroup.js +8 -4
  3. package/dist/cjs/card/link-toolbar-button-group-options.js +16 -5
  4. package/dist/cjs/card/ui/assets/card.js +2 -0
  5. package/dist/cjs/card/ui/assets/embed.js +2 -0
  6. package/dist/cjs/card/ui/assets/inline.js +2 -0
  7. package/dist/cjs/card/ui/assets/url.js +2 -0
  8. package/dist/cjs/media-single/CommentBadge.js +6 -2
  9. package/dist/cjs/media-single/CommentBadgeNext.js +6 -2
  10. package/dist/cjs/monitoring/error.js +1 -1
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/cjs/ui-menu/ColorPickerButton/index.js +1 -0
  13. package/dist/es2019/card/LinkToolbarButtonGroup.js +24 -18
  14. package/dist/es2019/card/link-toolbar-button-group-options.js +15 -5
  15. package/dist/es2019/card/ui/assets/card.js +1 -0
  16. package/dist/es2019/card/ui/assets/embed.js +1 -0
  17. package/dist/es2019/card/ui/assets/inline.js +1 -0
  18. package/dist/es2019/card/ui/assets/url.js +1 -0
  19. package/dist/es2019/media-single/CommentBadge.js +6 -2
  20. package/dist/es2019/media-single/CommentBadgeNext.js +6 -2
  21. package/dist/es2019/monitoring/error.js +1 -1
  22. package/dist/es2019/ui/DropList/index.js +1 -1
  23. package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -0
  24. package/dist/esm/card/LinkToolbarButtonGroup.js +8 -4
  25. package/dist/esm/card/link-toolbar-button-group-options.js +15 -5
  26. package/dist/esm/card/ui/assets/card.js +1 -0
  27. package/dist/esm/card/ui/assets/embed.js +1 -0
  28. package/dist/esm/card/ui/assets/inline.js +1 -0
  29. package/dist/esm/card/ui/assets/url.js +1 -0
  30. package/dist/esm/media-single/CommentBadge.js +6 -2
  31. package/dist/esm/media-single/CommentBadgeNext.js +6 -2
  32. package/dist/esm/monitoring/error.js +1 -1
  33. package/dist/esm/ui/DropList/index.js +1 -1
  34. package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -0
  35. package/dist/types/card/LinkToolbarButtonGroup.d.ts +3 -2
  36. package/dist/types/card/cardOptions.d.ts +74 -0
  37. package/dist/types/card/ui/assets/card.d.ts +2 -2
  38. package/dist/types/card/ui/assets/embed.d.ts +2 -2
  39. package/dist/types/card/ui/assets/inline.d.ts +2 -2
  40. package/dist/types/card/ui/assets/url.d.ts +2 -2
  41. package/dist/types-ts4.5/card/LinkToolbarButtonGroup.d.ts +3 -2
  42. package/dist/types-ts4.5/card/cardOptions.d.ts +74 -0
  43. package/dist/types-ts4.5/card/ui/assets/card.d.ts +2 -2
  44. package/dist/types-ts4.5/card/ui/assets/embed.d.ts +2 -2
  45. package/dist/types-ts4.5/card/ui/assets/inline.d.ts +2 -2
  46. package/dist/types-ts4.5/card/ui/assets/url.d.ts +2 -2
  47. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 93.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#152823](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152823)
8
+ [`0ec705650807f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0ec705650807f) -
9
+ [ux] ED-25090: ED-25090: Migrated link toolbar and panel toolbar to use the new icons
10
+ - Updated dependencies
11
+
3
12
  ## 93.5.2
4
13
 
5
14
  ### Patch Changes
@@ -50,7 +50,9 @@ var LinkToolbarButtonGroup = exports.LinkToolbarButtonGroup = function LinkToolb
50
50
  testId = _ref3.testId,
51
51
  tooltipContent = _ref3.tooltipContent,
52
52
  title = _ref3.title,
53
- Icon = _ref3.icon;
53
+ icon = _ref3.icon,
54
+ iconFallback = _ref3.iconFallback;
55
+ var ButtonIcon = icon;
54
56
  return (0, _react2.jsx)(DisallowedWrapper, {
55
57
  css: disabled ? disallowedWrapperStyle : defaultWrapperStyle,
56
58
  key: testId,
@@ -58,9 +60,11 @@ var LinkToolbarButtonGroup = exports.LinkToolbarButtonGroup = function LinkToolb
58
60
  }, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
59
61
  css: disabled ? buttonStyleNoneEvent : buttonStyle,
60
62
  title: title,
61
- icon: (0, _react2.jsx)(Icon, {
62
- size: "medium",
63
- label: title
63
+ icon: (0, _react2.jsx)(ButtonIcon, {
64
+ label: title,
65
+ spacing: "spacious",
66
+ LEGACY_size: "medium",
67
+ LEGACY_fallbackIcon: iconFallback
64
68
  }),
65
69
  selected: selected,
66
70
  onClick: onClick,
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.getButtonGroupOption = void 0;
8
+ var _minus = _interopRequireDefault(require("@atlaskit/icon/core/minus"));
9
+ var _smartLinkCard = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-card"));
10
+ var _smartLinkEmbed = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-embed"));
11
+ var _smartLinkInline = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-inline"));
7
12
  var _messages = require("../messages");
8
13
  var _card = require("./ui/assets/card");
9
14
  var _embed = require("./ui/assets/embed");
@@ -12,19 +17,23 @@ var _url = require("./ui/assets/url");
12
17
  var appearancePropsMap = {
13
18
  url: {
14
19
  title: _messages.cardMessages.urlTitle,
15
- icon: _url.IconUrl
20
+ icon: _minus.default,
21
+ iconFallback: _url.IconUrl
16
22
  },
17
23
  inline: {
18
24
  title: _messages.cardMessages.inlineTitle,
19
- icon: _inline.IconInline
25
+ icon: _smartLinkInline.default,
26
+ iconFallback: _inline.IconInline
20
27
  },
21
28
  block: {
22
29
  title: _messages.cardMessages.blockTitle,
23
- icon: _card.IconCard
30
+ icon: _smartLinkCard.default,
31
+ iconFallback: _card.IconCard
24
32
  },
25
33
  embed: {
26
34
  title: _messages.cardMessages.embedTitle,
27
- icon: _embed.IconEmbed
35
+ icon: _smartLinkEmbed.default,
36
+ iconFallback: _embed.IconEmbed
28
37
  }
29
38
  };
30
39
  var getButtonGroupOption = exports.getButtonGroupOption = function getButtonGroupOption(intl, dispatchCommand, _ref) {
@@ -36,10 +45,12 @@ var getButtonGroupOption = exports.getButtonGroupOption = function getButtonGrou
36
45
  tooltip = _ref.tooltip;
37
46
  var _appearancePropsMap = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
38
47
  title = _appearancePropsMap.title,
39
- icon = _appearancePropsMap.icon;
48
+ icon = _appearancePropsMap.icon,
49
+ iconFallback = _appearancePropsMap.iconFallback;
40
50
  return {
41
51
  title: intl.formatMessage(title),
42
52
  icon: icon,
53
+ iconFallback: iconFallback,
43
54
  onClick: function onClick() {
44
55
  return dispatchCommand(_onClick);
45
56
  },
@@ -8,6 +8,8 @@ exports.IconCard = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _icon = _interopRequireDefault(require("@atlaskit/icon"));
11
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
12
+
11
13
  var IconCardGlyph = function IconCardGlyph(props) {
12
14
  return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
13
15
  width: "32",
@@ -8,6 +8,8 @@ exports.IconEmbed = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _icon = _interopRequireDefault(require("@atlaskit/icon"));
11
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
12
+
11
13
  var IconEmbedGlyph = function IconEmbedGlyph(props) {
12
14
  return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
13
15
  width: "32",
@@ -8,6 +8,8 @@ exports.IconInline = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _icon = _interopRequireDefault(require("@atlaskit/icon"));
11
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
12
+
11
13
  var IconInlineGlyph = function IconInlineGlyph(props) {
12
14
  return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
13
15
  width: "32",
@@ -8,6 +8,8 @@ exports.IconUrl = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _icon = _interopRequireDefault(require("@atlaskit/icon"));
11
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
12
+
11
13
  var IconUrlGlyph = function IconUrlGlyph(props) {
12
14
  return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
13
15
  width: "32",
@@ -11,7 +11,8 @@ var _react2 = require("@emotion/react");
11
11
  var _debounce = _interopRequireDefault(require("lodash/debounce"));
12
12
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
- var _comment = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
14
+ var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
15
+ var _comment2 = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
15
16
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
16
17
  var _media = require("../media");
17
18
  /**
@@ -115,7 +116,10 @@ var CommentBadge = exports.CommentBadge = /*#__PURE__*/(0, _react.forwardRef)(fu
115
116
  onMouseLeave: onMouseLeave,
116
117
  iconAfter: (0, _react2.jsx)(_comment.default, {
117
118
  label: title,
118
- size: badgeSize
119
+ spacing: "spacious",
120
+ color: "currentColor",
121
+ LEGACY_size: badgeSize,
122
+ LEGACY_fallbackIcon: _comment2.default
119
123
  })
120
124
  })));
121
125
  });
@@ -8,7 +8,8 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.CommentBadgeNext = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactIntlNext = require("react-intl-next");
11
- var _comment = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
11
+ var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
12
+ var _comment2 = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
12
13
  var _primitives = require("@atlaskit/primitives");
13
14
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
14
15
  var _media = require("../media");
@@ -56,6 +57,9 @@ var CommentBadgeNext = exports.CommentBadgeNext = function CommentBadgeNext(_ref
56
57
  backgroundColor: colourToken
57
58
  }, /*#__PURE__*/_react.default.createElement(_comment.default, {
58
59
  label: title,
59
- size: badgeSize
60
+ spacing: "spacious",
61
+ color: "currentColor",
62
+ LEGACY_size: badgeSize,
63
+ LEGACY_fallbackIcon: _comment2.default
60
64
  })));
61
65
  };
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
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 SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "93.5.2";
20
+ var packageVersion = "93.5.3";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "93.5.2";
27
+ var packageVersion = "93.5.3";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -231,6 +231,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
231
231
  }
232
232
  }
233
233
  // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
234
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
234
235
  ,
235
236
  css: buttonStyle,
236
237
  iconAfter: (0, _react2.jsx)(_primitives.Box, {
@@ -45,22 +45,28 @@ export const LinkToolbarButtonGroup = ({
45
45
  testId,
46
46
  tooltipContent,
47
47
  title,
48
- icon: Icon
49
- }) => jsx(DisallowedWrapper, {
50
- css: disabled ? disallowedWrapperStyle : defaultWrapperStyle,
51
- key: testId,
52
- disabled: disabled
53
- }, jsx(Button, {
54
- css: disabled ? buttonStyleNoneEvent : buttonStyle,
55
- title: title,
56
- icon: jsx(Icon, {
57
- size: "medium",
58
- label: title
59
- }),
60
- selected: selected,
61
- onClick: onClick,
62
- testId: testId,
63
- disabled: disabled,
64
- tooltipContent: tooltipContent
65
- }))));
48
+ icon,
49
+ iconFallback
50
+ }) => {
51
+ const ButtonIcon = icon;
52
+ return jsx(DisallowedWrapper, {
53
+ css: disabled ? disallowedWrapperStyle : defaultWrapperStyle,
54
+ key: testId,
55
+ disabled: disabled
56
+ }, jsx(Button, {
57
+ css: disabled ? buttonStyleNoneEvent : buttonStyle,
58
+ title: title,
59
+ icon: jsx(ButtonIcon, {
60
+ label: title,
61
+ spacing: "spacious",
62
+ LEGACY_size: "medium",
63
+ LEGACY_fallbackIcon: iconFallback
64
+ }),
65
+ selected: selected,
66
+ onClick: onClick,
67
+ testId: testId,
68
+ disabled: disabled,
69
+ tooltipContent: tooltipContent
70
+ }));
71
+ }));
66
72
  };
@@ -1,3 +1,7 @@
1
+ import MinusIcon from '@atlaskit/icon/core/minus';
2
+ import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
3
+ import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
4
+ import SmartLinkInlineIcon from '@atlaskit/icon/core/smart-link-inline';
1
5
  import { cardMessages as messages } from '../messages';
2
6
  import { IconCard } from './ui/assets/card';
3
7
  import { IconEmbed } from './ui/assets/embed';
@@ -6,19 +10,23 @@ import { IconUrl } from './ui/assets/url';
6
10
  const appearancePropsMap = {
7
11
  url: {
8
12
  title: messages.urlTitle,
9
- icon: IconUrl
13
+ icon: MinusIcon,
14
+ iconFallback: IconUrl
10
15
  },
11
16
  inline: {
12
17
  title: messages.inlineTitle,
13
- icon: IconInline
18
+ icon: SmartLinkInlineIcon,
19
+ iconFallback: IconInline
14
20
  },
15
21
  block: {
16
22
  title: messages.blockTitle,
17
- icon: IconCard
23
+ icon: SmartLinkCardIcon,
24
+ iconFallback: IconCard
18
25
  },
19
26
  embed: {
20
27
  title: messages.embedTitle,
21
- icon: IconEmbed
28
+ icon: SmartLinkEmbedIcon,
29
+ iconFallback: IconEmbed
22
30
  }
23
31
  };
24
32
  export const getButtonGroupOption = (intl, dispatchCommand, {
@@ -31,11 +39,13 @@ export const getButtonGroupOption = (intl, dispatchCommand, {
31
39
  }) => {
32
40
  const {
33
41
  title,
34
- icon
42
+ icon,
43
+ iconFallback
35
44
  } = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'];
36
45
  return {
37
46
  title: intl.formatMessage(title),
38
47
  icon,
48
+ iconFallback,
39
49
  onClick: () => dispatchCommand(onClick),
40
50
  disabled: Boolean(disabled),
41
51
  tooltipContent: tooltip || null,
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  const IconCardGlyph = props => {
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  const IconEmbedGlyph = props => {
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  const IconInlineGlyph = props => {
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  const IconUrlGlyph = props => {
@@ -9,7 +9,8 @@ import { css, jsx } from '@emotion/react';
9
9
  import debounce from 'lodash/debounce';
10
10
  import CustomThemeButton from '@atlaskit/button/custom-theme-button';
11
11
  import { akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
12
- import CommentIcon from '@atlaskit/icon/glyph/comment';
12
+ import CommentIcon from '@atlaskit/icon/core/comment';
13
+ import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
13
14
  import Tooltip from '@atlaskit/tooltip';
14
15
  import { commentMessages as messages } from '../media';
15
16
  const commentBadgeWrapper = css({
@@ -101,7 +102,10 @@ export const CommentBadge = /*#__PURE__*/forwardRef(({
101
102
  onMouseLeave: onMouseLeave,
102
103
  iconAfter: jsx(CommentIcon, {
103
104
  label: title,
104
- size: badgeSize
105
+ spacing: "spacious",
106
+ color: "currentColor",
107
+ LEGACY_size: badgeSize,
108
+ LEGACY_fallbackIcon: LegacyCommentIcon
105
109
  })
106
110
  })));
107
111
  });
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
- import CommentIcon from '@atlaskit/icon/glyph/comment';
3
+ import CommentIcon from '@atlaskit/icon/core/comment';
4
+ import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
4
5
  import { Pressable, xcss } from '@atlaskit/primitives';
5
6
  import Tooltip from '@atlaskit/tooltip';
6
7
  import { commentMessages as messages } from '../media';
@@ -46,6 +47,9 @@ export const CommentBadgeNext = ({
46
47
  backgroundColor: colourToken
47
48
  }, /*#__PURE__*/React.createElement(CommentIcon, {
48
49
  label: title,
49
- size: badgeSize
50
+ spacing: "spacious",
51
+ color: "currentColor",
52
+ LEGACY_size: badgeSize,
53
+ LEGACY_fallbackIcon: LegacyCommentIcon
50
54
  })));
51
55
  };
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "93.5.2";
4
+ const packageVersion = "93.5.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "93.5.2";
16
+ const packageVersion = "93.5.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -211,6 +211,7 @@ const ColorPickerButton = props => {
211
211
  }
212
212
  }
213
213
  // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
214
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
214
215
  ,
215
216
  css: buttonStyle,
216
217
  iconAfter: jsx(Box, {
@@ -45,7 +45,9 @@ export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
45
45
  testId = _ref3.testId,
46
46
  tooltipContent = _ref3.tooltipContent,
47
47
  title = _ref3.title,
48
- Icon = _ref3.icon;
48
+ icon = _ref3.icon,
49
+ iconFallback = _ref3.iconFallback;
50
+ var ButtonIcon = icon;
49
51
  return jsx(DisallowedWrapper, {
50
52
  css: disabled ? disallowedWrapperStyle : defaultWrapperStyle,
51
53
  key: testId,
@@ -53,9 +55,11 @@ export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
53
55
  }, jsx(Button, {
54
56
  css: disabled ? buttonStyleNoneEvent : buttonStyle,
55
57
  title: title,
56
- icon: jsx(Icon, {
57
- size: "medium",
58
- label: title
58
+ icon: jsx(ButtonIcon, {
59
+ label: title,
60
+ spacing: "spacious",
61
+ LEGACY_size: "medium",
62
+ LEGACY_fallbackIcon: iconFallback
59
63
  }),
60
64
  selected: selected,
61
65
  onClick: onClick,
@@ -1,3 +1,7 @@
1
+ import MinusIcon from '@atlaskit/icon/core/minus';
2
+ import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
3
+ import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
4
+ import SmartLinkInlineIcon from '@atlaskit/icon/core/smart-link-inline';
1
5
  import { cardMessages as messages } from '../messages';
2
6
  import { IconCard } from './ui/assets/card';
3
7
  import { IconEmbed } from './ui/assets/embed';
@@ -6,19 +10,23 @@ import { IconUrl } from './ui/assets/url';
6
10
  var appearancePropsMap = {
7
11
  url: {
8
12
  title: messages.urlTitle,
9
- icon: IconUrl
13
+ icon: MinusIcon,
14
+ iconFallback: IconUrl
10
15
  },
11
16
  inline: {
12
17
  title: messages.inlineTitle,
13
- icon: IconInline
18
+ icon: SmartLinkInlineIcon,
19
+ iconFallback: IconInline
14
20
  },
15
21
  block: {
16
22
  title: messages.blockTitle,
17
- icon: IconCard
23
+ icon: SmartLinkCardIcon,
24
+ iconFallback: IconCard
18
25
  },
19
26
  embed: {
20
27
  title: messages.embedTitle,
21
- icon: IconEmbed
28
+ icon: SmartLinkEmbedIcon,
29
+ iconFallback: IconEmbed
22
30
  }
23
31
  };
24
32
  export var getButtonGroupOption = function getButtonGroupOption(intl, dispatchCommand, _ref) {
@@ -30,10 +38,12 @@ export var getButtonGroupOption = function getButtonGroupOption(intl, dispatchCo
30
38
  tooltip = _ref.tooltip;
31
39
  var _appearancePropsMap = appearancePropsMap[appearance !== null && appearance !== void 0 ? appearance : 'url'],
32
40
  title = _appearancePropsMap.title,
33
- icon = _appearancePropsMap.icon;
41
+ icon = _appearancePropsMap.icon,
42
+ iconFallback = _appearancePropsMap.iconFallback;
34
43
  return {
35
44
  title: intl.formatMessage(title),
36
45
  icon: icon,
46
+ iconFallback: iconFallback,
37
47
  onClick: function onClick() {
38
48
  return dispatchCommand(_onClick);
39
49
  },
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  var IconCardGlyph = function IconCardGlyph(props) {
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  var IconEmbedGlyph = function IconEmbedGlyph(props) {
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  var IconInlineGlyph = function IconInlineGlyph(props) {
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /* eslint-disable @atlaskit/design-system/no-custom-icons */
2
3
  import React from 'react';
3
4
  import Icon from '@atlaskit/icon';
4
5
  var IconUrlGlyph = function IconUrlGlyph(props) {
@@ -10,7 +10,8 @@ import { css, jsx } from '@emotion/react';
10
10
  import debounce from 'lodash/debounce';
11
11
  import CustomThemeButton from '@atlaskit/button/custom-theme-button';
12
12
  import { akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
13
- import CommentIcon from '@atlaskit/icon/glyph/comment';
13
+ import CommentIcon from '@atlaskit/icon/core/comment';
14
+ import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
14
15
  import Tooltip from '@atlaskit/tooltip';
15
16
  import { commentMessages as messages } from '../media';
16
17
  var commentBadgeWrapper = css({
@@ -107,7 +108,10 @@ export var CommentBadge = /*#__PURE__*/forwardRef(function (_ref, ref) {
107
108
  onMouseLeave: onMouseLeave,
108
109
  iconAfter: jsx(CommentIcon, {
109
110
  label: title,
110
- size: badgeSize
111
+ spacing: "spacious",
112
+ color: "currentColor",
113
+ LEGACY_size: badgeSize,
114
+ LEGACY_fallbackIcon: LegacyCommentIcon
111
115
  })
112
116
  })));
113
117
  });
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl-next';
3
- import CommentIcon from '@atlaskit/icon/glyph/comment';
3
+ import CommentIcon from '@atlaskit/icon/core/comment';
4
+ import LegacyCommentIcon from '@atlaskit/icon/glyph/comment';
4
5
  import { Pressable, xcss } from '@atlaskit/primitives';
5
6
  import Tooltip from '@atlaskit/tooltip';
6
7
  import { commentMessages as messages } from '../media';
@@ -46,6 +47,9 @@ export var CommentBadgeNext = function CommentBadgeNext(_ref) {
46
47
  backgroundColor: colourToken
47
48
  }, /*#__PURE__*/React.createElement(CommentIcon, {
48
49
  label: title,
49
- size: badgeSize
50
+ spacing: "spacious",
51
+ color: "currentColor",
52
+ LEGACY_size: badgeSize,
53
+ LEGACY_fallbackIcon: LegacyCommentIcon
50
54
  })));
51
55
  };
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "93.5.2";
10
+ var packageVersion = "93.5.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
21
21
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "93.5.2";
24
+ var packageVersion = "93.5.3";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -224,6 +224,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
224
224
  }
225
225
  }
226
226
  // TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
227
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
227
228
  ,
228
229
  css: buttonStyle,
229
230
  iconAfter: jsx(Box, {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { jsx } from '@emotion/react';
3
- import type { GlyphProps } from '@atlaskit/icon/types';
3
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
4
4
  export interface ButtonOptionProps {
5
5
  title: string;
6
6
  selected: boolean;
@@ -8,7 +8,8 @@ export interface ButtonOptionProps {
8
8
  disabled: boolean;
9
9
  tooltipContent?: string | null;
10
10
  onClick: () => void;
11
- icon: (props: GlyphProps) => JSX.Element;
11
+ icon: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
+ iconFallback: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
13
  }
13
14
  export interface LinkToolbarButtonGroupProps {
14
15
  options: ButtonOptionProps[];
@@ -6,20 +6,94 @@ export type OnClickCallback = ({ event, url, }: {
6
6
  url?: string;
7
7
  }) => void;
8
8
  export interface CardOptions {
9
+ /**
10
+ * A promise returning the instance of EditorCardProvider
11
+ *
12
+ * Example: Promise.resolve(new EditorCardProvider())
13
+ */
9
14
  provider?: Providers['cardProvider'];
15
+ /**
16
+ * When the URL pattern is in conflict with Smart Links and macros, macros will take priority over Smart Links.
17
+ * Specify the names of macros to allow card plugin to override the macros behaviour and converts the URL to Smart Link.
18
+ */
10
19
  resolveBeforeMacros?: string[];
20
+ /**
21
+ * A flag to determine whether editor can display Smart Link with block (Card) appearance.
22
+ * Default is true.
23
+ *
24
+ * Component: block (card)
25
+ */
11
26
  allowBlockCards?: boolean;
27
+ /**
28
+ * A flag to determine whether editor can display link datasource (Jira issues and Confluence links).
29
+ * Default is false.
30
+ *
31
+ * Component: link datasource (Jira issues, Confluence list)
32
+ */
12
33
  allowDatasource?: boolean;
34
+ /**
35
+ * A flag to determine whether editor can display Smart Link with embed appearance.
36
+ * Default is false.
37
+ *
38
+ * Component: embed
39
+ */
13
40
  allowEmbeds?: boolean;
41
+ /**
42
+ * A flag to determine whether Smart Link with embed appearance can be resized.
43
+ * Default is true.
44
+ *
45
+ * Component: embed
46
+ */
14
47
  allowResizing?: boolean;
48
+ /**
49
+ * Configure visibility of actions available.
50
+ * By default, smart links show all actions available on the views.
51
+ * Set `hide` to true to disable all actions.
52
+ * Set `hide` to false and set `exclude` to enable only specific actions.
53
+ *
54
+ * Component: inline (hover preview), block (card)
55
+ */
15
56
  actionOptions?: CardProps['actionOptions'];
57
+ /**
58
+ * By default, Smart Link with inline appearance resolving states show a frame with a spinner on the left.
59
+ * An alternative is to remove the frame and place the spinner on the right by setting this value to `on-right-without-skeleton`.
60
+ * This property is specific to inline links in the editor.
61
+ * Default is true.
62
+ *
63
+ * Component: inline
64
+ */
16
65
  useAlternativePreloader?: boolean;
66
+ /**
67
+ * A flag to display alignment options in the link toolbar on Smart Link with embed appearance.
68
+ * Default is true.
69
+ *
70
+ * Component: embed
71
+ */
17
72
  allowAlignment?: boolean;
73
+ /**
74
+ * A flag to display wrapping options in the link toolbar on Smart Link with embed appearance.
75
+ * Default is true.
76
+ *
77
+ * Component: embed
78
+ */
18
79
  allowWrapping?: boolean;
80
+ /**
81
+ * A flag to display Smart Link upgrade discovery.
82
+ * Default is true.
83
+ *
84
+ * Component: link toolbar
85
+ */
19
86
  showUpgradeDiscoverability?: boolean;
87
+ /**
88
+ * A callback to determine the link click behaviour.
89
+ *
90
+ * Component: inline, block (card), embed
91
+ */
20
92
  onClickCallback?: OnClickCallback;
21
93
  /**
22
94
  * Customises the outbound link to configure user preferences
95
+ *
96
+ * Component: link toolbar
23
97
  */
24
98
  userPreferencesLink?: string;
25
99
  }
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconCard: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconCard: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconEmbed: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconEmbed: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconInline: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconInline: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconUrl: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconUrl: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { jsx } from '@emotion/react';
3
- import type { GlyphProps } from '@atlaskit/icon/types';
3
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
4
4
  export interface ButtonOptionProps {
5
5
  title: string;
6
6
  selected: boolean;
@@ -8,7 +8,8 @@ export interface ButtonOptionProps {
8
8
  disabled: boolean;
9
9
  tooltipContent?: string | null;
10
10
  onClick: () => void;
11
- icon: (props: GlyphProps) => JSX.Element;
11
+ icon: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
+ iconFallback: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
12
13
  }
13
14
  export interface LinkToolbarButtonGroupProps {
14
15
  options: ButtonOptionProps[];
@@ -6,20 +6,94 @@ export type OnClickCallback = ({ event, url, }: {
6
6
  url?: string;
7
7
  }) => void;
8
8
  export interface CardOptions {
9
+ /**
10
+ * A promise returning the instance of EditorCardProvider
11
+ *
12
+ * Example: Promise.resolve(new EditorCardProvider())
13
+ */
9
14
  provider?: Providers['cardProvider'];
15
+ /**
16
+ * When the URL pattern is in conflict with Smart Links and macros, macros will take priority over Smart Links.
17
+ * Specify the names of macros to allow card plugin to override the macros behaviour and converts the URL to Smart Link.
18
+ */
10
19
  resolveBeforeMacros?: string[];
20
+ /**
21
+ * A flag to determine whether editor can display Smart Link with block (Card) appearance.
22
+ * Default is true.
23
+ *
24
+ * Component: block (card)
25
+ */
11
26
  allowBlockCards?: boolean;
27
+ /**
28
+ * A flag to determine whether editor can display link datasource (Jira issues and Confluence links).
29
+ * Default is false.
30
+ *
31
+ * Component: link datasource (Jira issues, Confluence list)
32
+ */
12
33
  allowDatasource?: boolean;
34
+ /**
35
+ * A flag to determine whether editor can display Smart Link with embed appearance.
36
+ * Default is false.
37
+ *
38
+ * Component: embed
39
+ */
13
40
  allowEmbeds?: boolean;
41
+ /**
42
+ * A flag to determine whether Smart Link with embed appearance can be resized.
43
+ * Default is true.
44
+ *
45
+ * Component: embed
46
+ */
14
47
  allowResizing?: boolean;
48
+ /**
49
+ * Configure visibility of actions available.
50
+ * By default, smart links show all actions available on the views.
51
+ * Set `hide` to true to disable all actions.
52
+ * Set `hide` to false and set `exclude` to enable only specific actions.
53
+ *
54
+ * Component: inline (hover preview), block (card)
55
+ */
15
56
  actionOptions?: CardProps['actionOptions'];
57
+ /**
58
+ * By default, Smart Link with inline appearance resolving states show a frame with a spinner on the left.
59
+ * An alternative is to remove the frame and place the spinner on the right by setting this value to `on-right-without-skeleton`.
60
+ * This property is specific to inline links in the editor.
61
+ * Default is true.
62
+ *
63
+ * Component: inline
64
+ */
16
65
  useAlternativePreloader?: boolean;
66
+ /**
67
+ * A flag to display alignment options in the link toolbar on Smart Link with embed appearance.
68
+ * Default is true.
69
+ *
70
+ * Component: embed
71
+ */
17
72
  allowAlignment?: boolean;
73
+ /**
74
+ * A flag to display wrapping options in the link toolbar on Smart Link with embed appearance.
75
+ * Default is true.
76
+ *
77
+ * Component: embed
78
+ */
18
79
  allowWrapping?: boolean;
80
+ /**
81
+ * A flag to display Smart Link upgrade discovery.
82
+ * Default is true.
83
+ *
84
+ * Component: link toolbar
85
+ */
19
86
  showUpgradeDiscoverability?: boolean;
87
+ /**
88
+ * A callback to determine the link click behaviour.
89
+ *
90
+ * Component: inline, block (card), embed
91
+ */
20
92
  onClickCallback?: OnClickCallback;
21
93
  /**
22
94
  * Customises the outbound link to configure user preferences
95
+ *
96
+ * Component: link toolbar
23
97
  */
24
98
  userPreferencesLink?: string;
25
99
  }
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconCard: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconCard: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconEmbed: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconEmbed: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconInline: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconInline: (props: Omit<UNSAFE_NewIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { GlyphProps } from '@atlaskit/icon/types';
3
- export declare const IconUrl: (props: GlyphProps) => JSX.Element;
2
+ import type { UNSAFE_NewCoreIconProps } from '@atlaskit/icon/types';
3
+ export declare const IconUrl: (props: Omit<UNSAFE_NewCoreIconProps, 'dangerouslySetGlyph' | 'type'>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "93.5.2",
3
+ "version": "93.5.3",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -131,7 +131,7 @@
131
131
  "@atlaskit/icon-object": "^6.5.0",
132
132
  "@atlaskit/link-datasource": "^3.6.0",
133
133
  "@atlaskit/link-picker": "^1.47.0",
134
- "@atlaskit/media-card": "^78.6.0",
134
+ "@atlaskit/media-card": "^78.7.0",
135
135
  "@atlaskit/media-client": "^28.0.0",
136
136
  "@atlaskit/media-client-react": "^2.2.0",
137
137
  "@atlaskit/media-common": "^11.6.0",
@@ -140,7 +140,7 @@
140
140
  "@atlaskit/media-ui": "^25.16.0",
141
141
  "@atlaskit/media-viewer": "49.2.0",
142
142
  "@atlaskit/mention": "^23.3.0",
143
- "@atlaskit/menu": "^2.12.0",
143
+ "@atlaskit/menu": "^2.13.0",
144
144
  "@atlaskit/onboarding": "^11.2.0",
145
145
  "@atlaskit/platform-feature-flags": "^0.3.0",
146
146
  "@atlaskit/primitives": "^12.2.0",