@atlaskit/renderer 82.0.0 → 84.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 (139) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/dist/cjs/actions/matches-utils.js +1 -1
  3. package/dist/cjs/analytics/enums.js +1 -1
  4. package/dist/cjs/analytics/events.js +1 -1
  5. package/dist/cjs/i18n/index.js +26 -26
  6. package/dist/cjs/index.js +8 -8
  7. package/dist/cjs/messages.js +4 -4
  8. package/dist/cjs/react/index.js +32 -12
  9. package/dist/cjs/react/marks/annotation.js +1 -1
  10. package/dist/cjs/react/marks/breakout.js +1 -1
  11. package/dist/cjs/react/marks/code.js +26 -4
  12. package/dist/cjs/react/marks/fragment.js +21 -0
  13. package/dist/cjs/react/marks/index.js +28 -19
  14. package/dist/cjs/react/nodes/codeBlock.js +17 -3
  15. package/dist/cjs/react/nodes/codeBlockCopyButton.js +2 -2
  16. package/dist/cjs/react/nodes/copy-text-provider.js +1 -1
  17. package/dist/cjs/react/nodes/date.js +2 -2
  18. package/dist/cjs/react/nodes/doc.js +1 -1
  19. package/dist/cjs/react/nodes/extension.js +1 -1
  20. package/dist/cjs/react/nodes/heading-anchor.js +2 -2
  21. package/dist/cjs/react/nodes/heading.js +2 -4
  22. package/dist/cjs/react/nodes/index.js +31 -22
  23. package/dist/cjs/react/nodes/media.js +4 -2
  24. package/dist/cjs/react/nodes/mediaSingle/index.js +3 -3
  25. package/dist/cjs/react/nodes/panel.js +4 -6
  26. package/dist/cjs/react/nodes/table/colgroup.js +1 -1
  27. package/dist/cjs/react/nodes/table/sticky.js +1 -1
  28. package/dist/cjs/react/nodes/tableCell.js +1 -1
  29. package/dist/cjs/react/nodes/text-wrapper.js +5 -6
  30. package/dist/cjs/react/renderer-node.js +1 -1
  31. package/dist/cjs/react/utils/links.js +1 -1
  32. package/dist/cjs/renderer-context.js +1 -1
  33. package/dist/cjs/steps/index.js +2 -2
  34. package/dist/cjs/text/nodes/index.js +1 -1
  35. package/dist/cjs/ui/Expand.js +2 -2
  36. package/dist/cjs/ui/MediaCard.js +12 -6
  37. package/dist/cjs/ui/Renderer/breakout-ssr.js +1 -1
  38. package/dist/cjs/ui/Renderer/index.js +11 -11
  39. package/dist/cjs/ui/Renderer/style.js +2 -2
  40. package/dist/cjs/ui/RendererActionsContext/index.js +1 -1
  41. package/dist/cjs/ui/SortingIcon.js +2 -2
  42. package/dist/cjs/ui/active-header-id-provider.js +1 -1
  43. package/dist/cjs/ui/annotations/context.js +1 -1
  44. package/dist/cjs/ui/annotations/draft/component.js +7 -7
  45. package/dist/cjs/ui/annotations/draft/index.js +4 -4
  46. package/dist/cjs/ui/annotations/draft/text.js +1 -1
  47. package/dist/cjs/ui/annotations/hooks/index.js +8 -8
  48. package/dist/cjs/ui/annotations/hooks/use-events.js +4 -2
  49. package/dist/cjs/ui/annotations/index.js +5 -5
  50. package/dist/cjs/utils.js +2 -1
  51. package/dist/cjs/version.json +1 -1
  52. package/dist/es2019/messages.js +1 -1
  53. package/dist/es2019/react/index.js +29 -8
  54. package/dist/es2019/react/marks/code.js +15 -3
  55. package/dist/es2019/react/marks/fragment.js +10 -0
  56. package/dist/es2019/react/marks/index.js +4 -2
  57. package/dist/es2019/react/nodes/codeBlock.js +13 -3
  58. package/dist/es2019/react/nodes/codeBlockCopyButton.js +1 -1
  59. package/dist/es2019/react/nodes/date.js +1 -1
  60. package/dist/es2019/react/nodes/heading-anchor.js +1 -1
  61. package/dist/es2019/react/nodes/heading.js +2 -3
  62. package/dist/es2019/react/nodes/media.js +4 -2
  63. package/dist/es2019/react/nodes/mediaSingle/index.js +1 -1
  64. package/dist/es2019/react/nodes/panel.js +5 -6
  65. package/dist/es2019/react/nodes/text-wrapper.js +7 -6
  66. package/dist/es2019/ui/Expand.js +1 -1
  67. package/dist/es2019/ui/MediaCard.js +11 -5
  68. package/dist/es2019/ui/Renderer/index.js +10 -10
  69. package/dist/es2019/ui/Renderer/style.js +1 -1
  70. package/dist/es2019/ui/SortingIcon.js +1 -1
  71. package/dist/es2019/ui/annotations/draft/component.js +6 -6
  72. package/dist/es2019/ui/annotations/hooks/use-events.js +3 -1
  73. package/dist/es2019/version.json +1 -1
  74. package/dist/esm/messages.js +1 -1
  75. package/dist/esm/react/index.js +31 -12
  76. package/dist/esm/react/marks/code.js +15 -3
  77. package/dist/esm/react/marks/fragment.js +10 -0
  78. package/dist/esm/react/marks/index.js +4 -2
  79. package/dist/esm/react/nodes/codeBlock.js +13 -3
  80. package/dist/esm/react/nodes/codeBlockCopyButton.js +1 -1
  81. package/dist/esm/react/nodes/date.js +1 -1
  82. package/dist/esm/react/nodes/heading-anchor.js +1 -1
  83. package/dist/esm/react/nodes/heading.js +2 -3
  84. package/dist/esm/react/nodes/media.js +4 -2
  85. package/dist/esm/react/nodes/mediaSingle/index.js +1 -1
  86. package/dist/esm/react/nodes/panel.js +5 -6
  87. package/dist/esm/react/nodes/text-wrapper.js +7 -6
  88. package/dist/esm/ui/Expand.js +1 -1
  89. package/dist/esm/ui/MediaCard.js +11 -5
  90. package/dist/esm/ui/Renderer/index.js +10 -10
  91. package/dist/esm/ui/Renderer/style.js +1 -1
  92. package/dist/esm/ui/SortingIcon.js +1 -1
  93. package/dist/esm/ui/annotations/draft/component.js +6 -6
  94. package/dist/esm/ui/annotations/hooks/use-events.js +3 -1
  95. package/dist/esm/version.json +1 -1
  96. package/dist/types/index.d.ts +1 -0
  97. package/dist/types/react/index.d.ts +1 -0
  98. package/dist/types/react/marks/alignment.d.ts +1 -0
  99. package/dist/types/react/marks/annotation.d.ts +1 -0
  100. package/dist/types/react/marks/code.d.ts +15 -1
  101. package/dist/types/react/marks/data-consumer.d.ts +1 -0
  102. package/dist/types/react/marks/em.d.ts +1 -0
  103. package/dist/types/react/marks/fragment.d.ts +4 -0
  104. package/dist/types/react/marks/indentation.d.ts +1 -0
  105. package/dist/types/react/marks/index.d.ts +2 -1
  106. package/dist/types/react/marks/link.d.ts +1 -0
  107. package/dist/types/react/marks/strike.d.ts +1 -0
  108. package/dist/types/react/marks/strong.d.ts +1 -0
  109. package/dist/types/react/marks/subsup.d.ts +1 -0
  110. package/dist/types/react/marks/textColor.d.ts +1 -0
  111. package/dist/types/react/marks/underline.d.ts +1 -0
  112. package/dist/types/react/marks/unsupportedMark.d.ts +1 -0
  113. package/dist/types/react/marks/unsupportedNodeAttribute.d.ts +1 -0
  114. package/dist/types/react/nodes/blockCard.d.ts +1 -0
  115. package/dist/types/react/nodes/caption.d.ts +1 -0
  116. package/dist/types/react/nodes/codeBlock.d.ts +12 -3
  117. package/dist/types/react/nodes/codeBlockCopyButton.d.ts +3 -3
  118. package/dist/types/react/nodes/date.d.ts +3 -3
  119. package/dist/types/react/nodes/decisionItem.d.ts +1 -0
  120. package/dist/types/react/nodes/doc.d.ts +1 -0
  121. package/dist/types/react/nodes/embedCard.d.ts +1 -0
  122. package/dist/types/react/nodes/heading-anchor.d.ts +4 -4
  123. package/dist/types/react/nodes/heading.d.ts +1 -0
  124. package/dist/types/react/nodes/index.d.ts +8 -8
  125. package/dist/types/react/nodes/mediaSingle/index.d.ts +3 -3
  126. package/dist/types/react/nodes/paragraph.d.ts +1 -0
  127. package/dist/types/react/nodes/placeholder.d.ts +1 -0
  128. package/dist/types/react/nodes/rule.d.ts +1 -0
  129. package/dist/types/react/nodes/table/colgroup.d.ts +1 -0
  130. package/dist/types/react/nodes/text-wrapper.d.ts +3 -3
  131. package/dist/types/renderer-context.d.ts +3 -1
  132. package/dist/types/types/mediaOptions.d.ts +7 -1
  133. package/dist/types/ui/Expand.d.ts +3 -3
  134. package/dist/types/ui/MediaCard.d.ts +2 -0
  135. package/dist/types/ui/Renderer/breakout-ssr.d.ts +1 -0
  136. package/dist/types/ui/SortingIcon.d.ts +1 -0
  137. package/dist/types/ui/annotations/draft/component.d.ts +1 -1
  138. package/dist/types/ui/renderer-props.d.ts +1 -1
  139. package/package.json +23 -23
@@ -17,10 +17,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
17
17
 
18
18
  import React, { useContext, useLayoutEffect, useRef } from 'react';
19
19
  import { PureComponent } from 'react';
20
- import { IntlProvider } from 'react-intl';
21
20
  import { getSchemaBasedOnStage } from '@atlaskit/adf-schema';
22
21
  import { reduce } from '@atlaskit/adf-utils';
23
- import { UnsupportedBlock, ProviderFactory, BaseTheme, WidthProvider, getAnalyticsAppearance, getAnalyticsEventSeverity, WithCreateAnalyticsEvent, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common';
22
+ import { UnsupportedBlock, ProviderFactory, BaseTheme, WidthProvider, getAnalyticsAppearance, getAnalyticsEventSeverity, WithCreateAnalyticsEvent, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking, IntlNextErrorBoundary, LegacyToNextIntlProvider, IntlLegacyFallbackProvider } from '@atlaskit/editor-common';
24
23
  import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
25
24
  import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
26
25
  import { IframeWidthObserverFallbackWrapper, IframeWrapperConsumer } from '@atlaskit/width-detector';
@@ -174,7 +173,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
174
173
  var nextMedia = nextProps.media || {};
175
174
  var media = this.props.media || {};
176
175
 
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) {
176
+ 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
177
  this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
179
178
  }
180
179
  }
@@ -208,7 +207,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
208
207
  surroundTextNodesWithTextWrapper: allowAnnotationsDraftMode,
209
208
  media: props.media,
210
209
  allowCopyToClipboard: props.allowCopyToClipboard,
211
- allowCustomPanels: props.UNSAFE_allowCustomPanels,
210
+ allowCustomPanels: props.allowCustomPanels,
212
211
  allowAnnotations: props.allowAnnotations,
213
212
  allowSelectAllTrap: props.allowSelectAllTrap,
214
213
  allowPlaceholderText: props.allowPlaceholderText
@@ -234,7 +233,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
234
233
  allowPlaceholderText = _this$props2.allowPlaceholderText,
235
234
  allowColumnSorting = _this$props2.allowColumnSorting,
236
235
  allowCopyToClipboard = _this$props2.allowCopyToClipboard,
237
- UNSAFE_allowCustomPanels = _this$props2.UNSAFE_allowCustomPanels;
236
+ allowCustomPanels = _this$props2.allowCustomPanels;
238
237
  var allowNestedHeaderLinks = isNestedHeaderLinksEnabled(allowHeadingAnchorLinks);
239
238
  /**
240
239
  * Handle clicks inside renderer. If the click isn't on media, in the media picker, or on a
@@ -297,7 +296,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
297
296
  value: this.featureFlags(this.props.featureFlags)
298
297
  }, /*#__PURE__*/React.createElement(CopyTextProvider, null, /*#__PURE__*/React.createElement(ActiveHeaderIdProvider, {
299
298
  value: getActiveHeadingId(allowHeadingAnchorLinks)
300
- }, /*#__PURE__*/React.createElement(IntlProvider, null, /*#__PURE__*/React.createElement(AnalyticsContext.Provider, {
299
+ }, /*#__PURE__*/React.createElement(LegacyToNextIntlProvider, null, /*#__PURE__*/React.createElement(IntlLegacyFallbackProvider, null, /*#__PURE__*/React.createElement(AnalyticsContext.Provider, {
301
300
  value: {
302
301
  fireAnalyticsEvent: function fireAnalyticsEvent(event) {
303
302
  return _this3.fireAnalyticsEvent(event);
@@ -309,7 +308,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
309
308
  allowNestedHeaderLinks: allowNestedHeaderLinks,
310
309
  allowColumnSorting: allowColumnSorting,
311
310
  allowCopyToClipboard: allowCopyToClipboard,
312
- allowCustomPanels: UNSAFE_allowCustomPanels,
311
+ allowCustomPanels: allowCustomPanels,
313
312
  allowPlaceholderText: allowPlaceholderText,
314
313
  innerRef: this.editorRef,
315
314
  onClick: handleWrapperOnClick,
@@ -320,7 +319,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
320
319
  doc: pmDoc,
321
320
  schema: schema,
322
321
  onAnalyticsEvent: this.fireAnalyticsEvent
323
- }, result))))))));
322
+ }, result)))))))));
324
323
  return truncated ? /*#__PURE__*/React.createElement(TruncatedWrapper, {
325
324
  height: maxHeight,
326
325
  fadeHeight: fadeOutHeight
@@ -371,14 +370,15 @@ var RendererWithAnalytics = /*#__PURE__*/React.memo(function (props) {
371
370
  }
372
371
  }, /*#__PURE__*/React.createElement(WithCreateAnalyticsEvent, {
373
372
  render: function render(createAnalyticsEvent) {
373
+ // `IntlNextErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
374
374
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
375
375
  component: ACTION_SUBJECT.RENDERER,
376
376
  rethrowError: true,
377
377
  fallbackComponent: null,
378
378
  createAnalyticsEvent: createAnalyticsEvent
379
- }, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
379
+ }, /*#__PURE__*/React.createElement(IntlNextErrorBoundary, null, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
380
380
  createAnalyticsEvent: createAnalyticsEvent
381
- })));
381
+ }))));
382
382
  }
383
383
  }));
384
384
  });
@@ -91,7 +91,7 @@ var fullWidthStyles = function fullWidthStyles(_ref4) {
91
91
  }; // prettier-ignore
92
92
 
93
93
 
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({
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({
95
95
  light: colors.N800,
96
96
  dark: '#B8C7E0'
97
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({
@@ -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": "82.0.0",
3
+ "version": "84.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';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Fragment, Mark, Node } from 'prosemirror-model';
2
3
  import { Serializer } from '../';
3
4
  import { RendererAppearance, StickyHeaderConfig, HeadingAnchorLinksProps } from '../ui/Renderer/types';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AlignmentAttributes } from '@atlaskit/adf-schema';
2
3
  import { MarkProps } from '../types';
3
4
  export default function Alignment(props: MarkProps<AlignmentAttributes>): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MarkProps, AnnotationMarkMeta } from '../types';
2
3
  import { Mark } from 'prosemirror-model';
3
4
  export declare const isAnnotationMark: (mark: Mark) => boolean;
@@ -1,2 +1,16 @@
1
+ import React from 'react';
2
+ import { WrappedComponentProps } from 'react-intl-next';
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
+ }> & WrappedComponentProps): JSX.Element;
9
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
10
+ codeBidiWarningTooltipEnabled: boolean;
11
+ } & import("../types").MarkMeta & WrappedComponentProps<"intl">>> & {
12
+ WrappedComponent: React.ComponentType<{
13
+ codeBidiWarningTooltipEnabled: boolean;
14
+ } & import("../types").MarkMeta & WrappedComponentProps<"intl">>;
15
+ };
16
+ export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DataConsumerAttributes } from '@atlaskit/adf-schema';
2
3
  import { MarkProps } from '../types';
3
4
  export default function DataConsumer(props: MarkProps<DataConsumerAttributes>): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { MarkProps } from '../types';
2
3
  export default function Em(props: MarkProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { FragmentAttributes } from '@atlaskit/adf-schema';
3
+ import { MarkProps } from '../types';
4
+ export default function FragmentMark(props: MarkProps<FragmentAttributes>): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IndentationMarkAttributes } from '@atlaskit/adf-schema';
2
3
  import { MarkProps } from '../types';
3
4
  export default function Indentation(props: MarkProps<IndentationMarkAttributes>): 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, };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { LinkAttributes } from '@atlaskit/adf-schema';
2
3
  import { MarkProps } from '../types';
3
4
  interface LinkProps extends LinkAttributes {
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { MarkProps } from '../types';
2
3
  export default function Strike(props: MarkProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { MarkProps } from '../types';
2
3
  export default function Strong(props: MarkProps): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SubSupAttributes } from '@atlaskit/adf-schema';
2
3
  import { MarkProps } from '../types';
3
4
  export default function SubSup(props: MarkProps<SubSupAttributes>): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TextColorAttributes } from '@atlaskit/adf-schema';
2
3
  import { MarkProps } from '../types';
3
4
  export default function TextColor(props: MarkProps<TextColorAttributes>): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { MarkProps } from '../types';
2
3
  export default function Underline(props: MarkProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { MarkProps } from '../types';
2
3
  export default function UnsupportedMark(props: MarkProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { MarkProps } from '../types';
2
3
  export default function UnsupportedNodeAttribute(props: MarkProps): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EventHandlers } from '@atlaskit/editor-common';
2
3
  import { RendererAppearance } from '../../ui/Renderer/types';
3
4
  export default function BlockCard(props: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { NodeProps } from '../types';
2
3
  declare const RenderCaption: ({ children, dataAttributes }: NodeProps) => JSX.Element;
3
4
  export default RenderCaption;
@@ -1,15 +1,24 @@
1
+ import React from 'react';
2
+ import { WrappedComponentProps } from 'react-intl-next';
1
3
  import { SupportedLanguages } from '@atlaskit/code';
2
4
  export interface Props {
3
5
  text: string;
4
6
  language: SupportedLanguages;
5
7
  allowCopyToClipboard?: boolean;
8
+ codeBidiWarningTooltipEnabled: boolean;
6
9
  className?: string;
7
10
  }
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"> & {
11
+ declare const _default: import("styled-components").StyledComponentClass<(Pick<Props & WrappedComponentProps<"intl">, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
12
+ forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
13
+ } & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<Props & WrappedComponentProps<"intl">, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
14
+ forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
15
+ } & import("@atlaskit/theme").CustomThemeProps) | (Pick<Props & WrappedComponentProps<"intl">, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
16
+ forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
17
+ } & import("@atlaskit/theme").NoThemeProps), any, (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
9
18
  theme?: any;
10
- } & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
19
+ } & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
11
20
  theme?: any;
12
- } & import("@atlaskit/theme").CustomThemeProps) | (Pick<Props, "text" | "className" | "language" | "allowCopyToClipboard"> & {
21
+ } & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
13
22
  theme?: any;
14
23
  } & import("@atlaskit/theme").NoThemeProps)>;
15
24
  export default _default;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { InjectedIntlProps } from 'react-intl';
2
+ import { WrappedComponentProps } from 'react-intl-next';
3
3
  declare type Props = {
4
4
  content: string;
5
5
  };
6
- declare const _default: React.ComponentClass<Props, any> & {
7
- WrappedComponent: ReactIntl.ComponentConstructor<Props & InjectedIntlProps>;
6
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
7
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
8
8
  };
9
9
  export default _default;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { InjectedIntlProps } from 'react-intl';
2
+ import { WrappedComponentProps } from 'react-intl-next';
3
3
  export interface Props {
4
4
  timestamp: string;
5
5
  parentIsIncompleteTask?: boolean;
6
6
  }
7
- declare const _default: React.ComponentClass<Props, any> & {
8
- WrappedComponent: ReactIntl.ComponentConstructor<Props & InjectedIntlProps>;
7
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
8
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
9
9
  };
10
10
  export default _default;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { NodeProps } from '../types';
2
3
  export default function DecisionItem({ children, dataAttributes }: NodeProps): JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  export default function Doc(props: any): JSX.Element;
2
3
  export declare function DocWithSelectAllTrap(props: any): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EventHandlers } from '@atlaskit/editor-common';
2
3
  import { RichMediaLayout } from '@atlaskit/adf-schema';
3
4
  import { RendererAppearance } from '../../ui/Renderer/types';
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
- import { InjectedIntlProps } from 'react-intl';
2
+ import { WrappedComponentProps } from 'react-intl-next';
3
3
  export declare const HeadingAnchorWrapperClassName = "heading-anchor-wrapper";
4
4
  declare type Props = {
5
5
  onCopyText: () => Promise<void>;
6
6
  enableNestedHeaderLinks?: boolean;
7
7
  level: number;
8
8
  };
9
- declare type HeadingAnchorProps = Props & React.Props<any> & InjectedIntlProps;
10
- declare const _default: React.ComponentClass<Props & React.Props<any>, any> & {
11
- WrappedComponent: ReactIntl.ComponentConstructor<HeadingAnchorProps>;
9
+ declare type HeadingAnchorProps = Props & React.Props<any> & WrappedComponentProps;
10
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<HeadingAnchorProps>> & {
11
+ WrappedComponent: React.ComponentType<HeadingAnchorProps>;
12
12
  };
13
13
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Node as PMNode } from 'prosemirror-model';
2
3
  import { NodeProps } from '../types';
3
4
  import { HeadingAnchorLinksProps } from '../../ui/Renderer/types';
@@ -26,22 +26,22 @@ 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("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "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("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "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("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "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("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "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("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "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("react-intl-next").WithIntlProps<import("./codeBlock").Props & import("react-intl-next").WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "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);
43
43
  declare const DecisionItem: (React.ComponentClass<import("../types").NodeMeta, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("../types").NodeMeta> & Loadable.LoadableComponent);
44
- declare const Date: (React.ComponentClass<import("./date").Props, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./date").Props> & Loadable.LoadableComponent);
44
+ declare const Date: (React.ComponentClass<import("react-intl-next").WithIntlProps<import("./date").Props & import("react-intl-next").WrappedComponentProps<"intl">>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("react-intl-next").WithIntlProps<import("./date").Props & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent);
45
45
  declare const Status: (React.ComponentClass<import("./status").Props, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./status").Props> & Loadable.LoadableComponent);
46
46
  declare const Emoji: (React.ComponentClass<import("./emoji").EmojiProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./emoji").EmojiProps> & Loadable.LoadableComponent);
47
47
  declare const InlineCard: (React.ComponentClass<Pick<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, "data" | "eventHandlers" | "url" | "portal">, any> & Loadable.LoadableComponent) | (React.FunctionComponent<Pick<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, "data" | "eventHandlers" | "url" | "portal">> & Loadable.LoadableComponent);
@@ -62,7 +62,7 @@ declare const Media: (React.ComponentClass<import("./media").MediaProps, any> &
62
62
  declare const MediaGroup: (React.ComponentClass<import("./mediaGroup").MediaGroupProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./mediaGroup").MediaGroupProps> & Loadable.LoadableComponent);
63
63
  declare const MediaInline: (React.ComponentClass<import("./mediaInline").MediaInlineProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./mediaInline").MediaInlineProps> & Loadable.LoadableComponent);
64
64
  declare const Mention: (React.ComponentClass<import("./mention").Props, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("./mention").Props> & Loadable.LoadableComponent);
65
- declare const Expand: (React.ComponentClass<import("../../ui/Expand").ExpandProps, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("../../ui/Expand").ExpandProps> & Loadable.LoadableComponent);
65
+ declare const Expand: (React.ComponentClass<import("react-intl-next").WithIntlProps<import("../../ui/Expand").ExpandProps & import("react-intl-next").WrappedComponentProps<"intl">>, any> & Loadable.LoadableComponent) | (React.FunctionComponent<import("react-intl-next").WithIntlProps<import("../../ui/Expand").ExpandProps & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent);
66
66
  export declare const nodeToReact: {
67
67
  [key: string]: React.ComponentType<any>;
68
68
  };
@@ -1,7 +1,7 @@
1
1
  import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
2
2
  import { EventHandlers } from '@atlaskit/editor-common';
3
3
  import { default as React } from 'react';
4
- import { InjectedIntlProps } from 'react-intl';
4
+ import { WrappedComponentProps } from 'react-intl-next';
5
5
  import { AnalyticsEventPayload } from '../../../analytics/events';
6
6
  import { RendererAppearance } from '../../../ui/Renderer/types';
7
7
  import { MediaFeatureFlags } from '@atlaskit/media-common';
@@ -21,7 +21,7 @@ export interface State {
21
21
  height?: number;
22
22
  }
23
23
  export declare const getMediaContainerWidth: (currentContainerWidth: number, layout: MediaSingleLayout) => number;
24
- declare const _default: React.ComponentClass<Props, any> & {
25
- WrappedComponent: ReactIntl.ComponentConstructor<Props & InjectedIntlProps>;
24
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
25
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
26
26
  };
27
27
  export default _default;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { NodeProps } from '../types';
2
3
  export default function Paragraph({ children, dataAttributes }: NodeProps): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface Props {
2
3
  text: string;
3
4
  allowPlaceholderText?: boolean;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export default function Rule(): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SharedTableProps } from './types';
2
3
  export interface ScaleOptions {
3
4
  renderWidth: number;
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  declare type Props = {
3
3
  startPos: number;
4
4
  endPos: number;
5
- text?: string | null;
5
+ children?: string | null;
6
6
  };
7
- declare const TextWrapper: React.MemoExoticComponent<(props: Props) => JSX.Element | null>;
7
+ declare const TextWrapper: (props: Props) => JSX.Element | null;
8
8
  export default TextWrapper;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
- export declare type FeatureFlags = {};
2
+ export declare type FeatureFlags = {
3
+ codeBidiWarnings?: boolean;
4
+ };
3
5
  export declare type RendererContextProps = {
4
6
  featureFlags?: FeatureFlags;
5
7
  };
@@ -1,6 +1,12 @@
1
- import { MediaFeatureFlags } from '@atlaskit/media-common';
1
+ import { MediaClientConfig } from '@atlaskit/media-core';
2
+ import { MediaFeatureFlags, SSR } from '@atlaskit/media-common';
3
+ export declare type MediaSSR = {
4
+ mode: SSR;
5
+ config: MediaClientConfig;
6
+ };
2
7
  export interface MediaOptions {
3
8
  allowLinking?: boolean;
4
9
  enableDownloadButton?: boolean;
5
10
  featureFlags?: MediaFeatureFlags;
11
+ ssr?: MediaSSR;
6
12
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AnalyticsEventPayload } from '../analytics/events';
3
- import { InjectedIntlProps } from 'react-intl';
3
+ import { WrappedComponentProps } from 'react-intl-next';
4
4
  export interface StyleProps {
5
5
  expanded?: boolean;
6
6
  focused?: boolean;
@@ -14,7 +14,7 @@ export interface ExpandProps {
14
14
  fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
15
15
  nestedHeaderIds?: Array<string>;
16
16
  }
17
- declare const _default: React.ComponentClass<ExpandProps, any> & {
18
- WrappedComponent: ReactIntl.ComponentConstructor<ExpandProps & InjectedIntlProps>;
17
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<ExpandProps & WrappedComponentProps<"intl">>> & {
18
+ WrappedComponent: React.ComponentType<ExpandProps & WrappedComponentProps<"intl">>;
19
19
  };
20
20
  export default _default;
@@ -9,6 +9,7 @@ import { ImageStatus, ContextIdentifierProvider } from '@atlaskit/editor-common'
9
9
  import { MediaFeatureFlags } from '@atlaskit/media-common';
10
10
  import { RendererAppearance } from './Renderer/types';
11
11
  import { RendererContext } from '../react/types';
12
+ import { MediaSSR } from '../types/mediaOptions';
12
13
  export declare type MediaProvider = {
13
14
  viewMediaClientConfig: MediaClientConfig;
14
15
  };
@@ -38,6 +39,7 @@ export interface MediaCardProps {
38
39
  alt?: string;
39
40
  featureFlags?: MediaFeatureFlags;
40
41
  shouldEnableDownloadButton?: boolean;
42
+ ssr?: MediaSSR;
41
43
  }
42
44
  export interface State {
43
45
  mediaClientConfig?: MediaClientConfig;