@atlaskit/editor-common 134.16.4 → 134.18.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 +19 -0
- package/dist/cjs/extensibility/extensionNodeView.js +8 -1
- package/dist/cjs/media-inline/media-inline-image-card.js +16 -6
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/extensionNodeView.js +7 -1
- package/dist/es2019/media-inline/media-inline-image-card.js +16 -6
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/extensionNodeView.js +8 -1
- package/dist/esm/media-inline/media-inline-image-card.js +16 -6
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensibility/extensionNodeView.d.ts +1 -0
- package/dist/types/media-inline/media-inline-image-card.d.ts +4 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 134.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8bcfd4cbc0135`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8bcfd4cbc0135) -
|
|
8
|
+
Scope generated media and native embed entrance animations to the final Rovo create insertion
|
|
9
|
+
using existing media and extension plugin state behind cwr_remix_animate_stream_only.
|
|
10
|
+
|
|
11
|
+
## 134.17.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`b277bd792e5dc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b277bd792e5dc) -
|
|
16
|
+
`@atlaskit/editor-common`: `MediaInlineImageCard` takes an optional `mediaViewerExtensions` prop.
|
|
17
|
+
With the `cc_comments_media_viewer_sidebar` experiment on, it passes the extensions to the Media
|
|
18
|
+
Viewer it opens and calls `onSelectedItemChange` when it opens and closes.
|
|
19
|
+
|
|
20
|
+
`@atlaskit/renderer` passes `mediaViewerExtensions` to inline media and external images.
|
|
21
|
+
|
|
3
22
|
## 134.16.4
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -16,6 +16,7 @@ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
19
20
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
20
21
|
var _reactCompilerGating = require("@atlaskit/react-compiler-gating");
|
|
21
22
|
var _coreUtils = require("../core-utils");
|
|
@@ -25,6 +26,8 @@ var _ExtensionNodeWrapper = require("./ExtensionNodeWrapper");
|
|
|
25
26
|
var _nativeEmbedExtension = require("./nativeEmbedExtension");
|
|
26
27
|
var _preserveRemixNodeView = require("./preserveRemixNodeView");
|
|
27
28
|
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); }
|
|
29
|
+
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; }
|
|
30
|
+
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; }
|
|
28
31
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
29
32
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
33
|
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
@@ -390,11 +393,15 @@ function ExtensionNodeRender(_ref2) {
|
|
|
390
393
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
391
394
|
function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionLoadingHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, rendererExtensionHandlers, intl) {
|
|
392
395
|
return function (node, view, getPos) {
|
|
396
|
+
var _extensionNodeViewOpt;
|
|
393
397
|
var renderProps = {
|
|
394
398
|
providerFactory: providerFactory,
|
|
395
399
|
extensionHandlers: extensionHandlers,
|
|
396
400
|
extensionLoadingHandlers: extensionLoadingHandlers,
|
|
397
|
-
|
|
401
|
+
// Capture the insertion state before the asynchronous React render.
|
|
402
|
+
extensionNodeViewOptions: extensionNodeViewOptions !== null && extensionNodeViewOptions !== void 0 && extensionNodeViewOptions.allowAIGeneratedContentMotion && (0, _isExperimentEnabled.isExperimentEnabled)('cwr_remix_animate_stream_only') ? _objectSpread(_objectSpread({}, extensionNodeViewOptions), {}, {
|
|
403
|
+
allowAIGeneratedContentMotion: !!((_extensionNodeViewOpt = extensionNodeViewOptions.shouldAnimateGeneratedContent) !== null && _extensionNodeViewOpt !== void 0 && _extensionNodeViewOpt.call(extensionNodeViewOptions))
|
|
404
|
+
}) : extensionNodeViewOptions,
|
|
398
405
|
pluginInjectionApi: pluginInjectionApi,
|
|
399
406
|
macroInteractionDesignFeatureFlags: macroInteractionDesignFeatureFlags,
|
|
400
407
|
showLivePagesBodiedMacrosRendererView: showLivePagesBodiedMacrosRendererView,
|
|
@@ -44,7 +44,8 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
44
44
|
ssr = _ref.ssr,
|
|
45
45
|
serializeDataAttrs = _ref.serializeDataAttrs,
|
|
46
46
|
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer,
|
|
47
|
-
isViewOnly = _ref.isViewOnly
|
|
47
|
+
isViewOnly = _ref.isViewOnly,
|
|
48
|
+
mediaViewerExtensions = _ref.mediaViewerExtensions;
|
|
48
49
|
var _useState = (0, _react.useState)(),
|
|
49
50
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
50
51
|
fileState = _useState2[0],
|
|
@@ -64,7 +65,15 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
64
65
|
var _useState9 = (0, _react.useState)(false),
|
|
65
66
|
_useState0 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
66
67
|
isMediaViewerVisible = _useState0[0],
|
|
67
|
-
|
|
68
|
+
setMediaViewerVisibleState = _useState0[1];
|
|
69
|
+
// Extension passing added as part of the comments-in-media-viewer work, so it follows that
|
|
70
|
+
// experiment to avoid shipping ungated changes.
|
|
71
|
+
var enabledMediaViewerExtensions = mediaViewerExtensions && (0, _isExperimentEnabled.isExperimentEnabled)('cc_comments_media_viewer_sidebar') ? mediaViewerExtensions : undefined;
|
|
72
|
+
var setMediaViewerVisible = (0, _react.useCallback)(function (isVisible) {
|
|
73
|
+
var _enabledMediaViewerEx;
|
|
74
|
+
setMediaViewerVisibleState(isVisible);
|
|
75
|
+
enabledMediaViewerExtensions === null || enabledMediaViewerExtensions === void 0 || (_enabledMediaViewerEx = enabledMediaViewerExtensions.onSelectedItemChange) === null || _enabledMediaViewerEx === void 0 || _enabledMediaViewerEx.call(enabledMediaViewerExtensions, isVisible ? identifier : null);
|
|
76
|
+
}, [identifier, enabledMediaViewerExtensions]);
|
|
68
77
|
var _ref2 = intl || (0, _reactIntl.createIntl)({
|
|
69
78
|
locale: 'en'
|
|
70
79
|
}),
|
|
@@ -217,10 +226,10 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
217
226
|
if (isViewOnly && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
218
227
|
e.preventDefault();
|
|
219
228
|
}
|
|
220
|
-
}, [shouldOpenMediaViewer, isViewOnly]);
|
|
229
|
+
}, [shouldOpenMediaViewer, isViewOnly, setMediaViewerVisible]);
|
|
221
230
|
var onMediaInlinePreviewClose = (0, _react.useCallback)(function () {
|
|
222
231
|
setMediaViewerVisible(false);
|
|
223
|
-
}, []);
|
|
232
|
+
}, [setMediaViewerVisible]);
|
|
224
233
|
var memoizedMediaViewerItems = (0, _react.useMemo)(function () {
|
|
225
234
|
return [identifier];
|
|
226
235
|
}, [identifier]);
|
|
@@ -233,11 +242,12 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
|
|
|
233
242
|
[identifier],
|
|
234
243
|
mediaClientConfig: mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig,
|
|
235
244
|
selectedItem: identifier,
|
|
236
|
-
onClose: onMediaInlinePreviewClose
|
|
245
|
+
onClose: onMediaInlinePreviewClose,
|
|
246
|
+
extensions: enabledMediaViewerExtensions
|
|
237
247
|
}), document.body);
|
|
238
248
|
}
|
|
239
249
|
return null;
|
|
240
|
-
}, [identifier, isMediaViewerVisible, mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig, onMediaInlinePreviewClose, memoizedMediaViewerItems]);
|
|
250
|
+
}, [identifier, isMediaViewerVisible, mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig, onMediaInlinePreviewClose, memoizedMediaViewerItems, enabledMediaViewerExtensions]);
|
|
241
251
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_inlineImageWrapper.InlineImageWrapper, {
|
|
242
252
|
isSelected: isSelected,
|
|
243
253
|
aspectRatio: aspectRatio,
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "134.
|
|
30
|
+
var packageVersion = "134.17.0";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -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 = "134.
|
|
26
|
+
var packageVersion = "134.17.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
3
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
5
|
import { isReactCompilerActivePlatform } from '@atlaskit/react-compiler-gating';
|
|
5
6
|
import { isSSR } from '../core-utils';
|
|
@@ -336,11 +337,16 @@ function ExtensionNodeRender({
|
|
|
336
337
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
337
338
|
export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionLoadingHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, rendererExtensionHandlers, intl) {
|
|
338
339
|
return (node, view, getPos) => {
|
|
340
|
+
var _extensionNodeViewOpt;
|
|
339
341
|
const renderProps = {
|
|
340
342
|
providerFactory,
|
|
341
343
|
extensionHandlers,
|
|
342
344
|
extensionLoadingHandlers,
|
|
343
|
-
|
|
345
|
+
// Capture the insertion state before the asynchronous React render.
|
|
346
|
+
extensionNodeViewOptions: extensionNodeViewOptions !== null && extensionNodeViewOptions !== void 0 && extensionNodeViewOptions.allowAIGeneratedContentMotion && isExperimentEnabled('cwr_remix_animate_stream_only') ? {
|
|
347
|
+
...extensionNodeViewOptions,
|
|
348
|
+
allowAIGeneratedContentMotion: !!((_extensionNodeViewOpt = extensionNodeViewOptions.shouldAnimateGeneratedContent) !== null && _extensionNodeViewOpt !== void 0 && _extensionNodeViewOpt.call(extensionNodeViewOptions))
|
|
349
|
+
} : extensionNodeViewOptions,
|
|
344
350
|
pluginInjectionApi,
|
|
345
351
|
macroInteractionDesignFeatureFlags,
|
|
346
352
|
showLivePagesBodiedMacrosRendererView,
|
|
@@ -36,13 +36,22 @@ export const MediaInlineImageCardInternal = ({
|
|
|
36
36
|
ssr,
|
|
37
37
|
serializeDataAttrs,
|
|
38
38
|
shouldOpenMediaViewer,
|
|
39
|
-
isViewOnly
|
|
39
|
+
isViewOnly,
|
|
40
|
+
mediaViewerExtensions
|
|
40
41
|
}) => {
|
|
41
42
|
const [fileState, setFileState] = useState();
|
|
42
43
|
const [subscribeError, setSubscribeError] = useState();
|
|
43
44
|
const [isFailedEventSent, setIsFailedEventSent] = useState(false);
|
|
44
45
|
const [isSucceededEventSent, setIsSucceededEventSent] = useState(false);
|
|
45
|
-
const [isMediaViewerVisible,
|
|
46
|
+
const [isMediaViewerVisible, setMediaViewerVisibleState] = useState(false);
|
|
47
|
+
// Extension passing added as part of the comments-in-media-viewer work, so it follows that
|
|
48
|
+
// experiment to avoid shipping ungated changes.
|
|
49
|
+
const enabledMediaViewerExtensions = mediaViewerExtensions && isExperimentEnabled('cc_comments_media_viewer_sidebar') ? mediaViewerExtensions : undefined;
|
|
50
|
+
const setMediaViewerVisible = useCallback(isVisible => {
|
|
51
|
+
var _enabledMediaViewerEx;
|
|
52
|
+
setMediaViewerVisibleState(isVisible);
|
|
53
|
+
enabledMediaViewerExtensions === null || enabledMediaViewerExtensions === void 0 ? void 0 : (_enabledMediaViewerEx = enabledMediaViewerExtensions.onSelectedItemChange) === null || _enabledMediaViewerEx === void 0 ? void 0 : _enabledMediaViewerEx.call(enabledMediaViewerExtensions, isVisible ? identifier : null);
|
|
54
|
+
}, [identifier, enabledMediaViewerExtensions]);
|
|
46
55
|
const {
|
|
47
56
|
formatMessage
|
|
48
57
|
} = intl || createIntl({
|
|
@@ -190,10 +199,10 @@ export const MediaInlineImageCardInternal = ({
|
|
|
190
199
|
if (isViewOnly && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
191
200
|
e.preventDefault();
|
|
192
201
|
}
|
|
193
|
-
}, [shouldOpenMediaViewer, isViewOnly]);
|
|
202
|
+
}, [shouldOpenMediaViewer, isViewOnly, setMediaViewerVisible]);
|
|
194
203
|
const onMediaInlinePreviewClose = useCallback(() => {
|
|
195
204
|
setMediaViewerVisible(false);
|
|
196
|
-
}, []);
|
|
205
|
+
}, [setMediaViewerVisible]);
|
|
197
206
|
const memoizedMediaViewerItems = useMemo(() => [identifier], [identifier]);
|
|
198
207
|
const mediaViewer = useMemo(() => {
|
|
199
208
|
if (isMediaViewerVisible && mediaClient !== null && mediaClient !== void 0 && mediaClient.mediaClientConfig) {
|
|
@@ -204,11 +213,12 @@ export const MediaInlineImageCardInternal = ({
|
|
|
204
213
|
[identifier],
|
|
205
214
|
mediaClientConfig: mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig,
|
|
206
215
|
selectedItem: identifier,
|
|
207
|
-
onClose: onMediaInlinePreviewClose
|
|
216
|
+
onClose: onMediaInlinePreviewClose,
|
|
217
|
+
extensions: enabledMediaViewerExtensions
|
|
208
218
|
}), document.body);
|
|
209
219
|
}
|
|
210
220
|
return null;
|
|
211
|
-
}, [identifier, isMediaViewerVisible, mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig, onMediaInlinePreviewClose, memoizedMediaViewerItems]);
|
|
221
|
+
}, [identifier, isMediaViewerVisible, mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig, onMediaInlinePreviewClose, memoizedMediaViewerItems, enabledMediaViewerExtensions]);
|
|
212
222
|
return jsx(Fragment, null, jsx(InlineImageWrapper, {
|
|
213
223
|
isSelected: isSelected,
|
|
214
224
|
aspectRatio: aspectRatio,
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "134.
|
|
16
|
+
const packageVersion = "134.17.0";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -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 = "134.
|
|
16
|
+
const packageVersion = "134.17.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -6,10 +6,13 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
6
6
|
import _get from "@babel/runtime/helpers/get";
|
|
7
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
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; }
|
|
10
|
+
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) { _defineProperty(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; }
|
|
9
11
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
13
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
12
14
|
import React, { useCallback, useState } from 'react';
|
|
15
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
16
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
17
|
import { isReactCompilerActivePlatform } from '@atlaskit/react-compiler-gating';
|
|
15
18
|
import { isSSR } from '../core-utils';
|
|
@@ -380,11 +383,15 @@ function ExtensionNodeRender(_ref2) {
|
|
|
380
383
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
381
384
|
export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionLoadingHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, showUpdatedLivePages1PBodiedExtensionUI, rendererExtensionHandlers, intl) {
|
|
382
385
|
return function (node, view, getPos) {
|
|
386
|
+
var _extensionNodeViewOpt;
|
|
383
387
|
var renderProps = {
|
|
384
388
|
providerFactory: providerFactory,
|
|
385
389
|
extensionHandlers: extensionHandlers,
|
|
386
390
|
extensionLoadingHandlers: extensionLoadingHandlers,
|
|
387
|
-
|
|
391
|
+
// Capture the insertion state before the asynchronous React render.
|
|
392
|
+
extensionNodeViewOptions: extensionNodeViewOptions !== null && extensionNodeViewOptions !== void 0 && extensionNodeViewOptions.allowAIGeneratedContentMotion && isExperimentEnabled('cwr_remix_animate_stream_only') ? _objectSpread(_objectSpread({}, extensionNodeViewOptions), {}, {
|
|
393
|
+
allowAIGeneratedContentMotion: !!((_extensionNodeViewOpt = extensionNodeViewOptions.shouldAnimateGeneratedContent) !== null && _extensionNodeViewOpt !== void 0 && _extensionNodeViewOpt.call(extensionNodeViewOptions))
|
|
394
|
+
}) : extensionNodeViewOptions,
|
|
388
395
|
pluginInjectionApi: pluginInjectionApi,
|
|
389
396
|
macroInteractionDesignFeatureFlags: macroInteractionDesignFeatureFlags,
|
|
390
397
|
showLivePagesBodiedMacrosRendererView: showLivePagesBodiedMacrosRendererView,
|
|
@@ -40,7 +40,8 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
40
40
|
ssr = _ref.ssr,
|
|
41
41
|
serializeDataAttrs = _ref.serializeDataAttrs,
|
|
42
42
|
shouldOpenMediaViewer = _ref.shouldOpenMediaViewer,
|
|
43
|
-
isViewOnly = _ref.isViewOnly
|
|
43
|
+
isViewOnly = _ref.isViewOnly,
|
|
44
|
+
mediaViewerExtensions = _ref.mediaViewerExtensions;
|
|
44
45
|
var _useState = useState(),
|
|
45
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
47
|
fileState = _useState2[0],
|
|
@@ -60,7 +61,15 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
60
61
|
var _useState9 = useState(false),
|
|
61
62
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
62
63
|
isMediaViewerVisible = _useState0[0],
|
|
63
|
-
|
|
64
|
+
setMediaViewerVisibleState = _useState0[1];
|
|
65
|
+
// Extension passing added as part of the comments-in-media-viewer work, so it follows that
|
|
66
|
+
// experiment to avoid shipping ungated changes.
|
|
67
|
+
var enabledMediaViewerExtensions = mediaViewerExtensions && isExperimentEnabled('cc_comments_media_viewer_sidebar') ? mediaViewerExtensions : undefined;
|
|
68
|
+
var setMediaViewerVisible = useCallback(function (isVisible) {
|
|
69
|
+
var _enabledMediaViewerEx;
|
|
70
|
+
setMediaViewerVisibleState(isVisible);
|
|
71
|
+
enabledMediaViewerExtensions === null || enabledMediaViewerExtensions === void 0 || (_enabledMediaViewerEx = enabledMediaViewerExtensions.onSelectedItemChange) === null || _enabledMediaViewerEx === void 0 || _enabledMediaViewerEx.call(enabledMediaViewerExtensions, isVisible ? identifier : null);
|
|
72
|
+
}, [identifier, enabledMediaViewerExtensions]);
|
|
64
73
|
var _ref2 = intl || createIntl({
|
|
65
74
|
locale: 'en'
|
|
66
75
|
}),
|
|
@@ -213,10 +222,10 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
213
222
|
if (isViewOnly && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
214
223
|
e.preventDefault();
|
|
215
224
|
}
|
|
216
|
-
}, [shouldOpenMediaViewer, isViewOnly]);
|
|
225
|
+
}, [shouldOpenMediaViewer, isViewOnly, setMediaViewerVisible]);
|
|
217
226
|
var onMediaInlinePreviewClose = useCallback(function () {
|
|
218
227
|
setMediaViewerVisible(false);
|
|
219
|
-
}, []);
|
|
228
|
+
}, [setMediaViewerVisible]);
|
|
220
229
|
var memoizedMediaViewerItems = useMemo(function () {
|
|
221
230
|
return [identifier];
|
|
222
231
|
}, [identifier]);
|
|
@@ -229,11 +238,12 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
229
238
|
[identifier],
|
|
230
239
|
mediaClientConfig: mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig,
|
|
231
240
|
selectedItem: identifier,
|
|
232
|
-
onClose: onMediaInlinePreviewClose
|
|
241
|
+
onClose: onMediaInlinePreviewClose,
|
|
242
|
+
extensions: enabledMediaViewerExtensions
|
|
233
243
|
}), document.body);
|
|
234
244
|
}
|
|
235
245
|
return null;
|
|
236
|
-
}, [identifier, isMediaViewerVisible, mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig, onMediaInlinePreviewClose, memoizedMediaViewerItems]);
|
|
246
|
+
}, [identifier, isMediaViewerVisible, mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig, onMediaInlinePreviewClose, memoizedMediaViewerItems, enabledMediaViewerExtensions]);
|
|
237
247
|
return jsx(Fragment, null, jsx(InlineImageWrapper, {
|
|
238
248
|
isSelected: isSelected,
|
|
239
249
|
aspectRatio: aspectRatio,
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
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 = "134.
|
|
22
|
+
var packageVersion = "134.17.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -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 = "134.
|
|
23
|
+
var packageVersion = "134.17.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -16,6 +16,7 @@ interface ExtensionNodeViewOptions {
|
|
|
16
16
|
allowAIGeneratedContentMotion?: boolean;
|
|
17
17
|
appearance?: EditorAppearance;
|
|
18
18
|
getExtensionHeight?: GetPMNodeHeight;
|
|
19
|
+
shouldAnimateGeneratedContent?: () => boolean;
|
|
19
20
|
}
|
|
20
21
|
interface ReactExtensionNodeProps {
|
|
21
22
|
extensionHandlers: ExtensionHandlers;
|
|
@@ -2,6 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl';
|
|
3
3
|
import type { FileIdentifier } from '@atlaskit/media-client/identifier';
|
|
4
4
|
import type { MediaClient } from '@atlaskit/media-client/media-client';
|
|
5
|
+
import type { MediaViewerExtensions } from '@atlaskit/media-viewer/types';
|
|
5
6
|
import type { MediaInlineAttrs, MediaSSR } from './types';
|
|
6
7
|
export interface MediaInlineImageCardProps {
|
|
7
8
|
border?: {
|
|
@@ -13,9 +14,11 @@ export interface MediaInlineImageCardProps {
|
|
|
13
14
|
isSelected?: boolean;
|
|
14
15
|
isViewOnly?: boolean;
|
|
15
16
|
mediaClient?: MediaClient;
|
|
17
|
+
/** Extensions passed to the Media Viewer this card opens. */
|
|
18
|
+
mediaViewerExtensions?: MediaViewerExtensions;
|
|
16
19
|
serializeDataAttrs?: boolean;
|
|
17
20
|
shouldOpenMediaViewer?: boolean;
|
|
18
21
|
ssr?: MediaSSR;
|
|
19
22
|
}
|
|
20
|
-
export declare const MediaInlineImageCardInternal: ({ mediaClient, identifier, isSelected, intl, alt, isLazy, width, height, border, ssr, serializeDataAttrs, shouldOpenMediaViewer, isViewOnly, }: MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs) => jsx.JSX.Element;
|
|
23
|
+
export declare const MediaInlineImageCardInternal: ({ mediaClient, identifier, isSelected, intl, alt, isLazy, width, height, border, ssr, serializeDataAttrs, shouldOpenMediaViewer, isViewOnly, mediaViewerExtensions, }: MediaInlineImageCardProps & WrappedComponentProps & MediaInlineAttrs) => jsx.JSX.Element;
|
|
21
24
|
export declare const MediaInlineImageCard: React.ComponentType<React.PropsWithChildren<MediaInlineImageCardProps & MediaInlineAttrs>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "134.
|
|
3
|
+
"version": "134.18.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/"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@atlaskit/popper": "^9.4.0",
|
|
76
76
|
"@atlaskit/popup": "^10.2.0",
|
|
77
77
|
"@atlaskit/primitives": "^22.7.0",
|
|
78
|
-
"@atlaskit/profilecard": "^27.
|
|
78
|
+
"@atlaskit/profilecard": "^27.9.0",
|
|
79
79
|
"@atlaskit/prosemirror-history": "^1.3.0",
|
|
80
80
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
81
81
|
"@atlaskit/react-ufo": "^8.4.0",
|