@atlaskit/editor-common 72.2.0 → 72.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (573) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/__tests_external__/cases/fundamentals/collection.js +0 -5
  3. package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -4
  4. package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -8
  5. package/dist/cjs/__tests_external__/cases/smart-links/index.js +0 -4
  6. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/delete.js +1 -8
  7. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/edit.js +2 -12
  8. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -6
  9. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/insert.js +1 -8
  10. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/delete.js +1 -8
  11. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/edit.js +2 -12
  12. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -6
  13. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/insert.js +1 -8
  14. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/delete.js +1 -8
  15. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/edit.js +2 -12
  16. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -7
  17. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/insert.js +1 -8
  18. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +1 -8
  19. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -4
  20. package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/insert.js +1 -8
  21. package/dist/cjs/__tests_external__/index.js +0 -3
  22. package/dist/cjs/__tests_external__/page-objects/Editor.js +0 -16
  23. package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +0 -29
  24. package/dist/cjs/__tests_external__/page-objects/Renderer.js +0 -14
  25. package/dist/cjs/analytics/index.js +0 -1
  26. package/dist/cjs/analytics/types/enums.js +0 -15
  27. package/dist/cjs/analytics/types/extension-events.js +0 -4
  28. package/dist/cjs/analytics/types/format-events.js +0 -3
  29. package/dist/cjs/analytics/types/general-events.js +0 -7
  30. package/dist/cjs/analytics/types/index.js +0 -14
  31. package/dist/cjs/analytics/types/inline-comment-events.js +0 -1
  32. package/dist/cjs/analytics/types/insert-events.js +0 -7
  33. package/dist/cjs/analytics/types/list-events.js +0 -3
  34. package/dist/cjs/analytics/types/node-events.js +0 -3
  35. package/dist/cjs/analytics/types/substitute-events.js +0 -3
  36. package/dist/cjs/analytics/types/table-events.js +0 -4
  37. package/dist/cjs/analytics/types/toolbar-button.js +0 -1
  38. package/dist/cjs/analytics/types/utils.js +0 -3
  39. package/dist/cjs/core-utils/index.js +0 -1
  40. package/dist/cjs/core-utils/inside.js +2 -5
  41. package/dist/cjs/emoji.js +0 -3
  42. package/dist/cjs/event-dispatcher/index.js +0 -14
  43. package/dist/cjs/extensions/combine-extension-providers.js +2 -6
  44. package/dist/cjs/extensions/default-extension-provider.js +0 -26
  45. package/dist/cjs/extensions/extension-fields-helpers.js +0 -35
  46. package/dist/cjs/extensions/extension-handlers.js +0 -27
  47. package/dist/cjs/extensions/index.js +0 -8
  48. package/dist/cjs/extensions/manifest-helpers.js +4 -30
  49. package/dist/cjs/extensions/module-helpers.js +17 -89
  50. package/dist/cjs/extensions/types/field-definitions.js +1 -10
  51. package/dist/cjs/extensions/types/index.js +0 -1
  52. package/dist/cjs/extensions.js +0 -1
  53. package/dist/cjs/i18n/cs.js +0 -1
  54. package/dist/cjs/i18n/da.js +0 -1
  55. package/dist/cjs/i18n/de.js +0 -1
  56. package/dist/cjs/i18n/en.js +0 -1
  57. package/dist/cjs/i18n/en_GB.js +0 -1
  58. package/dist/cjs/i18n/en_ZZ.js +0 -1
  59. package/dist/cjs/i18n/es.js +0 -1
  60. package/dist/cjs/i18n/et.js +0 -1
  61. package/dist/cjs/i18n/fi.js +0 -1
  62. package/dist/cjs/i18n/fr.js +0 -1
  63. package/dist/cjs/i18n/hu.js +0 -1
  64. package/dist/cjs/i18n/index.js +0 -27
  65. package/dist/cjs/i18n/it.js +0 -1
  66. package/dist/cjs/i18n/ja.js +0 -1
  67. package/dist/cjs/i18n/ko.js +0 -1
  68. package/dist/cjs/i18n/languages.js +0 -1
  69. package/dist/cjs/i18n/nb.js +0 -1
  70. package/dist/cjs/i18n/nl.js +0 -1
  71. package/dist/cjs/i18n/pl.js +0 -1
  72. package/dist/cjs/i18n/pt_BR.js +0 -1
  73. package/dist/cjs/i18n/pt_PT.js +0 -1
  74. package/dist/cjs/i18n/ru.js +0 -1
  75. package/dist/cjs/i18n/sk.js +0 -1
  76. package/dist/cjs/i18n/sv.js +0 -1
  77. package/dist/cjs/i18n/th.js +0 -1
  78. package/dist/cjs/i18n/tr.js +0 -1
  79. package/dist/cjs/i18n/uk.js +0 -1
  80. package/dist/cjs/i18n/vi.js +0 -1
  81. package/dist/cjs/i18n/zh.js +0 -1
  82. package/dist/cjs/i18n/zh_TW.js +0 -1
  83. package/dist/cjs/icons/index.js +0 -11
  84. package/dist/cjs/icons/shared/PanelErrorIcon.js +0 -7
  85. package/dist/cjs/icons/shared/PanelInfoIcon.js +0 -7
  86. package/dist/cjs/icons/shared/PanelNoteIcon.js +0 -7
  87. package/dist/cjs/icons/shared/PanelSuccessIcon.js +0 -7
  88. package/dist/cjs/icons/shared/PanelWarningIcon.js +0 -7
  89. package/dist/cjs/icons/shared/table.js +1 -3
  90. package/dist/cjs/in-product.js +0 -1
  91. package/dist/cjs/keymaps/index.js +2 -50
  92. package/dist/cjs/mention.js +0 -3
  93. package/dist/cjs/messages/codeBidiWarning.js +0 -2
  94. package/dist/cjs/messages/codeBlockCopyButton.js +0 -2
  95. package/dist/cjs/messages/index.js +0 -8
  96. package/dist/cjs/messages/insert-block.js +0 -2
  97. package/dist/cjs/messages/link.js +0 -2
  98. package/dist/cjs/messages/unsupportedContent.js +0 -2
  99. package/dist/cjs/node-width/index.js +2 -20
  100. package/dist/cjs/normalize-feature-flags.js +6 -25
  101. package/dist/cjs/panel.js +0 -1
  102. package/dist/cjs/provider-factory/context.js +3 -17
  103. package/dist/cjs/provider-factory/provider-factory.js +0 -19
  104. package/dist/cjs/provider-factory/with-providers.js +5 -28
  105. package/dist/cjs/provider-factory.js +0 -4
  106. package/dist/cjs/provider-helpers/combine-providers.js +3 -33
  107. package/dist/cjs/provider-helpers/index.js +0 -2
  108. package/dist/cjs/provider-helpers/promise-helpers.js +3 -15
  109. package/dist/cjs/react-node-view/index.js +18 -48
  110. package/dist/cjs/safe-plugin/index.js +1 -14
  111. package/dist/cjs/selection/gap-cursor/selection.js +8 -44
  112. package/dist/cjs/selection/gap-cursor/utils/index.js +0 -2
  113. package/dist/cjs/selection/gap-cursor/utils/is-ignored.js +0 -2
  114. package/dist/cjs/selection/gap-cursor/utils/is-valid-target-node.js +0 -3
  115. package/dist/cjs/selection/index.js +0 -4
  116. package/dist/cjs/selection/types.js +0 -1
  117. package/dist/cjs/selection/utils.js +0 -12
  118. package/dist/cjs/styles/index.js +0 -23
  119. package/dist/cjs/styles/shared/annotation.js +0 -11
  120. package/dist/cjs/styles/shared/block-marks.js +0 -5
  121. package/dist/cjs/styles/shared/blockquote.js +0 -7
  122. package/dist/cjs/styles/shared/code-block.js +0 -11
  123. package/dist/cjs/styles/shared/code-mark.js +0 -9
  124. package/dist/cjs/styles/shared/column-layout.js +0 -6
  125. package/dist/cjs/styles/shared/date.js +0 -5
  126. package/dist/cjs/styles/shared/emoji.js +0 -2
  127. package/dist/cjs/styles/shared/extension.js +0 -2
  128. package/dist/cjs/styles/shared/headings.js +0 -7
  129. package/dist/cjs/styles/shared/indentation.js +0 -5
  130. package/dist/cjs/styles/shared/layout.js +0 -2
  131. package/dist/cjs/styles/shared/link.js +0 -5
  132. package/dist/cjs/styles/shared/lists.js +2 -21
  133. package/dist/cjs/styles/shared/media-single.js +0 -5
  134. package/dist/cjs/styles/shared/panel.js +15 -41
  135. package/dist/cjs/styles/shared/paragraph.js +0 -6
  136. package/dist/cjs/styles/shared/rule.js +2 -10
  137. package/dist/cjs/styles/shared/shadow.js +1 -9
  138. package/dist/cjs/styles/shared/smart-card.js +0 -3
  139. package/dist/cjs/styles/shared/table.js +0 -20
  140. package/dist/cjs/styles/shared/task-decision.js +0 -6
  141. package/dist/cjs/styles/shared/text-color.js +0 -5
  142. package/dist/cjs/styles/shared/whitespace.js +0 -5
  143. package/dist/cjs/transforms/expand.js +7 -16
  144. package/dist/cjs/transforms/extension.js +2 -7
  145. package/dist/cjs/transforms/index.js +0 -3
  146. package/dist/cjs/transforms/layout.js +9 -15
  147. package/dist/cjs/type-ahead/index.js +0 -3
  148. package/dist/cjs/types/annotation/emitter.js +0 -11
  149. package/dist/cjs/types/annotation/index.js +0 -1
  150. package/dist/cjs/types/index.js +0 -4
  151. package/dist/cjs/types/toolbar.js +0 -5
  152. package/dist/cjs/ufo/experience-store.js +0 -24
  153. package/dist/cjs/ufo/index.js +0 -1
  154. package/dist/cjs/ui/BaseTheme/index.js +3 -21
  155. package/dist/cjs/ui/Caption/index.js +5 -29
  156. package/dist/cjs/ui/Caption/messages.js +0 -2
  157. package/dist/cjs/ui/DropList/index.js +18 -51
  158. package/dist/cjs/ui/Emoji/index.js +7 -33
  159. package/dist/cjs/ui/ErrorBoundary/index.js +0 -22
  160. package/dist/cjs/ui/Expand/index.js +5 -31
  161. package/dist/cjs/ui/IntlErrorBoundary/index.js +0 -24
  162. package/dist/cjs/ui/IntlProviderIfMissingWrapper/index.js +0 -9
  163. package/dist/cjs/ui/Layer/index.js +16 -46
  164. package/dist/cjs/ui/Layer/internal/helpers.js +0 -2
  165. package/dist/cjs/ui/MediaSingle/grid.js +0 -8
  166. package/dist/cjs/ui/MediaSingle/index.js +26 -44
  167. package/dist/cjs/ui/MediaSingle/link.js +0 -5
  168. package/dist/cjs/ui/MediaSingle/styled.js +11 -50
  169. package/dist/cjs/ui/Mention/index.js +5 -27
  170. package/dist/cjs/ui/Mention/mention-with-profilecard.js +8 -16
  171. package/dist/cjs/ui/Mention/mention-with-providers.js +5 -33
  172. package/dist/cjs/ui/Messages/index.js +0 -18
  173. package/dist/cjs/ui/OverflowShadow/index.js +3 -48
  174. package/dist/cjs/ui/OverflowShadow/shadowObserver.js +2 -26
  175. package/dist/cjs/ui/Popup/index.js +28 -80
  176. package/dist/cjs/ui/Popup/utils.js +67 -132
  177. package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +3 -13
  178. package/dist/cjs/ui/PortalProvider/index.js +16 -73
  179. package/dist/cjs/ui/UnsupportedBlock/index.js +5 -29
  180. package/dist/cjs/ui/UnsupportedInline/index.js +5 -29
  181. package/dist/cjs/ui/WidthProvider/index.js +1 -31
  182. package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +2 -16
  183. package/dist/cjs/ui/clear-next-sibling-margin-top.js +0 -5
  184. package/dist/cjs/ui/index.js +0 -23
  185. package/dist/cjs/ui/unsupported-content-helper.js +0 -5
  186. package/dist/cjs/ui/with-outer-listeners.js +0 -25
  187. package/dist/cjs/ui-color/ColorPalette/Color/index.js +12 -40
  188. package/dist/cjs/ui-color/ColorPalette/Color/styles.js +0 -10
  189. package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +0 -7
  190. package/dist/cjs/ui-color/ColorPalette/Palettes/common.js +4 -12
  191. package/dist/cjs/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -3
  192. package/dist/cjs/ui-color/ColorPalette/Palettes/index.js +0 -1
  193. package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -3
  194. package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +0 -8
  195. package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +0 -10
  196. package/dist/cjs/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -7
  197. package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -9
  198. package/dist/cjs/ui-color/ColorPalette/index.js +16 -38
  199. package/dist/cjs/ui-color/ColorPalette/styles.js +0 -6
  200. package/dist/cjs/ui-color/index.js +0 -9
  201. package/dist/cjs/ui-menu/Dropdown/index.js +14 -38
  202. package/dist/cjs/ui-menu/DropdownMenu/index.js +23 -75
  203. package/dist/cjs/ui-menu/MenuArrowKeyNavigationProvider/index.js +16 -49
  204. package/dist/cjs/ui-menu/ToolbarButton/index.js +23 -46
  205. package/dist/cjs/ui-menu/ToolbarButton/styles.js +0 -6
  206. package/dist/cjs/ui-menu/index.js +0 -7
  207. package/dist/cjs/ui-react/ReactEditorViewContext.js +0 -4
  208. package/dist/cjs/ui-react/index.js +0 -3
  209. package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +9 -49
  210. package/dist/cjs/utils/analytics.js +0 -14
  211. package/dist/cjs/utils/annotation/index.js +5 -13
  212. package/dist/cjs/utils/breakout.js +7 -23
  213. package/dist/cjs/utils/browser-extensions.js +28 -56
  214. package/dist/cjs/utils/browser.js +0 -2
  215. package/dist/cjs/utils/builder.js +0 -10
  216. package/dist/cjs/utils/collab.js +0 -4
  217. package/dist/cjs/utils/compare-props.js +11 -25
  218. package/dist/cjs/utils/compareNodes.js +7 -53
  219. package/dist/cjs/utils/compose.js +0 -2
  220. package/dist/cjs/utils/date.js +4 -25
  221. package/dist/cjs/utils/dom.js +6 -29
  222. package/dist/cjs/utils/editor-core-utils.js +8 -33
  223. package/dist/cjs/utils/error-reporter.js +0 -7
  224. package/dist/cjs/utils/extension-handler.js +0 -3
  225. package/dist/cjs/utils/get-performance-options.js +4 -12
  226. package/dist/cjs/utils/getModeFromTheme.js +0 -1
  227. package/dist/cjs/utils/imageLoader.js +0 -27
  228. package/dist/cjs/utils/index.js +0 -40
  229. package/dist/cjs/utils/is-text-input.js +5 -11
  230. package/dist/cjs/utils/list.js +3 -13
  231. package/dist/cjs/utils/macro.js +1 -7
  232. package/dist/cjs/utils/nodes.js +4 -31
  233. package/dist/cjs/utils/outdated-browsers.js +0 -10
  234. package/dist/cjs/utils/performance/hooks/use-component-render-tracking/index.js +4 -14
  235. package/dist/cjs/utils/performance/is-performance-api-available.js +0 -4
  236. package/dist/cjs/utils/performance/measure-render.js +1 -11
  237. package/dist/cjs/utils/performance/measure-tti.js +3 -17
  238. package/dist/cjs/utils/performance/measure.js +0 -11
  239. package/dist/cjs/utils/performance/navigation.js +0 -5
  240. package/dist/cjs/utils/plugin-state-factory.js +3 -11
  241. package/dist/cjs/utils/profiler/render-count.js +4 -24
  242. package/dist/cjs/utils/referentiality.js +30 -88
  243. package/dist/cjs/utils/sendLogs.js +0 -2
  244. package/dist/cjs/utils/should-force-tracking.js +4 -7
  245. package/dist/cjs/utils/slice.js +0 -17
  246. package/dist/cjs/utils/table.js +4 -13
  247. package/dist/cjs/utils/track-unsupported-content.js +14 -39
  248. package/dist/cjs/utils/traversor.js +0 -14
  249. package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +5 -21
  250. package/dist/cjs/utils/validate-using-spec.js +5 -36
  251. package/dist/cjs/utils/validator.js +26 -188
  252. package/dist/cjs/validator.js +0 -1
  253. package/dist/cjs/version.json +1 -1
  254. package/dist/cjs/with-plugin-state/index.js +7 -55
  255. package/dist/es2019/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -3
  256. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -1
  257. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -2
  258. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -1
  259. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -1
  260. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -2
  261. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -1
  262. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -1
  263. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -2
  264. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -1
  265. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -1
  266. package/dist/es2019/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -1
  267. package/dist/es2019/__tests_external__/page-objects/Editor.js +0 -4
  268. package/dist/es2019/__tests_external__/page-objects/EditorSmartLink.js +0 -28
  269. package/dist/es2019/__tests_external__/page-objects/Renderer.js +0 -2
  270. package/dist/es2019/analytics/types/enums.js +0 -15
  271. package/dist/es2019/analytics/types/extension-events.js +2 -3
  272. package/dist/es2019/analytics/types/format-events.js +0 -3
  273. package/dist/es2019/analytics/types/general-events.js +0 -7
  274. package/dist/es2019/analytics/types/inline-comment-events.js +0 -1
  275. package/dist/es2019/analytics/types/insert-events.js +0 -7
  276. package/dist/es2019/analytics/types/list-events.js +0 -3
  277. package/dist/es2019/analytics/types/node-events.js +0 -3
  278. package/dist/es2019/analytics/types/substitute-events.js +0 -3
  279. package/dist/es2019/analytics/types/table-events.js +2 -3
  280. package/dist/es2019/analytics/types/toolbar-button.js +0 -1
  281. package/dist/es2019/analytics/types/utils.js +0 -3
  282. package/dist/es2019/event-dispatcher/index.js +1 -12
  283. package/dist/es2019/extensions/combine-extension-providers.js +0 -5
  284. package/dist/es2019/extensions/default-extension-provider.js +0 -8
  285. package/dist/es2019/extensions/extension-fields-helpers.js +4 -10
  286. package/dist/es2019/extensions/extension-handlers.js +1 -8
  287. package/dist/es2019/extensions/manifest-helpers.js +2 -7
  288. package/dist/es2019/extensions/module-helpers.js +10 -43
  289. package/dist/es2019/extensions/types/field-definitions.js +1 -0
  290. package/dist/es2019/icons/index.js +1 -3
  291. package/dist/es2019/icons/shared/PanelErrorIcon.js +0 -2
  292. package/dist/es2019/icons/shared/PanelInfoIcon.js +0 -2
  293. package/dist/es2019/icons/shared/PanelNoteIcon.js +0 -2
  294. package/dist/es2019/icons/shared/PanelSuccessIcon.js +0 -2
  295. package/dist/es2019/icons/shared/PanelWarningIcon.js +0 -2
  296. package/dist/es2019/keymaps/index.js +0 -24
  297. package/dist/es2019/node-width/index.js +3 -14
  298. package/dist/es2019/normalize-feature-flags.js +1 -11
  299. package/dist/es2019/provider-factory/context.js +0 -1
  300. package/dist/es2019/provider-factory/provider-factory.js +0 -25
  301. package/dist/es2019/provider-factory/with-providers.js +2 -8
  302. package/dist/es2019/provider-helpers/combine-providers.js +3 -13
  303. package/dist/es2019/provider-helpers/promise-helpers.js +3 -10
  304. package/dist/es2019/react-node-view/index.js +10 -34
  305. package/dist/es2019/safe-plugin/index.js +1 -1
  306. package/dist/es2019/selection/gap-cursor/selection.js +6 -31
  307. package/dist/es2019/selection/types.js +0 -1
  308. package/dist/es2019/selection/utils.js +0 -8
  309. package/dist/es2019/styles/shared/headings.js +3 -2
  310. package/dist/es2019/styles/shared/lists.js +0 -8
  311. package/dist/es2019/styles/shared/panel.js +13 -12
  312. package/dist/es2019/styles/shared/paragraph.js +2 -1
  313. package/dist/es2019/styles/shared/rule.js +2 -1
  314. package/dist/es2019/styles/shared/shadow.js +2 -0
  315. package/dist/es2019/styles/shared/table.js +1 -5
  316. package/dist/es2019/transforms/expand.js +3 -3
  317. package/dist/es2019/transforms/extension.js +3 -4
  318. package/dist/es2019/transforms/layout.js +9 -10
  319. package/dist/es2019/type-ahead/index.js +0 -3
  320. package/dist/es2019/types/annotation/emitter.js +0 -8
  321. package/dist/es2019/types/index.js +0 -2
  322. package/dist/es2019/types/toolbar.js +0 -5
  323. package/dist/es2019/ufo/experience-store.js +0 -25
  324. package/dist/es2019/ui/BaseTheme/index.js +0 -2
  325. package/dist/es2019/ui/Caption/index.js +0 -2
  326. package/dist/es2019/ui/DropList/index.js +9 -25
  327. package/dist/es2019/ui/Emoji/index.js +0 -11
  328. package/dist/es2019/ui/ErrorBoundary/index.js +0 -8
  329. package/dist/es2019/ui/Expand/index.js +2 -10
  330. package/dist/es2019/ui/IntlErrorBoundary/index.js +0 -8
  331. package/dist/es2019/ui/IntlProviderIfMissingWrapper/index.js +0 -4
  332. package/dist/es2019/ui/Layer/index.js +13 -29
  333. package/dist/es2019/ui/Layer/internal/helpers.js +0 -2
  334. package/dist/es2019/ui/MediaSingle/index.js +7 -12
  335. package/dist/es2019/ui/MediaSingle/styled.js +2 -25
  336. package/dist/es2019/ui/Mention/index.js +0 -5
  337. package/dist/es2019/ui/Mention/mention-with-providers.js +0 -8
  338. package/dist/es2019/ui/Messages/index.js +1 -2
  339. package/dist/es2019/ui/OverflowShadow/index.js +0 -32
  340. package/dist/es2019/ui/OverflowShadow/shadowObserver.js +0 -14
  341. package/dist/es2019/ui/Popup/index.js +11 -59
  342. package/dist/es2019/ui/Popup/utils.js +18 -57
  343. package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +2 -1
  344. package/dist/es2019/ui/PortalProvider/index.js +7 -35
  345. package/dist/es2019/ui/UnsupportedBlock/index.js +0 -2
  346. package/dist/es2019/ui/UnsupportedInline/index.js +0 -2
  347. package/dist/es2019/ui/WidthProvider/index.js +0 -9
  348. package/dist/es2019/ui/WithCreateAnalyticsEvent/index.js +0 -1
  349. package/dist/es2019/ui/clear-next-sibling-margin-top.js +2 -1
  350. package/dist/es2019/ui/unsupported-content-helper.js +0 -4
  351. package/dist/es2019/ui/with-outer-listeners.js +0 -8
  352. package/dist/es2019/ui-color/ColorPalette/Color/index.js +0 -10
  353. package/dist/es2019/ui-color/ColorPalette/Color/styles.js +1 -4
  354. package/dist/es2019/ui-color/ColorPalette/Palettes/common.js +2 -4
  355. package/dist/es2019/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -2
  356. package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +5 -3
  357. package/dist/es2019/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +4 -4
  358. package/dist/es2019/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -2
  359. package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -3
  360. package/dist/es2019/ui-color/ColorPalette/index.js +3 -10
  361. package/dist/es2019/ui-menu/Dropdown/index.js +0 -7
  362. package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -21
  363. package/dist/es2019/ui-menu/MenuArrowKeyNavigationProvider/index.js +8 -31
  364. package/dist/es2019/ui-menu/ToolbarButton/index.js +2 -6
  365. package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +4 -22
  366. package/dist/es2019/utils/analytics.js +0 -8
  367. package/dist/es2019/utils/annotation/index.js +3 -7
  368. package/dist/es2019/utils/breakout.js +6 -13
  369. package/dist/es2019/utils/browser-extensions.js +10 -22
  370. package/dist/es2019/utils/browser.js +0 -2
  371. package/dist/es2019/utils/builder.js +0 -2
  372. package/dist/es2019/utils/collab.js +0 -2
  373. package/dist/es2019/utils/compare-props.js +5 -4
  374. package/dist/es2019/utils/compareNodes.js +3 -42
  375. package/dist/es2019/utils/date.js +4 -11
  376. package/dist/es2019/utils/dom.js +6 -19
  377. package/dist/es2019/utils/editor-core-utils.js +6 -11
  378. package/dist/es2019/utils/error-reporter.js +0 -4
  379. package/dist/es2019/utils/get-performance-options.js +3 -3
  380. package/dist/es2019/utils/imageLoader.js +0 -11
  381. package/dist/es2019/utils/is-text-input.js +1 -2
  382. package/dist/es2019/utils/list.js +3 -7
  383. package/dist/es2019/utils/macro.js +0 -3
  384. package/dist/es2019/utils/nodes.js +3 -11
  385. package/dist/es2019/utils/outdated-browsers.js +0 -8
  386. package/dist/es2019/utils/performance/hooks/use-component-render-tracking/index.js +0 -4
  387. package/dist/es2019/utils/performance/is-performance-api-available.js +0 -1
  388. package/dist/es2019/utils/performance/measure-render.js +2 -10
  389. package/dist/es2019/utils/performance/measure-tti.js +3 -11
  390. package/dist/es2019/utils/performance/measure.js +0 -6
  391. package/dist/es2019/utils/performance/navigation.js +0 -3
  392. package/dist/es2019/utils/plugin-state-factory.js +1 -10
  393. package/dist/es2019/utils/profiler/render-count.js +10 -23
  394. package/dist/es2019/utils/referentiality.js +24 -65
  395. package/dist/es2019/utils/should-force-tracking.js +2 -1
  396. package/dist/es2019/utils/slice.js +1 -9
  397. package/dist/es2019/utils/table.js +2 -6
  398. package/dist/es2019/utils/track-unsupported-content.js +6 -11
  399. package/dist/es2019/utils/traversor.js +0 -13
  400. package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -15
  401. package/dist/es2019/utils/validate-using-spec.js +3 -25
  402. package/dist/es2019/utils/validator.js +10 -149
  403. package/dist/es2019/version.json +1 -1
  404. package/dist/es2019/with-plugin-state/index.js +5 -46
  405. package/dist/esm/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -3
  406. package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/delete.js +1 -2
  407. package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/edit.js +2 -4
  408. package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/insert.js +1 -2
  409. package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/delete.js +1 -2
  410. package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/edit.js +2 -4
  411. package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/insert.js +1 -2
  412. package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/delete.js +1 -2
  413. package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/edit.js +2 -4
  414. package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/insert.js +1 -2
  415. package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +1 -2
  416. package/dist/esm/__tests_external__/cases/smart-links/test-cases/url/insert.js +1 -2
  417. package/dist/esm/__tests_external__/page-objects/Editor.js +0 -9
  418. package/dist/esm/__tests_external__/page-objects/EditorSmartLink.js +0 -23
  419. package/dist/esm/__tests_external__/page-objects/Renderer.js +0 -8
  420. package/dist/esm/analytics/types/enums.js +0 -15
  421. package/dist/esm/analytics/types/extension-events.js +2 -3
  422. package/dist/esm/analytics/types/format-events.js +0 -3
  423. package/dist/esm/analytics/types/general-events.js +0 -7
  424. package/dist/esm/analytics/types/inline-comment-events.js +0 -1
  425. package/dist/esm/analytics/types/insert-events.js +0 -7
  426. package/dist/esm/analytics/types/list-events.js +0 -3
  427. package/dist/esm/analytics/types/node-events.js +0 -3
  428. package/dist/esm/analytics/types/substitute-events.js +0 -3
  429. package/dist/esm/analytics/types/table-events.js +2 -3
  430. package/dist/esm/analytics/types/toolbar-button.js +0 -1
  431. package/dist/esm/analytics/types/utils.js +0 -3
  432. package/dist/esm/core-utils/inside.js +2 -2
  433. package/dist/esm/event-dispatcher/index.js +1 -9
  434. package/dist/esm/extensions/combine-extension-providers.js +2 -4
  435. package/dist/esm/extensions/default-extension-provider.js +0 -22
  436. package/dist/esm/extensions/extension-fields-helpers.js +3 -29
  437. package/dist/esm/extensions/extension-handlers.js +1 -18
  438. package/dist/esm/extensions/manifest-helpers.js +4 -17
  439. package/dist/esm/extensions/module-helpers.js +17 -74
  440. package/dist/esm/extensions/types/field-definitions.js +1 -0
  441. package/dist/esm/icons/index.js +1 -3
  442. package/dist/esm/icons/shared/PanelErrorIcon.js +0 -2
  443. package/dist/esm/icons/shared/PanelInfoIcon.js +0 -2
  444. package/dist/esm/icons/shared/PanelNoteIcon.js +0 -2
  445. package/dist/esm/icons/shared/PanelSuccessIcon.js +0 -2
  446. package/dist/esm/icons/shared/PanelWarningIcon.js +0 -2
  447. package/dist/esm/keymaps/index.js +2 -28
  448. package/dist/esm/node-width/index.js +3 -14
  449. package/dist/esm/normalize-feature-flags.js +6 -19
  450. package/dist/esm/provider-factory/context.js +3 -5
  451. package/dist/esm/provider-factory/provider-factory.js +0 -18
  452. package/dist/esm/provider-factory/with-providers.js +5 -23
  453. package/dist/esm/provider-helpers/combine-providers.js +3 -27
  454. package/dist/esm/provider-helpers/promise-helpers.js +3 -10
  455. package/dist/esm/react-node-view/index.js +18 -42
  456. package/dist/esm/safe-plugin/index.js +1 -7
  457. package/dist/esm/selection/gap-cursor/selection.js +8 -35
  458. package/dist/esm/selection/types.js +0 -1
  459. package/dist/esm/selection/utils.js +0 -8
  460. package/dist/esm/styles/shared/annotation.js +0 -2
  461. package/dist/esm/styles/shared/block-marks.js +0 -2
  462. package/dist/esm/styles/shared/blockquote.js +0 -2
  463. package/dist/esm/styles/shared/code-block.js +0 -2
  464. package/dist/esm/styles/shared/code-mark.js +0 -2
  465. package/dist/esm/styles/shared/column-layout.js +0 -2
  466. package/dist/esm/styles/shared/date.js +0 -2
  467. package/dist/esm/styles/shared/headings.js +3 -4
  468. package/dist/esm/styles/shared/indentation.js +0 -2
  469. package/dist/esm/styles/shared/link.js +0 -2
  470. package/dist/esm/styles/shared/lists.js +2 -13
  471. package/dist/esm/styles/shared/media-single.js +0 -2
  472. package/dist/esm/styles/shared/panel.js +15 -17
  473. package/dist/esm/styles/shared/paragraph.js +2 -3
  474. package/dist/esm/styles/shared/rule.js +2 -3
  475. package/dist/esm/styles/shared/shadow.js +2 -2
  476. package/dist/esm/styles/shared/table.js +1 -8
  477. package/dist/esm/styles/shared/task-decision.js +0 -2
  478. package/dist/esm/styles/shared/text-color.js +0 -2
  479. package/dist/esm/styles/shared/whitespace.js +0 -2
  480. package/dist/esm/transforms/expand.js +7 -7
  481. package/dist/esm/transforms/extension.js +3 -4
  482. package/dist/esm/transforms/layout.js +9 -10
  483. package/dist/esm/type-ahead/index.js +0 -3
  484. package/dist/esm/types/annotation/emitter.js +0 -6
  485. package/dist/esm/types/index.js +0 -2
  486. package/dist/esm/types/toolbar.js +0 -5
  487. package/dist/esm/ufo/experience-store.js +0 -19
  488. package/dist/esm/ui/BaseTheme/index.js +3 -7
  489. package/dist/esm/ui/Caption/index.js +5 -14
  490. package/dist/esm/ui/DropList/index.js +18 -47
  491. package/dist/esm/ui/Emoji/index.js +7 -26
  492. package/dist/esm/ui/ErrorBoundary/index.js +0 -14
  493. package/dist/esm/ui/Expand/index.js +5 -15
  494. package/dist/esm/ui/IntlErrorBoundary/index.js +0 -16
  495. package/dist/esm/ui/IntlProviderIfMissingWrapper/index.js +0 -4
  496. package/dist/esm/ui/Layer/index.js +16 -39
  497. package/dist/esm/ui/Layer/internal/helpers.js +0 -2
  498. package/dist/esm/ui/MediaSingle/index.js +25 -32
  499. package/dist/esm/ui/MediaSingle/link.js +0 -2
  500. package/dist/esm/ui/MediaSingle/styled.js +11 -39
  501. package/dist/esm/ui/Mention/index.js +5 -18
  502. package/dist/esm/ui/Mention/mention-with-profilecard.js +8 -8
  503. package/dist/esm/ui/Mention/mention-with-providers.js +5 -21
  504. package/dist/esm/ui/Messages/index.js +1 -4
  505. package/dist/esm/ui/OverflowShadow/index.js +3 -46
  506. package/dist/esm/ui/OverflowShadow/shadowObserver.js +2 -27
  507. package/dist/esm/ui/Popup/index.js +28 -80
  508. package/dist/esm/ui/Popup/utils.js +67 -123
  509. package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +3 -3
  510. package/dist/esm/ui/PortalProvider/index.js +17 -61
  511. package/dist/esm/ui/UnsupportedBlock/index.js +5 -11
  512. package/dist/esm/ui/UnsupportedInline/index.js +5 -11
  513. package/dist/esm/ui/WidthProvider/index.js +1 -17
  514. package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +2 -10
  515. package/dist/esm/ui/clear-next-sibling-margin-top.js +2 -3
  516. package/dist/esm/ui/unsupported-content-helper.js +0 -4
  517. package/dist/esm/ui/with-outer-listeners.js +0 -15
  518. package/dist/esm/ui-color/ColorPalette/Color/index.js +12 -27
  519. package/dist/esm/ui-color/ColorPalette/Color/styles.js +1 -6
  520. package/dist/esm/ui-color/ColorPalette/Palettes/common.js +5 -7
  521. package/dist/esm/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -2
  522. package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +2 -4
  523. package/dist/esm/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +0 -5
  524. package/dist/esm/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -2
  525. package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -3
  526. package/dist/esm/ui-color/ColorPalette/index.js +16 -24
  527. package/dist/esm/ui-color/ColorPalette/styles.js +0 -2
  528. package/dist/esm/ui-menu/Dropdown/index.js +14 -27
  529. package/dist/esm/ui-menu/DropdownMenu/index.js +23 -56
  530. package/dist/esm/ui-menu/MenuArrowKeyNavigationProvider/index.js +16 -42
  531. package/dist/esm/ui-menu/ToolbarButton/index.js +23 -32
  532. package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +9 -38
  533. package/dist/esm/utils/analytics.js +0 -8
  534. package/dist/esm/utils/annotation/index.js +5 -9
  535. package/dist/esm/utils/breakout.js +8 -15
  536. package/dist/esm/utils/browser-extensions.js +28 -55
  537. package/dist/esm/utils/browser.js +0 -2
  538. package/dist/esm/utils/builder.js +0 -4
  539. package/dist/esm/utils/collab.js +0 -2
  540. package/dist/esm/utils/compare-props.js +10 -15
  541. package/dist/esm/utils/compareNodes.js +7 -48
  542. package/dist/esm/utils/compose.js +0 -1
  543. package/dist/esm/utils/date.js +4 -11
  544. package/dist/esm/utils/dom.js +6 -19
  545. package/dist/esm/utils/editor-core-utils.js +8 -13
  546. package/dist/esm/utils/error-reporter.js +0 -5
  547. package/dist/esm/utils/get-performance-options.js +7 -7
  548. package/dist/esm/utils/imageLoader.js +0 -18
  549. package/dist/esm/utils/is-text-input.js +5 -6
  550. package/dist/esm/utils/list.js +3 -7
  551. package/dist/esm/utils/macro.js +1 -5
  552. package/dist/esm/utils/nodes.js +5 -13
  553. package/dist/esm/utils/outdated-browsers.js +0 -8
  554. package/dist/esm/utils/performance/hooks/use-component-render-tracking/index.js +4 -10
  555. package/dist/esm/utils/performance/is-performance-api-available.js +0 -1
  556. package/dist/esm/utils/performance/measure-render.js +2 -9
  557. package/dist/esm/utils/performance/measure-tti.js +3 -12
  558. package/dist/esm/utils/performance/measure.js +0 -6
  559. package/dist/esm/utils/performance/navigation.js +0 -3
  560. package/dist/esm/utils/plugin-state-factory.js +3 -10
  561. package/dist/esm/utils/profiler/render-count.js +4 -21
  562. package/dist/esm/utils/referentiality.js +30 -80
  563. package/dist/esm/utils/should-force-tracking.js +4 -4
  564. package/dist/esm/utils/slice.js +1 -10
  565. package/dist/esm/utils/table.js +4 -8
  566. package/dist/esm/utils/track-unsupported-content.js +14 -31
  567. package/dist/esm/utils/traversor.js +0 -13
  568. package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +5 -18
  569. package/dist/esm/utils/validate-using-spec.js +5 -29
  570. package/dist/esm/utils/validator.js +26 -170
  571. package/dist/esm/version.json +1 -1
  572. package/dist/esm/with-plugin-state/index.js +7 -55
  573. package/package.json +4 -4
@@ -1,27 +1,24 @@
1
1
  export var ResultStatus;
2
-
3
2
  (function (ResultStatus) {
4
3
  ResultStatus["FULFILLED"] = "fulfilled";
5
4
  ResultStatus["FAILED"] = "failed";
6
5
  })(ResultStatus || (ResultStatus = {}));
7
-
8
6
  var isFullfilled = function isFullfilled(result) {
9
7
  return result.status === ResultStatus.FULFILLED;
10
8
  };
11
-
12
9
  var markFullfilled = function markFullfilled(value) {
13
10
  return {
14
11
  status: ResultStatus.FULFILLED,
15
12
  value: value
16
13
  };
17
14
  };
18
-
19
15
  var markRejected = function markRejected(error) {
20
16
  return {
21
17
  status: ResultStatus.FAILED,
22
18
  reason: error
23
19
  };
24
20
  };
21
+
25
22
  /**
26
23
  * Will wait for all promises to resolve or reject, wrapping their real results in
27
24
  * object containing the status so it's easy to filter it later. Loosely inspired by
@@ -29,19 +26,17 @@ var markRejected = function markRejected(error) {
29
26
  * which can replace this implementation once it makes to the browsers.
30
27
  * @param promises
31
28
  */
32
-
33
-
34
29
  export var waitForAllPromises = function waitForAllPromises(promises) {
35
30
  return Promise.all(promises.map(function (result) {
36
31
  return result.then(markFullfilled).catch(markRejected);
37
32
  }));
38
33
  };
34
+
39
35
  /**
40
36
  * Will resolve on the first fulfilled promise and disregard the remaining ones. Similar to `Promise.race` but won't
41
37
  * care about rejected promises.
42
38
  * @param promises
43
39
  */
44
-
45
40
  export var waitForFirstFulfilledPromise = function waitForFirstFulfilledPromise(promises) {
46
41
  var rejectReasons = [];
47
42
  return new Promise(function (resolve, reject) {
@@ -50,11 +45,9 @@ export var waitForFirstFulfilledPromise = function waitForFirstFulfilledPromise(
50
45
  if (typeof value === 'undefined' || value === null) {
51
46
  throw new Error("Result was not found but the method didn't reject/throw. Please ensure that it doesn't return null or undefined.");
52
47
  }
53
-
54
48
  resolve(value);
55
49
  }).catch(function (reason) {
56
50
  rejectReasons.push(reason);
57
-
58
51
  if (rejectReasons.length === promises.length) {
59
52
  reject(reason);
60
53
  }
@@ -62,11 +55,11 @@ export var waitForFirstFulfilledPromise = function waitForFirstFulfilledPromise(
62
55
  });
63
56
  });
64
57
  };
58
+
65
59
  /**
66
60
  * Find all fullfilled promises and return their values
67
61
  * @param results
68
62
  */
69
-
70
63
  export var getOnlyFulfilled = function getOnlyFulfilled(results) {
71
64
  return results.filter(isFullfilled).map(function (result) {
72
65
  return result.value;
@@ -8,21 +8,16 @@ import { createDispatch } from '../event-dispatcher';
8
8
  import { ErrorBoundary } from '../ui/ErrorBoundary';
9
9
  import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
10
10
  import { analyticsEventKey } from '../utils/analytics';
11
-
12
11
  var ReactNodeView = /*#__PURE__*/function () {
13
12
  function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent) {
14
13
  var _this = this;
15
-
16
14
  var hasAnalyticsContext = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
17
15
  var viewShouldUpdate = arguments.length > 8 ? arguments[8] : undefined;
18
16
  var hasIntlContext = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
19
-
20
17
  _classCallCheck(this, ReactNodeView);
21
-
22
18
  _defineProperty(this, "handleRef", function (node) {
23
19
  return _this._handleRef(node);
24
20
  });
25
-
26
21
  _defineProperty(this, "dispatchAnalyticsEvent", function (payload) {
27
22
  if (_this.eventDispatcher) {
28
23
  var dispatch = createDispatch(_this.eventDispatcher);
@@ -31,7 +26,6 @@ var ReactNodeView = /*#__PURE__*/function () {
31
26
  });
32
27
  }
33
28
  });
34
-
35
29
  this.node = _node;
36
30
  this.view = view;
37
31
  this.getPos = getPos;
@@ -43,6 +37,7 @@ var ReactNodeView = /*#__PURE__*/function () {
43
37
  this.eventDispatcher = eventDispatcher;
44
38
  this.hasIntlContext = hasIntlContext;
45
39
  }
40
+
46
41
  /**
47
42
  * This method exists to move initialization logic out of the constructor,
48
43
  * so object can be initialized properly before calling render first time.
@@ -52,40 +47,33 @@ var ReactNodeView = /*#__PURE__*/function () {
52
47
  * constructor, which leads to some methods being undefined during the
53
48
  * first render.
54
49
  */
55
-
56
-
57
50
  _createClass(ReactNodeView, [{
58
51
  key: "init",
59
52
  value: function init() {
60
53
  var _this2 = this;
61
-
62
54
  this.domRef = this.createDomRef();
63
55
  this.setDomAttrs(this.node, this.domRef);
64
-
65
56
  var _ref = this.getContentDOM() || {
66
- dom: undefined,
67
- contentDOM: undefined
68
- },
69
- contentDOMWrapper = _ref.dom,
70
- contentDOM = _ref.contentDOM;
71
-
57
+ dom: undefined,
58
+ contentDOM: undefined
59
+ },
60
+ contentDOMWrapper = _ref.dom,
61
+ contentDOM = _ref.contentDOM;
72
62
  if (this.domRef && contentDOMWrapper) {
73
63
  this.domRef.appendChild(contentDOMWrapper);
74
64
  this.contentDOM = contentDOM ? contentDOM : contentDOMWrapper;
75
65
  this.contentDOMWrapper = contentDOMWrapper || contentDOM;
76
- } // @see ED-3790
66
+ }
67
+
68
+ // @see ED-3790
77
69
  // something gets messed up during mutation processing inside of a
78
70
  // nodeView if DOM structure has nested plain "div"s, it doesn't see the
79
71
  // difference between them and it kills the nodeView
80
-
81
-
82
72
  this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
83
-
84
73
  var _getPerformanceOption = getPerformanceOptions(this.view),
85
- samplingRate = _getPerformanceOption.samplingRate,
86
- slowThreshold = _getPerformanceOption.slowThreshold,
87
- trackingEnabled = _getPerformanceOption.trackingEnabled;
88
-
74
+ samplingRate = _getPerformanceOption.samplingRate,
75
+ slowThreshold = _getPerformanceOption.slowThreshold,
76
+ trackingEnabled = _getPerformanceOption.trackingEnabled;
89
77
  trackingEnabled && startMeasureReactNodeViewRendered({
90
78
  nodeTypeName: this.node.type.name
91
79
  });
@@ -105,21 +93,17 @@ var ReactNodeView = /*#__PURE__*/function () {
105
93
  key: "renderReactComponent",
106
94
  value: function renderReactComponent(component) {
107
95
  var _this3 = this;
108
-
109
96
  if (!this.domRef || !component) {
110
97
  return;
111
98
  }
112
-
113
99
  var componentWithErrorBoundary = function componentWithErrorBoundary() {
114
100
  var _this3$node$type$name, _this3$node, _this3$node$type;
115
-
116
101
  return /*#__PURE__*/React.createElement(ErrorBoundary, {
117
102
  component: ACTION_SUBJECT.REACT_NODE_VIEW,
118
103
  componentId: (_this3$node$type$name = _this3 === null || _this3 === void 0 ? void 0 : (_this3$node = _this3.node) === null || _this3$node === void 0 ? void 0 : (_this3$node$type = _this3$node.type) === null || _this3$node$type === void 0 ? void 0 : _this3$node$type.name) !== null && _this3$node$type$name !== void 0 ? _this3$node$type$name : ACTION_SUBJECT_ID.UNKNOWN_NODE,
119
104
  dispatchAnalyticsEvent: _this3.dispatchAnalyticsEvent
120
105
  }, component());
121
106
  };
122
-
123
107
  this.portalProviderAPI.render(componentWithErrorBoundary, this.domRef, this.hasAnalyticsContext, this.hasIntlContext);
124
108
  }
125
109
  }, {
@@ -128,7 +112,6 @@ var ReactNodeView = /*#__PURE__*/function () {
128
112
  if (!this.node.isInline) {
129
113
  return document.createElement('div');
130
114
  }
131
-
132
115
  var htmlElement = document.createElement('span');
133
116
  return htmlElement;
134
117
  }
@@ -140,8 +123,9 @@ var ReactNodeView = /*#__PURE__*/function () {
140
123
  }, {
141
124
  key: "_handleRef",
142
125
  value: function _handleRef(node) {
143
- var contentDOM = this.contentDOMWrapper || this.contentDOM; // move the contentDOM node inside the inner reference after rendering
126
+ var contentDOM = this.contentDOMWrapper || this.contentDOM;
144
127
 
128
+ // move the contentDOM node inside the inner reference after rendering
145
129
  if (node && contentDOM && !node.contains(contentDOM)) {
146
130
  node.appendChild(contentDOM);
147
131
  }
@@ -160,28 +144,24 @@ var ReactNodeView = /*#__PURE__*/function () {
160
144
  key: "update",
161
145
  value: function update(node, _decorations, _innerDecorations) {
162
146
  var _this4 = this;
163
-
164
147
  var validUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
165
148
  return true;
166
149
  };
167
150
  // @see https://github.com/ProseMirror/prosemirror/issues/648
168
151
  var isValidUpdate = this.node.type === node.type && validUpdate(this.node, node);
169
-
170
152
  if (!isValidUpdate) {
171
153
  return false;
172
154
  }
173
-
174
155
  if (this.domRef && !this.node.sameMarkup(node)) {
175
156
  this.setDomAttrs(node, this.domRef);
176
- } // View should not process a re-render if this is false.
177
- // We dont want to destroy the view, so we return true.
178
-
157
+ }
179
158
 
159
+ // View should not process a re-render if this is false.
160
+ // We dont want to destroy the view, so we return true.
180
161
  if (!this.viewShouldUpdate(node)) {
181
162
  this.node = node;
182
163
  return true;
183
164
  }
184
-
185
165
  this.node = node;
186
166
  this.renderReactComponent(function () {
187
167
  return _this4.render(_this4.reactComponentProps, _this4.handleRef);
@@ -194,14 +174,13 @@ var ReactNodeView = /*#__PURE__*/function () {
194
174
  if (this._viewShouldUpdate) {
195
175
  return this._viewShouldUpdate(nextNode);
196
176
  }
197
-
198
177
  return true;
199
178
  }
179
+
200
180
  /**
201
181
  * Copies the attributes from a ProseMirror Node to a DOM node.
202
182
  * @param node The Prosemirror Node from which to source the attributes
203
183
  */
204
-
205
184
  }, {
206
185
  key: "setDomAttrs",
207
186
  value: function setDomAttrs(node, element) {
@@ -220,7 +199,6 @@ var ReactNodeView = /*#__PURE__*/function () {
220
199
  if (!this.domRef) {
221
200
  return;
222
201
  }
223
-
224
202
  this.portalProviderAPI.remove(this.domRef);
225
203
  this.domRef = undefined;
226
204
  this.contentDOM = undefined;
@@ -234,8 +212,6 @@ var ReactNodeView = /*#__PURE__*/function () {
234
212
  };
235
213
  }
236
214
  }]);
237
-
238
215
  return ReactNodeView;
239
216
  }();
240
-
241
217
  export { ReactNodeView as default };
@@ -3,25 +3,19 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
-
7
6
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
-
9
7
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
-
11
8
  import { Plugin } from 'prosemirror-state';
12
9
  export var SafePlugin = /*#__PURE__*/function (_Plugin) {
13
10
  _inherits(SafePlugin, _Plugin);
14
-
15
11
  var _super = _createSuper(SafePlugin);
16
-
17
12
  // This variable isn't (and shouldn't) be used anywhere. Its purpose is
18
13
  // to distinguish Plugin from SafePlugin, thus ensuring that an 'unsafe'
19
14
  // Plugin cannot be assigned as an item in EditorPlugin → pmPlugins.
15
+
20
16
  function SafePlugin(spec) {
21
17
  _classCallCheck(this, SafePlugin);
22
-
23
18
  return _super.call(this, spec);
24
19
  }
25
-
26
20
  return _createClass(SafePlugin);
27
21
  }(Plugin);
@@ -5,27 +5,20 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
-
9
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
-
11
9
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
-
13
10
  import { Slice } from 'prosemirror-model';
14
11
  import { Selection } from 'prosemirror-state';
15
12
  import { isValidTargetNode } from './utils/is-valid-target-node';
16
13
  export var Side;
17
-
18
14
  (function (Side) {
19
15
  Side["LEFT"] = "left";
20
16
  Side["RIGHT"] = "right";
21
17
  })(Side || (Side = {}));
22
-
23
18
  export var JSON_ID = 'gapcursor';
24
19
  export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
25
20
  _inherits(GapCursorSelection, _Selection);
26
-
27
21
  var _super = _createSuper(GapCursorSelection);
28
-
29
22
  /**
30
23
  * Construct a GapCursorSelection
31
24
  * @param {ResolvedPos} $pos resolved position
@@ -33,19 +26,13 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
33
26
  */
34
27
  function GapCursorSelection($pos) {
35
28
  var _this;
36
-
37
29
  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Side.LEFT;
38
-
39
30
  _classCallCheck(this, GapCursorSelection);
40
-
41
31
  _this = _super.call(this, $pos, $pos);
42
-
43
32
  _defineProperty(_assertThisInitialized(_this), "visible", false);
44
-
45
33
  _this.side = side;
46
34
  return _this;
47
35
  }
48
-
49
36
  _createClass(GapCursorSelection, [{
50
37
  key: "map",
51
38
  value: function map(doc, mapping) {
@@ -80,14 +67,12 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
80
67
  key: "valid",
81
68
  value: function valid($pos) {
82
69
  var parent = $pos.parent,
83
- nodeBefore = $pos.nodeBefore,
84
- nodeAfter = $pos.nodeAfter;
70
+ nodeBefore = $pos.nodeBefore,
71
+ nodeAfter = $pos.nodeAfter;
85
72
  var targetNode = isValidTargetNode(nodeBefore) ? nodeBefore : isValidTargetNode(nodeAfter) ? nodeAfter : null;
86
-
87
73
  if (!targetNode || parent.isTextblock) {
88
74
  return false;
89
75
  }
90
-
91
76
  var deflt = parent.contentMatchAt($pos.index()).defaultType;
92
77
  return deflt && deflt.isTextblock;
93
78
  }
@@ -96,50 +81,42 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
96
81
  value: function findFrom($pos, dir) {
97
82
  var mustMove = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
98
83
  var side = dir === 1 ? Side.RIGHT : Side.LEFT;
99
-
100
84
  if (!mustMove && GapCursorSelection.valid($pos)) {
101
85
  return new GapCursorSelection($pos, side);
102
86
  }
87
+ var pos = $pos.pos;
103
88
 
104
- var pos = $pos.pos; // TODO: Fix any, potential issue. ED-5048
105
-
106
- var next = null; // Scan up from this position
89
+ // TODO: Fix any, potential issue. ED-5048
90
+ var next = null;
107
91
 
92
+ // Scan up from this position
108
93
  for (var d = $pos.depth;; d--) {
109
94
  var parent = $pos.node(d);
110
-
111
95
  if (side === Side.RIGHT ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
112
96
  next = parent.maybeChild(side === Side.RIGHT ? $pos.indexAfter(d) : $pos.index(d) - 1);
113
97
  break;
114
98
  } else if (d === 0) {
115
99
  return null;
116
100
  }
117
-
118
101
  pos += dir;
119
102
  var $cur = $pos.doc.resolve(pos);
120
-
121
103
  if (GapCursorSelection.valid($cur)) {
122
104
  return new GapCursorSelection($cur, side);
123
105
  }
124
- } // And then down into the next node
125
-
106
+ }
126
107
 
108
+ // And then down into the next node
127
109
  for (;;) {
128
110
  next = side === Side.RIGHT ? next.firstChild : next.lastChild;
129
-
130
111
  if (next === null) {
131
112
  break;
132
113
  }
133
-
134
114
  pos += dir;
135
-
136
115
  var _$cur = $pos.doc.resolve(pos);
137
-
138
116
  if (GapCursorSelection.valid(_$cur)) {
139
117
  return new GapCursorSelection(_$cur, side);
140
118
  }
141
119
  }
142
-
143
120
  return null;
144
121
  }
145
122
  }, {
@@ -148,17 +125,14 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
148
125
  return new GapCursorSelection(doc.resolve(json.pos), json.side);
149
126
  }
150
127
  }]);
151
-
152
128
  return GapCursorSelection;
153
129
  }(Selection);
154
130
  Selection.jsonID(JSON_ID, GapCursorSelection);
155
131
  export var GapBookmark = /*#__PURE__*/function () {
156
132
  function GapBookmark(pos) {
157
133
  _classCallCheck(this, GapBookmark);
158
-
159
134
  this.pos = pos;
160
135
  }
161
-
162
136
  _createClass(GapBookmark, [{
163
137
  key: "map",
164
138
  value: function map(mapping) {
@@ -171,6 +145,5 @@ export var GapBookmark = /*#__PURE__*/function () {
171
145
  return GapCursorSelection.valid($pos) ? new GapCursorSelection($pos) : Selection.near($pos);
172
146
  }
173
147
  }]);
174
-
175
148
  return GapBookmark;
176
149
  }();
@@ -1,5 +1,4 @@
1
1
  export var RelativeSelectionPos;
2
-
3
2
  (function (RelativeSelectionPos) {
4
3
  RelativeSelectionPos["Before"] = "Before";
5
4
  RelativeSelectionPos["Start"] = "Start";
@@ -2,37 +2,29 @@ export var isSelectionAtStartOfNode = function isSelectionAtStartOfNode($pos, pa
2
2
  if (!parentNode) {
3
3
  return false;
4
4
  }
5
-
6
5
  for (var i = $pos.depth + 1; i > 0; i--) {
7
6
  var node = $pos.node(i);
8
-
9
7
  if (node && node.eq(parentNode.node)) {
10
8
  break;
11
9
  }
12
-
13
10
  if (i > 1 && $pos.before(i) !== $pos.before(i - 1) + 1) {
14
11
  return false;
15
12
  }
16
13
  }
17
-
18
14
  return true;
19
15
  };
20
16
  export var isSelectionAtEndOfNode = function isSelectionAtEndOfNode($pos, parentNode) {
21
17
  if (!parentNode) {
22
18
  return false;
23
19
  }
24
-
25
20
  for (var i = $pos.depth + 1; i > 0; i--) {
26
21
  var node = $pos.node(i);
27
-
28
22
  if (node && node.eq(parentNode.node)) {
29
23
  break;
30
24
  }
31
-
32
25
  if (i > 1 && $pos.after(i) !== $pos.after(i - 1) - 1) {
33
26
  return false;
34
27
  }
35
28
  }
36
-
37
29
  return true;
38
30
  };
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2, _templateObject3;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
7
5
  import { themed } from '@atlaskit/theme/components';
@@ -1,6 +1,4 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  export var blockMarksSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks apart from those with indentation mark */\n *:not(.fabric-editor-block-mark) >\n div.fabric-editor-block-mark:first-of-type\n /* Do not remove the margin top for nodes inside indentation marks */\n :not(.fabric-editor-indentation-mark)\n /* Do not remove the margin top for nodes inside alignment marks */\n :not(.fabric-editor-alignment),\n // If first element inside a block node has alignment mark, then remove the margin-top\n .fabric-editor-alignment:first-of-type:first-child,\n // If first document element has indentation mark remove margin-top\n .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n }\n }\n"])));
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  import { akEditorBlockquoteBorderColor, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
7
5
  import { gridSize } from '@atlaskit/theme/constants';
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject, _templateObject2;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
7
5
  import { DN20, DN400, DN50, DN800, N20, N30, N400, N800 } from '@atlaskit/theme/colors';
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  import { getCodeStyles } from '@atlaskit/code/inline';
7
5
  import { DN70, N30A } from '@atlaskit/theme/colors';
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  import { gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
7
5
  var columnLayoutSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [data-layout-section] {\n position: relative;\n display: flex;\n flex-direction: row;\n & > * {\n flex: 1;\n min-width: 0;\n }\n\n & > .unsupportedBlockView-content-wrap {\n min-width: initial;\n }\n\n @media screen and (max-width: ", "px) {\n flex-direction: column;\n }\n }\n"])), gridMediumMaxWidth);
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  export var DateSharedCssClassName = {
7
5
  DATE_WRAPPER: "date-lozenger-container",
@@ -1,11 +1,10 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
- import { h100, h300, h400, h500, h600, h700 } from '@atlaskit/theme/typography'; // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
7
- // text sizing prototype: http://proto/fabricrender/
4
+ import { h100, h300, h400, h500, h600, h700 } from '@atlaskit/theme/typography';
8
5
 
6
+ // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
7
+ // text sizing prototype: http://proto/fabricrender/
9
8
  export var headingsSharedStyles = function headingsSharedStyles(props) {
10
9
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & h1 {\n ", ";\n margin-bottom: 0;\n margin-top: 1.667em;\n }\n\n & h2 {\n ", ";\n margin-top: 1.8em;\n margin-bottom: 0;\n }\n\n & h3 {\n ", ";\n margin-top: 2em;\n margin-bottom: 0;\n }\n\n & h4 {\n ", ";\n margin-top: 1.357em;\n }\n\n & h5 {\n ", ";\n margin-top: 1.667em;\n text-transform: none;\n }\n\n & h6 {\n ", ";\n margin-top: 1.455em;\n text-transform: none;\n }\n"])), h700(props), h600(props), h500(props), h400(props), h300(props), h100(props));
11
10
  };
@@ -1,6 +1,4 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  export var indentationSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .fabric-editor-indentation-mark {\n &[data-level='1'] {\n margin-left: 30px;\n }\n &[data-level='2'] {\n margin-left: 60px;\n }\n &[data-level='3'] {\n margin-left: 90px;\n }\n &[data-level='4'] {\n margin-left: 120px;\n }\n &[data-level='5'] {\n margin-left: 150px;\n }\n &[data-level='6'] {\n margin-left: 180px;\n }\n }\n"])));
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  var linkSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n a.blockLink {\n display: block;\n }\n"])));
7
5
  export { linkSharedStyle };
@@ -1,26 +1,21 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
-
5
4
  var _templateObject;
6
-
7
5
  import { css } from '@emotion/react';
8
6
  import { bulletListSelector, orderedListSelector } from '@atlaskit/adf-schema';
9
7
  import browser from '../../utils/browser';
10
8
  export var listItemCounterPadding = 24;
11
9
  var CSS_VAR_NAMES;
12
-
13
10
  (function (CSS_VAR_NAMES) {
14
11
  CSS_VAR_NAMES["ITEM_COUNTER_PADDING"] = "--ed--list--item-counter--padding";
15
12
  })(CSS_VAR_NAMES || (CSS_VAR_NAMES = {}));
16
-
17
13
  var getItemCounterLeftPadding = function getItemCounterLeftPadding(itemCounterDigitsSize) {
18
14
  // Previous padding-left was approximately 24px. We approximate that
19
15
  // same value using "ch" units (which represent the width of a "0" digit
20
16
  // character). We use "ch" so that this computed padding can now grow if
21
17
  // the font-size ever enlarges.
22
18
  var paddingLeft = "2.385ch";
23
-
24
19
  if (itemCounterDigitsSize >= 3) {
25
20
  // When there are 3 or more digits, we use a combination of "ch" units and
26
21
  // pixel values so that while the computed padding grows if font-size ever
@@ -30,27 +25,21 @@ var getItemCounterLeftPadding = function getItemCounterLeftPadding(itemCounterDi
30
25
  var fixedBasePx = 2;
31
26
  paddingLeft = "calc(".concat(itemCounterDigitsSize + 1, "ch - ").concat(fixedBasePx, "px)");
32
27
  }
33
-
34
28
  return paddingLeft;
35
29
  };
36
-
37
30
  var stringifyStyle = function stringifyStyle(style) {
38
31
  return Object.entries(style).reduce(function (str, _ref) {
39
32
  var _ref2 = _slicedToArray(_ref, 2),
40
- key = _ref2[0],
41
- value = _ref2[1];
42
-
33
+ key = _ref2[0],
34
+ value = _ref2[1];
43
35
  return "".concat(str).concat(key, ":").concat(value, ";");
44
36
  }, "");
45
37
  };
46
-
47
38
  export function getOrderedListInlineStyles(itemCounterDigitsSize, styleFormat) {
48
39
  var style = _defineProperty({}, CSS_VAR_NAMES.ITEM_COUNTER_PADDING, getItemCounterLeftPadding(itemCounterDigitsSize));
49
-
50
40
  if (styleFormat === 'string') {
51
41
  return stringifyStyle(style);
52
42
  }
53
-
54
43
  return style;
55
44
  }
56
45
  export var listsSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* =============== INDENTATION SPACING ========= */\n\n ul,\n ol {\n box-sizing: border-box;\n padding-left: var(\n ", ",\n ", "px\n );\n\n /*\n Firefox does not handle empty block element inside li tag.\n If there is not block element inside li tag,\n then firefox sets inherited height to li\n However, if there is any block element and if it's empty\n (or has empty inline element) then\n firefox sets li tag height to zero.\n More details at\n https://product-fabric.atlassian.net/wiki/spaces/~455502413/pages/3149365890/ED-14110+Investigation\n */\n li p:empty,\n li p > span:empty {\n ", "\n }\n }\n\n ", ", ", " {\n /*\n Ensures list item content adheres to the list's margin instead\n of filling the entire block row. This is important to allow\n clicking interactive elements which are floated next to a list.\n\n For some history and context on this block, see PRs related to tickets.:\n @see ED-6551 - original issue.\n @see ED-7015 - follow up issue.\n @see ED-7447 - flow-root change.\n\n We use 'display: table' (old clear fix / new block formatting context hack)\n for older browsers and 'flow-root' for modern browsers.\n\n @see https://css-tricks.com/display-flow-root/\n */\n // For older browsers the do not support flow-root.\n /* stylelint-disable declaration-block-no-duplicate-properties */\n display: table;\n display: flow-root;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n }\n\n /* =============== INDENTATION AESTHETICS ========= */\n\n /**\n We support nested lists up to six levels deep.\n **/\n\n /* LEGACY LISTS */\n\n ul,\n ul ul ul ul {\n list-style-type: disc;\n }\n\n ul ul,\n ul ul ul ul ul {\n list-style-type: circle;\n }\n\n ul ul ul,\n ul ul ul ul ul ul {\n list-style-type: square;\n }\n\n ol,\n ol ol ol ol {\n list-style-type: decimal;\n }\n ol ol,\n ol ol ol ol ol {\n list-style-type: lower-alpha;\n }\n ol ol ol,\n ol ol ol ol ol ol {\n list-style-type: lower-roman;\n }\n\n /* PREDICTABLE LISTS */\n\n ol[data-indent-level='1'],\n ol[data-indent-level='4'] {\n list-style-type: decimal;\n }\n\n ol[data-indent-level='2'],\n ol[data-indent-level='5'] {\n list-style-type: lower-alpha;\n }\n\n ol[data-indent-level='3'],\n ol[data-indent-level='6'] {\n list-style-type: lower-roman;\n }\n\n ul[data-indent-level='1'],\n ul[data-indent-level='4'] {\n list-style-type: disc;\n }\n\n ul[data-indent-level='2'],\n ul[data-indent-level='5'] {\n list-style-type: circle;\n }\n\n ul[data-indent-level='3'],\n ul[data-indent-level='6'] {\n list-style-type: square;\n }\n"])), CSS_VAR_NAMES.ITEM_COUNTER_PADDING, listItemCounterPadding, browser.gecko ? 'display: inline-block;' : '', orderedListSelector, bulletListSelector);
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  var richMediaClassName = 'rich-media-item';
7
5
  var wrappedMediaBreakoutPoint = 410;