@atlaskit/renderer 108.0.0 → 108.1.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 (321) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/actions/package.json +2 -2
  3. package/consts/package.json +2 -2
  4. package/dist/cjs/react/marks/link.js +12 -2
  5. package/dist/cjs/react/nodes/blockCard.js +12 -2
  6. package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +1 -1
  7. package/dist/cjs/react/nodes/embedCard.js +12 -2
  8. package/dist/cjs/react/nodes/inlineCard.js +16 -4
  9. package/dist/cjs/ui/Expand.js +8 -7
  10. package/dist/cjs/ui/Renderer/ErrorBoundary.js +8 -1
  11. package/dist/cjs/ui/Renderer/index.js +34 -23
  12. package/dist/cjs/ui/Renderer/style.js +11 -4
  13. package/dist/cjs/ui/SortingIcon.js +1 -2
  14. package/dist/cjs/version.json +1 -1
  15. package/dist/es2019/react/marks/link.js +12 -2
  16. package/dist/es2019/react/nodes/blockCard.js +12 -2
  17. package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +2 -2
  18. package/dist/es2019/react/nodes/embedCard.js +12 -2
  19. package/dist/es2019/react/nodes/inlineCard.js +16 -4
  20. package/dist/es2019/ui/Expand.js +8 -5
  21. package/dist/es2019/ui/Renderer/ErrorBoundary.js +8 -1
  22. package/dist/es2019/ui/Renderer/index.js +34 -23
  23. package/dist/es2019/ui/Renderer/style.js +33 -16
  24. package/dist/es2019/ui/SortingIcon.js +1 -2
  25. package/dist/es2019/version.json +1 -1
  26. package/dist/esm/react/marks/link.js +12 -2
  27. package/dist/esm/react/nodes/blockCard.js +12 -2
  28. package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +2 -2
  29. package/dist/esm/react/nodes/embedCard.js +12 -2
  30. package/dist/esm/react/nodes/inlineCard.js +16 -4
  31. package/dist/esm/ui/Expand.js +8 -7
  32. package/dist/esm/ui/Renderer/ErrorBoundary.js +8 -1
  33. package/dist/esm/ui/Renderer/index.js +34 -23
  34. package/dist/esm/ui/Renderer/style.js +11 -4
  35. package/dist/esm/ui/SortingIcon.js +1 -2
  36. package/dist/esm/version.json +1 -1
  37. package/dist/types/actions/index.d.ts +4 -4
  38. package/dist/types/analytics/enums.d.ts +1 -1
  39. package/dist/types/analytics/events.d.ts +29 -29
  40. package/dist/types/analytics/unsupported-content.d.ts +2 -2
  41. package/dist/types/i18n/cs.d.ts +6 -6
  42. package/dist/types/i18n/da.d.ts +6 -6
  43. package/dist/types/i18n/de.d.ts +6 -6
  44. package/dist/types/i18n/en.d.ts +6 -6
  45. package/dist/types/i18n/en_GB.d.ts +6 -6
  46. package/dist/types/i18n/en_ZZ.d.ts +6 -6
  47. package/dist/types/i18n/es.d.ts +6 -6
  48. package/dist/types/i18n/et.d.ts +1 -1
  49. package/dist/types/i18n/fi.d.ts +6 -6
  50. package/dist/types/i18n/fr.d.ts +6 -6
  51. package/dist/types/i18n/hu.d.ts +6 -6
  52. package/dist/types/i18n/it.d.ts +6 -6
  53. package/dist/types/i18n/ja.d.ts +6 -6
  54. package/dist/types/i18n/ko.d.ts +6 -6
  55. package/dist/types/i18n/nb.d.ts +6 -6
  56. package/dist/types/i18n/nl.d.ts +6 -6
  57. package/dist/types/i18n/pl.d.ts +6 -6
  58. package/dist/types/i18n/pt_BR.d.ts +6 -6
  59. package/dist/types/i18n/pt_PT.d.ts +1 -1
  60. package/dist/types/i18n/ru.d.ts +6 -6
  61. package/dist/types/i18n/sk.d.ts +1 -1
  62. package/dist/types/i18n/sv.d.ts +6 -6
  63. package/dist/types/i18n/th.d.ts +6 -6
  64. package/dist/types/i18n/tr.d.ts +6 -6
  65. package/dist/types/i18n/uk.d.ts +6 -6
  66. package/dist/types/i18n/vi.d.ts +6 -6
  67. package/dist/types/i18n/zh.d.ts +6 -6
  68. package/dist/types/i18n/zh_TW.d.ts +6 -6
  69. package/dist/types/react/hooks/use-observed-width.d.ts +2 -2
  70. package/dist/types/react/nodes/codeBlock/components/codeBlockCopyButton.d.ts +1 -1
  71. package/dist/types/react/nodes/codeBlock/components/codeBlockWrapButton.d.ts +1 -1
  72. package/dist/types/react/nodes/extension.d.ts +3 -3
  73. package/dist/types/react/nodes/fallback.d.ts +1 -1
  74. package/dist/types/react/nodes/heading-anchor.d.ts +2 -2
  75. package/dist/types/react/nodes/heading.d.ts +1 -1
  76. package/dist/types/react/nodes/index.d.ts +1 -1
  77. package/dist/types/react/nodes/media.d.ts +1 -1
  78. package/dist/types/react/nodes/mediaInline.d.ts +2 -2
  79. package/dist/types/react/nodes/table/sticky.d.ts +2 -2
  80. package/dist/types/react/nodes/table/table.d.ts +1 -1
  81. package/dist/types/react/nodes/table/types.d.ts +1 -1
  82. package/dist/types/react/nodes/table.d.ts +2 -2
  83. package/dist/types/react/nodes/tableCell.d.ts +2 -2
  84. package/dist/types/react/nodes/tableRow.d.ts +2 -2
  85. package/dist/types/react/nodes/text-wrapper.d.ts +1 -1
  86. package/dist/types/react/types.d.ts +2 -2
  87. package/dist/types/react/utils/getCardClickHandler.d.ts +1 -1
  88. package/dist/types/react/utils/performance/RenderTracking.d.ts +4 -4
  89. package/dist/types/render-document.d.ts +2 -2
  90. package/dist/types/renderer-context.d.ts +1 -1
  91. package/dist/types/text/nodes/index.d.ts +1 -1
  92. package/dist/types/types/mediaOptions.d.ts +1 -1
  93. package/dist/types/ui/Expand.d.ts +1 -1
  94. package/dist/types/ui/ExtensionRenderer.d.ts +2 -2
  95. package/dist/types/ui/MediaCard.d.ts +2 -2
  96. package/dist/types/ui/Renderer/ErrorBoundary.d.ts +1 -1
  97. package/dist/types/ui/Renderer/style.d.ts +2 -1
  98. package/dist/types/ui/Renderer/types.d.ts +6 -6
  99. package/dist/types/ui/RendererActionsContext/index.d.ts +1 -1
  100. package/dist/types/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +3 -3
  101. package/dist/types/ui/active-header-id-provider.d.ts +1 -1
  102. package/dist/types/ui/annotations/context.d.ts +4 -4
  103. package/dist/types/ui/annotations/draft/component.d.ts +2 -2
  104. package/dist/types/ui/annotations/draft/text.d.ts +1 -1
  105. package/dist/types/ui/annotations/element/index.d.ts +1 -1
  106. package/dist/types/ui/annotations/element/mark.d.ts +1 -1
  107. package/dist/types/ui/annotations/hooks/use-events.d.ts +3 -3
  108. package/dist/types/ui/annotations/hooks/use-inline-comments-filter.d.ts +1 -1
  109. package/dist/types/ui/annotations/hooks/use-load-annotations.d.ts +1 -1
  110. package/dist/types/ui/annotations/hooks/user-selection.d.ts +1 -1
  111. package/dist/types/ui/annotations/selection/mounter.d.ts +1 -1
  112. package/dist/types/ui/annotations/selection/range-validator.d.ts +1 -1
  113. package/dist/types/ui/annotations/selection/wrapper.d.ts +1 -1
  114. package/dist/types/ui/annotations/types.d.ts +3 -3
  115. package/dist/types/ui/annotations/view/index.d.ts +1 -1
  116. package/dist/types/utils.d.ts +2 -2
  117. package/dist/types-ts4.5/actions/index.d.ts +61 -0
  118. package/dist/types-ts4.5/actions/matches-utils.d.ts +7 -0
  119. package/dist/types-ts4.5/actions.d.ts +3 -0
  120. package/dist/types-ts4.5/analytics/analyticsContext.d.ts +6 -0
  121. package/dist/types-ts4.5/analytics/enums.d.ts +58 -0
  122. package/dist/types-ts4.5/analytics/events.d.ts +118 -0
  123. package/dist/types-ts4.5/analytics/unsupported-content.d.ts +10 -0
  124. package/dist/types-ts4.5/consts.d.ts +12 -0
  125. package/dist/types-ts4.5/i18n/cs.d.ts +20 -0
  126. package/dist/types-ts4.5/i18n/da.d.ts +20 -0
  127. package/dist/types-ts4.5/i18n/de.d.ts +20 -0
  128. package/dist/types-ts4.5/i18n/en.d.ts +20 -0
  129. package/dist/types-ts4.5/i18n/en_GB.d.ts +20 -0
  130. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +20 -0
  131. package/dist/types-ts4.5/i18n/es.d.ts +20 -0
  132. package/dist/types-ts4.5/i18n/et.d.ts +8 -0
  133. package/dist/types-ts4.5/i18n/fi.d.ts +20 -0
  134. package/dist/types-ts4.5/i18n/fr.d.ts +20 -0
  135. package/dist/types-ts4.5/i18n/hu.d.ts +20 -0
  136. package/dist/types-ts4.5/i18n/index.d.ts +31 -0
  137. package/dist/types-ts4.5/i18n/it.d.ts +20 -0
  138. package/dist/types-ts4.5/i18n/ja.d.ts +20 -0
  139. package/dist/types-ts4.5/i18n/ko.d.ts +20 -0
  140. package/dist/types-ts4.5/i18n/nb.d.ts +20 -0
  141. package/dist/types-ts4.5/i18n/nl.d.ts +20 -0
  142. package/dist/types-ts4.5/i18n/pl.d.ts +20 -0
  143. package/dist/types-ts4.5/i18n/pt_BR.d.ts +20 -0
  144. package/dist/types-ts4.5/i18n/pt_PT.d.ts +8 -0
  145. package/dist/types-ts4.5/i18n/ru.d.ts +20 -0
  146. package/dist/types-ts4.5/i18n/sk.d.ts +8 -0
  147. package/dist/types-ts4.5/i18n/sv.d.ts +20 -0
  148. package/dist/types-ts4.5/i18n/th.d.ts +20 -0
  149. package/dist/types-ts4.5/i18n/tr.d.ts +20 -0
  150. package/dist/types-ts4.5/i18n/uk.d.ts +20 -0
  151. package/dist/types-ts4.5/i18n/vi.d.ts +20 -0
  152. package/dist/types-ts4.5/i18n/zh.d.ts +20 -0
  153. package/dist/types-ts4.5/i18n/zh_TW.d.ts +20 -0
  154. package/dist/types-ts4.5/index.d.ts +11 -0
  155. package/dist/types-ts4.5/messages.d.ts +61 -0
  156. package/dist/types-ts4.5/react/hooks/use-bidi-warnings.d.ts +10 -0
  157. package/dist/types-ts4.5/react/hooks/use-in-viewport.d.ts +5 -0
  158. package/dist/types-ts4.5/react/hooks/use-observed-width.d.ts +3 -0
  159. package/dist/types-ts4.5/react/index.d.ts +124 -0
  160. package/dist/types-ts4.5/react/marks/alignment.d.ts +4 -0
  161. package/dist/types-ts4.5/react/marks/annotation.d.ts +6 -0
  162. package/dist/types-ts4.5/react/marks/breakout.d.ts +6 -0
  163. package/dist/types-ts4.5/react/marks/code.d.ts +16 -0
  164. package/dist/types-ts4.5/react/marks/confluence-inline-comment.d.ts +8 -0
  165. package/dist/types-ts4.5/react/marks/data-consumer.d.ts +4 -0
  166. package/dist/types-ts4.5/react/marks/em.d.ts +3 -0
  167. package/dist/types-ts4.5/react/marks/fragment.d.ts +4 -0
  168. package/dist/types-ts4.5/react/marks/indentation.d.ts +4 -0
  169. package/dist/types-ts4.5/react/marks/index.d.ts +21 -0
  170. package/dist/types-ts4.5/react/marks/link.d.ts +9 -0
  171. package/dist/types-ts4.5/react/marks/strike.d.ts +3 -0
  172. package/dist/types-ts4.5/react/marks/strong.d.ts +3 -0
  173. package/dist/types-ts4.5/react/marks/subsup.d.ts +4 -0
  174. package/dist/types-ts4.5/react/marks/textColor.d.ts +4 -0
  175. package/dist/types-ts4.5/react/marks/underline.d.ts +3 -0
  176. package/dist/types-ts4.5/react/marks/unsupportedMark.d.ts +3 -0
  177. package/dist/types-ts4.5/react/marks/unsupportedNodeAttribute.d.ts +3 -0
  178. package/dist/types-ts4.5/react/nodes/blockCard.d.ts +12 -0
  179. package/dist/types-ts4.5/react/nodes/blockquote.d.ts +2 -0
  180. package/dist/types-ts4.5/react/nodes/bodiedExtension.d.ts +24 -0
  181. package/dist/types-ts4.5/react/nodes/bulletList.d.ts +5 -0
  182. package/dist/types-ts4.5/react/nodes/caption.d.ts +4 -0
  183. package/dist/types-ts4.5/react/nodes/codeBlock/codeBlock.d.ts +15 -0
  184. package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockButtonContainer.d.ts +12 -0
  185. package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockContainer.d.ts +10 -0
  186. package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockCopyButton.d.ts +9 -0
  187. package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockWrapButton.d.ts +11 -0
  188. package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +9 -0
  189. package/dist/types-ts4.5/react/nodes/codeBlock/windowedCodeBlock.d.ts +4 -0
  190. package/dist/types-ts4.5/react/nodes/date.d.ts +11 -0
  191. package/dist/types-ts4.5/react/nodes/decisionItem.d.ts +3 -0
  192. package/dist/types-ts4.5/react/nodes/decisionList.d.ts +7 -0
  193. package/dist/types-ts4.5/react/nodes/doc.d.ts +3 -0
  194. package/dist/types-ts4.5/react/nodes/embedCard.d.ts +17 -0
  195. package/dist/types-ts4.5/react/nodes/emoji.d.ts +12 -0
  196. package/dist/types-ts4.5/react/nodes/extension.d.ts +113 -0
  197. package/dist/types-ts4.5/react/nodes/fallback.d.ts +16 -0
  198. package/dist/types-ts4.5/react/nodes/hardBreak.d.ts +6 -0
  199. package/dist/types-ts4.5/react/nodes/heading-anchor.d.ts +14 -0
  200. package/dist/types-ts4.5/react/nodes/heading.d.ts +14 -0
  201. package/dist/types-ts4.5/react/nodes/index.d.ts +95 -0
  202. package/dist/types-ts4.5/react/nodes/inline.d.ts +1 -0
  203. package/dist/types-ts4.5/react/nodes/inlineCard.d.ts +65 -0
  204. package/dist/types-ts4.5/react/nodes/inlineExtension.d.ts +18 -0
  205. package/dist/types-ts4.5/react/nodes/layoutColumn.d.ts +6 -0
  206. package/dist/types-ts4.5/react/nodes/layoutSection.d.ts +2 -0
  207. package/dist/types-ts4.5/react/nodes/listItem.d.ts +2 -0
  208. package/dist/types-ts4.5/react/nodes/media.d.ts +28 -0
  209. package/dist/types-ts4.5/react/nodes/mediaGroup.d.ts +29 -0
  210. package/dist/types-ts4.5/react/nodes/mediaInline.d.ts +26 -0
  211. package/dist/types-ts4.5/react/nodes/mediaSingle/index.d.ts +23 -0
  212. package/dist/types-ts4.5/react/nodes/mediaSingle/styles.d.ts +2 -0
  213. package/dist/types-ts4.5/react/nodes/mention.d.ts +13 -0
  214. package/dist/types-ts4.5/react/nodes/orderedList.d.ts +9 -0
  215. package/dist/types-ts4.5/react/nodes/panel.d.ts +17 -0
  216. package/dist/types-ts4.5/react/nodes/paragraph.d.ts +3 -0
  217. package/dist/types-ts4.5/react/nodes/placeholder.d.ts +6 -0
  218. package/dist/types-ts4.5/react/nodes/rule.d.ts +2 -0
  219. package/dist/types-ts4.5/react/nodes/status.d.ts +10 -0
  220. package/dist/types-ts4.5/react/nodes/table/colgroup.d.ts +9 -0
  221. package/dist/types-ts4.5/react/nodes/table/sticky.d.ts +38 -0
  222. package/dist/types-ts4.5/react/nodes/table/table.d.ts +7 -0
  223. package/dist/types-ts4.5/react/nodes/table/types.d.ts +7 -0
  224. package/dist/types-ts4.5/react/nodes/table.d.ts +269 -0
  225. package/dist/types-ts4.5/react/nodes/tableCell.d.ts +81 -0
  226. package/dist/types-ts4.5/react/nodes/tableRow.d.ts +24 -0
  227. package/dist/types-ts4.5/react/nodes/task-item-with-providers.d.ts +29 -0
  228. package/dist/types-ts4.5/react/nodes/taskItem.d.ts +19 -0
  229. package/dist/types-ts4.5/react/nodes/taskList.d.ts +8 -0
  230. package/dist/types-ts4.5/react/nodes/text-wrapper.d.ts +8 -0
  231. package/dist/types-ts4.5/react/nodes/unknownBlock.d.ts +2 -0
  232. package/dist/types-ts4.5/react/renderer-node.d.ts +4 -0
  233. package/dist/types-ts4.5/react/types.d.ts +58 -0
  234. package/dist/types-ts4.5/react/utils/clipboard.d.ts +1 -0
  235. package/dist/types-ts4.5/react/utils/element-selection.d.ts +9 -0
  236. package/dist/types-ts4.5/react/utils/getCardClickHandler.d.ts +2 -0
  237. package/dist/types-ts4.5/react/utils/inject-props.d.ts +6 -0
  238. package/dist/types-ts4.5/react/utils/links.d.ts +3 -0
  239. package/dist/types-ts4.5/react/utils/lists.d.ts +2 -0
  240. package/dist/types-ts4.5/react/utils/performance/RenderTracking.d.ts +15 -0
  241. package/dist/types-ts4.5/react/utils/use-select-all-trap.d.ts +2 -0
  242. package/dist/types-ts4.5/render-document.d.ts +23 -0
  243. package/dist/types-ts4.5/renderer-context.d.ts +7 -0
  244. package/dist/types-ts4.5/serializer.d.ts +4 -0
  245. package/dist/types-ts4.5/steps/index.d.ts +14 -0
  246. package/dist/types-ts4.5/text/index.d.ts +8 -0
  247. package/dist/types-ts4.5/text/nodes/blockquote.d.ts +3 -0
  248. package/dist/types-ts4.5/text/nodes/bulletList.d.ts +3 -0
  249. package/dist/types-ts4.5/text/nodes/date.d.ts +3 -0
  250. package/dist/types-ts4.5/text/nodes/decisionItem.d.ts +3 -0
  251. package/dist/types-ts4.5/text/nodes/hardBreak.d.ts +3 -0
  252. package/dist/types-ts4.5/text/nodes/heading.d.ts +3 -0
  253. package/dist/types-ts4.5/text/nodes/index.d.ts +6 -0
  254. package/dist/types-ts4.5/text/nodes/inlineCard.d.ts +3 -0
  255. package/dist/types-ts4.5/text/nodes/listItem.d.ts +3 -0
  256. package/dist/types-ts4.5/text/nodes/mediaGroup.d.ts +3 -0
  257. package/dist/types-ts4.5/text/nodes/mention.d.ts +3 -0
  258. package/dist/types-ts4.5/text/nodes/orderedList.d.ts +3 -0
  259. package/dist/types-ts4.5/text/nodes/panel.d.ts +3 -0
  260. package/dist/types-ts4.5/text/nodes/paragraph.d.ts +3 -0
  261. package/dist/types-ts4.5/text/nodes/rule.d.ts +3 -0
  262. package/dist/types-ts4.5/text/nodes/status.d.ts +3 -0
  263. package/dist/types-ts4.5/text/nodes/table.d.ts +3 -0
  264. package/dist/types-ts4.5/text/nodes/taskItem.d.ts +3 -0
  265. package/dist/types-ts4.5/text/nodes/unknown.d.ts +3 -0
  266. package/dist/types-ts4.5/text-serializer.d.ts +1 -0
  267. package/dist/types-ts4.5/types/i18n.d.ts +5 -0
  268. package/dist/types-ts4.5/types/mediaOptions.d.ts +12 -0
  269. package/dist/types-ts4.5/types/smartLinksOptions.d.ts +5 -0
  270. package/dist/types-ts4.5/ui/Expand.d.ts +23 -0
  271. package/dist/types-ts4.5/ui/ExtensionRenderer.d.ts +42 -0
  272. package/dist/types-ts4.5/ui/MediaCard.d.ts +77 -0
  273. package/dist/types-ts4.5/ui/Renderer/ErrorBoundary.d.ts +24 -0
  274. package/dist/types-ts4.5/ui/Renderer/breakout-ssr.d.ts +11 -0
  275. package/dist/types-ts4.5/ui/Renderer/click-to-edit.d.ts +6 -0
  276. package/dist/types-ts4.5/ui/Renderer/index.d.ts +38 -0
  277. package/dist/types-ts4.5/ui/Renderer/style.d.ts +16 -0
  278. package/dist/types-ts4.5/ui/Renderer/truncated-wrapper.d.ts +12 -0
  279. package/dist/types-ts4.5/ui/Renderer/types.d.ts +16 -0
  280. package/dist/types-ts4.5/ui/RendererActionsContext/WithRendererActions.d.ts +6 -0
  281. package/dist/types-ts4.5/ui/RendererActionsContext/index.d.ts +9 -0
  282. package/dist/types-ts4.5/ui/SmartCardStorage.d.ts +60 -0
  283. package/dist/types-ts4.5/ui/SortingIcon.d.ts +23 -0
  284. package/dist/types-ts4.5/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +15 -0
  285. package/dist/types-ts4.5/ui/TaskItemsFormatContext/index.d.ts +2 -0
  286. package/dist/types-ts4.5/ui/active-header-id-provider.d.ts +18 -0
  287. package/dist/types-ts4.5/ui/annotations/context.d.ts +27 -0
  288. package/dist/types-ts4.5/ui/annotations/draft/component.d.ts +20 -0
  289. package/dist/types-ts4.5/ui/annotations/draft/dom.d.ts +7 -0
  290. package/dist/types-ts4.5/ui/annotations/draft/index.d.ts +2 -0
  291. package/dist/types-ts4.5/ui/annotations/draft/position.d.ts +2 -0
  292. package/dist/types-ts4.5/ui/annotations/draft/text.d.ts +11 -0
  293. package/dist/types-ts4.5/ui/annotations/element/index.d.ts +10 -0
  294. package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +14 -0
  295. package/dist/types-ts4.5/ui/annotations/hooks/index.d.ts +3 -0
  296. package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +18 -0
  297. package/dist/types-ts4.5/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +1 -0
  298. package/dist/types-ts4.5/ui/annotations/hooks/use-inline-comments-filter.d.ts +9 -0
  299. package/dist/types-ts4.5/ui/annotations/hooks/use-load-annotations.d.ts +6 -0
  300. package/dist/types-ts4.5/ui/annotations/hooks/user-selection.d.ts +9 -0
  301. package/dist/types-ts4.5/ui/annotations/hooks/utils.d.ts +2 -0
  302. package/dist/types-ts4.5/ui/annotations/index.d.ts +5 -0
  303. package/dist/types-ts4.5/ui/annotations/selection/index.d.ts +1 -0
  304. package/dist/types-ts4.5/ui/annotations/selection/mounter.d.ts +20 -0
  305. package/dist/types-ts4.5/ui/annotations/selection/range-validator.d.ts +13 -0
  306. package/dist/types-ts4.5/ui/annotations/selection/wrapper.d.ts +8 -0
  307. package/dist/types-ts4.5/ui/annotations/types.d.ts +22 -0
  308. package/dist/types-ts4.5/ui/annotations/view/index.d.ts +7 -0
  309. package/dist/types-ts4.5/ui/index.d.ts +1 -0
  310. package/dist/types-ts4.5/ui/renderer-props.d.ts +104 -0
  311. package/dist/types-ts4.5/use-feature-flags.d.ts +2 -0
  312. package/dist/types-ts4.5/utils.d.ts +24 -0
  313. package/messages/package.json +2 -2
  314. package/package.json +29 -14
  315. package/render-document/package.json +2 -2
  316. package/renderer-context/package.json +2 -2
  317. package/report.api.md +4 -6
  318. package/serializer/package.json +2 -2
  319. package/text-serializer/package.json +2 -2
  320. package/use-feature-flags/package.json +2 -2
  321. package/utils/package.json +2 -2
@@ -10,6 +10,7 @@ import { getPlatform } from '../../utils';
10
10
  import { CardErrorBoundary } from './fallback';
11
11
  import { FullPagePadding } from '../../ui/Renderer/style';
12
12
  import { getCardClickHandler } from '../utils/getCardClickHandler';
13
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
13
14
  const embedCardWrapperStyles = css`
14
15
  width: 100%;
15
16
  height: 100%;
@@ -88,7 +89,16 @@ export default function EmbedCard(props) {
88
89
  }
89
90
  setAspectRatio(resolvedAspectRatio);
90
91
  };
91
- return jsx(WidthConsumer, null, ({
92
+ const analyticsData = {
93
+ attributes: {
94
+ location: 'renderer'
95
+ },
96
+ // Below is added for the future implementation of Linking Platform namespaced analytic context
97
+ location: 'renderer'
98
+ };
99
+ return jsx(AnalyticsContext, {
100
+ data: analyticsData
101
+ }, jsx(WidthConsumer, null, ({
92
102
  width: containerWidth,
93
103
  breakpoint
94
104
  }) => {
@@ -137,5 +147,5 @@ export default function EmbedCard(props) {
137
147
  inheritDimensions: true,
138
148
  embedIframeRef: embedIframeRef
139
149
  })))))));
140
- });
150
+ }));
141
151
  }
@@ -7,6 +7,7 @@ import { CardErrorBoundary } from './fallback';
7
7
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
8
8
  import { getCardClickHandler } from '../utils/getCardClickHandler';
9
9
  import { useFeatureFlags } from '../../use-feature-flags';
10
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
10
11
  const InlineCard = props => {
11
12
  const {
12
13
  url,
@@ -28,15 +29,26 @@ const InlineCard = props => {
28
29
  showServerActions,
29
30
  ssr
30
31
  } = smartLinks || {};
32
+ const analyticsData = {
33
+ attributes: {
34
+ location: 'renderer'
35
+ },
36
+ // Below is added for the future implementation of Linking Platform namespaced analytic context
37
+ location: 'renderer'
38
+ };
31
39
  if (ssr && url) {
32
- return /*#__PURE__*/React.createElement(CardSSR, {
40
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
41
+ data: analyticsData
42
+ }, /*#__PURE__*/React.createElement(CardSSR, {
33
43
  appearance: "inline",
34
44
  url: url,
35
45
  showAuthTooltip: showAuthTooltip,
36
46
  showServerActions: showServerActions
37
- });
47
+ }));
38
48
  }
39
- return /*#__PURE__*/React.createElement("span", {
49
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
50
+ data: analyticsData
51
+ }, /*#__PURE__*/React.createElement("span", {
40
52
  "data-inline-card": true,
41
53
  "data-card-data": data ? JSON.stringify(data) : undefined,
42
54
  "data-card-url": url
@@ -54,6 +66,6 @@ const InlineCard = props => {
54
66
  }
55
67
  props.smartCardStorage.set(data.url, data.title);
56
68
  }
57
- }))));
69
+ })))));
58
70
  };
59
71
  export default withSmartCardStorage(InlineCard);
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
  import React, { useRef, useCallback, useMemo } from 'react';
4
4
  import { css, jsx } from '@emotion/react';
5
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
5
6
  import { gridSize, fontSize } from '@atlaskit/theme/constants';
6
7
  import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
7
8
  import Tooltip from '@atlaskit/tooltip';
@@ -22,11 +23,11 @@ const titleStyles = css`
22
23
  display: flex;
23
24
  flex: 1;
24
25
  margin: 0;
25
- padding: 0 0 0 ${gridSize() / 2}px;
26
+ padding: 0 0 0 ${"var(--ds-space-050, 4px)"};
26
27
  text-align: left;
27
28
  `;
28
29
  const Container = props => {
29
- const paddingBottom = `${props.expanded ? gridSize() : 0}px`;
30
+ const paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
30
31
  const sharedContainerStyles = sharedExpandStyles.containerStyles(props);
31
32
  const styles = themeProps => css`
32
33
  ${sharedContainerStyles({
@@ -40,12 +41,12 @@ const Container = props => {
40
41
  }, props), props.children);
41
42
  };
42
43
  const TitleContainer = props => {
43
- const paddingBottom = `${!props.expanded ? gridSize() : 0}px`;
44
+ const paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
44
45
  const styles = themeProps => css`
45
46
  ${sharedExpandStyles.titleContainerStyles({
46
47
  theme: themeProps
47
48
  })}
48
- padding: ${gridSize()}px;
49
+ padding: ${"var(--ds-space-100, 8px)"};
49
50
  padding-bottom: ${paddingBottom};
50
51
  `;
51
52
  return jsx("button", _extends({
@@ -60,7 +61,9 @@ const ContentContainer = props => {
60
61
  ${sharedContentStyles({
61
62
  theme: themeProps
62
63
  })};
63
- padding-right: ${gridSize() * 2}px;
64
+ padding-right: ${"var(--ds-space-200, 16px)"};
65
+ // TODO: Migrate away from gridSize
66
+ // Recommendation: Replace gridSize with 8, or directly replace with 36px
64
67
  padding-left: ${gridSize() * 5 - gridSize() / 2}px;
65
68
  visibility: ${visibility};
66
69
  `;
@@ -1,8 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
- import { PLATFORM } from '../../analytics/events';
4
3
  import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
5
4
  import { FabricChannel } from '@atlaskit/analytics-listeners';
5
+ import { logException } from '@atlaskit/editor-common/monitoring';
6
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
+ import { PLATFORM } from '../../analytics/events';
6
8
  export class ErrorBoundary extends React.Component {
7
9
  constructor(...args) {
8
10
  super(...args);
@@ -41,6 +43,11 @@ export class ErrorBoundary extends React.Component {
41
43
  errorStack: error === null || error === void 0 ? void 0 : error.stack
42
44
  }
43
45
  });
46
+ if (getBooleanFF('platform.editor.sentry-error-monitoring_6bksu')) {
47
+ logException(error, {
48
+ location: 'renderer'
49
+ });
50
+ }
44
51
  if (this.hasFallback()) {
45
52
  this.setState({
46
53
  errorCaptured: true
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
35
35
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
36
36
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
37
37
  const packageName = "@atlaskit/renderer";
38
- const packageVersion = "108.0.0";
38
+ const packageVersion = "108.1.0";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -174,28 +174,35 @@ export class Renderer extends PureComponent {
174
174
  });
175
175
  this.rafID = requestAnimationFrame(() => {
176
176
  stopMeasure(`Renderer Render Time: ${this.id}`, duration => {
177
- var _analyticsEventSeveri, _analyticsEventSeveri2;
177
+ var _analyticsEventSeveri, _analyticsEventSeveri2, _this$props, _this$props$analytics;
178
178
  const {
179
179
  analyticsEventSeverityTracking
180
180
  } = this.props;
181
181
  const forceSeverityTracking = typeof analyticsEventSeverityTracking === 'undefined' && shouldForceTracking();
182
182
  const severity = !!forceSeverityTracking || analyticsEventSeverityTracking !== null && analyticsEventSeverityTracking !== void 0 && analyticsEventSeverityTracking.enabled ? getAnalyticsEventSeverity(duration, (_analyticsEventSeveri = analyticsEventSeverityTracking === null || analyticsEventSeverityTracking === void 0 ? void 0 : analyticsEventSeverityTracking.severityNormalThreshold) !== null && _analyticsEventSeveri !== void 0 ? _analyticsEventSeveri : NORMAL_SEVERITY_THRESHOLD, (_analyticsEventSeveri2 = analyticsEventSeverityTracking === null || analyticsEventSeverityTracking === void 0 ? void 0 : analyticsEventSeverityTracking.severityDegradedThreshold) !== null && _analyticsEventSeveri2 !== void 0 ? _analyticsEventSeveri2 : DEGRADED_SEVERITY_THRESHOLD) : undefined;
183
- this.fireAnalyticsEvent({
184
- action: ACTION.RENDERED,
185
- actionSubject: ACTION_SUBJECT.RENDERER,
186
- attributes: {
187
- platform: PLATFORM.WEB,
188
- duration,
189
- distortedDuration: this.renderedMeasurementDistortedDurationMonitor.distortedDuration,
190
- ttfb: getResponseEndTime(),
191
- nodes: reduce(this.props.document, (acc, node) => {
192
- acc[node.type] = (acc[node.type] || 0) + 1;
193
- return acc;
194
- }, {}),
195
- severity
196
- },
197
- eventType: EVENT_TYPE.OPERATIONAL
198
- });
183
+
184
+ // ED-16320: Check for explicit disable so that by default
185
+ // it will still be enabled as it currently is. Then we can
186
+ // progressively opt out synthetic tenants.
187
+ const isTTRTrackingExplicitlyDisabled = ((_this$props = this.props) === null || _this$props === void 0 ? void 0 : (_this$props$analytics = _this$props.analyticsEventSeverityTracking) === null || _this$props$analytics === void 0 ? void 0 : _this$props$analytics.enabled) === false;
188
+ if (!isTTRTrackingExplicitlyDisabled) {
189
+ this.fireAnalyticsEvent({
190
+ action: ACTION.RENDERED,
191
+ actionSubject: ACTION_SUBJECT.RENDERER,
192
+ attributes: {
193
+ platform: PLATFORM.WEB,
194
+ duration,
195
+ distortedDuration: this.renderedMeasurementDistortedDurationMonitor.distortedDuration,
196
+ ttfb: getResponseEndTime(),
197
+ nodes: reduce(this.props.document, (acc, node) => {
198
+ acc[node.type] = (acc[node.type] || 0) + 1;
199
+ return acc;
200
+ }, {}),
201
+ severity
202
+ },
203
+ eventType: EVENT_TYPE.OPERATIONAL
204
+ });
205
+ }
199
206
  this.renderedMeasurementDistortedDurationMonitor.cleanup();
200
207
  delete this.renderedMeasurementDistortedDurationMonitor;
201
208
  });
@@ -320,7 +327,7 @@ export class Renderer extends PureComponent {
320
327
  }
321
328
  };
322
329
  try {
323
- var _featureFlags$feature, _this$featureFlags, _this$featureFlags$fe, _this$featureFlags$fe2;
330
+ var _featureFlags$feature, _featureFlags$feature2, _this$featureFlags, _this$featureFlags$fe, _this$featureFlags$fe2;
324
331
  const schema = this.getSchema(this.props.schema, this.props.adfStage);
325
332
  const {
326
333
  result,
@@ -347,6 +354,7 @@ export class Renderer extends PureComponent {
347
354
  allowCustomPanels: allowCustomPanels,
348
355
  allowPlaceholderText: allowPlaceholderText,
349
356
  useFragmentMarkBreakoutWidthStylingFix: (_featureFlags$feature = featureFlags.featureFlags.useFragmentMarkBreakoutWidthStylingFix) !== null && _featureFlags$feature !== void 0 ? _featureFlags$feature : true,
357
+ useBlockRenderForCodeBlock: (_featureFlags$feature2 = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature2 !== void 0 ? _featureFlags$feature2 : true,
350
358
  innerRef: this.editorRef,
351
359
  onClick: handleWrapperOnClick,
352
360
  onMouseDown: this.onMouseDownEditView
@@ -369,7 +377,7 @@ export class Renderer extends PureComponent {
369
377
  });
370
378
  return jsx(Fragment, null, reRenderTracking, rendererResult);
371
379
  } catch (e) {
372
- var _featureFlags$feature2;
380
+ var _featureFlags$feature3, _featureFlags$feature4;
373
381
  if (onError) {
374
382
  onError(e);
375
383
  }
@@ -380,7 +388,8 @@ export class Renderer extends PureComponent {
380
388
  allowPlaceholderText: allowPlaceholderText,
381
389
  allowColumnSorting: allowColumnSorting,
382
390
  allowNestedHeaderLinks: allowNestedHeaderLinks,
383
- useFragmentMarkBreakoutWidthStylingFix: (_featureFlags$feature2 = featureFlags.featureFlags.useFragmentMarkBreakoutWidthStylingFix) !== null && _featureFlags$feature2 !== void 0 ? _featureFlags$feature2 : true,
391
+ useFragmentMarkBreakoutWidthStylingFix: (_featureFlags$feature3 = featureFlags.featureFlags.useFragmentMarkBreakoutWidthStylingFix) !== null && _featureFlags$feature3 !== void 0 ? _featureFlags$feature3 : true,
392
+ useBlockRenderForCodeBlock: (_featureFlags$feature4 = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature4 !== void 0 ? _featureFlags$feature4 : true,
384
393
  onClick: handleWrapperOnClick
385
394
  }, jsx(UnsupportedBlock, null));
386
395
  }
@@ -430,7 +439,8 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
430
439
  children,
431
440
  onClick,
432
441
  onMouseDown,
433
- useFragmentMarkBreakoutWidthStylingFix
442
+ useFragmentMarkBreakoutWidthStylingFix,
443
+ useBlockRenderForCodeBlock
434
444
  } = props;
435
445
  return jsx(WidthProvider, {
436
446
  className: "ak-renderer-wrapper"
@@ -444,7 +454,8 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
444
454
  appearance,
445
455
  allowNestedHeaderLinks,
446
456
  allowColumnSorting: !!allowColumnSorting,
447
- useFragmentMarkBreakoutWidthStylingFix
457
+ useFragmentMarkBreakoutWidthStylingFix,
458
+ useBlockRenderForCodeBlock
448
459
  })
449
460
  }, children)));
450
461
  });
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { themed } from '@atlaskit/theme/components';
3
- import { gridSize, fontFamily, fontSize } from '@atlaskit/theme/constants';
3
+ import { fontFamily, fontSize } from '@atlaskit/theme/constants';
4
4
  import * as colors from '@atlaskit/theme/colors';
5
5
  import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
6
6
  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';
@@ -302,6 +302,9 @@ export const rendererStyles = wrapperProps => theme => {
302
302
  const themeProps = {
303
303
  theme
304
304
  };
305
+ const {
306
+ useBlockRenderForCodeBlock
307
+ } = wrapperProps;
305
308
  return css`
306
309
  font-size: ${editorFontSize(themeProps)}px;
307
310
  line-height: 1.5rem;
@@ -419,7 +422,7 @@ export const rendererStyles = wrapperProps => theme => {
419
422
  & .renderer-image {
420
423
  max-width: 100%;
421
424
  display: block;
422
- margin: ${gridSize() * 3}px 0;
425
+ margin: ${"var(--ds-space-300, 24px)"} 0;
423
426
  }
424
427
 
425
428
  .${richMediaClassName}.rich-media-wrapped
@@ -633,12 +636,9 @@ export const rendererStyles = wrapperProps => theme => {
633
636
  max-width: 100%;
634
637
  /* -ms- properties are necessary until MS supports the latest version of the grid spec */
635
638
  /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */
636
- display: -ms-grid;
637
- display: grid;
638
- -ms-grid-columns: auto 1fr;
639
+ display: block;
639
640
  /* stylelint-enable */
640
641
 
641
- grid-template-columns: minmax(0, 1fr);
642
642
  position: relative;
643
643
  border-radius: ${"var(--ds-radius-100, 3px)"};
644
644
 
@@ -647,14 +647,6 @@ export const rendererStyles = wrapperProps => theme => {
647
647
  * code block line numbers in Safari / iOS.
648
648
  */
649
649
  word-wrap: normal;
650
-
651
- & > span {
652
- /* stylelint-disable value-no-vendor-prefix */
653
- -ms-grid-row: 1;
654
- -ms-grid-column: 2;
655
- /* stylelint-enable */
656
- grid-column: 1;
657
- }
658
650
  }
659
651
 
660
652
  & .MediaGroup,
@@ -666,13 +658,15 @@ export const rendererStyles = wrapperProps => theme => {
666
658
  }
667
659
  }
668
660
 
661
+ ${useGridRenderForCodeBlock(useBlockRenderForCodeBlock)}
662
+
669
663
  ${getLightWeightCodeBlockStylesForRootRendererStyleSheet()}
670
664
 
671
665
  ${columnLayoutSharedStyle};
672
666
  & [data-layout-section] {
673
- margin-top: ${gridSize() * 2.5}px;
667
+ margin-top: ${"var(--ds-space-250, 20px)"};
674
668
  & > div + div {
675
- margin-left: ${gridSize() * 4}px;
669
+ margin-left: ${"var(--ds-space-400, 32px)"};
676
670
  }
677
671
 
678
672
  @media screen and (max-width: ${gridMediumMaxWidth}px) {
@@ -708,4 +702,27 @@ export const rendererStyles = wrapperProps => theme => {
708
702
  ${browser.safari ? codeBlockInListSafariFix : ''}
709
703
  }
710
704
  `;
705
+ };
706
+ const useGridRenderForCodeBlock = codeBlockRenderAsBlock => {
707
+ if (codeBlockRenderAsBlock) {
708
+ return '';
709
+ }
710
+ return `& .code-block {
711
+ /* -ms- properties are necessary until MS supports the latest version of the grid spec */
712
+ /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */
713
+ display: -ms-grid;
714
+ display: grid;
715
+ -ms-grid-columns: auto 1fr;
716
+ /* stylelint-enable */
717
+
718
+ grid-template-columns: minmax(0, 1fr);
719
+
720
+ & > span {
721
+ /* stylelint-disable value-no-vendor-prefix */
722
+ -ms-grid-row: 1;
723
+ -ms-grid-column: 2;
724
+ /* stylelint-enable */
725
+ grid-column: 1;
726
+ }
727
+ }`;
711
728
  };
@@ -1,7 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { css, jsx } from '@emotion/react';
3
3
  import Tooltip from '@atlaskit/tooltip';
4
- import { gridSize } from '@atlaskit/theme/constants';
5
4
  import { N20, N30 } from '@atlaskit/theme/colors';
6
5
  import { SortOrder } from '@atlaskit/editor-common/types';
7
6
  import { sortingIconMessages } from '../messages';
@@ -23,7 +22,7 @@ const buttonStyles = css`
23
22
  right: 0;
24
23
  top: 0;
25
24
  border: 2px solid ${"var(--ds-border, #fff)"};
26
- border-radius: ${gridSize() / 2}px;
25
+ border-radius: ${"var(--ds-radius-100, 4px)"};
27
26
  background-color: ${`var(--ds-surface-overlay, ${N20})`};
28
27
  justify-content: center;
29
28
  align-items: center;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.0.0",
3
+ "version": "108.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -9,6 +9,7 @@ import { getEventHandler } from '../../utils';
9
9
  import { PLATFORM, MODE } from '../../analytics/events';
10
10
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
11
11
  import LinkUrl from '@atlaskit/smart-card/link-url';
12
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
12
13
  var anchorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n"])), "var(--ds-link, ".concat(B400, ")"), "var(--ds-link, ".concat(B300, ")"), "var(--ds-link-pressed, ".concat(B500, ")"));
13
14
  export default function Link(props) {
14
15
  var href = props.href,
@@ -29,7 +30,16 @@ export default function Link(props) {
29
30
  if (isMediaLink) {
30
31
  return jsx(Fragment, null, props.children);
31
32
  }
32
- return jsx(LinkUrl, _extends({
33
+ var analyticsData = {
34
+ attributes: {
35
+ location: 'renderer'
36
+ },
37
+ // Below is added for the future implementation of Linking Platform namespaced analytic context
38
+ location: 'renderer'
39
+ };
40
+ return jsx(AnalyticsContext, {
41
+ data: analyticsData
42
+ }, jsx(LinkUrl, _extends({
33
43
  css: anchorStyles,
34
44
  onClick: function onClick(e) {
35
45
  if (fireAnalyticsEvent) {
@@ -47,5 +57,5 @@ export default function Link(props) {
47
57
  handler(e, href);
48
58
  }
49
59
  }
50
- }, anchorProps, dataAttributes), props.children);
60
+ }, anchorProps, dataAttributes), props.children));
51
61
  }
@@ -5,6 +5,7 @@ import { UnsupportedBlock } from '@atlaskit/editor-common/ui';
5
5
  import { getPlatform } from '../../utils';
6
6
  import { CardErrorBoundary } from './fallback';
7
7
  import { getCardClickHandler } from '../utils/getCardClickHandler';
8
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
8
9
  export default function BlockCard(props) {
9
10
  var url = props.url,
10
11
  data = props.data,
@@ -24,7 +25,16 @@ export default function BlockCard(props) {
24
25
  onClick: onClick,
25
26
  container: portal
26
27
  };
27
- return /*#__PURE__*/React.createElement("div", {
28
+ var analyticsData = {
29
+ attributes: {
30
+ location: 'renderer'
31
+ },
32
+ // Below is added for the future implementation of Linking Platform namespaced analytic context
33
+ location: 'renderer'
34
+ };
35
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
36
+ data: analyticsData
37
+ }, /*#__PURE__*/React.createElement("div", {
28
38
  className: "blockCardView-content-wrap",
29
39
  "data-block-card": true,
30
40
  "data-card-data": data ? JSON.stringify(data) : undefined,
@@ -36,5 +46,5 @@ export default function BlockCard(props) {
36
46
  showActions: rendererAppearance !== 'mobile',
37
47
  platform: platform,
38
48
  showServerActions: showServerActions
39
- }, cardProps))));
49
+ }, cardProps)))));
40
50
  }
@@ -5,7 +5,7 @@ import { jsx, css } from '@emotion/react';
5
5
  import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
6
  import { N20, DN50 } from '@atlaskit/theme/colors';
7
7
  import { themed } from '@atlaskit/theme/components';
8
- import { fontSize, gridSize } from '@atlaskit/theme/constants';
8
+ import { fontSize } from '@atlaskit/theme/constants';
9
9
  import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
10
10
  import CodeBlockButtonContainer from './codeBlockButtonContainer';
11
11
  var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
@@ -17,7 +17,7 @@ var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
17
17
  light: "var(--ds-background-neutral, ".concat(N20, ")"),
18
18
  dark: "var(--ds-background-neutral, ".concat(DN50, ")")
19
19
  })(props),
20
- leftCoverWidth: "".concat(gridSize() * 3, "px")
20
+ leftCoverWidth: "var(--ds-space-300, 24px)"
21
21
  }));
22
22
  };
23
23
  var CodeBlockContainer = function CodeBlockContainer(_ref) {
@@ -13,6 +13,7 @@ import { getPlatform } from '../../utils';
13
13
  import { CardErrorBoundary } from './fallback';
14
14
  import { FullPagePadding } from '../../ui/Renderer/style';
15
15
  import { getCardClickHandler } from '../utils/getCardClickHandler';
16
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
16
17
  var embedCardWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n\n > div {\n height: 100%;\n }\n\n .loader-wrapper {\n height: 100%;\n }\n\n margin: 0 auto;\n"])));
17
18
  var uIMediaSingleLayoutStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: 50%;\n transform: translateX(-50%);\n"])));
18
19
  export default function EmbedCard(props) {
@@ -83,7 +84,16 @@ export default function EmbedCard(props) {
83
84
  }
84
85
  setAspectRatio(resolvedAspectRatio);
85
86
  };
86
- return jsx(WidthConsumer, null, function (_ref2) {
87
+ var analyticsData = {
88
+ attributes: {
89
+ location: 'renderer'
90
+ },
91
+ // Below is added for the future implementation of Linking Platform namespaced analytic context
92
+ location: 'renderer'
93
+ };
94
+ return jsx(AnalyticsContext, {
95
+ data: analyticsData
96
+ }, jsx(WidthConsumer, null, function (_ref2) {
87
97
  var containerWidth = _ref2.width,
88
98
  breakpoint = _ref2.breakpoint;
89
99
  var nonFullWidthSize = containerWidth;
@@ -131,5 +141,5 @@ export default function EmbedCard(props) {
131
141
  inheritDimensions: true,
132
142
  embedIframeRef: embedIframeRef
133
143
  })))))));
134
- });
144
+ }));
135
145
  }
@@ -7,6 +7,7 @@ import { CardErrorBoundary } from './fallback';
7
7
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
8
8
  import { getCardClickHandler } from '../utils/getCardClickHandler';
9
9
  import { useFeatureFlags } from '../../use-feature-flags';
10
+ import { AnalyticsContext } from '@atlaskit/analytics-next';
10
11
  var InlineCard = function InlineCard(props) {
11
12
  var url = props.url,
12
13
  data = props.data,
@@ -25,15 +26,26 @@ var InlineCard = function InlineCard(props) {
25
26
  showAuthTooltip = _ref.showAuthTooltip,
26
27
  showServerActions = _ref.showServerActions,
27
28
  ssr = _ref.ssr;
29
+ var analyticsData = {
30
+ attributes: {
31
+ location: 'renderer'
32
+ },
33
+ // Below is added for the future implementation of Linking Platform namespaced analytic context
34
+ location: 'renderer'
35
+ };
28
36
  if (ssr && url) {
29
- return /*#__PURE__*/React.createElement(CardSSR, {
37
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
38
+ data: analyticsData
39
+ }, /*#__PURE__*/React.createElement(CardSSR, {
30
40
  appearance: "inline",
31
41
  url: url,
32
42
  showAuthTooltip: showAuthTooltip,
33
43
  showServerActions: showServerActions
34
- });
44
+ }));
35
45
  }
36
- return /*#__PURE__*/React.createElement("span", {
46
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
47
+ data: analyticsData
48
+ }, /*#__PURE__*/React.createElement("span", {
37
49
  "data-inline-card": true,
38
50
  "data-card-data": data ? JSON.stringify(data) : undefined,
39
51
  "data-card-url": url
@@ -51,6 +63,6 @@ var InlineCard = function InlineCard(props) {
51
63
  }
52
64
  props.smartCardStorage.set(data.url, data.title);
53
65
  }
54
- }))));
66
+ })))));
55
67
  };
56
68
  export default withSmartCardStorage(InlineCard);
@@ -5,6 +5,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
5
  /** @jsx jsx */
6
6
  import React, { useRef, useCallback, useMemo } from 'react';
7
7
  import { css, jsx } from '@emotion/react';
8
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
8
9
  import { gridSize, fontSize } from '@atlaskit/theme/constants';
9
10
  import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
10
11
  import Tooltip from '@atlaskit/tooltip';
@@ -16,9 +17,9 @@ import { injectIntl } from 'react-intl-next';
16
17
  import { ActiveHeaderIdConsumer } from './active-header-id-provider';
17
18
  import _uniqueId from 'lodash/uniqueId';
18
19
  import { getPlatform } from '../utils';
19
- var titleStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n border: none;\n font-size: ", ";\n line-height: ", ";\n font-weight: normal;\n display: flex;\n flex: 1;\n margin: 0;\n padding: 0 0 0 ", "px;\n text-align: left;\n"])), relativeFontSizeToBase16(fontSize()), akEditorLineHeight, gridSize() / 2);
20
+ var titleStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n border: none;\n font-size: ", ";\n line-height: ", ";\n font-weight: normal;\n display: flex;\n flex: 1;\n margin: 0;\n padding: 0 0 0 ", ";\n text-align: left;\n"])), relativeFontSizeToBase16(fontSize()), akEditorLineHeight, "var(--ds-space-050, 4px)");
20
21
  var Container = function Container(props) {
21
- var paddingBottom = "".concat(props.expanded ? gridSize() : 0, "px");
22
+ var paddingBottom = props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
22
23
  var sharedContainerStyles = sharedExpandStyles.containerStyles(props);
23
24
  var styles = function styles(themeProps) {
24
25
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n padding: 0;\n padding-bottom: ", ";\n "])), sharedContainerStyles({
@@ -30,11 +31,11 @@ var Container = function Container(props) {
30
31
  }, props), props.children);
31
32
  };
32
33
  var TitleContainer = function TitleContainer(props) {
33
- var paddingBottom = "".concat(!props.expanded ? gridSize() : 0, "px");
34
+ var paddingBottom = !props.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)";
34
35
  var styles = function styles(themeProps) {
35
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n padding: ", "px;\n padding-bottom: ", ";\n "])), sharedExpandStyles.titleContainerStyles({
36
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n padding: ", ";\n padding-bottom: ", ";\n "])), sharedExpandStyles.titleContainerStyles({
36
37
  theme: themeProps
37
- }), gridSize(), paddingBottom);
38
+ }), "var(--ds-space-100, 8px)", paddingBottom);
38
39
  };
39
40
  return jsx("button", _extends({
40
41
  css: styles
@@ -45,9 +46,9 @@ var ContentContainer = function ContentContainer(props) {
45
46
  var sharedContentStyles = sharedExpandStyles.contentStyles(props);
46
47
  var visibility = props.expanded ? 'visible' : 'hidden';
47
48
  var styles = function styles(themeProps) {
48
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n padding-right: ", "px;\n padding-left: ", "px;\n visibility: ", ";\n "])), sharedContentStyles({
49
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n padding-right: ", ";\n // TODO: Migrate away from gridSize\n // Recommendation: Replace gridSize with 8, or directly replace with 36px\n padding-left: ", "px;\n visibility: ", ";\n "])), sharedContentStyles({
49
50
  theme: themeProps
50
- }), gridSize() * 2, gridSize() * 5 - gridSize() / 2, visibility);
51
+ }), "var(--ds-space-200, 16px)", gridSize() * 5 - gridSize() / 2, visibility);
51
52
  };
52
53
  return jsx("div", _extends({
53
54
  css: styles
@@ -8,9 +8,11 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
9
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
10
  import React from 'react';
11
- import { PLATFORM } from '../../analytics/events';
12
11
  import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
13
12
  import { FabricChannel } from '@atlaskit/analytics-listeners';
13
+ import { logException } from '@atlaskit/editor-common/monitoring';
14
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
+ import { PLATFORM } from '../../analytics/events';
14
16
  export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
15
17
  _inherits(ErrorBoundary, _React$Component);
16
18
  var _super = _createSuper(ErrorBoundary);
@@ -64,6 +66,11 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
64
66
  errorStack: error === null || error === void 0 ? void 0 : error.stack
65
67
  }
66
68
  });
69
+ if (getBooleanFF('platform.editor.sentry-error-monitoring_6bksu')) {
70
+ logException(error, {
71
+ location: 'renderer'
72
+ });
73
+ }
67
74
  if (this.hasFallback()) {
68
75
  this.setState({
69
76
  errorCaptured: true