@atlaskit/editor-common 74.40.0 → 74.41.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,18 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 74.41.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`7b8e8b52110`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7b8e8b52110) - [ED-16733] Editor Media Extraction: Moving Floating Toolbar Separator to editor-common
8
+
9
+ ## 74.40.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`736af94f8b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/736af94f8b0) - [ux] Fixing the bug due to which break-out layout and expand node on narrow viewport resizes to be too narrow
14
+ - [`39099193642`](https://bitbucket.org/atlassian/atlassian-frontend/commits/39099193642) - Cleanup breakout styling when table has fragment mark ff
15
+
3
16
  ## 74.40.0
4
17
 
5
18
  ### Minor 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.40.0";
19
+ var packageVersion = "74.41.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
@@ -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.40.0";
27
+ var packageVersion = "74.41.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _colors = require("@atlaskit/theme/colors");
11
+ var _templateObject;
12
+ /** @jsx jsx */
13
+ var separator = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 20px;\n margin: 0 ", ";\n align-self: center;\n"])), "var(--ds-border, ".concat(_colors.N30, ")"), "var(--ds-space-050, 4px)");
14
+ var _default = function _default() {
15
+ return (0, _react.jsx)("div", {
16
+ css: separator,
17
+ className: "separator"
18
+ });
19
+ };
20
+ exports.default = _default;
@@ -77,6 +77,12 @@ Object.defineProperty(exports, "FloatingToolbarButton", {
77
77
  return _Button.default;
78
78
  }
79
79
  });
80
+ Object.defineProperty(exports, "FloatingToolbarSeparator", {
81
+ enumerable: true,
82
+ get: function get() {
83
+ return _Separator.default;
84
+ }
85
+ });
80
86
  Object.defineProperty(exports, "HelperMessage", {
81
87
  enumerable: true,
82
88
  get: function get() {
@@ -385,6 +391,7 @@ var _clearNextSiblingMarginTop = require("./clear-next-sibling-margin-top");
385
391
  var _IntlErrorBoundary = require("./IntlErrorBoundary");
386
392
  var _IntlProviderIfMissingWrapper = _interopRequireDefault(require("./IntlProviderIfMissingWrapper"));
387
393
  var _Button = _interopRequireDefault(require("./FloatingToolbar/Button"));
394
+ var _Separator = _interopRequireDefault(require("./FloatingToolbar/Separator"));
388
395
  var _const = require("./LinkSearch/const");
389
396
  var _context = require("./ContextPanel/context");
390
397
  var _ResizerLegacy = _interopRequireDefault(require("./ResizerLegacy"));
@@ -28,8 +28,7 @@ var breakoutConsts = {
28
28
  mapBreakpointToLayoutMaxWidth: _BaseTheme.mapBreakpointToLayoutMaxWidth,
29
29
  getBreakpoint: _WidthProvider.getBreakpoint,
30
30
  /**
31
- * Consumers are opinionated that this will always return a string ending in
32
- * `px` when called with `full-width` or `wide` as the layout parameter.
31
+ * This function can return percentage value or px value depending upon the inputs
33
32
  */
34
33
  calcBreakoutWidth: function calcBreakoutWidth(layout, containerWidth) {
35
34
  var effectiveFullWidth = containerWidth - breakoutConsts.padding;
@@ -37,7 +36,14 @@ var breakoutConsts = {
37
36
  case 'full-width':
38
37
  return "".concat(Math.min(effectiveFullWidth, breakoutConsts.fullWidthLayoutWidth), "px");
39
38
  case 'wide':
40
- return breakoutConsts.calcWideWidth(containerWidth);
39
+ if (effectiveFullWidth <= 0) {
40
+ return '100%';
41
+ }
42
+ var wideWidth = breakoutConsts.calcWideWidth(containerWidth);
43
+ if (wideWidth.endsWith('%')) {
44
+ return "".concat(Math.min(effectiveFullWidth, breakoutConsts.fullWidthLayoutWidth), "px");
45
+ }
46
+ return wideWidth;
41
47
  default:
42
48
  return '100%';
43
49
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.40.0",
3
+ "version": "74.41.0",
4
4
  "sideEffects": false
5
5
  }
@@ -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.40.0";
3
+ const packageVersion = "74.41.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
@@ -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.40.0";
11
+ const packageVersion = "74.41.0";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = '0, 8';
14
14
  class DropList extends Component {
@@ -0,0 +1,14 @@
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
3
+ import { N30 } from '@atlaskit/theme/colors';
4
+ const separator = css`
5
+ background: ${`var(--ds-border, ${N30})`};
6
+ width: 1px;
7
+ height: 20px;
8
+ margin: 0 ${"var(--ds-space-050, 4px)"};
9
+ align-self: center;
10
+ `;
11
+ export default (() => jsx("div", {
12
+ css: separator,
13
+ className: "separator"
14
+ }));
@@ -18,6 +18,7 @@ export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle
18
18
  export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE } from './IntlErrorBoundary';
19
19
  export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
20
20
  export { default as FloatingToolbarButton } from './FloatingToolbar/Button';
21
+ export { default as FloatingToolbarSeparator } from './FloatingToolbar/Separator';
21
22
  export { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, LINKPICKER_HEIGHT_IN_PX } from './LinkSearch/const';
22
23
  export { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel } from './ContextPanel/context';
23
24
  export { default as Resizer } from './ResizerLegacy';
@@ -18,8 +18,7 @@ const breakoutConsts = {
18
18
  mapBreakpointToLayoutMaxWidth,
19
19
  getBreakpoint,
20
20
  /**
21
- * Consumers are opinionated that this will always return a string ending in
22
- * `px` when called with `full-width` or `wide` as the layout parameter.
21
+ * This function can return percentage value or px value depending upon the inputs
23
22
  */
24
23
  calcBreakoutWidth: (layout, containerWidth) => {
25
24
  const effectiveFullWidth = containerWidth - breakoutConsts.padding;
@@ -27,7 +26,14 @@ const breakoutConsts = {
27
26
  case 'full-width':
28
27
  return `${Math.min(effectiveFullWidth, breakoutConsts.fullWidthLayoutWidth)}px`;
29
28
  case 'wide':
30
- return breakoutConsts.calcWideWidth(containerWidth);
29
+ if (effectiveFullWidth <= 0) {
30
+ return '100%';
31
+ }
32
+ let wideWidth = breakoutConsts.calcWideWidth(containerWidth);
33
+ if (wideWidth.endsWith('%')) {
34
+ return `${Math.min(effectiveFullWidth, breakoutConsts.fullWidthLayoutWidth)}px`;
35
+ }
36
+ return wideWidth;
31
37
  default:
32
38
  return '100%';
33
39
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.40.0",
3
+ "version": "74.41.0",
4
4
  "sideEffects": false
5
5
  }
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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.40.0";
9
+ var packageVersion = "74.41.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
@@ -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.40.0";
21
+ var packageVersion = "74.41.0";
22
22
  var halfFocusRing = 1;
23
23
  var dropOffset = '0, 8';
24
24
  var DropList = /*#__PURE__*/function (_Component) {
@@ -0,0 +1,12 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ /** @jsx jsx */
4
+ import { css, jsx } from '@emotion/react';
5
+ import { N30 } from '@atlaskit/theme/colors';
6
+ var separator = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n width: 1px;\n height: 20px;\n margin: 0 ", ";\n align-self: center;\n"])), "var(--ds-border, ".concat(N30, ")"), "var(--ds-space-050, 4px)");
7
+ export default (function () {
8
+ return jsx("div", {
9
+ css: separator,
10
+ className: "separator"
11
+ });
12
+ });
@@ -18,6 +18,7 @@ export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle
18
18
  export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE } from './IntlErrorBoundary';
19
19
  export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
20
20
  export { default as FloatingToolbarButton } from './FloatingToolbar/Button';
21
+ export { default as FloatingToolbarSeparator } from './FloatingToolbar/Separator';
21
22
  export { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, LINKPICKER_HEIGHT_IN_PX } from './LinkSearch/const';
22
23
  export { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel } from './ContextPanel/context';
23
24
  export { default as Resizer } from './ResizerLegacy';
@@ -18,8 +18,7 @@ var breakoutConsts = {
18
18
  mapBreakpointToLayoutMaxWidth: mapBreakpointToLayoutMaxWidth,
19
19
  getBreakpoint: getBreakpoint,
20
20
  /**
21
- * Consumers are opinionated that this will always return a string ending in
22
- * `px` when called with `full-width` or `wide` as the layout parameter.
21
+ * This function can return percentage value or px value depending upon the inputs
23
22
  */
24
23
  calcBreakoutWidth: function calcBreakoutWidth(layout, containerWidth) {
25
24
  var effectiveFullWidth = containerWidth - breakoutConsts.padding;
@@ -27,7 +26,14 @@ var breakoutConsts = {
27
26
  case 'full-width':
28
27
  return "".concat(Math.min(effectiveFullWidth, breakoutConsts.fullWidthLayoutWidth), "px");
29
28
  case 'wide':
30
- return breakoutConsts.calcWideWidth(containerWidth);
29
+ if (effectiveFullWidth <= 0) {
30
+ return '100%';
31
+ }
32
+ var wideWidth = breakoutConsts.calcWideWidth(containerWidth);
33
+ if (wideWidth.endsWith('%')) {
34
+ return "".concat(Math.min(effectiveFullWidth, breakoutConsts.fullWidthLayoutWidth), "px");
35
+ }
36
+ return wideWidth;
31
37
  default:
32
38
  return '100%';
33
39
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.40.0",
3
+ "version": "74.41.0",
4
4
  "sideEffects": false
5
5
  }
@@ -389,15 +389,6 @@ export type FeatureFlags = {
389
389
  * @default false
390
390
  */
391
391
  expandedChartColors?: boolean | undefined;
392
- /**
393
- * @description
394
- * Fix the styling of tables when a fragment mark is applied and it is broken out
395
- *
396
- * @see https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3158246501/PP+Link+Picker+-+Standalone
397
- * @see https://product-fabric.atlassian.net/browse/EDM-2577
398
- * @default false
399
- */
400
- useFragmentMarkBreakoutWidthStylingFix?: boolean;
401
392
  /**
402
393
  * @description
403
394
  * Enable the new editor media resize experience.
@@ -0,0 +1,4 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ declare const _default: () => jsx.JSX.Element;
4
+ export default _default;
@@ -26,6 +26,7 @@ export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle
26
26
  export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE, } from './IntlErrorBoundary';
27
27
  export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
28
28
  export { default as FloatingToolbarButton } from './FloatingToolbar/Button';
29
+ export { default as FloatingToolbarSeparator } from './FloatingToolbar/Separator';
29
30
  export { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, LINKPICKER_HEIGHT_IN_PX, } from './LinkSearch/const';
30
31
  export { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel, } from './ContextPanel/context';
31
32
  export { default as Resizer } from './ResizerLegacy';
@@ -389,15 +389,6 @@ export type FeatureFlags = {
389
389
  * @default false
390
390
  */
391
391
  expandedChartColors?: boolean | undefined;
392
- /**
393
- * @description
394
- * Fix the styling of tables when a fragment mark is applied and it is broken out
395
- *
396
- * @see https://product-fabric.atlassian.net/wiki/spaces/EM/pages/3158246501/PP+Link+Picker+-+Standalone
397
- * @see https://product-fabric.atlassian.net/browse/EDM-2577
398
- * @default false
399
- */
400
- useFragmentMarkBreakoutWidthStylingFix?: boolean;
401
392
  /**
402
393
  * @description
403
394
  * Enable the new editor media resize experience.
@@ -0,0 +1,4 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ declare const _default: () => jsx.JSX.Element;
4
+ export default _default;
@@ -26,6 +26,7 @@ export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle
26
26
  export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE, } from './IntlErrorBoundary';
27
27
  export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
28
28
  export { default as FloatingToolbarButton } from './FloatingToolbar/Button';
29
+ export { default as FloatingToolbarSeparator } from './FloatingToolbar/Separator';
29
30
  export { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, LINKPICKER_HEIGHT_IN_PX, } from './LinkSearch/const';
30
31
  export { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel, } from './ContextPanel/context';
31
32
  export { default as Resizer } from './ResizerLegacy';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.40.0",
3
+ "version": "74.41.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/"