@atlaskit/editor-common 135.2.0 → 136.0.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 +60 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/ai-messages/ai-suggestions.js +5 -0
- package/dist/cjs/analytics/types/ai-suggestions-events.js +2 -0
- package/dist/cjs/link/utils.js +2 -3
- package/dist/cjs/media-inline/media-inline-image-card.js +1 -2
- package/dist/cjs/messages/layout.js +0 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/portal/PortalBucket.js +7 -35
- package/dist/cjs/portal/PortalManager.js +1 -2
- package/dist/cjs/toolbar-flag-check.js +2 -3
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/TableSelector/index.js +2 -7
- package/dist/cjs/ui/TableSelector/table-selector.js +1 -2
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +1 -2
- package/dist/cjs/ui-menu/DropdownMenu/index.js +3 -12
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +2 -3
- package/dist/cjs/utils/document.js +3 -24
- package/dist/cjs/utils/index.js +0 -6
- package/dist/es2019/ai-messages/ai-suggestions.js +5 -0
- package/dist/es2019/analytics/types/ai-suggestions-events.js +2 -0
- package/dist/es2019/link/utils.js +2 -3
- package/dist/es2019/media-inline/media-inline-image-card.js +1 -2
- package/dist/es2019/messages/layout.js +0 -5
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/portal/PortalBucket.js +2 -26
- package/dist/es2019/portal/PortalManager.js +1 -2
- package/dist/es2019/toolbar-flag-check.js +1 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +2 -7
- package/dist/es2019/ui/TableSelector/table-selector.js +1 -2
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +1 -2
- package/dist/es2019/ui-menu/DropdownMenu/index.js +11 -34
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +2 -3
- package/dist/es2019/utils/document.js +0 -24
- package/dist/es2019/utils/index.js +1 -1
- package/dist/esm/ai-messages/ai-suggestions.js +5 -0
- package/dist/esm/analytics/types/ai-suggestions-events.js +2 -0
- package/dist/esm/link/utils.js +2 -3
- package/dist/esm/media-inline/media-inline-image-card.js +1 -2
- package/dist/esm/messages/layout.js +0 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/portal/PortalBucket.js +8 -36
- package/dist/esm/portal/PortalManager.js +1 -2
- package/dist/esm/toolbar-flag-check.js +2 -3
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +2 -7
- package/dist/esm/ui/TableSelector/table-selector.js +1 -2
- package/dist/esm/ui-menu/ColorPickerButton/index.js +1 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +3 -12
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +2 -3
- package/dist/esm/utils/document.js +3 -24
- package/dist/esm/utils/index.js +1 -1
- package/dist/types/ai-messages/ai-suggestions.d.ts +5 -0
- package/dist/types/analytics/types/ai-suggestions-events.d.ts +2 -0
- package/dist/types/analytics/types/insert-events.d.ts +17 -1
- package/dist/types/credit-guard/types.d.ts +1 -1
- package/dist/types/messages/layout.d.ts +0 -5
- package/dist/types/toolbar-flag-check.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/dist/types/utils/document.d.ts +0 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +8 -7
|
@@ -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 = "135.
|
|
16
|
+
const packageVersion = "135.3.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -9,7 +9,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { bind } from 'bind-event-listener';
|
|
10
10
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
11
11
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
12
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
14
13
|
import Popup from '../Popup';
|
|
15
14
|
import tableSelectorPopup, { TABLE_SELECTOR_BUTTON_GAP, TABLE_SELECTOR_BUTTON_SIZE } from './table-selector';
|
|
@@ -172,9 +171,7 @@ export const TableSelectorPopup = props => {
|
|
|
172
171
|
maxRow: getMaxRow(prevSize, event.key)
|
|
173
172
|
};
|
|
174
173
|
});
|
|
175
|
-
|
|
176
|
-
event.preventDefault();
|
|
177
|
-
}
|
|
174
|
+
event.preventDefault();
|
|
178
175
|
}
|
|
179
176
|
if (event.key === 'ArrowRight') {
|
|
180
177
|
enableKeyboardMode();
|
|
@@ -220,9 +217,7 @@ export const TableSelectorPopup = props => {
|
|
|
220
217
|
maxRow: getMaxRow(prevSize, event.key)
|
|
221
218
|
};
|
|
222
219
|
});
|
|
223
|
-
|
|
224
|
-
event.preventDefault();
|
|
225
|
-
}
|
|
220
|
+
event.preventDefault();
|
|
226
221
|
}
|
|
227
222
|
}, [enableKeyboardMode, setSize]);
|
|
228
223
|
useEffect(() => {
|
|
@@ -7,7 +7,6 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl';
|
|
9
9
|
import { Stack } from '@atlaskit/primitives/compiled/stack';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
10
|
import { toolbarInsertBlockMessages as messages } from '../../messages';
|
|
12
11
|
import { OutsideClickTargetRefContext } from '../../ui-react';
|
|
13
12
|
export const TABLE_SELECTOR_BUTTON_GAP = 2;
|
|
@@ -56,7 +55,7 @@ const TableSelectorButton = ({
|
|
|
56
55
|
if (btnRef.current) {
|
|
57
56
|
if (isFocused) {
|
|
58
57
|
btnRef.current.focus({
|
|
59
|
-
preventScroll:
|
|
58
|
+
preventScroll: true
|
|
60
59
|
});
|
|
61
60
|
} else {
|
|
62
61
|
btnRef.current.blur();
|
|
@@ -18,7 +18,6 @@ import { Box } from '@atlaskit/primitives/box';
|
|
|
18
18
|
import { Inline } from '@atlaskit/primitives/inline';
|
|
19
19
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
20
20
|
import { xcss } from '@atlaskit/primitives/xcss/xcss';
|
|
21
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
22
21
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
23
22
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
24
23
|
import { colorPickerButtonMessages } from '../../messages/color-picker-button';
|
|
@@ -251,7 +250,7 @@ const ColorPickerButton = props => {
|
|
|
251
250
|
ref: buttonRef,
|
|
252
251
|
"aria-label": title,
|
|
253
252
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
254
|
-
spacing:
|
|
253
|
+
spacing: "default",
|
|
255
254
|
onClick: togglePopup,
|
|
256
255
|
onKeyDown: onKeyDown,
|
|
257
256
|
"data-selected-color": props.currentColor,
|
|
@@ -15,7 +15,6 @@ import CustomItem from '@atlaskit/menu/custom-item';
|
|
|
15
15
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
16
16
|
import Section from '@atlaskit/menu/section';
|
|
17
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
18
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
20
19
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
21
20
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -37,44 +36,22 @@ const focusedMenuItemStyle = css({
|
|
|
37
36
|
});
|
|
38
37
|
const buttonStyles = (isActive, submenuActive) => {
|
|
39
38
|
if (isActive) {
|
|
40
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
41
|
-
/**
|
|
42
|
-
* Hack for item to imitate old dropdown-menu selected styles
|
|
43
|
-
*/
|
|
44
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
45
|
-
return css`
|
|
46
|
-
position: relative;
|
|
47
|
-
&::before {
|
|
48
|
-
display: block;
|
|
49
|
-
height: 100%;
|
|
50
|
-
width: 2px;
|
|
51
|
-
position: absolute;
|
|
52
|
-
left: 0;
|
|
53
|
-
top: 0;
|
|
54
|
-
background: ${"var(--ds-border-selected, #1868DB)"};
|
|
55
|
-
content: '';
|
|
56
|
-
}
|
|
57
|
-
> span,
|
|
58
|
-
> span:hover,
|
|
59
|
-
> span:active {
|
|
60
|
-
background: ${"var(--ds-background-selected, #E9F2FE)"};
|
|
61
|
-
color: ${"var(--ds-text-selected, #1868DB)"};
|
|
62
|
-
}
|
|
63
|
-
:focus > span[aria-disabled='false'] {
|
|
64
|
-
${focusedMenuItemStyle};
|
|
65
|
-
}
|
|
66
|
-
:focus-visible,
|
|
67
|
-
:focus-visible > span[aria-disabled='false'] {
|
|
68
|
-
outline: none;
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
39
|
/**
|
|
74
40
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
75
41
|
*/
|
|
76
42
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
77
43
|
return css`
|
|
44
|
+
position: relative;
|
|
45
|
+
&::before {
|
|
46
|
+
display: block;
|
|
47
|
+
height: 100%;
|
|
48
|
+
width: 2px;
|
|
49
|
+
position: absolute;
|
|
50
|
+
left: 0;
|
|
51
|
+
top: 0;
|
|
52
|
+
background: ${"var(--ds-border-selected, #1868DB)"};
|
|
53
|
+
content: '';
|
|
54
|
+
}
|
|
78
55
|
> span,
|
|
79
56
|
> span:hover,
|
|
80
57
|
> span:active {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
4
3
|
import { OutsideClickTargetRefContext } from './OutsideClickTargetRefContext';
|
|
5
4
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
6
5
|
|
|
@@ -51,7 +50,7 @@ class WithOutsideClick extends PureComponent {
|
|
|
51
50
|
}
|
|
52
51
|
componentDidMount() {
|
|
53
52
|
if (this.props.handleClickOutside) {
|
|
54
|
-
const options = this.props.captureClick
|
|
53
|
+
const options = this.props.captureClick ? {
|
|
55
54
|
capture: true
|
|
56
55
|
} : false;
|
|
57
56
|
// Ignored via go/ees005
|
|
@@ -74,7 +73,7 @@ class WithOutsideClick extends PureComponent {
|
|
|
74
73
|
}
|
|
75
74
|
componentWillUnmount() {
|
|
76
75
|
if (this.props.handleClickOutside) {
|
|
77
|
-
const options = this.props.captureClick
|
|
76
|
+
const options = this.props.captureClick ? {
|
|
78
77
|
capture: true
|
|
79
78
|
} : false;
|
|
80
79
|
// Ignored via go/ees005
|
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
2
2
|
import { getStepRange } from './getStepRange';
|
|
3
|
-
import { hasDocAsParent } from './hasDocAsParent';
|
|
4
|
-
export function bracketTyped(state) {
|
|
5
|
-
const {
|
|
6
|
-
selection
|
|
7
|
-
} = state;
|
|
8
|
-
const {
|
|
9
|
-
$cursor,
|
|
10
|
-
$anchor
|
|
11
|
-
} = selection;
|
|
12
|
-
if (!$cursor) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
const node = $cursor.nodeBefore;
|
|
16
|
-
if (!node) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (node.type.name === 'text' && node.text === '{') {
|
|
20
|
-
const paragraphNode = $anchor.node();
|
|
21
|
-
return paragraphNode.marks.length === 0 && hasDocAsParent($anchor);
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
27
3
|
export function nodesBetweenChanged(tr, f, startPos) {
|
|
28
4
|
const stepRange = getStepRange(tr);
|
|
29
5
|
if (!stepRange) {
|
|
@@ -162,7 +162,7 @@ export { gridTypeForLayout } from './grid';
|
|
|
162
162
|
*
|
|
163
163
|
* Use `@atlaskit/editor-common/utils/document` entry-point instead.
|
|
164
164
|
*/
|
|
165
|
-
export { nodesBetweenChanged,
|
|
165
|
+
export { nodesBetweenChanged, getChangedNodes } from './document';
|
|
166
166
|
export { getStepRange } from './getStepRange';
|
|
167
167
|
export { hasDocAsParent } from './hasDocAsParent';
|
|
168
168
|
export { hasVisibleContent } from './hasVisibleContent';
|
|
@@ -325,6 +325,11 @@ export var aiSuggestionsMessages = defineMessages({
|
|
|
325
325
|
defaultMessage: 'This may take a few minutes',
|
|
326
326
|
description: 'Loading message setting expectations that the AI review may take a few minutes'
|
|
327
327
|
},
|
|
328
|
+
thinkingKeepEditing: {
|
|
329
|
+
id: 'fabric.editor.ai.suggestions.thinking.keepEditing.non-final',
|
|
330
|
+
defaultMessage: 'Feel free to keep editing, suggestions are on the way',
|
|
331
|
+
description: 'Loading message on the AI suggestions thinking bar telling the user the review is running and they can keep editing while suggestions are generated'
|
|
332
|
+
},
|
|
328
333
|
thinkingReviewingConsistency: {
|
|
329
334
|
id: 'fabric.editor.ai.suggestions.thinking.reviewingConsistency.non-final',
|
|
330
335
|
defaultMessage: 'Reviewing consistency',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export var AiSuggestionsEntryPointValue = /*#__PURE__*/function (AiSuggestionsEntryPointValue) {
|
|
2
2
|
AiSuggestionsEntryPointValue["PRIMARY_TOOLBAR"] = "primaryToolbar";
|
|
3
|
+
/** Content Reviewer quick action in the Rovo Chat editor empty state. */
|
|
4
|
+
AiSuggestionsEntryPointValue["ROVO_CHAT"] = "rovoChat";
|
|
3
5
|
/**
|
|
4
6
|
* @private
|
|
5
7
|
* @deprecated Legacy entry point retained for backwards compatibility.
|
package/dist/esm/link/utils.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getUrlForDomainInContext } from '@atlaskit/atlassian-context/get-url-for-domain-in-context';
|
|
2
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
3
2
|
import { linkPreferencesPath } from './constants';
|
|
4
3
|
var STAGING = 'staging';
|
|
5
4
|
var PRODUCTION = 'prod';
|
|
@@ -44,7 +43,7 @@ export var getActiveLinkMark = function getActiveLinkMark(state) {
|
|
|
44
43
|
pos: pos
|
|
45
44
|
} : undefined;
|
|
46
45
|
}
|
|
47
|
-
if (isEmptySelectionBeforeLink(state)
|
|
46
|
+
if (isEmptySelectionBeforeLink(state)) {
|
|
48
47
|
// if user clicks right before the link, we want to show the toolbar for the link
|
|
49
48
|
// but only if the link is a single character
|
|
50
49
|
var _node = state.doc.nodeAt($from.pos);
|
|
@@ -53,7 +52,7 @@ export var getActiveLinkMark = function getActiveLinkMark(state) {
|
|
|
53
52
|
pos: $from.pos
|
|
54
53
|
} : undefined;
|
|
55
54
|
}
|
|
56
|
-
if (isEmptySelectionAfterLink(state)
|
|
55
|
+
if (isEmptySelectionAfterLink(state)) {
|
|
57
56
|
// if user clicks right after the link, we want to show the toolbar for the link
|
|
58
57
|
// but only if the link is a single character
|
|
59
58
|
// and we return the position of the link
|
|
@@ -20,7 +20,6 @@ import { FileFetcherError } from '@atlaskit/media-client';
|
|
|
20
20
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
21
21
|
import MediaViewer from '@atlaskit/media-viewer/media-viewer-loader';
|
|
22
22
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
23
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
24
23
|
import { messages } from '../messages/media-inline-card';
|
|
25
24
|
import { referenceHeights } from './constants';
|
|
26
25
|
import { InlineImageCard } from './inline-image-card';
|
|
@@ -219,7 +218,7 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
|
|
|
219
218
|
// In edit mode (node content wrapper has contenteditable set to true), link redirection is disabled by default
|
|
220
219
|
// We need to call "stopPropagation" here in order to prevent in editor view mode, the browser from navigating to
|
|
221
220
|
// another URL if the media node is wrapped in a link mark.
|
|
222
|
-
if (isViewOnly
|
|
221
|
+
if (isViewOnly) {
|
|
223
222
|
e.preventDefault();
|
|
224
223
|
}
|
|
225
224
|
}, [shouldOpenMediaViewer, isViewOnly, setMediaViewerVisible]);
|
|
@@ -70,11 +70,6 @@ export var toolbarMessages = defineMessages({
|
|
|
70
70
|
defaultMessage: 'Layout options',
|
|
71
71
|
description: "a floating toolbar radiogroup's aria label"
|
|
72
72
|
},
|
|
73
|
-
layoutPlaceholder: {
|
|
74
|
-
id: 'fabric.editor.layout.placeholder',
|
|
75
|
-
defaultMessage: 'Add content',
|
|
76
|
-
description: 'Placeholder text shown inside an empty layout column, prompting the user to add content.'
|
|
77
|
-
},
|
|
78
73
|
controlslayoutPlaceholder: {
|
|
79
74
|
id: 'fabric.editor.layout.controls.placeholder',
|
|
80
75
|
defaultMessage: '/ to insert',
|
|
@@ -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 = "135.
|
|
22
|
+
var packageVersion = "135.3.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -1,39 +1,14 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import React, { useCallback, useLayoutEffect,
|
|
3
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
|
-
function LegacyPortalBucket(_ref) {
|
|
5
|
-
var id = _ref.id,
|
|
6
|
-
portalManager = _ref.portalManager;
|
|
7
|
-
// State to hold the current portals for this bucket
|
|
8
|
-
var _useState = useState({}),
|
|
9
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
10
|
-
portals = _useState2[0],
|
|
11
|
-
setPortals = _useState2[1];
|
|
12
|
-
// Effect to register/unregister this bucket with the portal manager on mount/unmount
|
|
13
|
-
useLayoutEffect(function () {
|
|
14
|
-
portalManager.registerBucket(id, setPortals);
|
|
15
|
-
return function () {
|
|
16
|
-
portalManager.unregisterBucket(id);
|
|
17
|
-
};
|
|
18
|
-
}, [id, portalManager]);
|
|
19
|
-
// Memoize the portal elements to avoid unnecessary re-renders
|
|
20
|
-
var portalElements = useMemo(function () {
|
|
21
|
-
return Object.values(portals);
|
|
22
|
-
}, [portals]);
|
|
23
|
-
// Render the current portal elements
|
|
24
|
-
// @ts-ignore - TS2322 TypeScript 5.9.2 upgrade
|
|
25
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, portalElements);
|
|
26
|
-
}
|
|
27
|
-
|
|
2
|
+
import React, { useCallback, useLayoutEffect, useReducer } from 'react';
|
|
28
3
|
/**
|
|
29
4
|
* Portals stay in the manager; state is only a render tick. React keeps
|
|
30
5
|
* hook state on both the current and alternate fiber, so storing portals
|
|
31
6
|
* in state would retain removed portals until the next render.
|
|
32
7
|
*/
|
|
33
|
-
function TickPortalBucket(
|
|
8
|
+
function TickPortalBucket(_ref) {
|
|
34
9
|
var _portalManager$getBuc, _portalManager$getBuc2;
|
|
35
|
-
var id =
|
|
36
|
-
portalManager =
|
|
10
|
+
var id = _ref.id,
|
|
11
|
+
portalManager = _ref.portalManager;
|
|
37
12
|
var _useReducer = useReducer(function (tick) {
|
|
38
13
|
return tick + 1;
|
|
39
14
|
}, 0),
|
|
@@ -62,13 +37,10 @@ function TickPortalBucket(_ref2) {
|
|
|
62
37
|
* @param {PortalManager} props.portalManager An instance of `PortalManager` which manages the registration and unregistration of portal buckets and their content.
|
|
63
38
|
* @returns {React.ReactElement} The React element(s) that are currently registered to this portal bucket.
|
|
64
39
|
*/
|
|
65
|
-
export function PortalBucket(
|
|
66
|
-
var id =
|
|
67
|
-
portalManager =
|
|
68
|
-
return
|
|
69
|
-
id: id,
|
|
70
|
-
portalManager: portalManager
|
|
71
|
-
}) : /*#__PURE__*/React.createElement(LegacyPortalBucket, {
|
|
40
|
+
export function PortalBucket(_ref2) {
|
|
41
|
+
var id = _ref2.id,
|
|
42
|
+
portalManager = _ref2.portalManager;
|
|
43
|
+
return /*#__PURE__*/React.createElement(TickPortalBucket, {
|
|
72
44
|
id: id,
|
|
73
45
|
portalManager: portalManager
|
|
74
46
|
});
|
|
@@ -5,7 +5,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
import throttle from 'lodash/throttle';
|
|
8
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
9
|
var DEFAULT_INITIAL_BUCKETS = 50;
|
|
11
10
|
var DEFAULT_MAX_BUCKET_CAPACITY = 50;
|
|
@@ -200,7 +199,7 @@ export var PortalManager = /*#__PURE__*/function () {
|
|
|
200
199
|
var _this$portalToBucketM,
|
|
201
200
|
_this4 = this;
|
|
202
201
|
var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
203
|
-
if (!
|
|
202
|
+
if (!this.portalToBucketMap.has(key)) {
|
|
204
203
|
this.createBucket();
|
|
205
204
|
// @ts-ignore - TS2538 TypeScript 5.9.2 upgrade
|
|
206
205
|
this.buckets[this.getCurrentBucket()].capacity -= 1;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return Boolean(editorExperiment('platform_editor_controls', 'variant1') || isNewToolbarEnabled);
|
|
1
|
+
export var areToolbarFlagsEnabled = function areToolbarFlagsEnabled(_isNewToolbarEnabled) {
|
|
2
|
+
return true;
|
|
4
3
|
};
|
|
@@ -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 = "135.
|
|
23
|
+
var packageVersion = "135.3.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -13,7 +13,6 @@ import { css, jsx } from '@emotion/react';
|
|
|
13
13
|
import { bind } from 'bind-event-listener';
|
|
14
14
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles/constants';
|
|
15
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
16
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
17
16
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
18
17
|
import Popup from '../Popup';
|
|
19
18
|
import tableSelectorPopup, { TABLE_SELECTOR_BUTTON_GAP, TABLE_SELECTOR_BUTTON_SIZE } from './table-selector';
|
|
@@ -174,9 +173,7 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
174
173
|
maxRow: getMaxRow(prevSize, event.key)
|
|
175
174
|
});
|
|
176
175
|
});
|
|
177
|
-
|
|
178
|
-
event.preventDefault();
|
|
179
|
-
}
|
|
176
|
+
event.preventDefault();
|
|
180
177
|
}
|
|
181
178
|
if (event.key === 'ArrowRight') {
|
|
182
179
|
enableKeyboardMode();
|
|
@@ -219,9 +216,7 @@ export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
|
219
216
|
maxRow: getMaxRow(prevSize, event.key)
|
|
220
217
|
});
|
|
221
218
|
});
|
|
222
|
-
|
|
223
|
-
event.preventDefault();
|
|
224
|
-
}
|
|
219
|
+
event.preventDefault();
|
|
225
220
|
}
|
|
226
221
|
}, [enableKeyboardMode, setSize]);
|
|
227
222
|
useEffect(function () {
|
|
@@ -7,7 +7,6 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl';
|
|
9
9
|
import { Stack } from '@atlaskit/primitives/compiled/stack';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
10
|
import { toolbarInsertBlockMessages as messages } from '../../messages';
|
|
12
11
|
import { OutsideClickTargetRefContext } from '../../ui-react';
|
|
13
12
|
export var TABLE_SELECTOR_BUTTON_GAP = 2;
|
|
@@ -55,7 +54,7 @@ var TableSelectorButton = function TableSelectorButton(_ref) {
|
|
|
55
54
|
if (btnRef.current) {
|
|
56
55
|
if (isFocused) {
|
|
57
56
|
btnRef.current.focus({
|
|
58
|
-
preventScroll:
|
|
57
|
+
preventScroll: true
|
|
59
58
|
});
|
|
60
59
|
} else {
|
|
61
60
|
btnRef.current.blur();
|
|
@@ -19,7 +19,6 @@ import { Box } from '@atlaskit/primitives/box';
|
|
|
19
19
|
import { Inline } from '@atlaskit/primitives/inline';
|
|
20
20
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
21
21
|
import { xcss } from '@atlaskit/primitives/xcss/xcss';
|
|
22
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
23
22
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
24
23
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
25
24
|
import { colorPickerButtonMessages } from '../../messages/color-picker-button';
|
|
@@ -268,7 +267,7 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
268
267
|
ref: buttonRef,
|
|
269
268
|
"aria-label": title,
|
|
270
269
|
"aria-expanded": props.isAriaExpanded ? isPopupOpen : undefined,
|
|
271
|
-
spacing:
|
|
270
|
+
spacing: "default",
|
|
272
271
|
onClick: togglePopup,
|
|
273
272
|
onKeyDown: onKeyDown,
|
|
274
273
|
"data-selected-color": props.currentColor,
|
|
@@ -10,7 +10,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
10
10
|
import _extends from "@babel/runtime/helpers/extends";
|
|
11
11
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
12
12
|
var _excluded = ["children"];
|
|
13
|
-
var _templateObject, _templateObject2
|
|
13
|
+
var _templateObject, _templateObject2;
|
|
14
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; }
|
|
15
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) { _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; }
|
|
16
16
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -30,7 +30,6 @@ import CustomItem from '@atlaskit/menu/custom-item';
|
|
|
30
30
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
31
31
|
import Section from '@atlaskit/menu/section';
|
|
32
32
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
33
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
34
33
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
35
34
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
36
35
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -52,22 +51,14 @@ var focusedMenuItemStyle = css({
|
|
|
52
51
|
});
|
|
53
52
|
var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
54
53
|
if (isActive) {
|
|
55
|
-
if (editorExperiment('platform_editor_controls', 'variant1')) {
|
|
56
|
-
/**
|
|
57
|
-
* Hack for item to imitate old dropdown-menu selected styles
|
|
58
|
-
*/
|
|
59
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
60
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\tposition: relative;\n\t\t\t\t&::before {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 2px;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t\t> span,\n\t\t\t\t> span:hover,\n\t\t\t\t> span:active {\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t\t", ";\n\t\t\t\t}\n\t\t\t\t:focus-visible,\n\t\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
54
|
/**
|
|
64
55
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
65
56
|
*/
|
|
66
57
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
67
|
-
return css(
|
|
58
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\tposition: relative;\n\t\t\t&::before {\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 2px;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t\ttop: 0;\n\t\t\t\tbackground: ", ";\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t\t> span,\n\t\t\t> span:hover,\n\t\t\t> span:active {\n\t\t\t\tbackground: ", ";\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
68
59
|
} else {
|
|
69
60
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
70
|
-
return css(
|
|
61
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #292A2E)", "var(--ds-background-neutral-subtle-hovered, #0515240F)", !submenuActive && "\n\t\t\t\t\t> span:active[aria-disabled='false'] {\n\t\t\t\t\t\tbackground-color: ".concat("var(--ds-background-neutral-subtle-pressed, #0B120E24)", ";\n\t\t\t\t\t}"), "var(--ds-text-disabled, #080F214A)", focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
71
62
|
}
|
|
72
63
|
};
|
|
73
64
|
var DropListWithOutsideClickTargetRef = function DropListWithOutsideClickTargetRef(props) {
|
|
@@ -10,7 +10,6 @@ var _excluded = ["captureClick", "closeOnTab", "handleBackspaceDeleteKeydown", "
|
|
|
10
10
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React, { PureComponent, useCallback, useEffect, useRef, useState } from 'react';
|
|
13
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
14
13
|
import { OutsideClickTargetRefContext } from './OutsideClickTargetRefContext';
|
|
15
14
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
16
15
|
|
|
@@ -69,7 +68,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
69
68
|
key: "componentDidMount",
|
|
70
69
|
value: function componentDidMount() {
|
|
71
70
|
if (this.props.handleClickOutside) {
|
|
72
|
-
var options = this.props.captureClick
|
|
71
|
+
var options = this.props.captureClick ? {
|
|
73
72
|
capture: true
|
|
74
73
|
} : false;
|
|
75
74
|
// Ignored via go/ees005
|
|
@@ -94,7 +93,7 @@ var WithOutsideClick = /*#__PURE__*/function (_PureComponent) {
|
|
|
94
93
|
key: "componentWillUnmount",
|
|
95
94
|
value: function componentWillUnmount() {
|
|
96
95
|
if (this.props.handleClickOutside) {
|
|
97
|
-
var options = this.props.captureClick
|
|
96
|
+
var options = this.props.captureClick ? {
|
|
98
97
|
capture: true
|
|
99
98
|
} : false;
|
|
100
99
|
// Ignored via go/ees005
|
|
@@ -6,27 +6,6 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
6
6
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
7
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
8
8
|
import { getStepRange } from './getStepRange';
|
|
9
|
-
import { hasDocAsParent } from './hasDocAsParent';
|
|
10
|
-
export function bracketTyped(state) {
|
|
11
|
-
var selection = state.selection;
|
|
12
|
-
var _ref = selection,
|
|
13
|
-
$cursor = _ref.$cursor,
|
|
14
|
-
$anchor = _ref.$anchor;
|
|
15
|
-
if (!$cursor) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
var node = $cursor.nodeBefore;
|
|
19
|
-
if (!node) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
if (node.type.name === 'text' && node.text === '{') {
|
|
23
|
-
var paragraphNode = $anchor.node();
|
|
24
|
-
return paragraphNode.marks.length === 0 && hasDocAsParent($anchor);
|
|
25
|
-
}
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
30
9
|
export function nodesBetweenChanged(tr, f, startPos) {
|
|
31
10
|
var stepRange = getStepRange(tr);
|
|
32
11
|
if (!stepRange) {
|
|
@@ -34,9 +13,9 @@ export function nodesBetweenChanged(tr, f, startPos) {
|
|
|
34
13
|
}
|
|
35
14
|
tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
|
|
36
15
|
}
|
|
37
|
-
function getChangedNodesIn(
|
|
38
|
-
var tr =
|
|
39
|
-
doc =
|
|
16
|
+
function getChangedNodesIn(_ref) {
|
|
17
|
+
var tr = _ref.tr,
|
|
18
|
+
doc = _ref.doc;
|
|
40
19
|
var nodes = [];
|
|
41
20
|
var stepRange = getStepRange(tr);
|
|
42
21
|
if (!stepRange) {
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -162,7 +162,7 @@ export { gridTypeForLayout } from './grid';
|
|
|
162
162
|
*
|
|
163
163
|
* Use `@atlaskit/editor-common/utils/document` entry-point instead.
|
|
164
164
|
*/
|
|
165
|
-
export { nodesBetweenChanged,
|
|
165
|
+
export { nodesBetweenChanged, getChangedNodes } from './document';
|
|
166
166
|
export { getStepRange } from './getStepRange';
|
|
167
167
|
export { hasDocAsParent } from './hasDocAsParent';
|
|
168
168
|
export { hasVisibleContent } from './hasVisibleContent';
|
|
@@ -398,6 +398,11 @@ export declare const aiSuggestionsMessages: {
|
|
|
398
398
|
description: string;
|
|
399
399
|
id: string;
|
|
400
400
|
};
|
|
401
|
+
thinkingKeepEditing: {
|
|
402
|
+
defaultMessage: string;
|
|
403
|
+
description: string;
|
|
404
|
+
id: string;
|
|
405
|
+
};
|
|
401
406
|
thinkingMayTakeAFewMinutes: {
|
|
402
407
|
defaultMessage: string;
|
|
403
408
|
description: string;
|
|
@@ -2,6 +2,8 @@ import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
|
2
2
|
import type { OperationalAEP, TrackAEP } from './utils';
|
|
3
3
|
export declare enum AiSuggestionsEntryPointValue {
|
|
4
4
|
PRIMARY_TOOLBAR = "primaryToolbar",
|
|
5
|
+
/** Content Reviewer quick action in the Rovo Chat editor empty state. */
|
|
6
|
+
ROVO_CHAT = "rovoChat",
|
|
5
7
|
/**
|
|
6
8
|
* @private
|
|
7
9
|
* @deprecated Legacy entry point retained for backwards compatibility.
|
|
@@ -150,11 +150,27 @@ type InsertNodeViaExtensionAPIAEP = InsertAEP<undefined, {
|
|
|
150
150
|
type InsertPlaceholderTextAEP = InsertAEP<ACTION_SUBJECT_ID.PLACEHOLDER_TEXT, {
|
|
151
151
|
inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.ELEMENT_BROWSER;
|
|
152
152
|
}, undefined>;
|
|
153
|
-
type FailedToInsertMediaPayload = OperationalAEP<ACTION.FAILED_TO_INSERT, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.MEDIA_INLINE | ACTION_SUBJECT_ID.MEDIA_SINGLE | ACTION_SUBJECT_ID.MEDIA_GROUP, {
|
|
153
|
+
type FailedToInsertMediaPayload = OperationalAEP<ACTION.FAILED_TO_INSERT, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.MEDIA | ACTION_SUBJECT_ID.MEDIA_INLINE | ACTION_SUBJECT_ID.MEDIA_SINGLE | ACTION_SUBJECT_ID.MEDIA_GROUP, {
|
|
154
|
+
/**
|
|
155
|
+
* Whether `allowMediaInlineImages` was set. Only populated when the insertion type could not
|
|
156
|
+
* be determined (`actionSubjectId` is `media`).
|
|
157
|
+
*/
|
|
158
|
+
allowMediaInlineImages?: boolean;
|
|
154
159
|
fileExtension?: string;
|
|
155
160
|
inputMethod?: InputMethodInsertMedia;
|
|
156
161
|
insertMediaVia?: InsertMediaVia;
|
|
162
|
+
/**
|
|
163
|
+
* Value of the `mediaInline` media feature flag. Together with `schemaHasMediaInline` this
|
|
164
|
+
* identifies a flag/schema mismatch. Only populated when the insertion type could not be
|
|
165
|
+
* determined.
|
|
166
|
+
*/
|
|
167
|
+
mediaInlineFlag?: boolean;
|
|
157
168
|
reason?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the editor schema contains the `mediaInline` node. Only populated when the
|
|
171
|
+
* insertion type could not be determined.
|
|
172
|
+
*/
|
|
173
|
+
schemaHasMediaInline?: boolean;
|
|
158
174
|
}>;
|
|
159
175
|
type InsertReferenceSyncedBlockPayload = InsertAEP<ACTION_SUBJECT_ID.SYNCED_BLOCK, {
|
|
160
176
|
blockInstanceId: string;
|