@atlaskit/renderer 81.1.1 → 83.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/dist/cjs/react/index.js +40 -12
  3. package/dist/cjs/react/marks/code.js +26 -4
  4. package/dist/cjs/react/marks/fragment.js +21 -0
  5. package/dist/cjs/react/marks/index.js +10 -1
  6. package/dist/cjs/react/nodes/codeBlock.js +17 -3
  7. package/dist/cjs/react/nodes/heading-anchor.js +1 -2
  8. package/dist/cjs/react/nodes/heading.js +5 -9
  9. package/dist/cjs/react/nodes/index.js +15 -1
  10. package/dist/cjs/react/nodes/media.js +4 -2
  11. package/dist/cjs/react/nodes/mediaInline.js +104 -0
  12. package/dist/cjs/react/nodes/panel.js +5 -7
  13. package/dist/cjs/react/nodes/text-wrapper.js +5 -6
  14. package/dist/cjs/ui/MediaCard.js +11 -5
  15. package/dist/cjs/ui/Renderer/index.js +4 -4
  16. package/dist/cjs/ui/Renderer/style.js +5 -5
  17. package/dist/cjs/ui/SortingIcon.js +1 -1
  18. package/dist/cjs/ui/annotations/draft/component.js +6 -6
  19. package/dist/cjs/ui/annotations/hooks/use-events.js +3 -1
  20. package/dist/cjs/version.json +1 -1
  21. package/dist/es2019/react/index.js +37 -8
  22. package/dist/es2019/react/marks/code.js +15 -3
  23. package/dist/es2019/react/marks/fragment.js +10 -0
  24. package/dist/es2019/react/marks/index.js +4 -2
  25. package/dist/es2019/react/nodes/codeBlock.js +13 -3
  26. package/dist/es2019/react/nodes/heading-anchor.js +1 -2
  27. package/dist/es2019/react/nodes/heading.js +5 -8
  28. package/dist/es2019/react/nodes/index.js +8 -1
  29. package/dist/es2019/react/nodes/media.js +4 -2
  30. package/dist/es2019/react/nodes/mediaInline.js +53 -0
  31. package/dist/es2019/react/nodes/panel.js +6 -7
  32. package/dist/es2019/react/nodes/text-wrapper.js +7 -6
  33. package/dist/es2019/ui/MediaCard.js +11 -5
  34. package/dist/es2019/ui/Renderer/index.js +4 -4
  35. package/dist/es2019/ui/Renderer/style.js +48 -82
  36. package/dist/es2019/ui/SortingIcon.js +1 -1
  37. package/dist/es2019/ui/annotations/draft/component.js +6 -6
  38. package/dist/es2019/ui/annotations/hooks/use-events.js +3 -1
  39. package/dist/es2019/version.json +1 -1
  40. package/dist/esm/react/index.js +39 -12
  41. package/dist/esm/react/marks/code.js +15 -3
  42. package/dist/esm/react/marks/fragment.js +10 -0
  43. package/dist/esm/react/marks/index.js +4 -2
  44. package/dist/esm/react/nodes/codeBlock.js +13 -3
  45. package/dist/esm/react/nodes/heading-anchor.js +1 -2
  46. package/dist/esm/react/nodes/heading.js +5 -8
  47. package/dist/esm/react/nodes/index.js +14 -1
  48. package/dist/esm/react/nodes/media.js +4 -2
  49. package/dist/esm/react/nodes/mediaInline.js +80 -0
  50. package/dist/esm/react/nodes/panel.js +6 -7
  51. package/dist/esm/react/nodes/text-wrapper.js +7 -6
  52. package/dist/esm/ui/MediaCard.js +11 -5
  53. package/dist/esm/ui/Renderer/index.js +4 -4
  54. package/dist/esm/ui/Renderer/style.js +5 -6
  55. package/dist/esm/ui/SortingIcon.js +1 -1
  56. package/dist/esm/ui/annotations/draft/component.js +6 -6
  57. package/dist/esm/ui/annotations/hooks/use-events.js +3 -1
  58. package/dist/esm/version.json +1 -1
  59. package/dist/types/index.d.ts +1 -0
  60. package/dist/types/react/index.d.ts +1 -0
  61. package/dist/types/react/marks/code.d.ts +15 -1
  62. package/dist/types/react/marks/fragment.d.ts +3 -0
  63. package/dist/types/react/marks/index.d.ts +2 -1
  64. package/dist/types/react/nodes/codeBlock.d.ts +4 -3
  65. package/dist/types/react/nodes/index.d.ts +8 -7
  66. package/dist/types/react/nodes/mediaInline.d.ts +17 -0
  67. package/dist/types/react/nodes/text-wrapper.d.ts +2 -3
  68. package/dist/types/renderer-context.d.ts +3 -1
  69. package/dist/types/types/mediaOptions.d.ts +7 -1
  70. package/dist/types/ui/MediaCard.d.ts +2 -0
  71. package/dist/types/ui/annotations/draft/component.d.ts +1 -1
  72. package/dist/types/ui/renderer-props.d.ts +1 -1
  73. package/package.json +22 -23
@@ -1,15 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import HeadingAnchor from './heading-anchor';
4
- import Url from 'url-parse';
5
4
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics/enums';
6
5
  import AnalyticsContext from '../../analytics/analyticsContext';
7
6
  import { CopyTextConsumer } from './copy-text-provider';
8
7
 
9
8
  var getCurrentUrlWithHash = function getCurrentUrlWithHash() {
10
9
  var hash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
11
- var url = new Url(window.location.href);
12
- url.set('hash', encodeURIComponent(hash));
10
+ var url = new URL(window.location.href);
11
+ url.hash = encodeURIComponent(hash);
13
12
  return url.href;
14
13
  };
15
14
 
@@ -40,11 +39,9 @@ function Heading(props) {
40
39
  var showAnchorLink = !!props.showAnchorLink;
41
40
  var isRightAligned = hasRightAlignmentMark(marks);
42
41
  var enableNestedHeaderLinks = allowHeadingAnchorLinks && allowHeadingAnchorLinks.allowNestedHeaderLinks;
43
- return /*#__PURE__*/React.createElement("div", {
44
- className: "heading-wrapper ".concat(HX)
45
- }, /*#__PURE__*/React.createElement(HX, _extends({
42
+ return /*#__PURE__*/React.createElement(HX, _extends({
46
43
  id: headingId
47
- }, dataAttributes), /*#__PURE__*/React.createElement(React.Fragment, null, showAnchorLink && isRightAligned ? WrapChildTextInSpan(props.children) : props.children)), showAnchorLink && /*#__PURE__*/React.createElement(CopyTextConsumer, null, function (_ref) {
44
+ }, dataAttributes), /*#__PURE__*/React.createElement(React.Fragment, null, showAnchorLink && isRightAligned ? WrapChildTextInSpan(props.children) : props.children, showAnchorLink && /*#__PURE__*/React.createElement(CopyTextConsumer, null, function (_ref) {
48
45
  var copyTextToClipboard = _ref.copyTextToClipboard;
49
46
  return headingId && /*#__PURE__*/React.createElement(AnalyticsContext.Consumer, null, function (_ref2) {
50
47
  var fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
@@ -62,7 +59,7 @@ function Heading(props) {
62
59
  }
63
60
  });
64
61
  });
65
- }));
62
+ })));
66
63
  }
67
64
 
68
65
  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 };
@@ -44,7 +44,8 @@ var Media = /*#__PURE__*/function (_PureComponent) {
44
44
  alt = _this$props.alt,
45
45
  featureFlags = _this$props.featureFlags,
46
46
  allowMediaViewer = _this$props.shouldOpenMediaViewer,
47
- enableDownloadButton = _this$props.enableDownloadButton;
47
+ enableDownloadButton = _this$props.enableDownloadButton,
48
+ ssr = _this$props.ssr;
48
49
 
49
50
  var linkMark = _this.props.marks.find(_this.props.isLinkMark);
50
51
 
@@ -59,7 +60,8 @@ var Media = /*#__PURE__*/function (_PureComponent) {
59
60
  eventHandlers: eventHandlers,
60
61
  alt: allowAltTextOnImages ? alt : undefined,
61
62
  featureFlags: featureFlags,
62
- shouldEnableDownloadButton: enableDownloadButton
63
+ shouldEnableDownloadButton: enableDownloadButton,
64
+ ssr: ssr
63
65
  }));
64
66
  return linkHref ? /*#__PURE__*/React.createElement(MediaLink, {
65
67
  href: linkHref,
@@ -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;
@@ -17,17 +17,16 @@ import EmojiItem from './emoji'; // AFP-2532 TODO: Fix automatic suppressions be
17
17
  // eslint-disable-next-line @atlassian/tangerine/import/entry-points
18
18
 
19
19
  import { themed } from '@atlaskit/theme';
20
+ import { getPanelBackgroundDarkModeColors } from '@atlaskit/editor-common';
20
21
  var PanelStyled = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
21
22
  if (props['data-panel-type'] !== PanelType.CUSTOM || !props.backgroundColor) {
22
23
  return '';
23
- }
24
+ } // Similar to mainDynamicStyles()
24
25
 
25
- var border = themed({
26
- light: 'none',
27
- dark: "1px solid rgba(255, 255, 255, 0.4)"
28
- })(props); // Similar to mainDynamicStyles()
29
26
 
30
- return "\n &[data-panel-type=".concat(PanelType.CUSTOM, "] {\n background-color: ").concat(props.backgroundColor, ";\n border: ").concat(border, ";\n }\n ");
27
+ return "\n &[data-panel-type=".concat(PanelType.CUSTOM, "] {\n background-color: ").concat(props.backgroundColor, ";\n ").concat(themed({
28
+ dark: getPanelBackgroundDarkModeColors
29
+ }), ";\n }\n ");
31
30
  });
32
31
  var panelIcons = {
33
32
  info: InfoIcon,
@@ -72,7 +71,7 @@ var Panel = function Panel(props) {
72
71
  var icon = getIcon();
73
72
 
74
73
  if (icon) {
75
- return /*#__PURE__*/React.createElement("span", {
74
+ return /*#__PURE__*/React.createElement("div", {
76
75
  className: PanelSharedCssClassName.icon
77
76
  }, icon);
78
77
  }
@@ -1,18 +1,19 @@
1
1
  import React from 'react';
2
2
  import { TextWithAnnotationDraft } from '../../ui/annotations';
3
- var TextWrapper = /*#__PURE__*/React.memo(function (props) {
3
+
4
+ var TextWrapper = function TextWrapper(props) {
4
5
  var startPos = props.startPos,
5
6
  endPos = props.endPos;
6
- var text = props.text;
7
+ var children = props.children;
7
8
 
8
- if (!text) {
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;
@@ -262,7 +262,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
262
262
  imageStatus = _this$props4.imageStatus,
263
263
  disableOverlay = _this$props4.disableOverlay,
264
264
  alt = _this$props4.alt,
265
- featureFlags = _this$props4.featureFlags;
265
+ featureFlags = _this$props4.featureFlags,
266
+ ssr = _this$props4.ssr;
266
267
 
267
268
  if (imageStatus === 'loading' || !url) {
268
269
  return this.renderLoadingCard();
@@ -287,7 +288,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
287
288
  mediaViewerDataSource: {
288
289
  list: Array.from(mediaIdentifierMap.values())
289
290
  },
290
- featureFlags: featureFlags
291
+ featureFlags: featureFlags,
292
+ ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
291
293
  });
292
294
  }
293
295
  /**
@@ -302,7 +304,7 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
302
304
  value: function render() {
303
305
  var _this$state = this.state,
304
306
  contextIdentifierProvider = _this$state.contextIdentifierProvider,
305
- mediaClientConfig = _this$state.mediaClientConfig,
307
+ mediaClientConfigInState = _this$state.mediaClientConfig,
306
308
  fileState = _this$state.fileState;
307
309
  var _this$props5 = this.props,
308
310
  id = _this$props5.id,
@@ -318,7 +320,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
318
320
  originalDimensions = _this$props5.originalDimensions,
319
321
  forceOpenMediaViewer = _this$props5.shouldOpenMediaViewer,
320
322
  featureFlags = _this$props5.featureFlags,
321
- shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton;
323
+ shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
324
+ ssr = _this$props5.ssr;
322
325
  var isMobile = rendererAppearance === 'mobile';
323
326
  var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
324
327
  var isInlinePlayer = isMobile ? false : shouldPlayInline;
@@ -333,6 +336,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
333
336
  return null;
334
337
  }
335
338
 
339
+ var mediaClientConfig = !!ssr ? ssr.config : mediaClientConfigInState;
340
+
336
341
  if (!mediaClientConfig || !id) {
337
342
  return this.renderLoadingCard();
338
343
  }
@@ -374,7 +379,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
374
379
  list: Array.from(mediaIdentifierMap.values())
375
380
  },
376
381
  featureFlags: featureFlags,
377
- shouldEnableDownloadButton: shouldEnableDownloadButton
382
+ shouldEnableDownloadButton: shouldEnableDownloadButton,
383
+ ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
378
384
  }));
379
385
  }
380
386
  }]);
@@ -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.allowCustomPanels !== this.props.allowCustomPanels || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
178
178
  this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
179
179
  }
180
180
  }
@@ -208,7 +208,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
208
208
  surroundTextNodesWithTextWrapper: allowAnnotationsDraftMode,
209
209
  media: props.media,
210
210
  allowCopyToClipboard: props.allowCopyToClipboard,
211
- allowCustomPanels: props.UNSAFE_allowCustomPanels,
211
+ allowCustomPanels: props.allowCustomPanels,
212
212
  allowAnnotations: props.allowAnnotations,
213
213
  allowSelectAllTrap: props.allowSelectAllTrap,
214
214
  allowPlaceholderText: props.allowPlaceholderText
@@ -234,7 +234,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
234
234
  allowPlaceholderText = _this$props2.allowPlaceholderText,
235
235
  allowColumnSorting = _this$props2.allowColumnSorting,
236
236
  allowCopyToClipboard = _this$props2.allowCopyToClipboard,
237
- UNSAFE_allowCustomPanels = _this$props2.UNSAFE_allowCustomPanels;
237
+ allowCustomPanels = _this$props2.allowCustomPanels;
238
238
  var allowNestedHeaderLinks = isNestedHeaderLinksEnabled(allowHeadingAnchorLinks);
239
239
  /**
240
240
  * Handle clicks inside renderer. If the click isn't on media, in the media picker, or on a
@@ -309,7 +309,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
309
309
  allowNestedHeaderLinks: allowNestedHeaderLinks,
310
310
  allowColumnSorting: allowColumnSorting,
311
311
  allowCopyToClipboard: allowCopyToClipboard,
312
- allowCustomPanels: UNSAFE_allowCustomPanels,
312
+ allowCustomPanels: allowCustomPanels,
313
313
  allowPlaceholderText: allowPlaceholderText,
314
314
  innerRef: this.editorRef,
315
315
  onClick: handleWrapperOnClick,
@@ -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 display: inline-block;\n & + .", " {\n position: absolute;\n margin-left: 6px;\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 &:focus {\n opacity: 1;\n transform: none !important;\n outline: solid 2px ", ";\n }\n }\n }\n }\n "])), HeadingAnchorWrapperClassName, HeadingAnchorWrapperClassName, colors.B200);
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 .heading-wrapper {\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, 0);\n }\n }\n }\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 .heading-wrapper {\n margin-right: 30px;\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 div.heading-wrapper{\n position: relative;\n h1, h2, h3, h4, h5, h6{\n margin-top: 0;\n font-size: inherit;\n }\n &.h1 {\n ", ";\n margin-top: 1.667em;\n }\n &.h2 {\n ", ";\n margin-top: 1.8em;\n }\n &.h3 {\n ", ";\n margin-top: 2em;\n }\n &.h4 {\n ", ";\n margin-top: 1.357em;\n }\n &.h5 {\n ", ";\n margin-top: 1.667em;\n }\n &.h6 {\n ", ";\n margin-top: 1.455em;\n }\n /* show copy button on heading wrapper hover */\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n .", " > button{\n opacity: 1;\n transform: none !important;\n }\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({
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, .copy-to-clipboard:focus{\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, h700, h600, h500, h400, h300, h100, HeadingAnchorWrapperClassName, 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({
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({
@@ -23,7 +23,7 @@ export var StatusClassNames;
23
23
  })(StatusClassNames || (StatusClassNames = {}));
24
24
 
25
25
  var Wrapper = styled.figure(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid #fff;\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n\n &:hover {\n background-color: ", ";\n }\n\n &.", " {\n cursor: not-allowed;\n }\n"])), gridSize() / 2, N20, N30, StatusClassNames.SORTING_NOT_ALLOWED);
26
- var TableSortingIcon = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n background-image: url(", ");\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.5;\n }\n"])), TableSortIconDataUrl, StatusClassNames.DESC, TABLE_SORTING_ICON_CLASS);
26
+ var TableSortingIcon = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n background-image: url(", ");\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.7;\n }\n"])), TableSortIconDataUrl, StatusClassNames.DESC, TABLE_SORTING_ICON_CLASS);
27
27
 
28
28
  var getClassName = function getClassName(status) {
29
29
  switch (status) {
@@ -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
- text = _ref3.text;
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, text);
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
- }, text);
82
+ }, children);
83
83
  }
84
84
 
85
- var offsets = calcTextSplitOffset(nextDraftPosition, textPosition, text);
86
- var texts = splitText(text, offsets);
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, text);
89
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
90
90
  }
91
91
 
92
92
  var components = applyAnnotationOnText({
@@ -31,7 +31,9 @@ export var useAnnotationStateByTypeEvent = function useAnnotationStateByTypeEven
31
31
 
32
32
  var nextStates = Object.values(payload).reduce(function (acc, curr) {
33
33
  if (curr.annotationType === type) {
34
- return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, curr.id, curr.state));
34
+ // Check for empty state to prevent additional renders
35
+ var isEmpty = curr.state === null || curr.state === undefined;
36
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, curr.id, !isEmpty ? curr.state : states[curr.id]));
35
37
  }
36
38
 
37
39
  return acc;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "81.1.1",
3
+ "version": "83.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -8,3 +8,4 @@ export type { RendererContext } from './react/types';
8
8
  export { ADFEncoder } from './utils';
9
9
  export { renderDocument } from './render-document';
10
10
  export type { RenderOutputStat } from './render-document';
11
+ export type { MediaSSR } from './types/mediaOptions';
@@ -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 default function Code(props: MarkProps): JSX.Element;
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;
@@ -0,0 +1,3 @@
1
+ import { FragmentAttributes } from '@atlaskit/adf-schema';
2
+ import { MarkProps } from '../types';
3
+ export default function FragmentMark(props: MarkProps<FragmentAttributes>): JSX.Element;
@@ -12,9 +12,10 @@ import Breakout from './breakout';
12
12
  import UnsupportedMark from './unsupportedMark';
13
13
  import UnsupportedNodeAttribute from './unsupportedNodeAttribute';
14
14
  import DataConsumer from './data-consumer';
15
+ import FragmentMark from './fragment';
15
16
  import Annotation, { isAnnotationMark } from './annotation';
16
17
  export declare const markToReact: {
17
18
  [key: string]: ComponentType<any>;
18
19
  };
19
20
  export declare const toReact: (mark: Mark) => ComponentType<any>;
20
- export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, };
21
+ export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
@@ -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 };