@atlaskit/editor-common 74.56.6 → 74.56.7

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,13 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 74.56.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`dfb663969a0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dfb663969a0) - ED-19820: Fix for table scroll when insert media node when extended-resize-experience is off
8
+ - [`d1bd1be0923`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d1bd1be0923) - Updated shared resizer style
9
+ - Updated dependencies
10
+
3
11
  ## 74.56.6
4
12
 
5
13
  ### Patch Changes
@@ -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 = "74.56.6";
19
+ var packageVersion = "74.56.7";
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
@@ -32,5 +32,5 @@ exports.resizerDangerClassName = resizerDangerClassName;
32
32
  var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
33
33
  var resizerHandleZIndex = 99;
34
34
  exports.resizerHandleZIndex = resizerHandleZIndex;
35
- var resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% - 42px);\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s, opacity 0.2s;\n\n &.none {\n background: none;\n }\n\n &.shadow {\n background: ", ";\n }\n }\n\n .", " {\n & .", " {\n background: ", ";\n }\n }\n\n .", " {\n padding: 0 ", ";\n position: relative;\n display: inline-block;\n width: 100%;\n left: -12px;\n }\n"])), resizerItemClassName, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), resizerHandleClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-border, ".concat(_colors.N60, ")"), resizerHandleTrackClassName, "var(--ds-background-selected, ".concat(_colors.B50, ")"), akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHoverZoneClassName, "var(--ds-space-150, 12px)");
35
+ var resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n margin: 0 ", ";\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n min-height: 24px;\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% - 42px);\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s, opacity 0.2s;\n\n &.none {\n background: none;\n }\n\n &.shadow {\n background: ", ";\n }\n\n &.full-height {\n background: ", ";\n height: 100%;\n min-height: 36px;\n }\n }\n\n .", " {\n & .", " {\n background: ", ";\n }\n }\n\n .", " {\n padding: 0 ", ";\n position: relative;\n display: inline-block;\n width: 100%;\n left: -12px;\n }\n"])), resizerItemClassName, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), resizerHandleClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, ".concat(_colors.N60, ")"), resizerHandleTrackClassName, "var(--ds-background-selected, ".concat(_colors.B50, ")"), "var(--ds-background-selected, ".concat(_colors.B50, ")"), akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHoverZoneClassName, "var(--ds-space-150, 12px)");
36
36
  exports.resizerStyles = resizerStyles;
@@ -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 = "74.56.6";
27
+ var packageVersion = "74.56.7";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -20,6 +20,8 @@ var _analytics = require("../../analytics");
20
20
  var _styles = require("../../styles");
21
21
  var _utils = require("../../utils");
22
22
  var _utils2 = require("./utils");
23
+ 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; }
24
+ 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
25
  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); }; }
24
26
  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; } }
25
27
  var getResizeAnalyticsEvent = function getResizeAnalyticsEvent(type, size, layout) {
@@ -140,7 +142,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
140
142
  (0, _createClass2.default)(Resizer, [{
141
143
  key: "render",
142
144
  value: function render() {
143
- var handleStyles = {};
145
+ var baseHandleStyles = {};
144
146
  var handles = {};
145
147
  var handleComponent = {};
146
148
  var _this$props4 = this.props,
@@ -153,19 +155,24 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
153
155
  enable = _this$props4.enable,
154
156
  children = _this$props4.children,
155
157
  ratio = _this$props4.ratio,
156
- handleComponentFunc = _this$props4.handleComponentFunc;
158
+ handleComponentFunc = _this$props4.handleComponentFunc,
159
+ handleStyles = _this$props4.handleStyles;
157
160
  var isResizing = this.state.isResizing;
158
161
  _utils2.handleSides.forEach(function (side) {
159
- var _handleStyles$side;
162
+ var _baseHandleStyles$sid;
160
163
  handles[side] = "richMedia-resize-handle-".concat(side);
161
- handleStyles[side] = (_handleStyles$side = {
164
+ baseHandleStyles[side] = (_baseHandleStyles$sid = {
162
165
  width: '24px'
163
- }, (0, _defineProperty2.default)(_handleStyles$side, side, "".concat(-13 - innerPadding, "px")), (0, _defineProperty2.default)(_handleStyles$side, "zIndex", _editorSharedStyles.akRichMediaResizeZIndex), (0, _defineProperty2.default)(_handleStyles$side, "pointerEvents", 'auto'), _handleStyles$side);
166
+ }, (0, _defineProperty2.default)(_baseHandleStyles$sid, side, "".concat(-13 - innerPadding, "px")), (0, _defineProperty2.default)(_baseHandleStyles$sid, "zIndex", _editorSharedStyles.akRichMediaResizeZIndex), (0, _defineProperty2.default)(_baseHandleStyles$sid, "pointerEvents", 'auto'), _baseHandleStyles$sid);
164
167
  var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
165
168
  if (sideHandleComponent) {
166
169
  handleComponent[side] = sideHandleComponent;
167
170
  }
168
171
  });
172
+ var updatedHandleStyles = {
173
+ left: _objectSpread(_objectSpread({}, baseHandleStyles.left), handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.left),
174
+ right: _objectSpread(_objectSpread({}, baseHandleStyles.right), handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.right)
175
+ };
169
176
  var className = (0, _classnames.default)(_styles.richMediaClassName, "image-".concat(layout), this.props.className, {
170
177
  'is-resizing': isResizing,
171
178
  'not-resized': !pctWidth,
@@ -194,7 +201,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
194
201
  },
195
202
  className: className,
196
203
  handleClasses: handles,
197
- handleStyles: handleStyles,
204
+ handleStyles: updatedHandleStyles,
198
205
  handleWrapperStyle: handleWrapperStyle,
199
206
  handleComponent: handleComponent,
200
207
  enable: enable,
@@ -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 = "74.56.6";
3
+ const packageVersion = "74.56.7";
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
@@ -122,10 +122,12 @@ export const resizerStyles = css`
122
122
  content: ' ';
123
123
  display: flex;
124
124
  width: 3px;
125
+ margin: 0 ${"var(--ds-space-025, 2px)"};
125
126
  height: 64px;
126
127
  transition: background-color 0.2s;
127
128
  border-radius: 6px;
128
129
 
130
+ min-height: 24px;
129
131
  background: ${`var(--ds-border, ${N60})`};
130
132
  }
131
133
 
@@ -145,6 +147,12 @@ export const resizerStyles = css`
145
147
  &.shadow {
146
148
  background: ${`var(--ds-background-selected, ${B50})`};
147
149
  }
150
+
151
+ &.full-height {
152
+ background: ${`var(--ds-background-selected, ${B50})`};
153
+ height: 100%;
154
+ min-height: 36px;
155
+ }
148
156
  }
149
157
 
150
158
  .${akEditorSelectedNodeClassName} {
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import Layer from '../Layer';
10
10
  const packageName = "@atlaskit/editor-common";
11
- const packageVersion = "74.56.6";
11
+ const packageVersion = "74.56.7";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = '0, 8';
14
14
  class DropList extends Component {
@@ -120,7 +120,7 @@ export default class Resizer extends React.Component {
120
120
  });
121
121
  }
122
122
  render() {
123
- const handleStyles = {};
123
+ const baseHandleStyles = {};
124
124
  const handles = {};
125
125
  const handleComponent = {};
126
126
  const {
@@ -132,14 +132,15 @@ export default class Resizer extends React.Component {
132
132
  enable,
133
133
  children,
134
134
  ratio,
135
- handleComponentFunc
135
+ handleComponentFunc,
136
+ handleStyles
136
137
  } = this.props;
137
138
  const {
138
139
  isResizing
139
140
  } = this.state;
140
141
  handleSides.forEach(side => {
141
142
  handles[side] = `richMedia-resize-handle-${side}`;
142
- handleStyles[side] = {
143
+ baseHandleStyles[side] = {
143
144
  width: '24px',
144
145
  [side]: `${-13 - innerPadding}px`,
145
146
  zIndex: akRichMediaResizeZIndex,
@@ -150,6 +151,16 @@ export default class Resizer extends React.Component {
150
151
  handleComponent[side] = sideHandleComponent;
151
152
  }
152
153
  });
154
+ const updatedHandleStyles = {
155
+ left: {
156
+ ...baseHandleStyles.left,
157
+ ...(handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.left)
158
+ },
159
+ right: {
160
+ ...baseHandleStyles.right,
161
+ ...(handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.right)
162
+ }
163
+ };
153
164
  const className = classnames(richMediaClassName, `image-${layout}`, this.props.className, {
154
165
  'is-resizing': isResizing,
155
166
  'not-resized': !pctWidth,
@@ -178,7 +189,7 @@ export default class Resizer extends React.Component {
178
189
  },
179
190
  className: className,
180
191
  handleClasses: handles,
181
- handleStyles: handleStyles,
192
+ handleStyles: updatedHandleStyles,
182
193
  handleWrapperStyle: handleWrapperStyle,
183
194
  handleComponent: handleComponent,
184
195
  enable: enable,
@@ -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 = "74.56.6";
9
+ var packageVersion = "74.56.7";
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
@@ -18,4 +18,4 @@ export var resizerDangerClassName = "".concat(resizerHandleClassName, "-danger")
18
18
  // akEditorSelectedNodeClassName from '@atlaskit/editor-shared-styles';
19
19
  var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
20
20
  export var resizerHandleZIndex = 99;
21
- export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% - 42px);\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s, opacity 0.2s;\n\n &.none {\n background: none;\n }\n\n &.shadow {\n background: ", ";\n }\n }\n\n .", " {\n & .", " {\n background: ", ";\n }\n }\n\n .", " {\n padding: 0 ", ";\n position: relative;\n display: inline-block;\n width: 100%;\n left: -12px;\n }\n"])), resizerItemClassName, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), resizerHandleClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-border, ".concat(N60, ")"), resizerHandleTrackClassName, "var(--ds-background-selected, ".concat(B50, ")"), akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHoverZoneClassName, "var(--ds-space-150, 12px)");
21
+ export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n margin: 0 ", ";\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n min-height: 24px;\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% - 42px);\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s, opacity 0.2s;\n\n &.none {\n background: none;\n }\n\n &.shadow {\n background: ", ";\n }\n\n &.full-height {\n background: ", ";\n height: 100%;\n min-height: 36px;\n }\n }\n\n .", " {\n & .", " {\n background: ", ";\n }\n }\n\n .", " {\n padding: 0 ", ";\n position: relative;\n display: inline-block;\n width: 100%;\n left: -12px;\n }\n"])), resizerItemClassName, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), resizerHandleClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, ".concat(N60, ")"), resizerHandleTrackClassName, "var(--ds-background-selected, ".concat(B50, ")"), "var(--ds-background-selected, ".concat(B50, ")"), akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHoverZoneClassName, "var(--ds-space-150, 12px)");
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
18
18
  import { borderRadius } from '@atlaskit/theme/constants';
19
19
  import Layer from '../Layer';
20
20
  var packageName = "@atlaskit/editor-common";
21
- var packageVersion = "74.56.6";
21
+ var packageVersion = "74.56.7";
22
22
  var halfFocusRing = 1;
23
23
  var dropOffset = '0, 8';
24
24
  var DropList = /*#__PURE__*/function (_Component) {
@@ -5,6 +5,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
+ 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; }
9
+ 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
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
12
  import React from 'react';
@@ -133,7 +135,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
133
135
  _createClass(Resizer, [{
134
136
  key: "render",
135
137
  value: function render() {
136
- var handleStyles = {};
138
+ var baseHandleStyles = {};
137
139
  var handles = {};
138
140
  var handleComponent = {};
139
141
  var _this$props4 = this.props,
@@ -146,19 +148,24 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
146
148
  enable = _this$props4.enable,
147
149
  children = _this$props4.children,
148
150
  ratio = _this$props4.ratio,
149
- handleComponentFunc = _this$props4.handleComponentFunc;
151
+ handleComponentFunc = _this$props4.handleComponentFunc,
152
+ handleStyles = _this$props4.handleStyles;
150
153
  var isResizing = this.state.isResizing;
151
154
  handleSides.forEach(function (side) {
152
- var _handleStyles$side;
155
+ var _baseHandleStyles$sid;
153
156
  handles[side] = "richMedia-resize-handle-".concat(side);
154
- handleStyles[side] = (_handleStyles$side = {
157
+ baseHandleStyles[side] = (_baseHandleStyles$sid = {
155
158
  width: '24px'
156
- }, _defineProperty(_handleStyles$side, side, "".concat(-13 - innerPadding, "px")), _defineProperty(_handleStyles$side, "zIndex", akRichMediaResizeZIndex), _defineProperty(_handleStyles$side, "pointerEvents", 'auto'), _handleStyles$side);
159
+ }, _defineProperty(_baseHandleStyles$sid, side, "".concat(-13 - innerPadding, "px")), _defineProperty(_baseHandleStyles$sid, "zIndex", akRichMediaResizeZIndex), _defineProperty(_baseHandleStyles$sid, "pointerEvents", 'auto'), _baseHandleStyles$sid);
157
160
  var sideHandleComponent = handleComponentFunc && handleComponentFunc(side);
158
161
  if (sideHandleComponent) {
159
162
  handleComponent[side] = sideHandleComponent;
160
163
  }
161
164
  });
165
+ var updatedHandleStyles = {
166
+ left: _objectSpread(_objectSpread({}, baseHandleStyles.left), handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.left),
167
+ right: _objectSpread(_objectSpread({}, baseHandleStyles.right), handleStyles === null || handleStyles === void 0 ? void 0 : handleStyles.right)
168
+ };
162
169
  var className = classnames(richMediaClassName, "image-".concat(layout), this.props.className, {
163
170
  'is-resizing': isResizing,
164
171
  'not-resized': !pctWidth,
@@ -187,7 +194,7 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
187
194
  },
188
195
  className: className,
189
196
  handleClasses: handles,
190
- handleStyles: handleStyles,
197
+ handleStyles: updatedHandleStyles,
191
198
  handleWrapperStyle: handleWrapperStyle,
192
199
  handleComponent: handleComponent,
193
200
  enable: enable,
@@ -25,4 +25,4 @@ export type HandleHeightSizeType = 'small' | 'medium' | 'large';
25
25
  export type HandleAlignmentMethod = 'center' | 'sticky';
26
26
  export type HandlePositioning = 'overlap' | 'adjacent';
27
27
  export type ResizerAppearance = 'danger';
28
- export type HandleHighlight = 'none' | 'shadow';
28
+ export type HandleHighlight = 'none' | 'shadow' | 'full-height';
@@ -1,8 +1,10 @@
1
- import React, { RefObject } from 'react';
1
+ import type { RefObject } from 'react';
2
+ import React from 'react';
2
3
  import { Resizable } from 're-resizable';
3
- import { RichMediaLayout } from '@atlaskit/adf-schema';
4
- import { DispatchAnalyticsEvent } from '../../analytics';
5
- import { EnabledHandles, Props as ResizableMediaSingleProps } from './types';
4
+ import type { RichMediaLayout } from '@atlaskit/adf-schema';
5
+ import type { DispatchAnalyticsEvent } from '../../analytics';
6
+ import type { HandleStyles } from '../../resizer/types';
7
+ import type { EnabledHandles, Props as ResizableMediaSingleProps } from './types';
6
8
  export interface ResizableNumberSize {
7
9
  width: number;
8
10
  height: number;
@@ -24,6 +26,7 @@ export type ResizerProps = Omit<ResizableMediaSingleProps, 'height' | 'width'> &
24
26
  width: number;
25
27
  ratio?: string;
26
28
  handleComponentFunc?: (side: string) => React.ReactElement<any> | undefined;
29
+ handleStyles?: HandleStyles;
27
30
  };
28
31
  export type ResizerState = {
29
32
  isResizing: boolean;
@@ -25,4 +25,4 @@ export type HandleHeightSizeType = 'small' | 'medium' | 'large';
25
25
  export type HandleAlignmentMethod = 'center' | 'sticky';
26
26
  export type HandlePositioning = 'overlap' | 'adjacent';
27
27
  export type ResizerAppearance = 'danger';
28
- export type HandleHighlight = 'none' | 'shadow';
28
+ export type HandleHighlight = 'none' | 'shadow' | 'full-height';
@@ -1,8 +1,10 @@
1
- import React, { RefObject } from 'react';
1
+ import type { RefObject } from 'react';
2
+ import React from 'react';
2
3
  import { Resizable } from 're-resizable';
3
- import { RichMediaLayout } from '@atlaskit/adf-schema';
4
- import { DispatchAnalyticsEvent } from '../../analytics';
5
- import { EnabledHandles, Props as ResizableMediaSingleProps } from './types';
4
+ import type { RichMediaLayout } from '@atlaskit/adf-schema';
5
+ import type { DispatchAnalyticsEvent } from '../../analytics';
6
+ import type { HandleStyles } from '../../resizer/types';
7
+ import type { EnabledHandles, Props as ResizableMediaSingleProps } from './types';
6
8
  export interface ResizableNumberSize {
7
9
  width: number;
8
10
  height: number;
@@ -24,6 +26,7 @@ export type ResizerProps = Omit<ResizableMediaSingleProps, 'height' | 'width'> &
24
26
  width: number;
25
27
  ratio?: string;
26
28
  handleComponentFunc?: (side: string) => React.ReactElement<any> | undefined;
29
+ handleStyles?: HandleStyles;
27
30
  };
28
31
  export type ResizerState = {
29
32
  isResizing: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.56.6",
3
+ "version": "74.56.7",
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/"
@@ -87,7 +87,7 @@
87
87
  "@atlaskit/analytics-namespaced-context": "^6.7.0",
88
88
  "@atlaskit/analytics-next": "^9.1.0",
89
89
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
90
- "@atlaskit/button": "^16.9.0",
90
+ "@atlaskit/button": "^16.10.0",
91
91
  "@atlaskit/code": "^14.6.0",
92
92
  "@atlaskit/codemod-utils": "^4.2.0",
93
93
  "@atlaskit/editor-json-transformer": "^8.10.0",
@@ -95,12 +95,12 @@
95
95
  "@atlaskit/editor-prosemirror": "1.1.0",
96
96
  "@atlaskit/editor-shared-styles": "^2.6.0",
97
97
  "@atlaskit/editor-tables": "^2.3.0",
98
- "@atlaskit/emoji": "^67.4.0",
98
+ "@atlaskit/emoji": "^67.5.0",
99
99
  "@atlaskit/icon": "^21.12.0",
100
100
  "@atlaskit/icon-object": "^6.3.0",
101
101
  "@atlaskit/in-product-testing": "^0.2.0",
102
102
  "@atlaskit/link-datasource": "^1.0.0",
103
- "@atlaskit/link-picker": "^1.28.0",
103
+ "@atlaskit/link-picker": "^1.29.0",
104
104
  "@atlaskit/media-card": "^76.2.0",
105
105
  "@atlaskit/media-client": "^24.0.0",
106
106
  "@atlaskit/media-picker": "^66.2.0",
@@ -146,7 +146,7 @@
146
146
  "devDependencies": {
147
147
  "@atlaskit/media-core": "^34.1.0",
148
148
  "@atlaskit/media-test-helpers": "^33.0.0",
149
- "@atlaskit/smart-card": "^26.20.0",
149
+ "@atlaskit/smart-card": "^26.21.0",
150
150
  "@atlaskit/util-data-test": "^17.8.0",
151
151
  "@atlaskit/visual-regression": "*",
152
152
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",