@atlaskit/editor-common 76.25.0 → 76.25.1

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 (53) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/media-inline/inline-image-wrapper.js +14 -4
  3. package/dist/cjs/media-inline/media-inline-image-card.js +54 -40
  4. package/dist/cjs/media-inline/views/constants.js +8 -0
  5. package/dist/cjs/media-inline/views/error-view.js +33 -0
  6. package/dist/cjs/media-inline/views/frame.js +15 -0
  7. package/dist/cjs/media-inline/views/icon-wrapper.js +20 -0
  8. package/dist/cjs/media-inline/views/loading-view.js +21 -0
  9. package/dist/cjs/media-inline/views/wrapper.js +24 -0
  10. package/dist/cjs/messages/media-inline-card.js +19 -0
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/ui/DropList/index.js +1 -1
  13. package/dist/es2019/media-inline/inline-image-wrapper.js +14 -4
  14. package/dist/es2019/media-inline/media-inline-image-card.js +54 -39
  15. package/dist/es2019/media-inline/views/constants.js +2 -0
  16. package/dist/es2019/media-inline/views/error-view.js +25 -0
  17. package/dist/es2019/media-inline/views/frame.js +8 -0
  18. package/dist/es2019/media-inline/views/icon-wrapper.js +15 -0
  19. package/dist/es2019/media-inline/views/loading-view.js +13 -0
  20. package/dist/es2019/media-inline/views/wrapper.js +18 -0
  21. package/dist/es2019/messages/media-inline-card.js +13 -0
  22. package/dist/es2019/monitoring/error.js +1 -1
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/esm/media-inline/inline-image-wrapper.js +14 -4
  25. package/dist/esm/media-inline/media-inline-image-card.js +53 -39
  26. package/dist/esm/media-inline/views/constants.js +2 -0
  27. package/dist/esm/media-inline/views/error-view.js +26 -0
  28. package/dist/esm/media-inline/views/frame.js +9 -0
  29. package/dist/esm/media-inline/views/icon-wrapper.js +14 -0
  30. package/dist/esm/media-inline/views/loading-view.js +14 -0
  31. package/dist/esm/media-inline/views/wrapper.js +18 -0
  32. package/dist/esm/messages/media-inline-card.js +13 -0
  33. package/dist/esm/monitoring/error.js +1 -1
  34. package/dist/esm/ui/DropList/index.js +1 -1
  35. package/dist/types/media-inline/inline-image-wrapper.d.ts +1 -0
  36. package/dist/types/media-inline/media-inline-image-card.d.ts +2 -0
  37. package/dist/types/media-inline/views/constants.d.ts +2 -0
  38. package/dist/types/media-inline/views/error-view.d.ts +12 -0
  39. package/dist/types/media-inline/views/frame.d.ts +9 -0
  40. package/dist/types/media-inline/views/icon-wrapper.d.ts +7 -0
  41. package/dist/types/media-inline/views/loading-view.d.ts +10 -0
  42. package/dist/types/media-inline/views/wrapper.d.ts +1 -0
  43. package/dist/types/messages/media-inline-card.d.ts +12 -0
  44. package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +1 -0
  45. package/dist/types-ts4.5/media-inline/media-inline-image-card.d.ts +2 -0
  46. package/dist/types-ts4.5/media-inline/views/constants.d.ts +2 -0
  47. package/dist/types-ts4.5/media-inline/views/error-view.d.ts +12 -0
  48. package/dist/types-ts4.5/media-inline/views/frame.d.ts +9 -0
  49. package/dist/types-ts4.5/media-inline/views/icon-wrapper.d.ts +7 -0
  50. package/dist/types-ts4.5/media-inline/views/loading-view.d.ts +10 -0
  51. package/dist/types-ts4.5/media-inline/views/wrapper.d.ts +1 -0
  52. package/dist/types-ts4.5/messages/media-inline-card.d.ts +12 -0
  53. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 76.25.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#58503](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58503) [`b98a7eb489b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b98a7eb489b9) - [ED-20984] Implement loading and error view for media inline image card
8
+
3
9
  ## 76.25.0
4
10
 
5
11
  ### Minor Changes
@@ -5,12 +5,22 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.InlineImageWrapper = void 0;
7
7
  var _react = require("@emotion/react");
8
+ var _colors = require("@atlaskit/theme/colors");
8
9
  var wrapperStyle = (0, _react.css)({
9
- display: 'inline-block'
10
+ display: 'inline-block',
11
+ verticalAlign: 'text-bottom',
12
+ borderRadius: "var(--ds-border-radius, 3px)"
13
+ });
14
+ var selectedStyle = (0, _react.css)({
15
+ cursor: 'pointer',
16
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, ".concat(_colors.B300, ")")),
17
+ outline: 'none',
18
+ borderColor: 'transparent'
10
19
  });
11
20
  var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrapper(_ref) {
12
- var children = _ref.children;
13
- return /*#__PURE__*/React.createElement("div", {
14
- css: wrapperStyle
21
+ var children = _ref.children,
22
+ isSelected = _ref.isSelected;
23
+ return /*#__PURE__*/React.createElement("span", {
24
+ css: [wrapperStyle, isSelected && selectedStyle]
15
25
  }, children);
16
26
  };
@@ -4,12 +4,19 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.MediaInlineImageCard = void 0;
7
+ exports.MediaInlineImageCardInternal = exports.MediaInlineImageCard = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
- var MediaInlineImageCard = exports.MediaInlineImageCard = function MediaInlineImageCard(_ref) {
10
+ var _reactIntlNext = require("react-intl-next");
11
+ var _mediaInlineCard = require("../messages/media-inline-card");
12
+ var _inlineImageWrapper = require("./inline-image-wrapper");
13
+ var _errorView = require("./views/error-view");
14
+ var _loadingView = require("./views/loading-view");
15
+ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = function MediaInlineImageCardInternal(_ref) {
11
16
  var mediaClient = _ref.mediaClient,
12
- identifier = _ref.identifier;
17
+ identifier = _ref.identifier,
18
+ isSelected = _ref.isSelected,
19
+ intl = _ref.intl;
13
20
  var _useState = (0, _react.useState)(),
14
21
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
15
22
  fileState = _useState2[0],
@@ -18,6 +25,10 @@ var MediaInlineImageCard = exports.MediaInlineImageCard = function MediaInlineIm
18
25
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
19
26
  subscribeError = _useState4[0],
20
27
  setSubscribeError = _useState4[1];
28
+ var _ref2 = intl || (0, _reactIntlNext.createIntl)({
29
+ locale: 'en'
30
+ }),
31
+ formatMessage = _ref2.formatMessage;
21
32
  (0, _react.useEffect)(function () {
22
33
  var subscription = mediaClient.file.getFileState(identifier.id, {
23
34
  collectionName: identifier.collectionName
@@ -34,41 +45,44 @@ var MediaInlineImageCard = exports.MediaInlineImageCard = function MediaInlineIm
34
45
  subscription.unsubscribe();
35
46
  };
36
47
  }, [identifier.collectionName, identifier.id, mediaClient.file]);
37
- if (subscribeError) {
38
- // TODO:
39
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
40
- // for error message and analytics
41
- throw new Error("not yet implemented: MediaInlineImageCard subscribe error view");
42
- }
43
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
44
- // TODO:
45
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
46
- // for error message and analytics
47
- throw new Error("not yet implemented: MediaInlineImageCard error view");
48
- }
49
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
50
- // TODO:
51
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
52
- // for error message and analytics
53
- throw new Error("not yet implemented: MediaInlineImageCard failed-processing view");
54
- }
55
- // Empty file handling
56
- if (fileState && !fileState.name) {
57
- // TODO:
58
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
59
- // for error message and analytics
60
- throw new Error("not yet implemented: MediaInlineImageCard empty file name error view");
61
- }
62
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
63
- throw new Error("not yet implemented: MediaInlineImageCard uploading view");
64
- }
65
- if (!fileState) {
66
- throw new Error("not yet implemented: MediaInlineImageCard loading view");
67
- }
48
+ var content = function content() {
49
+ if (subscribeError) {
50
+ var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
51
+ var errorMessage = isUploading ? _mediaInlineCard.messages.failedToUpload : _mediaInlineCard.messages.unableToLoadContent;
52
+ return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
53
+ message: formatMessage(errorMessage)
54
+ });
55
+ }
56
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
57
+ return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
58
+ message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
59
+ });
60
+ }
61
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
62
+ return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
63
+ message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
64
+ });
65
+ }
66
+ // Empty file handling
67
+ if (fileState && !fileState.name) {
68
+ return /*#__PURE__*/React.createElement(_errorView.InlineImageCardErrorView, {
69
+ message: formatMessage(_mediaInlineCard.messages.unableToLoadContent)
70
+ });
71
+ }
72
+ if (!fileState) {
73
+ return /*#__PURE__*/React.createElement(_loadingView.InlineImageCardLoadingView, null);
74
+ }
68
75
 
69
- // TODO
70
- // use Card from `@atlaskit/media-card` with an inline block wrapper
71
- // with:
72
- // selection state and `mediaOptions.allowLazyLoading`
73
- throw new Error("not yet implemented: MediaInlineImageCard loading view");
74
- };
76
+ // TODO
77
+ // use Card from `@atlaskit/media-card` with an inline block wrapper
78
+ // with:
79
+ // selection state and `mediaOptions.allowLazyLoading`
80
+ throw new Error("not yet implemented: MediaInlineImageCard loading view");
81
+ };
82
+ return /*#__PURE__*/React.createElement(_inlineImageWrapper.InlineImageWrapper, {
83
+ isSelected: isSelected
84
+ }, content());
85
+ };
86
+ var MediaInlineImageCard = exports.MediaInlineImageCard = (0, _reactIntlNext.injectIntl)(MediaInlineImageCardInternal, {
87
+ enforceContext: false
88
+ });
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ICON_SIZE_THRESOLD = void 0;
7
+ /** Height threshold that determines icon size to be small or medium */
8
+ var ICON_SIZE_THRESOLD = exports.ICON_SIZE_THRESOLD = 24;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.InlineImageCardErrorView = void 0;
8
+ var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
9
+ var _colors = require("@atlaskit/theme/colors");
10
+ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
11
+ var _constants = require("./constants");
12
+ var _frame = require("./frame");
13
+ var _iconWrapper = require("./icon-wrapper");
14
+ var InlineImageCardErrorView = exports.InlineImageCardErrorView = function InlineImageCardErrorView(_ref) {
15
+ var _ref$testId = _ref.testId,
16
+ testId = _ref$testId === void 0 ? 'media-inline-image-card-error-view' : _ref$testId,
17
+ message = _ref.message,
18
+ icon = _ref.icon,
19
+ _ref$height = _ref.height,
20
+ height = _ref$height === void 0 ? _constants.ICON_SIZE_THRESOLD : _ref$height;
21
+ return /*#__PURE__*/React.createElement(_frame.Frame, {
22
+ testId: testId
23
+ }, /*#__PURE__*/React.createElement(_tooltip.default, {
24
+ content: message,
25
+ position: "top",
26
+ tag: "span",
27
+ hideTooltipOnClick: true
28
+ }, /*#__PURE__*/React.createElement(_iconWrapper.IconWrapper, null, icon || /*#__PURE__*/React.createElement(_warning.default, {
29
+ label: "error",
30
+ size: height > _constants.ICON_SIZE_THRESOLD ? 'medium' : 'small',
31
+ primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")")
32
+ }))));
33
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Frame = void 0;
7
+ var _wrapper = require("./wrapper");
8
+ var Frame = exports.Frame = function Frame(_ref) {
9
+ var children = _ref.children,
10
+ testId = _ref.testId;
11
+ return /*#__PURE__*/React.createElement("span", {
12
+ css: _wrapper.wrapperStyle,
13
+ "data-testid": testId
14
+ }, children);
15
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IconWrapper = void 0;
7
+ var _react = require("@emotion/react");
8
+ var wrapperStyle = (0, _react.css)({
9
+ display: 'flex',
10
+ 'span > svg': {
11
+ verticalAlign: 'baseline'
12
+ }
13
+ });
14
+ var IconWrapper = exports.IconWrapper = function IconWrapper(_ref) {
15
+ var children = _ref.children;
16
+ return /*#__PURE__*/React.createElement("span", {
17
+ css: wrapperStyle,
18
+ "data-testid": "media-inline-image-card-icon"
19
+ }, children);
20
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.InlineImageCardLoadingView = void 0;
8
+ var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
9
+ var _constants = require("./constants");
10
+ var _frame = require("./frame");
11
+ var InlineImageCardLoadingView = exports.InlineImageCardLoadingView = function InlineImageCardLoadingView(_ref) {
12
+ var _ref$testId = _ref.testId,
13
+ testId = _ref$testId === void 0 ? 'media-inline-image-card-loading-view' : _ref$testId,
14
+ _ref$height = _ref.height,
15
+ height = _ref$height === void 0 ? _constants.ICON_SIZE_THRESOLD : _ref$height;
16
+ return /*#__PURE__*/React.createElement(_frame.Frame, {
17
+ testId: testId
18
+ }, /*#__PURE__*/React.createElement(_spinner.default, {
19
+ size: height > _constants.ICON_SIZE_THRESOLD ? 'medium' : 'small'
20
+ }));
21
+ };
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.wrapperStyle = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _colors = require("@atlaskit/theme/colors");
9
+ var wrapperStyle = exports.wrapperStyle = (0, _react.css)({
10
+ display: 'inline-flex',
11
+ width: '100%',
12
+ height: '100%',
13
+ alignItems: 'center',
14
+ justifyContent: 'center',
15
+ boxDecorationBreak: 'clone',
16
+ borderRadius: "var(--ds-border-radius, 3px)",
17
+ color: "".concat("var(--ds-text, ".concat(_colors.N900, ")")),
18
+ backgroundColor: "".concat("var(--ds-background-neutral, ".concat(_colors.N30A, ")")),
19
+ transition: '0.1s all ease-in-out',
20
+ cursor: 'pointer',
21
+ '&:hover': {
22
+ backgroundColor: "".concat("var(--ds-background-neutral-hovered, ".concat(_colors.N40A, ")"))
23
+ }
24
+ });
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.messages = void 0;
7
+ var _reactIntlNext = require("react-intl-next");
8
+ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
9
+ unableToLoadContent: {
10
+ id: 'fabric.editor.unableToLoadContent',
11
+ defaultMessage: "We couldn't load this content",
12
+ description: 'Display this message when there is an error loading file content'
13
+ },
14
+ failedToUpload: {
15
+ id: 'fabric.editor.failed_to_upload',
16
+ defaultMessage: 'Failed to upload',
17
+ description: 'Display this message when there is an error uploading a file'
18
+ }
19
+ });
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  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; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "76.25.0";
19
+ var packageVersion = "76.25.1";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
25
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "76.25.0";
27
+ var packageVersion = "76.25.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,11 +1,21 @@
1
1
  import { css } from '@emotion/react';
2
+ import { B300 } from '@atlaskit/theme/colors';
2
3
  const wrapperStyle = css({
3
- display: 'inline-block'
4
+ display: 'inline-block',
5
+ verticalAlign: 'text-bottom',
6
+ borderRadius: `${"var(--ds-border-radius, 3px)"}`
7
+ });
8
+ const selectedStyle = css({
9
+ cursor: 'pointer',
10
+ boxShadow: `0 0 0 1px ${`var(--ds-border-selected, ${B300})`}`,
11
+ outline: 'none',
12
+ borderColor: 'transparent'
4
13
  });
5
14
  export const InlineImageWrapper = ({
6
- children
15
+ children,
16
+ isSelected
7
17
  }) => {
8
- return /*#__PURE__*/React.createElement("div", {
9
- css: wrapperStyle
18
+ return /*#__PURE__*/React.createElement("span", {
19
+ css: [wrapperStyle, isSelected && selectedStyle]
10
20
  }, children);
11
21
  };
@@ -1,10 +1,22 @@
1
1
  import { useEffect, useState } from 'react';
2
- export const MediaInlineImageCard = ({
2
+ import { createIntl, injectIntl } from 'react-intl-next';
3
+ import { messages } from '../messages/media-inline-card';
4
+ import { InlineImageWrapper } from './inline-image-wrapper';
5
+ import { InlineImageCardErrorView } from './views/error-view';
6
+ import { InlineImageCardLoadingView } from './views/loading-view';
7
+ export const MediaInlineImageCardInternal = ({
3
8
  mediaClient,
4
- identifier
9
+ identifier,
10
+ isSelected,
11
+ intl
5
12
  }) => {
6
13
  const [fileState, setFileState] = useState();
7
14
  const [subscribeError, setSubscribeError] = useState();
15
+ const {
16
+ formatMessage
17
+ } = intl || createIntl({
18
+ locale: 'en'
19
+ });
8
20
  useEffect(() => {
9
21
  const subscription = mediaClient.file.getFileState(identifier.id, {
10
22
  collectionName: identifier.collectionName
@@ -21,41 +33,44 @@ export const MediaInlineImageCard = ({
21
33
  subscription.unsubscribe();
22
34
  };
23
35
  }, [identifier.collectionName, identifier.id, mediaClient.file]);
24
- if (subscribeError) {
25
- // TODO:
26
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
27
- // for error message and analytics
28
- throw new Error(`not yet implemented: MediaInlineImageCard subscribe error view`);
29
- }
30
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
31
- // TODO:
32
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
33
- // for error message and analytics
34
- throw new Error(`not yet implemented: MediaInlineImageCard error view`);
35
- }
36
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
37
- // TODO:
38
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
39
- // for error message and analytics
40
- throw new Error(`not yet implemented: MediaInlineImageCard failed-processing view`);
41
- }
42
- // Empty file handling
43
- if (fileState && !fileState.name) {
44
- // TODO:
45
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
46
- // for error message and analytics
47
- throw new Error(`not yet implemented: MediaInlineImageCard empty file name error view`);
48
- }
49
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
50
- throw new Error(`not yet implemented: MediaInlineImageCard uploading view`);
51
- }
52
- if (!fileState) {
53
- throw new Error(`not yet implemented: MediaInlineImageCard loading view`);
54
- }
36
+ const content = () => {
37
+ if (subscribeError) {
38
+ const isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
39
+ const errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
40
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
41
+ message: formatMessage(errorMessage)
42
+ });
43
+ }
44
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
45
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
46
+ message: formatMessage(messages.unableToLoadContent)
47
+ });
48
+ }
49
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
50
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
51
+ message: formatMessage(messages.unableToLoadContent)
52
+ });
53
+ }
54
+ // Empty file handling
55
+ if (fileState && !fileState.name) {
56
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
57
+ message: formatMessage(messages.unableToLoadContent)
58
+ });
59
+ }
60
+ if (!fileState) {
61
+ return /*#__PURE__*/React.createElement(InlineImageCardLoadingView, null);
62
+ }
55
63
 
56
- // TODO
57
- // use Card from `@atlaskit/media-card` with an inline block wrapper
58
- // with:
59
- // selection state and `mediaOptions.allowLazyLoading`
60
- throw new Error(`not yet implemented: MediaInlineImageCard loading view`);
61
- };
64
+ // TODO
65
+ // use Card from `@atlaskit/media-card` with an inline block wrapper
66
+ // with:
67
+ // selection state and `mediaOptions.allowLazyLoading`
68
+ throw new Error(`not yet implemented: MediaInlineImageCard loading view`);
69
+ };
70
+ return /*#__PURE__*/React.createElement(InlineImageWrapper, {
71
+ isSelected: isSelected
72
+ }, content());
73
+ };
74
+ export const MediaInlineImageCard = injectIntl(MediaInlineImageCardInternal, {
75
+ enforceContext: false
76
+ });
@@ -0,0 +1,2 @@
1
+ /** Height threshold that determines icon size to be small or medium */
2
+ export const ICON_SIZE_THRESOLD = 24;
@@ -0,0 +1,25 @@
1
+ import WarningIcon from '@atlaskit/icon/glyph/warning';
2
+ import { R300 } from '@atlaskit/theme/colors';
3
+ import Tooltip from '@atlaskit/tooltip';
4
+ import { ICON_SIZE_THRESOLD } from './constants';
5
+ import { Frame } from './frame';
6
+ import { IconWrapper } from './icon-wrapper';
7
+ export const InlineImageCardErrorView = ({
8
+ testId = 'media-inline-image-card-error-view',
9
+ message,
10
+ icon,
11
+ height = ICON_SIZE_THRESOLD
12
+ }) => {
13
+ return /*#__PURE__*/React.createElement(Frame, {
14
+ testId: testId
15
+ }, /*#__PURE__*/React.createElement(Tooltip, {
16
+ content: message,
17
+ position: "top",
18
+ tag: "span",
19
+ hideTooltipOnClick: true
20
+ }, /*#__PURE__*/React.createElement(IconWrapper, null, icon || /*#__PURE__*/React.createElement(WarningIcon, {
21
+ label: "error",
22
+ size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small',
23
+ primaryColor: `var(--ds-icon-danger, ${R300})`
24
+ }))));
25
+ };
@@ -0,0 +1,8 @@
1
+ import { wrapperStyle } from './wrapper';
2
+ export const Frame = ({
3
+ children,
4
+ testId
5
+ }) => /*#__PURE__*/React.createElement("span", {
6
+ css: wrapperStyle,
7
+ "data-testid": testId
8
+ }, children);
@@ -0,0 +1,15 @@
1
+ import { css } from '@emotion/react';
2
+ const wrapperStyle = css({
3
+ display: 'flex',
4
+ 'span > svg': {
5
+ verticalAlign: 'baseline'
6
+ }
7
+ });
8
+ export const IconWrapper = ({
9
+ children
10
+ }) => {
11
+ return /*#__PURE__*/React.createElement("span", {
12
+ css: wrapperStyle,
13
+ "data-testid": "media-inline-image-card-icon"
14
+ }, children);
15
+ };
@@ -0,0 +1,13 @@
1
+ import Spinner from '@atlaskit/spinner';
2
+ import { ICON_SIZE_THRESOLD } from './constants';
3
+ import { Frame } from './frame';
4
+ export const InlineImageCardLoadingView = ({
5
+ testId = 'media-inline-image-card-loading-view',
6
+ height = ICON_SIZE_THRESOLD
7
+ }) => {
8
+ return /*#__PURE__*/React.createElement(Frame, {
9
+ testId: testId
10
+ }, /*#__PURE__*/React.createElement(Spinner, {
11
+ size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small'
12
+ }));
13
+ };
@@ -0,0 +1,18 @@
1
+ import { css } from '@emotion/react';
2
+ import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
3
+ export const wrapperStyle = css({
4
+ display: 'inline-flex',
5
+ width: '100%',
6
+ height: '100%',
7
+ alignItems: 'center',
8
+ justifyContent: 'center',
9
+ boxDecorationBreak: 'clone',
10
+ borderRadius: `${"var(--ds-border-radius, 3px)"}`,
11
+ color: `${`var(--ds-text, ${N900})`}`,
12
+ backgroundColor: `${`var(--ds-background-neutral, ${N30A})`}`,
13
+ transition: '0.1s all ease-in-out',
14
+ cursor: 'pointer',
15
+ '&:hover': {
16
+ backgroundColor: `${`var(--ds-background-neutral-hovered, ${N40A})`}`
17
+ }
18
+ });
@@ -0,0 +1,13 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export const messages = defineMessages({
3
+ unableToLoadContent: {
4
+ id: 'fabric.editor.unableToLoadContent',
5
+ defaultMessage: "We couldn't load this content",
6
+ description: 'Display this message when there is an error loading file content'
7
+ },
8
+ failedToUpload: {
9
+ id: 'fabric.editor.failed_to_upload',
10
+ defaultMessage: 'Failed to upload',
11
+ description: 'Display this message when there is an error uploading a file'
12
+ }
13
+ });
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "76.25.0";
3
+ const packageVersion = "76.25.1";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -7,7 +7,7 @@ import { themed } from '@atlaskit/theme/components';
7
7
  import { borderRadius } from '@atlaskit/theme/constants';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "76.25.0";
10
+ const packageVersion = "76.25.1";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -1,10 +1,20 @@
1
1
  import { css } from '@emotion/react';
2
+ import { B300 } from '@atlaskit/theme/colors';
2
3
  var wrapperStyle = css({
3
- display: 'inline-block'
4
+ display: 'inline-block',
5
+ verticalAlign: 'text-bottom',
6
+ borderRadius: "var(--ds-border-radius, 3px)"
7
+ });
8
+ var selectedStyle = css({
9
+ cursor: 'pointer',
10
+ boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, ".concat(B300, ")")),
11
+ outline: 'none',
12
+ borderColor: 'transparent'
4
13
  });
5
14
  export var InlineImageWrapper = function InlineImageWrapper(_ref) {
6
- var children = _ref.children;
7
- return /*#__PURE__*/React.createElement("div", {
8
- css: wrapperStyle
15
+ var children = _ref.children,
16
+ isSelected = _ref.isSelected;
17
+ return /*#__PURE__*/React.createElement("span", {
18
+ css: [wrapperStyle, isSelected && selectedStyle]
9
19
  }, children);
10
20
  };
@@ -1,8 +1,15 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useEffect, useState } from 'react';
3
- export var MediaInlineImageCard = function MediaInlineImageCard(_ref) {
3
+ import { createIntl, injectIntl } from 'react-intl-next';
4
+ import { messages } from '../messages/media-inline-card';
5
+ import { InlineImageWrapper } from './inline-image-wrapper';
6
+ import { InlineImageCardErrorView } from './views/error-view';
7
+ import { InlineImageCardLoadingView } from './views/loading-view';
8
+ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(_ref) {
4
9
  var mediaClient = _ref.mediaClient,
5
- identifier = _ref.identifier;
10
+ identifier = _ref.identifier,
11
+ isSelected = _ref.isSelected,
12
+ intl = _ref.intl;
6
13
  var _useState = useState(),
7
14
  _useState2 = _slicedToArray(_useState, 2),
8
15
  fileState = _useState2[0],
@@ -11,6 +18,10 @@ export var MediaInlineImageCard = function MediaInlineImageCard(_ref) {
11
18
  _useState4 = _slicedToArray(_useState3, 2),
12
19
  subscribeError = _useState4[0],
13
20
  setSubscribeError = _useState4[1];
21
+ var _ref2 = intl || createIntl({
22
+ locale: 'en'
23
+ }),
24
+ formatMessage = _ref2.formatMessage;
14
25
  useEffect(function () {
15
26
  var subscription = mediaClient.file.getFileState(identifier.id, {
16
27
  collectionName: identifier.collectionName
@@ -27,41 +38,44 @@ export var MediaInlineImageCard = function MediaInlineImageCard(_ref) {
27
38
  subscription.unsubscribe();
28
39
  };
29
40
  }, [identifier.collectionName, identifier.id, mediaClient.file]);
30
- if (subscribeError) {
31
- // TODO:
32
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
33
- // for error message and analytics
34
- throw new Error("not yet implemented: MediaInlineImageCard subscribe error view");
35
- }
36
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
37
- // TODO:
38
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
39
- // for error message and analytics
40
- throw new Error("not yet implemented: MediaInlineImageCard error view");
41
- }
42
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
43
- // TODO:
44
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
45
- // for error message and analytics
46
- throw new Error("not yet implemented: MediaInlineImageCard failed-processing view");
47
- }
48
- // Empty file handling
49
- if (fileState && !fileState.name) {
50
- // TODO:
51
- // referring to packages/media/media-card/src/inline/mediaInlineCard.tsx
52
- // for error message and analytics
53
- throw new Error("not yet implemented: MediaInlineImageCard empty file name error view");
54
- }
55
- if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading') {
56
- throw new Error("not yet implemented: MediaInlineImageCard uploading view");
57
- }
58
- if (!fileState) {
59
- throw new Error("not yet implemented: MediaInlineImageCard loading view");
60
- }
41
+ var content = function content() {
42
+ if (subscribeError) {
43
+ var isUploading = (fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'uploading';
44
+ var errorMessage = isUploading ? messages.failedToUpload : messages.unableToLoadContent;
45
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
46
+ message: formatMessage(errorMessage)
47
+ });
48
+ }
49
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'error') {
50
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
51
+ message: formatMessage(messages.unableToLoadContent)
52
+ });
53
+ }
54
+ if ((fileState === null || fileState === void 0 ? void 0 : fileState.status) === 'failed-processing') {
55
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
56
+ message: formatMessage(messages.unableToLoadContent)
57
+ });
58
+ }
59
+ // Empty file handling
60
+ if (fileState && !fileState.name) {
61
+ return /*#__PURE__*/React.createElement(InlineImageCardErrorView, {
62
+ message: formatMessage(messages.unableToLoadContent)
63
+ });
64
+ }
65
+ if (!fileState) {
66
+ return /*#__PURE__*/React.createElement(InlineImageCardLoadingView, null);
67
+ }
61
68
 
62
- // TODO
63
- // use Card from `@atlaskit/media-card` with an inline block wrapper
64
- // with:
65
- // selection state and `mediaOptions.allowLazyLoading`
66
- throw new Error("not yet implemented: MediaInlineImageCard loading view");
67
- };
69
+ // TODO
70
+ // use Card from `@atlaskit/media-card` with an inline block wrapper
71
+ // with:
72
+ // selection state and `mediaOptions.allowLazyLoading`
73
+ throw new Error("not yet implemented: MediaInlineImageCard loading view");
74
+ };
75
+ return /*#__PURE__*/React.createElement(InlineImageWrapper, {
76
+ isSelected: isSelected
77
+ }, content());
78
+ };
79
+ export var MediaInlineImageCard = injectIntl(MediaInlineImageCardInternal, {
80
+ enforceContext: false
81
+ });
@@ -0,0 +1,2 @@
1
+ /** Height threshold that determines icon size to be small or medium */
2
+ export var ICON_SIZE_THRESOLD = 24;
@@ -0,0 +1,26 @@
1
+ import WarningIcon from '@atlaskit/icon/glyph/warning';
2
+ import { R300 } from '@atlaskit/theme/colors';
3
+ import Tooltip from '@atlaskit/tooltip';
4
+ import { ICON_SIZE_THRESOLD } from './constants';
5
+ import { Frame } from './frame';
6
+ import { IconWrapper } from './icon-wrapper';
7
+ export var InlineImageCardErrorView = function InlineImageCardErrorView(_ref) {
8
+ var _ref$testId = _ref.testId,
9
+ testId = _ref$testId === void 0 ? 'media-inline-image-card-error-view' : _ref$testId,
10
+ message = _ref.message,
11
+ icon = _ref.icon,
12
+ _ref$height = _ref.height,
13
+ height = _ref$height === void 0 ? ICON_SIZE_THRESOLD : _ref$height;
14
+ return /*#__PURE__*/React.createElement(Frame, {
15
+ testId: testId
16
+ }, /*#__PURE__*/React.createElement(Tooltip, {
17
+ content: message,
18
+ position: "top",
19
+ tag: "span",
20
+ hideTooltipOnClick: true
21
+ }, /*#__PURE__*/React.createElement(IconWrapper, null, icon || /*#__PURE__*/React.createElement(WarningIcon, {
22
+ label: "error",
23
+ size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small',
24
+ primaryColor: "var(--ds-icon-danger, ".concat(R300, ")")
25
+ }))));
26
+ };
@@ -0,0 +1,9 @@
1
+ import { wrapperStyle } from './wrapper';
2
+ export var Frame = function Frame(_ref) {
3
+ var children = _ref.children,
4
+ testId = _ref.testId;
5
+ return /*#__PURE__*/React.createElement("span", {
6
+ css: wrapperStyle,
7
+ "data-testid": testId
8
+ }, children);
9
+ };
@@ -0,0 +1,14 @@
1
+ import { css } from '@emotion/react';
2
+ var wrapperStyle = css({
3
+ display: 'flex',
4
+ 'span > svg': {
5
+ verticalAlign: 'baseline'
6
+ }
7
+ });
8
+ export var IconWrapper = function IconWrapper(_ref) {
9
+ var children = _ref.children;
10
+ return /*#__PURE__*/React.createElement("span", {
11
+ css: wrapperStyle,
12
+ "data-testid": "media-inline-image-card-icon"
13
+ }, children);
14
+ };
@@ -0,0 +1,14 @@
1
+ import Spinner from '@atlaskit/spinner';
2
+ import { ICON_SIZE_THRESOLD } from './constants';
3
+ import { Frame } from './frame';
4
+ export var InlineImageCardLoadingView = function InlineImageCardLoadingView(_ref) {
5
+ var _ref$testId = _ref.testId,
6
+ testId = _ref$testId === void 0 ? 'media-inline-image-card-loading-view' : _ref$testId,
7
+ _ref$height = _ref.height,
8
+ height = _ref$height === void 0 ? ICON_SIZE_THRESOLD : _ref$height;
9
+ return /*#__PURE__*/React.createElement(Frame, {
10
+ testId: testId
11
+ }, /*#__PURE__*/React.createElement(Spinner, {
12
+ size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small'
13
+ }));
14
+ };
@@ -0,0 +1,18 @@
1
+ import { css } from '@emotion/react';
2
+ import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
3
+ export var wrapperStyle = css({
4
+ display: 'inline-flex',
5
+ width: '100%',
6
+ height: '100%',
7
+ alignItems: 'center',
8
+ justifyContent: 'center',
9
+ boxDecorationBreak: 'clone',
10
+ borderRadius: "var(--ds-border-radius, 3px)",
11
+ color: "".concat("var(--ds-text, ".concat(N900, ")")),
12
+ backgroundColor: "".concat("var(--ds-background-neutral, ".concat(N30A, ")")),
13
+ transition: '0.1s all ease-in-out',
14
+ cursor: 'pointer',
15
+ '&:hover': {
16
+ backgroundColor: "".concat("var(--ds-background-neutral-hovered, ".concat(N40A, ")"))
17
+ }
18
+ });
@@ -0,0 +1,13 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var messages = defineMessages({
3
+ unableToLoadContent: {
4
+ id: 'fabric.editor.unableToLoadContent',
5
+ defaultMessage: "We couldn't load this content",
6
+ description: 'Display this message when there is an error loading file content'
7
+ },
8
+ failedToUpload: {
9
+ id: 'fabric.editor.failed_to_upload',
10
+ defaultMessage: 'Failed to upload',
11
+ description: 'Display this message when there is an error uploading a file'
12
+ }
13
+ });
@@ -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 = "76.25.0";
9
+ var packageVersion = "76.25.1";
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 { themed } from '@atlaskit/theme/components';
17
17
  import { borderRadius } from '@atlaskit/theme/constants';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "76.25.0";
20
+ var packageVersion = "76.25.1";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -2,6 +2,7 @@
2
2
  import type { FC, ReactElement } from 'react';
3
3
  type Prop = {
4
4
  children: ReactElement;
5
+ isSelected?: boolean;
5
6
  };
6
7
  export declare const InlineImageWrapper: FC<Prop>;
7
8
  export {};
@@ -1,9 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import type { FC } from 'react';
3
+ import type { WrappedComponentProps } from 'react-intl-next';
3
4
  import type { FileIdentifier, MediaClient } from '@atlaskit/media-client';
4
5
  export interface MediaInlineImageCardProps {
5
6
  identifier: FileIdentifier;
6
7
  mediaClient: MediaClient;
7
8
  isSelected?: boolean;
8
9
  }
10
+ export declare const MediaInlineImageCardInternal: FC<MediaInlineImageCardProps & WrappedComponentProps>;
9
11
  export declare const MediaInlineImageCard: FC<MediaInlineImageCardProps>;
@@ -0,0 +1,2 @@
1
+ /** Height threshold that determines icon size to be small or medium */
2
+ export declare const ICON_SIZE_THRESOLD = 24;
@@ -0,0 +1,12 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ type Props = {
4
+ message: string;
5
+ /** Error icon. Default to document icon. */
6
+ icon?: React.ReactNode;
7
+ testId?: string;
8
+ /** Container height */
9
+ height?: number;
10
+ };
11
+ export declare const InlineImageCardErrorView: FC<Props>;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ interface FrameViewProps {
4
+ children?: React.ReactNode;
5
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
6
+ testId?: string;
7
+ }
8
+ export declare const Frame: FC<FrameViewProps>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ type Props = {
4
+ children?: React.ReactNode;
5
+ };
6
+ export declare const IconWrapper: FC<Props>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ type Props = {
4
+ title?: string;
5
+ testId?: string;
6
+ /** Container height */
7
+ height?: number;
8
+ };
9
+ export declare const InlineImageCardLoadingView: FC<Props>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,12 @@
1
+ export declare const messages: {
2
+ unableToLoadContent: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ failedToUpload: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ };
@@ -2,6 +2,7 @@
2
2
  import type { FC, ReactElement } from 'react';
3
3
  type Prop = {
4
4
  children: ReactElement;
5
+ isSelected?: boolean;
5
6
  };
6
7
  export declare const InlineImageWrapper: FC<Prop>;
7
8
  export {};
@@ -1,9 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import type { FC } from 'react';
3
+ import type { WrappedComponentProps } from 'react-intl-next';
3
4
  import type { FileIdentifier, MediaClient } from '@atlaskit/media-client';
4
5
  export interface MediaInlineImageCardProps {
5
6
  identifier: FileIdentifier;
6
7
  mediaClient: MediaClient;
7
8
  isSelected?: boolean;
8
9
  }
10
+ export declare const MediaInlineImageCardInternal: FC<MediaInlineImageCardProps & WrappedComponentProps>;
9
11
  export declare const MediaInlineImageCard: FC<MediaInlineImageCardProps>;
@@ -0,0 +1,2 @@
1
+ /** Height threshold that determines icon size to be small or medium */
2
+ export declare const ICON_SIZE_THRESOLD = 24;
@@ -0,0 +1,12 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ type Props = {
4
+ message: string;
5
+ /** Error icon. Default to document icon. */
6
+ icon?: React.ReactNode;
7
+ testId?: string;
8
+ /** Container height */
9
+ height?: number;
10
+ };
11
+ export declare const InlineImageCardErrorView: FC<Props>;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ interface FrameViewProps {
4
+ children?: React.ReactNode;
5
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
6
+ testId?: string;
7
+ }
8
+ export declare const Frame: FC<FrameViewProps>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ type Props = {
4
+ children?: React.ReactNode;
5
+ };
6
+ export declare const IconWrapper: FC<Props>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ /** @jsx jsx */
2
+ import type { FC } from 'react';
3
+ type Props = {
4
+ title?: string;
5
+ testId?: string;
6
+ /** Container height */
7
+ height?: number;
8
+ };
9
+ export declare const InlineImageCardLoadingView: FC<Props>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,12 @@
1
+ export declare const messages: {
2
+ unableToLoadContent: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ failedToUpload: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "76.25.0",
3
+ "version": "76.25.1",
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/"