@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
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { AnalyticsEventPayload } from '../analytics/events';
4
4
  import { WrappedComponentProps } from 'react-intl-next';
5
5
  import { RendererAppearance } from './Renderer/types';
6
- export declare type StyleProps = {
6
+ export type StyleProps = {
7
7
  expanded?: boolean;
8
8
  focused?: boolean;
9
9
  'data-node-type'?: 'expand' | 'nestedExpand';
@@ -32,9 +32,9 @@ export default class ExtensionRenderer extends React.Component<Props, State> {
32
32
  mounted: boolean;
33
33
  UNSAFE_componentWillMount(): void;
34
34
  componentWillUnmount(): void;
35
- handleProvider: (name: keyof State, providerPromise?: Promise<any> | undefined) => void;
35
+ handleProvider: (name: keyof State, providerPromise?: Promise<any>) => void;
36
36
  getNodeRenderer: import("memoize-one").MemoizedFn<typeof getNodeRenderer>;
37
- renderExtensionNode: (extensionProvider?: ExtensionProvider<any> | null | undefined) => JSX.Element;
37
+ renderExtensionNode: (extensionProvider?: ExtensionProvider | null) => JSX.Element;
38
38
  setupAndRenderExtensionNode: (providers: {
39
39
  extensionProvider?: Promise<ExtensionProvider<any>> | undefined;
40
40
  }) => JSX.Element;
@@ -10,7 +10,7 @@ import { MediaFeatureFlags } from '@atlaskit/media-common';
10
10
  import { RendererAppearance } from './Renderer/types';
11
11
  import { RendererContext } from '../react/types';
12
12
  import { MediaSSR } from '../types/mediaOptions';
13
- export declare type MediaProvider = {
13
+ export type MediaProvider = {
14
14
  viewMediaClientConfig: MediaClientConfig;
15
15
  };
16
16
  export interface MediaCardProps {
@@ -46,7 +46,7 @@ export interface State {
46
46
  contextIdentifierProvider?: ContextIdentifierProvider;
47
47
  fileState?: FileState;
48
48
  }
49
- export declare const getListOfIdentifiersFromDoc: (doc?: ADFEntity | undefined) => Identifier[];
49
+ export declare const getListOfIdentifiersFromDoc: (doc?: ADFEntity) => Identifier[];
50
50
  export declare class MediaCardInternal extends Component<MediaCardProps, State> {
51
51
  state: State;
52
52
  componentDidMount(): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { ComponentCrashErrorAEP } from '../../analytics/events';
3
2
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import { ComponentCrashErrorAEP } from '../../analytics/events';
4
4
  interface ErrorBoundaryProps {
5
5
  component: ComponentCrashErrorAEP['actionSubject'];
6
6
  componentId?: ComponentCrashErrorAEP['actionSubjectId'];
@@ -1,11 +1,12 @@
1
1
  import { Theme } from '@emotion/react';
2
2
  import { RendererAppearance } from './types';
3
3
  export declare const FullPagePadding = 32;
4
- export declare type RendererWrapperProps = {
4
+ export type RendererWrapperProps = {
5
5
  appearance?: RendererAppearance;
6
6
  allowNestedHeaderLinks: boolean;
7
7
  allowColumnSorting: boolean;
8
8
  useFragmentMarkBreakoutWidthStylingFix: boolean;
9
+ useBlockRenderForCodeBlock: boolean;
9
10
  };
10
11
  export declare const headingSizes: {
11
12
  [key: string]: {
@@ -1,16 +1,16 @@
1
1
  /// <reference types="react" />
2
- export declare type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
3
- export declare type StickyHeaderConfig = {
2
+ export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
3
+ export type StickyHeaderConfig = {
4
4
  offsetTop?: number;
5
5
  };
6
- export declare type StickyHeaderProps = boolean | ({
6
+ export type StickyHeaderProps = boolean | ({
7
7
  show?: boolean;
8
8
  } & StickyHeaderConfig);
9
- export declare type HeadingAnchorLinksConfig = {
9
+ export type HeadingAnchorLinksConfig = {
10
10
  activeHeadingId?: string;
11
11
  allowNestedHeaderLinks?: boolean;
12
12
  };
13
- export declare type NodeComponentsProps = {
13
+ export type NodeComponentsProps = {
14
14
  [key: string]: React.ComponentType<any>;
15
15
  };
16
- export declare type HeadingAnchorLinksProps = boolean | HeadingAnchorLinksConfig;
16
+ export type HeadingAnchorLinksProps = boolean | HeadingAnchorLinksConfig;
@@ -1,7 +1,7 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  import RendererActions from '../../actions/index';
3
3
  export declare const RendererContext: React.Context<RendererActions>;
4
- declare type RendererActionsContextProps = PropsWithChildren<{
4
+ type RendererActionsContextProps = PropsWithChildren<{
5
5
  context?: RendererActions;
6
6
  }>;
7
7
  export declare function RendererActionsContext({ children, context, }: RendererActionsContextProps): JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import React, { ReactNode } from 'react';
2
- export declare type TaskItemsDone = boolean | undefined;
3
- export declare type TaskItemsStateContext = [
2
+ export type TaskItemsDone = boolean | undefined;
3
+ export type TaskItemsStateContext = [
4
4
  TaskItemsDone,
5
5
  React.Dispatch<TaskItemsFormatReducerAction>
6
6
  ];
7
7
  export declare const TaskItemsFormatContext: React.Context<TaskItemsStateContext>;
8
- export declare type TaskItemsFormatReducerAction = boolean | undefined;
8
+ export type TaskItemsFormatReducerAction = boolean | undefined;
9
9
  export declare function TaskItemsFormatProvider({ children }: {
10
10
  children: ReactNode;
11
11
  }): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  declare const Provider: React.Provider<string | undefined>;
3
- declare type Props = {
3
+ type Props = {
4
4
  nestedHeaderIds: string[];
5
5
  onNestedHeaderIdMatch: () => void;
6
6
  };
@@ -2,15 +2,15 @@ import React from 'react';
2
2
  import { Position } from './types';
3
3
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
4
4
  import { AnnotationMarkStates } from '@atlaskit/adf-schema';
5
- declare type ChildrenProps = {
5
+ type ChildrenProps = {
6
6
  applyAnnotationDraftAt: (position: Position) => void;
7
7
  clearAnnotationDraft: () => void;
8
8
  };
9
- export declare type RenderCallbackType = React.FC<ChildrenProps>;
10
- declare type Props = {
9
+ export type RenderCallbackType = React.FC<ChildrenProps>;
10
+ type Props = {
11
11
  children: RenderCallbackType;
12
12
  };
13
- declare type State = {
13
+ type State = {
14
14
  position: Position | null;
15
15
  };
16
16
  export declare const AnnotationsDraftContext: React.Context<Position | null>;
@@ -4,14 +4,14 @@ import { InsertDraftPosition, Position } from '../types';
4
4
  export declare const AnnotationDraft: React.FC<{
5
5
  draftPosition: Position;
6
6
  }>;
7
- declare type ApplyAnnotationsProps = {
7
+ type ApplyAnnotationsProps = {
8
8
  texts: string[];
9
9
  shouldApplyAnnotationAt: InsertDraftPosition.INSIDE | InsertDraftPosition.START | InsertDraftPosition.END;
10
10
  draftPosition: Position;
11
11
  };
12
12
  export declare const getAnnotationIndex: (annotationPosition: InsertDraftPosition, fragmentCount: number) => number;
13
13
  export declare const applyAnnotationOnText: ({ texts, shouldApplyAnnotationAt, draftPosition, }: ApplyAnnotationsProps) => JSX.Element[];
14
- declare type Props = {
14
+ type Props = {
15
15
  startPos: number;
16
16
  endPos: number;
17
17
  children: string;
@@ -1,5 +1,5 @@
1
1
  import { TextPosition, Position } from '../types';
2
- declare type Offset = {
2
+ type Offset = {
3
3
  startOffset: number;
4
4
  endOffset: number;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AnnotationId, AnnotationDataAttributes, AnnotationTypes } from '@atlaskit/adf-schema';
3
- declare type MarkElementProps = {
3
+ type MarkElementProps = {
4
4
  id: AnnotationId;
5
5
  annotationParentIds: AnnotationId[];
6
6
  dataAttributes: AnnotationDataAttributes;
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import type { OnAnnotationClickPayload } from '@atlaskit/editor-common/types';
4
4
  import { AnnotationMarkStates, AnnotationId, AnnotationDataAttributes } from '@atlaskit/adf-schema';
5
- declare type MarkComponentProps = {
5
+ type MarkComponentProps = {
6
6
  id: AnnotationId;
7
7
  annotationParentIds: AnnotationId[];
8
8
  dataAttributes: AnnotationDataAttributes;
@@ -2,17 +2,17 @@ import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
2
2
  import type { InlineCommentViewComponentProps } from '@atlaskit/editor-common/types';
3
3
  import { AnnotationMarkStates, AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
4
4
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
- declare type ListenEventProps = {
5
+ type ListenEventProps = {
6
6
  id: AnnotationId;
7
7
  updateSubscriber: AnnotationUpdateEmitter | null;
8
8
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
9
9
  };
10
- declare type UseAnnotationUpdateSatteByEventProps = {
10
+ type UseAnnotationUpdateSatteByEventProps = {
11
11
  type: AnnotationTypes;
12
12
  updateSubscriber: AnnotationUpdateEmitter | null;
13
13
  };
14
14
  export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
15
15
  export declare const useHasFocusEvent: ({ id, updateSubscriber, }: ListenEventProps) => boolean;
16
- declare type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
16
+ type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
17
17
  export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
18
18
  export {};
@@ -1,5 +1,5 @@
1
1
  import { AnnotationId, AnnotationMarkStates } from '@atlaskit/adf-schema';
2
- declare type Props = {
2
+ type Props = {
3
3
  annotationIds: AnnotationId[];
4
4
  filter: {
5
5
  state: AnnotationMarkStates;
@@ -1,5 +1,5 @@
1
1
  import { JSONDocNode } from '@atlaskit/editor-json-transformer';
2
- declare type Props = {
2
+ type Props = {
3
3
  adfDocument: JSONDocNode;
4
4
  };
5
5
  export declare const useLoadAnnotations: ({ adfDocument }: Props) => void;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare type Props = {
2
+ type Props = {
3
3
  rendererRef: React.RefObject<HTMLDivElement>;
4
4
  };
5
5
  export declare const useUserSelectionRange: (props: Props) => [Range | null, () => void];
@@ -3,7 +3,7 @@ import type { AnnotationByMatches, InlineCommentSelectionComponentProps } from '
3
3
  import { ApplyAnnotation } from '../../../actions/index';
4
4
  import { Position } from '../types';
5
5
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
6
- declare type Props = {
6
+ type Props = {
7
7
  range: Range;
8
8
  component: React.ComponentType<InlineCommentSelectionComponentProps>;
9
9
  wrapperDOM: React.RefObject<HTMLDivElement>;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Position } from '../types';
3
3
  import type { InlineCommentSelectionComponentProps } from '@atlaskit/editor-common/types';
4
4
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
- declare type Props = {
5
+ type Props = {
6
6
  selectionComponent: React.ComponentType<InlineCommentSelectionComponentProps>;
7
7
  rendererRef: React.RefObject<HTMLDivElement>;
8
8
  applyAnnotationDraftAt: (position: Position) => void;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- declare type Props = {
3
+ type Props = {
4
4
  rendererRef: React.RefObject<HTMLDivElement>;
5
5
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
6
6
  };
@@ -7,16 +7,16 @@ export declare enum InsertDraftPosition {
7
7
  END = "END",
8
8
  INSIDE = "INSIDE"
9
9
  }
10
- export declare type Position = {
10
+ export type Position = {
11
11
  from: number;
12
12
  to: number;
13
13
  };
14
- export declare type AnnotationsWrapperProps = {
14
+ export type AnnotationsWrapperProps = {
15
15
  adfDocument: JSONDocNode;
16
16
  annotationProvider: AnnotationProviders | null | undefined;
17
17
  rendererRef: React.RefObject<HTMLDivElement>;
18
18
  };
19
- export declare type TextPosition = {
19
+ export type TextPosition = {
20
20
  start: number;
21
21
  end: number;
22
22
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
- declare type Props = {
3
+ type Props = {
4
4
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
5
5
  };
6
6
  declare const AnnotationView: React.FC<Props>;
@@ -4,13 +4,13 @@ import type { EventHandlers } from '@atlaskit/editor-common/ui';
4
4
  import type { Transformer } from '@atlaskit/editor-common/types';
5
5
  import type { Node as PMNode } from 'prosemirror-model';
6
6
  import type { RendererAppearance } from './ui/Renderer/types';
7
- export declare type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
7
+ export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
8
8
  export declare class ADFEncoder<T> {
9
9
  encode: (value: T) => any;
10
10
  constructor(createTransformerWithSchema: TransformerProvider<T>);
11
11
  }
12
12
  export declare const getText: (node: PMNode | ADNode) => string;
13
- export declare const getEventHandler: (eventHandlers?: EventHandlers | undefined, type?: keyof EventHandlers | undefined, eventName?: string) => any;
13
+ export declare const getEventHandler: (eventHandlers?: EventHandlers, type?: keyof EventHandlers, eventName?: string) => any;
14
14
  export declare const getPlatform: (rendererAppearance: RendererAppearance) => "mobile" | "web";
15
15
  /**
16
16
  * Traverse through parent elements of element. Return element for which evaluate(element) returns
@@ -0,0 +1,61 @@
1
+ /// <reference types="react" />
2
+ import { JSONDocNode } from '@atlaskit/editor-json-transformer';
3
+ import type { AnnotationActionResult, AnnotationByMatches } from '@atlaskit/editor-common/types';
4
+ import { AnnotationTypes } from '@atlaskit/adf-schema';
5
+ import { Node, Schema, Mark } from 'prosemirror-model';
6
+ import { Step, RemoveMarkStep } from 'prosemirror-transform';
7
+ import { AnalyticsEventPayload } from '../analytics/events';
8
+ type ActionResult = {
9
+ step: Step;
10
+ doc: JSONDocNode;
11
+ } | false;
12
+ type Position = {
13
+ from: number;
14
+ to: number;
15
+ };
16
+ type Annotation = {
17
+ annotationId: string;
18
+ annotationType: AnnotationTypes;
19
+ };
20
+ export interface RendererActionsOptions {
21
+ annotate: (range: Range, annotationId: string, annotationType: 'inlineComment') => ActionResult;
22
+ deleteAnnotation: (annotationId: string, annotationType: 'inlineComment') => ActionResult;
23
+ isValidAnnotationRange: (range: Range) => boolean;
24
+ }
25
+ export type ApplyAnnotation = (pos: Position, annotation: Annotation) => AnnotationActionResult;
26
+ export interface AnnotationsRendererActionsOptions {
27
+ isValidAnnotationPosition: (pos: Position) => boolean;
28
+ applyAnnotation: ApplyAnnotation;
29
+ getAnnotationMarks: () => Mark[];
30
+ }
31
+ export interface PositionRendererActionsOptions {
32
+ getPositionFromRange: (range: Range) => Position | false;
33
+ }
34
+ export default class RendererActions implements RendererActionsOptions, AnnotationsRendererActionsOptions, PositionRendererActionsOptions {
35
+ private initFromContext;
36
+ private transformer;
37
+ private doc?;
38
+ private schema?;
39
+ private ref?;
40
+ private onAnalyticsEvent?;
41
+ constructor(initFromContext?: boolean);
42
+ _privateRegisterRenderer(ref: React.MutableRefObject<null>, doc: Node, schema: Schema, onAnalyticsEvent?: (event: AnalyticsEventPayload) => void): void;
43
+ _privateUnregisterRenderer(): void;
44
+ /**
45
+ * Validate whether we can create an annotation between two positions
46
+ */
47
+ _privateValidatePositionsForAnnotation(from: number, to: number): boolean;
48
+ deleteAnnotation(annotationId: string, annotationType: 'inlineComment'): false | {
49
+ step: RemoveMarkStep<Schema<any, any>>;
50
+ doc: JSONDocNode;
51
+ };
52
+ annotate(range: Range, annotationId: string, annotationType: 'inlineComment'): AnnotationActionResult;
53
+ isValidAnnotationRange(range: Range): boolean;
54
+ isValidAnnotationPosition(pos: Position): boolean;
55
+ getPositionFromRange(range: Range): Position | false;
56
+ getAnnotationMarks(): Mark<any>[];
57
+ getAnnotationsByPosition(range: Range): string[];
58
+ applyAnnotation(pos: Position, annotation: Annotation): AnnotationActionResult;
59
+ generateAnnotationIndexMatch(pos: Position): AnnotationByMatches | false;
60
+ }
61
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Node, Schema } from 'prosemirror-model';
2
+ export declare function getIndexMatch(doc: Node, schema: Schema, selectedText: string, startIndex: number): {
3
+ numMatches: number;
4
+ matchIndex: number;
5
+ textContent: string;
6
+ };
7
+ export declare function countMatches(searchString: string, query: string): number;
@@ -0,0 +1,3 @@
1
+ import { RendererActionsContext, RendererActionsContextConsumer } from './ui/RendererActionsContext';
2
+ import { WithRendererActions } from './ui/RendererActionsContext/WithRendererActions';
3
+ export { RendererActionsContext, RendererActionsContextConsumer, WithRendererActions, };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { AnalyticsEventPayload } from './events';
3
+ declare const AnalyticsContext: React.Context<{
4
+ fireAnalyticsEvent: (event: AnalyticsEventPayload) => void;
5
+ }>;
6
+ export default AnalyticsContext;
@@ -0,0 +1,58 @@
1
+ export declare enum EVENT_TYPE {
2
+ OPERATIONAL = "operational",
3
+ SCREEN = "screen",
4
+ TRACK = "track",
5
+ UI = "ui"
6
+ }
7
+ export declare enum ACTION {
8
+ STARTED = "started",
9
+ RENDERED = "rendered",
10
+ RE_RENDERED = "reRendered",
11
+ RENDERER_TTI = "tti",
12
+ CRASHED = "unhandledErrorCaught",
13
+ INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
14
+ SELECT_ALL_CAUGHT = "selectAllCaught",
15
+ SELECT_ALL_ESCAPED = "selectAllEscaped",
16
+ CLICKED = "clicked",
17
+ VIEWED = "viewed",
18
+ VISITED = "visited",
19
+ SORT_COLUMN = "sortedColumn",
20
+ SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
21
+ TOGGLE_EXPAND = "toggleExpand",
22
+ INSERTED = "inserted",
23
+ OPENED = "opened",
24
+ CLOSED = "closed",
25
+ DELETED = "deleted",
26
+ EDITED = "edited",
27
+ RESOLVED = "resolved",
28
+ CREATE_NOT_ALLOWED = "createNotAllowed",
29
+ UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
30
+ UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED = "unsupportedContentLevelsTrackingErrored",
31
+ MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed"
32
+ }
33
+ export declare enum ACTION_SUBJECT {
34
+ RENDERER = "renderer",
35
+ BUTTON = "button",
36
+ ANCHOR_LINK = "anchorLink",
37
+ TABLE = "table",
38
+ EXPAND = "expand",
39
+ NESTED_EXPAND = "nestedExpand",
40
+ MEDIA_SINGLE = "mediaSingle",
41
+ LINK = "link",
42
+ ANNOTATION = "annotation",
43
+ MEDIA = "media"
44
+ }
45
+ export declare enum ACTION_SUBJECT_ID {
46
+ HEADING_ANCHOR_LINK = "headingAnchorLink",
47
+ LINK = "link",
48
+ INLINE_COMMENT = "inlineComment",
49
+ CODEBLOCK_COPY = "codeBlockCopy",
50
+ CODEBLOCK_WRAP = "codeBlockWrap"
51
+ }
52
+ export type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
53
+ action: Action;
54
+ actionSubject: ActionSubject;
55
+ actionSubjectId?: ActionSubjectID;
56
+ attributes?: Attributes;
57
+ eventType: EventType;
58
+ };
@@ -0,0 +1,118 @@
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, OperationalAEP } from '@atlaskit/editor-common/analytics';
2
+ import { AEP } from './enums';
3
+ import { PropsDifference, SEVERITY, ShallowPropsDifference, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
4
+ import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
5
+ import { SortOrder } from '@atlaskit/editor-common/types';
6
+ export declare enum PLATFORM {
7
+ NATIVE = "mobileNative",
8
+ HYBRID = "mobileHybrid",
9
+ WEB = "web"
10
+ }
11
+ export declare enum MODE {
12
+ RENDERER = "renderer",
13
+ EDITOR = "editor"
14
+ }
15
+ type RendererStartAEP = AEP<ACTION.STARTED, ACTION_SUBJECT.RENDERER, undefined, {
16
+ platform: PLATFORM.WEB;
17
+ }, EVENT_TYPE.UI>;
18
+ type RendererRenderedAEP = AEP<ACTION.RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
19
+ platform: PLATFORM.WEB;
20
+ duration: number;
21
+ distortedDuration: boolean;
22
+ ttfb?: number;
23
+ nodes: Record<string, number>;
24
+ severity?: SEVERITY;
25
+ }, EVENT_TYPE.OPERATIONAL>;
26
+ type RendererReRenderedAEP<Props> = AEP<ACTION.RE_RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
27
+ propsDifference: PropsDifference<Props> | ShallowPropsDifference<Props>;
28
+ count: number;
29
+ componentId?: string;
30
+ }, EVENT_TYPE.OPERATIONAL>;
31
+ export type ComponentCrashErrorAEP = OperationalAEP<ACTION.CRASHED, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
32
+ platform: PLATFORM.WEB;
33
+ errorMessage?: string;
34
+ errorStack?: string;
35
+ componentStack?: string;
36
+ errorRethrown?: boolean;
37
+ }, {
38
+ errorStack?: string;
39
+ }>;
40
+ type InvalidProsemirrorDocumentErrorAEP = AEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
41
+ platform: PLATFORM.WEB;
42
+ errorStack?: string;
43
+ }, EVENT_TYPE.OPERATIONAL>;
44
+ type RendererUnsupportedContentLevelsTrackingSucceeded = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED, ACTION_SUBJECT.RENDERER, undefined, {
45
+ appearance?: string;
46
+ platform: PLATFORM.WEB;
47
+ unsupportedContentLevelSeverity: UNSUPPORTED_CONTENT_LEVEL_SEVERITY;
48
+ unsupportedContentLevelPercentage: number;
49
+ unsupportedNodesCount: number;
50
+ supportedNodesCount: number;
51
+ }, EVENT_TYPE.OPERATIONAL>;
52
+ type RendererUnsupportedContentLevelsTrackingErrored = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED, ACTION_SUBJECT.RENDERER, undefined, {
53
+ platform: PLATFORM.WEB;
54
+ error: string;
55
+ }, EVENT_TYPE.OPERATIONAL>;
56
+ type RendererSelectAllCaughtAEP = AEP<ACTION.SELECT_ALL_CAUGHT, ACTION_SUBJECT.RENDERER, undefined, {
57
+ platform: PLATFORM.WEB;
58
+ }, EVENT_TYPE.TRACK>;
59
+ type RendererSelectAllEscapedAEP = AEP<ACTION.SELECT_ALL_ESCAPED, ACTION_SUBJECT.RENDERER, undefined, {
60
+ platform: PLATFORM.WEB;
61
+ }, EVENT_TYPE.TRACK>;
62
+ type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, EVENT_TYPE.UI>;
63
+ type ButtonAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ActionSubjectID, Attributes>;
64
+ type AnchorLinkAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.ANCHOR_LINK, undefined, {
65
+ platform: PLATFORM.WEB;
66
+ mode: MODE.RENDERER;
67
+ }>;
68
+ type CodeBlockCopyAEP = ButtonAEP<ACTION_SUBJECT_ID.CODEBLOCK_COPY, undefined>;
69
+ type CodeBlockWrapAEP = ButtonAEP<ACTION_SUBJECT_ID.CODEBLOCK_WRAP, {
70
+ wrapped: boolean;
71
+ }>;
72
+ type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
73
+ type TableSortColumnNotAllowedAEP = AEP<ACTION.SORT_COLUMN_NOT_ALLOWED, ACTION_SUBJECT.TABLE, undefined, {
74
+ platform: PLATFORM.WEB;
75
+ mode: MODE.RENDERER;
76
+ }, EVENT_TYPE.TRACK>;
77
+ type TableSortColumnAEP = AEP<ACTION.SORT_COLUMN, ACTION_SUBJECT.TABLE, undefined, {
78
+ platform: PLATFORM.WEB;
79
+ mode: MODE.RENDERER;
80
+ sortOrder: SortOrder;
81
+ columnIndex: number;
82
+ }, EVENT_TYPE.TRACK>;
83
+ type VisitLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.LINK, undefined, {
84
+ platform: PLATFORM.WEB;
85
+ mode: MODE.RENDERER;
86
+ }, EVENT_TYPE.TRACK>;
87
+ type VisitMediaLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.LINK, {
88
+ platform: PLATFORM.WEB;
89
+ mode: MODE.RENDERER;
90
+ }, EVENT_TYPE.TRACK>;
91
+ type ExpandAEP = AEP<ACTION.TOGGLE_EXPAND, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
92
+ platform: PLATFORM.WEB;
93
+ mode: MODE.RENDERER;
94
+ expanded: boolean;
95
+ }, EVENT_TYPE.TRACK>;
96
+ export type AnnotationActionType = ACTION.INSERTED | ACTION.CLOSED | ACTION.EDITED | ACTION.DELETED | ACTION.OPENED | ACTION.RESOLVED | ACTION.VIEWED | ACTION.CREATE_NOT_ALLOWED;
97
+ export type AnnotationAEPAttributes = AnnotationDraftAEPAttributes | AnnotationResolvedAEPAttributes;
98
+ export type AnnotationDraftAEPAttributes = {
99
+ overlap?: number;
100
+ };
101
+ export type AnnotationResolvedAEPAttributes = {
102
+ method?: RESOLVE_METHOD;
103
+ };
104
+ export type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, undefined, EVENT_TYPE.TRACK>;
105
+ export declare enum RESOLVE_METHOD {
106
+ COMPONENT = "component",
107
+ CONSUMER = "consumer",
108
+ ORPHANED = "orphaned"
109
+ }
110
+ export type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
111
+ type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
112
+ type RendererTTIAEP = AEP<ACTION.RENDERER_TTI, ACTION_SUBJECT.RENDERER, undefined, {
113
+ tti: number;
114
+ ttiFromInvocation: number;
115
+ canceled: boolean;
116
+ }, EVENT_TYPE.OPERATIONAL>;
117
+ export type AnalyticsEventPayload<T = void> = RendererStartAEP | RendererRenderedAEP | RendererReRenderedAEP<T> | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | RendererTTIAEP;
118
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
2
+ import { AnalyticsEventPayload } from './events';
3
+ type DispatchAnalyticsEvent = (event: AnalyticsEventPayload) => void;
4
+ type DocumentData = {
5
+ rendererId: string;
6
+ doc: any;
7
+ appearance?: string;
8
+ };
9
+ export declare const trackUnsupportedContentLevels: (item: DocumentData, trackingOptions: UnsupportedContentLevelsTracking, dispatchAnalyticsEvent: DispatchAnalyticsEvent) => void;
10
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare const RendererCssClassName: {
2
+ DOCUMENT: string;
3
+ EXTENSION: string;
4
+ EXTENSION_CENTER_ALIGN: string;
5
+ EXTENSION_OVERFLOW_CONTAINER: string;
6
+ NUMBER_COLUMN: string;
7
+ SORTABLE_COLUMN_WRAPPER: string;
8
+ SORTABLE_COLUMN: string;
9
+ SORTABLE_COLUMN_ICON_WRAPPER: string;
10
+ SORTABLE_COLUMN_ICON: string;
11
+ SORTABLE_COLUMN_NO_ORDER: string;
12
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.editor.headingLink.ascOrderLabel': string;
9
+ 'fabric.editor.headingLink.ascSortingLabel': string;
10
+ 'fabric.editor.headingLink.copied': string;
11
+ 'fabric.editor.headingLink.copyAnchorLink': string;
12
+ 'fabric.editor.headingLink.copyAriaLabel': string;
13
+ 'fabric.editor.headingLink.descOrderLabel': string;
14
+ 'fabric.editor.headingLink.descSortingLabel': string;
15
+ 'fabric.editor.headingLink.failedToCopy': string;
16
+ 'fabric.editor.headingLink.invalidLabel': string;
17
+ 'fabric.editor.headingLink.noOrderLabel': string;
18
+ 'fabric.editor.headingLink.noneSortingLabel': string;
19
+ };
20
+ export default _default;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.editor.headingLink.ascOrderLabel': string;
9
+ 'fabric.editor.headingLink.ascSortingLabel': string;
10
+ 'fabric.editor.headingLink.copied': string;
11
+ 'fabric.editor.headingLink.copyAnchorLink': string;
12
+ 'fabric.editor.headingLink.copyAriaLabel': string;
13
+ 'fabric.editor.headingLink.descOrderLabel': string;
14
+ 'fabric.editor.headingLink.descSortingLabel': string;
15
+ 'fabric.editor.headingLink.failedToCopy': string;
16
+ 'fabric.editor.headingLink.invalidLabel': string;
17
+ 'fabric.editor.headingLink.noOrderLabel': string;
18
+ 'fabric.editor.headingLink.noneSortingLabel': string;
19
+ };
20
+ export default _default;