@atlaskit/editor-common 112.8.3 → 112.9.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 +20 -0
- package/dist/cjs/media-single/ExternalImageBadge.js +7 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/styled.js +6 -1
- package/dist/es2019/media-single/ExternalImageBadge.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/styled.js +6 -1
- package/dist/esm/media-single/ExternalImageBadge.js +7 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/styled.js +6 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`9f5fba61d4c9d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9f5fba61d4c9d) -
|
|
8
|
+
do not show external badge for images hosted on bitbucket.org
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 112.8.4
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`ca2338799c141`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca2338799c141) -
|
|
19
|
+
[ux] Fix media cards and media singles to use the correct border radius in the editor, renderer
|
|
20
|
+
and inline media player.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 112.8.3
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _statusInformation = _interopRequireDefault(require("@atlaskit/icon/core/status-information"));
|
|
11
11
|
var _primitives = require("@atlaskit/primitives");
|
|
12
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
13
14
|
var _media = require("../media");
|
|
14
15
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
@@ -21,6 +22,7 @@ var baseStyles = (0, _primitives.xcss)({
|
|
|
21
22
|
cursor: 'pointer'
|
|
22
23
|
});
|
|
23
24
|
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
|
|
25
|
+
var NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
24
26
|
var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
25
27
|
if (!url) {
|
|
26
28
|
return false;
|
|
@@ -38,6 +40,11 @@ var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
|
38
40
|
if (protocol === 'data:') {
|
|
39
41
|
return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
|
|
40
42
|
}
|
|
43
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_media_external_badge_bbc_fix', 'isEnable', true)) {
|
|
44
|
+
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(function (host) {
|
|
45
|
+
return hostname === host || hostname.endsWith(".".concat(host));
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
41
48
|
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
42
49
|
return hostname === host || hostname.endsWith(".".concat(host));
|
|
43
50
|
}));
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
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); }
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "112.8.
|
|
22
|
+
var packageVersion = "112.8.4";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -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 = "112.8.
|
|
27
|
+
var packageVersion = "112.8.4";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -282,6 +282,11 @@ MediaWrapper.displayName = 'WrapperMediaSingle';
|
|
|
282
282
|
|
|
283
283
|
var MediaBorderGapFiller = exports.MediaBorderGapFiller = function MediaBorderGapFiller(_ref4) {
|
|
284
284
|
var borderColor = _ref4.borderColor;
|
|
285
|
+
// [FEATURE FLAG: platform_editor_media_border_radius_fix]
|
|
286
|
+
// Fixes border radius to properly match image with 8px radius
|
|
287
|
+
// To clean up: remove conditional, keep only flag-on behavior ('8px')
|
|
288
|
+
var borderRadius = (0, _platformFeatureFlags.fg)('platform_editor_media_border_radius_fix') ? "var(--ds-radius-large, 8px)" : '1px'; // OLD BEHAVIOR (to be removed when flag is cleaned up)
|
|
289
|
+
|
|
285
290
|
return (0, _react2.jsx)("div", {
|
|
286
291
|
style: {
|
|
287
292
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -290,7 +295,7 @@ var MediaBorderGapFiller = exports.MediaBorderGapFiller = function MediaBorderGa
|
|
|
290
295
|
inset: '0px',
|
|
291
296
|
border: "0.5px solid ".concat(borderColor),
|
|
292
297
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
293
|
-
borderRadius:
|
|
298
|
+
borderRadius: borderRadius
|
|
294
299
|
}
|
|
295
300
|
});
|
|
296
301
|
};
|
|
@@ -3,6 +3,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/core/status-information';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
5
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
8
|
import { externalMediaMessages } from '../media';
|
|
8
9
|
const baseStyles = xcss({
|
|
@@ -13,6 +14,7 @@ const baseStyles = xcss({
|
|
|
13
14
|
cursor: 'pointer'
|
|
14
15
|
});
|
|
15
16
|
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
|
|
17
|
+
const NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
16
18
|
export const isUnbadgedUrl = url => {
|
|
17
19
|
if (!url) {
|
|
18
20
|
return false;
|
|
@@ -32,6 +34,9 @@ export const isUnbadgedUrl = url => {
|
|
|
32
34
|
if (protocol === 'data:') {
|
|
33
35
|
return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
|
|
34
36
|
}
|
|
37
|
+
if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnable', true)) {
|
|
38
|
+
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(host => hostname === host || hostname.endsWith(`.${host}`)));
|
|
39
|
+
}
|
|
35
40
|
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(host => hostname === host || hostname.endsWith(`.${host}`)));
|
|
36
41
|
};
|
|
37
42
|
export const ExternalImageBadge = ({
|
|
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
|
|
|
4
4
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
5
5
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
6
6
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
7
|
-
const packageVersion = "112.8.
|
|
7
|
+
const packageVersion = "112.8.4";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "112.8.
|
|
17
|
+
const packageVersion = "112.8.4";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -349,6 +349,11 @@ MediaWrapper.displayName = 'WrapperMediaSingle';
|
|
|
349
349
|
export const MediaBorderGapFiller = ({
|
|
350
350
|
borderColor
|
|
351
351
|
}) => {
|
|
352
|
+
// [FEATURE FLAG: platform_editor_media_border_radius_fix]
|
|
353
|
+
// Fixes border radius to properly match image with 8px radius
|
|
354
|
+
// To clean up: remove conditional, keep only flag-on behavior ('8px')
|
|
355
|
+
const borderRadius = fg('platform_editor_media_border_radius_fix') ? "var(--ds-radius-large, 8px)" : '1px'; // OLD BEHAVIOR (to be removed when flag is cleaned up)
|
|
356
|
+
|
|
352
357
|
return jsx("div", {
|
|
353
358
|
style: {
|
|
354
359
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -357,7 +362,7 @@ export const MediaBorderGapFiller = ({
|
|
|
357
362
|
inset: '0px',
|
|
358
363
|
border: `0.5px solid ${borderColor}`,
|
|
359
364
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
360
|
-
borderRadius
|
|
365
|
+
borderRadius
|
|
361
366
|
}
|
|
362
367
|
});
|
|
363
368
|
};
|
|
@@ -3,6 +3,7 @@ import { useIntl } from 'react-intl-next';
|
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/core/status-information';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
5
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
8
|
import { externalMediaMessages } from '../media';
|
|
8
9
|
var baseStyles = xcss({
|
|
@@ -13,6 +14,7 @@ var baseStyles = xcss({
|
|
|
13
14
|
cursor: 'pointer'
|
|
14
15
|
});
|
|
15
16
|
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
|
|
17
|
+
var NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
|
|
16
18
|
export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
17
19
|
if (!url) {
|
|
18
20
|
return false;
|
|
@@ -30,6 +32,11 @@ export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
|
30
32
|
if (protocol === 'data:') {
|
|
31
33
|
return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
|
|
32
34
|
}
|
|
35
|
+
if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnable', true)) {
|
|
36
|
+
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(function (host) {
|
|
37
|
+
return hostname === host || hostname.endsWith(".".concat(host));
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
33
40
|
return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
34
41
|
return hostname === host || hostname.endsWith(".".concat(host));
|
|
35
42
|
}));
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "112.8.
|
|
13
|
+
var packageVersion = "112.8.4";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "112.8.
|
|
24
|
+
var packageVersion = "112.8.4";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -273,6 +273,11 @@ MediaWrapper.displayName = 'WrapperMediaSingle';
|
|
|
273
273
|
|
|
274
274
|
export var MediaBorderGapFiller = function MediaBorderGapFiller(_ref4) {
|
|
275
275
|
var borderColor = _ref4.borderColor;
|
|
276
|
+
// [FEATURE FLAG: platform_editor_media_border_radius_fix]
|
|
277
|
+
// Fixes border radius to properly match image with 8px radius
|
|
278
|
+
// To clean up: remove conditional, keep only flag-on behavior ('8px')
|
|
279
|
+
var borderRadius = fg('platform_editor_media_border_radius_fix') ? "var(--ds-radius-large, 8px)" : '1px'; // OLD BEHAVIOR (to be removed when flag is cleaned up)
|
|
280
|
+
|
|
276
281
|
return jsx("div", {
|
|
277
282
|
style: {
|
|
278
283
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -281,7 +286,7 @@ export var MediaBorderGapFiller = function MediaBorderGapFiller(_ref4) {
|
|
|
281
286
|
inset: '0px',
|
|
282
287
|
border: "0.5px solid ".concat(borderColor),
|
|
283
288
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
284
|
-
borderRadius:
|
|
289
|
+
borderRadius: borderRadius
|
|
285
290
|
}
|
|
286
291
|
});
|
|
287
292
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.9.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/"
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.18.0",
|
|
36
36
|
"@atlaskit/analytics-listeners": "^10.0.0",
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^7.2.0",
|
|
38
|
-
"@atlaskit/analytics-next": "^11.
|
|
38
|
+
"@atlaskit/analytics-next": "^11.2.0",
|
|
39
39
|
"@atlaskit/atlassian-context": "^0.6.0",
|
|
40
40
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
41
41
|
"@atlaskit/button": "^23.10.0",
|
|
42
42
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
43
43
|
"@atlaskit/css": "^0.19.0",
|
|
44
44
|
"@atlaskit/custom-steps": "^0.16.0",
|
|
45
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
45
|
+
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
46
46
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
47
47
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"@atlaskit/status": "^3.1.0",
|
|
82
82
|
"@atlaskit/task-decision": "^19.3.0",
|
|
83
83
|
"@atlaskit/textfield": "^8.2.0",
|
|
84
|
-
"@atlaskit/tmp-editor-statsig": "^45.
|
|
85
|
-
"@atlaskit/tokens": "^11.
|
|
84
|
+
"@atlaskit/tmp-editor-statsig": "^45.1.0",
|
|
85
|
+
"@atlaskit/tokens": "^11.2.0",
|
|
86
86
|
"@atlaskit/tooltip": "^21.0.0",
|
|
87
87
|
"@atlaskit/width-detector": "^5.0.0",
|
|
88
88
|
"@babel/runtime": "^7.0.0",
|
|
@@ -272,6 +272,9 @@
|
|
|
272
272
|
},
|
|
273
273
|
"tinymce_display_unknown_macro_body_content": {
|
|
274
274
|
"type": "boolean"
|
|
275
|
+
},
|
|
276
|
+
"platform_editor_media_border_radius_fix": {
|
|
277
|
+
"type": "boolean"
|
|
275
278
|
}
|
|
276
279
|
}
|
|
277
280
|
}
|