@atlaskit/editor-common 70.1.3 → 70.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/cjs/react-node-view/index.js +19 -17
  3. package/dist/cjs/styles/index.js +12 -0
  4. package/dist/cjs/styles/shared/code-block.js +5 -3
  5. package/dist/cjs/styles/shared/lists.js +4 -2
  6. package/dist/cjs/styles/shared/table.js +1 -1
  7. package/dist/cjs/types/copy-button.js +5 -0
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/cjs/ui/Expand/index.js +2 -2
  10. package/dist/cjs/ui/IntlProviderIfMissingWrapper/index.js +33 -0
  11. package/dist/cjs/ui/Popup/index.js +2 -2
  12. package/dist/cjs/ui/PortalProvider/index.js +62 -47
  13. package/dist/cjs/ui/index.js +8 -0
  14. package/dist/cjs/utils/breakout.js +53 -2
  15. package/dist/cjs/utils/collab.js +22 -0
  16. package/dist/cjs/utils/dom.js +16 -0
  17. package/dist/cjs/utils/get-performance-options.js +70 -0
  18. package/dist/cjs/utils/index.js +57 -1
  19. package/dist/cjs/utils/outdated-browsers.js +41 -0
  20. package/dist/cjs/utils/referentiality.js +49 -0
  21. package/dist/cjs/utils/sendLogs.js +19 -0
  22. package/dist/cjs/version.json +1 -1
  23. package/dist/cjs/with-plugin-state/index.js +61 -54
  24. package/dist/es2019/react-node-view/index.js +19 -24
  25. package/dist/es2019/styles/index.js +2 -2
  26. package/dist/es2019/styles/shared/code-block.js +13 -1
  27. package/dist/es2019/styles/shared/lists.js +2 -1
  28. package/dist/es2019/styles/shared/table.js +4 -2
  29. package/dist/es2019/types/copy-button.js +1 -0
  30. package/dist/es2019/ui/DropList/index.js +1 -1
  31. package/dist/es2019/ui/Expand/index.js +17 -15
  32. package/dist/es2019/ui/IntlProviderIfMissingWrapper/index.js +18 -0
  33. package/dist/es2019/ui/Popup/index.js +2 -1
  34. package/dist/es2019/ui/PortalProvider/index.js +33 -14
  35. package/dist/es2019/ui/index.js +2 -1
  36. package/dist/es2019/utils/breakout.js +47 -1
  37. package/dist/es2019/utils/collab.js +13 -0
  38. package/dist/es2019/utils/dom.js +16 -0
  39. package/dist/es2019/utils/get-performance-options.js +57 -0
  40. package/dist/es2019/utils/index.js +6 -2
  41. package/dist/es2019/utils/outdated-browsers.js +32 -0
  42. package/dist/es2019/utils/referentiality.js +34 -0
  43. package/dist/es2019/utils/sendLogs.js +8 -0
  44. package/dist/es2019/version.json +1 -1
  45. package/dist/es2019/with-plugin-state/index.js +55 -52
  46. package/dist/esm/react-node-view/index.js +19 -22
  47. package/dist/esm/styles/index.js +2 -2
  48. package/dist/esm/styles/shared/code-block.js +4 -3
  49. package/dist/esm/styles/shared/lists.js +2 -1
  50. package/dist/esm/styles/shared/table.js +1 -1
  51. package/dist/esm/types/copy-button.js +1 -0
  52. package/dist/esm/ui/DropList/index.js +1 -1
  53. package/dist/esm/ui/Expand/index.js +2 -2
  54. package/dist/esm/ui/IntlProviderIfMissingWrapper/index.js +19 -0
  55. package/dist/esm/ui/Popup/index.js +2 -2
  56. package/dist/esm/ui/PortalProvider/index.js +59 -48
  57. package/dist/esm/ui/index.js +2 -1
  58. package/dist/esm/utils/breakout.js +46 -1
  59. package/dist/esm/utils/collab.js +13 -0
  60. package/dist/esm/utils/dom.js +16 -0
  61. package/dist/esm/utils/get-performance-options.js +55 -0
  62. package/dist/esm/utils/index.js +6 -2
  63. package/dist/esm/utils/outdated-browsers.js +32 -0
  64. package/dist/esm/utils/referentiality.js +40 -0
  65. package/dist/esm/utils/sendLogs.js +10 -0
  66. package/dist/esm/version.json +1 -1
  67. package/dist/esm/with-plugin-state/index.js +59 -54
  68. package/dist/types/analytics/types/events.d.ts +1 -0
  69. package/dist/types/extensions/types/extension-handler.d.ts +1 -0
  70. package/dist/types/styles/index.d.ts +2 -2
  71. package/dist/types/styles/shared/code-block.d.ts +1 -0
  72. package/dist/types/styles/shared/lists.d.ts +1 -0
  73. package/dist/types/types/copy-button.d.ts +20 -0
  74. package/dist/types/types/editor-actions.d.ts +1 -0
  75. package/dist/types/types/editor-container-width.d.ts +14 -0
  76. package/dist/types/types/feature-flags.d.ts +0 -6
  77. package/dist/types/types/floating-toolbar.d.ts +23 -2
  78. package/dist/types/types/index.d.ts +2 -1
  79. package/dist/types/ui/IntlProviderIfMissingWrapper/index.d.ts +6 -0
  80. package/dist/types/ui/Popup/index.d.ts +1 -0
  81. package/dist/types/ui/PortalProvider/index.d.ts +2 -1
  82. package/dist/types/ui/index.d.ts +1 -0
  83. package/dist/types/utils/breakout.d.ts +25 -0
  84. package/dist/types/utils/collab.d.ts +2 -0
  85. package/dist/types/utils/dom.d.ts +15 -1
  86. package/dist/types/utils/get-performance-options.d.ts +18 -0
  87. package/dist/types/utils/getModeFromTheme.d.ts +1 -1
  88. package/dist/types/utils/index.d.ts +5 -1
  89. package/dist/types/utils/outdated-browsers.d.ts +1 -0
  90. package/dist/types/utils/referentiality.d.ts +3 -0
  91. package/dist/types/utils/sendLogs.d.ts +1 -0
  92. package/dist/types/with-plugin-state/index.d.ts +4 -2
  93. package/package.json +12 -17
  94. package/report.api.md +7 -3
  95. package/dist/types-ts4.0/__tests_external__/cases/fundamentals/collection.d.ts +0 -3
  96. package/dist/types-ts4.0/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +0 -3
  97. package/dist/types-ts4.0/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +0 -3
  98. package/dist/types-ts4.0/__tests_external__/cases/smart-links/index.d.ts +0 -4
  99. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +0 -3
  100. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +0 -4
  101. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +0 -3
  102. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +0 -3
  103. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +0 -3
  104. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +0 -4
  105. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +0 -3
  106. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +0 -3
  107. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +0 -3
  108. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +0 -4
  109. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +0 -3
  110. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +0 -3
  111. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +0 -3
  112. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/types.d.ts +0 -4
  113. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +0 -3
  114. package/dist/types-ts4.0/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +0 -3
  115. package/dist/types-ts4.0/__tests_external__/cases/types.d.ts +0 -7
  116. package/dist/types-ts4.0/__tests_external__/index.d.ts +0 -3
  117. package/dist/types-ts4.0/__tests_external__/page-objects/Editor.d.ts +0 -9
  118. package/dist/types-ts4.0/__tests_external__/page-objects/EditorSmartLink.d.ts +0 -40
  119. package/dist/types-ts4.0/__tests_external__/page-objects/Renderer.d.ts +0 -6
  120. package/dist/types-ts4.0/analytics/api.d.ts +0 -5
  121. package/dist/types-ts4.0/analytics/index.d.ts +0 -3
  122. package/dist/types-ts4.0/analytics/types/avatar.d.ts +0 -5
  123. package/dist/types-ts4.0/analytics/types/block.d.ts +0 -3
  124. package/dist/types-ts4.0/analytics/types/config-panel-events.d.ts +0 -17
  125. package/dist/types-ts4.0/analytics/types/cut-copy-events.d.ts +0 -12
  126. package/dist/types-ts4.0/analytics/types/date-events.d.ts +0 -17
  127. package/dist/types-ts4.0/analytics/types/dispatch-analytics-event.d.ts +0 -2
  128. package/dist/types-ts4.0/analytics/types/element-browser-events.d.ts +0 -11
  129. package/dist/types-ts4.0/analytics/types/enums.d.ts +0 -314
  130. package/dist/types-ts4.0/analytics/types/events.d.ts +0 -126
  131. package/dist/types-ts4.0/analytics/types/experimental-events.d.ts +0 -17
  132. package/dist/types-ts4.0/analytics/types/extension-events.d.ts +0 -37
  133. package/dist/types-ts4.0/analytics/types/find-replace-events.d.ts +0 -23
  134. package/dist/types-ts4.0/analytics/types/format-events.d.ts +0 -49
  135. package/dist/types-ts4.0/analytics/types/general-events.d.ts +0 -179
  136. package/dist/types-ts4.0/analytics/types/index.d.ts +0 -34
  137. package/dist/types-ts4.0/analytics/types/inline-comment-events.d.ts +0 -17
  138. package/dist/types-ts4.0/analytics/types/insert-events.d.ts +0 -128
  139. package/dist/types-ts4.0/analytics/types/link-tool-bar-events.d.ts +0 -76
  140. package/dist/types-ts4.0/analytics/types/list-events.d.ts +0 -52
  141. package/dist/types-ts4.0/analytics/types/media-events.d.ts +0 -16
  142. package/dist/types-ts4.0/analytics/types/node-events.d.ts +0 -56
  143. package/dist/types-ts4.0/analytics/types/paste-events.d.ts +0 -39
  144. package/dist/types-ts4.0/analytics/types/performance-report.d.ts +0 -24
  145. package/dist/types-ts4.0/analytics/types/referentiality-events.d.ts +0 -9
  146. package/dist/types-ts4.0/analytics/types/selection-events.d.ts +0 -18
  147. package/dist/types-ts4.0/analytics/types/smart-links.d.ts +0 -13
  148. package/dist/types-ts4.0/analytics/types/substitute-events.d.ts +0 -26
  149. package/dist/types-ts4.0/analytics/types/table-events.d.ts +0 -102
  150. package/dist/types-ts4.0/analytics/types/toolbar-button.d.ts +0 -22
  151. package/dist/types-ts4.0/analytics/types/type-ahead.d.ts +0 -27
  152. package/dist/types-ts4.0/analytics/types/utils.d.ts +0 -46
  153. package/dist/types-ts4.0/card/cardOptions.d.ts +0 -9
  154. package/dist/types-ts4.0/card/index.d.ts +0 -1
  155. package/dist/types-ts4.0/collab/types.d.ts +0 -82
  156. package/dist/types-ts4.0/collab.d.ts +0 -1
  157. package/dist/types-ts4.0/core-utils/index.d.ts +0 -1
  158. package/dist/types-ts4.0/core-utils/inside.d.ts +0 -2
  159. package/dist/types-ts4.0/emoji.d.ts +0 -3
  160. package/dist/types-ts4.0/event-dispatcher/index.d.ts +0 -19
  161. package/dist/types-ts4.0/extensions/combine-extension-providers.d.ts +0 -7
  162. package/dist/types-ts4.0/extensions/default-extension-provider.d.ts +0 -17
  163. package/dist/types-ts4.0/extensions/extension-fields-helpers.d.ts +0 -10
  164. package/dist/types-ts4.0/extensions/extension-handlers.d.ts +0 -13
  165. package/dist/types-ts4.0/extensions/index.d.ts +0 -8
  166. package/dist/types-ts4.0/extensions/manifest-helpers.d.ts +0 -8
  167. package/dist/types-ts4.0/extensions/module-helpers.d.ts +0 -11
  168. package/dist/types-ts4.0/extensions/types/extension-handler.d.ts +0 -39
  169. package/dist/types-ts4.0/extensions/types/extension-manifest-common.d.ts +0 -8
  170. package/dist/types-ts4.0/extensions/types/extension-manifest-toolbar-item.d.ts +0 -45
  171. package/dist/types-ts4.0/extensions/types/extension-manifest.d.ts +0 -101
  172. package/dist/types-ts4.0/extensions/types/extension-parameters.d.ts +0 -5
  173. package/dist/types-ts4.0/extensions/types/extension-provider.d.ts +0 -8
  174. package/dist/types-ts4.0/extensions/types/field-definitions.d.ts +0 -171
  175. package/dist/types-ts4.0/extensions/types/index.d.ts +0 -8
  176. package/dist/types-ts4.0/extensions/types/utils.d.ts +0 -18
  177. package/dist/types-ts4.0/extensions.d.ts +0 -2
  178. package/dist/types-ts4.0/i18n/cs.d.ts +0 -100
  179. package/dist/types-ts4.0/i18n/da.d.ts +0 -100
  180. package/dist/types-ts4.0/i18n/de.d.ts +0 -100
  181. package/dist/types-ts4.0/i18n/en.d.ts +0 -100
  182. package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -100
  183. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -100
  184. package/dist/types-ts4.0/i18n/es.d.ts +0 -100
  185. package/dist/types-ts4.0/i18n/et.d.ts +0 -8
  186. package/dist/types-ts4.0/i18n/fi.d.ts +0 -100
  187. package/dist/types-ts4.0/i18n/fr.d.ts +0 -100
  188. package/dist/types-ts4.0/i18n/hu.d.ts +0 -100
  189. package/dist/types-ts4.0/i18n/index.d.ts +0 -31
  190. package/dist/types-ts4.0/i18n/it.d.ts +0 -100
  191. package/dist/types-ts4.0/i18n/ja.d.ts +0 -100
  192. package/dist/types-ts4.0/i18n/ko.d.ts +0 -100
  193. package/dist/types-ts4.0/i18n/nb.d.ts +0 -100
  194. package/dist/types-ts4.0/i18n/nl.d.ts +0 -100
  195. package/dist/types-ts4.0/i18n/pl.d.ts +0 -100
  196. package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -100
  197. package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
  198. package/dist/types-ts4.0/i18n/ru.d.ts +0 -100
  199. package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
  200. package/dist/types-ts4.0/i18n/sv.d.ts +0 -100
  201. package/dist/types-ts4.0/i18n/th.d.ts +0 -100
  202. package/dist/types-ts4.0/i18n/tr.d.ts +0 -100
  203. package/dist/types-ts4.0/i18n/uk.d.ts +0 -100
  204. package/dist/types-ts4.0/i18n/vi.d.ts +0 -100
  205. package/dist/types-ts4.0/i18n/zh.d.ts +0 -100
  206. package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -100
  207. package/dist/types-ts4.0/icons/index.d.ts +0 -9
  208. package/dist/types-ts4.0/icons/shared/PanelErrorIcon.d.ts +0 -3
  209. package/dist/types-ts4.0/icons/shared/PanelInfoIcon.d.ts +0 -3
  210. package/dist/types-ts4.0/icons/shared/PanelNoteIcon.d.ts +0 -3
  211. package/dist/types-ts4.0/icons/shared/PanelSuccessIcon.d.ts +0 -3
  212. package/dist/types-ts4.0/icons/shared/PanelWarningIcon.d.ts +0 -3
  213. package/dist/types-ts4.0/icons/shared/table.d.ts +0 -2
  214. package/dist/types-ts4.0/in-product.d.ts +0 -1
  215. package/dist/types-ts4.0/index.d.ts +0 -1
  216. package/dist/types-ts4.0/keymaps/consts.d.ts +0 -12
  217. package/dist/types-ts4.0/keymaps/index.d.ts +0 -89
  218. package/dist/types-ts4.0/mention.d.ts +0 -2
  219. package/dist/types-ts4.0/messages/codeBidiWarning.d.ts +0 -11
  220. package/dist/types-ts4.0/messages/codeBlockCopyButton.d.ts +0 -12
  221. package/dist/types-ts4.0/messages/index.d.ts +0 -128
  222. package/dist/types-ts4.0/messages/insert-block.d.ts +0 -167
  223. package/dist/types-ts4.0/messages/link.d.ts +0 -7
  224. package/dist/types-ts4.0/messages/unsupportedContent.d.ts +0 -17
  225. package/dist/types-ts4.0/node-width/index.d.ts +0 -7
  226. package/dist/types-ts4.0/normalize-feature-flags.d.ts +0 -20
  227. package/dist/types-ts4.0/panel.d.ts +0 -1
  228. package/dist/types-ts4.0/provider-factory/autoformatting-provider.d.ts +0 -9
  229. package/dist/types-ts4.0/provider-factory/card-provider.d.ts +0 -7
  230. package/dist/types-ts4.0/provider-factory/context-identifier-provider.d.ts +0 -6
  231. package/dist/types-ts4.0/provider-factory/context.d.ts +0 -6
  232. package/dist/types-ts4.0/provider-factory/image-upload-provider.d.ts +0 -6
  233. package/dist/types-ts4.0/provider-factory/macro-provider.d.ts +0 -25
  234. package/dist/types-ts4.0/provider-factory/media-provider.d.ts +0 -15
  235. package/dist/types-ts4.0/provider-factory/profile-card-provider.d.ts +0 -6
  236. package/dist/types-ts4.0/provider-factory/provider-factory.d.ts +0 -17
  237. package/dist/types-ts4.0/provider-factory/quick-insert-provider.d.ts +0 -24
  238. package/dist/types-ts4.0/provider-factory/search-provider.d.ts +0 -12
  239. package/dist/types-ts4.0/provider-factory/types.d.ts +0 -37
  240. package/dist/types-ts4.0/provider-factory/with-providers.d.ts +0 -18
  241. package/dist/types-ts4.0/provider-factory.d.ts +0 -13
  242. package/dist/types-ts4.0/provider-helpers/combine-providers.d.ts +0 -9
  243. package/dist/types-ts4.0/provider-helpers/index.d.ts +0 -1
  244. package/dist/types-ts4.0/provider-helpers/promise-helpers.d.ts +0 -32
  245. package/dist/types-ts4.0/react-node-view/index.d.ts +0 -52
  246. package/dist/types-ts4.0/react-node-view/types.d.ts +0 -12
  247. package/dist/types-ts4.0/safe-plugin/index.d.ts +0 -6
  248. package/dist/types-ts4.0/selection/gap-cursor/selection.d.ts +0 -40
  249. package/dist/types-ts4.0/selection/gap-cursor/utils/index.d.ts +0 -2
  250. package/dist/types-ts4.0/selection/gap-cursor/utils/is-ignored.d.ts +0 -2
  251. package/dist/types-ts4.0/selection/gap-cursor/utils/is-valid-target-node.d.ts +0 -2
  252. package/dist/types-ts4.0/selection/index.d.ts +0 -5
  253. package/dist/types-ts4.0/selection/types.d.ts +0 -26
  254. package/dist/types-ts4.0/selection/utils.d.ts +0 -4
  255. package/dist/types-ts4.0/styles/index.d.ts +0 -23
  256. package/dist/types-ts4.0/styles/shared/annotation.d.ts +0 -12
  257. package/dist/types-ts4.0/styles/shared/block-marks.d.ts +0 -1
  258. package/dist/types-ts4.0/styles/shared/blockquote.d.ts +0 -1
  259. package/dist/types-ts4.0/styles/shared/code-block.d.ts +0 -10
  260. package/dist/types-ts4.0/styles/shared/code-mark.d.ts +0 -2
  261. package/dist/types-ts4.0/styles/shared/column-layout.d.ts +0 -2
  262. package/dist/types-ts4.0/styles/shared/date.d.ts +0 -5
  263. package/dist/types-ts4.0/styles/shared/emoji.d.ts +0 -7
  264. package/dist/types-ts4.0/styles/shared/extension.d.ts +0 -2
  265. package/dist/types-ts4.0/styles/shared/headings.d.ts +0 -2
  266. package/dist/types-ts4.0/styles/shared/indentation.d.ts +0 -1
  267. package/dist/types-ts4.0/styles/shared/layout.d.ts +0 -2
  268. package/dist/types-ts4.0/styles/shared/link.d.ts +0 -2
  269. package/dist/types-ts4.0/styles/shared/lists.d.ts +0 -1
  270. package/dist/types-ts4.0/styles/shared/media-single.d.ts +0 -3
  271. package/dist/types-ts4.0/styles/shared/mention.d.ts +0 -3
  272. package/dist/types-ts4.0/styles/shared/panel.d.ts +0 -84
  273. package/dist/types-ts4.0/styles/shared/paragraph.d.ts +0 -1
  274. package/dist/types-ts4.0/styles/shared/rule.d.ts +0 -2
  275. package/dist/types-ts4.0/styles/shared/shadow.d.ts +0 -15
  276. package/dist/types-ts4.0/styles/shared/smart-card.d.ts +0 -7
  277. package/dist/types-ts4.0/styles/shared/status.d.ts +0 -4
  278. package/dist/types-ts4.0/styles/shared/table.d.ts +0 -28
  279. package/dist/types-ts4.0/styles/shared/task-decision.d.ts +0 -4
  280. package/dist/types-ts4.0/styles/shared/text-color.d.ts +0 -1
  281. package/dist/types-ts4.0/styles/shared/whitespace.d.ts +0 -2
  282. package/dist/types-ts4.0/transforms/expand.d.ts +0 -5
  283. package/dist/types-ts4.0/transforms/extension.d.ts +0 -6
  284. package/dist/types-ts4.0/transforms/index.d.ts +0 -3
  285. package/dist/types-ts4.0/transforms/layout.d.ts +0 -15
  286. package/dist/types-ts4.0/type-ahead/index.d.ts +0 -12
  287. package/dist/types-ts4.0/types/annotation/emitter.d.ts +0 -33
  288. package/dist/types-ts4.0/types/annotation/index.d.ts +0 -84
  289. package/dist/types-ts4.0/types/collab.d.ts +0 -8
  290. package/dist/types-ts4.0/types/command.d.ts +0 -5
  291. package/dist/types-ts4.0/types/context-panel.d.ts +0 -3
  292. package/dist/types-ts4.0/types/editor-actions.d.ts +0 -19
  293. package/dist/types-ts4.0/types/editor-appearance.d.ts +0 -1
  294. package/dist/types-ts4.0/types/editor-container-width.d.ts +0 -6
  295. package/dist/types-ts4.0/types/editor-plugin.d.ts +0 -61
  296. package/dist/types-ts4.0/types/editor-react-context.d.ts +0 -6
  297. package/dist/types-ts4.0/types/empty-state-handler.d.ts +0 -7
  298. package/dist/types-ts4.0/types/feature-flags.d.ts +0 -350
  299. package/dist/types-ts4.0/types/floating-toolbar.d.ts +0 -189
  300. package/dist/types-ts4.0/types/index.d.ts +0 -33
  301. package/dist/types-ts4.0/types/plugin-factory.d.ts +0 -27
  302. package/dist/types-ts4.0/types/prosemirror-config.d.ts +0 -14
  303. package/dist/types-ts4.0/types/quick-insert.d.ts +0 -26
  304. package/dist/types-ts4.0/types/supported-browsers.d.ts +0 -15
  305. package/dist/types-ts4.0/types/toolbar.d.ts +0 -30
  306. package/dist/types-ts4.0/types/type-ahead.d.ts +0 -64
  307. package/dist/types-ts4.0/types/ui-components.d.ts +0 -22
  308. package/dist/types-ts4.0/ufo/experience-store.d.ts +0 -33
  309. package/dist/types-ts4.0/ufo/index.d.ts +0 -1
  310. package/dist/types-ts4.0/ui/BaseTheme/index.d.ts +0 -15
  311. package/dist/types-ts4.0/ui/Caption/index.d.ts +0 -19
  312. package/dist/types-ts4.0/ui/Caption/messages.d.ts +0 -7
  313. package/dist/types-ts4.0/ui/DropList/index.d.ts +0 -19
  314. package/dist/types-ts4.0/ui/Emoji/index.d.ts +0 -20
  315. package/dist/types-ts4.0/ui/ErrorBoundary/index.d.ts +0 -24
  316. package/dist/types-ts4.0/ui/EventHandlers/index.d.ts +0 -36
  317. package/dist/types-ts4.0/ui/Expand/index.d.ts +0 -43
  318. package/dist/types-ts4.0/ui/IntlErrorBoundary/index.d.ts +0 -15
  319. package/dist/types-ts4.0/ui/Layer/index.d.ts +0 -47
  320. package/dist/types-ts4.0/ui/Layer/internal/helpers.d.ts +0 -5
  321. package/dist/types-ts4.0/ui/MediaSingle/grid.d.ts +0 -10
  322. package/dist/types-ts4.0/ui/MediaSingle/index.d.ts +0 -24
  323. package/dist/types-ts4.0/ui/MediaSingle/link.d.ts +0 -1
  324. package/dist/types-ts4.0/ui/MediaSingle/styled.d.ts +0 -43
  325. package/dist/types-ts4.0/ui/Mention/index.d.ts +0 -21
  326. package/dist/types-ts4.0/ui/Mention/mention-with-profilecard.d.ts +0 -15
  327. package/dist/types-ts4.0/ui/Mention/mention-with-providers.d.ts +0 -22
  328. package/dist/types-ts4.0/ui/Mention/types.d.ts +0 -2
  329. package/dist/types-ts4.0/ui/Messages/index.d.ts +0 -11
  330. package/dist/types-ts4.0/ui/OverflowShadow/index.d.ts +0 -103
  331. package/dist/types-ts4.0/ui/OverflowShadow/shadowObserver.d.ts +0 -27
  332. package/dist/types-ts4.0/ui/Popup/index.d.ts +0 -63
  333. package/dist/types-ts4.0/ui/Popup/utils.d.ts +0 -42
  334. package/dist/types-ts4.0/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
  335. package/dist/types-ts4.0/ui/PortalProvider/index.d.ts +0 -50
  336. package/dist/types-ts4.0/ui/UnsupportedBlock/index.d.ts +0 -14
  337. package/dist/types-ts4.0/ui/UnsupportedInline/index.d.ts +0 -14
  338. package/dist/types-ts4.0/ui/WidthProvider/index.d.ts +0 -29
  339. package/dist/types-ts4.0/ui/WithCreateAnalyticsEvent/index.d.ts +0 -6
  340. package/dist/types-ts4.0/ui/clear-next-sibling-margin-top.d.ts +0 -2
  341. package/dist/types-ts4.0/ui/index.d.ts +0 -25
  342. package/dist/types-ts4.0/ui/unsupported-content-helper.d.ts +0 -3
  343. package/dist/types-ts4.0/ui/with-outer-listeners.d.ts +0 -8
  344. package/dist/types-ts4.0/ui-color/ColorPalette/Color/index.d.ts +0 -19
  345. package/dist/types-ts4.0/ui-color/ColorPalette/Color/styles.d.ts +0 -4
  346. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +0 -3
  347. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/common.d.ts +0 -2
  348. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +0 -2
  349. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/index.d.ts +0 -2
  350. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/paletteMessages.d.ts +0 -113
  351. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +0 -4
  352. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/statusColorPalette.d.ts +0 -4
  353. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +0 -3
  354. package/dist/types-ts4.0/ui-color/ColorPalette/Palettes/type.d.ts +0 -8
  355. package/dist/types-ts4.0/ui-color/ColorPalette/index.d.ts +0 -15
  356. package/dist/types-ts4.0/ui-color/ColorPalette/styles.d.ts +0 -1
  357. package/dist/types-ts4.0/ui-color/index.d.ts +0 -9
  358. package/dist/types-ts4.0/ui-menu/Dropdown/index.d.ts +0 -35
  359. package/dist/types-ts4.0/ui-menu/DropdownMenu/index.d.ts +0 -19
  360. package/dist/types-ts4.0/ui-menu/DropdownMenu/types.d.ts +0 -46
  361. package/dist/types-ts4.0/ui-menu/ToolbarButton/index.d.ts +0 -53
  362. package/dist/types-ts4.0/ui-menu/ToolbarButton/styles.d.ts +0 -4
  363. package/dist/types-ts4.0/ui-menu/index.d.ts +0 -5
  364. package/dist/types-ts4.0/ui-react/ReactEditorViewContext.d.ts +0 -8
  365. package/dist/types-ts4.0/ui-react/index.d.ts +0 -2
  366. package/dist/types-ts4.0/ui-react/with-react-editor-view-outer-listeners.d.ts +0 -9
  367. package/dist/types-ts4.0/utils/analytics.d.ts +0 -48
  368. package/dist/types-ts4.0/utils/annotation/index.d.ts +0 -8
  369. package/dist/types-ts4.0/utils/breakout.d.ts +0 -10
  370. package/dist/types-ts4.0/utils/browser-extensions.d.ts +0 -43
  371. package/dist/types-ts4.0/utils/browser.d.ts +0 -4
  372. package/dist/types-ts4.0/utils/compare-props.d.ts +0 -32
  373. package/dist/types-ts4.0/utils/compareNodes.d.ts +0 -31
  374. package/dist/types-ts4.0/utils/compose.d.ts +0 -30
  375. package/dist/types-ts4.0/utils/date.d.ts +0 -18
  376. package/dist/types-ts4.0/utils/dom.d.ts +0 -26
  377. package/dist/types-ts4.0/utils/editor-core-utils.d.ts +0 -24
  378. package/dist/types-ts4.0/utils/error-reporter.d.ts +0 -13
  379. package/dist/types-ts4.0/utils/extension-handler.d.ts +0 -2
  380. package/dist/types-ts4.0/utils/getModeFromTheme.d.ts +0 -1
  381. package/dist/types-ts4.0/utils/imageLoader.d.ts +0 -14
  382. package/dist/types-ts4.0/utils/index.d.ts +0 -45
  383. package/dist/types-ts4.0/utils/is-text-input.d.ts +0 -2
  384. package/dist/types-ts4.0/utils/macro.d.ts +0 -10
  385. package/dist/types-ts4.0/utils/nodes.d.ts +0 -35
  386. package/dist/types-ts4.0/utils/performance/hooks/use-component-render-tracking/index.d.ts +0 -19
  387. package/dist/types-ts4.0/utils/performance/is-performance-api-available.d.ts +0 -3
  388. package/dist/types-ts4.0/utils/performance/measure-render.d.ts +0 -41
  389. package/dist/types-ts4.0/utils/performance/measure-tti.d.ts +0 -14
  390. package/dist/types-ts4.0/utils/performance/measure.d.ts +0 -3
  391. package/dist/types-ts4.0/utils/performance/navigation.d.ts +0 -1
  392. package/dist/types-ts4.0/utils/plugin-state-factory.d.ts +0 -16
  393. package/dist/types-ts4.0/utils/profiler/render-count.d.ts +0 -50
  394. package/dist/types-ts4.0/utils/should-force-tracking.d.ts +0 -1
  395. package/dist/types-ts4.0/utils/slice.d.ts +0 -11
  396. package/dist/types-ts4.0/utils/table.d.ts +0 -4
  397. package/dist/types-ts4.0/utils/track-unsupported-content.d.ts +0 -8
  398. package/dist/types-ts4.0/utils/traversor.d.ts +0 -9
  399. package/dist/types-ts4.0/utils/types.d.ts +0 -2
  400. package/dist/types-ts4.0/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +0 -57
  401. package/dist/types-ts4.0/utils/validate-using-spec.d.ts +0 -19
  402. package/dist/types-ts4.0/utils/validator.d.ts +0 -42
  403. package/dist/types-ts4.0/utils/whitespace.d.ts +0 -2
  404. package/dist/types-ts4.0/validator.d.ts +0 -2
  405. package/dist/types-ts4.0/with-plugin-state/index.d.ts +0 -86
  406. package/dist/types-ts4.0/with-plugin-state/types.d.ts +0 -10
@@ -0,0 +1,32 @@
1
+ export var isOutdatedBrowser = function isOutdatedBrowser(userAgent) {
2
+ // Take browsers in both Desktop and Mobile (includes Chrome, Firefox, Edge and Safari) within last 2 years
3
+ var chrome = /Chrome\//.test(userAgent) && !/OPR\//.test(userAgent);
4
+ var chromeVersion = chrome ? parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10) : 0;
5
+
6
+ if (chromeVersion >= 84) {
7
+ return false;
8
+ }
9
+
10
+ var gecko = /gecko\/\d/i.test(userAgent);
11
+ var geckoVersion = gecko ? parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10) : 0;
12
+
13
+ if (geckoVersion >= 84) {
14
+ return false;
15
+ }
16
+
17
+ var edge = /Edge\/(\d+)/.exec(userAgent);
18
+ var edgeVersion = edge ? +edge[1] : 0;
19
+
20
+ if (edgeVersion >= 84) {
21
+ return false;
22
+ }
23
+
24
+ var safari = !chrome && !gecko && /Version\/([0-9\._]+).*Safari/.test(userAgent);
25
+ var safariVersion = safari ? parseInt((userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10) : 0;
26
+
27
+ if (safariVersion >= 12) {
28
+ return false;
29
+ }
30
+
31
+ return true;
32
+ };
@@ -0,0 +1,40 @@
1
+ export var isReferencedSource = function isReferencedSource(state, node) {
2
+ var _node$attrs, _node$marks, _node$marks$find, _node$marks$find$attr;
3
+
4
+ if (!node) {
5
+ return false;
6
+ }
7
+
8
+ var found = false; // Handle nodes having 2 uuids. They could have a localId or a fragment. Regardless this needs
9
+ // to check if either id is used by a data consumer.
10
+
11
+ var localIds = new Set([(_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId, (_node$marks = node.marks) === null || _node$marks === void 0 ? void 0 : (_node$marks$find = _node$marks.find(function (mark) {
12
+ return mark.type === state.schema.marks.fragment;
13
+ })) === null || _node$marks$find === void 0 ? void 0 : (_node$marks$find$attr = _node$marks$find.attrs) === null || _node$marks$find$attr === void 0 ? void 0 : _node$marks$find$attr.localId].filter(Boolean)); // If there are no uuids on the node then it's not possible for it to be referenced anywhere.
14
+
15
+ if (!localIds.size) {
16
+ return false;
17
+ }
18
+
19
+ state.doc.descendants(function (node) {
20
+ var _dataConsumer$attrs$s, _dataConsumer$attrs$s2;
21
+
22
+ if (found) {
23
+ return false;
24
+ }
25
+
26
+ var dataConsumer = node.marks.find(function (mark) {
27
+ return mark.type === state.schema.marks.dataConsumer;
28
+ });
29
+
30
+ if (!dataConsumer) {
31
+ return true;
32
+ }
33
+
34
+ found = (_dataConsumer$attrs$s = (_dataConsumer$attrs$s2 = dataConsumer.attrs.sources) === null || _dataConsumer$attrs$s2 === void 0 ? void 0 : _dataConsumer$attrs$s2.some(function (src) {
35
+ return localIds.has(src);
36
+ })) !== null && _dataConsumer$attrs$s !== void 0 ? _dataConsumer$attrs$s : false;
37
+ return !found;
38
+ });
39
+ return found;
40
+ };
@@ -0,0 +1,10 @@
1
+ export var sendLogs = function sendLogs(body) {
2
+ return fetch('https://analytics.atlassian.com/analytics/events', {
3
+ method: 'POST',
4
+ headers: {
5
+ Accept: 'application/json, */*',
6
+ 'Content-Type': 'application/json'
7
+ },
8
+ body: JSON.stringify(body)
9
+ });
10
+ };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "70.1.3",
3
+ "version": "70.2.1",
4
4
  "sideEffects": false
5
5
  }
@@ -16,6 +16,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
16
16
 
17
17
  import React from 'react';
18
18
  import PropTypes from 'prop-types';
19
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
20
+ import { createDispatch } from '../event-dispatcher';
21
+ import { analyticsEventKey, startMeasure, stopMeasure } from '../utils';
22
+ import { getParticipantsCount } from '../utils/collab';
19
23
  var DEFAULT_SAMPLING_RATE = 100;
20
24
  var DEFAULT_SLOW_THRESHOLD = 4;
21
25
 
@@ -59,6 +63,8 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
59
63
 
60
64
  _defineProperty(_assertThisInitialized(_this), "isSubscribed", false);
61
65
 
66
+ _defineProperty(_assertThisInitialized(_this), "callsCount", 0);
67
+
62
68
  _defineProperty(_assertThisInitialized(_this), "state", _this.getPluginsStates(_this.props.plugins, _this.getEditorView(_this.props, _this.context)));
63
69
 
64
70
  _defineProperty(_assertThisInitialized(_this), "handlePluginStateChange", function (propName, pluginName, performanceOptions, skipEqualityCheck) {
@@ -90,40 +96,45 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
90
96
  return fn();
91
97
  };
92
98
  _this.debounce = debounce(function () {
93
- // TODO: ED-15580
94
- //const measure = `🦉${pluginName}::WithPluginState`;
95
- //performanceOptions.trackingEnabled && startMeasure(measure);
96
- // () => {
97
- // performanceOptions.trackingEnabled &&
98
- // stopMeasure(measure, (duration) => {
99
- // // Each WithPluginState component will fire analytics event no more than once every `samplingLimit` times
100
- // if (
101
- // ++this.callsCount % performanceOptions.samplingRate === 0 &&
102
- // duration > performanceOptions.slowThreshold
103
- // ) {
104
- // const editorView = this.getEditorView();
105
- // this.dispatchAnalyticsEvent({
106
- // action: ACTION.WITH_PLUGIN_STATE_CALLED,
107
- // actionSubject: ACTION_SUBJECT.EDITOR,
108
- // eventType: EVENT_TYPE.OPERATIONAL,
109
- // attributes: {
110
- // plugin: pluginName,
111
- // duration,
112
- // participants: getParticipantsCount(
113
- // editorView && editorView.state,
114
- // ),
115
- // },
116
- // });
117
- // }
118
- // });
119
- //}
120
- _this.setState(_this.notAppliedState);
99
+ var measure = "\uD83E\uDD89".concat(pluginName, "::WithPluginState");
100
+ performanceOptions.trackingEnabled && startMeasure(measure);
101
+
102
+ _this.setState(_this.notAppliedState, function () {
103
+ performanceOptions.trackingEnabled && stopMeasure(measure, function (duration) {
104
+ // Each WithPluginState component will fire analytics event no more than once every `samplingLimit` times
105
+ if (++_this.callsCount % performanceOptions.samplingRate === 0 && duration > performanceOptions.slowThreshold) {
106
+ var _editorView = _this.getEditorView();
107
+
108
+ _this.dispatchAnalyticsEvent({
109
+ action: ACTION.WITH_PLUGIN_STATE_CALLED,
110
+ actionSubject: ACTION_SUBJECT.EDITOR,
111
+ eventType: EVENT_TYPE.OPERATIONAL,
112
+ attributes: {
113
+ plugin: pluginName,
114
+ duration: duration,
115
+ participants: getParticipantsCount(_editorView && _editorView.state)
116
+ }
117
+ });
118
+ }
119
+ });
120
+ });
121
121
 
122
122
  _this.debounce = null;
123
123
  _this.notAppliedState = {};
124
124
  });
125
125
  });
126
126
 
127
+ _defineProperty(_assertThisInitialized(_this), "dispatchAnalyticsEvent", function (payload) {
128
+ var eventDispatcher = _this.getEventDispatcher();
129
+
130
+ if (eventDispatcher) {
131
+ var dispatch = createDispatch(eventDispatcher);
132
+ dispatch(analyticsEventKey, {
133
+ payload: payload
134
+ });
135
+ }
136
+ });
137
+
127
138
  _defineProperty(_assertThisInitialized(_this), "onContextUpdate", function () {
128
139
  _this.subscribe(_this.props);
129
140
  });
@@ -146,17 +157,7 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
146
157
  }
147
158
  }, {
148
159
  key: "getPluginsStates",
149
- value: // TODO: ED-15580
150
- //private dispatchAnalyticsEvent = (payload: AnalyticsEventPayload) => {
151
- // const eventDispatcher = this.getEventDispatcher();
152
- // if (eventDispatcher) {
153
- // const dispatch: AnalyticsDispatch = createDispatch(eventDispatcher);
154
- // dispatch(analyticsEventKey, {
155
- // payload,
156
- // });
157
- // }
158
- //};
159
- function getPluginsStates(plugins, editorView) {
160
+ value: function getPluginsStates(plugins, editorView) {
160
161
  if (!editorView || !plugins) {
161
162
  return {};
162
163
  }
@@ -176,7 +177,9 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
176
177
  }, {
177
178
  key: "subscribe",
178
179
  value: function subscribe(props) {
179
- var _this2 = this;
180
+ var _uiTracking$samplingR,
181
+ _uiTracking$slowThres,
182
+ _this2 = this;
180
183
 
181
184
  var plugins = props.plugins;
182
185
  var eventDispatcher = this.getEventDispatcher(props);
@@ -184,20 +187,22 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
184
187
 
185
188
  if (!eventDispatcher || !editorView || this.isSubscribed) {
186
189
  return;
187
- } // TODO: ED-15580
188
- //const analyticsPlugin = analyticsPluginKey.getState(editorView.state);
189
- //const uiTracking =
190
- // analyticsPlugin && analyticsPlugin.performanceTracking
191
- // ? analyticsPlugin.performanceTracking.uiTracking || {}
192
- // : {};
193
- //const trackingEnabled = uiTracking.enabled === true;
194
- //const samplingRate = uiTracking.samplingRate || DEFAULT_SAMPLING_RATE;
195
- //const slowThreshold = uiTracking.slowThreshold || DEFAULT_SLOW_THRESHOLD;
196
-
197
-
198
- var trackingEnabled = false;
199
- var samplingRate = DEFAULT_SAMPLING_RATE;
200
- var slowThreshold = DEFAULT_SLOW_THRESHOLD;
190
+ } // TODO: ED-15663
191
+ // Please, do not copy or use this kind of code below
192
+ // @ts-ignore
193
+
194
+
195
+ var fakePluginKey = {
196
+ key: 'analyticsPlugin$',
197
+ getState: function getState(state) {
198
+ return state['analyticsPlugin$'];
199
+ }
200
+ };
201
+ var analyticsPlugin = fakePluginKey.getState(editorView.state);
202
+ var uiTracking = analyticsPlugin && analyticsPlugin.performanceTracking ? analyticsPlugin.performanceTracking.uiTracking || {} : {};
203
+ var trackingEnabled = uiTracking.enabled === true;
204
+ var samplingRate = (_uiTracking$samplingR = uiTracking.samplingRate) !== null && _uiTracking$samplingR !== void 0 ? _uiTracking$samplingR : DEFAULT_SAMPLING_RATE;
205
+ var slowThreshold = (_uiTracking$slowThres = uiTracking.slowThreshold) !== null && _uiTracking$slowThres !== void 0 ? _uiTracking$slowThres : DEFAULT_SLOW_THRESHOLD;
201
206
  this.isSubscribed = true;
202
207
  var pluginsStates = this.getPluginsStates(plugins, editorView);
203
208
  this.setState(pluginsStates);
@@ -105,6 +105,7 @@ export declare type ErrorEventAttributes = {
105
105
  errorId?: string;
106
106
  docStructure?: string | SimplifiedNode;
107
107
  browserExtensions?: UserBrowserExtensionResults;
108
+ outdatedBrowser?: boolean;
108
109
  };
109
110
  declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes, undefined>;
110
111
  declare type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION, ACTION_SUBJECT.EDITOR, undefined, {
@@ -8,6 +8,7 @@ export interface ExtensionParams<T extends Parameters> {
8
8
  parameters?: T;
9
9
  content?: object | string;
10
10
  localId?: string;
11
+ fragmentLocalId?: string;
11
12
  }
12
13
  export declare type ExtensionHandler<T extends Parameters = Parameters> = (ext: ExtensionParams<T>, doc: object) => JSX.Element | null;
13
14
  export declare type OnSaveCallback<T extends Parameters = Parameters> = (params: T) => void;
@@ -9,7 +9,7 @@ export { ruleSharedStyles } from './shared/rule';
9
9
  export { whitespaceSharedStyles } from './shared/whitespace';
10
10
  export { paragraphSharedStyles } from './shared/paragraph';
11
11
  export { linkSharedStyle } from './shared/link';
12
- export { listsSharedStyles } from './shared/lists';
12
+ export { listsSharedStyles, listPaddingLeftMarkerSpace } from './shared/lists';
13
13
  export { indentationSharedStyles } from './shared/indentation';
14
14
  export { blockMarksSharedStyles } from './shared/block-marks';
15
15
  export { codeMarkSharedStyles } from './shared/code-mark';
@@ -18,6 +18,6 @@ export { dateSharedStyle, DateSharedCssClassName } from './shared/date';
18
18
  export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, } from './shared/task-decision';
19
19
  export { StatusSharedCssClassName } from './shared/status';
20
20
  export { smartCardSharedStyles, SmartCardSharedCssClassName, } from './shared/smart-card';
21
- export { CodeBlockSharedCssClassName, codeBlockSharedStyles, } from './shared/code-block';
21
+ export { CodeBlockSharedCssClassName, codeBlockSharedStyles, codeBlockInListSafariFix, } from './shared/code-block';
22
22
  export { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from './shared/layout';
23
23
  export { EXTENSION_PADDING, BODIED_EXT_PADDING } from './shared/extension';
@@ -8,3 +8,4 @@ export declare const CodeBlockSharedCssClassName: {
8
8
  DS_CODEBLOCK: string;
9
9
  };
10
10
  export declare const codeBlockSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
11
+ export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
@@ -1 +1,2 @@
1
+ export declare const listPaddingLeftMarkerSpace = 24;
1
2
  export declare const listsSharedStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,20 @@
1
+ import { MarkType, NodeType } from 'prosemirror-model';
2
+ import { EditorState } from 'prosemirror-state';
3
+ import { IntlShape } from 'react-intl-next';
4
+ import { Command } from './command';
5
+ export declare type MarkOptions = {
6
+ state: EditorState;
7
+ formatMessage: IntlShape['formatMessage'];
8
+ nodeType?: undefined;
9
+ markType: MarkType;
10
+ onMouseEnter?: undefined;
11
+ onMouseLeave?: undefined;
12
+ };
13
+ export declare type NodeOptions = {
14
+ state: EditorState;
15
+ formatMessage: IntlShape['formatMessage'];
16
+ nodeType: NodeType | Array<NodeType>;
17
+ markType?: undefined;
18
+ onMouseEnter?: Command;
19
+ onMouseLeave?: Command;
20
+ };
@@ -10,6 +10,7 @@ export interface EditorActionsOptions<T = any> {
10
10
  clear(): boolean;
11
11
  getValue(): Promise<T | JSONDocNode | undefined>;
12
12
  getNodeByLocalId(id: string): Node | undefined;
13
+ getNodeByFragmentLocalId(id: string): Node | undefined;
13
14
  getSelectedNode(): Node | undefined;
14
15
  replaceDocument(rawValue: any): boolean;
15
16
  replaceSelection(rawValue: Node | Object | string): boolean;
@@ -1,6 +1,20 @@
1
1
  export declare type EditorContainerWidth = {
2
+ /**
3
+ * Starts as offsetWidth of document body, and then
4
+ * updates to the editors content areas offsetWidth
5
+ * via the use of a contentComponent (via the
6
+ * container element prop).
7
+ */
2
8
  width: number;
3
9
  containerWidth?: number;
10
+ /**
11
+ * Starts as undefined, and then updates to the
12
+ * clientWidth of the dom element the EditorView
13
+ * is attached to.
14
+ *
15
+ * Then the WidthEmitter updates this whenever the
16
+ * context panel or editor widths change.
17
+ */
4
18
  lineLength?: number;
5
19
  };
6
20
  export declare type GetEditorContainerWidth = () => EditorContainerWidth;
@@ -185,12 +185,6 @@ export declare type FeatureFlags = {
185
185
  * @default false
186
186
  */
187
187
  extendFloatingToolbar?: boolean;
188
- /**
189
- * Set editor to use the input rule with unpredictable undo results
190
- * @see https://product-fabric.atlassian.net/browse/ED-12676
191
- * @default true
192
- */
193
- useUnpredictableInputRule?: boolean;
194
188
  /**
195
189
  * Show the avatar group as a plugin
196
190
  * @see https://product-fabric.atlassian.net/browse/CERN-747
@@ -8,6 +8,7 @@ import type { DispatchAnalyticsEvent } from '../analytics/types/dispatch-analyti
8
8
  import type { ProviderFactory } from '../provider-factory';
9
9
  import type { PaletteColor } from '../ui-color/ColorPalette/Palettes/type';
10
10
  import type { Command } from './command';
11
+ import type { MarkOptions, NodeOptions } from './copy-button';
11
12
  export interface RenderOptionsPropsT<T> {
12
13
  hide: () => void;
13
14
  dispatchCommand: (command: T) => void;
@@ -54,6 +55,11 @@ export interface ConfirmDialogOptions {
54
55
  okButtonLabel?: string;
55
56
  cancelButtonLabel?: string;
56
57
  }
58
+ export declare type FloatingToolbarCopyButton = {
59
+ type: 'copy-button';
60
+ items: Array<FloatingToolbarSeparator | MarkOptions | NodeOptions>;
61
+ hidden?: boolean;
62
+ };
57
63
  export declare type FloatingToolbarButton<T> = {
58
64
  id?: string;
59
65
  type: 'button';
@@ -95,6 +101,17 @@ export declare type FloatingToolbarInput<T> = {
95
101
  };
96
102
  export declare type FloatingToolbarCustom<T> = {
97
103
  type: 'custom';
104
+ /**
105
+ * By default -- the floating toolbar supports navigating between
106
+ * items using arrow keys (to meet aria guidelines).
107
+ * In some cases the floating toolbar is being used to present
108
+ * non toolbar content -- such as the link editing experience.
109
+ * In these cases you can opt out of arrow navigation using the
110
+ * this property.
111
+ *
112
+ * @default false
113
+ */
114
+ disableArrowNavigation?: boolean;
98
115
  fallback: Array<FloatingToolbarFallbackItem<T>>;
99
116
  render: (view?: EditorView, idx?: number, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => React.ComponentClass | React.SFC | React.ReactElement<any> | null;
100
117
  hidden?: boolean;
@@ -159,8 +176,8 @@ declare type FloatingToolbarExtensionsPlaceholder = {
159
176
  * This type is restricted with the items that can be used for fallback.
160
177
  * Make sure that this type is not a FloatingToolbarCustom type.
161
178
  */
162
- export declare type FloatingToolbarFallbackItem<T> = FloatingToolbarButton<T> | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
163
- export declare type FloatingToolbarItem<T> = FloatingToolbarButton<T> | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
179
+ export declare type FloatingToolbarFallbackItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
180
+ export declare type FloatingToolbarItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
164
181
  export interface FloatingToolbarConfig {
165
182
  title: string;
166
183
  /**
@@ -172,6 +189,9 @@ export interface FloatingToolbarConfig {
172
189
  */
173
190
  getDomRef?: (view: EditorView) => HTMLElement | undefined;
174
191
  visible?: boolean;
192
+ /**
193
+ * nodeType or list of `nodeType`s this floating toolbar should be shown for.
194
+ **/
175
195
  nodeType: NodeType | NodeType[];
176
196
  items: Array<FloatingToolbarItem<Command>> | ((node: Node) => Array<FloatingToolbarItem<Command>>);
177
197
  align?: AlignType;
@@ -181,6 +201,7 @@ export interface FloatingToolbarConfig {
181
201
  offset?: [number, number];
182
202
  forcePlacement?: boolean;
183
203
  onPositionCalculated?: (editorView: EditorView, nextPos: Position) => Position;
204
+ scrollable?: boolean;
184
205
  }
185
206
  export declare type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory) => FloatingToolbarConfig | undefined;
186
207
  export {};
@@ -18,7 +18,8 @@ export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags, } from './fea
18
18
  export type { Browsers, Range, DisableSpellcheckByBrowser, } from './supported-browsers';
19
19
  export type { EditorContainerWidth, GetEditorContainerWidth, } from './editor-container-width';
20
20
  export type { EmptyStateHandler, EmptyStateHandlerParams, } from './empty-state-handler';
21
- export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogOptions, FloatingToolbarButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, } from './floating-toolbar';
21
+ export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogOptions, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, } from './floating-toolbar';
22
+ export type { MarkOptions, NodeOptions } from './copy-button';
22
23
  export type { ContextPanelHandler } from './context-panel';
23
24
  export type { EditorAppearance } from './editor-appearance';
24
25
  export type { ToolbarUiComponentFactoryParams, ToolbarUIComponentFactory, } from './toolbar';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface WrapProps {
3
+ children: JSX.Element;
4
+ }
5
+ export default function IntlProviderIfMissingWrapper({ children }: WrapProps): JSX.Element;
6
+ export {};
@@ -19,6 +19,7 @@ export interface Props {
19
19
  forcePlacement?: boolean;
20
20
  allowOutOfBounds?: boolean;
21
21
  rect?: DOMRect;
22
+ style?: React.CSSProperties;
22
23
  }
23
24
  export interface State {
24
25
  popup?: HTMLElement;
@@ -37,7 +37,8 @@ export declare class PortalProviderAPI extends EventDispatcher {
37
37
  export declare const PortalProvider: React.FC<import("react-intl-next").WithIntlProps<BasePortalProviderProps>> & {
38
38
  WrappedComponent: React.ComponentType<BasePortalProviderProps>;
39
39
  };
40
- export declare const PortalProviderWithThemeProviders: (props: Omit<BasePortalProviderProps, 'intl' | 'themeMode'>) => JSX.Element;
40
+ declare type PortalProviderWithThemeProvidersProps = Omit<BasePortalProviderProps, 'intl' | 'themeMode'>;
41
+ export declare const PortalProviderWithThemeProviders: ({ onAnalyticsEvent, useAnalyticsContext, render, }: PortalProviderWithThemeProvidersProps) => JSX.Element;
41
42
  export declare class PortalRenderer extends React.Component<{
42
43
  portalProviderAPI: PortalProviderAPI;
43
44
  }, PortalRendererState> {
@@ -23,3 +23,4 @@ export type { StyleProps as ExpandStyleProps } from './Expand';
23
23
  export { ErrorMessage, HelperMessage, ValidMessage } from './Messages';
24
24
  export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle, } from './clear-next-sibling-margin-top';
25
25
  export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE, } from './IntlErrorBoundary';
26
+ export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
@@ -1,3 +1,4 @@
1
+ import { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
1
2
  /**
2
3
  * Variables required to construct a context for breakout ssr inline script.
3
4
  *
@@ -8,3 +9,27 @@ export declare const absoluteBreakoutWidth: (layout: 'full-width' | 'wide' | str
8
9
  export { breakoutConsts };
9
10
  export declare const calcWideWidth: any;
10
11
  export declare const calcBreakoutWidth: any;
12
+ export declare function calculateBreakoutStyles({ mode, widthStateLineLength, widthStateWidth, }: {
13
+ mode: BreakoutMarkAttrs['mode'];
14
+ /**
15
+ * offsetWidth of the content the editor is attached to.
16
+ * Expected to be retrieved via `WidthState.lineLength`.
17
+ */
18
+ widthStateWidth?: number;
19
+ /**
20
+ * clientWidth of the content area in the editor (ie. EditorPlugin contentComponents).
21
+ * Expected to be retrieved via `WidthState.width`.
22
+ */
23
+ widthStateLineLength?: number;
24
+ }): {
25
+ type: "line-length-unknown";
26
+ width: any;
27
+ transform: string;
28
+ marginLeft: string;
29
+ } | {
30
+ type: "line-length-known";
31
+ width: any;
32
+ marginLeft: string;
33
+ transform?: undefined;
34
+ };
35
+ export declare function calcBreakoutWidthPx(mode: BreakoutMarkAttrs['mode'], widthStateWidth?: number): number;
@@ -0,0 +1,2 @@
1
+ import { EditorState } from 'prosemirror-state';
2
+ export declare const getParticipantsCount: (editorState?: EditorState<any> | undefined) => any;
@@ -20,7 +20,21 @@ export declare function removeNestedEmptyEls(el: HTMLElement): void;
20
20
  export declare const containsClassName: (node: HTMLElement | SVGElement | null, className: string) => boolean;
21
21
  export declare function closest(node: HTMLElement | null | undefined, s: string): HTMLElement | null;
22
22
  export declare function closestElement(node: HTMLElement | null | undefined, s: string): HTMLElement | null;
23
- export declare function parsePx(pxStr: string): number | undefined;
23
+ /**
24
+ * Util for converting a css pixel size value to a number (of pixels).
25
+ *
26
+ * ie.
27
+ * ```ts
28
+ * const pixels = parsePx('10px')
29
+ * // ^$ const pixels: number
30
+ * ```
31
+ * * ```ts
32
+ * const pixels = parsePx('10')
33
+ * // ^$ const pixels: number | undefined
34
+ * ```
35
+ */
36
+ export declare function parsePx<PXString extends `${number}px`>(pxStr: PXString): number;
37
+ export declare function parsePx<PXString extends string>(pxStr: PXString): number | undefined;
24
38
  export declare type MapCallback<T, S> = (elem: S, idx: number, parent: Element) => T;
25
39
  export declare function mapElem<T>(elem: Element, callback: MapCallback<T, Element>): Array<T>;
26
40
  export declare function maphElem<T, U extends HTMLElement>(elem: U, callback: MapCallback<T, U>): Array<T>;
@@ -0,0 +1,18 @@
1
+ import { EditorState } from 'prosemirror-state';
2
+ import type { EditorView } from 'prosemirror-view';
3
+ import { AnalyticsEventPayload } from '../analytics';
4
+ export declare function getPerformanceOptions(view: EditorView): {
5
+ trackingEnabled: boolean;
6
+ samplingRate: number;
7
+ slowThreshold: number;
8
+ };
9
+ export declare function startMeasureReactNodeViewRendered({ nodeTypeName, }: {
10
+ nodeTypeName: string;
11
+ }): void;
12
+ export declare function stopMeasureReactNodeViewRendered({ nodeTypeName, dispatchAnalyticsEvent, editorState, samplingRate, slowThreshold, }: {
13
+ nodeTypeName: string;
14
+ dispatchAnalyticsEvent(payload: AnalyticsEventPayload): void;
15
+ editorState: EditorState;
16
+ samplingRate: number;
17
+ slowThreshold: number;
18
+ }): void;
@@ -1 +1 @@
1
- export declare function getModeFromTheme(theme: string): "dark" | "light";
1
+ export declare function getModeFromTheme(theme: string): "light" | "dark";
@@ -9,7 +9,7 @@ export type { Date } from './date';
9
9
  export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, } from './editor-core-utils';
10
10
  export { withImageLoader } from './imageLoader';
11
11
  export type { ImageLoaderProps, ImageLoaderState, ImageStatus, } from './imageLoader';
12
- export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, } from './breakout';
12
+ export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, } from './breakout';
13
13
  export { findChangedNodesFromTransaction, validNode, validateNodes, isType, isParagraph, isText, isLinkMark, SelectedState, isNodeSelectedOrInRange, isSupportedInParent, } from './nodes';
14
14
  export type { Reducer } from './plugin-state-factory';
15
15
  export { pluginFactory } from './plugin-state-factory';
@@ -35,6 +35,7 @@ export { ZERO_WIDTH_SPACE, ZERO_WIDTH_JOINER } from './whitespace';
35
35
  export type { Diff } from './types';
36
36
  export { shouldForceTracking } from './should-force-tracking';
37
37
  export { getModeFromTheme } from './getModeFromTheme';
38
+ export { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, } from './get-performance-options';
38
39
  export type { UserBrowserExtensionResults } from './browser-extensions';
39
40
  export { sniffUserBrowserExtensions } from './browser-extensions';
40
41
  export { RenderCountProfiler } from './profiler/render-count';
@@ -43,3 +44,6 @@ export { getShallowPropsDifference, getPropsDifference } from './compare-props';
43
44
  export type { ShallowPropsDifference, PropsDifference } from './compare-props';
44
45
  export { useComponentRenderTracking } from './performance/hooks/use-component-render-tracking';
45
46
  export type { UseComponentRenderTrackingArgs } from './performance/hooks/use-component-render-tracking';
47
+ export { isOutdatedBrowser } from './outdated-browsers';
48
+ export { isReferencedSource } from './referentiality';
49
+ export { sendLogs } from './sendLogs';
@@ -0,0 +1 @@
1
+ export declare const isOutdatedBrowser: (userAgent: string) => boolean;
@@ -0,0 +1,3 @@
1
+ import { Node as PMNode } from 'prosemirror-model';
2
+ import { EditorState } from 'prosemirror-state';
3
+ export declare const isReferencedSource: (state: EditorState, node?: PMNode<any> | undefined) => boolean;
@@ -0,0 +1 @@
1
+ export declare const sendLogs: (body: any) => Promise<Response>;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { PluginKey } from 'prosemirror-state';
4
4
  import { EditorView } from 'prosemirror-view';
5
- import type { EventDispatcher } from '../event-dispatcher';
5
+ import { EventDispatcher } from '../event-dispatcher';
6
6
  import type { NamedPluginKeys, NamedPluginStates } from './types';
7
7
  export declare type PerformanceOptions = {
8
8
  samplingRate: number;
@@ -13,7 +13,7 @@ export interface State {
13
13
  [name: string]: any;
14
14
  }
15
15
  declare type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: EventDispatcher) => void;
16
- declare type EditorActionsPrivateAccess = {
16
+ export declare type EditorActionsPrivateAccess = {
17
17
  _privateGetEditorView: () => EditorView;
18
18
  _privateGetEventDispatcher: () => EventDispatcher;
19
19
  _privateSubscribe: (cb: ContextUpdateHandler) => void;
@@ -59,6 +59,7 @@ declare class WithPluginState<P extends NamedPluginKeys> extends React.Component
59
59
  private debounce;
60
60
  private notAppliedState;
61
61
  private isSubscribed;
62
+ private callsCount;
62
63
  static contextTypes: {
63
64
  editorActions: PropTypes.Requireable<object>;
64
65
  editorSharedConfig: PropTypes.Requireable<object>;
@@ -72,6 +73,7 @@ declare class WithPluginState<P extends NamedPluginKeys> extends React.Component
72
73
  * Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
73
74
  */
74
75
  private updateState;
76
+ private dispatchAnalyticsEvent;
75
77
  private getPluginsStates;
76
78
  private subscribe;
77
79
  private unsubscribe;