@atlaskit/editor-common 77.3.2 → 77.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/afm-cc/tsconfig.json +12 -0
  3. package/dist/cjs/analytics/types/enums.js +1 -0
  4. package/dist/cjs/media-inline/inline-image-card.js +63 -0
  5. package/dist/cjs/media-inline/inline-image-wrapper.js +12 -1
  6. package/dist/cjs/media-inline/media-inline-image-card.js +57 -18
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/cjs/ui/index.js +7 -0
  10. package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -0
  11. package/dist/cjs/ui-menu/index.js +6 -0
  12. package/dist/es2019/analytics/types/enums.js +1 -0
  13. package/dist/es2019/media-inline/inline-image-card.js +56 -0
  14. package/dist/es2019/media-inline/inline-image-wrapper.js +14 -2
  15. package/dist/es2019/media-inline/media-inline-image-card.js +49 -19
  16. package/dist/es2019/monitoring/error.js +1 -1
  17. package/dist/es2019/ui/DropList/index.js +1 -1
  18. package/dist/es2019/ui/index.js +2 -1
  19. package/dist/es2019/ui-menu/DropdownMenu/index.js +2 -1
  20. package/dist/es2019/ui-menu/index.js +1 -1
  21. package/dist/esm/analytics/types/enums.js +1 -0
  22. package/dist/esm/media-inline/inline-image-card.js +56 -0
  23. package/dist/esm/media-inline/inline-image-wrapper.js +14 -2
  24. package/dist/esm/media-inline/media-inline-image-card.js +58 -19
  25. package/dist/esm/monitoring/error.js +1 -1
  26. package/dist/esm/ui/DropList/index.js +1 -1
  27. package/dist/esm/ui/index.js +2 -1
  28. package/dist/esm/ui-menu/DropdownMenu/index.js +2 -1
  29. package/dist/esm/ui-menu/index.js +1 -1
  30. package/dist/types/analytics/types/enums.d.ts +1 -0
  31. package/dist/types/media-inline/inline-image-card.d.ts +16 -0
  32. package/dist/types/media-inline/types.d.ts +4 -0
  33. package/dist/types/ui/index.d.ts +1 -0
  34. package/dist/types/ui-menu/DropdownMenu/index.d.ts +4 -1
  35. package/dist/types/ui-menu/index.d.ts +1 -1
  36. package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
  37. package/dist/types-ts4.5/media-inline/inline-image-card.d.ts +16 -0
  38. package/dist/types-ts4.5/media-inline/types.d.ts +4 -0
  39. package/dist/types-ts4.5/ui/index.d.ts +1 -0
  40. package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +4 -1
  41. package/dist/types-ts4.5/ui-menu/index.d.ts +1 -1
  42. package/package.json +9 -5
  43. package/tsconfig.json +1042 -2
@@ -0,0 +1,56 @@
1
+ /** @jsx jsx */
2
+ import { useMemo } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { getRandomHex } from '@atlaskit/media-common';
5
+ import { useFilePreview } from '@atlaskit/media-file-preview';
6
+ import { MediaImage } from '@atlaskit/media-ui';
7
+ import { InlineImageCardLoadingView } from './views/loading-view';
8
+ export var InlineImageCard = function InlineImageCard(_ref) {
9
+ var dimensions = _ref.dimensions,
10
+ identifier = _ref.identifier,
11
+ renderError = _ref.renderError,
12
+ alt = _ref.alt,
13
+ isLazy = _ref.isLazy,
14
+ ssr = _ref.ssr,
15
+ crop = _ref.crop,
16
+ stretch = _ref.stretch;
17
+ // Generate unique traceId for file
18
+ var traceContext = useMemo(function () {
19
+ return {
20
+ traceId: getRandomHex(8)
21
+ };
22
+ }, []);
23
+
24
+ // TODO do we need to handle nonCriticalError
25
+ var _useFilePreview = useFilePreview({
26
+ identifier: identifier,
27
+ ssr: ssr,
28
+ dimensions: dimensions,
29
+ traceContext: traceContext
30
+ }),
31
+ preview = _useFilePreview.preview,
32
+ previewError = _useFilePreview.error,
33
+ onImageError = _useFilePreview.onImageError,
34
+ _onImageLoad = _useFilePreview.onImageLoad;
35
+ if (previewError) {
36
+ return renderError({
37
+ error: previewError
38
+ });
39
+ }
40
+ if (!preview) {
41
+ return jsx(InlineImageCardLoadingView, null);
42
+ }
43
+ return jsx(MediaImage, {
44
+ dataURI: preview.dataURI,
45
+ alt: alt,
46
+ previewOrientation: preview.orientation,
47
+ onImageLoad: function onImageLoad() {
48
+ _onImageLoad(preview);
49
+ },
50
+ onImageError: onImageError,
51
+ loading: isLazy ? 'lazy' : undefined,
52
+ forceSyncDisplay: !!ssr,
53
+ crop: crop,
54
+ stretch: stretch
55
+ });
56
+ };
@@ -4,9 +4,19 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
4
4
  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; }
5
5
  /** @jsx jsx */
6
6
 
7
- import { jsx } from '@emotion/react';
7
+ import { css, jsx } from '@emotion/react';
8
8
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
9
9
  import { borderStyle, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, INLINE_IMAGE_WRAPPER_CLASS_NAME, selectedStyle, wrapperStyle } from './styles';
10
+
11
+ // The MediaImage component needs to obtain its parent's dimensions.
12
+ // To achieve this, we have added an additional wrapper that allows
13
+ // for better interaction with the parent element. This is necessary
14
+ // because the parent size changes its box-sizing with the node border.
15
+ var sizeWrapperStyle = css({
16
+ display: 'inline-flex',
17
+ width: '100%',
18
+ height: '100%'
19
+ });
10
20
  export var InlineImageWrapper = function InlineImageWrapper(_ref) {
11
21
  var _ref2;
12
22
  var children = _ref.children,
@@ -25,6 +35,8 @@ export var InlineImageWrapper = function InlineImageWrapper(_ref) {
25
35
  className: INLINE_IMAGE_WRAPPER_CLASS_NAME,
26
36
  css: [wrapperStyle, borderSize && borderColor && borderStyle, isSelected && selectedStyle],
27
37
  "data-testid": "inline-image-wrapper"
28
- }, htmlAttrs), children)
38
+ }, htmlAttrs), jsx("span", {
39
+ css: sizeWrapperStyle
40
+ }, children))
29
41
  );
30
42
  };
@@ -7,9 +7,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { useEffect, useMemo, useState } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import { createIntl, injectIntl } from 'react-intl-next';
10
- import { Card } from '@atlaskit/media-card';
10
+ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
11
+ import { fireFailedMediaInlineEvent, fireSucceededMediaInlineEvent, MediaCardError } from '@atlaskit/media-card';
12
+ import { FileFetcherError } from '@atlaskit/media-client';
13
+ import { MediaClientContext } from '@atlaskit/media-client-react';
11
14
  import { messages } from '../messages/media-inline-card';
12
15
  import { referenceHeights } from './constants';
16
+ import { InlineImageCard } from './inline-image-card';
13
17
  import { InlineImageWrapper } from './inline-image-wrapper';
14
18
  import { InlineImageCardErrorView } from './views/error-view';
15
19
  import { InlineImageCardLoadingView } from './views/loading-view';
@@ -33,10 +37,34 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
33
37
  _useState4 = _slicedToArray(_useState3, 2),
34
38
  subscribeError = _useState4[0],
35
39
  setSubscribeError = _useState4[1];
40
+ var _useState5 = useState(false),
41
+ _useState6 = _slicedToArray(_useState5, 2),
42
+ isFailedEventSent = _useState6[0],
43
+ setIsFailedEventSent = _useState6[1];
44
+ var _useState7 = useState(false),
45
+ _useState8 = _slicedToArray(_useState7, 2),
46
+ isSucceededEventSent = _useState8[0],
47
+ setIsSucceededEventSent = _useState8[1];
36
48
  var _ref2 = intl || createIntl({
37
49
  locale: 'en'
38
50
  }),
39
51
  formatMessage = _ref2.formatMessage;
52
+ var _useAnalyticsEvents = useAnalyticsEvents(),
53
+ createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
54
+ var fireFailedOperationalEvent = function fireFailedOperationalEvent() {
55
+ var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new MediaCardError('missing-error-data');
56
+ var failReason = arguments.length > 1 ? arguments[1] : undefined;
57
+ if (!isFailedEventSent && fileState) {
58
+ setIsFailedEventSent(true);
59
+ fireFailedMediaInlineEvent(fileState, error, failReason, createAnalyticsEvent);
60
+ }
61
+ };
62
+ var fireSucceededOperationalEvent = function fireSucceededOperationalEvent() {
63
+ if (!isSucceededEventSent && fileState) {
64
+ setIsSucceededEventSent(true);
65
+ fireSucceededMediaInlineEvent(fileState, createAnalyticsEvent);
66
+ }
67
+ };
40
68
  useEffect(function () {
41
69
  if (mediaClient) {
42
70
  var subscription = mediaClient.file.getFileState(identifier.id, {
@@ -59,41 +87,52 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
59
87
  if (subscribeError) {
60
88
  var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
61
89
  var errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
90
+ var errorReason = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading' ? 'upload' : 'metadata-fetch';
91
+ fireFailedOperationalEvent(new MediaCardError(errorReason, subscribeError));
62
92
  return jsx(InlineImageCardErrorView, {
63
93
  message: formatMessage(errorMessage)
64
94
  });
65
95
  }
66
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
96
+ if (!fileState || (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
97
+ return jsx(InlineImageCardLoadingView, null);
98
+ }
99
+ if (fileState.status === 'error') {
100
+ var error = new MediaCardError('error-file-state', new Error(fileState.message));
101
+ !isFailedEventSent && fireFailedOperationalEvent(error);
67
102
  return jsx(InlineImageCardErrorView, {
68
103
  message: formatMessage(messages.unableToLoadContent)
69
104
  });
70
- }
71
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
105
+ } else if (fileState.status === 'failed-processing') {
106
+ !isFailedEventSent && fireFailedOperationalEvent(undefined, 'failed-processing');
72
107
  return jsx(InlineImageCardErrorView, {
73
108
  message: formatMessage(messages.unableToLoadContent)
74
109
  });
75
- }
76
- // Empty file handling
77
- if (fileState && !fileState.name) {
110
+ } else if (!fileState.name) {
111
+ var _error = new MediaCardError('metadata-fetch', new FileFetcherError('emptyFileName', fileState.id));
112
+ !isFailedEventSent && fireFailedOperationalEvent(_error);
78
113
  return jsx(InlineImageCardErrorView, {
79
114
  message: formatMessage(messages.unableToLoadContent)
80
115
  });
81
116
  }
82
- var mediaClientConfig = (ssr === null || ssr === void 0 ? void 0 : ssr.config) || (mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig);
83
- if (!fileState) {
84
- return jsx(InlineImageCardLoadingView, null);
117
+ if (fileState.status === 'processed') {
118
+ fireSucceededOperationalEvent();
85
119
  }
86
- return jsx(Card, {
87
- mediaClientConfig: mediaClientConfig,
88
- isLazy: isLazy,
89
- identifier: identifier,
120
+ return jsx(MediaClientContext.Provider, {
121
+ value: mediaClient
122
+ }, jsx(InlineImageCard, {
90
123
  dimensions: dimensions,
91
- selectable: true,
92
- disableOverlay: true,
93
- selected: isSelected,
124
+ identifier: identifier,
125
+ renderError: function renderError() {
126
+ return jsx(InlineImageCardErrorView, {
127
+ message: formatMessage(messages.unableToLoadContent)
128
+ });
129
+ },
94
130
  alt: alt,
95
- ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
96
- });
131
+ ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
132
+ isLazy: isLazy,
133
+ crop: true,
134
+ stretch: false
135
+ }));
97
136
  };
98
137
  var aspectRatio = useMemo(function () {
99
138
  return width && height ? width / height : undefined;
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  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; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "77.3.2";
9
+ var packageVersion = "77.4.0";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "77.3.2";
20
+ var packageVersion = "77.4.0";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -28,4 +28,5 @@ export { wrapperStyle } from './ResizerLegacy/styled';
28
28
  export { panelTextInput } from './PanelTextInput/styles';
29
29
  export { default as PanelTextInput } from './PanelTextInput';
30
30
  export { default as Announcer } from './Announcer/announcer';
31
- export { EDIT_AREA_ID } from './Toolbar';
31
+ export { EDIT_AREA_ID } from './Toolbar';
32
+ export { default as DropList } from './DropList';
@@ -253,7 +253,7 @@ var DropdownMenuItemCustomComponent = /*#__PURE__*/React.forwardRef(function (pr
253
253
  }
254
254
  }), children);
255
255
  });
256
- function DropdownMenuItem(_ref) {
256
+ export function DropdownMenuItem(_ref) {
257
257
  var _item$key3;
258
258
  var item = _ref.item,
259
259
  onItemActivated = _ref.onItemActivated,
@@ -326,6 +326,7 @@ function DropdownMenuItem(_ref) {
326
326
  export var DropdownMenuWithKeyboardNavigation = /*#__PURE__*/React.memo(function (_ref2) {
327
327
  var props = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
328
328
  var keyDownHandlerContext = useContext(KeyDownHandlerContext);
329
+
329
330
  // This context is to handle the tab, Arrow Right/Left key events for dropdown.
330
331
  // Default context has the void callbacks for above key events
331
332
  return jsx(DropdownMenuWrapper, _extends({
@@ -1,4 +1,4 @@
1
- export { default as DropdownMenu, DropdownMenuWithKeyboardNavigation } from './DropdownMenu';
1
+ export { default as DropdownMenu, DropdownMenuItem, DropdownMenuWithKeyboardNavigation } from './DropdownMenu';
2
2
  export { default as ToolbarButton, TOOLBAR_BUTTON } from './ToolbarButton';
3
3
  export { ArrowKeyNavigationProvider } from './ArrowKeyNavigationProvider';
4
4
  export { ToolbarArrowKeyNavigationProvider, KeyDownHandlerContext } from './ToolbarArrowKeyNavigationProvider';
@@ -289,6 +289,7 @@ export declare enum ACTION_SUBJECT_ID {
289
289
  MEDIA = "media",
290
290
  MEDIA_GROUP = "mediaGroup",
291
291
  MEDIA_INLINE = "mediaInline",
292
+ MEDIA_INLINE_IMAGE = "mediaInlineImage",
292
293
  MEDIA_LINK = "mediaLink",
293
294
  MEDIA_SINGLE = "mediaSingle",
294
295
  MENTION = "mention",
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import type { FileIdentifier } from '@atlaskit/media-client';
3
+ import type { SSR } from '@atlaskit/media-common';
4
+ import type { Dimensions } from './types';
5
+ export declare const InlineImageCard: ({ dimensions, identifier, renderError, alt, isLazy, ssr, crop, stretch, }: {
6
+ identifier: FileIdentifier;
7
+ renderError: (props: {
8
+ error: Error;
9
+ }) => JSX.Element | null;
10
+ dimensions?: Dimensions | undefined;
11
+ isLazy?: boolean | undefined;
12
+ alt?: string | undefined;
13
+ ssr?: SSR | undefined;
14
+ crop?: boolean | undefined;
15
+ stretch?: boolean | undefined;
16
+ }) => JSX.Element | null;
@@ -10,3 +10,7 @@ export type MediaSSR = {
10
10
  mode: SSR;
11
11
  config: MediaClientConfig;
12
12
  };
13
+ export type Dimensions = {
14
+ width?: number;
15
+ height?: number;
16
+ };
@@ -39,5 +39,6 @@ export { panelTextInput } from './PanelTextInput/styles';
39
39
  export { default as PanelTextInput } from './PanelTextInput';
40
40
  export { default as Announcer } from './Announcer/announcer';
41
41
  export { EDIT_AREA_ID } from './Toolbar';
42
+ export { default as DropList } from './DropList';
42
43
  export type { UseStickyToolbarType } from './Toolbar';
43
44
  export type { OpenChangedEvent } from './DropList';
@@ -1,6 +1,6 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import { jsx } from '@emotion/react';
3
- import type { Props, State } from './types';
3
+ import type { MenuItem, Props, State } from './types';
4
4
  export type { MenuItem } from './types';
5
5
  /**
6
6
  * Wrapper around @atlaskit/droplist which uses Popup and Portal to render
@@ -19,4 +19,7 @@ export default class DropdownMenuWrapper extends PureComponent<Props, State> {
19
19
  render(): jsx.JSX.Element;
20
20
  componentDidUpdate(previousProps: Props): void;
21
21
  }
22
+ export declare function DropdownMenuItem({ item, onItemActivated, shouldUseDefaultRole, onMouseEnter, onMouseLeave, }: {
23
+ item: MenuItem;
24
+ } & Pick<Props, 'onItemActivated' | 'shouldUseDefaultRole' | 'onMouseEnter' | 'onMouseLeave'>): jsx.JSX.Element;
22
25
  export declare const DropdownMenuWithKeyboardNavigation: React.FC<any>;
@@ -1,4 +1,4 @@
1
- export { default as DropdownMenu, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
1
+ export { default as DropdownMenu, DropdownMenuItem, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
2
2
  export type { MenuItem } from './DropdownMenu';
3
3
  export { default as ToolbarButton, TOOLBAR_BUTTON } from './ToolbarButton';
4
4
  export type { ToolbarButtonRef } from './ToolbarButton';
@@ -289,6 +289,7 @@ export declare enum ACTION_SUBJECT_ID {
289
289
  MEDIA = "media",
290
290
  MEDIA_GROUP = "mediaGroup",
291
291
  MEDIA_INLINE = "mediaInline",
292
+ MEDIA_INLINE_IMAGE = "mediaInlineImage",
292
293
  MEDIA_LINK = "mediaLink",
293
294
  MEDIA_SINGLE = "mediaSingle",
294
295
  MENTION = "mention",
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import type { FileIdentifier } from '@atlaskit/media-client';
3
+ import type { SSR } from '@atlaskit/media-common';
4
+ import type { Dimensions } from './types';
5
+ export declare const InlineImageCard: ({ dimensions, identifier, renderError, alt, isLazy, ssr, crop, stretch, }: {
6
+ identifier: FileIdentifier;
7
+ renderError: (props: {
8
+ error: Error;
9
+ }) => JSX.Element | null;
10
+ dimensions?: Dimensions | undefined;
11
+ isLazy?: boolean | undefined;
12
+ alt?: string | undefined;
13
+ ssr?: SSR | undefined;
14
+ crop?: boolean | undefined;
15
+ stretch?: boolean | undefined;
16
+ }) => JSX.Element | null;
@@ -10,3 +10,7 @@ export type MediaSSR = {
10
10
  mode: SSR;
11
11
  config: MediaClientConfig;
12
12
  };
13
+ export type Dimensions = {
14
+ width?: number;
15
+ height?: number;
16
+ };
@@ -39,5 +39,6 @@ export { panelTextInput } from './PanelTextInput/styles';
39
39
  export { default as PanelTextInput } from './PanelTextInput';
40
40
  export { default as Announcer } from './Announcer/announcer';
41
41
  export { EDIT_AREA_ID } from './Toolbar';
42
+ export { default as DropList } from './DropList';
42
43
  export type { UseStickyToolbarType } from './Toolbar';
43
44
  export type { OpenChangedEvent } from './DropList';
@@ -1,6 +1,6 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import { jsx } from '@emotion/react';
3
- import type { Props, State } from './types';
3
+ import type { MenuItem, Props, State } from './types';
4
4
  export type { MenuItem } from './types';
5
5
  /**
6
6
  * Wrapper around @atlaskit/droplist which uses Popup and Portal to render
@@ -19,4 +19,7 @@ export default class DropdownMenuWrapper extends PureComponent<Props, State> {
19
19
  render(): jsx.JSX.Element;
20
20
  componentDidUpdate(previousProps: Props): void;
21
21
  }
22
+ export declare function DropdownMenuItem({ item, onItemActivated, shouldUseDefaultRole, onMouseEnter, onMouseLeave, }: {
23
+ item: MenuItem;
24
+ } & Pick<Props, 'onItemActivated' | 'shouldUseDefaultRole' | 'onMouseEnter' | 'onMouseLeave'>): jsx.JSX.Element;
22
25
  export declare const DropdownMenuWithKeyboardNavigation: React.FC<any>;
@@ -1,4 +1,4 @@
1
- export { default as DropdownMenu, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
1
+ export { default as DropdownMenu, DropdownMenuItem, DropdownMenuWithKeyboardNavigation, } from './DropdownMenu';
2
2
  export type { MenuItem } from './DropdownMenu';
3
3
  export { default as ToolbarButton, TOOLBAR_BUTTON } from './ToolbarButton';
4
4
  export type { ToolbarButtonRef } from './ToolbarButton';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "77.3.2",
3
+ "version": "77.4.0",
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/"
@@ -113,20 +113,24 @@
113
113
  "@atlaskit/in-product-testing": "^0.2.0",
114
114
  "@atlaskit/link-datasource": "^1.22.0",
115
115
  "@atlaskit/link-picker": "^1.33.0",
116
- "@atlaskit/media-card": "^77.7.0",
116
+ "@atlaskit/media-card": "^77.9.0",
117
117
  "@atlaskit/media-client": "^26.1.0",
118
+ "@atlaskit/media-client-react": "^2.0.0",
119
+ "@atlaskit/media-common": "^11.0.0",
120
+ "@atlaskit/media-file-preview": "^0.4.0",
118
121
  "@atlaskit/media-picker": "^66.2.0",
122
+ "@atlaskit/media-ui": "^25.0.0",
119
123
  "@atlaskit/mention": "^22.1.0",
120
124
  "@atlaskit/menu": "^2.1.0",
121
125
  "@atlaskit/platform-feature-flags": "^0.2.0",
122
- "@atlaskit/profilecard": "^19.9.0",
123
- "@atlaskit/smart-card": "^26.46.0",
126
+ "@atlaskit/profilecard": "^19.10.0",
127
+ "@atlaskit/smart-card": "^26.47.0",
124
128
  "@atlaskit/smart-user-picker": "^6.7.0",
125
129
  "@atlaskit/spinner": "^16.0.0",
126
130
  "@atlaskit/task-decision": "^17.9.0",
127
131
  "@atlaskit/textfield": "^6.0.0",
128
132
  "@atlaskit/theme": "^12.6.0",
129
- "@atlaskit/tokens": "^1.35.0",
133
+ "@atlaskit/tokens": "^1.36.0",
130
134
  "@atlaskit/tooltip": "^18.1.0",
131
135
  "@atlaskit/ufo": "^0.2.0",
132
136
  "@atlaskit/width-detector": "^4.1.0",