@atlaskit/editor-common 87.10.2 → 87.12.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 +31 -0
- package/dist/cjs/lazy-node-view/node-view.js +13 -1
- package/dist/cjs/media/index.js +8 -1
- package/dist/cjs/media/messages/externalMedia.js +14 -0
- package/dist/cjs/media-single/CommentBadge.js +5 -4
- package/dist/cjs/media-single/ExternalImageBadge.js +78 -0
- package/dist/cjs/media-single/index.js +8 -1
- package/dist/cjs/messages/media-insert.js +10 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +1 -1
- package/dist/cjs/styles/index.js +6 -0
- package/dist/cjs/styles/shared/blockquote.js +39 -1
- package/dist/cjs/styles/shared/code-block.js +2 -2
- package/dist/cjs/styles/shared/panel.js +2 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/styled.js +1 -1
- package/dist/es2019/lazy-node-view/node-view.js +13 -1
- package/dist/es2019/media/index.js +2 -1
- package/dist/es2019/media/messages/externalMedia.js +8 -0
- package/dist/es2019/media-single/CommentBadge.js +6 -5
- package/dist/es2019/media-single/ExternalImageBadge.js +64 -0
- package/dist/es2019/media-single/index.js +2 -1
- package/dist/es2019/messages/media-insert.js +10 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +1 -1
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/blockquote.js +38 -0
- package/dist/es2019/styles/shared/code-block.js +6 -3
- package/dist/es2019/styles/shared/panel.js +2 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/styled.js +1 -1
- package/dist/esm/lazy-node-view/node-view.js +13 -1
- package/dist/esm/media/index.js +2 -1
- package/dist/esm/media/messages/externalMedia.js +8 -0
- package/dist/esm/media-single/CommentBadge.js +5 -4
- package/dist/esm/media-single/ExternalImageBadge.js +68 -0
- package/dist/esm/media-single/index.js +2 -1
- package/dist/esm/messages/media-insert.js +10 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/blockquote.js +38 -0
- package/dist/esm/styles/shared/code-block.js +2 -2
- package/dist/esm/styles/shared/panel.js +2 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/styled.js +1 -1
- package/dist/types/lazy-node-view/index.d.ts +2 -2
- package/dist/types/lazy-node-view/types.d.ts +3 -0
- package/dist/types/media/index.d.ts +1 -0
- package/dist/types/media/messages/externalMedia.d.ts +7 -0
- package/dist/types/media-single/CommentBadge.d.ts +2 -2
- package/dist/types/media-single/ExternalImageBadge.d.ts +9 -0
- package/dist/types/media-single/index.d.ts +1 -0
- package/dist/types/messages/media-insert.d.ts +10 -0
- package/dist/types/node-width/index.d.ts +1 -1
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/blockquote.d.ts +1 -0
- package/dist/types-ts4.5/lazy-node-view/index.d.ts +2 -2
- package/dist/types-ts4.5/lazy-node-view/types.d.ts +3 -0
- package/dist/types-ts4.5/media/index.d.ts +1 -0
- package/dist/types-ts4.5/media/messages/externalMedia.d.ts +7 -0
- package/dist/types-ts4.5/media-single/CommentBadge.d.ts +2 -2
- package/dist/types-ts4.5/media-single/ExternalImageBadge.d.ts +9 -0
- package/dist/types-ts4.5/media-single/index.d.ts +1 -0
- package/dist/types-ts4.5/messages/media-insert.d.ts +10 -0
- package/dist/types-ts4.5/node-width/index.d.ts +1 -1
- package/dist/types-ts4.5/styles/index.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/blockquote.d.ts +1 -0
- package/package.json +10 -7
|
@@ -100,7 +100,7 @@ const getNestedParentNode = (tablePos, state) => {
|
|
|
100
100
|
const calcBreakoutNodeWidth = (layout, containerWidth, isFullWidthModeEnabled) => {
|
|
101
101
|
return isFullWidthModeEnabled ? Math.min(containerWidth.lineLength, akEditorFullWidthLayoutWidth) : absoluteBreakoutWidth(layout, containerWidth.width);
|
|
102
102
|
};
|
|
103
|
-
export const getTableContainerWidth =
|
|
103
|
+
export const getTableContainerWidth = node => {
|
|
104
104
|
if (node !== null && node !== void 0 && node.attrs.width) {
|
|
105
105
|
return node.attrs.width;
|
|
106
106
|
}
|
|
@@ -4,7 +4,7 @@ export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides,
|
|
|
4
4
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
|
|
5
5
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
6
6
|
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
7
|
-
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
7
|
+
export { blockquoteSharedStyles, blockquoteSharedStylesNew } from './shared/blockquote';
|
|
8
8
|
export { headingsSharedStyles } from './shared/headings';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
10
10
|
export { whitespaceSharedStyles } from './shared/whitespace';
|
|
@@ -37,4 +37,42 @@ export const blockquoteSharedStyles = css({
|
|
|
37
37
|
display: 'inline-table'
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
43
|
+
export const blockquoteSharedStylesNew = css({
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
|
+
'& blockquote': {
|
|
46
|
+
boxSizing: 'border-box',
|
|
47
|
+
color: 'inherit',
|
|
48
|
+
paddingLeft: "var(--ds-space-250, 20px)",
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
50
|
+
borderLeft: `2px solid ${`var(--ds-border, ${akEditorBlockquoteBorderColor})`}`,
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
|
+
margin: `${blockNodesVerticalMargin} 0 0 0`,
|
|
53
|
+
marginRight: 0,
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
55
|
+
"[dir='rtl'] &": {
|
|
56
|
+
paddingLeft: 0,
|
|
57
|
+
paddingRight: "var(--ds-space-200, 16px)"
|
|
58
|
+
},
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
60
|
+
'&:first-child': {
|
|
61
|
+
marginTop: 0
|
|
62
|
+
},
|
|
63
|
+
'&::before': {
|
|
64
|
+
content: "''"
|
|
65
|
+
},
|
|
66
|
+
'&::after': {
|
|
67
|
+
content: 'none'
|
|
68
|
+
},
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
70
|
+
'& p': {
|
|
71
|
+
display: 'block'
|
|
72
|
+
},
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
74
|
+
'& table, & table:last-child': {
|
|
75
|
+
display: 'inline-table'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
40
78
|
});
|
|
@@ -142,8 +142,10 @@ export const codeBlockSharedStyles = () => css`
|
|
|
142
142
|
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER_FG} {
|
|
143
143
|
background-color: ${`var(--ds-background-neutral, ${N30})`};
|
|
144
144
|
position: relative;
|
|
145
|
-
width: 2rem;
|
|
145
|
+
width: var(--lineNumberGutterWidth, 2rem);
|
|
146
|
+
padding: 0px ${"var(--ds-space-100, 8px)"};
|
|
146
147
|
flex-shrink: 0;
|
|
148
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
@@ -178,12 +180,13 @@ export const codeBlockSharedStyles = () => css`
|
|
|
178
180
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET} {
|
|
179
181
|
pointer-events: none;
|
|
180
182
|
user-select: none;
|
|
181
|
-
width: 2rem;
|
|
183
|
+
width: var(--lineNumberGutterWidth, 2rem);
|
|
182
184
|
left: 0;
|
|
183
185
|
position: absolute;
|
|
184
186
|
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
187
|
+
padding: 0px ${"var(--ds-space-100, 8px)"};
|
|
185
188
|
line-height: 1.5rem;
|
|
186
|
-
text-align:
|
|
189
|
+
text-align: right;
|
|
187
190
|
color: ${"var(--ds-text-subtlest, #505F79)"};
|
|
188
191
|
}
|
|
189
192
|
}
|
|
@@ -6,6 +6,7 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
|
6
6
|
import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
8
8
|
import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { B100, B400, B50, B75, G200, G400, G50, G75, N0, N20, N60, P100, P400, P50, P75, R100, R400, R50, R75, T100, T50, T75, Y200, Y400, Y50, Y75 } from '@atlaskit/theme/colors';
|
|
10
11
|
const lightPanelColors = {
|
|
11
12
|
info: B50,
|
|
@@ -172,7 +173,7 @@ export const panelSharedStylesWithoutPrefix = () => css`
|
|
|
172
173
|
height: ${"var(--ds-space-300, 24px)"};
|
|
173
174
|
width: ${"var(--ds-space-300, 24px)"};
|
|
174
175
|
box-sizing: content-box;
|
|
175
|
-
padding-right: ${"var(--ds-space-100, 8px)"};
|
|
176
|
+
padding-right: ${fg('platform_editor_element_padding_changes_gate') ? "var(--ds-space-150, 12px)" : "var(--ds-space-100, 8px)"};
|
|
176
177
|
text-align: center;
|
|
177
178
|
user-select: none;
|
|
178
179
|
-moz-user-select: none;
|
|
@@ -12,7 +12,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
12
12
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
13
13
|
import Layer from '../Layer';
|
|
14
14
|
const packageName = "@atlaskit/editor-common";
|
|
15
|
-
const packageVersion = "87.
|
|
15
|
+
const packageVersion = "87.12.0";
|
|
16
16
|
const halfFocusRing = 1;
|
|
17
17
|
const dropOffset = '0, 8';
|
|
18
18
|
class DropList extends Component {
|
|
@@ -221,7 +221,7 @@ export const mediaWrapperStyle = props => css`
|
|
|
221
221
|
|
|
222
222
|
// Comments on media project adds comment badge as child of the media wrapper,
|
|
223
223
|
// thus we need to exclude it so that style is applied to intended div
|
|
224
|
-
& > div:not([data-comment-badge='true']) {
|
|
224
|
+
& > div:not([data-comment-badge='true'], [data-external-image-badge='true']) {
|
|
225
225
|
position: ${props.hasFallbackContainer ? 'absolute' : 'relative'};
|
|
226
226
|
height: 100%;
|
|
227
227
|
width: 100%;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import memoize from 'lodash/memoize';
|
|
3
4
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
var getEditorLineWidth = memoize(function (view) {
|
|
6
|
+
var _view$dom;
|
|
7
|
+
return (_view$dom = view.dom) === null || _view$dom === void 0 ? void 0 : _view$dom.clientWidth;
|
|
8
|
+
});
|
|
9
|
+
|
|
4
10
|
/**
|
|
5
11
|
* 🧱 Internal: Editor FE Platform
|
|
6
12
|
*
|
|
@@ -15,7 +21,13 @@ export var LazyNodeView = /*#__PURE__*/function () {
|
|
|
15
21
|
this.dom = document.createElement('div');
|
|
16
22
|
return;
|
|
17
23
|
}
|
|
18
|
-
var
|
|
24
|
+
var toDOMConfiguration = {
|
|
25
|
+
editorLineWidth: getEditorLineWidth(view)
|
|
26
|
+
};
|
|
27
|
+
var fallback = DOMSerializer.renderSpec(document, node.type.spec.toDOM(node,
|
|
28
|
+
// We are injecting a second parameter to be used by the toDOM lazy node view implementations
|
|
29
|
+
// @ts-expect-error
|
|
30
|
+
toDOMConfiguration));
|
|
19
31
|
this.dom = fallback.dom;
|
|
20
32
|
this.contentDOM = fallback.contentDOM;
|
|
21
33
|
if (this.dom instanceof HTMLElement) {
|
package/dist/esm/media/index.js
CHANGED
|
@@ -7,4 +7,5 @@ export { captionMessages } from './messages/caption';
|
|
|
7
7
|
export { dropPlaceholderMessages } from './messages/dropPlaceholder';
|
|
8
8
|
export { altTextMessages } from './messages/altText';
|
|
9
9
|
export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
|
|
10
|
-
export { commentMessages } from './messages/comments';
|
|
10
|
+
export { commentMessages } from './messages/comments';
|
|
11
|
+
export { externalMediaMessages } from './messages/externalMedia';
|
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
6
|
+
import { forwardRef, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
@@ -30,11 +30,11 @@ var commentBadgeEditorOverrides = function commentBadgeEditorOverrides(commentsO
|
|
|
30
30
|
zIndex: layers.card()
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
var getBadgeSize = function getBadgeSize(width, height) {
|
|
33
|
+
export var getBadgeSize = function getBadgeSize(width, height) {
|
|
34
34
|
// width is the original width of image, not resized or currently rendered to user. Defaulting to medium for now
|
|
35
35
|
return width && width < 70 || height && height < 70 ? 'small' : 'medium';
|
|
36
36
|
};
|
|
37
|
-
export var CommentBadge = function
|
|
37
|
+
export var CommentBadge = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
38
38
|
var intl = _ref.intl,
|
|
39
39
|
width = _ref.width,
|
|
40
40
|
height = _ref.height,
|
|
@@ -79,6 +79,7 @@ export var CommentBadge = function CommentBadge(_ref) {
|
|
|
79
79
|
}
|
|
80
80
|
}, [status]);
|
|
81
81
|
return jsx("div", {
|
|
82
|
+
ref: ref,
|
|
82
83
|
css: badgeOffsetRight ? [commentBadgeWrapper,
|
|
83
84
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
84
85
|
commentBadgeEditorOverrides(commentsOnMediaBugFixEnabled, badgeOffsetRight)] : commentBadgeWrapper
|
|
@@ -111,4 +112,4 @@ export var CommentBadge = function CommentBadge(_ref) {
|
|
|
111
112
|
size: badgeSize
|
|
112
113
|
})
|
|
113
114
|
})));
|
|
114
|
-
};
|
|
115
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import debounce from 'lodash/debounce';
|
|
4
|
+
import { useIntl } from 'react-intl-next';
|
|
5
|
+
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
6
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
7
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
8
|
+
import { externalMediaMessages } from '../media';
|
|
9
|
+
import { getBadgeSize } from './CommentBadge';
|
|
10
|
+
var baseStyles = xcss({
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: 'space.025',
|
|
13
|
+
borderRadius: 'border.radius',
|
|
14
|
+
backgroundColor: 'elevation.surface',
|
|
15
|
+
zIndex: 'tooltip',
|
|
16
|
+
lineHeight: "var(--ds-space-200, 16px)",
|
|
17
|
+
right: 'var(--right-offset)',
|
|
18
|
+
cursor: 'pointer'
|
|
19
|
+
});
|
|
20
|
+
export var ExternalImageBadge = function ExternalImageBadge(_ref) {
|
|
21
|
+
var mediaWidth = _ref.mediaWidth,
|
|
22
|
+
mediaHeight = _ref.mediaHeight,
|
|
23
|
+
_ref$commentBadgeRigh = _ref.commentBadgeRightOffset,
|
|
24
|
+
commentBadgeRightOffset = _ref$commentBadgeRigh === void 0 ? 0 : _ref$commentBadgeRigh,
|
|
25
|
+
mediaElement = _ref.mediaElement;
|
|
26
|
+
var intl = useIntl();
|
|
27
|
+
var message = intl.formatMessage(externalMediaMessages.externalMediaFile);
|
|
28
|
+
var _useState = useState(getBadgeSize(mediaWidth, mediaHeight)),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
badgeSize = _useState2[0],
|
|
31
|
+
setBadgeSize = _useState2[1];
|
|
32
|
+
// detect resize of media element to adjust badge size
|
|
33
|
+
// will combine with the comment badge resize observer when refactoring in the future to avoid multiple resize observers
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
var observer = new ResizeObserver(debounce(function (entries) {
|
|
36
|
+
var _entries = _slicedToArray(entries, 1),
|
|
37
|
+
entry = _entries[0];
|
|
38
|
+
var _entry$contentRect = entry.contentRect,
|
|
39
|
+
width = _entry$contentRect.width,
|
|
40
|
+
height = _entry$contentRect.height;
|
|
41
|
+
setBadgeSize(getBadgeSize(width, height));
|
|
42
|
+
}));
|
|
43
|
+
if (mediaElement) {
|
|
44
|
+
observer.observe(mediaElement);
|
|
45
|
+
}
|
|
46
|
+
return function () {
|
|
47
|
+
observer.disconnect();
|
|
48
|
+
};
|
|
49
|
+
}, [mediaElement]);
|
|
50
|
+
var baseRightOffset = badgeSize === 'medium' ? 4 : 2;
|
|
51
|
+
var rightOffset = baseRightOffset + commentBadgeRightOffset;
|
|
52
|
+
return /*#__PURE__*/React.createElement(Box
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
54
|
+
, {
|
|
55
|
+
style: {
|
|
56
|
+
'--right-offset': "".concat(rightOffset, "px")
|
|
57
|
+
},
|
|
58
|
+
padding: badgeSize === 'medium' ? 'space.050' : 'space.0',
|
|
59
|
+
"data-external-image-badge": "true",
|
|
60
|
+
xcss: baseStyles,
|
|
61
|
+
tabIndex: 0
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
63
|
+
content: message
|
|
64
|
+
}, /*#__PURE__*/React.createElement(InfoIcon, {
|
|
65
|
+
size: "small",
|
|
66
|
+
label: message
|
|
67
|
+
})));
|
|
68
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID } from './constants';
|
|
2
2
|
export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest, calcMinWidth, getMaxWidthForNestedNode, getMaxWidthForNestedNodeNext, currentMediaNodeWithPos } from './utils';
|
|
3
|
-
export { CommentBadge } from './CommentBadge';
|
|
3
|
+
export { CommentBadge } from './CommentBadge';
|
|
4
|
+
export { ExternalImageBadge } from './ExternalImageBadge';
|
|
@@ -34,5 +34,15 @@ export var mediaInsertMessages = defineMessages({
|
|
|
34
34
|
id: 'fabric.editor.media.insert.mediaAlt',
|
|
35
35
|
defaultMessage: 'Preview for uploaded image or video file',
|
|
36
36
|
description: 'Alt text describing a preview of an image uploaded.'
|
|
37
|
+
},
|
|
38
|
+
linkTabTitle: {
|
|
39
|
+
id: 'fabric.editor.media.insert.linkTabTitle',
|
|
40
|
+
defaultMessage: 'Link',
|
|
41
|
+
description: 'Title of the navigation tab that allows users to insert media from a URL or link'
|
|
42
|
+
},
|
|
43
|
+
mediaPickerPopupAriaLabel: {
|
|
44
|
+
id: 'fabric.editor.media.insert.mediaPickerPopupAriaLabel',
|
|
45
|
+
defaultMessage: 'Media picker',
|
|
46
|
+
description: 'Accessibility label for the media picker popup'
|
|
37
47
|
}
|
|
38
48
|
});
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "87.
|
|
10
|
+
var packageVersion = "87.12.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -98,7 +98,7 @@ var getNestedParentNode = function getNestedParentNode(tablePos, state) {
|
|
|
98
98
|
var calcBreakoutNodeWidth = function calcBreakoutNodeWidth(layout, containerWidth, isFullWidthModeEnabled) {
|
|
99
99
|
return isFullWidthModeEnabled ? Math.min(containerWidth.lineLength, akEditorFullWidthLayoutWidth) : absoluteBreakoutWidth(layout, containerWidth.width);
|
|
100
100
|
};
|
|
101
|
-
export var getTableContainerWidth = function getTableContainerWidth(node
|
|
101
|
+
export var getTableContainerWidth = function getTableContainerWidth(node) {
|
|
102
102
|
if (node !== null && node !== void 0 && node.attrs.width) {
|
|
103
103
|
return node.attrs.width;
|
|
104
104
|
}
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides,
|
|
|
4
4
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
|
|
5
5
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
6
6
|
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
7
|
-
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
7
|
+
export { blockquoteSharedStyles, blockquoteSharedStylesNew } from './shared/blockquote';
|
|
8
8
|
export { headingsSharedStyles } from './shared/headings';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
10
10
|
export { whitespaceSharedStyles } from './shared/whitespace';
|
|
@@ -37,4 +37,42 @@ export var blockquoteSharedStyles = css({
|
|
|
37
37
|
display: 'inline-table'
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
43
|
+
export var blockquoteSharedStylesNew = css({
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
|
+
'& blockquote': {
|
|
46
|
+
boxSizing: 'border-box',
|
|
47
|
+
color: 'inherit',
|
|
48
|
+
paddingLeft: "var(--ds-space-250, 20px)",
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
50
|
+
borderLeft: "2px solid ".concat("var(--ds-border, ".concat(akEditorBlockquoteBorderColor, ")")),
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
|
+
margin: "".concat(blockNodesVerticalMargin, " 0 0 0"),
|
|
53
|
+
marginRight: 0,
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
55
|
+
"[dir='rtl'] &": {
|
|
56
|
+
paddingLeft: 0,
|
|
57
|
+
paddingRight: "var(--ds-space-200, 16px)"
|
|
58
|
+
},
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
60
|
+
'&:first-child': {
|
|
61
|
+
marginTop: 0
|
|
62
|
+
},
|
|
63
|
+
'&::before': {
|
|
64
|
+
content: "''"
|
|
65
|
+
},
|
|
66
|
+
'&::after': {
|
|
67
|
+
content: 'none'
|
|
68
|
+
},
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
70
|
+
'& p': {
|
|
71
|
+
display: 'block'
|
|
72
|
+
},
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
74
|
+
'& table, & table:last-child': {
|
|
75
|
+
display: 'inline-table'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
40
78
|
});
|
|
@@ -22,9 +22,9 @@ export var CodeBlockSharedCssClassName = {
|
|
|
22
22
|
CODEBLOCK_LINE_NUMBER_GUTTER_FG: 'line-number-gutter--fg'
|
|
23
23
|
};
|
|
24
24
|
export var codeBlockSharedStyles = function codeBlockSharedStyles() {
|
|
25
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\t// relative position set so number gutter remains absolute on horizontal scroll.\n\t\t\tposition: relative;\n\t\t}\n\n\t\t.", " {\n\t\t\tflex-shrink: 0;\n\t\t\ttext-align: right;\n\t\t\tbackground-color: ", ";\n\t\t\tpadding: ", ";\n\t\t\tposition: relative;\n\n\t\t\tspan {\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: 0;\n\t\t\t\tfont-size: 0;\n\n\t\t\t\t::before {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tcontent: counter(line);\n\t\t\t\t\tcounter-increment: line;\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tfont-size: ", ";\n\t\t\t\t\tline-height: 1.5rem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: 2rem;\n\t\t\tflex-shrink: 0;\n\t\t}\n\n\t\t.", " {\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\n\t\t\tcode {\n\t\t\t\tflex-grow: 1;\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\twhite-space: pre;\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tcode {\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tpointer-events: none;\n\t\t\tuser-select: none;\n\t\t\twidth: 2rem;\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\tfont-size: ", ";\n\t\t\tline-height: 1.5rem;\n\t\t\ttext-align:
|
|
25
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\t// relative position set so number gutter remains absolute on horizontal scroll.\n\t\t\tposition: relative;\n\t\t}\n\n\t\t.", " {\n\t\t\tflex-shrink: 0;\n\t\t\ttext-align: right;\n\t\t\tbackground-color: ", ";\n\t\t\tpadding: ", ";\n\t\t\tposition: relative;\n\n\t\t\tspan {\n\t\t\t\tdisplay: block;\n\t\t\t\tline-height: 0;\n\t\t\t\tfont-size: 0;\n\n\t\t\t\t::before {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tcontent: counter(line);\n\t\t\t\t\tcounter-increment: line;\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tfont-size: ", ";\n\t\t\t\t\tline-height: 1.5rem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tpadding: 0px ", ";\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: ", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tdisplay: flex;\n\t\t\tflex: 1;\n\n\t\t\tcode {\n\t\t\t\tflex-grow: 1;\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\twhite-space: pre;\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tcode {\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tpointer-events: none;\n\t\t\tuser-select: none;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\tfont-size: ", ";\n\t\t\tpadding: 0px ", ";\n\t\t\tline-height: 1.5rem;\n\t\t\ttext-align: right;\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_FG_WRAPPED, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER_FG, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_FG, "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER_FG, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_FG, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, transparent)", "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "var(--ds-background-neutral, ".concat(N20, ")"), "var(--ds-border-radius, 3px)", overflowShadow({
|
|
26
26
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
27
|
-
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER_FG, CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, ".concat(N30, ")"), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, ".concat(N400, ")"), relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER_FG, "var(--ds-background-neutral, ".concat(N30, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, ".concat(N800, ")"), "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_FG, "var(--ds-text, ".concat(N800, ")"), "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, relativeFontSizeToBase16(fontSize()), "var(--ds-text-subtlest, #505F79)");
|
|
27
|
+
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER_FG, CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, ".concat(N30, ")"), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, ".concat(N400, ")"), relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER_FG, "var(--ds-background-neutral, ".concat(N30, ")"), "var(--ds-space-100, 8px)", relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, ".concat(N800, ")"), "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_FG, "var(--ds-text, ".concat(N800, ")"), "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, relativeFontSizeToBase16(fontSize()), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, #505F79)");
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -10,6 +10,7 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
|
10
10
|
import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
12
12
|
import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { B100, B400, B50, B75, G200, G400, G50, G75, N0, N20, N60, P100, P400, P50, P75, R100, R400, R50, R75, T100, T50, T75, Y200, Y400, Y50, Y75 } from '@atlaskit/theme/colors';
|
|
14
15
|
var lightPanelColors = {
|
|
15
16
|
info: B50,
|
|
@@ -162,7 +163,7 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
|
|
|
162
163
|
|
|
163
164
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
|
|
164
165
|
export var panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix() {
|
|
165
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\t\t", "\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(PanelType.INFO), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS));
|
|
166
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\t\t", "\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", fg('platform_editor_element_padding_changes_gate') ? "var(--ds-space-150, 12px)" : "var(--ds-space-100, 8px)", iconDynamicStyles(PanelType.INFO), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS));
|
|
166
167
|
};
|
|
167
168
|
export var panelSharedStyles = function panelSharedStyles() {
|
|
168
169
|
return css(_defineProperty({}, ".".concat(PanelSharedCssClassName.prefix), panelSharedStylesWithoutPrefix()));
|
|
@@ -20,7 +20,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
20
20
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "87.
|
|
23
|
+
var packageVersion = "87.12.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -175,7 +175,7 @@ var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
|
|
|
175
175
|
|
|
176
176
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
177
177
|
export var mediaWrapperStyle = function mediaWrapperStyle(props) {
|
|
178
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tposition: relative;\n\n\t", "\n\n\t/* Editor */\n & > figure {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t// Comments on media project adds comment badge as child of the media wrapper,\n\t// thus we need to exclude it so that style is applied to intended div\n\t& > div:not([data-comment-badge='true']) {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t& * [data-mark-annotation-type='inlineComment'] {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t&[data-node-type='embedCard'] > div {\n\t\twidth: 100%;\n\t}\n\n\t/* Renderer */\n\t[data-node-type='media'] {\n\t\tposition: static !important;\n\n\t\t> div {\n\t\t\tposition: absolute;\n\t\t\theight: 100%;\n\t\t}\n\t}\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
|
|
178
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tposition: relative;\n\n\t", "\n\n\t/* Editor */\n & > figure {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t// Comments on media project adds comment badge as child of the media wrapper,\n\t// thus we need to exclude it so that style is applied to intended div\n\t& > div:not([data-comment-badge='true'], [data-external-image-badge='true']) {\n\t\tposition: ", ";\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\n\t& * [data-mark-annotation-type='inlineComment'] {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n\n\t&[data-node-type='embedCard'] > div {\n\t\twidth: 100%;\n\t}\n\n\t/* Renderer */\n\t[data-node-type='media'] {\n\t\tposition: static !important;\n\n\t\t> div {\n\t\t\tposition: absolute;\n\t\t\theight: 100%;\n\t\t}\n\t}\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
|
|
179
179
|
};
|
|
180
180
|
export var MediaWrapper = function MediaWrapper(_ref3) {
|
|
181
181
|
var children = _ref3.children,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '../analytics';
|
|
4
|
-
import type { NodeViewConstructor } from './types';
|
|
4
|
+
import type { LazyNodeViewToDOMConfiguration, NodeViewConstructor } from './types';
|
|
5
5
|
export { convertToInlineCss } from './css-helper';
|
|
6
|
-
export type { NodeViewConstructor };
|
|
6
|
+
export type { NodeViewConstructor, LazyNodeViewToDOMConfiguration };
|
|
7
7
|
/**
|
|
8
8
|
* 📢 Public Type
|
|
9
9
|
*
|
|
@@ -12,3 +12,6 @@ export type LoadedReactNodeViews = Record<string, NodeViewConstructor>;
|
|
|
12
12
|
* 🧱 Internal: Editor FE Platform
|
|
13
13
|
*/
|
|
14
14
|
export type CacheLoadedReactNodeViews = WeakMap<EditorView, LoadedReactNodeViews>;
|
|
15
|
+
export type LazyNodeViewToDOMConfiguration = {
|
|
16
|
+
editorLineWidth: number;
|
|
17
|
+
};
|
|
@@ -8,3 +8,4 @@ export { dropPlaceholderMessages } from './messages/dropPlaceholder';
|
|
|
8
8
|
export { altTextMessages } from './messages/altText';
|
|
9
9
|
export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
|
|
10
10
|
export { commentMessages } from './messages/comments';
|
|
11
|
+
export { externalMediaMessages } from './messages/externalMedia';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
+
export declare const getBadgeSize: (width?: number, height?: number) => "medium" | "small";
|
|
4
4
|
export type CommentBadgeProps = {
|
|
5
5
|
intl: IntlShape;
|
|
6
6
|
width?: number;
|
|
@@ -15,4 +15,4 @@ export type CommentBadgeProps = {
|
|
|
15
15
|
badgeOffsetRight?: string;
|
|
16
16
|
commentsOnMediaBugFixEnabled?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const CommentBadge: (
|
|
18
|
+
export declare const CommentBadge: import("react").ForwardRefExoticComponent<CommentBadgeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type ExternalImageBadgeProps = {
|
|
3
|
+
mediaElement?: HTMLElement | null;
|
|
4
|
+
commentBadgeRightOffset?: number;
|
|
5
|
+
mediaHeight?: number;
|
|
6
|
+
mediaWidth?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const ExternalImageBadge: ({ mediaWidth, mediaHeight, commentBadgeRightOffset, mediaElement, }: ExternalImageBadgeProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_HIGHLIGHT_GAP, MEDIA_SINGLE_GUTTER_SIZE, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, Layout as MediaSingleLayout, DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT, wrappedLayouts, CAPTION_PLACEHOLDER_ID, } from './constants';
|
|
2
2
|
export { getMediaSinglePixelWidth, calcMediaSinglePixelWidth, calcMediaSingleMaxWidth, getMediaSingleInitialWidth, calculateOffsetLeft, roundToNearest, calcMinWidth, getMaxWidthForNestedNode, getMaxWidthForNestedNodeNext, currentMediaNodeWithPos, } from './utils';
|
|
3
3
|
export { CommentBadge } from './CommentBadge';
|
|
4
|
+
export { ExternalImageBadge } from './ExternalImageBadge';
|
|
4
5
|
export type { CommentBadgeProps } from './CommentBadge';
|
|
@@ -34,4 +34,14 @@ export declare const mediaInsertMessages: {
|
|
|
34
34
|
defaultMessage: string;
|
|
35
35
|
description: string;
|
|
36
36
|
};
|
|
37
|
+
linkTabTitle: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
mediaPickerPopupAriaLabel: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
37
47
|
};
|
|
@@ -11,5 +11,5 @@ export declare const layoutToWidth: {
|
|
|
11
11
|
* If current node selection is not nested will return undefined
|
|
12
12
|
*/
|
|
13
13
|
export declare const getParentNodeWidth: (pos: number | undefined, state: EditorState, containerWidth: EditorContainerWidth, isFullWidthModeEnabled?: boolean) => any;
|
|
14
|
-
export declare const getTableContainerWidth: (node?: PMNode
|
|
14
|
+
export declare const getTableContainerWidth: (node?: PMNode) => number;
|
|
15
15
|
export declare const getTableWidthWithNumberColumn: (node: PMNode, offset: number) => number;
|
|
@@ -4,7 +4,7 @@ export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides,
|
|
|
4
4
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
|
|
5
5
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
6
6
|
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
7
|
-
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
7
|
+
export { blockquoteSharedStyles, blockquoteSharedStylesNew } from './shared/blockquote';
|
|
8
8
|
export { headingsSharedStyles } from './shared/headings';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
10
10
|
export { whitespaceSharedStyles } from './shared/whitespace';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { DispatchAnalyticsEvent } from '../analytics';
|
|
4
|
-
import type { NodeViewConstructor } from './types';
|
|
4
|
+
import type { LazyNodeViewToDOMConfiguration, NodeViewConstructor } from './types';
|
|
5
5
|
export { convertToInlineCss } from './css-helper';
|
|
6
|
-
export type { NodeViewConstructor };
|
|
6
|
+
export type { NodeViewConstructor, LazyNodeViewToDOMConfiguration };
|
|
7
7
|
/**
|
|
8
8
|
* 📢 Public Type
|
|
9
9
|
*
|
|
@@ -12,3 +12,6 @@ export type LoadedReactNodeViews = Record<string, NodeViewConstructor>;
|
|
|
12
12
|
* 🧱 Internal: Editor FE Platform
|
|
13
13
|
*/
|
|
14
14
|
export type CacheLoadedReactNodeViews = WeakMap<EditorView, LoadedReactNodeViews>;
|
|
15
|
+
export type LazyNodeViewToDOMConfiguration = {
|
|
16
|
+
editorLineWidth: number;
|
|
17
|
+
};
|
|
@@ -8,3 +8,4 @@ export { dropPlaceholderMessages } from './messages/dropPlaceholder';
|
|
|
8
8
|
export { altTextMessages } from './messages/altText';
|
|
9
9
|
export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
|
|
10
10
|
export { commentMessages } from './messages/comments';
|
|
11
|
+
export { externalMediaMessages } from './messages/externalMedia';
|