@atlaskit/renderer 103.0.0 → 103.0.1

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 (42) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/consts.js +2 -2
  3. package/dist/cjs/messages.js +1 -1
  4. package/dist/cjs/react/nodes/panel.js +19 -10
  5. package/dist/cjs/react/nodes/tableCell.js +8 -26
  6. package/dist/cjs/ui/ExtensionRenderer.js +9 -2
  7. package/dist/cjs/ui/Renderer/index.js +1 -1
  8. package/dist/cjs/ui/Renderer/style.js +5 -3
  9. package/dist/cjs/ui/SortingIcon.js +55 -28
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/consts.js +2 -2
  12. package/dist/es2019/messages.js +1 -1
  13. package/dist/es2019/react/nodes/panel.js +16 -6
  14. package/dist/es2019/react/nodes/tableCell.js +8 -27
  15. package/dist/es2019/ui/ExtensionRenderer.js +7 -2
  16. package/dist/es2019/ui/Renderer/index.js +1 -1
  17. package/dist/es2019/ui/Renderer/style.js +37 -16
  18. package/dist/es2019/ui/SortingIcon.js +89 -32
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/consts.js +2 -2
  21. package/dist/esm/messages.js +1 -1
  22. package/dist/esm/react/nodes/panel.js +18 -10
  23. package/dist/esm/react/nodes/tableCell.js +8 -26
  24. package/dist/esm/ui/ExtensionRenderer.js +9 -2
  25. package/dist/esm/ui/Renderer/index.js +1 -1
  26. package/dist/esm/ui/Renderer/style.js +5 -4
  27. package/dist/esm/ui/SortingIcon.js +55 -27
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/consts.d.ts +2 -2
  30. package/dist/types/react/nodes/bodiedExtension.d.ts +2 -1
  31. package/dist/types/react/nodes/extension.d.ts +2 -1
  32. package/dist/types/react/nodes/inlineExtension.d.ts +2 -0
  33. package/dist/types/ui/ExtensionRenderer.d.ts +2 -0
  34. package/dist/types/ui/SortingIcon.d.ts +4 -1
  35. package/dist/types-ts4.0/consts.d.ts +2 -2
  36. package/dist/types-ts4.0/react/nodes/bodiedExtension.d.ts +2 -1
  37. package/dist/types-ts4.0/react/nodes/extension.d.ts +2 -1
  38. package/dist/types-ts4.0/react/nodes/inlineExtension.d.ts +2 -0
  39. package/dist/types-ts4.0/ui/ExtensionRenderer.d.ts +2 -0
  40. package/dist/types-ts4.0/ui/SortingIcon.d.ts +4 -1
  41. package/package.json +18 -14
  42. package/report.api.md +359 -255
@@ -4,8 +4,9 @@ import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/co
4
4
  import * as colors from '@atlaskit/theme/colors';
5
5
  import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
6
6
  import { token } from '@atlaskit/tokens';
7
- import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles } from '@atlaskit/editor-common/styles';
7
+ import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
8
8
  import { shadowClassNames } from '@atlaskit/editor-common/ui';
9
+ import { browser } from '@atlaskit/editor-common/utils';
9
10
  import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
10
11
  import { RendererCssClassName } from '../../consts';
11
12
  import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
@@ -187,13 +188,12 @@ const tableSortableColumnStyle = ({
187
188
  }
188
189
 
189
190
  return css`
190
- .${RendererCssClassName.SORTABLE_COLUMN} {
191
+ .${RendererCssClassName.SORTABLE_COLUMN_WRAPPER} {
191
192
  padding: 0;
192
193
 
193
- .${RendererCssClassName.SORTABLE_COLUMN_BUTTON} {
194
+ .${RendererCssClassName.SORTABLE_COLUMN} {
194
195
  width: 100%;
195
196
  height: 100%;
196
- cursor: pointer;
197
197
  padding: ${tableCellPadding}px;
198
198
  border-width: 1.5px;
199
199
  border-style: solid;
@@ -203,11 +203,13 @@ const tableSortableColumnStyle = ({
203
203
  margin-top: 0;
204
204
  }
205
205
 
206
- > .ProseMirror-gapcursor.-right:first-of-type + * {
206
+ > .ProseMirror-gapcursor:first-child + *,
207
+ > style:first-child + .ProseMirror-gapcursor + * {
207
208
  margin-top: 0;
208
209
  }
209
210
 
210
- > .ProseMirror-gapcursor:first-of-type + span + * {
211
+ > .ProseMirror-gapcursor:first-child + span + *,
212
+ > style:first-child + .ProseMirror-gapcursor + span + * {
211
213
  margin-top: 0;
212
214
  }
213
215
 
@@ -223,24 +225,28 @@ const tableSortableColumnStyle = ({
223
225
  ${headingsCss}
224
226
  }
225
227
 
226
- &.${RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED}
227
- .${RendererCssClassName.SORTABLE_COLUMN_BUTTON} {
228
- cursor: default;
229
- }
230
-
231
- .${RendererCssClassName.SORTABLE_COLUMN_ICON} {
228
+ .${RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER} {
232
229
  margin: 0;
233
- opacity: 1;
234
- transition: opacity 0.2s ease-in-out;
230
+ .${RendererCssClassName.SORTABLE_COLUMN_ICON} {
231
+ opacity: 1;
232
+ transition: opacity 0.2s ease-in-out;
233
+ }
235
234
  }
236
235
 
237
236
  .${RendererCssClassName.SORTABLE_COLUMN_NO_ORDER} {
238
- opacity: 0;
237
+ .${RendererCssClassName.SORTABLE_COLUMN_ICON} {
238
+ opacity: 0;
239
+ &:focus {
240
+ opacity: 1;
241
+ }
242
+ }
239
243
  }
240
244
 
241
245
  &:hover {
242
246
  .${RendererCssClassName.SORTABLE_COLUMN_NO_ORDER} {
243
- opacity: 1;
247
+ .${RendererCssClassName.SORTABLE_COLUMN_ICON} {
248
+ opacity: 1;
249
+ }
244
250
  }
245
251
  }
246
252
  }
@@ -677,5 +683,20 @@ export const rendererStyles = wrapperProps => theme => {
677
683
  }
678
684
  }
679
685
  }
686
+
687
+ & li {
688
+ > .code-block {
689
+ margin: ${blockNodesVerticalMargin} 0 0 0;
690
+ }
691
+ > .code-block:first-child {
692
+ margin-top: 0;
693
+ }
694
+
695
+ > div:last-of-type.code-block {
696
+ margin-bottom: ${blockNodesVerticalMargin};
697
+ }
698
+
699
+ ${browser.safari ? codeBlockInListSafariFix : ''}
700
+ }
680
701
  `;
681
702
  };
@@ -6,14 +6,9 @@ import { N20, N30 } from '@atlaskit/theme/colors';
6
6
  import { SortOrder } from '@atlaskit/editor-common/types';
7
7
  import { sortingIconMessages } from '../messages';
8
8
  import { injectIntl } from 'react-intl-next';
9
- import { token } from '@atlaskit/tokens'; // We use data url here because of this issue:
10
- // https://product-fabric.atlassian.net/browse/ED-8001
11
- // Remove this workaround if Firefox has fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
12
- // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4136
13
-
14
- export const TableSortIconDataUrl = `data:image/svg+xml;utf8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M-8-6h24v24H-8z"></path><path d="M3 8.509V1c0-.552.449-1 1-1 .552 0 1 .448 1 1V8.51l1.217-1.206a1.05 1.05 0 011.477 0 1.03 1.03 0 01.004 1.463l-.003.002-2.956 2.93a1.053 1.053 0 01-1.478 0L.305 8.767a1.03 1.03 0 01.001-1.464 1.05 1.05 0 011.477 0L3 8.508z" fill="#42526E"></path></g></svg>`)}`;
15
- const TABLE_SORTING_ICON_CLASS = 'table-sorting-icon';
16
- export let StatusClassNames; // TODO: get design to check border
9
+ import { token } from '@atlaskit/tokens';
10
+ import { RendererCssClassName } from '../consts';
11
+ export let StatusClassNames;
17
12
 
18
13
  (function (StatusClassNames) {
19
14
  StatusClassNames["ASC"] = "sorting-icon-svg__asc";
@@ -22,7 +17,7 @@ export let StatusClassNames; // TODO: get design to check border
22
17
  StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
23
18
  })(StatusClassNames || (StatusClassNames = {}));
24
19
 
25
- const wrapperStyles = css`
20
+ const buttonStyles = css`
26
21
  position: absolute;
27
22
  display: flex;
28
23
  height: 28px;
@@ -30,50 +25,90 @@ const wrapperStyles = css`
30
25
  margin: 6px;
31
26
  right: 0;
32
27
  top: 0;
33
- border: 2px solid ${token('color.border.inverse', '#fff')};
28
+ border: 2px solid ${token('color.border', '#fff')};
34
29
  border-radius: ${gridSize() / 2}px;
35
- background-color: ${token('color.background.neutral.subtle', N20)};
30
+ background-color: ${token('elevation.surface.overlay', N20)};
36
31
  justify-content: center;
37
32
  align-items: center;
33
+ cursor: pointer;
38
34
 
39
35
  &:hover {
40
- background-color: ${token('color.background.neutral.subtle.hovered', N30)};
36
+ background-color: ${token('elevation.surface.overlay.hovered', N30)};
37
+ }
38
+
39
+ &:active {
40
+ background-color: ${token('elevation.surface.overlay.pressed', 'rgba(179, 212, 255, 0.6)')};
41
41
  }
42
42
 
43
- &.${StatusClassNames.SORTING_NOT_ALLOWED} {
43
+ &.${RendererCssClassName.SORTABLE_COLUMN_ICON}__not-allowed {
44
44
  cursor: not-allowed;
45
45
  }
46
46
  `;
47
- const tableSortingIconStyles = css`
47
+ const iconWrapperStyles = css`
48
48
  width: 8px;
49
49
  height: 12px;
50
50
  transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);
51
51
  transform-origin: 50% 50%;
52
- background-image: url(${TableSortIconDataUrl});
52
+ display: flex;
53
+ justify-content: center;
53
54
 
54
55
  &.${StatusClassNames.DESC} {
55
56
  transform: rotate(-180deg);
56
57
  }
57
58
 
58
- &.${TABLE_SORTING_ICON_CLASS}-inactive {
59
+ &.${RendererCssClassName.SORTABLE_COLUMN_ICON}-inactive {
59
60
  opacity: 0.7;
60
61
  }
62
+ `; // The icon is created with CSS due to the following Firefox issue: https://product-fabric.atlassian.net/browse/ED-8001
63
+ // The TL;DR is that svg's in tables mess up how HTML is copied in Firefox. Using a styled div instead solves the problem.
64
+ // For this reason, svg's should be avoided in tables until this issue is fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
65
+
66
+ const iconStyles = css`
67
+ height: 100%;
68
+ width: 2px;
69
+ border-radius: 50px;
70
+ background: ${token('color.icon', '#42526E')};
71
+
72
+ &::before,
73
+ &::after {
74
+ background: ${token('color.icon', '#42526E')};
75
+ content: '';
76
+ height: 2px;
77
+ width: 6px;
78
+ position: absolute;
79
+ border-radius: 50px;
80
+ }
81
+
82
+ &::before {
83
+ transform: rotate(45deg) translate(3.4px, 8.5px);
84
+ }
85
+
86
+ &::after {
87
+ transform: rotate(-45deg) translate(-6.3px, 5.7px);
88
+ }
61
89
  `;
62
90
 
63
- const getClassName = status => {
64
- switch (status) {
91
+ const getIconClassName = (isSortingAllowed, sortOrdered) => {
92
+ const activated = sortOrdered !== SortOrder.NO_ORDER;
93
+ const activeStatusClass = `${RendererCssClassName.SORTABLE_COLUMN_ICON}-${activated ? 'active' : 'inactive'}`;
94
+
95
+ if (!isSortingAllowed) {
96
+ return `${StatusClassNames.SORTING_NOT_ALLOWED} ${activeStatusClass}`;
97
+ }
98
+
99
+ switch (sortOrdered) {
65
100
  case SortOrder.ASC:
66
- return StatusClassNames.ASC;
101
+ return `${StatusClassNames.ASC} ${activeStatusClass}`;
67
102
 
68
103
  case SortOrder.DESC:
69
- return StatusClassNames.DESC;
104
+ return `${StatusClassNames.DESC} ${activeStatusClass}`;
70
105
 
71
106
  default:
72
- return StatusClassNames.NO_ORDER;
107
+ return `${StatusClassNames.NO_ORDER} ${activeStatusClass}`;
73
108
  }
74
109
  };
75
110
 
76
- const getTooltipTitle = (intl, isSortingAllowed, status) => {
111
+ const getTooltipTitle = (intl, isSortingAllowed, sortOrdered) => {
77
112
  const {
78
113
  noOrderLabel,
79
114
  ascOrderLabel,
@@ -85,7 +120,7 @@ const getTooltipTitle = (intl, isSortingAllowed, status) => {
85
120
  return intl.formatMessage(invalidLabel);
86
121
  }
87
122
 
88
- switch (status) {
123
+ switch (sortOrdered) {
89
124
  case SortOrder.NO_ORDER:
90
125
  return intl.formatMessage(noOrderLabel);
91
126
 
@@ -102,22 +137,44 @@ const getTooltipTitle = (intl, isSortingAllowed, status) => {
102
137
  const SortingIcon = ({
103
138
  isSortingAllowed,
104
139
  sortOrdered,
105
- intl
140
+ intl,
141
+ onClick,
142
+ onKeyDown
106
143
  }) => {
107
- const activated = sortOrdered !== SortOrder.NO_ORDER;
108
- const wrapperClassName = !isSortingAllowed ? StatusClassNames.SORTING_NOT_ALLOWED : '';
144
+ const buttonClassName = `${RendererCssClassName.SORTABLE_COLUMN_ICON}${isSortingAllowed ? '' : ` ${RendererCssClassName.SORTABLE_COLUMN_ICON}__not-allowed`}`;
109
145
  const content = getTooltipTitle(intl, isSortingAllowed, sortOrdered);
146
+
147
+ const handleClick = () => {
148
+ if (isSortingAllowed) {
149
+ onClick();
150
+ }
151
+ };
152
+
153
+ const handleKeyDown = event => {
154
+ if (isSortingAllowed) {
155
+ onKeyDown(event);
156
+ }
157
+ };
158
+
110
159
  return jsx(Tooltip, {
111
160
  delay: 0,
112
161
  content: content,
113
162
  position: "top"
114
- }, jsx("figure", {
115
- css: wrapperStyles,
116
- className: wrapperClassName
117
163
  }, jsx("div", {
118
- css: tableSortingIconStyles,
119
- className: `${getClassName(sortOrdered)} ${TABLE_SORTING_ICON_CLASS}-${activated ? 'active' : 'inactive'}`
120
- })));
164
+ css: buttonStyles,
165
+ className: buttonClassName,
166
+ role: "button",
167
+ tabIndex: isSortingAllowed ? 0 : -1,
168
+ "aria-label": "sort column",
169
+ "aria-disabled": !isSortingAllowed,
170
+ onClick: handleClick,
171
+ onKeyDown: handleKeyDown
172
+ }, jsx("div", {
173
+ css: iconWrapperStyles,
174
+ className: getIconClassName(isSortingAllowed, sortOrdered)
175
+ }, jsx("div", {
176
+ css: iconStyles
177
+ }))));
121
178
  };
122
179
 
123
180
  export default injectIntl(SortingIcon);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "103.0.0",
3
+ "version": "103.0.1",
4
4
  "sideEffects": false
5
5
  }
@@ -5,9 +5,9 @@ export var RendererCssClassName = {
5
5
  EXTENSION_CENTER_ALIGN: "".concat(clPrefix, "extension-center-align"),
6
6
  EXTENSION_OVERFLOW_CONTAINER: "".concat(clPrefix, "extension-overflow-container"),
7
7
  NUMBER_COLUMN: "".concat(clPrefix, "table-number-column"),
8
+ SORTABLE_COLUMN_WRAPPER: "".concat(clPrefix, "tableHeader-sortable-column__wrapper"),
8
9
  SORTABLE_COLUMN: "".concat(clPrefix, "tableHeader-sortable-column"),
9
- SORTABLE_COLUMN_BUTTON: "".concat(clPrefix, "tableHeader-sortable-column__button"),
10
- SORTABLE_COLUMN_NOT_ALLOWED: "".concat(clPrefix, "tableHeader-sortable-column__not-allowed"),
10
+ SORTABLE_COLUMN_ICON_WRAPPER: "".concat(clPrefix, "tableHeader-sorting-icon__wrapper"),
11
11
  SORTABLE_COLUMN_ICON: "".concat(clPrefix, "tableHeader-sorting-icon"),
12
12
  SORTABLE_COLUMN_NO_ORDER: "".concat(clPrefix, "tableHeader-sorting-icon__no-order")
13
13
  };
@@ -56,7 +56,7 @@ export var sortingIconMessages = defineMessages({
56
56
  },
57
57
  invalidLabel: {
58
58
  id: 'fabric.editor.headingLink.invalidLabel',
59
- defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cell",
59
+ defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cells",
60
60
  description: 'this sort is invalid for merged cells'
61
61
  }
62
62
  });
@@ -1,8 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
4
 
4
5
  var _templateObject, _templateObject2;
5
6
 
7
+ var _excluded = ["backgroundColor", "hasIcon"];
8
+
6
9
  /** @jsx jsx */
7
10
  import React from 'react';
8
11
  import { css, jsx } from '@emotion/react';
@@ -16,24 +19,28 @@ import EmojiItem from './emoji'; // AFP-2532 TODO: Fix automatic suppressions be
16
19
  import { themed } from '@atlaskit/theme';
17
20
  import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, PanelErrorIcon } from '@atlaskit/editor-common/icons';
18
21
 
19
- var PanelStyled = function PanelStyled(props) {
22
+ var PanelStyled = function PanelStyled(_ref) {
23
+ var backgroundColor = _ref.backgroundColor,
24
+ hasIcon = _ref.hasIcon,
25
+ props = _objectWithoutProperties(_ref, _excluded);
26
+
20
27
  var styles = function styles(theme) {
21
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
28
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
22
29
  theme: theme
23
- }));
30
+ }), PanelType.CUSTOM, hasIcon ? '' : 'padding: 12px;');
24
31
  };
25
32
 
26
- if (props['data-panel-type'] === PanelType.CUSTOM && props.backgroundColor) {
33
+ if (props['data-panel-type'] === PanelType.CUSTOM && backgroundColor) {
27
34
  styles = function styles(theme) {
28
35
  var customStyle = themed({
29
36
  dark: getPanelBackgroundDarkModeColors,
30
- light: "background-color: ".concat(props.backgroundColor, ";")
37
+ light: "background-color: ".concat(backgroundColor, ";")
31
38
  })({
32
39
  theme: theme
33
40
  });
34
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
41
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
35
42
  theme: theme
36
- }), PanelType.CUSTOM, customStyle);
43
+ }), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding: 12px;');
37
44
  };
38
45
  }
39
46
 
@@ -86,9 +93,9 @@ var Panel = function Panel(props) {
86
93
  });
87
94
  };
88
95
 
89
- var renderIcon = function renderIcon() {
90
- var icon = getIcon();
96
+ var icon = getIcon();
91
97
 
98
+ var renderIcon = function renderIcon() {
92
99
  if (icon) {
93
100
  return jsx("div", {
94
101
  className: PanelSharedCssClassName.icon
@@ -103,7 +110,8 @@ var Panel = function Panel(props) {
103
110
  "data-panel-icon": panelIcon,
104
111
  "data-panel-icon-id": panelIconId,
105
112
  "data-panel-icon-text": panelIconText,
106
- backgroundColor: panelColor
113
+ backgroundColor: panelColor,
114
+ hasIcon: Boolean(icon)
107
115
  }, renderIcon(), jsx("div", {
108
116
  className: PanelSharedCssClassName.content
109
117
  }, children));
@@ -152,19 +152,11 @@ export var withSortableColumn = function withSortableColumn(WrapperComponent) {
152
152
  if (keys.includes(event.key) && !IgnoreSorting.includes(tagName)) {
153
153
  event.preventDefault();
154
154
 
155
- _this.onClick(event);
155
+ _this.sort();
156
156
  }
157
157
  });
158
158
 
159
- _defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
160
- // ignore sorting when specific elements are clicked
161
- var _ref2 = event.target,
162
- tagName = _ref2.tagName;
163
-
164
- if (IgnoreSorting.includes(tagName)) {
165
- return;
166
- }
167
-
159
+ _defineProperty(_assertThisInitialized(_this), "sort", function () {
168
160
  var _this$props2 = _this.props,
169
161
  fireAnalyticsEvent = _this$props2.fireAnalyticsEvent,
170
162
  onSorting = _this$props2.onSorting,
@@ -217,28 +209,18 @@ export var withSortableColumn = function withSortableColumn(WrapperComponent) {
217
209
  return /*#__PURE__*/React.createElement(WrapperComponent, this.props);
218
210
  }
219
211
 
220
- var className = RendererCssClassName.SORTABLE_COLUMN;
221
-
222
- if (!onSorting) {
223
- className = "".concat(className, " ").concat(RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED);
224
- }
225
-
226
212
  return /*#__PURE__*/React.createElement(WrapperComponent, _extends({}, this.props, {
227
- className: className,
213
+ className: RendererCssClassName.SORTABLE_COLUMN_WRAPPER,
228
214
  ariaSort: getSortOrderLabel(intl, sortOrdered)
229
215
  }), /*#__PURE__*/React.createElement("div", {
230
- className: RendererCssClassName.SORTABLE_COLUMN_BUTTON,
231
- role: "button",
232
- tabIndex: onSorting ? 0 : -1,
233
- onClick: this.onClick,
234
- onKeyDown: this.onKeyPress,
235
- "aria-disabled": !onSorting
216
+ className: RendererCssClassName.SORTABLE_COLUMN
236
217
  }, children, /*#__PURE__*/React.createElement("figure", {
237
- "aria-hidden": true,
238
- className: "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON, " ").concat(sortOrderedClassName)
218
+ className: "".concat(RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, " ").concat(sortOrderedClassName)
239
219
  }, /*#__PURE__*/React.createElement(SortingIcon, {
240
220
  isSortingAllowed: !!onSorting,
241
- sortOrdered: sortOrdered
221
+ sortOrdered: sortOrdered,
222
+ onClick: this.sort,
223
+ onKeyDown: this.onKeyPress
242
224
  }))));
243
225
  }
244
226
  }]);
@@ -49,6 +49,8 @@ var ExtensionRenderer = /*#__PURE__*/function (_React$Component) {
49
49
  _defineProperty(_assertThisInitialized(_this), "getNodeRenderer", memoizeOne(getNodeRenderer));
50
50
 
51
51
  _defineProperty(_assertThisInitialized(_this), "renderExtensionNode", function (extensionProvider) {
52
+ var _marks$find, _marks$find$attrs;
53
+
52
54
  var _this$props = _this.props,
53
55
  extensionHandlers = _this$props.extensionHandlers,
54
56
  rendererContext = _this$props.rendererContext,
@@ -58,14 +60,19 @@ var ExtensionRenderer = /*#__PURE__*/function (_React$Component) {
58
60
  content = _this$props.content,
59
61
  text = _this$props.text,
60
62
  type = _this$props.type,
61
- localId = _this$props.localId;
63
+ localId = _this$props.localId,
64
+ marks = _this$props.marks;
65
+ var fragmentLocalId = marks === null || marks === void 0 ? void 0 : (_marks$find = marks.find(function (m) {
66
+ return m.type.name === 'fragment';
67
+ })) === null || _marks$find === void 0 ? void 0 : (_marks$find$attrs = _marks$find.attrs) === null || _marks$find$attrs === void 0 ? void 0 : _marks$find$attrs.localId;
62
68
  var node = {
63
69
  type: type,
64
70
  extensionKey: extensionKey,
65
71
  extensionType: extensionType,
66
72
  parameters: parameters,
67
73
  content: content || text,
68
- localId: localId
74
+ localId: localId,
75
+ fragmentLocalId: fragmentLocalId
69
76
  };
70
77
  var result = null;
71
78
 
@@ -50,7 +50,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
50
50
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
51
51
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
52
52
  var packageName = "@atlaskit/renderer";
53
- var packageVersion = "103.0.0";
53
+ var packageVersion = "103.0.1";
54
54
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
55
55
  _inherits(Renderer, _PureComponent);
56
56
 
@@ -8,8 +8,9 @@ import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/co
8
8
  import * as colors from '@atlaskit/theme/colors';
9
9
  import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
10
10
  import { token } from '@atlaskit/tokens';
11
- import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles } from '@atlaskit/editor-common/styles';
11
+ import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles, codeBlockInListSafariFix } from '@atlaskit/editor-common/styles';
12
12
  import { shadowClassNames } from '@atlaskit/editor-common/ui';
13
+ import { browser } from '@atlaskit/editor-common/utils';
13
14
  import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
14
15
  import { RendererCssClassName } from '../../consts';
15
16
  import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
@@ -70,7 +71,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
70
71
  headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
71
72
  }
72
73
 
73
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\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-of-type + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-of-type + 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 "])), RendererCssClassName.SORTABLE_COLUMN, RendererCssClassName.SORTABLE_COLUMN_BUTTON, tableCellPadding, token('color.border.focused', colors.B300), headingsCss, RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED, RendererCssClassName.SORTABLE_COLUMN_BUTTON, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER);
74
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\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:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + 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 margin: 0;\n .", " {\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n }\n\n .", " {\n .", " {\n opacity: 0;\n &:focus {\n opacity: 1;\n }\n }\n }\n\n &:hover {\n .", " {\n .", " {\n opacity: 1;\n }\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, tableCellPadding, token('color.border.focused', colors.B300), headingsCss, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_ICON);
74
75
  };
75
76
 
76
77
  var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
@@ -100,7 +101,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
100
101
  var themeProps = {
101
102
  theme: theme
102
103
  };
103
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\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 &:active {\n color: ", ";\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\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 display: flex;\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 .", ",\n &\n .", " {\n height: calc(100% - ", "px);\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-of-type {\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\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n "])), editorFontSize(themeProps), themed({
104
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\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 &:active {\n color: ", ";\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\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 display: flex;\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 .", ",\n &\n .", " {\n height: calc(100% - ", "px);\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-of-type {\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\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\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n\n ", "\n }\n "])), editorFontSize(themeProps), themed({
104
105
  light: token('color.text', colors.N800),
105
106
  dark: token('color.text', '#B8C7E0')
106
107
  })(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), token('color.link', colors.B400), token('color.link', colors.B300), token('color.link.pressed', colors.B500), colors.placeholderText(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
@@ -136,6 +137,6 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
136
137
  })(themeProps), themed({
137
138
  light: token('color.border', akEditorTableToolbar),
138
139
  dark: token('color.border', akEditorTableToolbarDark)
139
- })(themeProps), borderRadius(), blockNodesVerticalMargin, getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, gridSize() * 2.5, gridSize() * 4, gridMediumMaxWidth);
140
+ })(themeProps), borderRadius(), blockNodesVerticalMargin, getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, gridSize() * 2.5, gridSize() * 4, gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, browser.safari ? codeBlockInListSafariFix : '');
140
141
  };
141
142
  };