@atlaskit/editor-common 81.1.4 → 81.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/codemods/migrates/entry-points.ts +14 -30
  3. package/dist/cjs/clipboard/index.js +4 -4
  4. package/dist/cjs/collab/index.js +1 -1
  5. package/dist/cjs/doc-utils/editor-use-only.js +2 -2
  6. package/dist/cjs/i18n/cs.js +1 -0
  7. package/dist/cjs/i18n/da.js +3 -2
  8. package/dist/cjs/i18n/de.js +3 -2
  9. package/dist/cjs/i18n/en.js +1 -0
  10. package/dist/cjs/i18n/en_GB.js +1 -0
  11. package/dist/cjs/i18n/en_ZZ.js +1 -0
  12. package/dist/cjs/i18n/es.js +2 -1
  13. package/dist/cjs/i18n/fi.js +2 -1
  14. package/dist/cjs/i18n/fr.js +1 -0
  15. package/dist/cjs/i18n/hu.js +1 -0
  16. package/dist/cjs/i18n/it.js +1 -0
  17. package/dist/cjs/i18n/ja.js +2 -1
  18. package/dist/cjs/i18n/ko.js +2 -1
  19. package/dist/cjs/i18n/nb.js +1 -0
  20. package/dist/cjs/i18n/nl.js +1 -0
  21. package/dist/cjs/i18n/pl.js +1 -0
  22. package/dist/cjs/i18n/pt_BR.js +1 -0
  23. package/dist/cjs/i18n/ru.js +1 -0
  24. package/dist/cjs/i18n/sv.js +1 -0
  25. package/dist/cjs/i18n/th.js +1 -0
  26. package/dist/cjs/i18n/tr.js +1 -0
  27. package/dist/cjs/i18n/uk.js +7 -6
  28. package/dist/cjs/i18n/vi.js +1 -0
  29. package/dist/cjs/i18n/zh.js +3 -2
  30. package/dist/cjs/i18n/zh_TW.js +1 -0
  31. package/dist/cjs/lists/node.js +8 -8
  32. package/dist/cjs/lists/replace-content.js +8 -8
  33. package/dist/cjs/media-inline/styles.js +2 -2
  34. package/dist/cjs/messages/card.js +20 -0
  35. package/dist/cjs/monitoring/error.js +1 -1
  36. package/dist/cjs/selection/gap-cursor/styles.js +1 -1
  37. package/dist/cjs/styles/shared/annotation.js +1 -1
  38. package/dist/cjs/styles/shared/block-marks.js +1 -1
  39. package/dist/cjs/styles/shared/code-block.js +2 -2
  40. package/dist/cjs/styles/shared/lists.js +1 -1
  41. package/dist/cjs/styles/shared/panel.js +1 -1
  42. package/dist/cjs/styles/shared/resizer.js +1 -1
  43. package/dist/cjs/styles/shared/smartCard.js +1 -1
  44. package/dist/cjs/styles/shared/table.js +1 -1
  45. package/dist/cjs/styles/shared/task-decision.js +1 -1
  46. package/dist/cjs/styles/shared/unsupported-content.js +1 -1
  47. package/dist/cjs/table/SortingIcon.js +2 -2
  48. package/dist/cjs/ui/DropList/index.js +1 -1
  49. package/dist/cjs/ui/Expand/index.js +1 -1
  50. package/dist/cjs/ui/FloatingToolbar/styles.js +4 -4
  51. package/dist/cjs/ui/MediaSingle/styled.js +5 -5
  52. package/dist/cjs/ui/ResizerLegacy/styled.js +1 -1
  53. package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -2
  54. package/dist/cjs/utils/calculate-toolbar-position.js +8 -8
  55. package/dist/cjs/utils/compareNodes.js +7 -7
  56. package/dist/cjs/utils/dedupe.js +10 -10
  57. package/dist/es2019/clipboard/index.js +4 -4
  58. package/dist/es2019/collab/index.js +29 -29
  59. package/dist/es2019/doc-utils/editor-use-only.js +2 -2
  60. package/dist/es2019/i18n/cs.js +1 -0
  61. package/dist/es2019/i18n/da.js +3 -2
  62. package/dist/es2019/i18n/de.js +3 -2
  63. package/dist/es2019/i18n/en.js +1 -0
  64. package/dist/es2019/i18n/en_GB.js +1 -0
  65. package/dist/es2019/i18n/en_ZZ.js +1 -0
  66. package/dist/es2019/i18n/es.js +2 -1
  67. package/dist/es2019/i18n/fi.js +2 -1
  68. package/dist/es2019/i18n/fr.js +1 -0
  69. package/dist/es2019/i18n/hu.js +1 -0
  70. package/dist/es2019/i18n/it.js +1 -0
  71. package/dist/es2019/i18n/ja.js +2 -1
  72. package/dist/es2019/i18n/ko.js +2 -1
  73. package/dist/es2019/i18n/nb.js +1 -0
  74. package/dist/es2019/i18n/nl.js +1 -0
  75. package/dist/es2019/i18n/pl.js +1 -0
  76. package/dist/es2019/i18n/pt_BR.js +1 -0
  77. package/dist/es2019/i18n/ru.js +1 -0
  78. package/dist/es2019/i18n/sv.js +1 -0
  79. package/dist/es2019/i18n/th.js +1 -0
  80. package/dist/es2019/i18n/tr.js +1 -0
  81. package/dist/es2019/i18n/uk.js +7 -6
  82. package/dist/es2019/i18n/vi.js +1 -0
  83. package/dist/es2019/i18n/zh.js +3 -2
  84. package/dist/es2019/i18n/zh_TW.js +1 -0
  85. package/dist/es2019/lists/node.js +8 -8
  86. package/dist/es2019/lists/replace-content.js +8 -8
  87. package/dist/es2019/media-inline/styles.js +28 -28
  88. package/dist/es2019/messages/card.js +20 -0
  89. package/dist/es2019/monitoring/error.js +1 -1
  90. package/dist/es2019/selection/gap-cursor/styles.js +80 -80
  91. package/dist/es2019/styles/shared/annotation.js +12 -12
  92. package/dist/es2019/styles/shared/block-marks.js +16 -16
  93. package/dist/es2019/styles/shared/code-block.js +101 -89
  94. package/dist/es2019/styles/shared/lists.js +83 -86
  95. package/dist/es2019/styles/shared/panel.js +78 -78
  96. package/dist/es2019/styles/shared/resizer.js +180 -178
  97. package/dist/es2019/styles/shared/smartCard.js +92 -102
  98. package/dist/es2019/styles/shared/table.js +125 -127
  99. package/dist/es2019/styles/shared/task-decision.js +46 -46
  100. package/dist/es2019/styles/shared/unsupported-content.js +15 -15
  101. package/dist/es2019/table/SortingIcon.js +34 -34
  102. package/dist/es2019/ui/DropList/index.js +1 -1
  103. package/dist/es2019/ui/Expand/index.js +14 -14
  104. package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
  105. package/dist/es2019/ui/MediaSingle/styled.js +55 -55
  106. package/dist/es2019/ui/ResizerLegacy/styled.js +10 -10
  107. package/dist/es2019/ui-menu/DropdownMenu/index.js +30 -30
  108. package/dist/es2019/utils/calculate-toolbar-position.js +8 -8
  109. package/dist/es2019/utils/compareNodes.js +7 -7
  110. package/dist/es2019/utils/dedupe.js +10 -10
  111. package/dist/esm/clipboard/index.js +4 -4
  112. package/dist/esm/collab/index.js +1 -1
  113. package/dist/esm/doc-utils/editor-use-only.js +2 -2
  114. package/dist/esm/i18n/cs.js +1 -0
  115. package/dist/esm/i18n/da.js +3 -2
  116. package/dist/esm/i18n/de.js +3 -2
  117. package/dist/esm/i18n/en.js +1 -0
  118. package/dist/esm/i18n/en_GB.js +1 -0
  119. package/dist/esm/i18n/en_ZZ.js +1 -0
  120. package/dist/esm/i18n/es.js +2 -1
  121. package/dist/esm/i18n/fi.js +2 -1
  122. package/dist/esm/i18n/fr.js +1 -0
  123. package/dist/esm/i18n/hu.js +1 -0
  124. package/dist/esm/i18n/it.js +1 -0
  125. package/dist/esm/i18n/ja.js +2 -1
  126. package/dist/esm/i18n/ko.js +2 -1
  127. package/dist/esm/i18n/nb.js +1 -0
  128. package/dist/esm/i18n/nl.js +1 -0
  129. package/dist/esm/i18n/pl.js +1 -0
  130. package/dist/esm/i18n/pt_BR.js +1 -0
  131. package/dist/esm/i18n/ru.js +1 -0
  132. package/dist/esm/i18n/sv.js +1 -0
  133. package/dist/esm/i18n/th.js +1 -0
  134. package/dist/esm/i18n/tr.js +1 -0
  135. package/dist/esm/i18n/uk.js +7 -6
  136. package/dist/esm/i18n/vi.js +1 -0
  137. package/dist/esm/i18n/zh.js +3 -2
  138. package/dist/esm/i18n/zh_TW.js +1 -0
  139. package/dist/esm/lists/node.js +8 -8
  140. package/dist/esm/lists/replace-content.js +8 -8
  141. package/dist/esm/media-inline/styles.js +2 -2
  142. package/dist/esm/messages/card.js +20 -0
  143. package/dist/esm/monitoring/error.js +1 -1
  144. package/dist/esm/selection/gap-cursor/styles.js +1 -1
  145. package/dist/esm/styles/shared/annotation.js +1 -1
  146. package/dist/esm/styles/shared/block-marks.js +1 -1
  147. package/dist/esm/styles/shared/code-block.js +2 -2
  148. package/dist/esm/styles/shared/lists.js +1 -1
  149. package/dist/esm/styles/shared/panel.js +1 -1
  150. package/dist/esm/styles/shared/resizer.js +1 -1
  151. package/dist/esm/styles/shared/smartCard.js +1 -1
  152. package/dist/esm/styles/shared/table.js +1 -1
  153. package/dist/esm/styles/shared/task-decision.js +1 -1
  154. package/dist/esm/styles/shared/unsupported-content.js +1 -1
  155. package/dist/esm/table/SortingIcon.js +2 -2
  156. package/dist/esm/ui/DropList/index.js +1 -1
  157. package/dist/esm/ui/Expand/index.js +1 -1
  158. package/dist/esm/ui/FloatingToolbar/styles.js +4 -4
  159. package/dist/esm/ui/MediaSingle/styled.js +5 -5
  160. package/dist/esm/ui/ResizerLegacy/styled.js +1 -1
  161. package/dist/esm/ui-menu/DropdownMenu/index.js +2 -2
  162. package/dist/esm/utils/calculate-toolbar-position.js +8 -8
  163. package/dist/esm/utils/compareNodes.js +7 -7
  164. package/dist/esm/utils/dedupe.js +10 -10
  165. package/dist/types/analytics/index.d.ts +1 -1
  166. package/dist/types/analytics/types/index.d.ts +3 -3
  167. package/dist/types/analytics/types/insert-events.d.ts +1 -1
  168. package/dist/types/card/LinkToolbarButtonGroup.d.ts +1 -1
  169. package/dist/types/card/index.d.ts +1 -1
  170. package/dist/types/element-browser/ViewMore.d.ts +1 -1
  171. package/dist/types/element-browser/components/ElementList/EmptyState.d.ts +1 -1
  172. package/dist/types/extensibility/index.d.ts +1 -1
  173. package/dist/types/extensions/index.d.ts +1 -1
  174. package/dist/types/extensions/types/index.d.ts +2 -2
  175. package/dist/types/guideline/index.d.ts +3 -3
  176. package/dist/types/i18n/cs.d.ts +1 -0
  177. package/dist/types/i18n/da.d.ts +1 -0
  178. package/dist/types/i18n/de.d.ts +1 -0
  179. package/dist/types/i18n/en.d.ts +1 -0
  180. package/dist/types/i18n/en_GB.d.ts +1 -0
  181. package/dist/types/i18n/en_ZZ.d.ts +1 -0
  182. package/dist/types/i18n/es.d.ts +1 -0
  183. package/dist/types/i18n/fi.d.ts +1 -0
  184. package/dist/types/i18n/fr.d.ts +1 -0
  185. package/dist/types/i18n/hu.d.ts +1 -0
  186. package/dist/types/i18n/it.d.ts +1 -0
  187. package/dist/types/i18n/ja.d.ts +1 -0
  188. package/dist/types/i18n/ko.d.ts +1 -0
  189. package/dist/types/i18n/nb.d.ts +1 -0
  190. package/dist/types/i18n/nl.d.ts +1 -0
  191. package/dist/types/i18n/pl.d.ts +1 -0
  192. package/dist/types/i18n/pt_BR.d.ts +1 -0
  193. package/dist/types/i18n/ru.d.ts +1 -0
  194. package/dist/types/i18n/sv.d.ts +1 -0
  195. package/dist/types/i18n/th.d.ts +1 -0
  196. package/dist/types/i18n/tr.d.ts +1 -0
  197. package/dist/types/i18n/uk.d.ts +1 -0
  198. package/dist/types/i18n/vi.d.ts +1 -0
  199. package/dist/types/i18n/zh.d.ts +1 -0
  200. package/dist/types/i18n/zh_TW.d.ts +1 -0
  201. package/dist/types/link/index.d.ts +3 -3
  202. package/dist/types/lists/index.d.ts +3 -3
  203. package/dist/types/lists/replace-content.d.ts +1 -1
  204. package/dist/types/mark/index.d.ts +1 -1
  205. package/dist/types/media-inline/index.d.ts +1 -1
  206. package/dist/types/media-inline/views/frame.d.ts +1 -1
  207. package/dist/types/messages/card.d.ts +20 -0
  208. package/dist/types/portal/index.d.ts +1 -1
  209. package/dist/types/preset/index.d.ts +1 -1
  210. package/dist/types/preset/plugin-injection-api.d.ts +1 -1
  211. package/dist/types/provider-factory/quick-insert-provider.d.ts +2 -1
  212. package/dist/types/provider-factory.d.ts +2 -2
  213. package/dist/types/react-node-view/index.d.ts +1 -1
  214. package/dist/types/selection/index.d.ts +2 -2
  215. package/dist/types/styles/index.d.ts +4 -4
  216. package/dist/types/types/feature-flags.d.ts +6 -6
  217. package/dist/types/types/index.d.ts +12 -12
  218. package/dist/types/types/next-editor-plugin.d.ts +2 -8
  219. package/dist/types/types/performance-tracking.d.ts +4 -4
  220. package/dist/types/ufo/index.d.ts +1 -1
  221. package/dist/types/ui/BaseTheme/index.d.ts +1 -1
  222. package/dist/types/ui/FloatingToolbar/styles.d.ts +4 -4
  223. package/dist/types/ui/MediaSingle/styled.d.ts +1 -1
  224. package/dist/types/ui/index.d.ts +4 -4
  225. package/dist/types/ui-color/index.d.ts +1 -1
  226. package/dist/types/utils/get-performance-options.d.ts +1 -1
  227. package/dist/types/utils/index.d.ts +6 -6
  228. package/dist/types/validator.d.ts +1 -1
  229. package/dist/types-ts4.5/analytics/index.d.ts +1 -1
  230. package/dist/types-ts4.5/analytics/types/index.d.ts +3 -3
  231. package/dist/types-ts4.5/analytics/types/insert-events.d.ts +1 -1
  232. package/dist/types-ts4.5/card/LinkToolbarButtonGroup.d.ts +1 -1
  233. package/dist/types-ts4.5/card/index.d.ts +1 -1
  234. package/dist/types-ts4.5/element-browser/ViewMore.d.ts +1 -1
  235. package/dist/types-ts4.5/element-browser/components/ElementList/EmptyState.d.ts +1 -1
  236. package/dist/types-ts4.5/extensibility/index.d.ts +1 -1
  237. package/dist/types-ts4.5/extensions/index.d.ts +1 -1
  238. package/dist/types-ts4.5/extensions/types/index.d.ts +2 -2
  239. package/dist/types-ts4.5/guideline/index.d.ts +3 -3
  240. package/dist/types-ts4.5/i18n/cs.d.ts +1 -0
  241. package/dist/types-ts4.5/i18n/da.d.ts +1 -0
  242. package/dist/types-ts4.5/i18n/de.d.ts +1 -0
  243. package/dist/types-ts4.5/i18n/en.d.ts +1 -0
  244. package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -0
  245. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -0
  246. package/dist/types-ts4.5/i18n/es.d.ts +1 -0
  247. package/dist/types-ts4.5/i18n/fi.d.ts +1 -0
  248. package/dist/types-ts4.5/i18n/fr.d.ts +1 -0
  249. package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
  250. package/dist/types-ts4.5/i18n/it.d.ts +1 -0
  251. package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
  252. package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
  253. package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
  254. package/dist/types-ts4.5/i18n/nl.d.ts +1 -0
  255. package/dist/types-ts4.5/i18n/pl.d.ts +1 -0
  256. package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
  257. package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
  258. package/dist/types-ts4.5/i18n/sv.d.ts +1 -0
  259. package/dist/types-ts4.5/i18n/th.d.ts +1 -0
  260. package/dist/types-ts4.5/i18n/tr.d.ts +1 -0
  261. package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
  262. package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
  263. package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
  264. package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
  265. package/dist/types-ts4.5/link/index.d.ts +3 -3
  266. package/dist/types-ts4.5/lists/index.d.ts +3 -3
  267. package/dist/types-ts4.5/lists/replace-content.d.ts +1 -1
  268. package/dist/types-ts4.5/mark/index.d.ts +1 -1
  269. package/dist/types-ts4.5/media-inline/index.d.ts +1 -1
  270. package/dist/types-ts4.5/media-inline/views/frame.d.ts +1 -1
  271. package/dist/types-ts4.5/messages/card.d.ts +20 -0
  272. package/dist/types-ts4.5/portal/index.d.ts +1 -1
  273. package/dist/types-ts4.5/preset/index.d.ts +1 -1
  274. package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +1 -1
  275. package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +2 -1
  276. package/dist/types-ts4.5/provider-factory.d.ts +2 -2
  277. package/dist/types-ts4.5/react-node-view/index.d.ts +1 -1
  278. package/dist/types-ts4.5/selection/index.d.ts +2 -2
  279. package/dist/types-ts4.5/styles/index.d.ts +4 -4
  280. package/dist/types-ts4.5/types/feature-flags.d.ts +6 -6
  281. package/dist/types-ts4.5/types/index.d.ts +12 -12
  282. package/dist/types-ts4.5/types/performance-tracking.d.ts +4 -4
  283. package/dist/types-ts4.5/ufo/index.d.ts +1 -1
  284. package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +1 -1
  285. package/dist/types-ts4.5/ui/FloatingToolbar/styles.d.ts +4 -4
  286. package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +1 -1
  287. package/dist/types-ts4.5/ui/index.d.ts +4 -4
  288. package/dist/types-ts4.5/ui-color/index.d.ts +1 -1
  289. package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -1
  290. package/dist/types-ts4.5/utils/index.d.ts +6 -6
  291. package/dist/types-ts4.5/validator.d.ts +1 -1
  292. package/package.json +4 -6
  293. package/report.api.md +6 -5
@@ -15,70 +15,70 @@ const wrapRight = '[layout="wrap-right"]';
15
15
 
16
16
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- This needs manual remediation, it autofixes seemingly safely, but the code style and readability is destroyed.
17
17
  export const gapCursorStyles = css`
18
- /* =============== GAP CURSOR ================== */
19
- .ProseMirror {
20
- &.${hideCaretModifier} {
21
- caret-color: transparent;
22
- }
18
+ /* =============== GAP CURSOR ================== */
19
+ .ProseMirror {
20
+ &.${hideCaretModifier} {
21
+ caret-color: transparent;
22
+ }
23
23
 
24
- ${gapCursor} {
25
- display: none;
26
- pointer-events: none;
27
- position: relative;
24
+ ${gapCursor} {
25
+ display: none;
26
+ pointer-events: none;
27
+ position: relative;
28
28
 
29
- & span {
30
- caret-color: transparent;
31
- position: absolute;
32
- height: 100%;
33
- width: 100%;
34
- display: block;
35
- }
29
+ & span {
30
+ caret-color: transparent;
31
+ position: absolute;
32
+ height: 100%;
33
+ width: 100%;
34
+ display: block;
35
+ }
36
36
 
37
- & span::after {
38
- animation: 1s ${gapCursorBlink} step-end infinite;
39
- border-left: 1px solid;
40
- content: '';
41
- display: block;
42
- position: absolute;
43
- top: 0;
44
- height: 100%;
45
- }
46
- &.-left span::after {
47
- left: ${"var(--ds-space-negative-050, -4px)"};
48
- }
49
- &.-right span::after {
50
- right: ${"var(--ds-space-negative-050, -4px)"};
51
- }
52
- & span[layout='full-width'],
53
- & span[layout='wide'],
54
- & span[layout='fixed-width'] {
55
- margin-left: 50%;
56
- transform: translateX(-50%);
57
- }
58
- &${wrapRight} {
59
- float: right;
60
- }
37
+ & span::after {
38
+ animation: 1s ${gapCursorBlink} step-end infinite;
39
+ border-left: 1px solid;
40
+ content: '';
41
+ display: block;
42
+ position: absolute;
43
+ top: 0;
44
+ height: 100%;
45
+ }
46
+ &.-left span::after {
47
+ left: ${"var(--ds-space-negative-050, -4px)"};
48
+ }
49
+ &.-right span::after {
50
+ right: ${"var(--ds-space-negative-050, -4px)"};
51
+ }
52
+ & span[layout='full-width'],
53
+ & span[layout='wide'],
54
+ & span[layout='fixed-width'] {
55
+ margin-left: 50%;
56
+ transform: translateX(-50%);
57
+ }
58
+ &${wrapRight} {
59
+ float: right;
60
+ }
61
61
 
62
- /* fix vertical alignment of gap cursor */
63
- &:first-of-type + ul,
64
- &:first-of-type + span + ul,
65
- &:first-of-type + ol,
66
- &:first-of-type + span + ol,
67
- &:first-of-type + pre,
68
- &:first-of-type + span + pre,
69
- &:first-of-type + blockquote,
70
- &:first-of-type + span + blockquote {
71
- margin-top: 0;
72
- }
73
- }
74
- &.ProseMirror-focused ${gapCursor} {
75
- display: block;
76
- border-color: transparent;
77
- }
78
- }
62
+ /* fix vertical alignment of gap cursor */
63
+ &:first-of-type + ul,
64
+ &:first-of-type + span + ul,
65
+ &:first-of-type + ol,
66
+ &:first-of-type + span + ol,
67
+ &:first-of-type + pre,
68
+ &:first-of-type + span + pre,
69
+ &:first-of-type + blockquote,
70
+ &:first-of-type + span + blockquote {
71
+ margin-top: 0;
72
+ }
73
+ }
74
+ &.ProseMirror-focused ${gapCursor} {
75
+ display: block;
76
+ border-color: transparent;
77
+ }
78
+ }
79
79
 
80
- /* This hack below is for two images aligned side by side */
81
- ${gapCursor}${wrapLeft} + span + ${wrapLeft},
80
+ /* This hack below is for two images aligned side by side */
81
+ ${gapCursor}${wrapLeft} + span + ${wrapLeft},
82
82
  ${gapCursor}${wrapRight} + span + ${wrapRight},
83
83
  ${gapCursor} + ${wrapLeft} + ${wrapRight},
84
84
  ${gapCursor} + ${wrapLeft} + span + ${wrapRight},
@@ -89,10 +89,10 @@ export const gapCursorStyles = css`
89
89
  ${wrapRight} + ${gapCursor} + ${wrapLeft},
90
90
  ${wrapRight} + ${gapCursor} + span + ${wrapLeft},
91
91
  ${wrapLeft} + ${gapCursor} {
92
- clear: none;
93
- }
92
+ clear: none;
93
+ }
94
94
 
95
- ${wrapLeft} + ${gapCursor} + ${wrapRight} > div,
95
+ ${wrapLeft} + ${gapCursor} + ${wrapRight} > div,
96
96
  ${wrapLeft} + ${gapCursor} + span + ${wrapRight} > div,
97
97
  ${wrapRight} + ${gapCursor} + ${wrapLeft} > div,
98
98
  ${wrapRight} + ${gapCursor} + span + ${wrapLeft} > div,
@@ -100,31 +100,31 @@ export const gapCursorStyles = css`
100
100
  ${gapCursor} + ${wrapRight} + span + ${wrapLeft} > div,
101
101
  ${gapCursor} + ${wrapLeft} + ${wrapRight} > div,
102
102
  ${gapCursor} + ${wrapLeft} + span + ${wrapRight} > div {
103
- margin-right: 0;
104
- margin-left: 0;
105
- margin-bottom: 0;
106
- }
103
+ margin-right: 0;
104
+ margin-left: 0;
105
+ margin-bottom: 0;
106
+ }
107
107
 
108
- ${wrapLeft} + ${gapCursor},
108
+ ${wrapLeft} + ${gapCursor},
109
109
  ${wrapRight} + ${gapCursor} {
110
- float: left;
111
- }
110
+ float: left;
111
+ }
112
112
 
113
- ${gapCursor} + ${wrapLeft} + span + ${wrapRight}::after,
113
+ ${gapCursor} + ${wrapLeft} + span + ${wrapRight}::after,
114
114
  ${gapCursor} + ${wrapRight} + span + ${wrapLeft}::after,
115
115
  ${wrapLeft} + ${gapCursor} + ${wrapRight}::after,
116
116
  ${wrapLeft} + ${gapCursor} + span + ${wrapRight}::after,
117
117
  ${wrapRight} + ${gapCursor} + ${wrapLeft}::after,
118
118
  ${wrapRight} + ${gapCursor} + span + ${wrapLeft}::after {
119
- visibility: hidden;
120
- display: block;
121
- font-size: 0;
122
- content: ' ';
123
- clear: both;
124
- height: 0;
125
- }
119
+ visibility: hidden;
120
+ display: block;
121
+ font-size: 0;
122
+ content: ' ';
123
+ clear: both;
124
+ height: 0;
125
+ }
126
126
 
127
- ${wrapLeft} + ${gapCursor} + ${wrapRight} + *,
127
+ ${wrapLeft} + ${gapCursor} + ${wrapRight} + *,
128
128
  ${wrapLeft} + ${gapCursor} + ${wrapRight} + span + *,
129
129
  ${wrapRight} + ${gapCursor} + ${wrapLeft} + *,
130
130
  ${wrapRight} + ${gapCursor} + ${wrapLeft} + span + *,
@@ -142,6 +142,6 @@ export const gapCursorStyles = css`
142
142
  ${gapCursor} + ${wrapRight} + span + ${wrapLeft} + * > *,
143
143
  ${prosemirrorwidget} + ${gapCursor} + *,
144
144
  ${prosemirrorwidget} + ${gapCursor} + span + * {
145
- margin-top: 0;
146
- }
145
+ margin-top: 0;
146
+ }
147
147
  `;
@@ -60,18 +60,18 @@ export const AnnotationSharedCSSByState = () => getBooleanFF('platform.editor.al
60
60
 
61
61
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
62
62
  export const annotationSharedStyles = () => css`
63
- .ProseMirror {
64
- .${AnnotationSharedClassNames.focus} {
65
- ${AnnotationSharedCSSByState().focus};
66
- }
63
+ .ProseMirror {
64
+ .${AnnotationSharedClassNames.focus} {
65
+ ${AnnotationSharedCSSByState().focus};
66
+ }
67
67
 
68
- .${AnnotationSharedClassNames.draft} {
69
- ${AnnotationSharedCSSByState().focus};
70
- cursor: initial;
71
- }
68
+ .${AnnotationSharedClassNames.draft} {
69
+ ${AnnotationSharedCSSByState().focus};
70
+ cursor: initial;
71
+ }
72
72
 
73
- .${AnnotationSharedClassNames.blur} {
74
- ${AnnotationSharedCSSByState().blur};
75
- }
76
- }
73
+ .${AnnotationSharedClassNames.blur} {
74
+ ${AnnotationSharedCSSByState().blur};
75
+ }
76
+ }
77
77
  `;
@@ -1,11 +1,11 @@
1
1
  /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Perfectly safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing */
2
2
  import { css } from '@emotion/react';
3
3
  export const blockMarksSharedStyles = css`
4
- /**
4
+ /**
5
5
  * We need to remove margin-top from first item
6
6
  * inside doc, tableCell, tableHeader, blockquote, etc.
7
7
  */
8
- *:not(.fabric-editor-block-mark) >,
8
+ *:not(.fabric-editor-block-mark) >,
9
9
  /* For nested block marks apart from those with indentation mark */
10
10
  *:not(.fabric-editor-block-mark) >
11
11
  div.fabric-editor-block-mark:first-of-type
@@ -17,18 +17,18 @@ export const blockMarksSharedStyles = css`
17
17
  .fabric-editor-alignment:first-of-type:first-child,
18
18
  // If first document element has indentation mark remove margin-top
19
19
  .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child {
20
- p,
21
- h1,
22
- h2,
23
- h3,
24
- h4,
25
- h5,
26
- h6,
27
- .heading-wrapper {
28
- :first-child:not(style),
29
- style:first-child + * {
30
- margin-top: 0;
31
- }
32
- }
33
- }
20
+ p,
21
+ h1,
22
+ h2,
23
+ h3,
24
+ h4,
25
+ h5,
26
+ h6,
27
+ .heading-wrapper {
28
+ :first-child:not(style),
29
+ style:first-child + * {
30
+ margin-top: 0;
31
+ }
32
+ }
33
+ }
34
34
  `;
@@ -13,111 +13,123 @@ export const CodeBlockSharedCssClassName = {
13
13
  DS_CODEBLOCK: '[data-ds--code--code-block]'
14
14
  };
15
15
  export const codeBlockSharedStyles = () => css`
16
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
17
- position: relative;
18
- background-color: ${"var(--ds-surface-raised, transparent)"};
19
- border-radius: ${"var(--ds-border-radius, 3px)"};
20
- margin: ${blockNodesVerticalMargin} 0 0 0;
21
- font-family: ${akEditorCodeFontFamily};
22
- min-width: ${akEditorTableCellMinWidth}px;
23
- cursor: pointer;
16
+ .${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
17
+ position: relative;
18
+ background-color: ${"var(--ds-surface-raised, transparent)"};
19
+ border-radius: ${"var(--ds-border-radius, 3px)"};
20
+ margin: ${blockNodesVerticalMargin} 0 0 0;
21
+ font-family: ${akEditorCodeFontFamily};
22
+ min-width: ${akEditorTableCellMinWidth}px;
23
+ cursor: pointer;
24
24
 
25
- --ds--code--bg-color: transparent;
25
+ --ds--code--bg-color: transparent;
26
26
 
27
- /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */
28
- white-space: normal;
27
+ /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */
28
+ white-space: normal;
29
29
 
30
- .${CodeBlockSharedCssClassName.CODEBLOCK_START} {
31
- position: absolute;
32
- visibility: hidden;
33
- height: 1.5rem;
34
- top: 0px;
35
- left: 0px;
36
- }
30
+ .${CodeBlockSharedCssClassName.CODEBLOCK_START} {
31
+ position: absolute;
32
+ visibility: hidden;
33
+ height: 1.5rem;
34
+ top: 0px;
35
+ left: 0px;
36
+ }
37
37
 
38
- .${CodeBlockSharedCssClassName.CODEBLOCK_END} {
39
- position: absolute;
40
- visibility: hidden;
41
- height: 1.5rem;
42
- bottom: 0px;
43
- right: 0px;
44
- }
38
+ .${CodeBlockSharedCssClassName.CODEBLOCK_END} {
39
+ position: absolute;
40
+ visibility: hidden;
41
+ height: 1.5rem;
42
+ bottom: 0px;
43
+ right: 0px;
44
+ }
45
45
 
46
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
47
- background-color: ${`var(--ds-background-neutral, ${N20})`};
48
- display: flex;
49
- border-radius: ${"var(--ds-border-radius, 3px)"};
50
- width: 100%;
51
- counter-reset: line;
52
- overflow-x: auto;
46
+ .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
47
+ background-color: ${`var(--ds-background-neutral, ${N20})`};
48
+ display: flex;
49
+ border-radius: ${"var(--ds-border-radius, 3px)"};
50
+ width: 100%;
51
+ counter-reset: line;
52
+ overflow-x: auto;
53
53
 
54
- background-image: ${overflowShadow({
54
+ background-image: ${overflowShadow({
55
55
  leftCoverWidth: "var(--ds-space-300, 24px)"
56
56
  })};
57
57
 
58
- background-repeat: no-repeat;
59
- background-attachment: local, local, local, local, scroll, scroll, scroll,
60
- scroll;
61
- background-size: ${"var(--ds-space-300, 24px)"} 100%,
62
- ${"var(--ds-space-300, 24px)"} 100%, ${"var(--ds-space-100, 8px)"} 100%,
63
- ${"var(--ds-space-100, 8px)"} 100%, ${"var(--ds-space-100, 8px)"} 100%,
64
- 1px 100%, ${"var(--ds-space-100, 8px)"} 100%, 1px 100%;
65
- background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;
58
+ background-repeat: no-repeat;
59
+ background-attachment: local, local, local, local, scroll, scroll, scroll, scroll;
60
+ background-size:
61
+ ${"var(--ds-space-300, 24px)"} 100%,
62
+ ${"var(--ds-space-300, 24px)"} 100%,
63
+ ${"var(--ds-space-100, 8px)"} 100%,
64
+ ${"var(--ds-space-100, 8px)"} 100%,
65
+ ${"var(--ds-space-100, 8px)"} 100%,
66
+ 1px 100%,
67
+ ${"var(--ds-space-100, 8px)"} 100%,
68
+ 1px 100%;
69
+ background-position:
70
+ 0 0,
71
+ 0 0,
72
+ 100% 0,
73
+ 100% 0,
74
+ 100% 0,
75
+ 100% 0,
76
+ 0 0,
77
+ 0 0;
66
78
 
67
- /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */
68
- overflow-y: hidden;
69
- }
79
+ /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */
80
+ overflow-y: hidden;
81
+ }
70
82
 
71
- .${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
72
- flex-shrink: 0;
73
- text-align: right;
74
- background-color: ${`var(--ds-background-neutral, ${N30})`};
75
- padding: ${"var(--ds-space-100, 8px)"};
76
- position: relative;
83
+ .${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
84
+ flex-shrink: 0;
85
+ text-align: right;
86
+ background-color: ${`var(--ds-background-neutral, ${N30})`};
87
+ padding: ${"var(--ds-space-100, 8px)"};
88
+ position: relative;
77
89
 
78
- span {
79
- display: block;
80
- line-height: 0;
81
- font-size: 0;
90
+ span {
91
+ display: block;
92
+ line-height: 0;
93
+ font-size: 0;
82
94
 
83
- ::before {
84
- display: inline-block;
85
- content: counter(line);
86
- counter-increment: line;
87
- color: ${`var(--ds-text-subtlest, ${N400})`};
88
- font-size: ${relativeFontSizeToBase16(fontSize())};
89
- line-height: 1.5rem;
90
- }
91
- }
92
- }
95
+ ::before {
96
+ display: inline-block;
97
+ content: counter(line);
98
+ counter-increment: line;
99
+ color: ${`var(--ds-text-subtlest, ${N400})`};
100
+ font-size: ${relativeFontSizeToBase16(fontSize())};
101
+ line-height: 1.5rem;
102
+ }
103
+ }
104
+ }
93
105
 
94
- .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
95
- display: flex;
96
- flex: 1;
106
+ .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
107
+ display: flex;
108
+ flex: 1;
97
109
 
98
- code {
99
- flex-grow: 1;
100
- tab-size: 4;
101
- cursor: text;
102
- color: ${`var(--ds-text, ${N800})`};
103
- border-radius: ${"var(--ds-border-radius, 3px)"};
104
- margin: ${"var(--ds-space-100, 8px)"};
105
- white-space: pre;
106
- font-size: ${relativeFontSizeToBase16(fontSize())};
107
- line-height: 1.5rem;
108
- }
109
- }
110
- }
110
+ code {
111
+ flex-grow: 1;
112
+ tab-size: 4;
113
+ cursor: text;
114
+ color: ${`var(--ds-text, ${N800})`};
115
+ border-radius: ${"var(--ds-border-radius, 3px)"};
116
+ margin: ${"var(--ds-space-100, 8px)"};
117
+ white-space: pre;
118
+ font-size: ${relativeFontSizeToBase16(fontSize())};
119
+ line-height: 1.5rem;
120
+ }
121
+ }
122
+ }
111
123
  `;
112
124
  export const codeBlockInListSafariFix = css`
113
- ::before {
114
- content: ' ';
115
- line-height: ${akEditorLineHeight};
116
- }
125
+ ::before {
126
+ content: ' ';
127
+ line-height: ${akEditorLineHeight};
128
+ }
117
129
 
118
- > p:first-child,
119
- > .code-block:first-child,
120
- > .ProseMirror-gapcursor:first-child + .code-block {
121
- margin-top: -${akEditorLineHeight}em !important;
122
- }
130
+ > p:first-child,
131
+ > .code-block:first-child,
132
+ > .ProseMirror-gapcursor:first-child + .code-block {
133
+ margin-top: -${akEditorLineHeight}em !important;
134
+ }
123
135
  `;