@atlaskit/renderer 92.0.1 → 93.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 (87) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cjs/analytics/enums.js +1 -0
  3. package/dist/cjs/react/marks/alignment.js +11 -12
  4. package/dist/cjs/react/marks/breakout.js +7 -9
  5. package/dist/cjs/react/marks/link.js +13 -6
  6. package/dist/cjs/react/nodes/codeBlock.js +1 -1
  7. package/dist/cjs/react/nodes/codeBlockCopyButton.js +13 -11
  8. package/dist/cjs/react/nodes/embedCard.js +25 -33
  9. package/dist/cjs/react/nodes/heading-anchor.js +7 -6
  10. package/dist/cjs/react/nodes/mediaSingle/index.js +15 -4
  11. package/dist/cjs/react/nodes/mediaSingle/styles.js +7 -10
  12. package/dist/cjs/react/nodes/panel.js +26 -16
  13. package/dist/cjs/react/nodes/table/sticky.js +51 -54
  14. package/dist/cjs/react/nodes/table.js +2 -10
  15. package/dist/cjs/react/utils/performance/RenderTracking.js +52 -0
  16. package/dist/cjs/ui/Expand.js +40 -20
  17. package/dist/cjs/ui/MediaCard.js +4 -14
  18. package/dist/cjs/ui/Renderer/index.js +37 -48
  19. package/dist/cjs/ui/Renderer/style.js +58 -63
  20. package/dist/cjs/ui/Renderer/truncated-wrapper.js +19 -21
  21. package/dist/cjs/ui/SortingIcon.js +8 -9
  22. package/dist/cjs/ui/renderer-props.js +1 -3
  23. package/dist/cjs/version.json +1 -1
  24. package/dist/es2019/analytics/enums.js +1 -0
  25. package/dist/es2019/react/marks/alignment.js +15 -7
  26. package/dist/es2019/react/marks/breakout.js +6 -5
  27. package/dist/es2019/react/marks/link.js +8 -5
  28. package/dist/es2019/react/nodes/codeBlock.js +1 -1
  29. package/dist/es2019/react/nodes/codeBlockCopyButton.js +12 -9
  30. package/dist/es2019/react/nodes/embedCard.js +16 -16
  31. package/dist/es2019/react/nodes/heading-anchor.js +9 -6
  32. package/dist/es2019/react/nodes/mediaSingle/index.js +10 -6
  33. package/dist/es2019/react/nodes/mediaSingle/styles.js +6 -7
  34. package/dist/es2019/react/nodes/panel.js +23 -16
  35. package/dist/es2019/react/nodes/table/sticky.js +48 -41
  36. package/dist/es2019/react/nodes/table.js +2 -5
  37. package/dist/es2019/react/utils/performance/RenderTracking.js +37 -0
  38. package/dist/es2019/ui/Expand.js +52 -28
  39. package/dist/es2019/ui/MediaCard.js +3 -6
  40. package/dist/es2019/ui/Renderer/index.js +37 -42
  41. package/dist/es2019/ui/Renderer/style.js +363 -336
  42. package/dist/es2019/ui/Renderer/truncated-wrapper.js +26 -15
  43. package/dist/es2019/ui/SortingIcon.js +9 -7
  44. package/dist/es2019/ui/renderer-props.js +1 -1
  45. package/dist/es2019/version.json +1 -1
  46. package/dist/esm/analytics/enums.js +1 -0
  47. package/dist/esm/react/marks/alignment.js +13 -6
  48. package/dist/esm/react/marks/breakout.js +6 -5
  49. package/dist/esm/react/marks/link.js +7 -5
  50. package/dist/esm/react/nodes/codeBlock.js +1 -1
  51. package/dist/esm/react/nodes/codeBlockCopyButton.js +10 -7
  52. package/dist/esm/react/nodes/embedCard.js +19 -19
  53. package/dist/esm/react/nodes/heading-anchor.js +8 -6
  54. package/dist/esm/react/nodes/mediaSingle/index.js +11 -6
  55. package/dist/esm/react/nodes/mediaSingle/styles.js +5 -7
  56. package/dist/esm/react/nodes/panel.js +27 -15
  57. package/dist/esm/react/nodes/table/sticky.js +53 -52
  58. package/dist/esm/react/nodes/table.js +2 -8
  59. package/dist/esm/react/utils/performance/RenderTracking.js +39 -0
  60. package/dist/esm/ui/Expand.js +45 -21
  61. package/dist/esm/ui/MediaCard.js +3 -9
  62. package/dist/esm/ui/Renderer/index.js +38 -46
  63. package/dist/esm/ui/Renderer/style.js +55 -56
  64. package/dist/esm/ui/Renderer/truncated-wrapper.js +20 -14
  65. package/dist/esm/ui/SortingIcon.js +9 -7
  66. package/dist/esm/ui/renderer-props.js +1 -1
  67. package/dist/esm/version.json +1 -1
  68. package/dist/types/analytics/enums.d.ts +1 -0
  69. package/dist/types/analytics/events.d.ts +7 -2
  70. package/dist/types/react/marks/alignment.d.ts +2 -2
  71. package/dist/types/react/marks/breakout.d.ts +4 -3
  72. package/dist/types/react/marks/link.d.ts +2 -2
  73. package/dist/types/react/nodes/embedCard.d.ts +3 -2
  74. package/dist/types/react/nodes/heading-anchor.d.ts +1 -0
  75. package/dist/types/react/nodes/mediaSingle/index.d.ts +1 -0
  76. package/dist/types/react/nodes/mediaSingle/styles.d.ts +2 -3
  77. package/dist/types/react/nodes/panel.d.ts +3 -1
  78. package/dist/types/react/nodes/table/sticky.d.ts +4 -2
  79. package/dist/types/react/utils/performance/RenderTracking.d.ts +15 -0
  80. package/dist/types/ui/Expand.d.ts +2 -2
  81. package/dist/types/ui/MediaCard.d.ts +1 -3
  82. package/dist/types/ui/Renderer/index.d.ts +0 -25
  83. package/dist/types/ui/Renderer/style.d.ts +1 -4
  84. package/dist/types/ui/Renderer/truncated-wrapper.d.ts +3 -1
  85. package/dist/types/ui/SortingIcon.d.ts +3 -3
  86. package/dist/types/ui/renderer-props.d.ts +14 -2
  87. package/package.json +17 -19
@@ -7,12 +7,10 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.rendererStyles = exports.headingSizes = exports.FullPagePadding = exports.DeprecatedWrapper = void 0;
10
+ exports.rendererStyles = exports.headingSizes = exports.FullPagePadding = void 0;
11
11
 
12
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
13
 
14
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
15
-
16
14
  var _react = require("@emotion/react");
17
15
 
18
16
  var _components = require("@atlaskit/theme/components");
@@ -33,7 +31,7 @@ var _consts = require("../../consts");
33
31
 
34
32
  var _headingAnchor = require("../../react/nodes/heading-anchor");
35
33
 
36
- var _templateObject, _templateObject2, _templateObject3;
34
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
37
35
 
38
36
  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); }
39
37
 
@@ -69,7 +67,7 @@ var headingSizes = {
69
67
  exports.headingSizes = headingSizes;
70
68
 
71
69
  var headingAnchorStyle = function headingAnchorStyle(headingTag) {
72
- 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);
70
+ return (0, _react.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);
73
71
  };
74
72
 
75
73
  var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
@@ -79,7 +77,7 @@ var alignedHeadingAnchorStyle = function alignedHeadingAnchorStyle(_ref) {
79
77
  return '';
80
78
  }
81
79
 
82
- 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 ");
80
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n 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,\n h2,\n h3,\n h4,\n h5,\n 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(.", "):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 .", " {\n margin: 0 6px 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "], ["\n .fabric-editor-block-mark[data-align] > {\n h1,\n h2,\n h3,\n h4,\n h5,\n 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,\n h2,\n h3,\n h4,\n h5,\n 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(.", "):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 .", " {\n margin: 0 6px 0 0;\n }\n\n @media (hover: hover) and (pointer: fine) {\n .", " > button {\n transform: translate(8px, 0px);\n }\n }\n }\n "])), _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName, _headingAnchor.HeadingAnchorWrapperClassName);
83
81
  };
84
82
 
85
83
  var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
@@ -96,77 +94,74 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
96
94
  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 ");
97
95
  }
98
96
 
99
- 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(_styles.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 ");
97
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n cursor: pointer;\n padding: ", "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: ", ";\n }\n }\n\n ", "\n }\n\n &.", "\n .", " {\n cursor: default;\n }\n\n .", " {\n margin: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n\n .", " {\n opacity: 0;\n }\n\n &:hover {\n .", " {\n opacity: 1;\n }\n }\n }\n "])), _consts.RendererCssClassName.SORTABLE_COLUMN, _consts.RendererCssClassName.SORTABLE_COLUMN_BUTTON, _styles.tableCellPadding, colors.B300, headingsCss, _consts.RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED, _consts.RendererCssClassName.SORTABLE_COLUMN_BUTTON, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER);
100
98
  };
101
99
 
102
- var fullPageStyles = function fullPageStyles(_ref3) {
103
- var theme = _ref3.theme,
104
- appearance = _ref3.appearance;
100
+ var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
101
+ var appearance = _ref3.appearance;
102
+ var theme = _ref4.theme;
105
103
 
106
104
  if (appearance !== 'full-page' && appearance !== 'mobile') {
107
105
  return '';
108
106
  }
109
107
 
110
- return "\n max-width: ".concat(theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', ";\n margin: 0 auto;\n padding: 0 ").concat(appearance === 'full-page' ? FullPagePadding : 0, "px;\n ");
108
+ return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", ";\n margin: 0 auto;\n padding: 0 ", "px;\n "])), theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', appearance === 'full-page' ? FullPagePadding : 0);
111
109
  };
112
110
 
113
- var fullWidthStyles = function fullWidthStyles(_ref4) {
114
- var appearance = _ref4.appearance;
111
+ var fullWidthStyles = function fullWidthStyles(_ref5) {
112
+ var appearance = _ref5.appearance;
115
113
 
116
114
  if (appearance !== 'full-width') {
117
115
  return '';
118
116
  }
119
117
 
120
- return "\n max-width: ".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .pm-table-container,\n .ak-renderer-extension {\n width: 100% !important;\n }\n ");
118
+ return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-width: ", "px;\n margin: 0 auto;\n\n .fabric-editor-breakout-mark,\n .pm-table-container,\n .ak-renderer-extension {\n width: 100% !important;\n }\n "])), _editorSharedStyles.akEditorFullWidthLayoutWidth);
121
119
  };
122
120
 
123
- var rendererStyles = function rendererStyles(theme) {
124
- // This is required to be compatible with styled-components prop structure.
125
- var props = {
126
- theme: theme
121
+ var rendererStyles = function rendererStyles(wrapperProps) {
122
+ return function (theme) {
123
+ // This is required to be compatible with styled-components prop structure.
124
+ var themeProps = {
125
+ theme: theme
126
+ };
127
+ return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\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\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\n + .", ":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\n + .rich-media-wrapped\n + *: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 /* plugin styles */\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 .", " {\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 .", " .", " {\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,\n &.", "::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,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\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 ", ";\n border-bottom: 1px solid\n ", ";\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,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 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 .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 "])), (0, _editorSharedStyles.editorFontSize)(themeProps), (0, _components.themed)({
128
+ light: colors.N800,
129
+ dark: '#B8C7E0'
130
+ })(themeProps), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), colors.B400, colors.B300, colors.placeholderText(themeProps), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(themeProps), (0, _styles.panelSharedStyles)(themeProps), (0, _styles.ruleSharedStyles)(themeProps), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(themeProps), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
131
+ light: colors.N30A,
132
+ dark: colors.DN70
133
+ })(themeProps), (0, _constants.borderRadius)(), (0, _components.themed)({
134
+ light: colors.N800,
135
+ dark: colors.DN600
136
+ })(themeProps), colors.R50, colors.R500, (0, _constants.gridSize)() * 3, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), _styles.mediaSingleSharedStyle, _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, _consts.RendererCssClassName.EXTENSION, _consts.RendererCssClassName.DOCUMENT, _consts.RendererCssClassName.EXTENSION, _editorSharedStyles.blockNodesVerticalMargin, _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, (0, _styles.tableSharedStyle)(themeProps), _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, _styles.tableMarginTop - 1, _styles.tableMarginTop, _editorSharedStyles.akEditorStickyHeaderZIndex, tableSortableColumnStyle(wrapperProps), _consts.RendererCssClassName.NUMBER_COLUMN, (0, _components.themed)({
137
+ light: _editorSharedStyles.akEditorTableToolbar,
138
+ dark: _editorSharedStyles.akEditorTableToolbarDark
139
+ })(themeProps), (0, _components.themed)({
140
+ light: _editorSharedStyles.akEditorTableBorder,
141
+ dark: _editorSharedStyles.akEditorTableBorderDark
142
+ })(themeProps), _editorSharedStyles.akEditorTableNumberColumnWidth, (0, _components.themed)({
143
+ light: colors.N200,
144
+ dark: colors.DN400
145
+ })(themeProps), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), _consts.RendererCssClassName.NUMBER_COLUMN, _editorSharedStyles.akEditorStickyHeaderZIndex, (0, _components.themed)({
146
+ light: _editorSharedStyles.akEditorTableBorder,
147
+ dark: _editorSharedStyles.akEditorTableBorderDark
148
+ })(themeProps), (0, _components.themed)({
149
+ light: _editorSharedStyles.akEditorTableBorder,
150
+ dark: _editorSharedStyles.akEditorTableBorderDark
151
+ })(themeProps), _editorSharedStyles.akEditorStickyHeaderZIndex, (0, _components.themed)({
152
+ light: _editorSharedStyles.akEditorTableBorder,
153
+ dark: _editorSharedStyles.akEditorTableBorderDark
154
+ })(themeProps), (0, _components.themed)({
155
+ light: _editorSharedStyles.akEditorTableBorder,
156
+ dark: _editorSharedStyles.akEditorTableBorderDark
157
+ })(themeProps), (0, _components.themed)({
158
+ light: _editorSharedStyles.akEditorTableToolbar,
159
+ dark: _editorSharedStyles.akEditorTableToolbarDark
160
+ })(themeProps), (0, _components.themed)({
161
+ light: _editorSharedStyles.akEditorTableToolbar,
162
+ dark: _editorSharedStyles.akEditorTableToolbarDark
163
+ })(themeProps), (0, _constants.borderRadius)(), _editorSharedStyles.blockNodesVerticalMargin, _styles.columnLayoutSharedStyle, (0, _constants.gridSize)() * 2.5, (0, _constants.gridSize)() * 4, _editorSharedStyles.gridMediumMaxWidth);
127
164
  };
128
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n\n ", ";\n ", ";\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n /* plugin styles*/\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n ", ";\n "])), (0, _styles.tableSharedStyle)(props), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(props), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(props), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, _styles.mediaSingleSharedStyle, _styles.columnLayoutSharedStyle);
129
- }; // prettier-ignore
130
-
131
-
132
- exports.rendererStyles = rendererStyles;
133
-
134
- var DeprecatedWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (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 & .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\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 & [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)({
135
- light: colors.N800,
136
- dark: '#B8C7E0'
137
- }), fullPageStyles, fullWidthStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), colors.B400, colors.B300, colors.placeholderText, _styles.panelSharedStyles, _styles.ruleSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), (0, _components.themed)({
138
- light: colors.N30A,
139
- dark: colors.DN70
140
- }), (0, _constants.borderRadius)(), (0, _components.themed)({
141
- light: colors.N800,
142
- dark: colors.DN600
143
- }), colors.R50, colors.R500, (0, _constants.gridSize)() * 3, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, alignedHeadingAnchorStyle, _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, _consts.RendererCssClassName.EXTENSION, _consts.RendererCssClassName.EXTENSION, _editorSharedStyles.blockNodesVerticalMargin, _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, _styles.TableSharedCssClassName.TABLE_CONTAINER, _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, _styles.tableMarginTop - 1, _styles.tableMarginTop, _editorSharedStyles.akEditorStickyHeaderZIndex, tableSortableColumnStyle, _consts.RendererCssClassName.NUMBER_COLUMN, (0, _components.themed)({
144
- light: _editorSharedStyles.akEditorTableToolbar,
145
- dark: _editorSharedStyles.akEditorTableToolbarDark
146
- }), (0, _components.themed)({
147
- light: _editorSharedStyles.akEditorTableBorder,
148
- dark: _editorSharedStyles.akEditorTableBorderDark
149
- }), _editorSharedStyles.akEditorTableNumberColumnWidth, (0, _components.themed)({
150
- light: colors.N200,
151
- dark: colors.DN400
152
- }), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), _consts.RendererCssClassName.NUMBER_COLUMN, _editorSharedStyles.akEditorStickyHeaderZIndex, (0, _components.themed)({
153
- light: _editorSharedStyles.akEditorTableBorder,
154
- dark: _editorSharedStyles.akEditorTableBorderDark
155
- }), (0, _components.themed)({
156
- light: _editorSharedStyles.akEditorTableBorder,
157
- dark: _editorSharedStyles.akEditorTableBorderDark
158
- }), _editorSharedStyles.akEditorStickyHeaderZIndex, (0, _components.themed)({
159
- light: _editorSharedStyles.akEditorTableBorder,
160
- dark: _editorSharedStyles.akEditorTableBorderDark
161
- }), (0, _components.themed)({
162
- light: _editorSharedStyles.akEditorTableBorder,
163
- dark: _editorSharedStyles.akEditorTableBorderDark
164
- }), (0, _components.themed)({
165
- light: _editorSharedStyles.akEditorTableToolbar,
166
- dark: _editorSharedStyles.akEditorTableToolbarDark
167
- }), (0, _components.themed)({
168
- light: _editorSharedStyles.akEditorTableToolbar,
169
- dark: _editorSharedStyles.akEditorTableToolbarDark
170
- }), (0, _constants.borderRadius)(), _editorSharedStyles.blockNodesVerticalMargin, (0, _constants.gridSize)() * 2.5, (0, _constants.gridSize)() * 4, _editorSharedStyles.gridMediumMaxWidth);
171
-
172
- exports.DeprecatedWrapper = DeprecatedWrapper;
165
+ };
166
+
167
+ exports.rendererStyles = rendererStyles;
@@ -2,8 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
@@ -21,31 +19,31 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
21
19
 
22
20
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
23
21
 
24
- var _react = _interopRequireWildcard(require("react"));
22
+ var _react = require("@emotion/react");
25
23
 
26
- var _styledComponents = _interopRequireDefault(require("styled-components"));
24
+ var _react2 = require("react");
27
25
 
28
26
  var _templateObject;
29
27
 
30
- 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); }
31
-
32
- 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; }
33
-
34
28
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
35
29
 
36
30
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
31
 
38
- var FadeOut = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow-y: hidden;\n max-height: ", "px;\n &::after {\n content: '';\n position: absolute;\n top: ", "px;\n bottom: 0;\n left: 0;\n right: 0;\n /* Using 'rgba(255, 255, 255, 0)' because 'transparent' breaks the gradient in Safari 11 */\n background-image: ", ";\n }\n"])), function (_ref) {
39
- var height = _ref.height;
40
- return height;
41
- }, function (_ref2) {
42
- var height = _ref2.height,
43
- fadeHeight = _ref2.fadeHeight;
44
- return height - fadeHeight;
45
- }, function (_ref3) {
46
- var backgroundColor = _ref3.backgroundColor;
47
- return "linear-gradient(rgba(255, 255, 255, 0), ".concat(backgroundColor, ")");
48
- });
32
+ var fadeOutStyles = function fadeOutStyles(maxHeight, top, backgroundColor) {
33
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow-y: hidden;\n max-height: ", "px;\n &::after {\n content: '';\n position: absolute;\n top: ", "px;\n bottom: 0;\n left: 0;\n right: 0;\n background-image: linear-gradient(\n rgba(255, 255, 255, 0),\n ", "\n );\n }\n"])), maxHeight, top, backgroundColor);
34
+ };
35
+
36
+ var FadeOut = function FadeOut(props) {
37
+ var children = props.children,
38
+ backgroundColor = props.backgroundColor,
39
+ fadeHeight = props.fadeHeight,
40
+ height = props.height;
41
+ var top = height - fadeHeight;
42
+ var styles = fadeOutStyles(height, top, backgroundColor);
43
+ return (0, _react.jsx)("div", {
44
+ css: styles
45
+ }, children);
46
+ };
49
47
 
50
48
  var TruncatedWrapper = /*#__PURE__*/function (_Component) {
51
49
  (0, _inherits2.default)(TruncatedWrapper, _Component);
@@ -68,7 +66,7 @@ var TruncatedWrapper = /*#__PURE__*/function (_Component) {
68
66
  _this$props$backgroun = _this$props.backgroundColor,
69
67
  backgroundColor = _this$props$backgroun === void 0 ? 'white' : _this$props$backgroun,
70
68
  children = _this$props.children;
71
- return /*#__PURE__*/_react.default.createElement(FadeOut, {
69
+ return (0, _react.jsx)(FadeOut, {
72
70
  height: height,
73
71
  fadeHeight: fadeHeight,
74
72
  backgroundColor: backgroundColor
@@ -76,6 +74,6 @@ var TruncatedWrapper = /*#__PURE__*/function (_Component) {
76
74
  }
77
75
  }]);
78
76
  return TruncatedWrapper;
79
- }(_react.Component);
77
+ }(_react2.Component);
80
78
 
81
79
  exports.TruncatedWrapper = TruncatedWrapper;
@@ -9,9 +9,7 @@ exports.default = exports.TableSortIconDataUrl = exports.StatusClassNames = void
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
11
 
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
12
+ var _react = require("@emotion/react");
15
13
 
16
14
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
17
15
 
@@ -43,9 +41,8 @@ exports.StatusClassNames = StatusClassNames;
43
41
  StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
44
42
  })(StatusClassNames || (exports.StatusClassNames = StatusClassNames = {}));
45
43
 
46
- var Wrapper = _styledComponents.default.figure(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _constants.gridSize)() / 2, _colors.N20, _colors.N30, StatusClassNames.SORTING_NOT_ALLOWED);
47
-
48
- var TableSortingIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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);
44
+ var wrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _constants.gridSize)() / 2, _colors.N20, _colors.N30, StatusClassNames.SORTING_NOT_ALLOWED);
45
+ var tableSortingIconStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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);
49
46
 
50
47
  var getClassName = function getClassName(status) {
51
48
  switch (status) {
@@ -91,13 +88,15 @@ var SortingIcon = function SortingIcon(_ref) {
91
88
  var activated = sortOrdered !== _types.SortOrder.NO_ORDER;
92
89
  var wrapperClassName = !isSortingAllowed ? StatusClassNames.SORTING_NOT_ALLOWED : '';
93
90
  var content = getTooltipTitle(intl, isSortingAllowed, sortOrdered);
94
- return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
91
+ return (0, _react.jsx)(_tooltip.default, {
95
92
  delay: 0,
96
93
  content: content,
97
94
  position: "top"
98
- }, /*#__PURE__*/_react.default.createElement(Wrapper, {
95
+ }, (0, _react.jsx)("figure", {
96
+ css: wrapperStyles,
99
97
  className: wrapperClassName
100
- }, /*#__PURE__*/_react.default.createElement(TableSortingIcon, {
98
+ }, (0, _react.jsx)("div", {
99
+ css: tableSortingIconStyles,
101
100
  className: "".concat(getClassName(sortOrdered), " ").concat(TABLE_SORTING_ICON_CLASS, "-").concat(activated ? 'active' : 'inactive')
102
101
  })));
103
102
  };
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
3
+ var _enums = require("../analytics/enums");
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "92.0.1",
3
+ "version": "93.0.0",
4
4
  "sideEffects": false
5
5
  }
@@ -12,6 +12,7 @@ export let ACTION;
12
12
  (function (ACTION) {
13
13
  ACTION["STARTED"] = "started";
14
14
  ACTION["RENDERED"] = "rendered";
15
+ ACTION["RE_RENDERED"] = "reRendered";
15
16
  ACTION["RENDERER_TTI"] = "tti";
16
17
  ACTION["CRASHED"] = "unhandledErrorCaught";
17
18
  ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
@@ -1,13 +1,21 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+
3
+ /** @jsx jsx */
1
4
  import React from 'react';
2
- import styled, { css } from 'styled-components';
5
+ import { css, jsx } from '@emotion/react';
3
6
  import { alignmentPositionMap } from '@atlaskit/adf-schema';
4
- const MarkWrapper = styled.div`
5
- ${props => props['data-align'] && css`
6
- text-align: ${alignmentPositionMap[props['data-align']]};
7
- `};
8
- `;
7
+
8
+ const MarkWrapper = props => {
9
+ const styles = props['data-align'] ? css`
10
+ text-align: ${alignmentPositionMap[props['data-align']]};
11
+ ` : '';
12
+ return jsx("div", _extends({
13
+ css: styles
14
+ }, props), props.children);
15
+ };
16
+
9
17
  export default function Alignment(props) {
10
- return /*#__PURE__*/React.createElement(MarkWrapper, {
18
+ return jsx(MarkWrapper, {
11
19
  className: "fabric-editor-block-mark",
12
20
  "data-align": props.align
13
21
  }, props.children);
@@ -1,17 +1,18 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { WidthConsumer } from '@atlaskit/editor-common/ui';
4
4
  import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
5
5
  import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
6
- export const Wrapper = styled.div`
6
+ export const wrapperStyles = css`
7
7
  margin: ${blockNodesVerticalMargin} 0;
8
8
  margin-left: 50%;
9
9
  transform: translateX(-50%);
10
10
  `;
11
11
  export default function Breakout(props) {
12
- return /*#__PURE__*/React.createElement(WidthConsumer, null, ({
12
+ return jsx(WidthConsumer, null, ({
13
13
  width
14
- }) => /*#__PURE__*/React.createElement(Wrapper, {
14
+ }) => jsx("div", {
15
+ css: wrapperStyles,
15
16
  "data-mode": props.mode,
16
17
  style: {
17
18
  width: calcBreakoutWidth(props.mode, width)
@@ -1,11 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
2
+
3
+ /** @jsx jsx */
4
+ import React, { Fragment } from 'react';
5
+ import { css, jsx } from '@emotion/react';
3
6
  import { B400, B300 } from '@atlaskit/theme/colors';
4
- import styled from 'styled-components';
5
7
  import { getEventHandler } from '../../utils';
6
8
  import { PLATFORM, MODE } from '../../analytics/events';
7
9
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics/enums';
8
- const StyledAnchor = styled.a`
10
+ const anchorStyles = css`
9
11
  color: ${B400};
10
12
 
11
13
  &:hover {
@@ -35,10 +37,11 @@ export default function Link(props) {
35
37
  const handler = getEventHandler(eventHandlers, 'link');
36
38
 
37
39
  if (isMediaLink) {
38
- return /*#__PURE__*/React.createElement(React.Fragment, null, props.children);
40
+ return jsx(Fragment, null, props.children);
39
41
  }
40
42
 
41
- return /*#__PURE__*/React.createElement(StyledAnchor, _extends({
43
+ return jsx("a", _extends({
44
+ css: anchorStyles,
42
45
  onClick: e => {
43
46
  if (fireAnalyticsEvent) {
44
47
  fireAnalyticsEvent({
@@ -24,7 +24,7 @@ const codeBlockStyle = props => css`
24
24
  })};
25
25
  background-attachment: local, scroll, scroll;
26
26
  background-position: 100% 0, 100% 0, 0 0;
27
-
27
+ }
28
28
  `;
29
29
 
30
30
  function CodeBlock(props) {
@@ -1,13 +1,14 @@
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
1
3
  import React, { useState } from 'react';
2
4
  import { injectIntl } from 'react-intl-next';
3
- import styled from 'styled-components';
4
5
  import Tooltip from '@atlaskit/tooltip';
5
6
  import Button from '@atlaskit/button/custom-theme-button';
6
7
  import CopyIcon from '@atlaskit/icon/glyph/copy';
7
8
  import { N20, N30, N700 } from '@atlaskit/theme/colors';
8
9
  import { CopyTextConsumer } from './copy-text-provider';
9
10
  import { codeBlockCopyButtonMessages } from '../../messages';
10
- const CopyButtonWrapper = styled.span`
11
+ const copyButtonWrapperStyles = css`
11
12
  display: flex;
12
13
  position: sticky;
13
14
  justify-content: flex-end;
@@ -24,7 +25,7 @@ const CopyButtonWrapper = styled.span`
24
25
  padding: 2px;
25
26
  opacity: 0;
26
27
  transition: opacity 0.2s ease 0s;
27
- border: 2px solid #ffffff;
28
+ border: 2px solid #fff;
28
29
  border-radius: 4px;
29
30
  background-color: ${N20};
30
31
  color: rgb(66, 82, 110);
@@ -36,7 +37,7 @@ const CopyButtonWrapper = styled.span`
36
37
 
37
38
  button.clicked {
38
39
  background-color: ${N700};
39
- color: #ffffff !important;
40
+ color: #fff !important;
40
41
  }
41
42
  `;
42
43
 
@@ -52,22 +53,24 @@ const CopyButton = ({
52
53
  setClassName('copy-to-clipboard');
53
54
  };
54
55
 
55
- return /*#__PURE__*/React.createElement(CopyTextConsumer, null, ({
56
+ return jsx(CopyTextConsumer, null, ({
56
57
  copyTextToClipboard
57
58
  }) => {
58
- return /*#__PURE__*/React.createElement(CopyButtonWrapper, null, /*#__PURE__*/React.createElement(Tooltip, {
59
+ return jsx("span", {
60
+ css: copyButtonWrapperStyles
61
+ }, jsx(Tooltip, {
59
62
  content: tooltip,
60
63
  hideTooltipOnClick: false,
61
64
  position: "top"
62
- }, /*#__PURE__*/React.createElement("div", {
65
+ }, jsx("div", {
63
66
  onMouseLeave: onMouseLeave
64
- }, /*#__PURE__*/React.createElement(Button, {
67
+ }, jsx(Button, {
65
68
  className: className,
66
69
  "aria-label": tooltip,
67
70
  spacing: "compact",
68
71
  appearance: "subtle",
69
72
  "aria-haspopup": true,
70
- iconBefore: /*#__PURE__*/React.createElement(CopyIcon, {
73
+ iconBefore: jsx(CopyIcon, {
71
74
  label: tooltip
72
75
  }),
73
76
  onClick: () => {
@@ -1,14 +1,16 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useMemo, useContext, useState, useRef } from 'react';
2
+
3
+ /** @jsx jsx */
4
+ import { css, jsx } from '@emotion/react';
5
+ import { useMemo, useContext, useState, useRef } from 'react';
3
6
  import { Card, Context as CardContext, EmbedResizeMessageListener } from '@atlaskit/smart-card';
4
7
  import { WidthConsumer, mapBreakpointToLayoutMaxWidth, UnsupportedBlock, MediaSingle as UIMediaSingle } from '@atlaskit/editor-common/ui';
5
8
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH, getAkEditorFullPageMaxWidth } from '@atlaskit/editor-shared-styles';
6
9
  import { getPlatform } from '../../utils';
7
10
  import { CardErrorBoundary } from './fallback';
8
- import styled from 'styled-components';
9
11
  import { FullPagePadding } from '../../ui/Renderer/style';
10
12
  import { getCardClickHandler } from '../utils/getCardClickHandler';
11
- const EmbedCardWrapper = styled.div`
13
+ const embedCardWrapperStyles = css`
12
14
  width: 100%;
13
15
  height: 100%;
14
16
 
@@ -22,16 +24,10 @@ const EmbedCardWrapper = styled.div`
22
24
 
23
25
  margin: 0 auto;
24
26
  `;
25
- EmbedCardWrapper.displayName = 'EmbedCardWrapper';
26
- const ExtendedEmbedCard = styled(UIMediaSingle)`
27
- ${({
28
- layout
29
- }) => layout === 'full-width' || layout === 'wide' ? `
27
+ const uIMediaSingleLayoutStyles = css`
30
28
  margin-left: 50%;
31
29
  transform: translateX(-50%);
32
- ` : ``}
33
30
  `;
34
- ExtendedEmbedCard.displayName = 'ExtendedEmbedCard';
35
31
  export default function EmbedCard(props) {
36
32
  const {
37
33
  url,
@@ -97,7 +93,7 @@ export default function EmbedCard(props) {
97
93
  setAspectRatio(resolvedAspectRatio);
98
94
  };
99
95
 
100
- return /*#__PURE__*/React.createElement(WidthConsumer, null, ({
96
+ return jsx(WidthConsumer, null, ({
101
97
  width: containerWidth,
102
98
  breakpoint
103
99
  }) => {
@@ -117,12 +113,14 @@ export default function EmbedCard(props) {
117
113
  }
118
114
 
119
115
  const lineLength = isFullWidth ? Math.min(akEditorFullWidthLayoutWidth, containerWidth - padding) : nonFullWidthSize;
120
- return /*#__PURE__*/React.createElement(CardErrorBoundary, _extends({
116
+ const uiMediaSingleStyles = layout === 'full-width' || layout === 'wide' ? uIMediaSingleLayoutStyles : '';
117
+ return jsx(CardErrorBoundary, _extends({
121
118
  unsupportedComponent: UnsupportedBlock
122
- }, cardProps), /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
119
+ }, cardProps), jsx(EmbedResizeMessageListener, {
123
120
  embedIframeRef: embedIframeRef,
124
121
  onHeightUpdate: setLiveHeight
125
- }, /*#__PURE__*/React.createElement(ExtendedEmbedCard, {
122
+ }, jsx(UIMediaSingle, {
123
+ css: uiMediaSingleStyles,
126
124
  layout: layout,
127
125
  width: originalWidth,
128
126
  containerWidth: containerWidth,
@@ -132,7 +130,9 @@ export default function EmbedCard(props) {
132
130
  nodeType: "embedCard",
133
131
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
134
132
  hasFallbackContainer: hasPreview
135
- }, /*#__PURE__*/React.createElement(EmbedCardWrapper, null, /*#__PURE__*/React.createElement("div", {
133
+ }, jsx("div", {
134
+ css: embedCardWrapperStyles
135
+ }, jsx("div", {
136
136
  className: "embedCardView-content-wrap",
137
137
  "data-embed-card": true,
138
138
  "data-layout": layout,
@@ -140,7 +140,7 @@ export default function EmbedCard(props) {
140
140
  "data-card-data": data ? JSON.stringify(data) : undefined,
141
141
  "data-card-url": url,
142
142
  "data-card-original-height": originalHeight
143
- }, /*#__PURE__*/React.createElement(Card, _extends({
143
+ }, jsx(Card, _extends({
144
144
  appearance: "embed"
145
145
  }, cardProps, {
146
146
  onResolve: onResolve,