@atlaskit/editor-common 94.17.2 → 94.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/media-single/constants.js +2 -1
- package/dist/cjs/media-single/index.js +6 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/BreakoutResizer.js +1 -1
- package/dist/cjs/styles/shared/column-layout.js +20 -18
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/media-single/constants.js +1 -0
- package/dist/es2019/media-single/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/BreakoutResizer.js +2 -2
- package/dist/es2019/styles/shared/column-layout.js +17 -17
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/media-single/constants.js +1 -0
- package/dist/esm/media-single/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/BreakoutResizer.js +2 -2
- package/dist/esm/styles/shared/column-layout.js +18 -18
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/media-single/constants.d.ts +1 -0
- package/dist/types/media-single/index.d.ts +1 -1
- package/dist/types-ts4.5/media-single/constants.d.ts +1 -0
- package/dist/types-ts4.5/media-single/index.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 94.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#162554](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162554)
|
|
8
|
+
[`bb0f938202ca0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bb0f938202ca0) -
|
|
9
|
+
[ux] Advanced layout responsiveness in Editor
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 94.18.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#161860](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161860)
|
|
17
|
+
[`a147e2be38608`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a147e2be38608) -
|
|
18
|
+
[ux] ED-25319 Support forced media resize handle positions in media options
|
|
19
|
+
|
|
3
20
|
## 94.17.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.wrappedLayouts = exports.MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = exports.MEDIA_SINGLE_SNAP_GAP = exports.MEDIA_SINGLE_RESIZE_THROTTLE_TIME = exports.MEDIA_SINGLE_HIGHLIGHT_GAP = exports.MEDIA_SINGLE_HANDLE_MARGIN = exports.MEDIA_SINGLE_GUTTER_SIZE = exports.MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH = exports.Layout = exports.DEFAULT_ROUNDING_INTERVAL = exports.DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_HEIGHT = exports.CAPTION_PLACEHOLDER_ID = void 0;
|
|
6
|
+
exports.wrappedLayouts = exports.MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = exports.MEDIA_SINGLE_SNAP_GAP = exports.MEDIA_SINGLE_RESIZE_THROTTLE_TIME = exports.MEDIA_SINGLE_HIGHLIGHT_GAP = exports.MEDIA_SINGLE_HANDLE_MARGIN = exports.MEDIA_SINGLE_GUTTER_SIZE = exports.MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH = exports.MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN = exports.Layout = exports.DEFAULT_ROUNDING_INTERVAL = exports.DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_HEIGHT = exports.CAPTION_PLACEHOLDER_ID = void 0;
|
|
7
7
|
var MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH = exports.MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH = 24;
|
|
8
8
|
var MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = exports.MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = 320;
|
|
9
9
|
var MEDIA_SINGLE_SNAP_GAP = exports.MEDIA_SINGLE_SNAP_GAP = 3;
|
|
10
10
|
var MEDIA_SINGLE_HIGHLIGHT_GAP = exports.MEDIA_SINGLE_HIGHLIGHT_GAP = 10;
|
|
11
11
|
var MEDIA_SINGLE_HANDLE_MARGIN = exports.MEDIA_SINGLE_HANDLE_MARGIN = 12;
|
|
12
|
+
var MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN = exports.MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN = 8;
|
|
12
13
|
var MEDIA_SINGLE_GUTTER_SIZE = exports.MEDIA_SINGLE_GUTTER_SIZE = MEDIA_SINGLE_HANDLE_MARGIN * 2;
|
|
13
14
|
var DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_WIDTH = 250;
|
|
14
15
|
var DEFAULT_IMAGE_HEIGHT = exports.DEFAULT_IMAGE_HEIGHT = 200;
|
|
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "ExternalImageBadge", {
|
|
|
39
39
|
return _ExternalImageBadge.ExternalImageBadge;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _constants.MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
42
48
|
Object.defineProperty(exports, "MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH", {
|
|
43
49
|
enumerable: true,
|
|
44
50
|
get: function get() {
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "94.
|
|
20
|
+
var packageVersion = "94.18.1";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -28,7 +28,7 @@ var getHandleStyle = function getHandleStyle(node) {
|
|
|
28
28
|
};
|
|
29
29
|
// expand and layout section elements have a negative margin applied
|
|
30
30
|
default:
|
|
31
|
-
var handleOffset = (0, _experiments.editorExperiment)('nested-dnd', true) ? _styles.
|
|
31
|
+
var handleOffset = (0, _experiments.editorExperiment)('nested-dnd', true) ? _styles.LAYOUT_SECTION_MARGIN * 2 + 8 : _styles.LAYOUT_COLUMN_PADDING * 2;
|
|
32
32
|
return {
|
|
33
33
|
left: {
|
|
34
34
|
left: "-".concat(handleOffset, "px"),
|
|
@@ -8,7 +8,8 @@ exports.columnLayoutSharedStyle = exports.columnLayoutResponsiveSharedStyle = vo
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
|
-
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
+
|
|
12
13
|
var columnLayoutSharedStyle = exports.columnLayoutSharedStyle = (0, _react.css)({
|
|
13
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
15
|
'[data-layout-section]': (0, _defineProperty2.default)({
|
|
@@ -29,28 +30,29 @@ var columnLayoutSharedStyle = exports.columnLayoutSharedStyle = (0, _react.css)(
|
|
|
29
30
|
})
|
|
30
31
|
});
|
|
31
32
|
var columnLayoutResponsiveSharedStyle = exports.columnLayoutResponsiveSharedStyle = (0, _react.css)({
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
34
|
+
'[data-layout-section]': {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
gap: "var(--ds-space-100, 8px)",
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
39
|
+
'& > *': {
|
|
40
|
+
flex: 1,
|
|
41
|
+
minWidth: 0
|
|
42
|
+
},
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
44
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
45
|
+
minWidth: 'initial'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
32
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
33
49
|
'.layout-section-container': {
|
|
34
50
|
containerType: 'inline-size',
|
|
35
51
|
containerName: 'layout-area',
|
|
36
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
-
'[data-layout-section]': (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(0, 1fr))"
|
|
41
|
-
}, (0, _defineProperty2.default)(_dataLayoutSection2, "@container layout-area (max-width:".concat(_editorSharedStyles.layoutBreakpointWidth.MEDIUM - 1, "px) and (min-width: ").concat(_editorSharedStyles.layoutBreakpointWidth.SMALL, "px)"), {
|
|
42
|
-
gridTemplateColumns: "repeat(1, 1fr)",
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
44
|
-
'&[data-layout-columns="4"], &[data-layout-columns="5"]': {
|
|
45
|
-
gridTemplateColumns: "repeat(2, 1fr)",
|
|
46
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
47
|
-
'& > :nth-child(5)': {
|
|
48
|
-
gridColumn: 'span 2'
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}), (0, _defineProperty2.default)(_dataLayoutSection2, "@container layout-area (width < ".concat(_editorSharedStyles.layoutBreakpointWidth.SMALL, "px)"), {
|
|
52
|
-
gridTemplateColumns: "repeat(1, 1fr)"
|
|
53
|
-
}), _dataLayoutSection2)
|
|
53
|
+
'[data-layout-section]': (0, _defineProperty2.default)({}, "@container layout-area (max-width:".concat(_editorSharedStyles.layoutBreakpointWidth.MEDIUM - 1, "px)"), {
|
|
54
|
+
flexDirection: 'column'
|
|
55
|
+
})
|
|
54
56
|
}
|
|
55
57
|
});
|
|
56
58
|
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "94.
|
|
27
|
+
var packageVersion = "94.18.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -3,6 +3,7 @@ export const MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = 320;
|
|
|
3
3
|
export const MEDIA_SINGLE_SNAP_GAP = 3;
|
|
4
4
|
export const MEDIA_SINGLE_HIGHLIGHT_GAP = 10;
|
|
5
5
|
export const MEDIA_SINGLE_HANDLE_MARGIN = 12;
|
|
6
|
+
export const MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN = 8;
|
|
6
7
|
export const MEDIA_SINGLE_GUTTER_SIZE = MEDIA_SINGLE_HANDLE_MARGIN * 2;
|
|
7
8
|
export const DEFAULT_IMAGE_WIDTH = 250;
|
|
8
9
|
export const DEFAULT_IMAGE_HEIGHT = 200;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID } from './constants';
|
|
1
|
+
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID, MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN } from './constants';
|
|
2
2
|
export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest, calcMinWidth, getMaxWidthForNestedNode, getMaxWidthForNestedNodeNext, currentMediaNodeWithPos } from './utils';
|
|
3
3
|
export { CommentBadge } from './CommentBadge';
|
|
4
4
|
export { CommentBadgeNext } from './CommentBadgeNext';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "94.
|
|
4
|
+
const packageVersion = "94.18.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
|
-
import { LAYOUT_COLUMN_PADDING } from '../styles';
|
|
4
|
+
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
|
|
5
5
|
import Resizer from './Resizer';
|
|
6
6
|
const breakoutSupportedNodes = ['layoutSection', 'expand', 'codeBlock'];
|
|
7
7
|
const getHandleStyle = node => {
|
|
@@ -17,7 +17,7 @@ const getHandleStyle = node => {
|
|
|
17
17
|
};
|
|
18
18
|
// expand and layout section elements have a negative margin applied
|
|
19
19
|
default:
|
|
20
|
-
const handleOffset = editorExperiment('nested-dnd', true) ?
|
|
20
|
+
const handleOffset = editorExperiment('nested-dnd', true) ? LAYOUT_SECTION_MARGIN * 2 + 8 : LAYOUT_COLUMN_PADDING * 2;
|
|
21
21
|
return {
|
|
22
22
|
left: {
|
|
23
23
|
left: `-${handleOffset}px`,
|
|
@@ -23,30 +23,30 @@ const columnLayoutSharedStyle = css({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const columnLayoutResponsiveSharedStyle = css({
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
27
|
+
'[data-layout-section]': {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
gap: "var(--ds-space-100, 8px)",
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
32
|
+
'& > *': {
|
|
33
|
+
flex: 1,
|
|
34
|
+
minWidth: 0
|
|
35
|
+
},
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
38
|
+
minWidth: 'initial'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
26
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
27
42
|
'.layout-section-container': {
|
|
28
43
|
containerType: 'inline-size',
|
|
29
44
|
containerName: 'layout-area',
|
|
30
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
31
46
|
'[data-layout-section]': {
|
|
32
|
-
display: 'grid',
|
|
33
|
-
gap: "var(--ds-space-200, 16px)",
|
|
34
|
-
gridTemplateColumns: `repeat(auto-fit, minmax(0, 1fr))`,
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
36
|
-
[`@container layout-area (max-width:${layoutBreakpointWidth.MEDIUM - 1}px) and (min-width: ${layoutBreakpointWidth.SMALL}px)`]: {
|
|
37
|
-
gridTemplateColumns: `repeat(1, 1fr)`,
|
|
38
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
39
|
-
'&[data-layout-columns="4"], &[data-layout-columns="5"]': {
|
|
40
|
-
gridTemplateColumns: `repeat(2, 1fr)`,
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
42
|
-
'& > :nth-child(5)': {
|
|
43
|
-
gridColumn: 'span 2'
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
48
|
-
[`@container layout-area (width
|
|
49
|
-
|
|
48
|
+
[`@container layout-area (max-width:${layoutBreakpointWidth.MEDIUM - 1}px)`]: {
|
|
49
|
+
flexDirection: 'column'
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "94.
|
|
16
|
+
const packageVersion = "94.18.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -3,6 +3,7 @@ export var MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = 320;
|
|
|
3
3
|
export var MEDIA_SINGLE_SNAP_GAP = 3;
|
|
4
4
|
export var MEDIA_SINGLE_HIGHLIGHT_GAP = 10;
|
|
5
5
|
export var MEDIA_SINGLE_HANDLE_MARGIN = 12;
|
|
6
|
+
export var MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN = 8;
|
|
6
7
|
export var MEDIA_SINGLE_GUTTER_SIZE = MEDIA_SINGLE_HANDLE_MARGIN * 2;
|
|
7
8
|
export var DEFAULT_IMAGE_WIDTH = 250;
|
|
8
9
|
export var DEFAULT_IMAGE_HEIGHT = 200;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID } from './constants';
|
|
1
|
+
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID, MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN } from './constants';
|
|
2
2
|
export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest, calcMinWidth, getMaxWidthForNestedNode, getMaxWidthForNestedNodeNext, currentMediaNodeWithPos } from './utils';
|
|
3
3
|
export { CommentBadge } from './CommentBadge';
|
|
4
4
|
export { CommentBadgeNext } from './CommentBadgeNext';
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "94.
|
|
10
|
+
var packageVersion = "94.18.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
3
3
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
|
-
import { LAYOUT_COLUMN_PADDING } from '../styles';
|
|
5
|
+
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
|
|
6
6
|
import Resizer from './Resizer';
|
|
7
7
|
var breakoutSupportedNodes = ['layoutSection', 'expand', 'codeBlock'];
|
|
8
8
|
var getHandleStyle = function getHandleStyle(node) {
|
|
@@ -18,7 +18,7 @@ var getHandleStyle = function getHandleStyle(node) {
|
|
|
18
18
|
};
|
|
19
19
|
// expand and layout section elements have a negative margin applied
|
|
20
20
|
default:
|
|
21
|
-
var handleOffset = editorExperiment('nested-dnd', true) ?
|
|
21
|
+
var handleOffset = editorExperiment('nested-dnd', true) ? LAYOUT_SECTION_MARGIN * 2 + 8 : LAYOUT_COLUMN_PADDING * 2;
|
|
22
22
|
return {
|
|
23
23
|
left: {
|
|
24
24
|
left: "-".concat(handleOffset, "px"),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _dataLayoutSection2;
|
|
3
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import { gridMediumMaxWidth, layoutBreakpointWidth } from '@atlaskit/editor-shared-styles';
|
|
@@ -23,28 +22,29 @@ var columnLayoutSharedStyle = css({
|
|
|
23
22
|
})
|
|
24
23
|
});
|
|
25
24
|
var columnLayoutResponsiveSharedStyle = css({
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
26
|
+
'[data-layout-section]': {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
gap: "var(--ds-space-100, 8px)",
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
31
|
+
'& > *': {
|
|
32
|
+
flex: 1,
|
|
33
|
+
minWidth: 0
|
|
34
|
+
},
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
36
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
37
|
+
minWidth: 'initial'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
26
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
27
41
|
'.layout-section-container': {
|
|
28
42
|
containerType: 'inline-size',
|
|
29
43
|
containerName: 'layout-area',
|
|
30
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
31
|
-
'[data-layout-section]': (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(0, 1fr))"
|
|
35
|
-
}, _defineProperty(_dataLayoutSection2, "@container layout-area (max-width:".concat(layoutBreakpointWidth.MEDIUM - 1, "px) and (min-width: ").concat(layoutBreakpointWidth.SMALL, "px)"), {
|
|
36
|
-
gridTemplateColumns: "repeat(1, 1fr)",
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
38
|
-
'&[data-layout-columns="4"], &[data-layout-columns="5"]': {
|
|
39
|
-
gridTemplateColumns: "repeat(2, 1fr)",
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
41
|
-
'& > :nth-child(5)': {
|
|
42
|
-
gridColumn: 'span 2'
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}), _defineProperty(_dataLayoutSection2, "@container layout-area (width < ".concat(layoutBreakpointWidth.SMALL, "px)"), {
|
|
46
|
-
gridTemplateColumns: "repeat(1, 1fr)"
|
|
47
|
-
}), _dataLayoutSection2)
|
|
45
|
+
'[data-layout-section]': _defineProperty({}, "@container layout-area (max-width:".concat(layoutBreakpointWidth.MEDIUM - 1, "px)"), {
|
|
46
|
+
flexDirection: 'column'
|
|
47
|
+
})
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "94.
|
|
24
|
+
var packageVersion = "94.18.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -4,6 +4,7 @@ export declare const MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = 320;
|
|
|
4
4
|
export declare const MEDIA_SINGLE_SNAP_GAP = 3;
|
|
5
5
|
export declare const MEDIA_SINGLE_HIGHLIGHT_GAP = 10;
|
|
6
6
|
export declare const MEDIA_SINGLE_HANDLE_MARGIN = 12;
|
|
7
|
+
export declare const MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN = 8;
|
|
7
8
|
export declare const MEDIA_SINGLE_GUTTER_SIZE: number;
|
|
8
9
|
export declare const DEFAULT_IMAGE_WIDTH = 250;
|
|
9
10
|
export declare const DEFAULT_IMAGE_HEIGHT = 200;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID, } from './constants';
|
|
1
|
+
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID, MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN, } from './constants';
|
|
2
2
|
export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest, calcMinWidth, getMaxWidthForNestedNode, getMaxWidthForNestedNodeNext, currentMediaNodeWithPos, } from './utils';
|
|
3
3
|
export { CommentBadge } from './CommentBadge';
|
|
4
4
|
export { CommentBadgeNext } from './CommentBadgeNext';
|
|
@@ -4,6 +4,7 @@ export declare const MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH = 320;
|
|
|
4
4
|
export declare const MEDIA_SINGLE_SNAP_GAP = 3;
|
|
5
5
|
export declare const MEDIA_SINGLE_HIGHLIGHT_GAP = 10;
|
|
6
6
|
export declare const MEDIA_SINGLE_HANDLE_MARGIN = 12;
|
|
7
|
+
export declare const MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN = 8;
|
|
7
8
|
export declare const MEDIA_SINGLE_GUTTER_SIZE: number;
|
|
8
9
|
export declare const DEFAULT_IMAGE_WIDTH = 250;
|
|
9
10
|
export declare const DEFAULT_IMAGE_HEIGHT = 200;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID, } from './constants';
|
|
1
|
+
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID, MEDIA_SINGLE_ADJACENT_HANDLE_MARGIN, } from './constants';
|
|
2
2
|
export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest, calcMinWidth, getMaxWidthForNestedNode, getMaxWidthForNestedNodeNext, currentMediaNodeWithPos, } from './utils';
|
|
3
3
|
export { CommentBadge } from './CommentBadge';
|
|
4
4
|
export { CommentBadgeNext } from './CommentBadgeNext';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "94.
|
|
3
|
+
"version": "94.18.1",
|
|
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/"
|
|
@@ -130,21 +130,21 @@
|
|
|
130
130
|
"@atlaskit/icon-object": "^6.7.0",
|
|
131
131
|
"@atlaskit/link-datasource": "^3.8.0",
|
|
132
132
|
"@atlaskit/link-picker": "^1.47.0",
|
|
133
|
-
"@atlaskit/media-card": "^78.
|
|
134
|
-
"@atlaskit/media-client": "^28.
|
|
133
|
+
"@atlaskit/media-card": "^78.13.0",
|
|
134
|
+
"@atlaskit/media-client": "^28.3.0",
|
|
135
135
|
"@atlaskit/media-client-react": "^2.3.0",
|
|
136
136
|
"@atlaskit/media-common": "^11.7.0",
|
|
137
137
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
138
138
|
"@atlaskit/media-picker": "^67.0.0",
|
|
139
139
|
"@atlaskit/media-ui": "^26.1.0",
|
|
140
|
-
"@atlaskit/media-viewer": "49.
|
|
140
|
+
"@atlaskit/media-viewer": "49.4.0",
|
|
141
141
|
"@atlaskit/mention": "^23.3.0",
|
|
142
142
|
"@atlaskit/menu": "^2.13.0",
|
|
143
143
|
"@atlaskit/onboarding": "^12.1.0",
|
|
144
144
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
145
145
|
"@atlaskit/popper": "^6.3.0",
|
|
146
146
|
"@atlaskit/primitives": "^13.1.0",
|
|
147
|
-
"@atlaskit/profilecard": "^20.
|
|
147
|
+
"@atlaskit/profilecard": "^20.10.0",
|
|
148
148
|
"@atlaskit/section-message": "^6.6.0",
|
|
149
149
|
"@atlaskit/smart-card": "^30.2.0",
|
|
150
150
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"@af/visual-regression": "*",
|
|
191
191
|
"@atlaskit/media-core": "^34.3.0",
|
|
192
192
|
"@atlaskit/media-test-helpers": "^34.6.0",
|
|
193
|
-
"@atlaskit/util-data-test": "^17.
|
|
193
|
+
"@atlaskit/util-data-test": "^17.13.0",
|
|
194
194
|
"@atlaskit/visual-regression": "*",
|
|
195
195
|
"@testing-library/dom": "^10.1.0",
|
|
196
196
|
"@testing-library/jest-dom": "^6.4.5",
|