@atlaskit/editor-common 78.14.4 → 78.16.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 +16 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/index.js +6 -0
- package/dist/cjs/styles/shared/annotation.js +6 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/index.js +5 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/annotation.js +5 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +5 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/annotation.js +5 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/index.js +5 -3
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/annotation.d.ts +1 -0
- package/dist/types/types/annotation/index.d.ts +39 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/text-formatting.d.ts +2 -1
- package/dist/types/ui/MediaSingle/index.d.ts +2 -1
- package/dist/types-ts4.5/styles/index.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/annotation.d.ts +1 -0
- package/dist/types-ts4.5/types/annotation/index.d.ts +39 -2
- package/dist/types-ts4.5/types/index.d.ts +1 -1
- package/dist/types-ts4.5/types/text-formatting.d.ts +2 -1
- package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 78.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#82499](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82499) [`cbd66fd38b62`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cbd66fd38b62) - Add option to disable strikethrough on text-formatting via disableStrikethrough.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 78.15.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#78436](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78436) [`89ff7202e5fe`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/89ff7202e5fe) - The annotation comment provider will now accept a new hoverComponent which is displayed by the annotation ui when specific block nodes are rolled over by the users mouse
|
|
18
|
+
|
|
3
19
|
## 78.14.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "78.
|
|
19
|
+
var packageVersion = "78.16.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
package/dist/cjs/styles/index.js
CHANGED
|
@@ -255,6 +255,12 @@ Object.defineProperty(exports, "listsSharedStyles", {
|
|
|
255
255
|
return _lists.listsSharedStyles;
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
+
Object.defineProperty(exports, "mediaAnnotationStyles", {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function get() {
|
|
261
|
+
return _annotation.mediaAnnotationStyles;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
258
264
|
Object.defineProperty(exports, "mediaSingleSharedStyle", {
|
|
259
265
|
enumerable: true,
|
|
260
266
|
get: function get() {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.blockAnnotationPrefix = exports.annotationSharedStyles = exports.annotationPrefix = exports.BlockAnnotationSharedClassNames = exports.AnnotationSharedClassNames = exports.AnnotationSharedCSSByState = void 0;
|
|
7
|
+
exports.mediaAnnotationStyles = exports.blockAnnotationPrefix = exports.annotationSharedStyles = exports.annotationPrefix = exports.BlockAnnotationSharedClassNames = exports.AnnotationSharedClassNames = exports.AnnotationSharedCSSByState = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -74,4 +74,8 @@ var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function A
|
|
|
74
74
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
|
|
75
75
|
var annotationSharedStyles = exports.annotationSharedStyles = function annotationSharedStyles() {
|
|
76
76
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n\n // Styling for comments on media node\n .", "[class*=ak-editor-block-annotation-] {\n border-radius: 3px;\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur, mediaNodeDomRef, mediaNodeDomRef, BlockAnnotationSharedClassNames.draft, (0, _styles.commentStatusStyleMap)('draft'), mediaNodeDomRef, BlockAnnotationSharedClassNames.focus, (0, _styles.commentStatusStyleMap)('focus'), mediaNodeDomRef, BlockAnnotationSharedClassNames.blur, (0, _styles.commentStatusStyleMap)('blur'));
|
|
77
|
-
};
|
|
77
|
+
};
|
|
78
|
+
var mediaAnnotationStyles = exports.mediaAnnotationStyles = (0, _react.css)({
|
|
79
|
+
boxShadow: "5px 5px ".concat("var(--ds-background-accent-yellow-subtler, ".concat(Y75a, ")")),
|
|
80
|
+
borderRadius: '3px'
|
|
81
|
+
});
|
|
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
22
22
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "78.
|
|
25
|
+
var packageVersion = "78.16.0";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = MediaSingle;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
10
|
var _react = _interopRequireDefault(require("react"));
|
|
10
11
|
var _react2 = require("@emotion/react");
|
|
@@ -36,7 +37,8 @@ function MediaSingle(_ref) {
|
|
|
36
37
|
hasFallbackContainer = _ref$hasFallbackConta === void 0 ? true : _ref$hasFallbackConta,
|
|
37
38
|
handleMediaSingleRef = _ref.handleMediaSingleRef,
|
|
38
39
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
39
|
-
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline
|
|
40
|
+
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
41
|
+
dataAttributes = _ref.dataAttributes;
|
|
40
42
|
var isPixelWidth = (size === null || size === void 0 ? void 0 : size.widthType) === 'pixel';
|
|
41
43
|
var mediaSingleWidth = (size === null || size === void 0 ? void 0 : size.width) || pctWidth;
|
|
42
44
|
var children = _react.default.Children.toArray(propsChildren);
|
|
@@ -87,7 +89,7 @@ function MediaSingle(_ref) {
|
|
|
87
89
|
var _children = (0, _slicedToArray2.default)(children, 2),
|
|
88
90
|
media = _children[0],
|
|
89
91
|
caption = _children[1];
|
|
90
|
-
return (0, _react2.jsx)("div", {
|
|
92
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
91
93
|
ref: handleMediaSingleRef,
|
|
92
94
|
css: (0, _styled.MediaSingleDimensionHelper)({
|
|
93
95
|
width: width,
|
|
@@ -106,7 +108,7 @@ function MediaSingle(_ref) {
|
|
|
106
108
|
'is-loading': isLoading,
|
|
107
109
|
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
108
110
|
})
|
|
109
|
-
}, (0, _react2.jsx)(_styled.MediaWrapper, {
|
|
111
|
+
}, dataAttributes), (0, _react2.jsx)(_styled.MediaWrapper, {
|
|
110
112
|
hasFallbackContainer: hasFallbackContainer,
|
|
111
113
|
height: mediaWrapperHeight,
|
|
112
114
|
paddingBottom: paddingBottom
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "78.
|
|
3
|
+
const packageVersion = "78.16.0";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { textColorStyles } from './shared/text-color';
|
|
2
2
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
|
|
3
|
-
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
|
|
3
|
+
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, mediaAnnotationStyles } from './shared/annotation';
|
|
4
4
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
5
5
|
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
6
6
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
@@ -93,4 +93,8 @@ export const annotationSharedStyles = () => css`
|
|
|
93
93
|
box-shadow: ${commentStatusStyleMap('blur')};
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
`;
|
|
96
|
+
`;
|
|
97
|
+
export const mediaAnnotationStyles = css({
|
|
98
|
+
boxShadow: `5px 5px ${`var(--ds-background-accent-yellow-subtler, ${Y75a})`}`,
|
|
99
|
+
borderRadius: '3px'
|
|
100
|
+
});
|
|
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
7
7
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Layer from '../Layer';
|
|
9
9
|
const packageName = "@atlaskit/editor-common";
|
|
10
|
-
const packageVersion = "78.
|
|
10
|
+
const packageVersion = "78.16.0";
|
|
11
11
|
const halfFocusRing = 1;
|
|
12
12
|
const dropOffset = '0, 8';
|
|
13
13
|
class DropList extends Component {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/** @jsx jsx */
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
@@ -22,7 +23,8 @@ export default function MediaSingle({
|
|
|
22
23
|
lineLength: editorWidth,
|
|
23
24
|
hasFallbackContainer = true,
|
|
24
25
|
handleMediaSingleRef,
|
|
25
|
-
isInsideOfInlineExtension = false
|
|
26
|
+
isInsideOfInlineExtension = false,
|
|
27
|
+
dataAttributes
|
|
26
28
|
}) {
|
|
27
29
|
const isPixelWidth = (size === null || size === void 0 ? void 0 : size.widthType) === 'pixel';
|
|
28
30
|
let mediaSingleWidth = (size === null || size === void 0 ? void 0 : size.width) || pctWidth;
|
|
@@ -72,7 +74,7 @@ export default function MediaSingle({
|
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
const [media, caption] = children;
|
|
75
|
-
return jsx("div", {
|
|
77
|
+
return jsx("div", _extends({
|
|
76
78
|
ref: handleMediaSingleRef,
|
|
77
79
|
css: MediaSingleDimensionHelper({
|
|
78
80
|
width,
|
|
@@ -91,7 +93,7 @@ export default function MediaSingle({
|
|
|
91
93
|
'is-loading': isLoading,
|
|
92
94
|
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
93
95
|
})
|
|
94
|
-
}, jsx(MediaWrapper, {
|
|
96
|
+
}, dataAttributes), jsx(MediaWrapper, {
|
|
95
97
|
hasFallbackContainer: hasFallbackContainer,
|
|
96
98
|
height: mediaWrapperHeight,
|
|
97
99
|
paddingBottom: paddingBottom
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
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
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "78.
|
|
9
|
+
var packageVersion = "78.16.0";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { textColorStyles } from './shared/text-color';
|
|
2
2
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
|
|
3
|
-
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
|
|
3
|
+
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, mediaAnnotationStyles } from './shared/annotation';
|
|
4
4
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
5
5
|
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
6
6
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
@@ -67,4 +67,8 @@ export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
|
|
|
67
67
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
|
|
68
68
|
export var annotationSharedStyles = function annotationSharedStyles() {
|
|
69
69
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n\n // Styling for comments on media node\n .", "[class*=ak-editor-block-annotation-] {\n border-radius: 3px;\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur, mediaNodeDomRef, mediaNodeDomRef, BlockAnnotationSharedClassNames.draft, commentStatusStyleMap('draft'), mediaNodeDomRef, BlockAnnotationSharedClassNames.focus, commentStatusStyleMap('focus'), mediaNodeDomRef, BlockAnnotationSharedClassNames.blur, commentStatusStyleMap('blur'));
|
|
70
|
-
};
|
|
70
|
+
};
|
|
71
|
+
export var mediaAnnotationStyles = css({
|
|
72
|
+
boxShadow: "5px 5px ".concat("var(--ds-background-accent-yellow-subtler, ".concat(Y75a, ")")),
|
|
73
|
+
borderRadius: '3px'
|
|
74
|
+
});
|
|
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
17
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
18
|
import Layer from '../Layer';
|
|
19
19
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "78.
|
|
20
|
+
var packageVersion = "78.16.0";
|
|
21
21
|
var halfFocusRing = 1;
|
|
22
22
|
var dropOffset = '0, 8';
|
|
23
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import React from 'react';
|
|
@@ -28,7 +29,8 @@ export default function MediaSingle(_ref) {
|
|
|
28
29
|
hasFallbackContainer = _ref$hasFallbackConta === void 0 ? true : _ref$hasFallbackConta,
|
|
29
30
|
handleMediaSingleRef = _ref.handleMediaSingleRef,
|
|
30
31
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
31
|
-
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline
|
|
32
|
+
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
33
|
+
dataAttributes = _ref.dataAttributes;
|
|
32
34
|
var isPixelWidth = (size === null || size === void 0 ? void 0 : size.widthType) === 'pixel';
|
|
33
35
|
var mediaSingleWidth = (size === null || size === void 0 ? void 0 : size.width) || pctWidth;
|
|
34
36
|
var children = React.Children.toArray(propsChildren);
|
|
@@ -79,7 +81,7 @@ export default function MediaSingle(_ref) {
|
|
|
79
81
|
var _children = _slicedToArray(children, 2),
|
|
80
82
|
media = _children[0],
|
|
81
83
|
caption = _children[1];
|
|
82
|
-
return jsx("div", {
|
|
84
|
+
return jsx("div", _extends({
|
|
83
85
|
ref: handleMediaSingleRef,
|
|
84
86
|
css: MediaSingleDimensionHelper({
|
|
85
87
|
width: width,
|
|
@@ -98,7 +100,7 @@ export default function MediaSingle(_ref) {
|
|
|
98
100
|
'is-loading': isLoading,
|
|
99
101
|
'rich-media-wrapped': layout === 'wrap-left' || layout === 'wrap-right'
|
|
100
102
|
})
|
|
101
|
-
}, jsx(MediaWrapper, {
|
|
103
|
+
}, dataAttributes), jsx(MediaWrapper, {
|
|
102
104
|
hasFallbackContainer: hasFallbackContainer,
|
|
103
105
|
height: mediaWrapperHeight,
|
|
104
106
|
paddingBottom: paddingBottom
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { textColorStyles } from './shared/text-color';
|
|
2
2
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, } from './shared/table';
|
|
3
|
-
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
|
|
3
|
+
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, mediaAnnotationStyles, } from './shared/annotation';
|
|
4
4
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
5
5
|
export { mediaSingleSharedStyle, richMediaClassName, } from './shared/media-single';
|
|
6
6
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
@@ -15,3 +15,4 @@ export declare const AnnotationSharedCSSByState: () => {
|
|
|
15
15
|
blur: import("@emotion/react").SerializedStyles;
|
|
16
16
|
};
|
|
17
17
|
export declare const annotationSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
18
|
+
export declare const mediaAnnotationStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
4
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
5
|
-
import { AnnotationState,
|
|
5
|
+
import type { AnnotationState, AnnotationUpdateEventPayloads, OnAnnotationClickPayload } from './emitter';
|
|
6
|
+
import { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './emitter';
|
|
6
7
|
export type { AnnotationState };
|
|
7
8
|
export type AnnotationByMatches = {
|
|
8
9
|
originalSelection: string;
|
|
@@ -68,14 +69,50 @@ export type InlineCommentViewComponentProps = {
|
|
|
68
69
|
clickElementTarget?: HTMLElement;
|
|
69
70
|
deleteAnnotation: (annotationInfo: AnnotationInfo) => ActionResult;
|
|
70
71
|
};
|
|
72
|
+
export type InlineCommentHoverComponentProps = {
|
|
73
|
+
/**
|
|
74
|
+
* Range selected
|
|
75
|
+
*/
|
|
76
|
+
range: Range;
|
|
77
|
+
/**
|
|
78
|
+
* Renderer/Editor DOM element ancestors wrapping the selection.
|
|
79
|
+
*/
|
|
80
|
+
wrapperDOM: HTMLElement;
|
|
81
|
+
/**
|
|
82
|
+
* If it is possible to add an inline comment on this range
|
|
83
|
+
*/
|
|
84
|
+
isAnnotationAllowed: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Creates an annotation mark in the document with the given id.
|
|
87
|
+
*/
|
|
88
|
+
onCreate: (annotationId: AnnotationId) => AnnotationActionResult;
|
|
89
|
+
/**
|
|
90
|
+
* Indicates that a draft comment was discarded/cancelled
|
|
91
|
+
*/
|
|
92
|
+
onClose: () => void;
|
|
93
|
+
/**
|
|
94
|
+
* Call this function to surround the range with a HTML tag.
|
|
95
|
+
*/
|
|
96
|
+
applyDraftMode: (keepNativeSelection?: boolean) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Call this function to remove the draft HTML tags created by the applyDraftMode
|
|
99
|
+
*/
|
|
100
|
+
removeDraftMode: () => void;
|
|
101
|
+
/**
|
|
102
|
+
* getAnnotationIndexMatch finds the { numMatch, matchIndex } tuple of the current selection
|
|
103
|
+
*/
|
|
104
|
+
getAnnotationIndexMatch?: () => AnnotationByMatches | false;
|
|
105
|
+
};
|
|
71
106
|
interface AnnotationTypeProvider<Type> {
|
|
72
107
|
getState: (annotationIds: string[]) => Promise<AnnotationState<Type>[]>;
|
|
73
108
|
updateSubscriber?: AnnotationUpdateEmitter;
|
|
74
109
|
allowDraftMode?: boolean;
|
|
110
|
+
allowCommentsOnMedia?: boolean;
|
|
75
111
|
}
|
|
76
112
|
export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT> & {
|
|
77
113
|
selectionComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentSelectionComponentProps>>;
|
|
78
114
|
viewComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentViewComponentProps>>;
|
|
115
|
+
hoverComponent?: React.ComponentType<InlineCommentHoverComponentProps>;
|
|
79
116
|
};
|
|
80
117
|
export type AnnotationProviders = {
|
|
81
118
|
inlineComment: InlineCommentAnnotationProvider;
|
|
@@ -9,7 +9,7 @@ export declare enum SortOrder {
|
|
|
9
9
|
NO_ORDER = "no_order"
|
|
10
10
|
}
|
|
11
11
|
export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation';
|
|
12
|
-
export type { AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './annotation';
|
|
12
|
+
export type { AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentHoverComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './annotation';
|
|
13
13
|
export type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue, } from './editor-actions';
|
|
14
14
|
export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, } from './type-ahead';
|
|
15
15
|
export type { CommandDispatch, Command, HigherOrderCommand, Predicate, } from './command';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '../analytics';
|
|
1
|
+
import type { INPUT_METHOD } from '../analytics';
|
|
2
2
|
/**
|
|
3
3
|
* Configuration for the Text Formatting plugin
|
|
4
4
|
*/
|
|
@@ -7,6 +7,7 @@ export interface TextFormattingOptions {
|
|
|
7
7
|
disableUnderline?: boolean;
|
|
8
8
|
disableCode?: boolean;
|
|
9
9
|
disableSmartTextCompletion?: boolean;
|
|
10
|
+
disableStrikethrough?: boolean;
|
|
10
11
|
responsiveToolbarMenu?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface TextFormattingState {
|
|
@@ -24,6 +24,7 @@ export interface Props {
|
|
|
24
24
|
hasFallbackContainer?: boolean;
|
|
25
25
|
handleMediaSingleRef?: React.RefObject<HTMLDivElement>;
|
|
26
26
|
isInsideOfInlineExtension?: boolean;
|
|
27
|
+
dataAttributes?: Record<string, any>;
|
|
27
28
|
}
|
|
28
29
|
export type { MediaSingleWidthType, MediaSingleSize };
|
|
29
|
-
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, }: Props): jsx.JSX.Element;
|
|
30
|
+
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { textColorStyles } from './shared/text-color';
|
|
2
2
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, } from './shared/table';
|
|
3
|
-
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
|
|
3
|
+
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, mediaAnnotationStyles, } from './shared/annotation';
|
|
4
4
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
5
5
|
export { mediaSingleSharedStyle, richMediaClassName, } from './shared/media-single';
|
|
6
6
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
@@ -15,3 +15,4 @@ export declare const AnnotationSharedCSSByState: () => {
|
|
|
15
15
|
blur: import("@emotion/react").SerializedStyles;
|
|
16
16
|
};
|
|
17
17
|
export declare const annotationSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
18
|
+
export declare const mediaAnnotationStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
4
|
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
5
|
-
import { AnnotationState,
|
|
5
|
+
import type { AnnotationState, AnnotationUpdateEventPayloads, OnAnnotationClickPayload } from './emitter';
|
|
6
|
+
import { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './emitter';
|
|
6
7
|
export type { AnnotationState };
|
|
7
8
|
export type AnnotationByMatches = {
|
|
8
9
|
originalSelection: string;
|
|
@@ -68,14 +69,50 @@ export type InlineCommentViewComponentProps = {
|
|
|
68
69
|
clickElementTarget?: HTMLElement;
|
|
69
70
|
deleteAnnotation: (annotationInfo: AnnotationInfo) => ActionResult;
|
|
70
71
|
};
|
|
72
|
+
export type InlineCommentHoverComponentProps = {
|
|
73
|
+
/**
|
|
74
|
+
* Range selected
|
|
75
|
+
*/
|
|
76
|
+
range: Range;
|
|
77
|
+
/**
|
|
78
|
+
* Renderer/Editor DOM element ancestors wrapping the selection.
|
|
79
|
+
*/
|
|
80
|
+
wrapperDOM: HTMLElement;
|
|
81
|
+
/**
|
|
82
|
+
* If it is possible to add an inline comment on this range
|
|
83
|
+
*/
|
|
84
|
+
isAnnotationAllowed: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Creates an annotation mark in the document with the given id.
|
|
87
|
+
*/
|
|
88
|
+
onCreate: (annotationId: AnnotationId) => AnnotationActionResult;
|
|
89
|
+
/**
|
|
90
|
+
* Indicates that a draft comment was discarded/cancelled
|
|
91
|
+
*/
|
|
92
|
+
onClose: () => void;
|
|
93
|
+
/**
|
|
94
|
+
* Call this function to surround the range with a HTML tag.
|
|
95
|
+
*/
|
|
96
|
+
applyDraftMode: (keepNativeSelection?: boolean) => void;
|
|
97
|
+
/**
|
|
98
|
+
* Call this function to remove the draft HTML tags created by the applyDraftMode
|
|
99
|
+
*/
|
|
100
|
+
removeDraftMode: () => void;
|
|
101
|
+
/**
|
|
102
|
+
* getAnnotationIndexMatch finds the { numMatch, matchIndex } tuple of the current selection
|
|
103
|
+
*/
|
|
104
|
+
getAnnotationIndexMatch?: () => AnnotationByMatches | false;
|
|
105
|
+
};
|
|
71
106
|
interface AnnotationTypeProvider<Type> {
|
|
72
107
|
getState: (annotationIds: string[]) => Promise<AnnotationState<Type>[]>;
|
|
73
108
|
updateSubscriber?: AnnotationUpdateEmitter;
|
|
74
109
|
allowDraftMode?: boolean;
|
|
110
|
+
allowCommentsOnMedia?: boolean;
|
|
75
111
|
}
|
|
76
112
|
export type InlineCommentAnnotationProvider = AnnotationTypeProvider<AnnotationTypes.INLINE_COMMENT> & {
|
|
77
113
|
selectionComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentSelectionComponentProps>>;
|
|
78
114
|
viewComponent?: React.ComponentType<React.PropsWithChildren<InlineCommentViewComponentProps>>;
|
|
115
|
+
hoverComponent?: React.ComponentType<InlineCommentHoverComponentProps>;
|
|
79
116
|
};
|
|
80
117
|
export type AnnotationProviders = {
|
|
81
118
|
inlineComment: InlineCommentAnnotationProvider;
|
|
@@ -9,7 +9,7 @@ export declare enum SortOrder {
|
|
|
9
9
|
NO_ORDER = "no_order"
|
|
10
10
|
}
|
|
11
11
|
export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation';
|
|
12
|
-
export type { AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './annotation';
|
|
12
|
+
export type { AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentHoverComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './annotation';
|
|
13
13
|
export type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue, } from './editor-actions';
|
|
14
14
|
export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, } from './type-ahead';
|
|
15
15
|
export type { CommandDispatch, Command, HigherOrderCommand, Predicate, } from './command';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INPUT_METHOD } from '../analytics';
|
|
1
|
+
import type { INPUT_METHOD } from '../analytics';
|
|
2
2
|
/**
|
|
3
3
|
* Configuration for the Text Formatting plugin
|
|
4
4
|
*/
|
|
@@ -7,6 +7,7 @@ export interface TextFormattingOptions {
|
|
|
7
7
|
disableUnderline?: boolean;
|
|
8
8
|
disableCode?: boolean;
|
|
9
9
|
disableSmartTextCompletion?: boolean;
|
|
10
|
+
disableStrikethrough?: boolean;
|
|
10
11
|
responsiveToolbarMenu?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface TextFormattingState {
|
|
@@ -24,6 +24,7 @@ export interface Props {
|
|
|
24
24
|
hasFallbackContainer?: boolean;
|
|
25
25
|
handleMediaSingleRef?: React.RefObject<HTMLDivElement>;
|
|
26
26
|
isInsideOfInlineExtension?: boolean;
|
|
27
|
+
dataAttributes?: Record<string, any>;
|
|
27
28
|
}
|
|
28
29
|
export type { MediaSingleWidthType, MediaSingleSize };
|
|
29
|
-
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, }: Props): jsx.JSX.Element;
|
|
30
|
+
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "78.
|
|
3
|
+
"version": "78.16.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/"
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"@atlaskit/mention": "^23.0.0",
|
|
127
127
|
"@atlaskit/menu": "^2.1.0",
|
|
128
128
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
129
|
-
"@atlaskit/primitives": "^5.
|
|
129
|
+
"@atlaskit/primitives": "^5.1.0",
|
|
130
130
|
"@atlaskit/profilecard": "^19.11.0",
|
|
131
131
|
"@atlaskit/section-message": "^6.4.0",
|
|
132
132
|
"@atlaskit/smart-card": "^26.50.0",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@atlaskit/task-decision": "^17.9.0",
|
|
137
137
|
"@atlaskit/textfield": "^6.1.0",
|
|
138
138
|
"@atlaskit/theme": "^12.6.0",
|
|
139
|
-
"@atlaskit/tokens": "^1.
|
|
139
|
+
"@atlaskit/tokens": "^1.42.0",
|
|
140
140
|
"@atlaskit/tooltip": "^18.1.0",
|
|
141
141
|
"@atlaskit/ufo": "^0.2.0",
|
|
142
142
|
"@atlaskit/width-detector": "^4.1.0",
|