@atlaskit/renderer 81.1.0 → 82.2.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 +44 -0
- package/dist/cjs/react/index.js +33 -8
- package/dist/cjs/react/marks/code.js +26 -4
- package/dist/cjs/react/nodes/codeBlock.js +17 -3
- package/dist/cjs/react/nodes/heading-anchor.js +1 -2
- package/dist/cjs/react/nodes/heading.js +3 -5
- package/dist/cjs/react/nodes/index.js +15 -1
- package/dist/cjs/react/nodes/mediaInline.js +104 -0
- package/dist/cjs/react/nodes/panel.js +1 -1
- package/dist/cjs/react/nodes/text-wrapper.js +5 -6
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +5 -5
- package/dist/cjs/ui/annotations/draft/component.js +6 -6
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/react/index.js +30 -5
- package/dist/es2019/react/marks/code.js +15 -3
- package/dist/es2019/react/nodes/codeBlock.js +13 -3
- package/dist/es2019/react/nodes/heading-anchor.js +1 -2
- package/dist/es2019/react/nodes/heading.js +3 -5
- package/dist/es2019/react/nodes/index.js +8 -1
- package/dist/es2019/react/nodes/mediaInline.js +53 -0
- package/dist/es2019/react/nodes/panel.js +1 -1
- package/dist/es2019/react/nodes/text-wrapper.js +7 -6
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +47 -81
- package/dist/es2019/ui/annotations/draft/component.js +6 -6
- package/dist/es2019/version.json +1 -1
- package/dist/esm/react/index.js +32 -8
- package/dist/esm/react/marks/code.js +15 -3
- package/dist/esm/react/nodes/codeBlock.js +13 -3
- package/dist/esm/react/nodes/heading-anchor.js +1 -2
- package/dist/esm/react/nodes/heading.js +3 -5
- package/dist/esm/react/nodes/index.js +14 -1
- package/dist/esm/react/nodes/mediaInline.js +80 -0
- package/dist/esm/react/nodes/panel.js +1 -1
- package/dist/esm/react/nodes/text-wrapper.js +7 -6
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +5 -6
- package/dist/esm/ui/annotations/draft/component.js +6 -6
- package/dist/esm/version.json +1 -1
- package/dist/types/react/index.d.ts +1 -0
- package/dist/types/react/marks/code.d.ts +15 -1
- package/dist/types/react/nodes/codeBlock.d.ts +4 -3
- package/dist/types/react/nodes/index.d.ts +8 -7
- package/dist/types/react/nodes/mediaInline.d.ts +17 -0
- package/dist/types/react/nodes/text-wrapper.d.ts +2 -3
- package/dist/types/renderer-context.d.ts +3 -1
- package/dist/types/ui/ExtensionRenderer.d.ts +1 -1
- package/dist/types/ui/annotations/draft/component.d.ts +1 -1
- package/package.json +13 -13
|
@@ -3,19 +3,25 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { injectIntl } from 'react-intl';
|
|
6
7
|
import styled from 'styled-components';
|
|
7
8
|
import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
|
|
8
9
|
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
import { N20, DN50 } from '@atlaskit/theme/colors';
|
|
10
11
|
import { themed } from '@atlaskit/theme/components';
|
|
11
12
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
13
|
+
import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
|
|
14
|
+
import { useFeatureFlags } from '../../use-feature-flags';
|
|
12
15
|
import CopyButton from './codeBlockCopyButton';
|
|
13
16
|
|
|
14
17
|
function CodeBlock(props) {
|
|
15
18
|
var text = props.text,
|
|
16
19
|
language = props.language,
|
|
17
20
|
_props$allowCopyToCli = props.allowCopyToClipboard,
|
|
18
|
-
allowCopyToClipboard = _props$allowCopyToCli === void 0 ? false : _props$allowCopyToCli
|
|
21
|
+
allowCopyToClipboard = _props$allowCopyToCli === void 0 ? false : _props$allowCopyToCli,
|
|
22
|
+
codeBidiWarningTooltipEnabled = props.codeBidiWarningTooltipEnabled;
|
|
23
|
+
var featureFlags = useFeatureFlags();
|
|
24
|
+
var codeBidiWarningLabel = props.intl.formatMessage(codeBidiWarningMessages.label);
|
|
19
25
|
var className = ['code-block', props.className].join(' ');
|
|
20
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
27
|
className: className
|
|
@@ -23,11 +29,15 @@ function CodeBlock(props) {
|
|
|
23
29
|
content: text
|
|
24
30
|
}) : null, /*#__PURE__*/React.createElement(AkCodeBlock, {
|
|
25
31
|
language: language,
|
|
26
|
-
text: text
|
|
32
|
+
text: text,
|
|
33
|
+
codeBidiWarnings: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.codeBidiWarnings,
|
|
34
|
+
codeBidiWarningLabel: codeBidiWarningLabel,
|
|
35
|
+
codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled
|
|
27
36
|
}));
|
|
28
37
|
}
|
|
29
38
|
|
|
30
|
-
|
|
39
|
+
var IntlCodeBlock = injectIntl(CodeBlock);
|
|
40
|
+
export default styled(IntlCodeBlock)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n }\n"])), relativeFontSizeToBase16(fontSize()), overflowShadow({
|
|
31
41
|
background: themed({
|
|
32
42
|
light: N20,
|
|
33
43
|
dark: DN50
|
|
@@ -111,8 +111,7 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
111
111
|
_defineProperty(_assertThisInitialized(_this), "renderAnchorButton", function () {
|
|
112
112
|
return /*#__PURE__*/React.createElement(CopyAnchorButton, {
|
|
113
113
|
onMouseLeave: _this.resetMessage,
|
|
114
|
-
onClick: _this.copyToClipboard
|
|
115
|
-
"aria-label": _this.state.tooltipMessage
|
|
114
|
+
onClick: _this.copyToClipboard
|
|
116
115
|
}, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
117
116
|
label: "copy",
|
|
118
117
|
size: _this.props.level > 3 ? 'small' : 'medium',
|
|
@@ -40,11 +40,9 @@ function Heading(props) {
|
|
|
40
40
|
var showAnchorLink = !!props.showAnchorLink;
|
|
41
41
|
var isRightAligned = hasRightAlignmentMark(marks);
|
|
42
42
|
var enableNestedHeaderLinks = allowHeadingAnchorLinks && allowHeadingAnchorLinks.allowNestedHeaderLinks;
|
|
43
|
-
return /*#__PURE__*/React.createElement(
|
|
44
|
-
className: "heading-wrapper ".concat(HX)
|
|
45
|
-
}, /*#__PURE__*/React.createElement(HX, _extends({
|
|
43
|
+
return /*#__PURE__*/React.createElement(HX, _extends({
|
|
46
44
|
id: headingId
|
|
47
|
-
}, dataAttributes), /*#__PURE__*/React.createElement(React.Fragment, null, showAnchorLink && isRightAligned ? WrapChildTextInSpan(props.children) : props.children
|
|
45
|
+
}, dataAttributes), /*#__PURE__*/React.createElement(React.Fragment, null, showAnchorLink && isRightAligned ? WrapChildTextInSpan(props.children) : props.children, showAnchorLink && /*#__PURE__*/React.createElement(CopyTextConsumer, null, function (_ref) {
|
|
48
46
|
var copyTextToClipboard = _ref.copyTextToClipboard;
|
|
49
47
|
return headingId && /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, function (_ref2) {
|
|
50
48
|
var fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
@@ -62,7 +60,7 @@ function Heading(props) {
|
|
|
62
60
|
}
|
|
63
61
|
});
|
|
64
62
|
});
|
|
65
|
-
}));
|
|
63
|
+
})));
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
export default Heading;
|
|
@@ -145,6 +145,18 @@ var MediaGroup = Loadable({
|
|
|
145
145
|
return null;
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
+
var MediaInline = Loadable({
|
|
149
|
+
loader: function loader() {
|
|
150
|
+
return import(
|
|
151
|
+
/* webpackChunkName: "@atlaskit-internal_renderer-node_MediaInline" */
|
|
152
|
+
'./mediaInline').then(function (mod) {
|
|
153
|
+
return mod.default;
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
loading: function loading() {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
148
160
|
var Mention = Loadable({
|
|
149
161
|
loader: function loader() {
|
|
150
162
|
return import(
|
|
@@ -191,6 +203,7 @@ export var nodeToReact = {
|
|
|
191
203
|
listItem: ListItem,
|
|
192
204
|
media: Media,
|
|
193
205
|
mediaGroup: MediaGroup,
|
|
206
|
+
mediaInline: MediaInline,
|
|
194
207
|
mediaSingle: MediaSingle,
|
|
195
208
|
mention: Mention,
|
|
196
209
|
orderedList: OrderedList,
|
|
@@ -354,4 +367,4 @@ var isEmojiBlock = function isEmojiBlock(pnode) {
|
|
|
354
367
|
return emojiCount > 0;
|
|
355
368
|
};
|
|
356
369
|
|
|
357
|
-
export { Blockquote, BodiedExtension, BulletList, BlockCard, Caption, CodeBlock, Date, DecisionItem, DecisionList, Doc, DocWithSelectAllTrap, Emoji, Extension, Expand, HardBreak, Heading, ListItem, InlineCard, InlineExtension, LayoutSection, LayoutColumn, Media, MediaGroup, MediaSingle, Mention, OrderedList, Panel, Paragraph, Placeholder, Rule, Status, TaskItem, TaskList, Table, TableCell, TableRow, UnknownBlock, EmbedCard };
|
|
370
|
+
export { Blockquote, BodiedExtension, BulletList, BlockCard, Caption, CodeBlock, Date, DecisionItem, DecisionList, Doc, DocWithSelectAllTrap, Emoji, Extension, Expand, HardBreak, Heading, ListItem, InlineCard, InlineExtension, LayoutSection, LayoutColumn, Media, MediaGroup, MediaInline, MediaSingle, Mention, OrderedList, Panel, Paragraph, Placeholder, Rule, Status, TaskItem, TaskList, Table, TableCell, TableRow, UnknownBlock, EmbedCard };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import { MediaInlineCard } from '@atlaskit/media-card';
|
|
6
|
+
import { WithProviders } from '@atlaskit/editor-common';
|
|
7
|
+
export var RenderMediaInline = function RenderMediaInline(props) {
|
|
8
|
+
var mediaProvider = props.mediaProvider;
|
|
9
|
+
|
|
10
|
+
var _useState = useState({}),
|
|
11
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12
|
+
viewMediaClientConfigState = _useState2[0],
|
|
13
|
+
setViewMediaClientConfigState = _useState2[1];
|
|
14
|
+
|
|
15
|
+
useEffect(function () {
|
|
16
|
+
updateViewMediaClientConfigState(mediaProvider);
|
|
17
|
+
}, [mediaProvider]);
|
|
18
|
+
|
|
19
|
+
var updateViewMediaClientConfigState = /*#__PURE__*/function () {
|
|
20
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(mediaProvider) {
|
|
21
|
+
var mediaClientConfig;
|
|
22
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
23
|
+
while (1) {
|
|
24
|
+
switch (_context.prev = _context.next) {
|
|
25
|
+
case 0:
|
|
26
|
+
if (!mediaProvider) {
|
|
27
|
+
_context.next = 5;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
_context.next = 3;
|
|
32
|
+
return mediaProvider;
|
|
33
|
+
|
|
34
|
+
case 3:
|
|
35
|
+
mediaClientConfig = _context.sent;
|
|
36
|
+
setViewMediaClientConfigState(mediaClientConfig.viewMediaClientConfig);
|
|
37
|
+
|
|
38
|
+
case 5:
|
|
39
|
+
case "end":
|
|
40
|
+
return _context.stop();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, _callee);
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
return function updateViewMediaClientConfigState(_x) {
|
|
47
|
+
return _ref.apply(this, arguments);
|
|
48
|
+
};
|
|
49
|
+
}();
|
|
50
|
+
|
|
51
|
+
return /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
52
|
+
identifier: props.identifier,
|
|
53
|
+
shouldOpenMediaViewer: true,
|
|
54
|
+
mediaClientConfig: viewMediaClientConfigState
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var MediaInline = function MediaInline(props) {
|
|
59
|
+
var collection = props.collection,
|
|
60
|
+
id = props.id,
|
|
61
|
+
providers = props.providers;
|
|
62
|
+
var identifier = {
|
|
63
|
+
id: id,
|
|
64
|
+
mediaItemType: 'file',
|
|
65
|
+
collectionName: collection
|
|
66
|
+
};
|
|
67
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(WithProviders, {
|
|
68
|
+
providers: ['mediaProvider'],
|
|
69
|
+
providerFactory: providers,
|
|
70
|
+
renderNode: function renderNode(providers) {
|
|
71
|
+
var mediaProvider = providers.mediaProvider;
|
|
72
|
+
return /*#__PURE__*/React.createElement(RenderMediaInline, {
|
|
73
|
+
identifier: identifier,
|
|
74
|
+
mediaProvider: mediaProvider
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export default MediaInline;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextWithAnnotationDraft } from '../../ui/annotations';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
var TextWrapper = function TextWrapper(props) {
|
|
4
5
|
var startPos = props.startPos,
|
|
5
6
|
endPos = props.endPos;
|
|
6
|
-
var
|
|
7
|
+
var children = props.children;
|
|
7
8
|
|
|
8
|
-
if (!
|
|
9
|
+
if (!children) {
|
|
9
10
|
return null;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
return /*#__PURE__*/React.createElement(TextWithAnnotationDraft, {
|
|
13
|
-
text: text,
|
|
14
14
|
startPos: startPos,
|
|
15
15
|
endPos: endPos
|
|
16
|
-
});
|
|
17
|
-
}
|
|
16
|
+
}, children);
|
|
17
|
+
};
|
|
18
|
+
|
|
18
19
|
export default TextWrapper;
|
|
@@ -174,7 +174,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
174
174
|
var nextMedia = nextProps.media || {};
|
|
175
175
|
var media = this.props.media || {};
|
|
176
176
|
|
|
177
|
-
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
177
|
+
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.UNSAFE_allowCustomPanels !== this.props.UNSAFE_allowCustomPanels || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
178
178
|
this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
|
|
179
179
|
}
|
|
180
180
|
}
|
|
@@ -11,7 +11,6 @@ import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, head
|
|
|
11
11
|
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
import { RendererCssClassName } from '../../consts';
|
|
13
13
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
14
|
-
import { h100, h300, h400, h500, h600, h700 } from '@atlaskit/theme/typography';
|
|
15
14
|
export var FullPagePadding = 32;
|
|
16
15
|
|
|
17
16
|
var getLineHeight = function getLineHeight(fontCode) {
|
|
@@ -40,7 +39,7 @@ export var headingSizes = {
|
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
var headingAnchorStyle = function headingAnchorStyle(headingTag) {
|
|
43
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n
|
|
42
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * The copy link button doesn't reserve space in the DOM so that\n * the text alignment isn't impacted by the button/icon's space.\n */\n .", " {\n position: absolute;\n height: ", "em;\n\n margin-left: 6px;\n\n button {\n padding-left: 0;\n padding-right: 0;\n }\n }\n\n /**\n * Applies hover effects to the heading anchor link button\n * to fade in when the user rolls over the heading.\n *\n * The link is persistent on mobile, so we use feature detection\n * to enable hover effects for systems that support it (desktop).\n *\n * @see https://caniuse.com/mdn-css_at-rules_media_hover\n */\n @media (hover: hover) and (pointer: fine) {\n .", " {\n > button {\n opacity: 0;\n transform: translate(-8px, 0px);\n transition: opacity 0.2s ease 0s, transform 0.2s ease 0s;\n }\n }\n\n &:hover {\n .", " > button {\n opacity: 1;\n transform: none !important;\n }\n }\n }\n "])), HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, HeadingAnchorWrapperClassName, HeadingAnchorWrapperClassName);
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
|
|
@@ -50,7 +49,7 @@ var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
|
|
|
50
49
|
return '';
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
return "\n .fabric-editor-block-mark[data-align] > {\n h1, h2, h3, h4, h5, h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n
|
|
52
|
+
return "\n .fabric-editor-block-mark[data-align] > {\n h1, h2, h3, h4, h5, h6 {\n position: relative;\n }\n }\n\n /**\n * For right-alignment we flip the link to be before the heading\n * text so that the text is flush up against the edge of the editor's\n * container edge.\n */\n .fabric-editor-block-mark:not([data-align='center'])[data-align] {\n > {\n h1, h2, h3, h4, h5, h6 {\n // Using right to left text to achieve the inverse effect\n // of where the copy link button icon sits for left/center\n // alignment.\n // Although this is unorthodox it's the only approach which\n // allows the button to sit flush against the left edge of\n // bottom line of text.\n direction: rtl;\n\n // By default RTL will negatively impact the layout of special\n // characters within the heading text, and potentially other\n // nested inline nodes. To prevent this we insert pseudo elements\n // containing HTML entities to retain LTR for all heading content\n // except for the copy link button.\n > *:not(.".concat(HeadingAnchorWrapperClassName, "):not(br) {\n ::before {\n // Open LTR: https://www.fileformat.info/info/unicode/char/202a/index.htm\n content: '\u202A';\n }\n ::after {\n // Close LTR: https://www.fileformat.info/info/unicode/char/202c/index.htm\n content: '\u202C';\n }\n }\n }\n }\n .").concat(HeadingAnchorWrapperClassName, " {\n margin: 0 6px 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .").concat(HeadingAnchorWrapperClassName, " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n }\n ");
|
|
54
53
|
};
|
|
55
54
|
|
|
56
55
|
var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
@@ -64,7 +63,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
|
64
63
|
var headingsCss = '';
|
|
65
64
|
|
|
66
65
|
if (allowNestedHeaderLinks) {
|
|
67
|
-
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n
|
|
66
|
+
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
return "\n .".concat(RendererCssClassName.SORTABLE_COLUMN, " {\n padding: 0;\n\n .").concat(RendererCssClassName.SORTABLE_COLUMN_BUTTON, " {\n width: 100%;\n height: 100%;\n cursor: pointer;\n padding: ").concat(tableCellPadding, "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ").concat(colors.B300, ";\n }\n }\n\n ").concat(headingsCss, "\n }\n\n &.").concat(RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED, " .").concat(RendererCssClassName.SORTABLE_COLUMN_BUTTON, " {\n cursor: default;\n }\n\n .").concat(RendererCssClassName.SORTABLE_COLUMN_ICON, " {\n margin: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n\n .").concat(RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, " {\n opacity: 0;\n }\n\n &:hover {\n .").concat(RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, " {\n opacity: 1;\n }\n }\n }\n ");
|
|
@@ -92,10 +91,10 @@ var fullWidthStyles = function fullWidthStyles(_ref4) {
|
|
|
92
91
|
}; // prettier-ignore
|
|
93
92
|
|
|
94
93
|
|
|
95
|
-
export var Wrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n ", "\n ", "\n\n
|
|
94
|
+
export var Wrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + .rich-media-wrapped + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n ", "\n\n .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after, &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-child {\n height: 100%;\n\n td, th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid ", ";\n border-bottom: 1px solid ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th, .sticky td {\n box-shadow: 0px 1px ", ", 0px -0.5px ", ", inset -1px 0px ", ", 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard{\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n"])), editorFontSize, themed({
|
|
96
95
|
light: colors.N800,
|
|
97
96
|
dark: '#B8C7E0'
|
|
98
|
-
}), fullPageStyles, fullWidthStyles,
|
|
97
|
+
}), fullPageStyles, fullWidthStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), colors.B400, colors.B300, colors.placeholderText, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, panelSharedStyles, ruleSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
99
98
|
light: colors.N30A,
|
|
100
99
|
dark: colors.DN70
|
|
101
100
|
}), borderRadius(), themed({
|
|
@@ -55,7 +55,7 @@ export var applyAnnotationOnText = function applyAnnotationOnText(_ref2) {
|
|
|
55
55
|
export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
56
56
|
var startPos = _ref3.startPos,
|
|
57
57
|
endPos = _ref3.endPos,
|
|
58
|
-
|
|
58
|
+
children = _ref3.children;
|
|
59
59
|
var textPosition = React.useMemo(function () {
|
|
60
60
|
return {
|
|
61
61
|
start: startPos,
|
|
@@ -72,21 +72,21 @@ export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
|
72
72
|
}, [nextDraftPosition, textPosition]);
|
|
73
73
|
|
|
74
74
|
if (shouldApplyAnnotationAt === false || !nextDraftPosition) {
|
|
75
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
75
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (shouldApplyAnnotationAt === InsertDraftPosition.AROUND_TEXT) {
|
|
79
79
|
return /*#__PURE__*/React.createElement(AnnotationDraft, {
|
|
80
80
|
key: 0,
|
|
81
81
|
draftPosition: nextDraftPosition
|
|
82
|
-
},
|
|
82
|
+
}, children);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
var offsets = calcTextSplitOffset(nextDraftPosition, textPosition,
|
|
86
|
-
var texts = splitText(
|
|
85
|
+
var offsets = calcTextSplitOffset(nextDraftPosition, textPosition, children);
|
|
86
|
+
var texts = splitText(children, offsets);
|
|
87
87
|
|
|
88
88
|
if (!texts) {
|
|
89
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
89
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
var components = applyAnnotationOnText({
|
package/dist/esm/version.json
CHANGED
|
@@ -88,6 +88,7 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
|
|
|
88
88
|
private getMediaProps;
|
|
89
89
|
private getEmbedCardProps;
|
|
90
90
|
private getMediaGroupProps;
|
|
91
|
+
private getMediaInlineProps;
|
|
91
92
|
private getTaskItemProps;
|
|
92
93
|
private getHardBreakProps;
|
|
93
94
|
private getCodeBlockProps;
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InjectedIntlProps } from 'react-intl';
|
|
3
|
+
import { Mark } from 'prosemirror-model';
|
|
1
4
|
import type { MarkProps } from '../types';
|
|
2
|
-
export
|
|
5
|
+
export declare const isCodeMark: (mark: Mark) => boolean;
|
|
6
|
+
export declare function CodeWithIntl(props: MarkProps<{
|
|
7
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
8
|
+
}> & InjectedIntlProps): JSX.Element;
|
|
9
|
+
declare const _default: React.ComponentClass<{
|
|
10
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
11
|
+
} & import("../types").MarkMeta, any> & {
|
|
12
|
+
WrappedComponent: ReactIntl.ComponentConstructor<{
|
|
13
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
14
|
+
} & import("../types").MarkMeta & InjectedIntlProps>;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -3,13 +3,14 @@ export interface Props {
|
|
|
3
3
|
text: string;
|
|
4
4
|
language: SupportedLanguages;
|
|
5
5
|
allowCopyToClipboard?: boolean;
|
|
6
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
}
|
|
8
|
-
declare const _default: import("styled-components").StyledComponentClass<(Props & import("@atlaskit/theme").AtlaskitThemeProps) | (Props & import("@atlaskit/theme").CustomThemeProps) | (Props & import("@atlaskit/theme").NoThemeProps), any, (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
9
|
+
declare const _default: import("styled-components").StyledComponentClass<(Props & import("@atlaskit/theme").AtlaskitThemeProps) | (Props & import("@atlaskit/theme").CustomThemeProps) | (Props & import("@atlaskit/theme").NoThemeProps), any, (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
9
10
|
theme?: any;
|
|
10
|
-
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
11
|
+
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
11
12
|
theme?: any;
|
|
12
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
13
|
+
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
13
14
|
theme?: any;
|
|
14
15
|
} & import("@atlaskit/theme").NoThemeProps)>;
|
|
15
16
|
export default _default;
|
|
@@ -26,17 +26,17 @@ import TableRow from './tableRow';
|
|
|
26
26
|
import UnknownBlock from './unknownBlock';
|
|
27
27
|
import Loadable from 'react-loadable';
|
|
28
28
|
import EmbedCard from './embedCard';
|
|
29
|
-
declare const CodeBlock: (React.ComponentClass<import("styled-components").ThemedOuterStyledProps<(Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
29
|
+
declare const CodeBlock: (React.ComponentClass<import("styled-components").ThemedOuterStyledProps<(Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
30
30
|
theme?: any;
|
|
31
|
-
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
31
|
+
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
32
32
|
theme?: any;
|
|
33
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
33
|
+
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
34
34
|
theme?: any;
|
|
35
|
-
} & import("@atlaskit/theme").NoThemeProps), any>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("styled-components").ThemedOuterStyledProps<(Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
35
|
+
} & import("@atlaskit/theme").NoThemeProps), any>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("styled-components").ThemedOuterStyledProps<(Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
36
36
|
theme?: any;
|
|
37
|
-
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
37
|
+
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
38
38
|
theme?: any;
|
|
39
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
|
|
39
|
+
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("./codeBlock").Props, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
40
40
|
theme?: any;
|
|
41
41
|
} & import("@atlaskit/theme").NoThemeProps), any>> & Loadable.LoadableComponent);
|
|
42
42
|
declare const TaskItem: (React.ComponentClass<import("../types").NodeProps<import("./taskItem").Props>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("../types").NodeProps<import("./taskItem").Props>> & Loadable.LoadableComponent);
|
|
@@ -60,6 +60,7 @@ declare const BlockCard: (React.ComponentClass<{
|
|
|
60
60
|
}> & Loadable.LoadableComponent);
|
|
61
61
|
declare const Media: (React.ComponentClass<import("./media").MediaProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./media").MediaProps> & Loadable.LoadableComponent);
|
|
62
62
|
declare const MediaGroup: (React.ComponentClass<import("./mediaGroup").MediaGroupProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./mediaGroup").MediaGroupProps> & Loadable.LoadableComponent);
|
|
63
|
+
declare const MediaInline: (React.ComponentClass<import("./mediaInline").MediaInlineProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./mediaInline").MediaInlineProps> & Loadable.LoadableComponent);
|
|
63
64
|
declare const Mention: (React.ComponentClass<import("./mention").Props, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./mention").Props> & Loadable.LoadableComponent);
|
|
64
65
|
declare const Expand: (React.ComponentClass<import("../../ui/Expand").ExpandProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("../../ui/Expand").ExpandProps> & Loadable.LoadableComponent);
|
|
65
66
|
export declare const nodeToReact: {
|
|
@@ -93,5 +94,5 @@ export declare function isTextNode(node: Node | Mark): node is Node;
|
|
|
93
94
|
* whose content satisfies the condition for an emoji block
|
|
94
95
|
*/
|
|
95
96
|
export declare const isEmojiDoc: (doc: Fragment) => boolean;
|
|
96
|
-
export { Blockquote, BodiedExtension, BulletList, BlockCard, Caption, CodeBlock, Date, DecisionItem, DecisionList, Doc, DocWithSelectAllTrap, Emoji, Extension, Expand, HardBreak, Heading, ListItem, InlineCard, InlineExtension, LayoutSection, LayoutColumn, Media, MediaGroup, MediaSingle, Mention, OrderedList, Panel, Paragraph, Placeholder, Rule, Status, TaskItem, TaskList, Table, TableCell, TableRow, UnknownBlock, EmbedCard, };
|
|
97
|
+
export { Blockquote, BodiedExtension, BulletList, BlockCard, Caption, CodeBlock, Date, DecisionItem, DecisionList, Doc, DocWithSelectAllTrap, Emoji, Extension, Expand, HardBreak, Heading, ListItem, InlineCard, InlineExtension, LayoutSection, LayoutColumn, Media, MediaGroup, MediaInline, MediaSingle, Mention, OrderedList, Panel, Paragraph, Placeholder, Rule, Status, TaskItem, TaskList, Table, TableCell, TableRow, UnknownBlock, EmbedCard, };
|
|
97
98
|
export type { BodiedExtensionProps, ExtensionProps, InlineExtensionProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProviderFactory } from '@atlaskit/editor-common';
|
|
3
|
+
import { FileIdentifier } from '@atlaskit/media-client';
|
|
4
|
+
import { MediaProvider } from '../../ui/MediaCard';
|
|
5
|
+
export declare type RenderMediaInlineProps = {
|
|
6
|
+
identifier: FileIdentifier;
|
|
7
|
+
mediaProvider?: Promise<MediaProvider>;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare type MediaInlineProps = {
|
|
11
|
+
id: string;
|
|
12
|
+
collection?: string;
|
|
13
|
+
providers: ProviderFactory;
|
|
14
|
+
};
|
|
15
|
+
export declare const RenderMediaInline: React.FC<RenderMediaInlineProps>;
|
|
16
|
+
declare const MediaInline: React.FC<MediaInlineProps>;
|
|
17
|
+
export default MediaInline;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare type Props = {
|
|
3
2
|
startPos: number;
|
|
4
3
|
endPos: number;
|
|
5
|
-
|
|
4
|
+
children?: string | null;
|
|
6
5
|
};
|
|
7
|
-
declare const TextWrapper:
|
|
6
|
+
declare const TextWrapper: (props: Props) => JSX.Element | null;
|
|
8
7
|
export default TextWrapper;
|
|
@@ -29,7 +29,7 @@ export default class ExtensionRenderer extends React.Component<Props, State> {
|
|
|
29
29
|
UNSAFE_componentWillMount(): void;
|
|
30
30
|
componentWillUnmount(): void;
|
|
31
31
|
handleProvider: (name: keyof State, providerPromise?: Promise<any> | undefined) => void;
|
|
32
|
-
getNodeRenderer: typeof getNodeRenderer
|
|
32
|
+
getNodeRenderer: import("memoize-one").MemoizedFn<typeof getNodeRenderer>;
|
|
33
33
|
renderExtensionNode: (extensionProvider?: ExtensionProvider<any> | null | undefined) => JSX.Element;
|
|
34
34
|
setupAndRenderExtensionNode: (providers: {
|
|
35
35
|
extensionProvider?: Promise<ExtensionProvider<any>> | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const applyAnnotationOnText: ({ texts, shouldApplyAnnotationAt, d
|
|
|
13
13
|
declare type Props = {
|
|
14
14
|
startPos: number;
|
|
15
15
|
endPos: number;
|
|
16
|
-
|
|
16
|
+
children: string;
|
|
17
17
|
};
|
|
18
18
|
export declare const TextWithAnnotationDraft: React.FC<Props>;
|
|
19
19
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "82.2.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^19.
|
|
27
|
+
"@atlaskit/adf-schema": "^19.3.0",
|
|
28
28
|
"@atlaskit/adf-utils": "^14.3.0",
|
|
29
29
|
"@atlaskit/analytics-listeners": "^8.0.0",
|
|
30
30
|
"@atlaskit/analytics-namespaced-context": "^6.3.0",
|
|
31
31
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
32
32
|
"@atlaskit/button": "^16.1.0",
|
|
33
|
-
"@atlaskit/code": "^14.
|
|
34
|
-
"@atlaskit/editor-common": "^60.
|
|
33
|
+
"@atlaskit/code": "^14.3.0",
|
|
34
|
+
"@atlaskit/editor-common": "^60.3.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.6.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^1.6.0",
|
|
37
37
|
"@atlaskit/icon": "^21.9.0",
|
|
38
|
-
"@atlaskit/media-card": "^
|
|
39
|
-
"@atlaskit/media-client": "^14.
|
|
38
|
+
"@atlaskit/media-card": "^72.0.0",
|
|
39
|
+
"@atlaskit/media-client": "^14.3.0",
|
|
40
40
|
"@atlaskit/media-common": "^2.9.0",
|
|
41
41
|
"@atlaskit/media-filmstrip": "^42.1.0",
|
|
42
42
|
"@atlaskit/media-viewer": "^45.8.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/width-detector": "^3.0.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"lodash": "^4.17.15",
|
|
50
|
-
"memoize-one": "^
|
|
50
|
+
"memoize-one": "^6.0.0",
|
|
51
51
|
"prosemirror-model": "1.11.0",
|
|
52
52
|
"prosemirror-transform": "1.2.8",
|
|
53
53
|
"prosemirror-utils": "^1.0.0-0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@atlaskit/media-core": "^32.2.0",
|
|
61
|
-
"@atlaskit/smart-card": "^16.
|
|
61
|
+
"@atlaskit/smart-card": "^16.2.0",
|
|
62
62
|
"react": "^16.8.0",
|
|
63
63
|
"react-dom": "^16.8.0",
|
|
64
64
|
"styled-components": "^3.2.6"
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"@atlaskit/analytics-gas-types": "^5.0.5",
|
|
68
68
|
"@atlaskit/avatar": "^20.5.0",
|
|
69
69
|
"@atlaskit/build-utils": "^2.6.2",
|
|
70
|
-
"@atlaskit/css-reset": "^6.
|
|
70
|
+
"@atlaskit/css-reset": "^6.2.0",
|
|
71
71
|
"@atlaskit/docs": "*",
|
|
72
|
-
"@atlaskit/editor-core": "^
|
|
73
|
-
"@atlaskit/editor-test-helpers": "^15.
|
|
72
|
+
"@atlaskit/editor-core": "^151.2.0",
|
|
73
|
+
"@atlaskit/editor-test-helpers": "^15.5.0",
|
|
74
74
|
"@atlaskit/field-range": "^9.0.0",
|
|
75
75
|
"@atlaskit/logo": "^13.5.0",
|
|
76
76
|
"@atlaskit/media-core": "^32.2.0",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"@atlaskit/media-test-helpers": "^28.8.0",
|
|
79
79
|
"@atlaskit/mention": "^19.7.0",
|
|
80
80
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
81
|
-
"@atlaskit/profilecard": "^15.
|
|
81
|
+
"@atlaskit/profilecard": "^15.8.0",
|
|
82
82
|
"@atlaskit/radio": "^5.3.0",
|
|
83
|
-
"@atlaskit/smart-card": "^16.
|
|
83
|
+
"@atlaskit/smart-card": "^16.2.0",
|
|
84
84
|
"@atlaskit/ssr": "^0.2.0",
|
|
85
85
|
"@atlaskit/util-data-test": "^16.0.0",
|
|
86
86
|
"@atlaskit/visual-regression": "*",
|