@atlaskit/editor-plugin-media 1.4.0 → 1.4.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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/nodeviews/mediaSingle.js +4 -1
- package/dist/cjs/nodeviews/styles.js +30 -12
- package/dist/es2019/nodeviews/mediaSingle.js +6 -3
- package/dist/es2019/nodeviews/styles.js +24 -16
- package/dist/esm/nodeviews/mediaSingle.js +6 -3
- package/dist/esm/nodeviews/styles.js +29 -10
- package/dist/types/nodeviews/styles.d.ts +3 -2
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/styles.d.ts +3 -2
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 1.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#77601](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77601) [`ee98d2aa7c8a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ee98d2aa7c8a) - [ED-22199] Update media card wrapper so that it applies comments styles according to comment status
|
|
8
|
+
|
|
3
9
|
## 1.4.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -45,6 +45,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
45
45
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
46
46
|
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); }; }
|
|
47
47
|
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; } } /** @jsx jsx */
|
|
48
|
+
var figureWrapperStyles = (0, _react2.css)({
|
|
49
|
+
margin: 0
|
|
50
|
+
});
|
|
48
51
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
49
52
|
var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
50
53
|
(0, _inherits2.default)(MediaSingleNode, _Component);
|
|
@@ -421,7 +424,7 @@ var MediaSingleNode = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
421
424
|
var shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof _state.NodeSelection;
|
|
422
425
|
var MediaChildren = (0, _react2.jsx)("figure", {
|
|
423
426
|
ref: this.mediaSingleWrapperRef,
|
|
424
|
-
css:
|
|
427
|
+
css: figureWrapperStyles,
|
|
425
428
|
className: _styles.MediaSingleNodeSelector,
|
|
426
429
|
onClick: this.onMediaSingleClicked
|
|
427
430
|
}, (0, _react2.jsx)("div", {
|
|
@@ -4,36 +4,54 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var
|
|
7
|
+
exports.MediaSingleNodeSelector = exports.MediaInlineNodeSelector = exports.MediaCardWrapper = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
|
-
var
|
|
13
|
-
|
|
12
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
|
|
14
15
|
var MediaInlineNodeSelector = exports.MediaInlineNodeSelector = 'media-inline-node';
|
|
15
16
|
var MediaSingleNodeSelector = exports.MediaSingleNodeSelector = 'media-single-node';
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
var absoluteDivStyles = (0, _react2.css)({
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
width: '100%',
|
|
20
|
+
height: '100%'
|
|
21
|
+
});
|
|
22
|
+
var forcedDimensionsStyles = (0, _react2.css)({
|
|
23
|
+
width: '100%',
|
|
24
|
+
position: 'relative'
|
|
25
|
+
});
|
|
26
|
+
var boxShadowColorByStatus = {
|
|
27
|
+
draft: "var(--ds-background-accent-yellow-subtle, ".concat(_colors.Y300, ")"),
|
|
28
|
+
focus: "var(--ds-background-accent-yellow-subtle, ".concat(_colors.Y300, ")"),
|
|
29
|
+
blur: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y200, ")")
|
|
30
|
+
};
|
|
31
|
+
var commentStatusStyleMap = function commentStatusStyleMap(status) {
|
|
32
|
+
return "3px 3px 0px 0px ".concat(boxShadowColorByStatus[status]);
|
|
33
|
+
};
|
|
19
34
|
var MediaCardWrapper = exports.MediaCardWrapper = function MediaCardWrapper(_ref) {
|
|
20
35
|
var dimensions = _ref.dimensions,
|
|
21
36
|
children = _ref.children,
|
|
22
37
|
selected = _ref.selected,
|
|
23
38
|
_ref$borderWidth = _ref.borderWidth,
|
|
24
39
|
borderWidth = _ref$borderWidth === void 0 ? 0 : _ref$borderWidth,
|
|
25
|
-
onContextMenu = _ref.onContextMenu
|
|
40
|
+
onContextMenu = _ref.onContextMenu,
|
|
41
|
+
commentStatus = _ref.commentStatus;
|
|
26
42
|
var calculatedBorderWidth = selected && borderWidth > 0 ? borderWidth + 1 : borderWidth;
|
|
27
43
|
return (0, _react2.jsx)("div", {
|
|
28
44
|
"data-testid": "media-card-wrapper",
|
|
29
|
-
style: {
|
|
45
|
+
style: _objectSpread({
|
|
30
46
|
borderColor: "var(--custom-palette-color)",
|
|
31
47
|
borderWidth: "".concat(calculatedBorderWidth, "px"),
|
|
32
48
|
borderStyle: 'solid',
|
|
33
49
|
borderRadius: "".concat(calculatedBorderWidth * 2, "px")
|
|
34
|
-
}
|
|
50
|
+
}, commentStatus && {
|
|
51
|
+
boxShadow: "".concat(commentStatusStyleMap(commentStatus))
|
|
52
|
+
})
|
|
35
53
|
}, (0, _react2.jsx)("div", {
|
|
36
|
-
css:
|
|
54
|
+
css: forcedDimensionsStyles,
|
|
37
55
|
style: {
|
|
38
56
|
paddingBottom: "".concat(dimensions.height / dimensions.width * 100, "%")
|
|
39
57
|
},
|
|
@@ -41,6 +59,6 @@ var MediaCardWrapper = exports.MediaCardWrapper = function MediaCardWrapper(_ref
|
|
|
41
59
|
}, borderWidth > 0 && (0, _react2.jsx)(_ui.MediaBorderGapFiller, {
|
|
42
60
|
borderColor: "var(--custom-palette-color)"
|
|
43
61
|
}), (0, _react2.jsx)("div", {
|
|
44
|
-
css:
|
|
62
|
+
css: absoluteDivStyles
|
|
45
63
|
}, children)));
|
|
46
64
|
};
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
8
8
|
import { calcMediaSinglePixelWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, getMaxWidthForNestedNode, MEDIA_SINGLE_GUTTER_SIZE } from '@atlaskit/editor-common/media-single';
|
|
9
9
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -23,7 +23,10 @@ import ResizableMediaSingleNext from '../ui/ResizableMediaSingle/ResizableMediaS
|
|
|
23
23
|
import { isMediaBlobUrlFromAttrs } from '../utils/media-common';
|
|
24
24
|
import { hasPrivateAttrsChanged } from './helpers';
|
|
25
25
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
26
|
-
import {
|
|
26
|
+
import { MediaSingleNodeSelector } from './styles';
|
|
27
|
+
const figureWrapperStyles = css({
|
|
28
|
+
margin: 0
|
|
29
|
+
});
|
|
27
30
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
31
|
export default class MediaSingleNode extends Component {
|
|
29
32
|
constructor(...args) {
|
|
@@ -334,7 +337,7 @@ export default class MediaSingleNode extends Component {
|
|
|
334
337
|
const shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof NodeSelection;
|
|
335
338
|
const MediaChildren = jsx("figure", {
|
|
336
339
|
ref: this.mediaSingleWrapperRef,
|
|
337
|
-
css:
|
|
340
|
+
css: figureWrapperStyles,
|
|
338
341
|
className: MediaSingleNodeSelector,
|
|
339
342
|
onClick: this.onMediaSingleClicked
|
|
340
343
|
}, jsx("div", {
|
|
@@ -2,26 +2,31 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { MediaBorderGapFiller } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import { Y200, Y300 } from '@atlaskit/theme/colors';
|
|
5
6
|
export const MediaInlineNodeSelector = 'media-inline-node';
|
|
6
7
|
export const MediaSingleNodeSelector = 'media-single-node';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
const absoluteDivStyles = css({
|
|
9
|
+
position: 'absolute',
|
|
10
|
+
width: '100%',
|
|
11
|
+
height: '100%'
|
|
12
|
+
});
|
|
13
|
+
const forcedDimensionsStyles = css({
|
|
14
|
+
width: '100%',
|
|
15
|
+
position: 'relative'
|
|
16
|
+
});
|
|
17
|
+
const boxShadowColorByStatus = {
|
|
18
|
+
draft: `var(--ds-background-accent-yellow-subtle, ${Y300})`,
|
|
19
|
+
focus: `var(--ds-background-accent-yellow-subtle, ${Y300})`,
|
|
20
|
+
blur: `var(--ds-background-accent-yellow-subtler, ${Y200})`
|
|
21
|
+
};
|
|
22
|
+
const commentStatusStyleMap = status => `3px 3px 0px 0px ${boxShadowColorByStatus[status]}`;
|
|
19
23
|
export const MediaCardWrapper = ({
|
|
20
24
|
dimensions,
|
|
21
25
|
children,
|
|
22
26
|
selected,
|
|
23
27
|
borderWidth = 0,
|
|
24
|
-
onContextMenu
|
|
28
|
+
onContextMenu,
|
|
29
|
+
commentStatus
|
|
25
30
|
}) => {
|
|
26
31
|
const calculatedBorderWidth = selected && borderWidth > 0 ? borderWidth + 1 : borderWidth;
|
|
27
32
|
return jsx("div", {
|
|
@@ -30,10 +35,13 @@ export const MediaCardWrapper = ({
|
|
|
30
35
|
borderColor: `var(--custom-palette-color)`,
|
|
31
36
|
borderWidth: `${calculatedBorderWidth}px`,
|
|
32
37
|
borderStyle: 'solid',
|
|
33
|
-
borderRadius: `${calculatedBorderWidth * 2}px
|
|
38
|
+
borderRadius: `${calculatedBorderWidth * 2}px`,
|
|
39
|
+
...(commentStatus && {
|
|
40
|
+
boxShadow: `${commentStatusStyleMap(commentStatus)}`
|
|
41
|
+
})
|
|
34
42
|
}
|
|
35
43
|
}, jsx("div", {
|
|
36
|
-
css:
|
|
44
|
+
css: forcedDimensionsStyles,
|
|
37
45
|
style: {
|
|
38
46
|
paddingBottom: `${dimensions.height / dimensions.width * 100}%`
|
|
39
47
|
},
|
|
@@ -41,6 +49,6 @@ export const MediaCardWrapper = ({
|
|
|
41
49
|
}, borderWidth > 0 && jsx(MediaBorderGapFiller, {
|
|
42
50
|
borderColor: `var(--custom-palette-color)`
|
|
43
51
|
}), jsx("div", {
|
|
44
|
-
css:
|
|
52
|
+
css: absoluteDivStyles
|
|
45
53
|
}, children)));
|
|
46
54
|
};
|
|
@@ -16,7 +16,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
16
16
|
/** @jsx jsx */
|
|
17
17
|
|
|
18
18
|
import React, { Component } from 'react';
|
|
19
|
-
import { jsx } from '@emotion/react';
|
|
19
|
+
import { css, jsx } from '@emotion/react';
|
|
20
20
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
21
21
|
import { calcMediaSinglePixelWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, getMaxWidthForNestedNode, MEDIA_SINGLE_GUTTER_SIZE } from '@atlaskit/editor-common/media-single';
|
|
22
22
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -36,7 +36,10 @@ import ResizableMediaSingleNext from '../ui/ResizableMediaSingle/ResizableMediaS
|
|
|
36
36
|
import { isMediaBlobUrlFromAttrs } from '../utils/media-common';
|
|
37
37
|
import { hasPrivateAttrsChanged } from './helpers';
|
|
38
38
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
39
|
-
import {
|
|
39
|
+
import { MediaSingleNodeSelector } from './styles';
|
|
40
|
+
var figureWrapperStyles = css({
|
|
41
|
+
margin: 0
|
|
42
|
+
});
|
|
40
43
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
41
44
|
var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
42
45
|
_inherits(MediaSingleNode, _Component);
|
|
@@ -413,7 +416,7 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
413
416
|
var shouldShowPlaceholder = mediaOptions.allowCaptions && node.childCount !== 2 && isSelected && state.selection instanceof NodeSelection;
|
|
414
417
|
var MediaChildren = jsx("figure", {
|
|
415
418
|
ref: this.mediaSingleWrapperRef,
|
|
416
|
-
css:
|
|
419
|
+
css: figureWrapperStyles,
|
|
417
420
|
className: MediaSingleNodeSelector,
|
|
418
421
|
onClick: this.onMediaSingleClicked
|
|
419
422
|
}, jsx("div", {
|
|
@@ -1,32 +1,51 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
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; }
|
|
3
4
|
/** @jsx jsx */
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { css, jsx } from '@emotion/react';
|
|
6
7
|
import { MediaBorderGapFiller } from '@atlaskit/editor-common/ui';
|
|
8
|
+
import { Y200, Y300 } from '@atlaskit/theme/colors';
|
|
7
9
|
export var MediaInlineNodeSelector = 'media-inline-node';
|
|
8
10
|
export var MediaSingleNodeSelector = 'media-single-node';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
var absoluteDivStyles = css({
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
width: '100%',
|
|
14
|
+
height: '100%'
|
|
15
|
+
});
|
|
16
|
+
var forcedDimensionsStyles = css({
|
|
17
|
+
width: '100%',
|
|
18
|
+
position: 'relative'
|
|
19
|
+
});
|
|
20
|
+
var boxShadowColorByStatus = {
|
|
21
|
+
draft: "var(--ds-background-accent-yellow-subtle, ".concat(Y300, ")"),
|
|
22
|
+
focus: "var(--ds-background-accent-yellow-subtle, ".concat(Y300, ")"),
|
|
23
|
+
blur: "var(--ds-background-accent-yellow-subtler, ".concat(Y200, ")")
|
|
24
|
+
};
|
|
25
|
+
var commentStatusStyleMap = function commentStatusStyleMap(status) {
|
|
26
|
+
return "3px 3px 0px 0px ".concat(boxShadowColorByStatus[status]);
|
|
27
|
+
};
|
|
12
28
|
export var MediaCardWrapper = function MediaCardWrapper(_ref) {
|
|
13
29
|
var dimensions = _ref.dimensions,
|
|
14
30
|
children = _ref.children,
|
|
15
31
|
selected = _ref.selected,
|
|
16
32
|
_ref$borderWidth = _ref.borderWidth,
|
|
17
33
|
borderWidth = _ref$borderWidth === void 0 ? 0 : _ref$borderWidth,
|
|
18
|
-
onContextMenu = _ref.onContextMenu
|
|
34
|
+
onContextMenu = _ref.onContextMenu,
|
|
35
|
+
commentStatus = _ref.commentStatus;
|
|
19
36
|
var calculatedBorderWidth = selected && borderWidth > 0 ? borderWidth + 1 : borderWidth;
|
|
20
37
|
return jsx("div", {
|
|
21
38
|
"data-testid": "media-card-wrapper",
|
|
22
|
-
style: {
|
|
39
|
+
style: _objectSpread({
|
|
23
40
|
borderColor: "var(--custom-palette-color)",
|
|
24
41
|
borderWidth: "".concat(calculatedBorderWidth, "px"),
|
|
25
42
|
borderStyle: 'solid',
|
|
26
43
|
borderRadius: "".concat(calculatedBorderWidth * 2, "px")
|
|
27
|
-
}
|
|
44
|
+
}, commentStatus && {
|
|
45
|
+
boxShadow: "".concat(commentStatusStyleMap(commentStatus))
|
|
46
|
+
})
|
|
28
47
|
}, jsx("div", {
|
|
29
|
-
css:
|
|
48
|
+
css: forcedDimensionsStyles,
|
|
30
49
|
style: {
|
|
31
50
|
paddingBottom: "".concat(dimensions.height / dimensions.width * 100, "%")
|
|
32
51
|
},
|
|
@@ -34,6 +53,6 @@ export var MediaCardWrapper = function MediaCardWrapper(_ref) {
|
|
|
34
53
|
}, borderWidth > 0 && jsx(MediaBorderGapFiller, {
|
|
35
54
|
borderColor: "var(--custom-palette-color)"
|
|
36
55
|
}), jsx("div", {
|
|
37
|
-
css:
|
|
56
|
+
css: absoluteDivStyles
|
|
38
57
|
}, children)));
|
|
39
58
|
};
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
5
|
+
import type { CommentStatus } from '../types';
|
|
5
6
|
export declare const MediaInlineNodeSelector = "media-inline-node";
|
|
6
7
|
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
7
|
-
export declare const figureWrapper: import("@emotion/react").SerializedStyles;
|
|
8
8
|
type MediaCardWrapperProps = {
|
|
9
9
|
dimensions: NumericalCardDimensions;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
borderWidth?: number;
|
|
13
13
|
onContextMenu?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
14
|
+
commentStatus?: CommentStatus;
|
|
14
15
|
};
|
|
15
|
-
export declare const MediaCardWrapper: ({ dimensions, children, selected, borderWidth, onContextMenu, }: MediaCardWrapperProps) => jsx.JSX.Element;
|
|
16
|
+
export declare const MediaCardWrapper: ({ dimensions, children, selected, borderWidth, onContextMenu, commentStatus, }: MediaCardWrapperProps) => jsx.JSX.Element;
|
|
16
17
|
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ interface PlaceholderTextOptions {
|
|
|
12
12
|
allowInserting?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
|
|
15
|
+
export type CommentStatus = 'draft' | 'focus' | 'blur';
|
|
15
16
|
export type MediaSingleWithType = 'pixel' | 'percentage';
|
|
16
17
|
export interface MediaOptions {
|
|
17
18
|
provider?: Providers['mediaProvider'];
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
5
|
+
import type { CommentStatus } from '../types';
|
|
5
6
|
export declare const MediaInlineNodeSelector = "media-inline-node";
|
|
6
7
|
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
7
|
-
export declare const figureWrapper: import("@emotion/react").SerializedStyles;
|
|
8
8
|
type MediaCardWrapperProps = {
|
|
9
9
|
dimensions: NumericalCardDimensions;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
borderWidth?: number;
|
|
13
13
|
onContextMenu?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
14
|
+
commentStatus?: CommentStatus;
|
|
14
15
|
};
|
|
15
|
-
export declare const MediaCardWrapper: ({ dimensions, children, selected, borderWidth, onContextMenu, }: MediaCardWrapperProps) => jsx.JSX.Element;
|
|
16
|
+
export declare const MediaCardWrapper: ({ dimensions, children, selected, borderWidth, onContextMenu, commentStatus, }: MediaCardWrapperProps) => jsx.JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -12,6 +12,7 @@ interface PlaceholderTextOptions {
|
|
|
12
12
|
allowInserting?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
|
|
15
|
+
export type CommentStatus = 'draft' | 'focus' | 'blur';
|
|
15
16
|
export type MediaSingleWithType = 'pixel' | 'percentage';
|
|
16
17
|
export interface MediaOptions {
|
|
17
18
|
provider?: Providers['mediaProvider'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
39
39
|
"@atlaskit/button": "^17.6.0",
|
|
40
|
-
"@atlaskit/editor-common": "^78.
|
|
40
|
+
"@atlaskit/editor-common": "^78.9.0",
|
|
41
41
|
"@atlaskit/editor-palette": "1.5.2",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-decorations": "^1.0.0",
|