@atlaskit/media-ui 22.2.4 → 22.3.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.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/MediaInlineCard/ErroredView/index.js +1 -3
- package/dist/cjs/MediaInlineCard/Frame/styled.js +4 -6
- package/dist/cjs/MediaInlineCard/IconAndTitleLayout/index.js +1 -3
- package/dist/cjs/MediaInlineCard/styled.js +1 -3
- package/dist/cjs/customMediaPlayer/index.js +1 -1
- package/dist/cjs/mediaImage/index.js +6 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/MediaInlineCard/ErroredView/index.js +1 -2
- package/dist/es2019/MediaInlineCard/Frame/styled.js +4 -5
- package/dist/es2019/MediaInlineCard/IconAndTitleLayout/index.js +1 -2
- package/dist/es2019/MediaInlineCard/styled.js +1 -2
- package/dist/es2019/customMediaPlayer/index.js +1 -1
- package/dist/es2019/mediaImage/index.js +5 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/MediaInlineCard/ErroredView/index.js +1 -2
- package/dist/esm/MediaInlineCard/Frame/styled.js +4 -5
- package/dist/esm/MediaInlineCard/IconAndTitleLayout/index.js +1 -2
- package/dist/esm/MediaInlineCard/styled.js +1 -2
- package/dist/esm/customMediaPlayer/index.js +1 -1
- package/dist/esm/mediaImage/index.js +6 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/mediaImage/index.d.ts +1 -1
- package/package.json +3 -3
- package/report.api.md +16 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/media-ui
|
|
2
2
|
|
|
3
|
+
## 22.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1687a9fddf0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1687a9fddf0) - Updated previewOrientation prop to allow "from-image" orientation
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 22.2.4
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -21,8 +21,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
21
21
|
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
23
|
|
|
24
|
-
var _tokens = require("@atlaskit/tokens");
|
|
25
|
-
|
|
26
24
|
var _react = _interopRequireDefault(require("react"));
|
|
27
25
|
|
|
28
26
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -83,7 +81,7 @@ var MediaInlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
83
81
|
icon: icon || /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_warning.default, {
|
|
84
82
|
label: "error",
|
|
85
83
|
size: "small",
|
|
86
|
-
primaryColor: (
|
|
84
|
+
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")")
|
|
87
85
|
})),
|
|
88
86
|
title: this.renderMessage()
|
|
89
87
|
}));
|
|
@@ -9,8 +9,6 @@ exports.Wrapper = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var _tokens = require("@atlaskit/tokens");
|
|
13
|
-
|
|
14
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
13
|
|
|
16
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -19,9 +17,9 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
19
17
|
|
|
20
18
|
var _templateObject;
|
|
21
19
|
|
|
22
|
-
var FONT_COLOR = (
|
|
23
|
-
var BACKGROUND_COLOR = (
|
|
24
|
-
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat((
|
|
20
|
+
var FONT_COLOR = "var(--ds-text, ".concat(_colors.N900, ")");
|
|
21
|
+
var BACKGROUND_COLOR = "var(--ds-background-neutral, ".concat(_colors.N30A, ")");
|
|
22
|
+
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat("var(--ds-border-selected, ".concat(_colors.B300, ")"), ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
25
23
|
|
|
26
24
|
var isSelected = function isSelected(_ref) {
|
|
27
25
|
var isSelected = _ref.isSelected;
|
|
@@ -48,6 +46,6 @@ var isSelected = function isSelected(_ref) {
|
|
|
48
46
|
|
|
49
47
|
var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: 16px;\n padding: 2px 4px 2px 4px;\n box-decoration-break: clone;\n display: inline;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), (0, _constants.borderRadius)(), FONT_COLOR, BACKGROUND_COLOR, function (props) {
|
|
50
48
|
return isSelected(props);
|
|
51
|
-
}, (
|
|
49
|
+
}, "var(--ds-background-neutral-hovered, ".concat(_colors.N40A, ")"));
|
|
52
50
|
|
|
53
51
|
exports.Wrapper = Wrapper;
|
|
@@ -27,8 +27,6 @@ var _styled = require("./styled");
|
|
|
27
27
|
|
|
28
28
|
var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/link"));
|
|
29
29
|
|
|
30
|
-
var _tokens = require("@atlaskit/tokens");
|
|
31
|
-
|
|
32
30
|
var _colors = require("@atlaskit/theme/colors");
|
|
33
31
|
|
|
34
32
|
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); }; }
|
|
@@ -124,7 +122,7 @@ var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
124
122
|
testId = _this$props2$testId === void 0 ? 'media-inline-card-icon-and-title' : _this$props2$testId;
|
|
125
123
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconTitleWrapper, {
|
|
126
124
|
style: {
|
|
127
|
-
color: titleColor || (
|
|
125
|
+
color: titleColor || "var(--ds-text, ".concat(_colors.N900, ")")
|
|
128
126
|
}
|
|
129
127
|
}, /*#__PURE__*/_react.default.createElement(_styled.IconPositionWrapper, null, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(_styled.TitleWrapper, null, title)));
|
|
130
128
|
}
|
|
@@ -9,14 +9,12 @@ exports.NoLinkAppearance = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var _tokens = require("@atlaskit/tokens");
|
|
13
|
-
|
|
14
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
13
|
|
|
16
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
15
|
|
|
18
16
|
var _templateObject;
|
|
19
17
|
|
|
20
|
-
var NoLinkAppearance = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (
|
|
18
|
+
var NoLinkAppearance = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"));
|
|
21
19
|
|
|
22
20
|
exports.NoLinkAppearance = NoLinkAppearance;
|
|
@@ -96,7 +96,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
96
96
|
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; } }
|
|
97
97
|
|
|
98
98
|
var packageName = "@atlaskit/media-ui";
|
|
99
|
-
var packageVersion = "22.
|
|
99
|
+
var packageVersion = "22.3.0";
|
|
100
100
|
var MEDIUM_VIDEO_MAX_WIDTH = 400;
|
|
101
101
|
var SMALL_VIDEO_MAX_WIDTH = 160;
|
|
102
102
|
var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
|
|
@@ -104,7 +104,8 @@ var MediaImage = /*#__PURE__*/function (_Component) {
|
|
|
104
104
|
crop = _this$props.crop,
|
|
105
105
|
stretch = _this$props.stretch,
|
|
106
106
|
dataURI = _this$props.dataURI,
|
|
107
|
-
|
|
107
|
+
_this$props$previewOr = _this$props.previewOrientation,
|
|
108
|
+
previewOrientation = _this$props$previewOr === void 0 ? 1 : _this$props$previewOr,
|
|
108
109
|
crossOrigin = _this$props.crossOrigin,
|
|
109
110
|
onImageError = _this$props.onImageError,
|
|
110
111
|
_this$props$alt = _this$props.alt,
|
|
@@ -145,7 +146,7 @@ var MediaImage = /*#__PURE__*/function (_Component) {
|
|
|
145
146
|
*/
|
|
146
147
|
|
|
147
148
|
var isFitStrategy = !crop;
|
|
148
|
-
var isImageRotated = (0, _imageMetaData.isRotated)(previewOrientation
|
|
149
|
+
var isImageRotated = previewOrientation !== 'from-image' && (0, _imageMetaData.isRotated)(previewOrientation);
|
|
149
150
|
/*
|
|
150
151
|
When photo has orientation of 90deg or 270deg (stored in EXIF meta data)
|
|
151
152
|
things get very tricky. Let me go through an two examples to explain how we deal with that:
|
|
@@ -398,7 +399,9 @@ var MediaImage = /*#__PURE__*/function (_Component) {
|
|
|
398
399
|
style.display = 'none';
|
|
399
400
|
}
|
|
400
401
|
|
|
401
|
-
if (previewOrientation
|
|
402
|
+
if (previewOrientation === 'from-image') {
|
|
403
|
+
style.imageOrientation = 'from-image';
|
|
404
|
+
} else if (previewOrientation > 1) {
|
|
402
405
|
var transform = (0, _imageMetaData.getCssFromImageOrientation)(previewOrientation);
|
|
403
406
|
style.transform += " ".concat(transform);
|
|
404
407
|
}
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { R300 } from '@atlaskit/theme/colors';
|
|
5
4
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
@@ -35,7 +34,7 @@ export class MediaInlineCardErroredView extends React.Component {
|
|
|
35
34
|
icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
36
35
|
label: "error",
|
|
37
36
|
size: "small",
|
|
38
|
-
primaryColor:
|
|
37
|
+
primaryColor: `var(--ds-icon-danger, ${R300})`
|
|
39
38
|
})),
|
|
40
39
|
title: this.renderMessage()
|
|
41
40
|
}));
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { token } from '@atlaskit/tokens';
|
|
2
1
|
import styled from '@emotion/styled';
|
|
3
2
|
import { B300, N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
4
3
|
import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
|
|
5
|
-
const FONT_COLOR =
|
|
6
|
-
const BACKGROUND_COLOR =
|
|
4
|
+
const FONT_COLOR = `var(--ds-text, ${N900})`;
|
|
5
|
+
const BACKGROUND_COLOR = `var(--ds-background-neutral, ${N30A})`;
|
|
7
6
|
const selected = `
|
|
8
7
|
cursor: pointer;
|
|
9
|
-
box-shadow: 0 0 0 1px ${
|
|
8
|
+
box-shadow: 0 0 0 1px ${`var(--ds-border-selected, ${B300})`};
|
|
10
9
|
outline: none;
|
|
11
10
|
user-select: none;
|
|
12
11
|
border-color: transparent;
|
|
@@ -52,6 +51,6 @@ export const Wrapper = styled.span`
|
|
|
52
51
|
cursor: pointer;
|
|
53
52
|
|
|
54
53
|
&:hover {
|
|
55
|
-
background-color: ${
|
|
54
|
+
background-color: ${`var(--ds-background-neutral-hovered, ${N40A})`};
|
|
56
55
|
}
|
|
57
56
|
`;
|
|
@@ -3,7 +3,6 @@ import ImageLoader from 'react-render-image';
|
|
|
3
3
|
import { Icon } from '../Icon';
|
|
4
4
|
import { IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, EmojiWrapper } from './styled';
|
|
5
5
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { N900 } from '@atlaskit/theme/colors';
|
|
8
7
|
export class IconAndTitleLayout extends React.Component {
|
|
9
8
|
renderAtlaskitIcon() {
|
|
@@ -84,7 +83,7 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
84
83
|
} = this.props;
|
|
85
84
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconTitleWrapper, {
|
|
86
85
|
style: {
|
|
87
|
-
color: titleColor ||
|
|
86
|
+
color: titleColor || `var(--ds-text, ${N900})`
|
|
88
87
|
}
|
|
89
88
|
}, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper, null, title)));
|
|
90
89
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { token } from '@atlaskit/tokens';
|
|
2
1
|
import styled from '@emotion/styled';
|
|
3
2
|
import { N200 } from '@atlaskit/theme/colors';
|
|
4
3
|
export const NoLinkAppearance = styled.span`
|
|
5
|
-
color: ${
|
|
4
|
+
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
6
5
|
`;
|
|
@@ -35,7 +35,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
35
35
|
import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
|
|
36
36
|
import { getControlsWrapperClassName } from './getControlsWrapperClassName';
|
|
37
37
|
const packageName = "@atlaskit/media-ui";
|
|
38
|
-
const packageVersion = "22.
|
|
38
|
+
const packageVersion = "22.3.0";
|
|
39
39
|
const MEDIUM_VIDEO_MAX_WIDTH = 400;
|
|
40
40
|
const SMALL_VIDEO_MAX_WIDTH = 160;
|
|
41
41
|
const MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
|
|
@@ -61,7 +61,7 @@ export class MediaImage extends Component {
|
|
|
61
61
|
crop,
|
|
62
62
|
stretch,
|
|
63
63
|
dataURI,
|
|
64
|
-
previewOrientation,
|
|
64
|
+
previewOrientation = 1,
|
|
65
65
|
crossOrigin,
|
|
66
66
|
onImageError,
|
|
67
67
|
alt = '',
|
|
@@ -103,7 +103,7 @@ export class MediaImage extends Component {
|
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
105
|
const isFitStrategy = !crop;
|
|
106
|
-
const isImageRotated = isRotated(previewOrientation
|
|
106
|
+
const isImageRotated = previewOrientation !== 'from-image' && isRotated(previewOrientation);
|
|
107
107
|
/*
|
|
108
108
|
When photo has orientation of 90deg or 270deg (stored in EXIF meta data)
|
|
109
109
|
things get very tricky. Let me go through an two examples to explain how we deal with that:
|
|
@@ -356,7 +356,9 @@ export class MediaImage extends Component {
|
|
|
356
356
|
style.display = 'none';
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
if (previewOrientation
|
|
359
|
+
if (previewOrientation === 'from-image') {
|
|
360
|
+
style.imageOrientation = 'from-image';
|
|
361
|
+
} else if (previewOrientation > 1) {
|
|
360
362
|
const transform = getCssFromImageOrientation(previewOrientation);
|
|
361
363
|
style.transform += ` ${transform}`;
|
|
362
364
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -10,7 +10,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
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; } }
|
|
12
12
|
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
13
|
import React from 'react';
|
|
15
14
|
import { R300 } from '@atlaskit/theme/colors';
|
|
16
15
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
@@ -60,7 +59,7 @@ export var MediaInlineCardErroredView = /*#__PURE__*/function (_React$Component)
|
|
|
60
59
|
icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
61
60
|
label: "error",
|
|
62
61
|
size: "small",
|
|
63
|
-
primaryColor:
|
|
62
|
+
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")")
|
|
64
63
|
})),
|
|
65
64
|
title: this.renderMessage()
|
|
66
65
|
}));
|
|
@@ -2,13 +2,12 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import styled from '@emotion/styled';
|
|
7
6
|
import { B300, N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
8
7
|
import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
|
|
9
|
-
var FONT_COLOR =
|
|
10
|
-
var BACKGROUND_COLOR =
|
|
11
|
-
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat(
|
|
8
|
+
var FONT_COLOR = "var(--ds-text, ".concat(N900, ")");
|
|
9
|
+
var BACKGROUND_COLOR = "var(--ds-background-neutral, ".concat(N30A, ")");
|
|
10
|
+
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat("var(--ds-border-selected, ".concat(B300, ")"), ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
12
11
|
|
|
13
12
|
var isSelected = function isSelected(_ref) {
|
|
14
13
|
var isSelected = _ref.isSelected;
|
|
@@ -35,4 +34,4 @@ var isSelected = function isSelected(_ref) {
|
|
|
35
34
|
|
|
36
35
|
export var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 16px;\n padding: 2px 4px 2px 4px;\n box-decoration-break: clone;\n display: inline;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), akBorderRadius(), FONT_COLOR, BACKGROUND_COLOR, function (props) {
|
|
37
36
|
return isSelected(props);
|
|
38
|
-
},
|
|
37
|
+
}, "var(--ds-background-neutral-hovered, ".concat(N40A, ")"));
|
|
@@ -13,7 +13,6 @@ import ImageLoader from 'react-render-image';
|
|
|
13
13
|
import { Icon } from '../Icon';
|
|
14
14
|
import { IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, EmojiWrapper } from './styled';
|
|
15
15
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
16
|
-
import { token } from '@atlaskit/tokens';
|
|
17
16
|
import { N900 } from '@atlaskit/theme/colors';
|
|
18
17
|
export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
19
18
|
_inherits(IconAndTitleLayout, _React$Component);
|
|
@@ -105,7 +104,7 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
105
104
|
testId = _this$props2$testId === void 0 ? 'media-inline-card-icon-and-title' : _this$props2$testId;
|
|
106
105
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconTitleWrapper, {
|
|
107
106
|
style: {
|
|
108
|
-
color: titleColor ||
|
|
107
|
+
color: titleColor || "var(--ds-text, ".concat(N900, ")")
|
|
109
108
|
}
|
|
110
109
|
}, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper, null, title)));
|
|
111
110
|
}
|
|
@@ -2,7 +2,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import styled from '@emotion/styled';
|
|
7
6
|
import { N200 } from '@atlaskit/theme/colors';
|
|
8
|
-
export var NoLinkAppearance = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])),
|
|
7
|
+
export var NoLinkAppearance = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
@@ -49,7 +49,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
49
49
|
import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
|
|
50
50
|
import { getControlsWrapperClassName } from './getControlsWrapperClassName';
|
|
51
51
|
var packageName = "@atlaskit/media-ui";
|
|
52
|
-
var packageVersion = "22.
|
|
52
|
+
var packageVersion = "22.3.0";
|
|
53
53
|
var MEDIUM_VIDEO_MAX_WIDTH = 400;
|
|
54
54
|
var SMALL_VIDEO_MAX_WIDTH = 160;
|
|
55
55
|
var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
|
|
@@ -83,7 +83,8 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
|
|
|
83
83
|
crop = _this$props.crop,
|
|
84
84
|
stretch = _this$props.stretch,
|
|
85
85
|
dataURI = _this$props.dataURI,
|
|
86
|
-
|
|
86
|
+
_this$props$previewOr = _this$props.previewOrientation,
|
|
87
|
+
previewOrientation = _this$props$previewOr === void 0 ? 1 : _this$props$previewOr,
|
|
87
88
|
crossOrigin = _this$props.crossOrigin,
|
|
88
89
|
onImageError = _this$props.onImageError,
|
|
89
90
|
_this$props$alt = _this$props.alt,
|
|
@@ -124,7 +125,7 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
|
|
|
124
125
|
*/
|
|
125
126
|
|
|
126
127
|
var isFitStrategy = !crop;
|
|
127
|
-
var isImageRotated = isRotated(previewOrientation
|
|
128
|
+
var isImageRotated = previewOrientation !== 'from-image' && isRotated(previewOrientation);
|
|
128
129
|
/*
|
|
129
130
|
When photo has orientation of 90deg or 270deg (stored in EXIF meta data)
|
|
130
131
|
things get very tricky. Let me go through an two examples to explain how we deal with that:
|
|
@@ -377,7 +378,9 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
|
|
|
377
378
|
style.display = 'none';
|
|
378
379
|
}
|
|
379
380
|
|
|
380
|
-
if (previewOrientation
|
|
381
|
+
if (previewOrientation === 'from-image') {
|
|
382
|
+
style.imageOrientation = 'from-image';
|
|
383
|
+
} else if (previewOrientation > 1) {
|
|
381
384
|
var transform = getCssFromImageOrientation(previewOrientation);
|
|
382
385
|
style.transform += " ".concat(transform);
|
|
383
386
|
}
|
package/dist/esm/version.json
CHANGED
|
@@ -5,7 +5,7 @@ export interface MediaImageProps {
|
|
|
5
5
|
alt?: string;
|
|
6
6
|
crop?: boolean;
|
|
7
7
|
stretch?: boolean;
|
|
8
|
-
previewOrientation?: number;
|
|
8
|
+
previewOrientation?: number | 'from-image';
|
|
9
9
|
crossOrigin?: '' | 'anonymous' | 'use-credentials';
|
|
10
10
|
onImageLoad?: (loadedImage: HTMLImageElement) => void;
|
|
11
11
|
onImageError?: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-ui",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.3.0",
|
|
4
4
|
"description": "Includes common components and utilities used by other media packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/icon": "^21.11.0",
|
|
46
46
|
"@atlaskit/icon-file-type": "^6.3.0",
|
|
47
47
|
"@atlaskit/locale": "^2.3.0",
|
|
48
|
-
"@atlaskit/media-common": "^2.
|
|
48
|
+
"@atlaskit/media-common": "^2.19.0",
|
|
49
49
|
"@atlaskit/select": "^16.1.0",
|
|
50
50
|
"@atlaskit/spinner": "^15.3.0",
|
|
51
51
|
"@atlaskit/theme": "^12.2.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
71
|
+
"@atlaskit/analytics-listeners": "^8.5.0",
|
|
72
72
|
"@atlaskit/button": "^16.5.0",
|
|
73
73
|
"@atlaskit/checkbox": "^12.4.0",
|
|
74
74
|
"@atlaskit/docs": "*",
|
package/report.api.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
### Table of contents
|
|
9
9
|
|
|
10
10
|
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
11
12
|
|
|
12
13
|
### Main Entry Types
|
|
13
14
|
|
|
@@ -449,7 +450,7 @@ export interface MediaImageProps {
|
|
|
449
450
|
// (undocumented)
|
|
450
451
|
onImageLoad?: (loadedImage: HTMLImageElement) => void;
|
|
451
452
|
// (undocumented)
|
|
452
|
-
previewOrientation?: number;
|
|
453
|
+
previewOrientation?: 'from-image' | number;
|
|
453
454
|
// (undocumented)
|
|
454
455
|
stretch?: boolean;
|
|
455
456
|
}
|
|
@@ -884,3 +885,17 @@ export interface WithShowControlMethodProp {
|
|
|
884
885
|
```
|
|
885
886
|
|
|
886
887
|
<!--SECTION END: Main Entry Types-->
|
|
888
|
+
|
|
889
|
+
### Peer Dependencies
|
|
890
|
+
|
|
891
|
+
<!--SECTION START: Peer Dependencies-->
|
|
892
|
+
|
|
893
|
+
```json
|
|
894
|
+
{
|
|
895
|
+
"react": "^16.8.0",
|
|
896
|
+
"react-dom": "^16.8.0",
|
|
897
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
898
|
+
}
|
|
899
|
+
```
|
|
900
|
+
|
|
901
|
+
<!--SECTION END: Peer Dependencies-->
|