@atlaskit/renderer 81.1.0 → 82.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/cjs/react/index.js +33 -8
  3. package/dist/cjs/react/marks/code.js +26 -4
  4. package/dist/cjs/react/nodes/codeBlock.js +17 -3
  5. package/dist/cjs/react/nodes/heading-anchor.js +1 -2
  6. package/dist/cjs/react/nodes/heading.js +3 -5
  7. package/dist/cjs/react/nodes/index.js +15 -1
  8. package/dist/cjs/react/nodes/mediaInline.js +104 -0
  9. package/dist/cjs/react/nodes/panel.js +1 -1
  10. package/dist/cjs/react/nodes/text-wrapper.js +5 -6
  11. package/dist/cjs/ui/Renderer/index.js +1 -1
  12. package/dist/cjs/ui/Renderer/style.js +5 -5
  13. package/dist/cjs/ui/annotations/draft/component.js +6 -6
  14. package/dist/cjs/version.json +1 -1
  15. package/dist/es2019/react/index.js +30 -5
  16. package/dist/es2019/react/marks/code.js +15 -3
  17. package/dist/es2019/react/nodes/codeBlock.js +13 -3
  18. package/dist/es2019/react/nodes/heading-anchor.js +1 -2
  19. package/dist/es2019/react/nodes/heading.js +3 -5
  20. package/dist/es2019/react/nodes/index.js +8 -1
  21. package/dist/es2019/react/nodes/mediaInline.js +53 -0
  22. package/dist/es2019/react/nodes/panel.js +1 -1
  23. package/dist/es2019/react/nodes/text-wrapper.js +7 -6
  24. package/dist/es2019/ui/Renderer/index.js +1 -1
  25. package/dist/es2019/ui/Renderer/style.js +47 -81
  26. package/dist/es2019/ui/annotations/draft/component.js +6 -6
  27. package/dist/es2019/version.json +1 -1
  28. package/dist/esm/react/index.js +32 -8
  29. package/dist/esm/react/marks/code.js +15 -3
  30. package/dist/esm/react/nodes/codeBlock.js +13 -3
  31. package/dist/esm/react/nodes/heading-anchor.js +1 -2
  32. package/dist/esm/react/nodes/heading.js +3 -5
  33. package/dist/esm/react/nodes/index.js +14 -1
  34. package/dist/esm/react/nodes/mediaInline.js +80 -0
  35. package/dist/esm/react/nodes/panel.js +1 -1
  36. package/dist/esm/react/nodes/text-wrapper.js +7 -6
  37. package/dist/esm/ui/Renderer/index.js +1 -1
  38. package/dist/esm/ui/Renderer/style.js +5 -6
  39. package/dist/esm/ui/annotations/draft/component.js +6 -6
  40. package/dist/esm/version.json +1 -1
  41. package/dist/types/react/index.d.ts +1 -0
  42. package/dist/types/react/marks/code.d.ts +15 -1
  43. package/dist/types/react/nodes/codeBlock.d.ts +4 -3
  44. package/dist/types/react/nodes/index.d.ts +8 -7
  45. package/dist/types/react/nodes/mediaInline.d.ts +17 -0
  46. package/dist/types/react/nodes/text-wrapper.d.ts +2 -3
  47. package/dist/types/renderer-context.d.ts +3 -1
  48. package/dist/types/ui/ExtensionRenderer.d.ts +1 -1
  49. package/dist/types/ui/annotations/draft/component.d.ts +1 -1
  50. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 82.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`db3477abb18`](https://bitbucket.org/atlassian/atlassian-frontend/commits/db3477abb18) - [ux] ED-13938 disabled code-bidi warning tooltip for mobile, reworked TextWrapper to fix bidi mitigation, and fixed issue where bidi warnings were not presented when renderer used with an annotation provider with draftMode set to true
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 82.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`c80c71b537d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c80c71b537d) - [ux] ED-13860 add bidi warning decorations to code components
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
23
+ ## 82.0.0
24
+
25
+ ### Major Changes
26
+
27
+ - [`3c5548e50da`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3c5548e50da) - [ux] Introducing new Media Inline component to renderer
28
+
29
+ ### Minor Changes
30
+
31
+ - [`971845eac0d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/971845eac0d) - CETI-96 Added new rule to emoji to solve the duplicate icon issue when we copy from renderer
32
+
33
+ ### Patch Changes
34
+
35
+ - [`f897443ad45`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f897443ad45) - Revert AK-279
36
+ - [`87865d3284f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/87865d3284f) - CETI-122 Fix Rendering of hybrid renderer when the prop UNSAFE_allowCustomPanels changed.
37
+ - [`a554946e674`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a554946e674) - Skipping flakey tests to unblock the weasal release
38
+ - [`33bca2a18bb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/33bca2a18bb) - Skipping a flaky test to unblock the weasal release
39
+ - Updated dependencies
40
+
41
+ ## 81.1.1
42
+
43
+ ### Patch Changes
44
+
45
+ - [`b85e7ce12cd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b85e7ce12cd) - Internal upgrade of memoize-one to 6.0.0
46
+
3
47
  ## 81.1.0
4
48
 
5
49
  ### Minor Changes
@@ -39,6 +39,8 @@ var _prosemirrorUtils = require("prosemirror-utils");
39
39
 
40
40
  var _rendererNode = require("./renderer-node");
41
41
 
42
+ var _code = require("./marks/code");
43
+
42
44
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
43
45
 
44
46
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -153,13 +155,22 @@ var ReactSerializer = /*#__PURE__*/function () {
153
155
  otherAttrs = (0, _objectWithoutProperties2.default)(_mark$attrs, ["key"]);
154
156
  var extraProps = {
155
157
  isInline: node === null || node === void 0 ? void 0 : node.isInline
156
- };
157
-
158
- var props = _objectSpread(_objectSpread(_objectSpread({
158
+ }; // currently the only mark which has custom props is the code mark
159
+
160
+ var markSpecificProps = (0, _code.isCodeMark)(mark) ? {
161
+ // The appearance being mobile indicates we are in an renderer being
162
+ // rendered by mobile bridge in a web view.
163
+ // The tooltip is likely to have unexpected behaviour there, with being cut
164
+ // off, so we disable it. This is also to keep the behaviour consistent with
165
+ // the rendering in the mobile Native Renderer.
166
+ codeBidiWarningTooltipEnabled: _this.appearance !== 'mobile'
167
+ } : {};
168
+
169
+ var props = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
159
170
  eventHandlers: _this.eventHandlers,
160
171
  fireAnalyticsEvent: _this.fireAnalyticsEvent,
161
172
  markKey: key
162
- }, otherAttrs), extraProps), {}, {
173
+ }, otherAttrs), extraProps), markSpecificProps), {}, {
163
174
  dataAttributes: {
164
175
  'data-renderer-mark': true
165
176
  }
@@ -220,6 +231,9 @@ var ReactSerializer = /*#__PURE__*/function () {
220
231
  case 'mediaGroup':
221
232
  return this.getMediaGroupProps(node);
222
233
 
234
+ case 'mediaInline':
235
+ return this.getMediaInlineProps(node);
236
+
223
237
  case 'mediaSingle':
224
238
  return this.getMediaSingleProps(node, path);
225
239
 
@@ -339,9 +353,8 @@ var ReactSerializer = /*#__PURE__*/function () {
339
353
  return /*#__PURE__*/_react.default.createElement(_textWrapper.default, {
340
354
  key: textKey,
341
355
  startPos: startPos + parentDepth,
342
- endPos: endPos + parentDepth,
343
- text: mark.text
344
- });
356
+ endPos: endPos + parentDepth
357
+ }, mark.text);
345
358
  }
346
359
 
347
360
  return mark.text || '';
@@ -478,6 +491,11 @@ var ReactSerializer = /*#__PURE__*/function () {
478
491
  enableDownloadButton: (_this$media = this.media) === null || _this$media === void 0 ? void 0 : _this$media.enableDownloadButton
479
492
  });
480
493
  }
494
+ }, {
495
+ key: "getMediaInlineProps",
496
+ value: function getMediaInlineProps(node) {
497
+ return _objectSpread({}, this.getProps(node));
498
+ }
481
499
  }, {
482
500
  key: "getTaskItemProps",
483
501
  value: function getTaskItemProps(node) {
@@ -504,8 +522,15 @@ var ReactSerializer = /*#__PURE__*/function () {
504
522
  }, {
505
523
  key: "getCodeBlockProps",
506
524
  value: function getCodeBlockProps(node) {
525
+ // The appearance being mobile indicates we are in an renderer being
526
+ // rendered by mobile bridge in a web view.
527
+ // The tooltip is likely to have unexpected behaviour there, with being cut
528
+ // off, so we disable it. This is also to keep the behaviour consistent with
529
+ // the rendering in the mobile Native Renderer.
530
+ var codeBidiWarningTooltipEnabled = this.appearance !== 'mobile';
507
531
  return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
508
- text: node.textContent
532
+ text: node.textContent,
533
+ codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled
509
534
  });
510
535
  }
511
536
  }, {
@@ -5,16 +5,38 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = Code;
8
+ exports.CodeWithIntl = CodeWithIntl;
9
+ exports.default = exports.isCodeMark = void 0;
9
10
 
10
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
12
 
12
13
  var _react = _interopRequireDefault(require("react"));
13
14
 
15
+ var _reactIntl = require("react-intl");
16
+
14
17
  var _inline = _interopRequireDefault(require("@atlaskit/code/inline"));
15
18
 
16
- function Code(props) {
19
+ var _messages = require("@atlaskit/editor-common/messages");
20
+
21
+ var _useFeatureFlags = require("../../use-feature-flags");
22
+
23
+ var isCodeMark = function isCodeMark(mark) {
24
+ return mark && mark.type && mark.type.name === 'code';
25
+ };
26
+
27
+ exports.isCodeMark = isCodeMark;
28
+
29
+ function CodeWithIntl(props) {
30
+ var featureFlags = (0, _useFeatureFlags.useFeatureFlags)();
31
+ var codeBidiWarningLabel = props.intl.formatMessage(_messages.codeBidiWarningMessages.label);
17
32
  return /*#__PURE__*/_react.default.createElement(_inline.default, (0, _extends2.default)({
18
- className: "code"
33
+ className: "code",
34
+ codeBidiWarnings: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.codeBidiWarnings,
35
+ codeBidiWarningLabel: codeBidiWarningLabel,
36
+ codeBidiWarningTooltipEnabled: props.codeBidiWarningTooltipEnabled
19
37
  }, props.dataAttributes), props.children);
20
- }
38
+ }
39
+
40
+ var _default = (0, _reactIntl.injectIntl)(CodeWithIntl);
41
+
42
+ exports.default = _default;
@@ -11,6 +11,8 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
11
11
 
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
 
14
+ var _reactIntl = require("react-intl");
15
+
14
16
  var _styledComponents = _interopRequireDefault(require("styled-components"));
15
17
 
16
18
  var _code = require("@atlaskit/code");
@@ -23,6 +25,10 @@ var _components = require("@atlaskit/theme/components");
23
25
 
24
26
  var _constants = require("@atlaskit/theme/constants");
25
27
 
28
+ var _messages = require("@atlaskit/editor-common/messages");
29
+
30
+ var _useFeatureFlags = require("../../use-feature-flags");
31
+
26
32
  var _codeBlockCopyButton = _interopRequireDefault(require("./codeBlockCopyButton"));
27
33
 
28
34
  var _templateObject;
@@ -31,7 +37,10 @@ function CodeBlock(props) {
31
37
  var text = props.text,
32
38
  language = props.language,
33
39
  _props$allowCopyToCli = props.allowCopyToClipboard,
34
- allowCopyToClipboard = _props$allowCopyToCli === void 0 ? false : _props$allowCopyToCli;
40
+ allowCopyToClipboard = _props$allowCopyToCli === void 0 ? false : _props$allowCopyToCli,
41
+ codeBidiWarningTooltipEnabled = props.codeBidiWarningTooltipEnabled;
42
+ var featureFlags = (0, _useFeatureFlags.useFeatureFlags)();
43
+ var codeBidiWarningLabel = props.intl.formatMessage(_messages.codeBidiWarningMessages.label);
35
44
  var className = ['code-block', props.className].join(' ');
36
45
  return /*#__PURE__*/_react.default.createElement("div", {
37
46
  className: className
@@ -39,11 +48,16 @@ function CodeBlock(props) {
39
48
  content: text
40
49
  }) : null, /*#__PURE__*/_react.default.createElement(_code.CodeBlock, {
41
50
  language: language,
42
- text: text
51
+ text: text,
52
+ codeBidiWarnings: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.codeBidiWarnings,
53
+ codeBidiWarningLabel: codeBidiWarningLabel,
54
+ codeBidiWarningTooltipEnabled: codeBidiWarningTooltipEnabled
43
55
  }));
44
56
  }
45
57
 
46
- var _default = (0, _styledComponents.default)(CodeBlock)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n tab-size: 4;\n [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n }\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _editorSharedStyles.overflowShadow)({
58
+ var IntlCodeBlock = (0, _reactIntl.injectIntl)(CodeBlock);
59
+
60
+ var _default = (0, _styledComponents.default)(IntlCodeBlock)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n tab-size: 4;\n [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n }\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _editorSharedStyles.overflowShadow)({
47
61
  background: (0, _components.themed)({
48
62
  light: _colors.N20,
49
63
  dark: _colors.DN50
@@ -135,8 +135,7 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
135
135
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderAnchorButton", function () {
136
136
  return /*#__PURE__*/_react.default.createElement(CopyAnchorButton, {
137
137
  onMouseLeave: _this.resetMessage,
138
- onClick: _this.copyToClipboard,
139
- "aria-label": _this.state.tooltipMessage
138
+ onClick: _this.copyToClipboard
140
139
  }, /*#__PURE__*/_react.default.createElement(_link.default, {
141
140
  label: "copy",
142
141
  size: _this.props.level > 3 ? 'small' : 'medium',
@@ -55,11 +55,9 @@ function Heading(props) {
55
55
  var showAnchorLink = !!props.showAnchorLink;
56
56
  var isRightAligned = hasRightAlignmentMark(marks);
57
57
  var enableNestedHeaderLinks = allowHeadingAnchorLinks && allowHeadingAnchorLinks.allowNestedHeaderLinks;
58
- return /*#__PURE__*/_react.default.createElement("div", {
59
- className: "heading-wrapper ".concat(HX)
60
- }, /*#__PURE__*/_react.default.createElement(HX, (0, _extends2.default)({
58
+ return /*#__PURE__*/_react.default.createElement(HX, (0, _extends2.default)({
61
59
  id: headingId
62
- }, dataAttributes), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showAnchorLink && isRightAligned ? WrapChildTextInSpan(props.children) : props.children)), showAnchorLink && /*#__PURE__*/_react.default.createElement(_copyTextProvider.CopyTextConsumer, null, function (_ref) {
60
+ }, dataAttributes), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showAnchorLink && isRightAligned ? WrapChildTextInSpan(props.children) : props.children, showAnchorLink && /*#__PURE__*/_react.default.createElement(_copyTextProvider.CopyTextConsumer, null, function (_ref) {
63
61
  var copyTextToClipboard = _ref.copyTextToClipboard;
64
62
  return headingId && /*#__PURE__*/_react.default.createElement(_analyticsContext.default.Consumer, null, function (_ref2) {
65
63
  var fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
@@ -77,7 +75,7 @@ function Heading(props) {
77
75
  }
78
76
  });
79
77
  });
80
- }));
78
+ })));
81
79
  }
82
80
 
83
81
  var _default = Heading;
@@ -162,7 +162,7 @@ Object.defineProperty(exports, "EmbedCard", {
162
162
  return _embedCard.default;
163
163
  }
164
164
  });
165
- exports.TaskItem = exports.Status = exports.Mention = exports.MediaGroup = exports.Media = exports.InlineCard = exports.Expand = exports.Emoji = exports.DecisionItem = exports.Date = exports.CodeBlock = exports.BlockCard = exports.isEmojiDoc = exports.isTextWrapper = exports.isText = exports.mergeTextNodes = exports.toReact = exports.nodeToReact = void 0;
165
+ exports.TaskItem = exports.Status = exports.Mention = exports.MediaInline = exports.MediaGroup = exports.Media = exports.InlineCard = exports.Expand = exports.Emoji = exports.DecisionItem = exports.Date = exports.CodeBlock = exports.BlockCard = exports.isEmojiDoc = exports.isTextWrapper = exports.isText = exports.mergeTextNodes = exports.toReact = exports.nodeToReact = void 0;
166
166
 
167
167
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
168
168
 
@@ -354,6 +354,19 @@ var MediaGroup = (0, _reactLoadable.default)({
354
354
  }
355
355
  });
356
356
  exports.MediaGroup = MediaGroup;
357
+ var MediaInline = (0, _reactLoadable.default)({
358
+ loader: function loader() {
359
+ return Promise.resolve().then(function () {
360
+ return _interopRequireWildcard(require('./mediaInline'));
361
+ }).then(function (mod) {
362
+ return mod.default;
363
+ });
364
+ },
365
+ loading: function loading() {
366
+ return null;
367
+ }
368
+ });
369
+ exports.MediaInline = MediaInline;
357
370
  var Mention = (0, _reactLoadable.default)({
358
371
  loader: function loader() {
359
372
  return Promise.resolve().then(function () {
@@ -402,6 +415,7 @@ var nodeToReact = {
402
415
  listItem: _listItem.default,
403
416
  media: Media,
404
417
  mediaGroup: MediaGroup,
418
+ mediaInline: MediaInline,
405
419
  mediaSingle: _mediaSingle.default,
406
420
  mention: Mention,
407
421
  orderedList: _orderedList.default,
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.default = exports.RenderMediaInline = void 0;
11
+
12
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
13
+
14
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
15
+
16
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
+
18
+ var _react = _interopRequireWildcard(require("react"));
19
+
20
+ var _mediaCard = require("@atlaskit/media-card");
21
+
22
+ var _editorCommon = require("@atlaskit/editor-common");
23
+
24
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
+
26
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
+
28
+ var RenderMediaInline = function RenderMediaInline(props) {
29
+ var mediaProvider = props.mediaProvider;
30
+
31
+ var _useState = (0, _react.useState)({}),
32
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
33
+ viewMediaClientConfigState = _useState2[0],
34
+ setViewMediaClientConfigState = _useState2[1];
35
+
36
+ (0, _react.useEffect)(function () {
37
+ updateViewMediaClientConfigState(mediaProvider);
38
+ }, [mediaProvider]);
39
+
40
+ var updateViewMediaClientConfigState = /*#__PURE__*/function () {
41
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(mediaProvider) {
42
+ var mediaClientConfig;
43
+ return _regenerator.default.wrap(function _callee$(_context) {
44
+ while (1) {
45
+ switch (_context.prev = _context.next) {
46
+ case 0:
47
+ if (!mediaProvider) {
48
+ _context.next = 5;
49
+ break;
50
+ }
51
+
52
+ _context.next = 3;
53
+ return mediaProvider;
54
+
55
+ case 3:
56
+ mediaClientConfig = _context.sent;
57
+ setViewMediaClientConfigState(mediaClientConfig.viewMediaClientConfig);
58
+
59
+ case 5:
60
+ case "end":
61
+ return _context.stop();
62
+ }
63
+ }
64
+ }, _callee);
65
+ }));
66
+
67
+ return function updateViewMediaClientConfigState(_x) {
68
+ return _ref.apply(this, arguments);
69
+ };
70
+ }();
71
+
72
+ return /*#__PURE__*/_react.default.createElement(_mediaCard.MediaInlineCard, {
73
+ identifier: props.identifier,
74
+ shouldOpenMediaViewer: true,
75
+ mediaClientConfig: viewMediaClientConfigState
76
+ });
77
+ };
78
+
79
+ exports.RenderMediaInline = RenderMediaInline;
80
+
81
+ var MediaInline = function MediaInline(props) {
82
+ var collection = props.collection,
83
+ id = props.id,
84
+ providers = props.providers;
85
+ var identifier = {
86
+ id: id,
87
+ mediaItemType: 'file',
88
+ collectionName: collection
89
+ };
90
+ return /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_editorCommon.WithProviders, {
91
+ providers: ['mediaProvider'],
92
+ providerFactory: providers,
93
+ renderNode: function renderNode(providers) {
94
+ var mediaProvider = providers.mediaProvider;
95
+ return /*#__PURE__*/_react.default.createElement(RenderMediaInline, {
96
+ identifier: identifier,
97
+ mediaProvider: mediaProvider
98
+ });
99
+ }
100
+ }));
101
+ };
102
+
103
+ var _default = MediaInline;
104
+ exports.default = _default;
@@ -93,7 +93,7 @@ var Panel = function Panel(props) {
93
93
  var icon = getIcon();
94
94
 
95
95
  if (icon) {
96
- return /*#__PURE__*/_react.default.createElement("span", {
96
+ return /*#__PURE__*/_react.default.createElement("div", {
97
97
  className: _editorCommon.PanelSharedCssClassName.icon
98
98
  }, icon);
99
99
  }
@@ -11,21 +11,20 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _annotations = require("../../ui/annotations");
13
13
 
14
- var TextWrapper = /*#__PURE__*/_react.default.memo(function (props) {
14
+ var TextWrapper = function TextWrapper(props) {
15
15
  var startPos = props.startPos,
16
16
  endPos = props.endPos;
17
- var text = props.text;
17
+ var children = props.children;
18
18
 
19
- if (!text) {
19
+ if (!children) {
20
20
  return null;
21
21
  }
22
22
 
23
23
  return /*#__PURE__*/_react.default.createElement(_annotations.TextWithAnnotationDraft, {
24
- text: text,
25
24
  startPos: startPos,
26
25
  endPos: endPos
27
- });
28
- });
26
+ }, children);
27
+ };
29
28
 
30
29
  var _default = TextWrapper;
31
30
  exports.default = _default;
@@ -223,7 +223,7 @@ var Renderer = /*#__PURE__*/function (_PureComponent) {
223
223
  var nextMedia = nextProps.media || {};
224
224
  var media = this.props.media || {};
225
225
 
226
- 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) {
226
+ 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) {
227
227
  this.serializer = new _.ReactSerializer(this.deriveSerializerProps(nextProps));
228
228
  }
229
229
  }
@@ -65,7 +65,7 @@ var headingSizes = {
65
65
  exports.headingSizes = headingSizes;
66
66
 
67
67
  var headingAnchorStyle = function headingAnchorStyle(headingTag) {
68
- return (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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 "])), _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName, colors.B200);
68
+ return (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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 "])), _headingAnchor.HeadingAnchorWrapperClassName, headingSizes[headingTag].lineHeight, _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName);
69
69
  };
70
70
 
71
71
  var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
@@ -75,7 +75,7 @@ var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
75
75
  return '';
76
76
  }
77
77
 
78
- 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(_headingAnchor.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(_headingAnchor.HeadingAnchorWrapperClassName, " {\n margin: 0 6px 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .").concat(_headingAnchor.HeadingAnchorWrapperClassName, " > button {\n transform: translate(8px, 0);\n }\n }\n }\n ");
78
+ 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(_headingAnchor.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(_headingAnchor.HeadingAnchorWrapperClassName, " {\n margin: 0 6px 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .").concat(_headingAnchor.HeadingAnchorWrapperClassName, " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n }\n ");
79
79
  };
80
80
 
81
81
  var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
@@ -89,7 +89,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
89
89
  var headingsCss = '';
90
90
 
91
91
  if (allowNestedHeaderLinks) {
92
- 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(_headingAnchor.HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n .heading-wrapper {\n margin-right: 30px;\n }\n ");
92
+ 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(_headingAnchor.HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
93
93
  }
94
94
 
95
95
  return "\n .".concat(_consts.RendererCssClassName.SORTABLE_COLUMN, " {\n padding: 0;\n\n .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_BUTTON, " {\n width: 100%;\n height: 100%;\n cursor: pointer;\n padding: ").concat(_editorCommon.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(_consts.RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED, " .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_BUTTON, " {\n cursor: default;\n }\n\n .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_ICON, " {\n margin: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n\n .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, " {\n opacity: 0;\n }\n\n &:hover {\n .").concat(_consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, " {\n opacity: 1;\n }\n }\n }\n ");
@@ -117,10 +117,10 @@ var fullWidthStyles = function fullWidthStyles(_ref4) {
117
117
  }; // prettier-ignore
118
118
 
119
119
 
120
- var Wrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])), _editorSharedStyles.editorFontSize, (0, _components.themed)({
120
+ var Wrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])), _editorSharedStyles.editorFontSize, (0, _components.themed)({
121
121
  light: colors.N800,
122
122
  dark: '#B8C7E0'
123
- }), fullPageStyles, fullWidthStyles, _typography.h700, _typography.h600, _typography.h500, _typography.h400, _typography.h300, _typography.h100, _headingAnchor.HeadingAnchorWrapperClassName, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), colors.B400, colors.B300, colors.placeholderText, _editorCommon.whitespaceSharedStyles, _editorCommon.blockquoteSharedStyles, _editorCommon.headingsSharedStyles, _editorCommon.panelSharedStyles, _editorCommon.ruleSharedStyles, _editorCommon.paragraphSharedStyles, _editorCommon.listsSharedStyles, _editorCommon.indentationSharedStyles, _editorCommon.blockMarksSharedStyles, _editorCommon.codeMarkSharedStyles, _editorCommon.shadowSharedStyle, _editorCommon.dateSharedStyle, _editorCommon.tasksAndDecisionsStyles, _editorCommon.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
123
+ }), fullPageStyles, fullWidthStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), colors.B400, colors.B300, colors.placeholderText, _editorCommon.whitespaceSharedStyles, _editorCommon.blockquoteSharedStyles, _editorCommon.headingsSharedStyles, _editorCommon.panelSharedStyles, _editorCommon.ruleSharedStyles, _editorCommon.paragraphSharedStyles, _editorCommon.listsSharedStyles, _editorCommon.indentationSharedStyles, _editorCommon.blockMarksSharedStyles, _editorCommon.codeMarkSharedStyles, _editorCommon.shadowSharedStyle, _editorCommon.dateSharedStyle, _editorCommon.tasksAndDecisionsStyles, _editorCommon.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
124
124
  light: colors.N30A,
125
125
  dark: colors.DN70
126
126
  }), (0, _constants.borderRadius)(), (0, _components.themed)({
@@ -83,7 +83,7 @@ exports.applyAnnotationOnText = applyAnnotationOnText;
83
83
  var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
84
84
  var startPos = _ref3.startPos,
85
85
  endPos = _ref3.endPos,
86
- text = _ref3.text;
86
+ children = _ref3.children;
87
87
 
88
88
  var textPosition = _react.default.useMemo(function () {
89
89
  return {
@@ -103,21 +103,21 @@ var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
103
103
  }, [nextDraftPosition, textPosition]);
104
104
 
105
105
  if (shouldApplyAnnotationAt === false || !nextDraftPosition) {
106
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, text);
106
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
107
107
  }
108
108
 
109
109
  if (shouldApplyAnnotationAt === _types.InsertDraftPosition.AROUND_TEXT) {
110
110
  return /*#__PURE__*/_react.default.createElement(AnnotationDraft, {
111
111
  key: 0,
112
112
  draftPosition: nextDraftPosition
113
- }, text);
113
+ }, children);
114
114
  }
115
115
 
116
- var offsets = (0, _text.calcTextSplitOffset)(nextDraftPosition, textPosition, text);
117
- var texts = (0, _text.splitText)(text, offsets);
116
+ var offsets = (0, _text.calcTextSplitOffset)(nextDraftPosition, textPosition, children);
117
+ var texts = (0, _text.splitText)(children, offsets);
118
118
 
119
119
  if (!texts) {
120
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, text);
120
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
121
121
  }
122
122
 
123
123
  var components = applyAnnotationOnText({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "81.1.0",
3
+ "version": "82.2.0",
4
4
  "sideEffects": false
5
5
  }