@atlaskit/media-avatar-picker 28.2.0 → 28.3.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 (77) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/avatar-list/index.js +4 -4
  3. package/dist/cjs/avatar-picker-dialog/SRLiveTitle.js +2 -2
  4. package/dist/cjs/avatar-picker-dialog/SubmitErrorDialog.js +3 -3
  5. package/dist/cjs/avatar-picker-dialog/custom-spinner.js +2 -2
  6. package/dist/cjs/avatar-picker-dialog/index.js +15 -13
  7. package/dist/cjs/avatar-picker-dialog/layout-const.js +2 -2
  8. package/dist/cjs/image-cropper/crop-to-data-uri.js +2 -2
  9. package/dist/cjs/image-cropper/index.js +11 -10
  10. package/dist/cjs/image-navigator/dragZone.js +1 -1
  11. package/dist/cjs/image-navigator/index.js +20 -14
  12. package/dist/cjs/image-navigator/slider.js +5 -5
  13. package/dist/cjs/image-placer/constraints.js +6 -5
  14. package/dist/cjs/image-placer/container.js +5 -5
  15. package/dist/cjs/image-placer/containerWrapper.js +1 -1
  16. package/dist/cjs/image-placer/imagePlacerErrorWrapper.js +1 -1
  17. package/dist/cjs/image-placer/imageProcessor.js +6 -4
  18. package/dist/cjs/image-placer/imageWrapper.js +3 -3
  19. package/dist/cjs/image-placer/index.js +20 -15
  20. package/dist/cjs/image-placer/margin.js +1 -1
  21. package/dist/cjs/predefined-avatar-list/index.js +3 -3
  22. package/dist/cjs/predefined-avatar-view/index.js +5 -5
  23. package/dist/cjs/viewport/viewport.js +20 -18
  24. package/dist/es2019/avatar-list/index.js +2 -2
  25. package/dist/es2019/avatar-picker-dialog/SRLiveTitle.js +1 -1
  26. package/dist/es2019/avatar-picker-dialog/SubmitErrorDialog.js +2 -2
  27. package/dist/es2019/avatar-picker-dialog/custom-spinner.js +1 -1
  28. package/dist/es2019/avatar-picker-dialog/index.js +4 -2
  29. package/dist/es2019/avatar-picker-dialog/layout-const.js +1 -1
  30. package/dist/es2019/image-cropper/crop-to-data-uri.js +1 -1
  31. package/dist/es2019/image-cropper/index.js +3 -2
  32. package/dist/es2019/image-navigator/dragZone.js +1 -1
  33. package/dist/es2019/image-navigator/index.js +8 -2
  34. package/dist/es2019/image-navigator/slider.js +2 -2
  35. package/dist/es2019/image-placer/constraints.js +2 -1
  36. package/dist/es2019/image-placer/container.js +1 -1
  37. package/dist/es2019/image-placer/containerWrapper.js +1 -1
  38. package/dist/es2019/image-placer/imagePlacerErrorWrapper.js +1 -1
  39. package/dist/es2019/image-placer/imageProcessor.js +3 -1
  40. package/dist/es2019/image-placer/imageWrapper.js +2 -2
  41. package/dist/es2019/image-placer/index.js +7 -2
  42. package/dist/es2019/image-placer/margin.js +1 -1
  43. package/dist/es2019/predefined-avatar-list/index.js +2 -2
  44. package/dist/es2019/predefined-avatar-view/index.js +2 -2
  45. package/dist/es2019/viewport/viewport.js +3 -1
  46. package/dist/esm/avatar-list/index.js +2 -2
  47. package/dist/esm/avatar-picker-dialog/SRLiveTitle.js +1 -1
  48. package/dist/esm/avatar-picker-dialog/SubmitErrorDialog.js +2 -2
  49. package/dist/esm/avatar-picker-dialog/custom-spinner.js +1 -1
  50. package/dist/esm/avatar-picker-dialog/index.js +4 -2
  51. package/dist/esm/avatar-picker-dialog/layout-const.js +1 -1
  52. package/dist/esm/image-cropper/crop-to-data-uri.js +1 -1
  53. package/dist/esm/image-cropper/index.js +3 -2
  54. package/dist/esm/image-navigator/dragZone.js +1 -1
  55. package/dist/esm/image-navigator/index.js +8 -2
  56. package/dist/esm/image-navigator/slider.js +2 -2
  57. package/dist/esm/image-placer/constraints.js +2 -1
  58. package/dist/esm/image-placer/container.js +1 -1
  59. package/dist/esm/image-placer/containerWrapper.js +1 -1
  60. package/dist/esm/image-placer/imagePlacerErrorWrapper.js +1 -1
  61. package/dist/esm/image-placer/imageProcessor.js +3 -1
  62. package/dist/esm/image-placer/imageWrapper.js +2 -2
  63. package/dist/esm/image-placer/index.js +7 -2
  64. package/dist/esm/image-placer/margin.js +1 -1
  65. package/dist/esm/predefined-avatar-list/index.js +2 -2
  66. package/dist/esm/predefined-avatar-view/index.js +2 -2
  67. package/dist/esm/viewport/viewport.js +3 -1
  68. package/dist/types/avatar-picker-dialog/layout-const.d.ts +1 -1
  69. package/dist/types/image-navigator/index.d.ts +1 -1
  70. package/dist/types/image-placer/constraints.d.ts +3 -1
  71. package/dist/types/image-placer/container.d.ts +1 -1
  72. package/dist/types/image-placer/imageProcessor.d.ts +3 -1
  73. package/dist/types/image-placer/index.d.ts +4 -1
  74. package/dist/types/viewport/viewport.d.ts +3 -1
  75. package/example-helpers/viewport-debug.ts +1 -1
  76. package/package.json +20 -31
  77. package/report.api.md +0 -144
@@ -1,11 +1,11 @@
1
- /* SubmitErrorDialog.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* SubmitErrorDialog.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./SubmitErrorDialog.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useRef, useEffect } from 'react';
6
6
  import ErrorIcon from '@atlaskit/icon/core/status-error';
7
7
  import Flag from '@atlaskit/flag/flag';
8
- import { messages } from '@atlaskit/media-ui';
8
+ import { messages } from '@atlaskit/media-ui/messages';
9
9
  import { useIntl } from 'react-intl';
10
10
  var avatarPickerErrorStyles = null;
11
11
  export var SubmitErrorDialog = function SubmitErrorDialog() {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ModalSpinner } from '@atlaskit/media-ui';
2
+ import ModalSpinner from '@atlaskit/media-ui/modalSpinner';
3
3
  export var CustomSpinner = function CustomSpinner() {
4
4
  return /*#__PURE__*/React.createElement(ModalSpinner, {
5
5
  blankedColor: "var(--ds-blanket, #050C1F75)",
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
@@ -23,7 +23,9 @@ import Button from '@atlaskit/button/standard-button';
23
23
  import { FormattedMessage, IntlProvider, injectIntl } from 'react-intl';
24
24
  import Field from '@atlaskit/form/field';
25
25
  import { HelperMessage } from '@atlaskit/form/helper-message';
26
- import { fileToDataURI, dataURItoFile, messages } from '@atlaskit/media-ui';
26
+ import { fileToDataURI } from '@atlaskit/media-ui/fileToDataURI';
27
+ import { dataURItoFile } from '@atlaskit/media-ui/dataURItoFile';
28
+ import { messages } from '@atlaskit/media-ui/messages';
27
29
  import { Box } from '@atlaskit/primitives/compiled';
28
30
  import Textfield from '@atlaskit/textfield/text-field';
29
31
  import ImageNavigator from '../image-navigator';
@@ -1,4 +1,4 @@
1
- import { Rectangle } from '@atlaskit/media-ui';
1
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
2
2
  export var DEFAULT_VISIBLE_PREDEFINED_AVATARS = 5;
3
3
  export var AVATAR_DIALOG_WIDTH = 375;
4
4
  export var AVATAR_DIALOG_HEIGHT = 470;
@@ -1,4 +1,4 @@
1
- import { isRotated } from '@atlaskit/media-ui';
1
+ import { isRotated } from '@atlaskit/media-ui/imageMetaData/isRotated';
2
2
  import { getCanvas } from '../util';
3
3
  var CONTAINER_PADDING = 28;
4
4
  export var cropToDataURI = function cropToDataURI(imageElement, imageRect, cropRect, scale, imageOrientation) {
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -16,7 +16,8 @@ import React from 'react';
16
16
  import { Component } from 'react';
17
17
  import CrossIcon from '@atlaskit/icon/core/cross';
18
18
  import { injectIntl } from 'react-intl';
19
- import { messages, MediaImage } from '@atlaskit/media-ui';
19
+ import { messages } from '@atlaskit/media-ui/messages';
20
+ import { MediaImage } from '@atlaskit/media-ui/mediaImage';
20
21
  import { isImageRemote } from './isImageRemote';
21
22
  import IconButton from '@atlaskit/button/icon/button';
22
23
  import { Box } from '@atlaskit/primitives/compiled';
@@ -1,4 +1,4 @@
1
- /* dragZone.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* dragZone.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["showBorder", "isDroppingFile", "children"];
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
@@ -18,7 +18,13 @@ import { FormattedMessage, injectIntl } from 'react-intl';
18
18
  import Button from '@atlaskit/button/standard-button';
19
19
  import ImageCropper from '../image-cropper';
20
20
  import Spinner from '@atlaskit/spinner/spinner';
21
- import { fileToDataURI, dataURItoFile, getOrientation, isRotated, Ellipsify, Vector2, messages } from '@atlaskit/media-ui';
21
+ import { fileToDataURI } from '@atlaskit/media-ui/fileToDataURI';
22
+ import { dataURItoFile } from '@atlaskit/media-ui/dataURItoFile';
23
+ import { getOrientation } from '@atlaskit/media-ui/imageMetaData/getOrientation';
24
+ import { isRotated } from '@atlaskit/media-ui/imageMetaData/isRotated';
25
+ import { Ellipsify } from '@atlaskit/media-ui/ellipsify/ellipsify';
26
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
27
+ import { messages } from '@atlaskit/media-ui/messages';
22
28
  import * as exenv from 'exenv';
23
29
  import { uploadPlaceholder, errorIcon } from './images';
24
30
  import { fileSizeMb } from '../util';
@@ -1,4 +1,4 @@
1
- /* slider.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* slider.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
@@ -12,7 +12,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  import { Component } from 'react';
14
14
  import FieldRange from '@atlaskit/range/range';
15
- import { messages } from '@atlaskit/media-ui';
15
+ import { messages } from '@atlaskit/media-ui/messages';
16
16
  import ScaleLargeIcon from '@atlaskit/icon/core/image';
17
17
  import ScaleSmallIcon from '@atlaskit/icon/core/image';
18
18
  import Button from '@atlaskit/button/standard-button';
@@ -1,4 +1,5 @@
1
- import { Rectangle, Vector2 } from '@atlaskit/media-ui';
1
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
2
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
2
3
  export function zoomToFit(imageWidth, imageHeight, visibleBounds) {
3
4
  var itemRect = new Rectangle(imageWidth, imageHeight);
4
5
  var scaleFactor = itemRect.scaleToFitSmallestSide(visibleBounds);
@@ -11,7 +11,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
11
11
  * This way, you can still move the image without clicking directly on it.
12
12
  */
13
13
  import React from 'react';
14
- import { Vector2 } from '@atlaskit/media-ui';
14
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
15
15
  import { ContainerWrapper } from './containerWrapper';
16
16
  export var ImagePlacerContainer = /*#__PURE__*/function (_React$Component) {
17
17
  function ImagePlacerContainer() {
@@ -1,4 +1,4 @@
1
- /* containerWrapper.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* containerWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["width", "height", "margin", "children"];
@@ -1,4 +1,4 @@
1
- /* imagePlacerErrorWrapper.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* imagePlacerErrorWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./imagePlacerErrorWrapper.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,6 +1,8 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- import { Rectangle, loadImage, getOrientation } from '@atlaskit/media-ui';
3
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
4
+ import { loadImage } from '@atlaskit/media-ui/loadImage';
5
+ import { getOrientation } from '@atlaskit/media-ui/imageMetaData/getOrientation';
4
6
  import { getCanvas } from '../util';
5
7
  export function radians(deg) {
6
8
  return deg * (Math.PI / 180);
@@ -1,4 +1,4 @@
1
- /* imageWrapper.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* imageWrapper.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["x", "y", "width", "height", "transform"];
@@ -6,7 +6,7 @@ import "./imageWrapper.compiled.css";
6
6
  import * as React from 'react';
7
7
  import { ax, ix } from "@compiled/react/runtime";
8
8
  import { useIntl } from 'react-intl';
9
- import { messages } from '@atlaskit/media-ui';
9
+ import { messages } from '@atlaskit/media-ui/messages';
10
10
  var imageWrapperStyles = null;
11
11
  export var ImageWrapper = function ImageWrapper(_ref) {
12
12
  var x = _ref.x,
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -12,7 +12,12 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
12
12
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
13
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
14
  import React from 'react';
15
- import { Rectangle, Vector2, Bounds, dataURItoFile, getFileInfo, getFileInfoFromSrc } from '@atlaskit/media-ui';
15
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
16
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
17
+ import { Bounds } from '@atlaskit/media-ui/bounds';
18
+ import { dataURItoFile } from '@atlaskit/media-ui/dataURItoFile';
19
+ import { getFileInfo } from '@atlaskit/media-ui/getFileInfo';
20
+ import { getFileInfoFromSrc } from '@atlaskit/media-ui/getFileInfoFromSrc';
16
21
  import { ImagePlacerContainer } from './container';
17
22
  import { ImagePlacerImage } from './image';
18
23
  import { Margin } from './margin';
@@ -1,4 +1,4 @@
1
- /* margin.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* margin.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -6,7 +6,7 @@ import { AvatarList } from '../avatar-list';
6
6
  import EditorMoreIcon from '@atlaskit/icon/core/show-more-horizontal';
7
7
  import Button from '@atlaskit/button/standard-button';
8
8
  import { useIntl } from 'react-intl';
9
- import { messages } from '@atlaskit/media-ui';
9
+ import { messages } from '@atlaskit/media-ui/messages';
10
10
  import { forwardRef } from 'react';
11
11
  var predefinedAvatarsWrapperStyles = null;
12
12
  var showMoreButtonStyles = null;
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.1 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./index.compiled.css";
@@ -7,7 +7,7 @@ import { ax, ix } from "@compiled/react/runtime";
7
7
  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; }
8
8
  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; }
9
9
  import { FormattedMessage, useIntl } from 'react-intl';
10
- import { messages } from '@atlaskit/media-ui';
10
+ import { messages } from '@atlaskit/media-ui/messages';
11
11
  import ArrowLeftIcon from '@atlaskit/icon/core/arrow-left';
12
12
  import Button from '@atlaskit/button/standard-button';
13
13
  import { forwardRef, useState } from 'react';
@@ -1,7 +1,9 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
- import { Rectangle, Bounds, Vector2 } from '@atlaskit/media-ui';
4
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
5
+ import { Bounds } from '@atlaskit/media-ui/bounds';
6
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
5
7
 
6
8
  /**
7
9
  * maximum amount to allow scaling up from "100%"
@@ -1,4 +1,4 @@
1
- import { Rectangle } from '@atlaskit/media-ui';
1
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
2
2
  export declare const DEFAULT_VISIBLE_PREDEFINED_AVATARS = 5;
3
3
  export declare const AVATAR_DIALOG_WIDTH = 375;
4
4
  export declare const AVATAR_DIALOG_HEIGHT = 470;
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
  import { Component } from 'react';
7
7
  import { type WrappedComponentProps } from 'react-intl';
8
- import { Vector2 } from '@atlaskit/media-ui';
8
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
9
9
  import { Viewport } from '../viewport';
10
10
  export declare const AVATAR_DIALOG_WIDTH = 375;
11
11
  export interface LoadParameters {
@@ -1,4 +1,6 @@
1
- import { Rectangle, type Bounds, Vector2 } from '@atlaskit/media-ui';
1
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
2
+ import type { Bounds } from '@atlaskit/media-ui/bounds';
3
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
2
4
  export declare function zoomToFit(imageWidth: number, imageHeight: number, visibleBounds: Bounds): Rectangle;
3
5
  export declare function applyConstraints(useConstraints: boolean, imageBounds: Bounds, visibleBounds: Bounds): Vector2;
4
6
  export declare function applyFullConstraints(imageBounds: Bounds, visibleBounds: Bounds): Vector2;
@@ -3,7 +3,7 @@
3
3
  * This way, you can still move the image without clicking directly on it.
4
4
  */
5
5
  import React from 'react';
6
- import { Vector2 } from '@atlaskit/media-ui';
6
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
7
7
  export interface ImagePlacerContainerProps {
8
8
  children?: React.ReactNode;
9
9
  width: number;
@@ -1,4 +1,6 @@
1
- import { Rectangle, type Bounds, type FileInfo } from '@atlaskit/media-ui';
1
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
2
+ import type { Bounds } from '@atlaskit/media-ui/bounds';
3
+ import type { FileInfo } from '@atlaskit/media-ui/imageMetaData/types';
2
4
  export declare function radians(deg: number): number;
3
5
  export interface ViewInfo {
4
6
  containerRect: Rectangle;
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
- import { Rectangle, Vector2, Bounds, type FileInfo } from '@atlaskit/media-ui';
2
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
3
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
4
+ import { Bounds } from '@atlaskit/media-ui/bounds';
5
+ import type { FileInfo } from '@atlaskit/media-ui/imageMetaData/types';
3
6
  export interface ImageActions {
4
7
  toCanvas: () => HTMLCanvasElement;
5
8
  toDataURL: () => string;
@@ -1,4 +1,6 @@
1
- import { Rectangle, Bounds, Vector2 } from '@atlaskit/media-ui';
1
+ import { Rectangle } from '@atlaskit/media-ui/rectangle';
2
+ import { Bounds } from '@atlaskit/media-ui/bounds';
3
+ import { Vector2 } from '@atlaskit/media-ui/vector2';
2
4
  /**
3
5
  * maximum amount to allow scaling up from "100%"
4
6
  * - when the image is smaller than the view size, "100%" is the view size
@@ -1,4 +1,4 @@
1
- import { Bounds } from '@atlaskit/media-ui';
1
+ import { Bounds } from '@atlaskit/media-ui/bounds';
2
2
  import { type Viewport } from '../src/viewport/viewport';
3
3
  import { renderViewport } from '../src/viewport/viewport-render';
4
4
  import { viewport as instance } from '../src/image-navigator';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-avatar-picker",
3
- "version": "28.2.0",
3
+ "version": "28.3.1",
4
4
  "description": "A component to select, drag and resize image avatars. It also provides a default list of predefined avatars.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,21 +30,21 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@atlaskit/button": "^25.2.0",
34
- "@atlaskit/css": "^1.0.0",
35
- "@atlaskit/flag": "^18.4.0",
36
- "@atlaskit/form": "^17.1.0",
37
- "@atlaskit/icon": "^37.5.0",
38
- "@atlaskit/media-ui": "^30.12.0",
39
- "@atlaskit/modal-dialog": "^16.5.0",
40
- "@atlaskit/platform-feature-flags": "^2.1.0",
41
- "@atlaskit/primitives": "^22.4.0",
42
- "@atlaskit/range": "^12.1.0",
33
+ "@atlaskit/button": "^25.3.0",
34
+ "@atlaskit/css": "^1.1.0",
35
+ "@atlaskit/flag": "^18.5.0",
36
+ "@atlaskit/form": "^17.2.0",
37
+ "@atlaskit/icon": "^37.7.0",
38
+ "@atlaskit/media-ui": "^30.16.0",
39
+ "@atlaskit/modal-dialog": "^16.6.0",
40
+ "@atlaskit/platform-feature-flags": "^2.2.0",
41
+ "@atlaskit/primitives": "^22.5.0",
42
+ "@atlaskit/range": "^12.2.0",
43
43
  "@atlaskit/react-compiler-gating": "^0.2.0",
44
- "@atlaskit/spinner": "^20.3.0",
45
- "@atlaskit/textfield": "^10.1.0",
46
- "@atlaskit/tokens": "^16.8.0",
47
- "@atlaskit/visually-hidden": "^4.3.0",
44
+ "@atlaskit/spinner": "^20.4.0",
45
+ "@atlaskit/textfield": "^10.2.0",
46
+ "@atlaskit/tokens": "^17.0.0",
47
+ "@atlaskit/visually-hidden": "^4.4.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@compiled/react": "^1.0.2",
50
50
  "exenv": "^1.2.2",
@@ -56,11 +56,11 @@
56
56
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@atlaskit/media-core": "^38.0.0",
60
- "@atlaskit/media-test-helpers": "^42.3.0",
61
- "@atlaskit/page": "^15.2.0",
62
- "@atlassian/a11y-jest-testing": "^0.16.0",
63
- "@atlassian/feature-flags-test-utils": "^1.2.0",
59
+ "@atlaskit/media-core": "^38.2.0",
60
+ "@atlaskit/media-test-helpers": "^42.4.0",
61
+ "@atlaskit/page": "^15.3.0",
62
+ "@atlassian/a11y-jest-testing": "^0.17.0",
63
+ "@atlassian/feature-flags-test-utils": "^1.3.0",
64
64
  "@atlassian/testing-library": "^0.11.0",
65
65
  "@testing-library/react": "^16.3.0",
66
66
  "@testing-library/user-event": "^14.4.3",
@@ -73,16 +73,5 @@
73
73
  "platform_media_a11y_avatar_radio_label": {
74
74
  "type": "boolean"
75
75
  }
76
- },
77
- "techstack": {
78
- "@repo/internal": {
79
- "design-tokens": [
80
- "color",
81
- "spacing"
82
- ],
83
- "styling": [
84
- "compiled"
85
- ]
86
- }
87
76
  }
88
77
  }
package/report.api.md DELETED
@@ -1,144 +0,0 @@
1
- <!-- API Report Version: 2.3 -->
2
-
3
- ## API Report File for "@atlaskit/media-avatar-picker"
4
-
5
- > Do not edit this file. This report is auto-generated using
6
- > [API Extractor](https://api-extractor.com/).
7
- > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
8
-
9
- ### Table of contents
10
-
11
- - [Main Entry Types](#main-entry-types)
12
- - [Peer Dependencies](#peer-dependencies)
13
-
14
- ### Main Entry Types
15
-
16
- <!--SECTION START: Main Entry Types-->
17
-
18
- ```ts
19
- import { default as React_2 } from 'react';
20
- import { ReactNode } from 'react';
21
-
22
- // @public (undocumented)
23
- export type AsyncAvatarPickerDialogProps = AvatarPickerDialogProps & {
24
- placeholder?: ReactNode;
25
- };
26
-
27
- // @public (undocumented)
28
- interface AsyncAvatarPickerDialogState {
29
- // (undocumented)
30
- AvatarPickerDialog?: typeof _default;
31
- }
32
-
33
- // @public (undocumented)
34
- export interface Avatar {
35
- // (undocumented)
36
- dataURI: string;
37
- // (undocumented)
38
- name?: string;
39
- }
40
-
41
- // @public (undocumented)
42
- export class AvatarPickerDialog extends React_2.PureComponent<
43
- AsyncAvatarPickerDialogProps,
44
- AsyncAvatarPickerDialogState
45
- > {
46
- // (undocumented)
47
- static AvatarPickerDialog?: typeof _default;
48
- // (undocumented)
49
- static displayName: string;
50
- // (undocumented)
51
- render(): {};
52
- // (undocumented)
53
- state: {
54
- AvatarPickerDialog: React_2.FC<AvatarPickerDialogProps> | undefined;
55
- };
56
- // (undocumented)
57
- UNSAFE_componentWillMount(): Promise<void>;
58
- }
59
-
60
- // @public (undocumented)
61
- interface AvatarPickerDialogProps {
62
- avatars: Array<Avatar>;
63
- defaultSelectedAvatar?: Avatar;
64
- errorMessage?: string;
65
- imageSource?: string;
66
- isLoading?: boolean;
67
- maxImageSize?: number;
68
- onAvatarPicked: (avatar: Avatar) => void;
69
- onCancel: () => void;
70
- onImagePicked?: (file: File, crop: CropProperties) => void;
71
- onImagePickedDataURI?: (dataUri: string) => void;
72
- outputSize?: number;
73
- predefinedAvatarsText?: string;
74
- primaryButtonText?: string;
75
- title?: string;
76
- }
77
-
78
- // @public (undocumented)
79
- interface CropProperties {
80
- // (undocumented)
81
- size: number;
82
- // (undocumented)
83
- x: number;
84
- // (undocumented)
85
- y: number;
86
- }
87
-
88
- // @public (undocumented)
89
- const _default: React_2.FC<AvatarPickerDialogProps>;
90
-
91
- // @public (undocumented)
92
- export const ImageNavigator: React_2.FC<ImageNavigatorProps>;
93
-
94
- // @public (undocumented)
95
- export interface ImageNavigatorProps {
96
- // (undocumented)
97
- errorMessage?: string;
98
- // (undocumented)
99
- imageSource?: string;
100
- // (undocumented)
101
- isLoading?: boolean;
102
- // (undocumented)
103
- maxImageSize?: number;
104
- // (undocumented)
105
- onCropChanged?: (x: number, y: number, size: number) => void;
106
- // (undocumented)
107
- onImageError: (errorMessage: string) => void;
108
- // (undocumented)
109
- onImageLoaded: (file: File) => void;
110
- // (undocumented)
111
- onImageUploaded: (file: File) => void;
112
- // (undocumented)
113
- onLoad?: OnLoadHandler;
114
- // (undocumented)
115
- onRemoveImage: () => void;
116
- }
117
-
118
- // @public (undocumented)
119
- export interface LoadParameters {
120
- // (undocumented)
121
- export: (outputSize?: number) => string;
122
- }
123
-
124
- // @public (undocumented)
125
- export type OnLoadHandler = (params: LoadParameters) => void;
126
-
127
- // (No @packageDocumentation comment for this package)
128
- ```
129
-
130
- <!--SECTION END: Main Entry Types-->
131
-
132
- ### Peer Dependencies
133
-
134
- <!--SECTION START: Peer Dependencies-->
135
-
136
- ```json
137
- {
138
- "@emotion/react": "^11.7.1",
139
- "react": "^16.8.0",
140
- "react-intl": "npm:react-intl@^5.18.1"
141
- }
142
- ```
143
-
144
- <!--SECTION END: Peer Dependencies-->