@atlaskit/editor-common 107.2.0 → 107.2.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 +9 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/useBreakoutGuidelines.js +12 -3
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/useBreakoutGuidelines.js +13 -4
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/useBreakoutGuidelines.js +13 -4
- package/dist/esm/ui/DropList/index.js +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#174265](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/174265)
|
|
8
|
+
[`20a7224f572b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/20a7224f572b5) -
|
|
9
|
+
[ux] ED-28338: Fix layout guideline not visible on full width page
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 107.2.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
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 = "107.
|
|
19
|
+
var packageVersion = "107.2.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -9,6 +9,8 @@ exports.useBreakoutGuidelines = useBreakoutGuidelines;
|
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
14
|
var SNAP_GAP = exports.SNAP_GAP = 8;
|
|
13
15
|
var GUIDELINE_KEYS = {
|
|
14
16
|
lineLength: 'grid',
|
|
@@ -34,13 +36,20 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
|
|
|
34
36
|
var _ref = widthState || {},
|
|
35
37
|
width = _ref.width,
|
|
36
38
|
lineLength = _ref.lineLength;
|
|
37
|
-
var
|
|
39
|
+
var wideCalWithRatio = lineLength ? Math.round(lineLength * _editorSharedStyles.breakoutWideScaleRatio) : undefined;
|
|
40
|
+
// When page is full width, lineLength from widthState can be much wider than 760.
|
|
41
|
+
// But the lineLength variable here is being used like a const 760.
|
|
42
|
+
// when the page is full width, the calculation of wide is wrong.
|
|
43
|
+
// Actuall the wide is the wide breakout point, which is
|
|
44
|
+
var wide = (0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
|
|
38
45
|
var layoutCalculatedWidth = width ? width - ((0, _editorSharedStyles.akEditorGutterPaddingDynamic)() + dynamicFullWidthGuidelineOffset) * 2 : undefined;
|
|
39
46
|
var fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth) : undefined;
|
|
40
47
|
return {
|
|
41
48
|
wide: wide,
|
|
42
49
|
fullWidth: fullWidth,
|
|
43
|
-
lineLength
|
|
50
|
+
// When page is full width, lineLength from widthState can be much wider than 760.
|
|
51
|
+
// But the lineLength variable here is being used like a const 760.
|
|
52
|
+
lineLength: (0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorDefaultLayoutWidth : lineLength
|
|
44
53
|
};
|
|
45
54
|
}, [widthState, isResizing, dynamicFullWidthGuidelineOffset]),
|
|
46
55
|
lineLength = _useMemo.lineLength,
|
|
@@ -49,7 +58,7 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
|
|
|
49
58
|
|
|
50
59
|
// calculate snapping width
|
|
51
60
|
var defaultSnappingWidths = (0, _react.useMemo)(function () {
|
|
52
|
-
if (!fullWidth || !wide || !lineLength || fullWidth <= lineLength) {
|
|
61
|
+
if (!fullWidth || !wide || !lineLength || fullWidth <= ((0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorDefaultLayoutWidth : lineLength)) {
|
|
53
62
|
return null;
|
|
54
63
|
}
|
|
55
64
|
if (fullWidth - wide > SNAP_GAP) {
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "107.
|
|
26
|
+
var packageVersion = "107.2.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -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 = "107.
|
|
4
|
+
const packageVersion = "107.2.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
-
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
|
|
2
|
+
import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
5
|
export const SNAP_GAP = 8;
|
|
4
6
|
const GUIDELINE_KEYS = {
|
|
5
7
|
lineLength: 'grid',
|
|
@@ -26,19 +28,26 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing, dynamicFullWid
|
|
|
26
28
|
width,
|
|
27
29
|
lineLength
|
|
28
30
|
} = widthState || {};
|
|
29
|
-
const
|
|
31
|
+
const wideCalWithRatio = lineLength ? Math.round(lineLength * breakoutWideScaleRatio) : undefined;
|
|
32
|
+
// When page is full width, lineLength from widthState can be much wider than 760.
|
|
33
|
+
// But the lineLength variable here is being used like a const 760.
|
|
34
|
+
// when the page is full width, the calculation of wide is wrong.
|
|
35
|
+
// Actuall the wide is the wide breakout point, which is
|
|
36
|
+
const wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
|
|
30
37
|
const layoutCalculatedWidth = width ? width - (akEditorGutterPaddingDynamic() + dynamicFullWidthGuidelineOffset) * 2 : undefined;
|
|
31
38
|
const fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, akEditorFullWidthLayoutWidth) : undefined;
|
|
32
39
|
return {
|
|
33
40
|
wide,
|
|
34
41
|
fullWidth,
|
|
35
|
-
lineLength
|
|
42
|
+
// When page is full width, lineLength from widthState can be much wider than 760.
|
|
43
|
+
// But the lineLength variable here is being used like a const 760.
|
|
44
|
+
lineLength: editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength
|
|
36
45
|
};
|
|
37
46
|
}, [widthState, isResizing, dynamicFullWidthGuidelineOffset]);
|
|
38
47
|
|
|
39
48
|
// calculate snapping width
|
|
40
49
|
const defaultSnappingWidths = useMemo(() => {
|
|
41
|
-
if (!fullWidth || !wide || !lineLength || fullWidth <= lineLength) {
|
|
50
|
+
if (!fullWidth || !wide || !lineLength || fullWidth <= (editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength)) {
|
|
42
51
|
return null;
|
|
43
52
|
}
|
|
44
53
|
if (fullWidth - wide > SNAP_GAP) {
|
|
@@ -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 = "107.
|
|
16
|
+
const packageVersion = "107.2.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -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 = "107.
|
|
10
|
+
var packageVersion = "107.2.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useCallback, useMemo, useState } from 'react';
|
|
3
|
-
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
6
|
export var SNAP_GAP = 8;
|
|
5
7
|
var GUIDELINE_KEYS = {
|
|
6
8
|
lineLength: 'grid',
|
|
@@ -26,13 +28,20 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
|
|
|
26
28
|
var _ref = widthState || {},
|
|
27
29
|
width = _ref.width,
|
|
28
30
|
lineLength = _ref.lineLength;
|
|
29
|
-
var
|
|
31
|
+
var wideCalWithRatio = lineLength ? Math.round(lineLength * breakoutWideScaleRatio) : undefined;
|
|
32
|
+
// When page is full width, lineLength from widthState can be much wider than 760.
|
|
33
|
+
// But the lineLength variable here is being used like a const 760.
|
|
34
|
+
// when the page is full width, the calculation of wide is wrong.
|
|
35
|
+
// Actuall the wide is the wide breakout point, which is
|
|
36
|
+
var wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
|
|
30
37
|
var layoutCalculatedWidth = width ? width - (akEditorGutterPaddingDynamic() + dynamicFullWidthGuidelineOffset) * 2 : undefined;
|
|
31
38
|
var fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, akEditorFullWidthLayoutWidth) : undefined;
|
|
32
39
|
return {
|
|
33
40
|
wide: wide,
|
|
34
41
|
fullWidth: fullWidth,
|
|
35
|
-
lineLength
|
|
42
|
+
// When page is full width, lineLength from widthState can be much wider than 760.
|
|
43
|
+
// But the lineLength variable here is being used like a const 760.
|
|
44
|
+
lineLength: editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength
|
|
36
45
|
};
|
|
37
46
|
}, [widthState, isResizing, dynamicFullWidthGuidelineOffset]),
|
|
38
47
|
lineLength = _useMemo.lineLength,
|
|
@@ -41,7 +50,7 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing) {
|
|
|
41
50
|
|
|
42
51
|
// calculate snapping width
|
|
43
52
|
var defaultSnappingWidths = useMemo(function () {
|
|
44
|
-
if (!fullWidth || !wide || !lineLength || fullWidth <= lineLength) {
|
|
53
|
+
if (!fullWidth || !wide || !lineLength || fullWidth <= (editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorDefaultLayoutWidth : lineLength)) {
|
|
45
54
|
return null;
|
|
46
55
|
}
|
|
47
56
|
if (fullWidth - wide > SNAP_GAP) {
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "107.
|
|
23
|
+
var packageVersion = "107.2.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "107.2.
|
|
3
|
+
"version": "107.2.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/"
|
|
@@ -147,12 +147,12 @@
|
|
|
147
147
|
"@atlaskit/link-datasource": "^4.11.0",
|
|
148
148
|
"@atlaskit/link-picker": "^3.5.0",
|
|
149
149
|
"@atlaskit/media-card": "^79.3.0",
|
|
150
|
-
"@atlaskit/media-client": "^34.
|
|
150
|
+
"@atlaskit/media-client": "^34.1.0",
|
|
151
151
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
152
152
|
"@atlaskit/media-common": "^12.2.0",
|
|
153
153
|
"@atlaskit/media-file-preview": "^0.11.0",
|
|
154
154
|
"@atlaskit/media-picker": "^70.0.0",
|
|
155
|
-
"@atlaskit/media-ui": "^28.
|
|
155
|
+
"@atlaskit/media-ui": "^28.4.0",
|
|
156
156
|
"@atlaskit/media-viewer": "^52.3.0",
|
|
157
157
|
"@atlaskit/mention": "^24.2.0",
|
|
158
158
|
"@atlaskit/menu": "^8.0.0",
|
|
@@ -161,16 +161,16 @@
|
|
|
161
161
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
162
162
|
"@atlaskit/popper": "^7.0.0",
|
|
163
163
|
"@atlaskit/primitives": "^14.9.0",
|
|
164
|
-
"@atlaskit/profilecard": "^23.
|
|
164
|
+
"@atlaskit/profilecard": "^23.21.0",
|
|
165
165
|
"@atlaskit/react-ufo": "^3.13.0",
|
|
166
166
|
"@atlaskit/section-message": "^8.2.0",
|
|
167
|
-
"@atlaskit/smart-card": "^38.
|
|
167
|
+
"@atlaskit/smart-card": "^38.14.0",
|
|
168
168
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
169
169
|
"@atlaskit/spinner": "^18.0.0",
|
|
170
170
|
"@atlaskit/task-decision": "^19.2.0",
|
|
171
171
|
"@atlaskit/textfield": "^8.0.0",
|
|
172
172
|
"@atlaskit/theme": "^18.0.0",
|
|
173
|
-
"@atlaskit/tmp-editor-statsig": "^8.
|
|
173
|
+
"@atlaskit/tmp-editor-statsig": "^8.1.0",
|
|
174
174
|
"@atlaskit/tokens": "^5.4.0",
|
|
175
175
|
"@atlaskit/tooltip": "^20.3.0",
|
|
176
176
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -299,6 +299,9 @@
|
|
|
299
299
|
"platform_editor_inline_node_virt_threshold_override": {
|
|
300
300
|
"type": "boolean"
|
|
301
301
|
},
|
|
302
|
+
"platform_editor_layout_guideline_full_width_fix": {
|
|
303
|
+
"type": "boolean"
|
|
304
|
+
},
|
|
302
305
|
"confluence-issue-terminology-refresh": {
|
|
303
306
|
"type": "boolean"
|
|
304
307
|
},
|
|
@@ -314,9 +317,6 @@
|
|
|
314
317
|
"platform_editor_nested_dnd_styles_changes": {
|
|
315
318
|
"type": "boolean"
|
|
316
319
|
},
|
|
317
|
-
"platform_editor_lcm_nested_panel_icon_fix": {
|
|
318
|
-
"type": "boolean"
|
|
319
|
-
},
|
|
320
320
|
"editor_a11y_aria_label_removal_popup": {
|
|
321
321
|
"type": "boolean"
|
|
322
322
|
},
|