@atlaskit/media-viewer 48.0.12 → 48.0.14

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/media-viewer
2
2
 
3
+ ## 48.0.14
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
8
+
9
+ ## 48.0.13
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d6081fc0e01`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d6081fc0e01) - [ux] Bug Fix: Prevent scrolling to the top of the page after closing MediaViewer. In doing so, MediaViewer will no longer return the focus to its initial position onced MediaViewer is closed.
14
+
3
15
  ## 48.0.12
4
16
 
5
17
  ### Patch Changes
@@ -2113,21 +2125,21 @@ withAnalyticsEvents<Props>()(Button);
2113
2125
 
2114
2126
  ## 25.0.0
2115
2127
 
2116
- - [major][023cb45" d](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/023cb45"
2128
+ - [major][023cb45](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/023cb45"
2117
2129
  d):
2118
2130
 
2119
2131
  - Add i18n support to MediaViewer
2120
2132
 
2121
2133
  ## 24.1.11
2122
2134
 
2123
- - [patch][12afe80" d](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/12afe80"
2135
+ - [patch][12afe80](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/12afe80"
2124
2136
  d):
2125
2137
 
2126
2138
  - Move mocks directory structure to fix dist build issues
2127
2139
 
2128
2140
  ## 24.1.10
2129
2141
 
2130
- - [patch][4b84e8b" d](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/4b84e8b"
2142
+ - [patch][4b84e8b](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/4b84e8b"
2131
2143
  d):
2132
2144
 
2133
2145
  - Avoid unnecessary render cycle in ItemViewer
@@ -12,7 +12,7 @@ var componentName = 'mediaViewer';
12
12
  exports.component = exports.componentName = componentName;
13
13
  var packageName = "@atlaskit/media-viewer";
14
14
  exports.packageName = packageName;
15
- var packageVersion = "48.0.12";
15
+ var packageVersion = "48.0.14";
16
16
  exports.packageVersion = packageVersion;
17
17
  function getFileAttributes(fileState) {
18
18
  if (!fileState) {
@@ -12,7 +12,7 @@ var _mediaCommon = require("@atlaskit/media-common");
12
12
  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; }
13
13
  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; }
14
14
  var packageName = "@atlaskit/media-viewer";
15
- var packageVersion = "48.0.12";
15
+ var packageVersion = "48.0.14";
16
16
  var ufoExperience;
17
17
  var getExperience = function getExperience() {
18
18
  if (!ufoExperience) {
@@ -150,8 +150,7 @@ var MediaViewerWithRef = /*#__PURE__*/_react.default.forwardRef(function (props,
150
150
  });
151
151
  var MediaViewerWithScrollLock = function MediaViewerWithScrollLock(props) {
152
152
  return /*#__PURE__*/_react.default.createElement(_reactFocusLock.default, {
153
- autoFocus: true,
154
- returnFocus: true
153
+ autoFocus: true
155
154
  }, /*#__PURE__*/_react.default.createElement(_reactScrolllock.default, null), /*#__PURE__*/_react.default.createElement(MediaViewerWithRef, props));
156
155
  };
157
156
  var MediaViewer = (0, _mediaCommon.withMediaAnalyticsContext)({
@@ -51,7 +51,7 @@ var zoomLevelIndicatorStyles = (0, _react.css)(_templateObject9 || (_templateObj
51
51
  exports.zoomLevelIndicatorStyles = zoomLevelIndicatorStyles;
52
52
  var hdIconGroupWrapperStyles = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: 69px;\n bottom: ", ";\n"])), "var(--ds-space-200, 16px)");
53
53
  exports.hdIconGroupWrapperStyles = hdIconGroupWrapperStyles;
54
- var hdIconWrapperStyles = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n vertical-align: top;\n margin-left: calc(-1 * ", ");\n"])), "var(--ds-space-300, 24px)");
54
+ var hdIconWrapperStyles = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n vertical-align: top;\n margin-left: ", ";\n"])), "var(--ds-space-negative-300, -24px)");
55
55
  exports.hdIconWrapperStyles = hdIconWrapperStyles;
56
56
  var errorMessageWrapperStyles = (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n color: #c7d1db;\n p {\n line-height: 100%;\n }\n"])));
57
57
 
@@ -36,7 +36,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
36
36
  var pdfViewerClassName = 'pdfViewer';
37
37
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
38
38
  exports.pdfViewerClassName = pdfViewerClassName;
39
- var globalStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n margin-top: ", ";\n margin-bottom: ", ";\n .page {\n margin: 1px auto -8px auto;\n border: 9px solid transparent;\n position: relative;\n\n .canvasWrapper {\n overflow: hidden;\n }\n\n .textLayer {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n line-height: 1;\n font-family: sans-serif;\n opacity: 0.8;\n\n ::selection {\n background: rgb(0, 0, 255);\n }\n }\n\n .annotationLayer {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n .textLayer > div,\n .annotationLayer > section {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n }\n .linkAnnotation > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .linkAnnotation > a {\n background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')\n 0 0 repeat;\n }\n\n .linkAnnotation > a:hover {\n opacity: 0.2;\n background: #ff0;\n box-shadow: 0 2px 10px #ff0;\n }\n }\n }\n"])), pdfViewerClassName, "var(--ds-space-800, 64px)", "var(--ds-space-800, 64px)");
39
+ var globalStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n margin-top: ", ";\n margin-bottom: ", ";\n .page {\n margin: 1px auto ", " auto;\n border: 9px solid transparent;\n position: relative;\n\n .canvasWrapper {\n overflow: hidden;\n }\n\n .textLayer {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n line-height: 1;\n font-family: sans-serif;\n opacity: 0.8;\n\n ::selection {\n background: rgb(0, 0, 255);\n }\n }\n\n .annotationLayer {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n .textLayer > div,\n .annotationLayer > section {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n }\n .linkAnnotation > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .linkAnnotation > a {\n background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')\n 0 0 repeat;\n }\n\n .linkAnnotation > a:hover {\n opacity: 0.2;\n background: #ff0;\n box-shadow: 0 2px 10px #ff0;\n }\n }\n }\n"])), pdfViewerClassName, "var(--ds-space-800, 64px)", "var(--ds-space-800, 64px)", "var(--ds-space-negative-100, -8px)");
40
40
  /* eslint-enable no-unused-expressions */
41
41
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
42
42
 
@@ -1,7 +1,7 @@
1
1
  import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
2
2
  const componentName = 'mediaViewer';
3
3
  const packageName = "@atlaskit/media-viewer";
4
- const packageVersion = "48.0.12";
4
+ const packageVersion = "48.0.14";
5
5
  export { packageName, packageVersion, componentName, componentName as component };
6
6
  export function getFileAttributes(fileState) {
7
7
  if (!fileState) {
@@ -2,7 +2,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
2
2
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
3
3
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
4
4
  const packageName = "@atlaskit/media-viewer";
5
- const packageVersion = "48.0.12";
5
+ const packageVersion = "48.0.14";
6
6
  let ufoExperience;
7
7
  const getExperience = () => {
8
8
  if (!ufoExperience) {
@@ -129,8 +129,7 @@ const MediaViewerWithRef = /*#__PURE__*/React.forwardRef((props, ref) => {
129
129
  });
130
130
  const MediaViewerWithScrollLock = props => {
131
131
  return /*#__PURE__*/React.createElement(FocusLock, {
132
- autoFocus: true,
133
- returnFocus: true
132
+ autoFocus: true
134
133
  }, /*#__PURE__*/React.createElement(ScrollLock, null), /*#__PURE__*/React.createElement(MediaViewerWithRef, props));
135
134
  };
136
135
  export const MediaViewer = withMediaAnalyticsContext({
@@ -116,7 +116,7 @@ export const hdIconGroupWrapperStyles = css`
116
116
  export const hdIconWrapperStyles = css`
117
117
  display: inline-block;
118
118
  vertical-align: top;
119
- margin-left: calc(-1 * ${"var(--ds-space-300, 24px)"});
119
+ margin-left: ${"var(--ds-space-negative-300, -24px)"};
120
120
  `;
121
121
  export const errorMessageWrapperStyles = css`
122
122
  text-align: center;
@@ -18,7 +18,7 @@ const globalStyles = css`
18
18
  margin-top: ${"var(--ds-space-800, 64px)"};
19
19
  margin-bottom: ${"var(--ds-space-800, 64px)"};
20
20
  .page {
21
- margin: 1px auto -8px auto;
21
+ margin: 1px auto ${"var(--ds-space-negative-100, -8px)"} auto;
22
22
  border: 9px solid transparent;
23
23
  position: relative;
24
24
 
@@ -1,7 +1,7 @@
1
1
  import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
2
2
  var componentName = 'mediaViewer';
3
3
  var packageName = "@atlaskit/media-viewer";
4
- var packageVersion = "48.0.12";
4
+ var packageVersion = "48.0.14";
5
5
  export { packageName, packageVersion, componentName, componentName as component };
6
6
  export function getFileAttributes(fileState) {
7
7
  if (!fileState) {
@@ -5,7 +5,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
5
5
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
6
6
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
7
7
  var packageName = "@atlaskit/media-viewer";
8
- var packageVersion = "48.0.12";
8
+ var packageVersion = "48.0.14";
9
9
  var ufoExperience;
10
10
  var getExperience = function getExperience() {
11
11
  if (!ufoExperience) {
@@ -142,8 +142,7 @@ var MediaViewerWithRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
142
142
  });
143
143
  var MediaViewerWithScrollLock = function MediaViewerWithScrollLock(props) {
144
144
  return /*#__PURE__*/React.createElement(FocusLock, {
145
- autoFocus: true,
146
- returnFocus: true
145
+ autoFocus: true
147
146
  }, /*#__PURE__*/React.createElement(ScrollLock, null), /*#__PURE__*/React.createElement(MediaViewerWithRef, props));
148
147
  };
149
148
  export var MediaViewer = withMediaAnalyticsContext({
@@ -33,7 +33,7 @@ export var zoomLevelIndicatorStyles = css(_templateObject9 || (_templateObject9
33
33
 
34
34
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
35
35
  export var hdIconGroupWrapperStyles = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: absolute;\n right: 69px;\n bottom: ", ";\n"])), "var(--ds-space-200, 16px)");
36
- export var hdIconWrapperStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: top;\n margin-left: calc(-1 * ", ");\n"])), "var(--ds-space-300, 24px)");
36
+ export var hdIconWrapperStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: top;\n margin-left: ", ";\n"])), "var(--ds-space-negative-300, -24px)");
37
37
  export var errorMessageWrapperStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n text-align: center;\n color: #c7d1db;\n p {\n line-height: 100%;\n }\n"])));
38
38
 
39
39
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
@@ -25,7 +25,7 @@ import { ZoomLevel } from '../../domain/zoomLevel';
25
25
  import { processError } from './processError';
26
26
  export var pdfViewerClassName = 'pdfViewer';
27
27
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
28
- var globalStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n margin-top: ", ";\n margin-bottom: ", ";\n .page {\n margin: 1px auto -8px auto;\n border: 9px solid transparent;\n position: relative;\n\n .canvasWrapper {\n overflow: hidden;\n }\n\n .textLayer {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n line-height: 1;\n font-family: sans-serif;\n opacity: 0.8;\n\n ::selection {\n background: rgb(0, 0, 255);\n }\n }\n\n .annotationLayer {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n .textLayer > div,\n .annotationLayer > section {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n }\n .linkAnnotation > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .linkAnnotation > a {\n background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')\n 0 0 repeat;\n }\n\n .linkAnnotation > a:hover {\n opacity: 0.2;\n background: #ff0;\n box-shadow: 0 2px 10px #ff0;\n }\n }\n }\n"])), pdfViewerClassName, "var(--ds-space-800, 64px)", "var(--ds-space-800, 64px)");
28
+ var globalStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n margin-top: ", ";\n margin-bottom: ", ";\n .page {\n margin: 1px auto ", " auto;\n border: 9px solid transparent;\n position: relative;\n\n .canvasWrapper {\n overflow: hidden;\n }\n\n .textLayer {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n line-height: 1;\n font-family: sans-serif;\n opacity: 0.8;\n\n ::selection {\n background: rgb(0, 0, 255);\n }\n }\n\n .annotationLayer {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n .textLayer > div,\n .annotationLayer > section {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n }\n .linkAnnotation > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .linkAnnotation > a {\n background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')\n 0 0 repeat;\n }\n\n .linkAnnotation > a:hover {\n opacity: 0.2;\n background: #ff0;\n box-shadow: 0 2px 10px #ff0;\n }\n }\n }\n"])), pdfViewerClassName, "var(--ds-space-800, 64px)", "var(--ds-space-800, 64px)", "var(--ds-space-negative-100, -8px)");
29
29
  /* eslint-enable no-unused-expressions */
30
30
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
31
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-viewer",
3
- "version": "48.0.12",
3
+ "version": "48.0.14",
4
4
  "description": "MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and extendable yet easy-to-integrate",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@atlaskit/analytics-next": "^9.1.0",
39
- "@atlaskit/button": "^16.9.0",
39
+ "@atlaskit/button": "^16.10.0",
40
40
  "@atlaskit/code": "^14.6.0",
41
41
  "@atlaskit/icon": "^21.12.0",
42
42
  "@atlaskit/icon-file-type": "^6.4.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/side-navigation": "^2.0.0",
47
47
  "@atlaskit/spinner": "^15.5.0",
48
48
  "@atlaskit/theme": "^12.6.0",
49
- "@atlaskit/tokens": "^1.20.0",
49
+ "@atlaskit/tokens": "^1.21.0",
50
50
  "@atlaskit/ufo": "^0.2.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@kenjiuno/msgreader": "^1.2.6",
@@ -66,7 +66,7 @@
66
66
  "react-intl-next": "npm:react-intl@^5.18.1"
67
67
  },
68
68
  "devDependencies": {
69
- "@atlaskit/button": "^16.9.0",
69
+ "@atlaskit/button": "^16.10.0",
70
70
  "@atlaskit/media-core": "^34.1.0",
71
71
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
72
72
  "@atlaskit/media-test-helpers": "^33.0.0",