@atlaskit/editor-common 112.9.1 → 112.10.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 +21 -0
- package/dist/cjs/media-inline/inline-image-wrapper.js +15 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/builder.js +23 -6
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/media-inline/inline-image-wrapper.js +15 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/builder.js +23 -6
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/media-inline/inline-image-wrapper.js +15 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/builder.js +23 -6
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/media-inline/inline-image-wrapper.d.ts +1 -1
- package/dist/types/preset/plugin-injection-api.d.ts +1 -1
- package/dist/types-ts4.5/media-inline/inline-image-wrapper.d.ts +1 -1
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 112.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`6da6979e0583c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6da6979e0583c) -
|
|
14
|
+
fix a11y issue for InlineImageWrapper for media inline
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`673732f902814`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/673732f902814) -
|
|
19
|
+
Add error handling with plugin context to EditorPresetBuilder to improve debugging of plugin
|
|
20
|
+
initialization failures. When a plugin fails to initialize, the name of the plugin is added to the
|
|
21
|
+
error message before it's thrown.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 112.9.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
12
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
13
|
var _styles = require("./styles");
|
|
13
14
|
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; }
|
|
14
15
|
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; } /**
|
|
@@ -35,8 +36,17 @@ var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrappe
|
|
|
35
36
|
onClick = _ref.onClick;
|
|
36
37
|
var borderStyleVars = borderSize && borderColor ? (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _styles.INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), _styles.INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, (0, _editorPalette.hexToEditorBorderPaletteColor)(borderColor) || borderColor) : {};
|
|
37
38
|
var aspectStyleVars = aspectRatio ? (0, _defineProperty2.default)({}, _styles.INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, aspectRatio) : {};
|
|
39
|
+
var onKeyDown = function onKeyDown(e) {
|
|
40
|
+
if ((0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true)) {
|
|
41
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
onClick(e);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
};
|
|
38
48
|
return (
|
|
39
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
49
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
40
50
|
(0, _react.jsx)("span", (0, _extends2.default)({
|
|
41
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
42
52
|
style: _objectSpread(_objectSpread({}, borderStyleVars), aspectStyleVars)
|
|
@@ -51,7 +61,10 @@ var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrappe
|
|
|
51
61
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
52
62
|
isSelected && _styles.selectedStyle],
|
|
53
63
|
"data-testid": "inline-image-wrapper",
|
|
54
|
-
|
|
64
|
+
role: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? 'button' : undefined,
|
|
65
|
+
tabIndex: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? 0 : undefined,
|
|
66
|
+
onClick: onClick,
|
|
67
|
+
onKeyDown: onKeyDown
|
|
55
68
|
// Ignored via go/ees005
|
|
56
69
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
57
70
|
}, htmlAttrs), (0, _react.jsx)("span", {
|
|
@@ -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 = "
|
|
22
|
+
var packageVersion = "112.10.1";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -11,6 +11,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
15
|
var _eventDispatcher = require("../event-dispatcher");
|
|
15
16
|
/*********************
|
|
16
17
|
* *
|
|
@@ -635,12 +636,28 @@ var EditorPresetBuilder = exports.EditorPresetBuilder = /*#__PURE__*/function ()
|
|
|
635
636
|
if (typeof fn !== 'function') {
|
|
636
637
|
return null;
|
|
637
638
|
}
|
|
638
|
-
var plugin
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
639
|
+
var plugin;
|
|
640
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_improve_preset_builder_logging', 'isEnabled', true)) {
|
|
641
|
+
try {
|
|
642
|
+
plugin = pluginInjectionAPI ? fn({
|
|
643
|
+
config: config,
|
|
644
|
+
api: pluginInjectionAPI.api()
|
|
645
|
+
}) : fn({
|
|
646
|
+
config: config
|
|
647
|
+
});
|
|
648
|
+
} catch (error) {
|
|
649
|
+
var pluginName = fn.name || 'unknown';
|
|
650
|
+
var enhancedError = error instanceof Error ? new Error("Failed to initialize plugin '".concat(pluginName, "': ").concat(error.message)) : new Error("Failed to initialize plugin '".concat(pluginName, "'"));
|
|
651
|
+
throw enhancedError;
|
|
652
|
+
}
|
|
653
|
+
} else {
|
|
654
|
+
plugin = pluginInjectionAPI ? fn({
|
|
655
|
+
config: config,
|
|
656
|
+
api: pluginInjectionAPI.api()
|
|
657
|
+
}) : fn({
|
|
658
|
+
config: config
|
|
659
|
+
});
|
|
660
|
+
}
|
|
644
661
|
if (plugin && excludePlugins !== null && excludePlugins !== void 0 && excludePlugins.has(plugin.name)) {
|
|
645
662
|
return null;
|
|
646
663
|
}
|
|
@@ -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 = "
|
|
27
|
+
var packageVersion = "112.10.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -7,6 +7,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
10
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
11
|
import { borderStyle, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, INLINE_IMAGE_WRAPPER_CLASS_NAME, selectedStyle, wrapperStyle } from './styles';
|
|
11
12
|
|
|
12
13
|
// The MediaImage component needs to obtain its parent's dimensions.
|
|
@@ -34,8 +35,17 @@ export const InlineImageWrapper = ({
|
|
|
34
35
|
const aspectStyleVars = aspectRatio ? {
|
|
35
36
|
[INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY]: aspectRatio
|
|
36
37
|
} : {};
|
|
38
|
+
const onKeyDown = e => {
|
|
39
|
+
if (expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true)) {
|
|
40
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
onClick(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
};
|
|
37
47
|
return (
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
48
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
39
49
|
jsx("span", _extends({
|
|
40
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
41
51
|
style: {
|
|
@@ -53,7 +63,10 @@ export const InlineImageWrapper = ({
|
|
|
53
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
54
64
|
isSelected && selectedStyle],
|
|
55
65
|
"data-testid": "inline-image-wrapper",
|
|
56
|
-
|
|
66
|
+
role: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? 'button' : undefined,
|
|
67
|
+
tabIndex: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? 0 : undefined,
|
|
68
|
+
onClick: onClick,
|
|
69
|
+
onKeyDown: onKeyDown
|
|
57
70
|
// Ignored via go/ees005
|
|
58
71
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
59
72
|
}, htmlAttrs), jsx("span", {
|
|
@@ -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 = "
|
|
7
|
+
const packageVersion = "112.10.1";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { EventDispatcher } from '../event-dispatcher';
|
|
3
4
|
|
|
4
5
|
/*********************
|
|
@@ -632,12 +633,28 @@ export class EditorPresetBuilder {
|
|
|
632
633
|
if (typeof fn !== 'function') {
|
|
633
634
|
return null;
|
|
634
635
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
636
|
+
let plugin;
|
|
637
|
+
if (expValEquals('platform_editor_improve_preset_builder_logging', 'isEnabled', true)) {
|
|
638
|
+
try {
|
|
639
|
+
plugin = pluginInjectionAPI ? fn({
|
|
640
|
+
config,
|
|
641
|
+
api: pluginInjectionAPI.api()
|
|
642
|
+
}) : fn({
|
|
643
|
+
config
|
|
644
|
+
});
|
|
645
|
+
} catch (error) {
|
|
646
|
+
const pluginName = fn.name || 'unknown';
|
|
647
|
+
const enhancedError = error instanceof Error ? new Error(`Failed to initialize plugin '${pluginName}': ${error.message}`) : new Error(`Failed to initialize plugin '${pluginName}'`);
|
|
648
|
+
throw enhancedError;
|
|
649
|
+
}
|
|
650
|
+
} else {
|
|
651
|
+
plugin = pluginInjectionAPI ? fn({
|
|
652
|
+
config,
|
|
653
|
+
api: pluginInjectionAPI.api()
|
|
654
|
+
}) : fn({
|
|
655
|
+
config
|
|
656
|
+
});
|
|
657
|
+
}
|
|
641
658
|
if (plugin && excludePlugins !== null && excludePlugins !== void 0 && excludePlugins.has(plugin.name)) {
|
|
642
659
|
return null;
|
|
643
660
|
}
|
|
@@ -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 = "
|
|
17
|
+
const packageVersion = "112.10.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -10,6 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import { borderStyle, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, INLINE_IMAGE_WRAPPER_CLASS_NAME, selectedStyle, wrapperStyle } from './styles';
|
|
14
15
|
|
|
15
16
|
// The MediaImage component needs to obtain its parent's dimensions.
|
|
@@ -32,8 +33,17 @@ export var InlineImageWrapper = function InlineImageWrapper(_ref) {
|
|
|
32
33
|
onClick = _ref.onClick;
|
|
33
34
|
var borderStyleVars = borderSize && borderColor ? _defineProperty(_defineProperty({}, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, hexToEditorBorderPaletteColor(borderColor) || borderColor) : {};
|
|
34
35
|
var aspectStyleVars = aspectRatio ? _defineProperty({}, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, aspectRatio) : {};
|
|
36
|
+
var onKeyDown = function onKeyDown(e) {
|
|
37
|
+
if (expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true)) {
|
|
38
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
onClick(e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return undefined;
|
|
44
|
+
};
|
|
35
45
|
return (
|
|
36
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
46
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
37
47
|
jsx("span", _extends({
|
|
38
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
39
49
|
style: _objectSpread(_objectSpread({}, borderStyleVars), aspectStyleVars)
|
|
@@ -48,7 +58,10 @@ export var InlineImageWrapper = function InlineImageWrapper(_ref) {
|
|
|
48
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
49
59
|
isSelected && selectedStyle],
|
|
50
60
|
"data-testid": "inline-image-wrapper",
|
|
51
|
-
|
|
61
|
+
role: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? 'button' : undefined,
|
|
62
|
+
tabIndex: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? 0 : undefined,
|
|
63
|
+
onClick: onClick,
|
|
64
|
+
onKeyDown: onKeyDown
|
|
52
65
|
// Ignored via go/ees005
|
|
53
66
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
54
67
|
}, htmlAttrs), jsx("span", {
|
|
@@ -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 = "
|
|
13
|
+
var packageVersion = "112.10.1";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -4,6 +4,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
4
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
import { EventDispatcher } from '../event-dispatcher';
|
|
8
9
|
|
|
9
10
|
/*********************
|
|
@@ -666,12 +667,28 @@ export var EditorPresetBuilder = /*#__PURE__*/function () {
|
|
|
666
667
|
if (typeof fn !== 'function') {
|
|
667
668
|
return null;
|
|
668
669
|
}
|
|
669
|
-
var plugin
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
670
|
+
var plugin;
|
|
671
|
+
if (expValEquals('platform_editor_improve_preset_builder_logging', 'isEnabled', true)) {
|
|
672
|
+
try {
|
|
673
|
+
plugin = pluginInjectionAPI ? fn({
|
|
674
|
+
config: config,
|
|
675
|
+
api: pluginInjectionAPI.api()
|
|
676
|
+
}) : fn({
|
|
677
|
+
config: config
|
|
678
|
+
});
|
|
679
|
+
} catch (error) {
|
|
680
|
+
var pluginName = fn.name || 'unknown';
|
|
681
|
+
var enhancedError = error instanceof Error ? new Error("Failed to initialize plugin '".concat(pluginName, "': ").concat(error.message)) : new Error("Failed to initialize plugin '".concat(pluginName, "'"));
|
|
682
|
+
throw enhancedError;
|
|
683
|
+
}
|
|
684
|
+
} else {
|
|
685
|
+
plugin = pluginInjectionAPI ? fn({
|
|
686
|
+
config: config,
|
|
687
|
+
api: pluginInjectionAPI.api()
|
|
688
|
+
}) : fn({
|
|
689
|
+
config: config
|
|
690
|
+
});
|
|
691
|
+
}
|
|
675
692
|
if (plugin && excludePlugins !== null && excludePlugins !== void 0 && excludePlugins.has(plugin.name)) {
|
|
676
693
|
return null;
|
|
677
694
|
}
|
|
@@ -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 = "
|
|
24
|
+
var packageVersion = "112.10.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -13,7 +13,7 @@ type Props = {
|
|
|
13
13
|
[key: string]: string | number | undefined;
|
|
14
14
|
};
|
|
15
15
|
isSelected?: boolean;
|
|
16
|
-
onClick
|
|
16
|
+
onClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
17
17
|
};
|
|
18
18
|
export declare const InlineImageWrapper: ({ children, isSelected, aspectRatio, borderSize, borderColor, htmlAttrs, onClick, }: React.PropsWithChildren<Props>) => jsx.JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -48,7 +48,7 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
|
|
|
48
48
|
private actionsAPI;
|
|
49
49
|
private commandsAPI;
|
|
50
50
|
private plugins;
|
|
51
|
-
constructor({ getEditorState, getEditorView, fireAnalyticsEvent, appearance }: PluginInjectionAPIProps);
|
|
51
|
+
constructor({ getEditorState, getEditorView, fireAnalyticsEvent, appearance, }: PluginInjectionAPIProps);
|
|
52
52
|
/**
|
|
53
53
|
* Returns PM plugins from internally-registered plugins (e.g. the core plugin)
|
|
54
54
|
* that are not processed through the normal preset builder flow.
|
|
@@ -13,7 +13,7 @@ type Props = {
|
|
|
13
13
|
[key: string]: string | number | undefined;
|
|
14
14
|
};
|
|
15
15
|
isSelected?: boolean;
|
|
16
|
-
onClick
|
|
16
|
+
onClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
17
17
|
};
|
|
18
18
|
export declare const InlineImageWrapper: ({ children, isSelected, aspectRatio, borderSize, borderColor, htmlAttrs, onClick, }: React.PropsWithChildren<Props>) => jsx.JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -48,7 +48,7 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
|
|
|
48
48
|
private actionsAPI;
|
|
49
49
|
private commandsAPI;
|
|
50
50
|
private plugins;
|
|
51
|
-
constructor({ getEditorState, getEditorView, fireAnalyticsEvent, appearance }: PluginInjectionAPIProps);
|
|
51
|
+
constructor({ getEditorState, getEditorView, fireAnalyticsEvent, appearance, }: PluginInjectionAPIProps);
|
|
52
52
|
/**
|
|
53
53
|
* Returns PM plugins from internally-registered plugins (e.g. the core plugin)
|
|
54
54
|
* that are not processed through the normal preset builder flow.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.10.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/"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/editor-toolbar": "^0.20.0",
|
|
52
52
|
"@atlaskit/editor-toolbar-model": "^0.4.0",
|
|
53
53
|
"@atlaskit/emoji": "^69.10.0",
|
|
54
|
-
"@atlaskit/icon": "^33.
|
|
54
|
+
"@atlaskit/icon": "^33.1.0",
|
|
55
55
|
"@atlaskit/icon-object": "^7.5.0",
|
|
56
56
|
"@atlaskit/link": "^3.3.0",
|
|
57
57
|
"@atlaskit/link-datasource": "^4.34.0",
|
|
@@ -75,14 +75,14 @@
|
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
76
|
"@atlaskit/react-ufo": "^5.5.0",
|
|
77
77
|
"@atlaskit/section-message": "^8.12.0",
|
|
78
|
-
"@atlaskit/smart-card": "^43.
|
|
78
|
+
"@atlaskit/smart-card": "^43.28.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
80
80
|
"@atlaskit/spinner": "^19.0.0",
|
|
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": "^
|
|
85
|
-
"@atlaskit/tokens": "^11.
|
|
84
|
+
"@atlaskit/tmp-editor-statsig": "^47.0.0",
|
|
85
|
+
"@atlaskit/tokens": "^11.3.0",
|
|
86
86
|
"@atlaskit/tooltip": "^21.0.0",
|
|
87
87
|
"@atlaskit/width-detector": "^5.0.0",
|
|
88
88
|
"@babel/runtime": "^7.0.0",
|