@atlaskit/renderer 103.0.0 → 103.0.2

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 (230) hide show
  1. package/CHANGELOG.md +27 -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 +308 -287
  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/package.json +19 -23
  36. package/report.api.md +359 -255
  37. package/dist/types-ts4.0/actions/index.d.ts +0 -61
  38. package/dist/types-ts4.0/actions/matches-utils.d.ts +0 -7
  39. package/dist/types-ts4.0/actions.d.ts +0 -3
  40. package/dist/types-ts4.0/analytics/analyticsContext.d.ts +0 -6
  41. package/dist/types-ts4.0/analytics/enums.d.ts +0 -56
  42. package/dist/types-ts4.0/analytics/events.d.ts +0 -110
  43. package/dist/types-ts4.0/analytics/unsupported-content.d.ts +0 -10
  44. package/dist/types-ts4.0/consts.d.ts +0 -12
  45. package/dist/types-ts4.0/i18n/cs.d.ts +0 -20
  46. package/dist/types-ts4.0/i18n/da.d.ts +0 -20
  47. package/dist/types-ts4.0/i18n/de.d.ts +0 -20
  48. package/dist/types-ts4.0/i18n/en.d.ts +0 -20
  49. package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -20
  50. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -20
  51. package/dist/types-ts4.0/i18n/es.d.ts +0 -20
  52. package/dist/types-ts4.0/i18n/et.d.ts +0 -8
  53. package/dist/types-ts4.0/i18n/fi.d.ts +0 -20
  54. package/dist/types-ts4.0/i18n/fr.d.ts +0 -20
  55. package/dist/types-ts4.0/i18n/hu.d.ts +0 -20
  56. package/dist/types-ts4.0/i18n/index.d.ts +0 -31
  57. package/dist/types-ts4.0/i18n/it.d.ts +0 -20
  58. package/dist/types-ts4.0/i18n/ja.d.ts +0 -20
  59. package/dist/types-ts4.0/i18n/ko.d.ts +0 -20
  60. package/dist/types-ts4.0/i18n/nb.d.ts +0 -20
  61. package/dist/types-ts4.0/i18n/nl.d.ts +0 -20
  62. package/dist/types-ts4.0/i18n/pl.d.ts +0 -20
  63. package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -20
  64. package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
  65. package/dist/types-ts4.0/i18n/ru.d.ts +0 -20
  66. package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
  67. package/dist/types-ts4.0/i18n/sv.d.ts +0 -20
  68. package/dist/types-ts4.0/i18n/th.d.ts +0 -20
  69. package/dist/types-ts4.0/i18n/tr.d.ts +0 -20
  70. package/dist/types-ts4.0/i18n/uk.d.ts +0 -20
  71. package/dist/types-ts4.0/i18n/vi.d.ts +0 -20
  72. package/dist/types-ts4.0/i18n/zh.d.ts +0 -20
  73. package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -20
  74. package/dist/types-ts4.0/index.d.ts +0 -11
  75. package/dist/types-ts4.0/messages.d.ts +0 -61
  76. package/dist/types-ts4.0/react/hooks/use-bidi-warnings.d.ts +0 -10
  77. package/dist/types-ts4.0/react/hooks/use-in-viewport.d.ts +0 -5
  78. package/dist/types-ts4.0/react/hooks/use-observed-width.d.ts +0 -3
  79. package/dist/types-ts4.0/react/index.d.ts +0 -118
  80. package/dist/types-ts4.0/react/marks/alignment.d.ts +0 -4
  81. package/dist/types-ts4.0/react/marks/annotation.d.ts +0 -6
  82. package/dist/types-ts4.0/react/marks/breakout.d.ts +0 -6
  83. package/dist/types-ts4.0/react/marks/code.d.ts +0 -16
  84. package/dist/types-ts4.0/react/marks/confluence-inline-comment.d.ts +0 -8
  85. package/dist/types-ts4.0/react/marks/data-consumer.d.ts +0 -4
  86. package/dist/types-ts4.0/react/marks/em.d.ts +0 -3
  87. package/dist/types-ts4.0/react/marks/fragment.d.ts +0 -4
  88. package/dist/types-ts4.0/react/marks/indentation.d.ts +0 -4
  89. package/dist/types-ts4.0/react/marks/index.d.ts +0 -21
  90. package/dist/types-ts4.0/react/marks/link.d.ts +0 -9
  91. package/dist/types-ts4.0/react/marks/strike.d.ts +0 -3
  92. package/dist/types-ts4.0/react/marks/strong.d.ts +0 -3
  93. package/dist/types-ts4.0/react/marks/subsup.d.ts +0 -4
  94. package/dist/types-ts4.0/react/marks/textColor.d.ts +0 -4
  95. package/dist/types-ts4.0/react/marks/underline.d.ts +0 -3
  96. package/dist/types-ts4.0/react/marks/unsupportedMark.d.ts +0 -3
  97. package/dist/types-ts4.0/react/marks/unsupportedNodeAttribute.d.ts +0 -3
  98. package/dist/types-ts4.0/react/nodes/blockCard.d.ts +0 -10
  99. package/dist/types-ts4.0/react/nodes/blockquote.d.ts +0 -2
  100. package/dist/types-ts4.0/react/nodes/bodiedExtension.d.ts +0 -23
  101. package/dist/types-ts4.0/react/nodes/bulletList.d.ts +0 -5
  102. package/dist/types-ts4.0/react/nodes/caption.d.ts +0 -4
  103. package/dist/types-ts4.0/react/nodes/codeBlock/codeBlock.d.ts +0 -14
  104. package/dist/types-ts4.0/react/nodes/codeBlock/components/codeBlockContainer.d.ts +0 -12
  105. package/dist/types-ts4.0/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +0 -9
  106. package/dist/types-ts4.0/react/nodes/codeBlock/windowedCodeBlock.d.ts +0 -4
  107. package/dist/types-ts4.0/react/nodes/codeBlockCopyButton.d.ts +0 -9
  108. package/dist/types-ts4.0/react/nodes/date.d.ts +0 -11
  109. package/dist/types-ts4.0/react/nodes/decisionItem.d.ts +0 -3
  110. package/dist/types-ts4.0/react/nodes/decisionList.d.ts +0 -7
  111. package/dist/types-ts4.0/react/nodes/doc.d.ts +0 -3
  112. package/dist/types-ts4.0/react/nodes/embedCard.d.ts +0 -17
  113. package/dist/types-ts4.0/react/nodes/emoji.d.ts +0 -10
  114. package/dist/types-ts4.0/react/nodes/extension.d.ts +0 -112
  115. package/dist/types-ts4.0/react/nodes/fallback.d.ts +0 -16
  116. package/dist/types-ts4.0/react/nodes/hardBreak.d.ts +0 -6
  117. package/dist/types-ts4.0/react/nodes/heading-anchor.d.ts +0 -14
  118. package/dist/types-ts4.0/react/nodes/heading.d.ts +0 -14
  119. package/dist/types-ts4.0/react/nodes/index.d.ts +0 -94
  120. package/dist/types-ts4.0/react/nodes/inline.d.ts +0 -1
  121. package/dist/types-ts4.0/react/nodes/inlineCard.d.ts +0 -65
  122. package/dist/types-ts4.0/react/nodes/inlineExtension.d.ts +0 -16
  123. package/dist/types-ts4.0/react/nodes/layoutColumn.d.ts +0 -6
  124. package/dist/types-ts4.0/react/nodes/layoutSection.d.ts +0 -2
  125. package/dist/types-ts4.0/react/nodes/listItem.d.ts +0 -2
  126. package/dist/types-ts4.0/react/nodes/media.d.ts +0 -27
  127. package/dist/types-ts4.0/react/nodes/mediaGroup.d.ts +0 -29
  128. package/dist/types-ts4.0/react/nodes/mediaInline.d.ts +0 -20
  129. package/dist/types-ts4.0/react/nodes/mediaSingle/index.d.ts +0 -23
  130. package/dist/types-ts4.0/react/nodes/mediaSingle/styles.d.ts +0 -2
  131. package/dist/types-ts4.0/react/nodes/mention.d.ts +0 -13
  132. package/dist/types-ts4.0/react/nodes/orderedList.d.ts +0 -6
  133. package/dist/types-ts4.0/react/nodes/panel.d.ts +0 -17
  134. package/dist/types-ts4.0/react/nodes/paragraph.d.ts +0 -3
  135. package/dist/types-ts4.0/react/nodes/placeholder.d.ts +0 -6
  136. package/dist/types-ts4.0/react/nodes/rule.d.ts +0 -2
  137. package/dist/types-ts4.0/react/nodes/status.d.ts +0 -10
  138. package/dist/types-ts4.0/react/nodes/table/colgroup.d.ts +0 -3
  139. package/dist/types-ts4.0/react/nodes/table/sticky.d.ts +0 -38
  140. package/dist/types-ts4.0/react/nodes/table/table.d.ts +0 -7
  141. package/dist/types-ts4.0/react/nodes/table/types.d.ts +0 -7
  142. package/dist/types-ts4.0/react/nodes/table.d.ts +0 -269
  143. package/dist/types-ts4.0/react/nodes/tableCell.d.ts +0 -81
  144. package/dist/types-ts4.0/react/nodes/tableRow.d.ts +0 -24
  145. package/dist/types-ts4.0/react/nodes/task-item-with-providers.d.ts +0 -29
  146. package/dist/types-ts4.0/react/nodes/taskItem.d.ts +0 -19
  147. package/dist/types-ts4.0/react/nodes/taskList.d.ts +0 -8
  148. package/dist/types-ts4.0/react/nodes/text-wrapper.d.ts +0 -8
  149. package/dist/types-ts4.0/react/nodes/unknownBlock.d.ts +0 -2
  150. package/dist/types-ts4.0/react/renderer-node.d.ts +0 -4
  151. package/dist/types-ts4.0/react/types.d.ts +0 -57
  152. package/dist/types-ts4.0/react/utils/clipboard.d.ts +0 -1
  153. package/dist/types-ts4.0/react/utils/element-selection.d.ts +0 -9
  154. package/dist/types-ts4.0/react/utils/getCardClickHandler.d.ts +0 -2
  155. package/dist/types-ts4.0/react/utils/inject-props.d.ts +0 -6
  156. package/dist/types-ts4.0/react/utils/links.d.ts +0 -3
  157. package/dist/types-ts4.0/react/utils/lists.d.ts +0 -2
  158. package/dist/types-ts4.0/react/utils/performance/RenderTracking.d.ts +0 -15
  159. package/dist/types-ts4.0/react/utils/use-select-all-trap.d.ts +0 -2
  160. package/dist/types-ts4.0/render-document.d.ts +0 -23
  161. package/dist/types-ts4.0/renderer-context.d.ts +0 -9
  162. package/dist/types-ts4.0/serializer.d.ts +0 -4
  163. package/dist/types-ts4.0/steps/index.d.ts +0 -14
  164. package/dist/types-ts4.0/text/index.d.ts +0 -8
  165. package/dist/types-ts4.0/text/nodes/blockquote.d.ts +0 -3
  166. package/dist/types-ts4.0/text/nodes/bulletList.d.ts +0 -3
  167. package/dist/types-ts4.0/text/nodes/date.d.ts +0 -3
  168. package/dist/types-ts4.0/text/nodes/decisionItem.d.ts +0 -3
  169. package/dist/types-ts4.0/text/nodes/hardBreak.d.ts +0 -3
  170. package/dist/types-ts4.0/text/nodes/heading.d.ts +0 -3
  171. package/dist/types-ts4.0/text/nodes/index.d.ts +0 -6
  172. package/dist/types-ts4.0/text/nodes/inlineCard.d.ts +0 -3
  173. package/dist/types-ts4.0/text/nodes/listItem.d.ts +0 -3
  174. package/dist/types-ts4.0/text/nodes/mediaGroup.d.ts +0 -3
  175. package/dist/types-ts4.0/text/nodes/mention.d.ts +0 -3
  176. package/dist/types-ts4.0/text/nodes/orderedList.d.ts +0 -3
  177. package/dist/types-ts4.0/text/nodes/panel.d.ts +0 -3
  178. package/dist/types-ts4.0/text/nodes/paragraph.d.ts +0 -3
  179. package/dist/types-ts4.0/text/nodes/rule.d.ts +0 -3
  180. package/dist/types-ts4.0/text/nodes/status.d.ts +0 -3
  181. package/dist/types-ts4.0/text/nodes/table.d.ts +0 -3
  182. package/dist/types-ts4.0/text/nodes/taskItem.d.ts +0 -3
  183. package/dist/types-ts4.0/text/nodes/unknown.d.ts +0 -3
  184. package/dist/types-ts4.0/text-serializer.d.ts +0 -1
  185. package/dist/types-ts4.0/types/i18n.d.ts +0 -5
  186. package/dist/types-ts4.0/types/mediaOptions.d.ts +0 -12
  187. package/dist/types-ts4.0/types/smartLinksOptions.d.ts +0 -3
  188. package/dist/types-ts4.0/ui/Expand.d.ts +0 -21
  189. package/dist/types-ts4.0/ui/ExtensionRenderer.d.ts +0 -40
  190. package/dist/types-ts4.0/ui/MediaCard.d.ts +0 -77
  191. package/dist/types-ts4.0/ui/Renderer/ErrorBoundary.d.ts +0 -24
  192. package/dist/types-ts4.0/ui/Renderer/breakout-ssr.d.ts +0 -11
  193. package/dist/types-ts4.0/ui/Renderer/click-to-edit.d.ts +0 -6
  194. package/dist/types-ts4.0/ui/Renderer/index.d.ts +0 -33
  195. package/dist/types-ts4.0/ui/Renderer/style.d.ts +0 -14
  196. package/dist/types-ts4.0/ui/Renderer/truncated-wrapper.d.ts +0 -12
  197. package/dist/types-ts4.0/ui/Renderer/types.d.ts +0 -16
  198. package/dist/types-ts4.0/ui/RendererActionsContext/WithRendererActions.d.ts +0 -6
  199. package/dist/types-ts4.0/ui/RendererActionsContext/index.d.ts +0 -9
  200. package/dist/types-ts4.0/ui/SmartCardStorage.d.ts +0 -60
  201. package/dist/types-ts4.0/ui/SortingIcon.d.ts +0 -20
  202. package/dist/types-ts4.0/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +0 -15
  203. package/dist/types-ts4.0/ui/TaskItemsFormatContext/index.d.ts +0 -2
  204. package/dist/types-ts4.0/ui/active-header-id-provider.d.ts +0 -18
  205. package/dist/types-ts4.0/ui/annotations/context.d.ts +0 -27
  206. package/dist/types-ts4.0/ui/annotations/draft/component.d.ts +0 -20
  207. package/dist/types-ts4.0/ui/annotations/draft/dom.d.ts +0 -7
  208. package/dist/types-ts4.0/ui/annotations/draft/index.d.ts +0 -2
  209. package/dist/types-ts4.0/ui/annotations/draft/position.d.ts +0 -2
  210. package/dist/types-ts4.0/ui/annotations/draft/text.d.ts +0 -11
  211. package/dist/types-ts4.0/ui/annotations/element/index.d.ts +0 -10
  212. package/dist/types-ts4.0/ui/annotations/element/mark.d.ts +0 -14
  213. package/dist/types-ts4.0/ui/annotations/hooks/index.d.ts +0 -3
  214. package/dist/types-ts4.0/ui/annotations/hooks/use-events.d.ts +0 -18
  215. package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +0 -1
  216. package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comments-filter.d.ts +0 -9
  217. package/dist/types-ts4.0/ui/annotations/hooks/use-load-annotations.d.ts +0 -6
  218. package/dist/types-ts4.0/ui/annotations/hooks/user-selection.d.ts +0 -9
  219. package/dist/types-ts4.0/ui/annotations/hooks/utils.d.ts +0 -2
  220. package/dist/types-ts4.0/ui/annotations/index.d.ts +0 -5
  221. package/dist/types-ts4.0/ui/annotations/selection/index.d.ts +0 -1
  222. package/dist/types-ts4.0/ui/annotations/selection/mounter.d.ts +0 -20
  223. package/dist/types-ts4.0/ui/annotations/selection/range-validator.d.ts +0 -13
  224. package/dist/types-ts4.0/ui/annotations/selection/wrapper.d.ts +0 -8
  225. package/dist/types-ts4.0/ui/annotations/types.d.ts +0 -22
  226. package/dist/types-ts4.0/ui/annotations/view/index.d.ts +0 -7
  227. package/dist/types-ts4.0/ui/index.d.ts +0 -1
  228. package/dist/types-ts4.0/ui/renderer-props.d.ts +0 -100
  229. package/dist/types-ts4.0/use-feature-flags.d.ts +0 -2
  230. package/dist/types-ts4.0/utils.d.ts +0 -24
@@ -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
  }
@@ -288,394 +294,409 @@ export const rendererStyles = wrapperProps => theme => {
288
294
  theme
289
295
  };
290
296
  return css`
291
- font-size: ${editorFontSize(themeProps)}px;
292
- line-height: 1.5rem;
293
- color: ${themed({
297
+ font-size: ${editorFontSize(themeProps)}px;
298
+ line-height: 1.5rem;
299
+ color: ${themed({
294
300
  light: token('color.text', colors.N800),
295
301
  dark: token('color.text', '#B8C7E0')
296
302
  })(themeProps)};
297
303
 
298
- .${RendererCssClassName.DOCUMENT}::after {
299
- // we add a clearfix after ak-renderer-document in order to
300
- // contain internal floats (such as media images that are "wrap-left")
301
- // to just the renderer (and not spill outside of it)
302
- content: '';
303
- visibility: hidden;
304
- display: block;
305
- height: 0;
306
- clear: both;
307
- }
304
+ .${RendererCssClassName.DOCUMENT}::after {
305
+ // we add a clearfix after ak-renderer-document in order to
306
+ // contain internal floats (such as media images that are "wrap-left")
307
+ // to just the renderer (and not spill outside of it)
308
+ content: '';
309
+ visibility: hidden;
310
+ display: block;
311
+ height: 0;
312
+ clear: both;
313
+ }
308
314
 
309
- ${fullPageStyles(wrapperProps, themeProps)}
310
- ${fullWidthStyles(wrapperProps)}
315
+ ${fullPageStyles(wrapperProps, themeProps)}
316
+ ${fullWidthStyles(wrapperProps)}
311
317
 
312
318
  & h1 {
313
- ${headingAnchorStyle('h1')}
314
- }
319
+ ${headingAnchorStyle('h1')}
320
+ }
315
321
 
316
- & h2 {
317
- ${headingAnchorStyle('h2')}
318
- }
322
+ & h2 {
323
+ ${headingAnchorStyle('h2')}
324
+ }
319
325
 
320
- & h3 {
321
- ${headingAnchorStyle('h3')}
322
- }
326
+ & h3 {
327
+ ${headingAnchorStyle('h3')}
328
+ }
323
329
 
324
- & h4 {
325
- ${headingAnchorStyle('h4')}
326
- }
330
+ & h4 {
331
+ ${headingAnchorStyle('h4')}
332
+ }
327
333
 
328
- & h5 {
329
- ${headingAnchorStyle('h5')}
330
- }
334
+ & h5 {
335
+ ${headingAnchorStyle('h5')}
336
+ }
331
337
 
332
- & h6 {
333
- ${headingAnchorStyle('h6')}
334
- }
338
+ & h6 {
339
+ ${headingAnchorStyle('h6')}
340
+ }
335
341
 
336
- & span.akActionMark {
337
- color: ${token('color.link', colors.B400)};
338
- text-decoration: none;
342
+ & span.akActionMark {
343
+ color: ${token('color.link', colors.B400)};
344
+ text-decoration: none;
339
345
 
340
- &:hover {
341
- color: ${token('color.link', colors.B300)};
342
- text-decoration: underline;
346
+ &:hover {
347
+ color: ${token('color.link', colors.B300)};
348
+ text-decoration: underline;
349
+ }
350
+
351
+ &:active {
352
+ color: ${token('color.link.pressed', colors.B500)};
353
+ }
343
354
  }
344
355
 
345
- &:active {
346
- color: ${token('color.link.pressed', colors.B500)};
356
+ & span.akActionMark {
357
+ cursor: pointer;
347
358
  }
348
- }
349
359
 
350
- & span.akActionMark {
351
- cursor: pointer;
352
- }
360
+ & span[data-placeholder] {
361
+ color: ${colors.placeholderText(themeProps)};
362
+ }
353
363
 
354
- & span[data-placeholder] {
355
- color: ${colors.placeholderText(themeProps)};
356
- }
364
+ ${whitespaceSharedStyles};
365
+ ${blockquoteSharedStyles};
366
+ ${headingsSharedStyles(themeProps)};
367
+ ${ruleSharedStyles(themeProps)};
368
+ ${paragraphSharedStyles};
369
+ ${listsSharedStyles};
370
+ ${indentationSharedStyles};
371
+ ${blockMarksSharedStyles};
372
+ ${codeMarkSharedStyles(themeProps)};
373
+ ${shadowSharedStyle};
374
+ ${dateSharedStyle};
375
+ ${textColorStyles};
376
+ ${tasksAndDecisionsStyles};
377
+ ${smartCardSharedStyles}
357
378
 
358
- ${whitespaceSharedStyles};
359
- ${blockquoteSharedStyles};
360
- ${headingsSharedStyles(themeProps)};
361
- ${ruleSharedStyles(themeProps)};
362
- ${paragraphSharedStyles};
363
- ${listsSharedStyles};
364
- ${indentationSharedStyles};
365
- ${blockMarksSharedStyles};
366
- ${codeMarkSharedStyles(themeProps)};
367
- ${shadowSharedStyle};
368
- ${dateSharedStyle};
369
- ${textColorStyles};
370
- ${tasksAndDecisionsStyles};
371
- ${smartCardSharedStyles}
372
-
373
- & .UnknownBlock {
374
- font-family: ${fontFamily()};
375
- font-size: ${relativeFontSizeToBase16(fontSize())};
376
- font-weight: 400;
377
- white-space: pre-wrap;
378
- word-wrap: break-word;
379
- }
379
+ & .UnknownBlock {
380
+ font-family: ${fontFamily()};
381
+ font-size: ${relativeFontSizeToBase16(fontSize())};
382
+ font-weight: 400;
383
+ white-space: pre-wrap;
384
+ word-wrap: break-word;
385
+ }
380
386
 
381
- & span.date-node {
382
- background: ${themed({
387
+ & span.date-node {
388
+ background: ${themed({
383
389
  light: token('color.background.neutral', colors.N30A),
384
390
  dark: token('color.background.neutral', colors.DN70)
385
391
  })(themeProps)};
386
- border-radius: ${borderRadius()}px;
387
- color: ${themed({
392
+ border-radius: ${borderRadius()}px;
393
+ color: ${themed({
388
394
  light: token('color.text', colors.N800),
389
395
  dark: token('color.text', colors.DN600)
390
396
  })(themeProps)};
391
- padding: 2px 4px;
392
- margin: 0 1px;
393
- transition: background 0.3s;
394
- }
397
+ padding: 2px 4px;
398
+ margin: 0 1px;
399
+ transition: background 0.3s;
400
+ }
395
401
 
396
- & span.date-node-highlighted {
397
- background: ${token('color.background.danger', colors.R50)};
398
- color: ${token('color.text.danger', colors.R500)};
399
- }
402
+ & span.date-node-highlighted {
403
+ background: ${token('color.background.danger', colors.R50)};
404
+ color: ${token('color.text.danger', colors.R500)};
405
+ }
400
406
 
401
- & .renderer-image {
402
- max-width: 100%;
403
- display: block;
404
- margin: ${gridSize() * 3}px 0;
405
- }
407
+ & .renderer-image {
408
+ max-width: 100%;
409
+ display: block;
410
+ margin: ${gridSize() * 3}px 0;
411
+ }
406
412
 
407
- .${richMediaClassName}.rich-media-wrapped
408
- + .${richMediaClassName}:not(.rich-media-wrapped) {
409
- clear: both;
410
- }
413
+ .${richMediaClassName}.rich-media-wrapped
414
+ + .${richMediaClassName}:not(.rich-media-wrapped) {
415
+ clear: both;
416
+ }
411
417
 
412
- & .code-block,
413
- & blockquote,
414
- & hr,
415
- & > div > div:not(.rich-media-wrapped),
416
- .${richMediaClassName}.rich-media-wrapped
417
- + .rich-media-wrapped
418
- + *:not(.rich-media-wrapped),
419
- .${richMediaClassName}.rich-media-wrapped + div:not(.rich-media-wrapped),
420
- .${richMediaClassName}.image-align-start,
421
- .${richMediaClassName}.image-center,
422
- .${richMediaClassName}.image-align-end {
423
- clear: both;
424
- }
418
+ & .code-block,
419
+ & blockquote,
420
+ & hr,
421
+ & > div > div:not(.rich-media-wrapped),
422
+ .${richMediaClassName}.rich-media-wrapped
423
+ + .rich-media-wrapped
424
+ + *:not(.rich-media-wrapped),
425
+ .${richMediaClassName}.rich-media-wrapped + div:not(.rich-media-wrapped),
426
+ .${richMediaClassName}.image-align-start,
427
+ .${richMediaClassName}.image-center,
428
+ .${richMediaClassName}.image-align-end {
429
+ clear: both;
430
+ }
425
431
 
426
- & .rich-media-wrapped {
427
- & + h1,
428
- & + h2,
429
- & + h3,
430
- & + h4,
431
- & + h5,
432
- & + h6 {
433
- margin-top: 8px;
432
+ & .rich-media-wrapped {
433
+ & + h1,
434
+ & + h2,
435
+ & + h3,
436
+ & + h4,
437
+ & + h5,
438
+ & + h6 {
439
+ margin-top: 8px;
440
+ }
434
441
  }
435
- }
436
442
 
437
- ${alignedHeadingAnchorStyle(wrapperProps)}
438
- /* plugin styles */
443
+ ${alignedHeadingAnchorStyle(wrapperProps)}
444
+ /* plugin styles */
439
445
  ${mediaSingleSharedStyle} &
440
446
  div[class^='image-wrap-'] + div[class^='image-wrap-'] {
441
- margin-left: 0;
442
- margin-right: 0;
443
- }
444
-
445
- /* Breakout for tables and extensions */
446
- .${RendererCssClassName.DOCUMENT} > {
447
- * .${TableSharedCssClassName.TABLE_CONTAINER} {
448
- width: 100% !important;
449
- left: 0 !important;
447
+ margin-left: 0;
448
+ margin-right: 0;
450
449
  }
451
450
 
452
- * .${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER} {
453
- overflow-x: auto;
454
- }
451
+ /* Breakout for tables and extensions */
452
+ .${RendererCssClassName.DOCUMENT} > {
453
+ * .${TableSharedCssClassName.TABLE_CONTAINER} {
454
+ width: 100% !important;
455
+ left: 0 !important;
456
+ }
455
457
 
456
- & .${RendererCssClassName.EXTENSION}:first-child {
457
- margin-top: 0;
458
- }
459
- }
458
+ * .${RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER} {
459
+ overflow-x: auto;
460
+ }
460
461
 
461
- .${RendererCssClassName.DOCUMENT} {
462
- .${RendererCssClassName.EXTENSION} {
463
- margin-top: ${blockNodesVerticalMargin};
462
+ & .${RendererCssClassName.EXTENSION}:first-child {
463
+ margin-top: 0;
464
+ }
464
465
  }
465
466
 
466
- .${RendererCssClassName.EXTENSION_CENTER_ALIGN} {
467
- margin-left: 50%;
468
- transform: translateX(-50%);
469
- }
467
+ .${RendererCssClassName.DOCUMENT} {
468
+ .${RendererCssClassName.EXTENSION} {
469
+ margin-top: ${blockNodesVerticalMargin};
470
+ }
470
471
 
471
- .${TableSharedCssClassName.TABLE_NODE_WRAPPER} {
472
- overflow-x: auto;
473
- }
472
+ .${RendererCssClassName.EXTENSION_CENTER_ALIGN} {
473
+ margin-left: 50%;
474
+ transform: translateX(-50%);
475
+ }
474
476
 
475
- .${shadowObserverClassNames.SHADOW_CONTAINER}
476
477
  .${TableSharedCssClassName.TABLE_NODE_WRAPPER} {
477
- display: flex;
478
+ overflow-x: auto;
479
+ }
480
+
481
+ .${shadowObserverClassNames.SHADOW_CONTAINER}
482
+ .${TableSharedCssClassName.TABLE_NODE_WRAPPER} {
483
+ display: flex;
484
+ }
478
485
  }
479
- }
480
486
 
481
- ${tableSharedStyle(themeProps)}
487
+ ${tableSharedStyle(themeProps)}
482
488
 
483
- .${RendererCssClassName.DOCUMENT} .${TableSharedCssClassName.TABLE_CONTAINER} {
484
- z-index: 0;
485
- transition: all 0.1s linear;
486
- display: flex; /* needed to avoid position: fixed jumpiness in Chrome */
489
+ .${RendererCssClassName.DOCUMENT} .${TableSharedCssClassName.TABLE_CONTAINER} {
490
+ z-index: 0;
491
+ transition: all 0.1s linear;
492
+ display: flex; /* needed to avoid position: fixed jumpiness in Chrome */
487
493
 
488
- /** Shadow overrides */
489
- &.${shadowClassNames.RIGHT_SHADOW}::after,
490
- &.${shadowClassNames.LEFT_SHADOW}::before {
491
- top: ${tableMarginTop - 1}px;
492
- height: calc(100% - ${tableMarginTop}px);
493
- z-index: ${akEditorStickyHeaderZIndex};
494
- }
494
+ /** Shadow overrides */
495
+ &.${shadowClassNames.RIGHT_SHADOW}::after,
496
+ &.${shadowClassNames.LEFT_SHADOW}::before {
497
+ top: ${tableMarginTop - 1}px;
498
+ height: calc(100% - ${tableMarginTop}px);
499
+ z-index: ${akEditorStickyHeaderZIndex};
500
+ }
495
501
 
496
- &
497
- .${shadowObserverClassNames.SENTINEL_LEFT},
498
502
  &
499
- .${shadowObserverClassNames.SENTINEL_RIGHT} {
500
- height: calc(100% - ${tableMarginTop}px);
501
- }
503
+ .${shadowObserverClassNames.SENTINEL_LEFT},
504
+ &
505
+ .${shadowObserverClassNames.SENTINEL_RIGHT} {
506
+ height: calc(100% - ${tableMarginTop}px);
507
+ }
502
508
 
503
- /**
509
+ /**
504
510
  * A hack for making all the <th /> heights equal in case some have shorter
505
511
  * content than others.
506
512
  *
507
513
  * This is done to make sort buttons fill entire <th />.
508
514
  */
509
- table {
510
- height: 1px; /* will be ignored */
511
- ${tableSortableColumnStyle(wrapperProps)};
512
- margin-left: 0;
513
- margin-right: 0;
514
- }
515
+ table {
516
+ height: 1px; /* will be ignored */
517
+ ${tableSortableColumnStyle(wrapperProps)};
518
+ margin-left: 0;
519
+ margin-right: 0;
520
+ }
515
521
 
516
- table tr:first-of-type {
517
- height: 100%;
522
+ table tr:first-of-type {
523
+ height: 100%;
518
524
 
519
- td,
520
- th {
521
- position: relative;
525
+ td,
526
+ th {
527
+ position: relative;
528
+ }
522
529
  }
523
- }
524
530
 
525
- table[data-number-column='true'] {
526
- .${RendererCssClassName.NUMBER_COLUMN} {
527
- background-color: ${themed({
531
+ table[data-number-column='true'] {
532
+ .${RendererCssClassName.NUMBER_COLUMN} {
533
+ background-color: ${themed({
528
534
  light: token('color.background.neutral', akEditorTableToolbar),
529
535
  dark: token('color.background.neutral', akEditorTableToolbarDark)
530
536
  })(themeProps)};
531
- border-right: 1px solid
532
- ${themed({
537
+ border-right: 1px solid
538
+ ${themed({
533
539
  light: token('color.border', akEditorTableBorder),
534
540
  dark: token('color.border', akEditorTableBorderDark)
535
541
  })(themeProps)};
536
- width: ${akEditorTableNumberColumnWidth}px;
537
- text-align: center;
538
- color: ${themed({
542
+ width: ${akEditorTableNumberColumnWidth}px;
543
+ text-align: center;
544
+ color: ${themed({
539
545
  light: token('color.text.subtlest', colors.N200),
540
546
  dark: token('color.text.subtlest', colors.DN400)
541
547
  })(themeProps)};
542
- font-size: ${relativeFontSizeToBase16(fontSize())};
543
- }
548
+ font-size: ${relativeFontSizeToBase16(fontSize())};
549
+ }
544
550
 
545
- .fixed .${RendererCssClassName.NUMBER_COLUMN} {
546
- border-right: 0px none;
551
+ .fixed .${RendererCssClassName.NUMBER_COLUMN} {
552
+ border-right: 0px none;
553
+ }
547
554
  }
548
555
  }
549
- }
550
556
 
551
- tr[data-header-row].fixed {
552
- position: fixed !important;
553
- display: flex;
554
- overflow: hidden;
555
- z-index: ${akEditorStickyHeaderZIndex};
557
+ tr[data-header-row].fixed {
558
+ position: fixed !important;
559
+ display: flex;
560
+ overflow: hidden;
561
+ z-index: ${akEditorStickyHeaderZIndex};
556
562
 
557
- border-right: 1px solid
558
- ${themed({
563
+ border-right: 1px solid
564
+ ${themed({
559
565
  light: token('color.border', akEditorTableBorder),
560
566
  dark: token('color.border', akEditorTableBorderDark)
561
567
  })(themeProps)};
562
- border-bottom: 1px solid
563
- ${themed({
568
+ border-bottom: 1px solid
569
+ ${themed({
564
570
  light: token('color.border', akEditorTableBorder),
565
571
  dark: token('color.border', akEditorTableBorderDark)
566
572
  })(themeProps)};
567
573
 
568
- /* this is to compensate for the table border */
569
- transform: translateX(-1px);
570
- }
574
+ /* this is to compensate for the table border */
575
+ transform: translateX(-1px);
576
+ }
571
577
 
572
- .sticky > th {
573
- z-index: ${akEditorStickyHeaderZIndex};
574
- position: sticky !important;
575
- top: 0;
576
- }
578
+ .sticky > th {
579
+ z-index: ${akEditorStickyHeaderZIndex};
580
+ position: sticky !important;
581
+ top: 0;
582
+ }
577
583
 
578
- /* Make the number column header sticky */
579
- .sticky > td {
580
- position: sticky !important;
581
- top: 0;
582
- }
584
+ /* Make the number column header sticky */
585
+ .sticky > td {
586
+ position: sticky !important;
587
+ top: 0;
588
+ }
583
589
 
584
- /* add border for position: sticky
590
+ /* add border for position: sticky
585
591
  and work around background-clip: padding-box
586
592
  bug for FF causing box-shadow bug in Chrome */
587
- .sticky th,
588
- .sticky td {
589
- box-shadow: 0px 1px
590
- ${themed({
593
+ .sticky th,
594
+ .sticky td {
595
+ box-shadow: 0px 1px
596
+ ${themed({
591
597
  light: token('color.border', akEditorTableBorder),
592
598
  dark: token('color.border', akEditorTableBorderDark)
593
599
  })(themeProps)},
594
- 0px -0.5px ${themed({
600
+ 0px -0.5px ${themed({
595
601
  light: token('color.border', akEditorTableBorder),
596
602
  dark: token('color.border', akEditorTableBorderDark)
597
603
  })(themeProps)},
598
- inset -1px 0px ${themed({
604
+ inset -1px 0px ${themed({
599
605
  light: token('color.border', akEditorTableToolbar),
600
606
  dark: token('color.border', akEditorTableToolbarDark)
601
607
  })(themeProps)},
602
- 0px -1px ${themed({
608
+ 0px -1px ${themed({
603
609
  light: token('color.border', akEditorTableToolbar),
604
610
  dark: token('color.border', akEditorTableToolbarDark)
605
611
  })(themeProps)};
606
- }
612
+ }
607
613
 
608
- /* this will remove jumpiness caused in Chrome for sticky headers */
609
- .fixed + tr {
610
- min-height: 0px;
611
- }
614
+ /* this will remove jumpiness caused in Chrome for sticky headers */
615
+ .fixed + tr {
616
+ min-height: 0px;
617
+ }
612
618
 
613
- /*
619
+ /*
614
620
  * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.
615
621
  * See ED-4159.
616
622
  */
617
- & .code-block {
618
- max-width: 100%;
619
- /* -ms- properties are necessary until MS supports the latest version of the grid spec */
620
- /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */
621
- display: -ms-grid;
622
- display: grid;
623
- -ms-grid-columns: auto 1fr;
624
- /* stylelint-enable */
625
-
626
- grid-template-columns: minmax(0, 1fr);
627
- position: relative;
628
- border-radius: ${borderRadius()}px;
623
+ & .code-block {
624
+ max-width: 100%;
625
+ /* -ms- properties are necessary until MS supports the latest version of the grid spec */
626
+ /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */
627
+ display: -ms-grid;
628
+ display: grid;
629
+ -ms-grid-columns: auto 1fr;
630
+ /* stylelint-enable */
629
631
 
630
- /*
632
+ grid-template-columns: minmax(0, 1fr);
633
+ position: relative;
634
+ border-radius: ${borderRadius()}px;
635
+
636
+ /*
631
637
  * The overall renderer has word-wrap: break; which causes issues with
632
638
  * code block line numbers in Safari / iOS.
633
639
  */
634
- word-wrap: normal;
635
-
636
- & > span {
637
- /* stylelint-disable value-no-vendor-prefix */
638
- -ms-grid-row: 1;
639
- -ms-grid-column: 2;
640
- /* stylelint-enable */
641
- grid-column: 1;
640
+ word-wrap: normal;
641
+
642
+ & > span {
643
+ /* stylelint-disable value-no-vendor-prefix */
644
+ -ms-grid-row: 1;
645
+ -ms-grid-column: 2;
646
+ /* stylelint-enable */
647
+ grid-column: 1;
648
+ }
642
649
  }
643
- }
644
650
 
645
- & .MediaGroup,
646
- & .code-block {
647
- margin-top: ${blockNodesVerticalMargin};
651
+ & .MediaGroup,
652
+ & .code-block {
653
+ margin-top: ${blockNodesVerticalMargin};
648
654
 
649
- &:first-child {
650
- margin-top: 0;
651
- }
655
+ &:first-child {
656
+ margin-top: 0;
657
+ }
652
658
 
653
- &:hover button.copy-to-clipboard,
654
- .copy-to-clipboard:focus {
655
- opacity: 1;
656
- position: absolute;
657
- height: 32px;
658
- width: 32px;
659
- right: 6px;
660
- top: 4px;
661
- padding: 2px;
659
+ &:hover button.copy-to-clipboard,
660
+ .copy-to-clipboard:focus {
661
+ opacity: 1;
662
+ position: absolute;
663
+ height: 32px;
664
+ width: 32px;
665
+ right: 6px;
666
+ top: 4px;
667
+ padding: 2px;
668
+ }
662
669
  }
663
- }
664
670
 
665
- ${getLightWeightCodeBlockStylesForRootRendererStyleSheet()}
671
+ ${getLightWeightCodeBlockStylesForRootRendererStyleSheet()}
672
+
673
+ ${columnLayoutSharedStyle};
674
+ & [data-layout-section] {
675
+ margin-top: ${gridSize() * 2.5}px;
676
+ & > div + div {
677
+ margin-left: ${gridSize() * 4}px;
678
+ }
666
679
 
667
- ${columnLayoutSharedStyle};
668
- & [data-layout-section] {
669
- margin-top: ${gridSize() * 2.5}px;
670
- & > div + div {
671
- margin-left: ${gridSize() * 4}px;
680
+ @media screen and (max-width: ${gridMediumMaxWidth}px) {
681
+ & > div + div {
682
+ margin-left: 0;
683
+ }
684
+ }
672
685
  }
673
686
 
674
- @media screen and (max-width: ${gridMediumMaxWidth}px) {
675
- & > div + div {
676
- margin-left: 0;
687
+ & li {
688
+ > .code-block {
689
+ margin: ${blockNodesVerticalMargin} 0 0 0;
677
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 : ''}
678
700
  }
679
- }
680
- `;
701
+ `;
681
702
  };