@atlaskit/editor-common 75.8.4 → 76.0.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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 76.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`151b0d45db4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/151b0d45db4) - Changed Resizer API. Removed handleComponent, innerPadding & handleMarginTop. Also renamed HandleHeightSizeType to HandleSize. The resizer should be opionated and control the handle component itself. innerPadding & handleMarginTop can also be controlled via the handleStyles override property.
8
+
9
+ ### Patch Changes
10
+
11
+ - [`6c7eda4573e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6c7eda4573e) - ADFEXP-526: create a patch changeset for editor-common to try make Confluence Pipeline green
12
+
3
13
  ## 75.8.4
4
14
 
5
15
  ### Patch Changes
@@ -7,7 +7,7 @@ exports.SIDEBAR_WIDTH = exports.SIDEBAR_HEADING_WRAPPER_HEIGHT = exports.SIDEBAR
7
7
  var _constants = require("@atlaskit/theme/constants");
8
8
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
9
9
 
10
- // TODO: Migrate away from gridSize
10
+ // TODO: Migrate away from deprecated gridSize
11
11
  // Recommendation: Replace gridSize with 8
12
12
  var GRID_SIZE = (0, _constants.gridSize)();
13
13
  exports.GRID_SIZE = GRID_SIZE;
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "75.8.4";
19
+ var packageVersion = "76.0.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -15,11 +15,12 @@ var _classnames2 = _interopRequireDefault(require("classnames"));
15
15
  var _reResizable = require("re-resizable");
16
16
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
17
17
  var _resizer = require("../styles/shared/resizer");
18
- var _excluded = ["width", "children", "handleClassName", "className", "handleResize", "handleResizeStart", "handleResizeStop", "handleHeightSize", "handleAlignmentMethod", "handlePositioning", "appearance", "handleStyles", "resizeRatio", "innerPadding", "snap", "snapGap", "handleMarginTop", "isHandleVisible", "handleComponent", "handleHighlight", "handleTooltipContent"];
18
+ var _excluded = ["width", "children", "handleClassName", "className", "handleResize", "handleResizeStart", "handleResizeStop", "handleSize", "handleAlignmentMethod", "handlePositioning", "appearance", "handleStyles", "resizeRatio", "snap", "snapGap", "isHandleVisible", "handleHighlight", "handleTooltipContent"];
19
19
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
21
  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; }
22
22
  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; }
23
+ var SUPPORTED_HANDLES = ['left', 'right'];
23
24
  function ResizerNext(props) {
24
25
  var _useState = (0, _react.useState)(false),
25
26
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -33,8 +34,8 @@ function ResizerNext(props) {
33
34
  handleResize = props.handleResize,
34
35
  handleResizeStart = props.handleResizeStart,
35
36
  handleResizeStop = props.handleResizeStop,
36
- _props$handleHeightSi = props.handleHeightSize,
37
- handleHeightSize = _props$handleHeightSi === void 0 ? 'medium' : _props$handleHeightSi,
37
+ _props$handleSize = props.handleSize,
38
+ handleSize = _props$handleSize === void 0 ? 'medium' : _props$handleSize,
38
39
  _props$handleAlignmen = props.handleAlignmentMethod,
39
40
  handleAlignmentMethod = _props$handleAlignmen === void 0 ? 'center' : _props$handleAlignmen,
40
41
  _props$handlePosition = props.handlePositioning,
@@ -43,24 +44,21 @@ function ResizerNext(props) {
43
44
  handleStyles = props.handleStyles,
44
45
  _props$resizeRatio = props.resizeRatio,
45
46
  resizeRatio = _props$resizeRatio === void 0 ? 1 : _props$resizeRatio,
46
- innerPadding = props.innerPadding,
47
47
  snap = props.snap,
48
48
  snapGap = props.snapGap,
49
- handleMarginTop = props.handleMarginTop,
50
49
  _props$isHandleVisibl = props.isHandleVisible,
51
50
  isHandleVisible = _props$isHandleVisibl === void 0 ? false : _props$isHandleVisibl,
52
- handleComponent = props.handleComponent,
53
51
  _props$handleHighligh = props.handleHighlight,
54
52
  handleHighlight = _props$handleHighligh === void 0 ? 'none' : _props$handleHighligh,
55
53
  handleTooltipContent = props.handleTooltipContent,
56
54
  otherProps = (0, _objectWithoutProperties2.default)(props, _excluded);
57
- var onResizeStart = _react.default.useCallback(function (event) {
55
+ var onResizeStart = (0, _react.useCallback)(function (event) {
58
56
  // prevent creating a drag event on Firefox
59
57
  event.preventDefault();
60
58
  setIsResizing(true);
61
59
  handleResizeStart();
62
60
  }, [handleResizeStart]);
63
- var onResize = _react.default.useCallback(function (_event, _direction, _elementRef, delta) {
61
+ var onResize = (0, _react.useCallback)(function (_event, _direction, _elementRef, delta) {
64
62
  var resizableCurrent = resizable.current;
65
63
  if (!resizableCurrent || !resizableCurrent.state.original) {
66
64
  return;
@@ -73,7 +71,7 @@ function ResizerNext(props) {
73
71
  };
74
72
  handleResize(originalState, delta);
75
73
  }, [handleResize]);
76
- var onResizeStop = _react.default.useCallback(function (_event, _direction, _elementRef, delta) {
74
+ var onResizeStop = (0, _react.useCallback)(function (_event, _direction, _elementRef, delta) {
77
75
  var resizableCurrent = resizable.current;
78
76
  if (!resizableCurrent || !resizableCurrent.state.original) {
79
77
  return;
@@ -88,81 +86,49 @@ function ResizerNext(props) {
88
86
  handleResizeStop(originalState, delta);
89
87
  }, [handleResizeStop]);
90
88
  var handles = {
91
- left: (0, _classnames2.default)(handleClassName !== null && handleClassName !== void 0 ? handleClassName : _resizer.resizerHandleClassName, 'left', handleHeightSize, handleAlignmentMethod),
92
- right: (0, _classnames2.default)(handleClassName !== null && handleClassName !== void 0 ? handleClassName : _resizer.resizerHandleClassName, 'right', handleHeightSize, handleAlignmentMethod)
89
+ left: (0, _classnames2.default)(handleClassName !== null && handleClassName !== void 0 ? handleClassName : _resizer.resizerHandleClassName, 'left', handleSize, handleAlignmentMethod),
90
+ right: (0, _classnames2.default)(handleClassName !== null && handleClassName !== void 0 ? handleClassName : _resizer.resizerHandleClassName, 'right', handleSize, handleAlignmentMethod)
93
91
  };
94
92
  var baseHandleStyles = {
95
93
  width: handlePositioning === 'adjacent' ? "var(--ds-space-100, 8px)" : "var(--ds-space-300, 24px)",
96
- // eslint-disable-next-line
97
- marginTop: Number.isFinite(handleMarginTop) ? "".concat(handleMarginTop, "px") : undefined,
98
94
  zIndex: _resizer.resizerHandleZIndex,
99
95
  pointerEvents: 'auto',
100
96
  alignItems: handlePositioning === 'adjacent' ? 'center' : undefined
101
97
  };
102
- var offset = Number.isFinite(innerPadding) ? "-".concat(innerPadding, "px") : handlePositioning === 'adjacent' ? "calc(".concat(baseHandleStyles.width, " * -1)") : "calc(".concat(baseHandleStyles.width, " * -0.5)");
103
- var nextHandleStyles = {
104
- left: _objectSpread(_objectSpread({}, baseHandleStyles), {}, {
105
- // eslint-disable-next-line
106
- left: offset
107
- }, handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.left),
108
- right: _objectSpread(_objectSpread({}, baseHandleStyles), {}, {
109
- // eslint-disable-next-line
110
- right: offset
111
- }, handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.right)
112
- };
98
+ var offset = handlePositioning === 'adjacent' ? "calc(".concat(baseHandleStyles.width, " * -1)") : "calc(".concat(baseHandleStyles.width, " * -0.5)");
99
+ var nextHandleStyles = SUPPORTED_HANDLES.reduce(function (result, position) {
100
+ return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position, _objectSpread(_objectSpread({}, baseHandleStyles), {}, (0, _defineProperty2.default)({}, position, offset), handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles[position])));
101
+ }, {});
113
102
  var resizerClassName = (0, _classnames2.default)(className, _resizer.resizerItemClassName, (0, _defineProperty2.default)({
114
103
  'is-resizing': isResizing,
115
104
  'display-handle': isHandleVisible
116
105
  }, _resizer.resizerDangerClassName, appearance === 'danger'));
117
- var finalHandleComponent = (0, _react.useMemo)(function () {
118
- if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent && !handleComponent) {
119
- return {
120
- left: /*#__PURE__*/_react.default.createElement("div", {
121
- className: _resizer.resizerHandleThumbClassName
122
- }),
123
- right: /*#__PURE__*/_react.default.createElement("div", {
124
- className: _resizer.resizerHandleThumbClassName
125
- })
126
- };
127
- }
128
-
129
- // If the handleComponent is set by the parent, then they're taking over control of the handle
130
- if (handleComponent) {
131
- return {
132
- left: handleComponent.left && /*#__PURE__*/_react.default.cloneElement(handleComponent.left, {
133
- className: _resizer.resizerHandleThumbClassName
134
- }),
135
- right: handleComponent.right && /*#__PURE__*/_react.default.cloneElement(handleComponent.right, {
136
- className: _resizer.resizerHandleThumbClassName
137
- })
138
- };
139
- }
140
- var children = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
141
- className: (0, _classnames2.default)(_resizer.resizerHandleTrackClassName, handleHighlight)
142
- }), /*#__PURE__*/_react.default.createElement("div", {
143
- className: _resizer.resizerHandleThumbClassName
144
- }));
145
- if (!!handleTooltipContent) {
146
- return {
147
- left: /*#__PURE__*/_react.default.createElement(_tooltip.default, {
106
+ var handleComponent = (0, _react.useMemo)(function () {
107
+ return SUPPORTED_HANDLES.reduce(function (result, position) {
108
+ var thumb = /*#__PURE__*/_react.default.createElement("div", {
109
+ className: _resizer.resizerHandleThumbClassName,
110
+ "data-testid": "resizer-handle-".concat(position, "-thumb"),
111
+ contentEditable: false
112
+ });
113
+ if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent) {
114
+ return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position, thumb));
115
+ }
116
+ var thumbWithTrack = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
117
+ className: (0, _classnames2.default)(_resizer.resizerHandleTrackClassName, handleHighlight),
118
+ "data-testid": "resizer-handle-".concat(position, "-track")
119
+ }), thumb);
120
+ if (!!handleTooltipContent) {
121
+ return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
148
122
  content: handleTooltipContent,
149
123
  hideTooltipOnClick: true,
150
124
  position: "mouse",
151
- mousePosition: "auto-start"
152
- }, children),
153
- right: /*#__PURE__*/_react.default.createElement(_tooltip.default, {
154
- content: handleTooltipContent,
155
- hideTooltipOnClick: true,
156
- position: "mouse",
157
- mousePosition: "auto-start"
158
- }, children)
159
- };
160
- }
161
- return {
162
- left: children,
163
- right: children
164
- };
165
- }, [handleHighlight, handleTooltipContent, handleComponent]);
125
+ mousePosition: "auto-start",
126
+ testId: "resizer-handle-".concat(position, "-tooltip")
127
+ }, thumbWithTrack)));
128
+ }
129
+ return _objectSpread(_objectSpread({}, result), {}, (0, _defineProperty2.default)({}, position, thumbWithTrack));
130
+ }, {});
131
+ }, [handleHighlight, handleTooltipContent]);
166
132
 
167
133
  // snapGap is usually a constant, if snap.x?.length is 0 and snapGap has a value resizer cannot be resized
168
134
  var snapGapActual = (0, _react.useMemo)(function () {
@@ -189,7 +155,7 @@ function ResizerNext(props) {
189
155
  resizeRatio: resizeRatio,
190
156
  snapGap: snapGapActual,
191
157
  snap: snap,
192
- handleComponent: finalHandleComponent
158
+ handleComponent: handleComponent
193
159
  }, otherProps), /*#__PURE__*/_react.default.createElement("span", {
194
160
  className: _resizer.resizerHoverZoneClassName
195
161
  }, children));
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
24
24
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
25
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "75.8.4";
27
+ var packageVersion = "76.0.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,6 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
2
2
  import { gridSize } from '@atlaskit/theme/constants';
3
- // TODO: Migrate away from gridSize
3
+ // TODO: Migrate away from deprecated gridSize
4
4
  // Recommendation: Replace gridSize with 8
5
5
  export const GRID_SIZE = gridSize();
6
6
  export const DEVICE_BREAKPOINT_NUMBERS = {
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "75.8.4";
3
+ const packageVersion = "76.0.0";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -1,9 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useMemo, useRef, useState } from 'react';
2
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
3
3
  import classnames from 'classnames';
4
4
  import { Resizable } from 're-resizable';
5
5
  import Tooltip from '@atlaskit/tooltip';
6
6
  import { handleWrapperClass, resizerDangerClassName, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
7
+ const SUPPORTED_HANDLES = ['left', 'right'];
7
8
  export default function ResizerNext(props) {
8
9
  const [isResizing, setIsResizing] = useState(false);
9
10
  const resizable = useRef(null);
@@ -15,29 +16,26 @@ export default function ResizerNext(props) {
15
16
  handleResize,
16
17
  handleResizeStart,
17
18
  handleResizeStop,
18
- handleHeightSize = 'medium',
19
+ handleSize = 'medium',
19
20
  handleAlignmentMethod = 'center',
20
21
  handlePositioning = 'overlap',
21
22
  appearance,
22
23
  handleStyles,
23
24
  resizeRatio = 1,
24
- innerPadding,
25
25
  snap,
26
26
  snapGap,
27
- handleMarginTop,
28
27
  isHandleVisible = false,
29
- handleComponent,
30
28
  handleHighlight = 'none',
31
29
  handleTooltipContent,
32
30
  ...otherProps
33
31
  } = props;
34
- const onResizeStart = React.useCallback(event => {
32
+ const onResizeStart = useCallback(event => {
35
33
  // prevent creating a drag event on Firefox
36
34
  event.preventDefault();
37
35
  setIsResizing(true);
38
36
  handleResizeStart();
39
37
  }, [handleResizeStart]);
40
- const onResize = React.useCallback((_event, _direction, _elementRef, delta) => {
38
+ const onResize = useCallback((_event, _direction, _elementRef, delta) => {
41
39
  const resizableCurrent = resizable.current;
42
40
  if (!resizableCurrent || !resizableCurrent.state.original) {
43
41
  return;
@@ -50,7 +48,7 @@ export default function ResizerNext(props) {
50
48
  };
51
49
  handleResize(originalState, delta);
52
50
  }, [handleResize]);
53
- const onResizeStop = React.useCallback((_event, _direction, _elementRef, delta) => {
51
+ const onResizeStop = useCallback((_event, _direction, _elementRef, delta) => {
54
52
  const resizableCurrent = resizable.current;
55
53
  if (!resizableCurrent || !resizableCurrent.state.original) {
56
54
  return;
@@ -65,86 +63,64 @@ export default function ResizerNext(props) {
65
63
  handleResizeStop(originalState, delta);
66
64
  }, [handleResizeStop]);
67
65
  const handles = {
68
- left: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'left', handleHeightSize, handleAlignmentMethod),
69
- right: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'right', handleHeightSize, handleAlignmentMethod)
66
+ left: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'left', handleSize, handleAlignmentMethod),
67
+ right: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'right', handleSize, handleAlignmentMethod)
70
68
  };
71
69
  const baseHandleStyles = {
72
70
  width: handlePositioning === 'adjacent' ? "var(--ds-space-100, 8px)" : "var(--ds-space-300, 24px)",
73
- // eslint-disable-next-line
74
- marginTop: Number.isFinite(handleMarginTop) ? `${handleMarginTop}px` : undefined,
75
71
  zIndex: resizerHandleZIndex,
76
72
  pointerEvents: 'auto',
77
73
  alignItems: handlePositioning === 'adjacent' ? 'center' : undefined
78
74
  };
79
- const offset = Number.isFinite(innerPadding) ? `-${innerPadding}px` : handlePositioning === 'adjacent' ? `calc(${baseHandleStyles.width} * -1)` : `calc(${baseHandleStyles.width} * -0.5)`;
80
- const nextHandleStyles = {
81
- left: {
75
+ const offset = handlePositioning === 'adjacent' ? `calc(${baseHandleStyles.width} * -1)` : `calc(${baseHandleStyles.width} * -0.5)`;
76
+ const nextHandleStyles = SUPPORTED_HANDLES.reduce((result, position) => ({
77
+ ...result,
78
+ [position]: {
82
79
  ...baseHandleStyles,
83
- // eslint-disable-next-line
84
- left: offset,
85
- ...(handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.left)
86
- },
87
- right: {
88
- ...baseHandleStyles,
89
- // eslint-disable-next-line
90
- right: offset,
91
- ...(handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.right)
80
+ [position]: offset,
81
+ ...(handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles[position])
92
82
  }
93
- };
83
+ }), {});
94
84
  const resizerClassName = classnames(className, resizerItemClassName, {
95
85
  'is-resizing': isResizing,
96
86
  'display-handle': isHandleVisible,
97
87
  [resizerDangerClassName]: appearance === 'danger'
98
88
  });
99
- const finalHandleComponent = useMemo(() => {
100
- if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent && !handleComponent) {
101
- return {
102
- left: /*#__PURE__*/React.createElement("div", {
103
- className: resizerHandleThumbClassName
104
- }),
105
- right: /*#__PURE__*/React.createElement("div", {
106
- className: resizerHandleThumbClassName
107
- })
108
- };
109
- }
110
-
111
- // If the handleComponent is set by the parent, then they're taking over control of the handle
112
- if (handleComponent) {
113
- return {
114
- left: handleComponent.left && /*#__PURE__*/React.cloneElement(handleComponent.left, {
115
- className: resizerHandleThumbClassName
116
- }),
117
- right: handleComponent.right && /*#__PURE__*/React.cloneElement(handleComponent.right, {
118
- className: resizerHandleThumbClassName
119
- })
120
- };
121
- }
122
- const children = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
123
- className: classnames(resizerHandleTrackClassName, handleHighlight)
124
- }), /*#__PURE__*/React.createElement("div", {
125
- className: resizerHandleThumbClassName
126
- }));
127
- if (!!handleTooltipContent) {
89
+ const handleComponent = useMemo(() => {
90
+ return SUPPORTED_HANDLES.reduce((result, position) => {
91
+ const thumb = /*#__PURE__*/React.createElement("div", {
92
+ className: resizerHandleThumbClassName,
93
+ "data-testid": `resizer-handle-${position}-thumb`,
94
+ contentEditable: false
95
+ });
96
+ if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent) {
97
+ return {
98
+ ...result,
99
+ [position]: thumb
100
+ };
101
+ }
102
+ const thumbWithTrack = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
103
+ className: classnames(resizerHandleTrackClassName, handleHighlight),
104
+ "data-testid": `resizer-handle-${position}-track`
105
+ }), thumb);
106
+ if (!!handleTooltipContent) {
107
+ return {
108
+ ...result,
109
+ [position]: /*#__PURE__*/React.createElement(Tooltip, {
110
+ content: handleTooltipContent,
111
+ hideTooltipOnClick: true,
112
+ position: "mouse",
113
+ mousePosition: "auto-start",
114
+ testId: `resizer-handle-${position}-tooltip`
115
+ }, thumbWithTrack)
116
+ };
117
+ }
128
118
  return {
129
- left: /*#__PURE__*/React.createElement(Tooltip, {
130
- content: handleTooltipContent,
131
- hideTooltipOnClick: true,
132
- position: "mouse",
133
- mousePosition: "auto-start"
134
- }, children),
135
- right: /*#__PURE__*/React.createElement(Tooltip, {
136
- content: handleTooltipContent,
137
- hideTooltipOnClick: true,
138
- position: "mouse",
139
- mousePosition: "auto-start"
140
- }, children)
119
+ ...result,
120
+ [position]: thumbWithTrack
141
121
  };
142
- }
143
- return {
144
- left: children,
145
- right: children
146
- };
147
- }, [handleHighlight, handleTooltipContent, handleComponent]);
122
+ }, {});
123
+ }, [handleHighlight, handleTooltipContent]);
148
124
 
149
125
  // snapGap is usually a constant, if snap.x?.length is 0 and snapGap has a value resizer cannot be resized
150
126
  const snapGapActual = useMemo(() => {
@@ -171,7 +147,7 @@ export default function ResizerNext(props) {
171
147
  resizeRatio: resizeRatio,
172
148
  snapGap: snapGapActual,
173
149
  snap: snap,
174
- handleComponent: finalHandleComponent
150
+ handleComponent: handleComponent
175
151
  }, otherProps), /*#__PURE__*/React.createElement("span", {
176
152
  className: resizerHoverZoneClassName
177
153
  }, children));
@@ -9,7 +9,7 @@ import { themed } from '@atlaskit/theme/components';
9
9
  import { borderRadius } from '@atlaskit/theme/constants';
10
10
  import Layer from '../Layer';
11
11
  const packageName = "@atlaskit/editor-common";
12
- const packageVersion = "75.8.4";
12
+ const packageVersion = "76.0.0";
13
13
  const halfFocusRing = 1;
14
14
  const dropOffset = '0, 8';
15
15
  class DropList extends Component {
@@ -1,6 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
2
2
  import { gridSize } from '@atlaskit/theme/constants';
3
- // TODO: Migrate away from gridSize
3
+ // TODO: Migrate away from deprecated gridSize
4
4
  // Recommendation: Replace gridSize with 8
5
5
  export var GRID_SIZE = gridSize();
6
6
  export var DEVICE_BREAKPOINT_NUMBERS = {
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "75.8.4";
9
+ var packageVersion = "76.0.0";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -2,14 +2,15 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
- var _excluded = ["width", "children", "handleClassName", "className", "handleResize", "handleResizeStart", "handleResizeStop", "handleHeightSize", "handleAlignmentMethod", "handlePositioning", "appearance", "handleStyles", "resizeRatio", "innerPadding", "snap", "snapGap", "handleMarginTop", "isHandleVisible", "handleComponent", "handleHighlight", "handleTooltipContent"];
5
+ var _excluded = ["width", "children", "handleClassName", "className", "handleResize", "handleResizeStart", "handleResizeStop", "handleSize", "handleAlignmentMethod", "handlePositioning", "appearance", "handleStyles", "resizeRatio", "snap", "snapGap", "isHandleVisible", "handleHighlight", "handleTooltipContent"];
6
6
  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; }
7
7
  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; }
8
- import React, { useMemo, useRef, useState } from 'react';
8
+ import React, { useCallback, useMemo, useRef, useState } from 'react';
9
9
  import classnames from 'classnames';
10
10
  import { Resizable } from 're-resizable';
11
11
  import Tooltip from '@atlaskit/tooltip';
12
12
  import { handleWrapperClass, resizerDangerClassName, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
13
+ var SUPPORTED_HANDLES = ['left', 'right'];
13
14
  export default function ResizerNext(props) {
14
15
  var _useState = useState(false),
15
16
  _useState2 = _slicedToArray(_useState, 2),
@@ -23,8 +24,8 @@ export default function ResizerNext(props) {
23
24
  handleResize = props.handleResize,
24
25
  handleResizeStart = props.handleResizeStart,
25
26
  handleResizeStop = props.handleResizeStop,
26
- _props$handleHeightSi = props.handleHeightSize,
27
- handleHeightSize = _props$handleHeightSi === void 0 ? 'medium' : _props$handleHeightSi,
27
+ _props$handleSize = props.handleSize,
28
+ handleSize = _props$handleSize === void 0 ? 'medium' : _props$handleSize,
28
29
  _props$handleAlignmen = props.handleAlignmentMethod,
29
30
  handleAlignmentMethod = _props$handleAlignmen === void 0 ? 'center' : _props$handleAlignmen,
30
31
  _props$handlePosition = props.handlePositioning,
@@ -33,24 +34,21 @@ export default function ResizerNext(props) {
33
34
  handleStyles = props.handleStyles,
34
35
  _props$resizeRatio = props.resizeRatio,
35
36
  resizeRatio = _props$resizeRatio === void 0 ? 1 : _props$resizeRatio,
36
- innerPadding = props.innerPadding,
37
37
  snap = props.snap,
38
38
  snapGap = props.snapGap,
39
- handleMarginTop = props.handleMarginTop,
40
39
  _props$isHandleVisibl = props.isHandleVisible,
41
40
  isHandleVisible = _props$isHandleVisibl === void 0 ? false : _props$isHandleVisibl,
42
- handleComponent = props.handleComponent,
43
41
  _props$handleHighligh = props.handleHighlight,
44
42
  handleHighlight = _props$handleHighligh === void 0 ? 'none' : _props$handleHighligh,
45
43
  handleTooltipContent = props.handleTooltipContent,
46
44
  otherProps = _objectWithoutProperties(props, _excluded);
47
- var onResizeStart = React.useCallback(function (event) {
45
+ var onResizeStart = useCallback(function (event) {
48
46
  // prevent creating a drag event on Firefox
49
47
  event.preventDefault();
50
48
  setIsResizing(true);
51
49
  handleResizeStart();
52
50
  }, [handleResizeStart]);
53
- var onResize = React.useCallback(function (_event, _direction, _elementRef, delta) {
51
+ var onResize = useCallback(function (_event, _direction, _elementRef, delta) {
54
52
  var resizableCurrent = resizable.current;
55
53
  if (!resizableCurrent || !resizableCurrent.state.original) {
56
54
  return;
@@ -63,7 +61,7 @@ export default function ResizerNext(props) {
63
61
  };
64
62
  handleResize(originalState, delta);
65
63
  }, [handleResize]);
66
- var onResizeStop = React.useCallback(function (_event, _direction, _elementRef, delta) {
64
+ var onResizeStop = useCallback(function (_event, _direction, _elementRef, delta) {
67
65
  var resizableCurrent = resizable.current;
68
66
  if (!resizableCurrent || !resizableCurrent.state.original) {
69
67
  return;
@@ -78,81 +76,49 @@ export default function ResizerNext(props) {
78
76
  handleResizeStop(originalState, delta);
79
77
  }, [handleResizeStop]);
80
78
  var handles = {
81
- left: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'left', handleHeightSize, handleAlignmentMethod),
82
- right: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'right', handleHeightSize, handleAlignmentMethod)
79
+ left: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'left', handleSize, handleAlignmentMethod),
80
+ right: classnames(handleClassName !== null && handleClassName !== void 0 ? handleClassName : resizerHandleClassName, 'right', handleSize, handleAlignmentMethod)
83
81
  };
84
82
  var baseHandleStyles = {
85
83
  width: handlePositioning === 'adjacent' ? "var(--ds-space-100, 8px)" : "var(--ds-space-300, 24px)",
86
- // eslint-disable-next-line
87
- marginTop: Number.isFinite(handleMarginTop) ? "".concat(handleMarginTop, "px") : undefined,
88
84
  zIndex: resizerHandleZIndex,
89
85
  pointerEvents: 'auto',
90
86
  alignItems: handlePositioning === 'adjacent' ? 'center' : undefined
91
87
  };
92
- var offset = Number.isFinite(innerPadding) ? "-".concat(innerPadding, "px") : handlePositioning === 'adjacent' ? "calc(".concat(baseHandleStyles.width, " * -1)") : "calc(".concat(baseHandleStyles.width, " * -0.5)");
93
- var nextHandleStyles = {
94
- left: _objectSpread(_objectSpread({}, baseHandleStyles), {}, {
95
- // eslint-disable-next-line
96
- left: offset
97
- }, handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.left),
98
- right: _objectSpread(_objectSpread({}, baseHandleStyles), {}, {
99
- // eslint-disable-next-line
100
- right: offset
101
- }, handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.right)
102
- };
88
+ var offset = handlePositioning === 'adjacent' ? "calc(".concat(baseHandleStyles.width, " * -1)") : "calc(".concat(baseHandleStyles.width, " * -0.5)");
89
+ var nextHandleStyles = SUPPORTED_HANDLES.reduce(function (result, position) {
90
+ return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, position, _objectSpread(_objectSpread({}, baseHandleStyles), {}, _defineProperty({}, position, offset), handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles[position])));
91
+ }, {});
103
92
  var resizerClassName = classnames(className, resizerItemClassName, _defineProperty({
104
93
  'is-resizing': isResizing,
105
94
  'display-handle': isHandleVisible
106
95
  }, resizerDangerClassName, appearance === 'danger'));
107
- var finalHandleComponent = useMemo(function () {
108
- if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent && !handleComponent) {
109
- return {
110
- left: /*#__PURE__*/React.createElement("div", {
111
- className: resizerHandleThumbClassName
112
- }),
113
- right: /*#__PURE__*/React.createElement("div", {
114
- className: resizerHandleThumbClassName
115
- })
116
- };
117
- }
118
-
119
- // If the handleComponent is set by the parent, then they're taking over control of the handle
120
- if (handleComponent) {
121
- return {
122
- left: handleComponent.left && /*#__PURE__*/React.cloneElement(handleComponent.left, {
123
- className: resizerHandleThumbClassName
124
- }),
125
- right: handleComponent.right && /*#__PURE__*/React.cloneElement(handleComponent.right, {
126
- className: resizerHandleThumbClassName
127
- })
128
- };
129
- }
130
- var children = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
131
- className: classnames(resizerHandleTrackClassName, handleHighlight)
132
- }), /*#__PURE__*/React.createElement("div", {
133
- className: resizerHandleThumbClassName
134
- }));
135
- if (!!handleTooltipContent) {
136
- return {
137
- left: /*#__PURE__*/React.createElement(Tooltip, {
96
+ var handleComponent = useMemo(function () {
97
+ return SUPPORTED_HANDLES.reduce(function (result, position) {
98
+ var thumb = /*#__PURE__*/React.createElement("div", {
99
+ className: resizerHandleThumbClassName,
100
+ "data-testid": "resizer-handle-".concat(position, "-thumb"),
101
+ contentEditable: false
102
+ });
103
+ if ((!handleHighlight || handleHighlight === 'none') && !handleTooltipContent) {
104
+ return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, position, thumb));
105
+ }
106
+ var thumbWithTrack = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
107
+ className: classnames(resizerHandleTrackClassName, handleHighlight),
108
+ "data-testid": "resizer-handle-".concat(position, "-track")
109
+ }), thumb);
110
+ if (!!handleTooltipContent) {
111
+ return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, position, /*#__PURE__*/React.createElement(Tooltip, {
138
112
  content: handleTooltipContent,
139
113
  hideTooltipOnClick: true,
140
114
  position: "mouse",
141
- mousePosition: "auto-start"
142
- }, children),
143
- right: /*#__PURE__*/React.createElement(Tooltip, {
144
- content: handleTooltipContent,
145
- hideTooltipOnClick: true,
146
- position: "mouse",
147
- mousePosition: "auto-start"
148
- }, children)
149
- };
150
- }
151
- return {
152
- left: children,
153
- right: children
154
- };
155
- }, [handleHighlight, handleTooltipContent, handleComponent]);
115
+ mousePosition: "auto-start",
116
+ testId: "resizer-handle-".concat(position, "-tooltip")
117
+ }, thumbWithTrack)));
118
+ }
119
+ return _objectSpread(_objectSpread({}, result), {}, _defineProperty({}, position, thumbWithTrack));
120
+ }, {});
121
+ }, [handleHighlight, handleTooltipContent]);
156
122
 
157
123
  // snapGap is usually a constant, if snap.x?.length is 0 and snapGap has a value resizer cannot be resized
158
124
  var snapGapActual = useMemo(function () {
@@ -179,7 +145,7 @@ export default function ResizerNext(props) {
179
145
  resizeRatio: resizeRatio,
180
146
  snapGap: snapGapActual,
181
147
  snap: snap,
182
- handleComponent: finalHandleComponent
148
+ handleComponent: handleComponent
183
149
  }, otherProps), /*#__PURE__*/React.createElement("span", {
184
150
  className: resizerHoverZoneClassName
185
151
  }, children));
@@ -19,7 +19,7 @@ import { themed } from '@atlaskit/theme/components';
19
19
  import { borderRadius } from '@atlaskit/theme/constants';
20
20
  import Layer from '../Layer';
21
21
  var packageName = "@atlaskit/editor-common";
22
- var packageVersion = "75.8.4";
22
+ var packageVersion = "76.0.0";
23
23
  var halfFocusRing = 1;
24
24
  var dropOffset = '0, 8';
25
25
  var DropList = /*#__PURE__*/function (_Component) {
@@ -1,32 +1,52 @@
1
- import React from 'react';
2
- import type { PropsWithChildren } from 'react';
3
- import type { HandleComponent } from 're-resizable';
1
+ import type { CSSProperties, PropsWithChildren } from 'react';
4
2
  import type { TooltipProps } from '@atlaskit/tooltip';
5
- import type { EnabledHandles, HandleAlignmentMethod, HandleHeightSizeType, HandleHighlight, HandlePositioning, HandleResize, HandleResizeStart, HandleStyles, ResizerAppearance, Snap } from './types';
3
+ import type { EnabledHandles, HandleAlignmentMethod, HandleHighlight, HandlePositioning, HandleResize, HandleResizeStart, HandleSize, HandleStyles, ResizerAppearance, Snap } from './types';
6
4
  export type ResizerProps = {
5
+ className?: string;
7
6
  enable: EnabledHandles;
8
7
  width: number;
9
- handleResizeStart: HandleResizeStart;
10
- handleResize: HandleResize;
11
- handleResizeStop: HandleResize;
12
- innerPadding?: number;
13
- handleClassName?: string;
14
- className?: string;
15
8
  minWidth?: number;
16
9
  maxWidth?: number;
17
- handleWrapperStyle?: React.CSSProperties;
18
- handleComponent?: HandleComponent;
19
- handleStyles?: HandleStyles;
20
- handlePositioning?: HandlePositioning;
21
- handleHeightSize?: HandleHeightSizeType;
22
- handleMarginTop?: number;
23
10
  snap?: Snap;
24
11
  snapGap?: number;
25
- handleAlignmentMethod?: HandleAlignmentMethod;
26
12
  resizeRatio?: number;
27
- isHandleVisible?: boolean;
28
13
  appearance?: ResizerAppearance;
14
+ isHandleVisible?: boolean;
15
+ handleResizeStart: HandleResizeStart;
16
+ handleResize: HandleResize;
17
+ handleResizeStop: HandleResize;
18
+ /**
19
+ * This can be used to override the css class name applied to the resize handle.
20
+ */
21
+ handleClassName?: string;
22
+ /**
23
+ * This is used to override the style of resize handles wrapper.
24
+ */
25
+ handleWrapperStyle?: CSSProperties;
26
+ /**
27
+ * This property is used to override the style of one or more resize handles. Only the axis you specify will have
28
+ * its handle style overriden.
29
+ */
30
+ handleStyles?: HandleStyles;
31
+ /**
32
+ * The handleAlignmentMethod is used in determining the vertical positioning of the resizer handle in relation to its children.
33
+ */
34
+ handleAlignmentMethod?: HandleAlignmentMethod;
35
+ /**
36
+ * The handlePositioning is used to determine the horizontal position of the resizer handle in relation to its children.
37
+ */
38
+ handlePositioning?: HandlePositioning;
39
+ /**
40
+ * The handleSize is used to determine the width/height of the handle element.
41
+ */
42
+ handleSize?: HandleSize;
43
+ /**
44
+ * The handleHighlight is used to determine how the handle looks when the users mouse hovers over the handle element.
45
+ */
29
46
  handleHighlight?: HandleHighlight;
47
+ /**
48
+ * The handle can display a tooltip when mouse hovers.
49
+ */
30
50
  handleTooltipContent?: TooltipProps['content'];
31
51
  };
32
52
  export default function ResizerNext(props: PropsWithChildren<ResizerProps>): JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export { default as ResizerNext } from './Resizer';
2
- export type { HandleAlignmentMethod, HandleHighlight, HandleHeightSizeType, HandlePositioning, EnabledHandles, HandleResize, Position, Snap, HandleResizeStart, Dimensions, } from './types';
2
+ export type { HandleAlignmentMethod, HandleHighlight, HandleSize, HandlePositioning, EnabledHandles, HandleResize, Position, Snap, HandleResizeStart, Dimensions, } from './types';
@@ -21,7 +21,7 @@ export type HandleStyles = {
21
21
  right?: React.CSSProperties;
22
22
  left?: React.CSSProperties;
23
23
  };
24
- export type HandleHeightSizeType = 'small' | 'medium' | 'large';
24
+ export type HandleSize = 'small' | 'medium' | 'large';
25
25
  export type HandleAlignmentMethod = 'center' | 'sticky';
26
26
  export type HandlePositioning = 'overlap' | 'adjacent';
27
27
  export type ResizerAppearance = 'danger';
@@ -1,32 +1,52 @@
1
- import React from 'react';
2
- import type { PropsWithChildren } from 'react';
3
- import type { HandleComponent } from 're-resizable';
1
+ import type { CSSProperties, PropsWithChildren } from 'react';
4
2
  import type { TooltipProps } from '@atlaskit/tooltip';
5
- import type { EnabledHandles, HandleAlignmentMethod, HandleHeightSizeType, HandleHighlight, HandlePositioning, HandleResize, HandleResizeStart, HandleStyles, ResizerAppearance, Snap } from './types';
3
+ import type { EnabledHandles, HandleAlignmentMethod, HandleHighlight, HandlePositioning, HandleResize, HandleResizeStart, HandleSize, HandleStyles, ResizerAppearance, Snap } from './types';
6
4
  export type ResizerProps = {
5
+ className?: string;
7
6
  enable: EnabledHandles;
8
7
  width: number;
9
- handleResizeStart: HandleResizeStart;
10
- handleResize: HandleResize;
11
- handleResizeStop: HandleResize;
12
- innerPadding?: number;
13
- handleClassName?: string;
14
- className?: string;
15
8
  minWidth?: number;
16
9
  maxWidth?: number;
17
- handleWrapperStyle?: React.CSSProperties;
18
- handleComponent?: HandleComponent;
19
- handleStyles?: HandleStyles;
20
- handlePositioning?: HandlePositioning;
21
- handleHeightSize?: HandleHeightSizeType;
22
- handleMarginTop?: number;
23
10
  snap?: Snap;
24
11
  snapGap?: number;
25
- handleAlignmentMethod?: HandleAlignmentMethod;
26
12
  resizeRatio?: number;
27
- isHandleVisible?: boolean;
28
13
  appearance?: ResizerAppearance;
14
+ isHandleVisible?: boolean;
15
+ handleResizeStart: HandleResizeStart;
16
+ handleResize: HandleResize;
17
+ handleResizeStop: HandleResize;
18
+ /**
19
+ * This can be used to override the css class name applied to the resize handle.
20
+ */
21
+ handleClassName?: string;
22
+ /**
23
+ * This is used to override the style of resize handles wrapper.
24
+ */
25
+ handleWrapperStyle?: CSSProperties;
26
+ /**
27
+ * This property is used to override the style of one or more resize handles. Only the axis you specify will have
28
+ * its handle style overriden.
29
+ */
30
+ handleStyles?: HandleStyles;
31
+ /**
32
+ * The handleAlignmentMethod is used in determining the vertical positioning of the resizer handle in relation to its children.
33
+ */
34
+ handleAlignmentMethod?: HandleAlignmentMethod;
35
+ /**
36
+ * The handlePositioning is used to determine the horizontal position of the resizer handle in relation to its children.
37
+ */
38
+ handlePositioning?: HandlePositioning;
39
+ /**
40
+ * The handleSize is used to determine the width/height of the handle element.
41
+ */
42
+ handleSize?: HandleSize;
43
+ /**
44
+ * The handleHighlight is used to determine how the handle looks when the users mouse hovers over the handle element.
45
+ */
29
46
  handleHighlight?: HandleHighlight;
47
+ /**
48
+ * The handle can display a tooltip when mouse hovers.
49
+ */
30
50
  handleTooltipContent?: TooltipProps['content'];
31
51
  };
32
52
  export default function ResizerNext(props: PropsWithChildren<ResizerProps>): JSX.Element;
@@ -1,2 +1,2 @@
1
1
  export { default as ResizerNext } from './Resizer';
2
- export type { HandleAlignmentMethod, HandleHighlight, HandleHeightSizeType, HandlePositioning, EnabledHandles, HandleResize, Position, Snap, HandleResizeStart, Dimensions, } from './types';
2
+ export type { HandleAlignmentMethod, HandleHighlight, HandleSize, HandlePositioning, EnabledHandles, HandleResize, Position, Snap, HandleResizeStart, Dimensions, } from './types';
@@ -21,7 +21,7 @@ export type HandleStyles = {
21
21
  right?: React.CSSProperties;
22
22
  left?: React.CSSProperties;
23
23
  };
24
- export type HandleHeightSizeType = 'small' | 'medium' | 'large';
24
+ export type HandleSize = 'small' | 'medium' | 'large';
25
25
  export type HandleAlignmentMethod = 'center' | 'sticky';
26
26
  export type HandlePositioning = 'overlap' | 'adjacent';
27
27
  export type ResizerAppearance = 'danger';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "75.8.4",
3
+ "version": "76.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"