@atlaskit/editor-core 234.3.2 → 235.0.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 (246) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/composable-editor/editor-internal-compiled.js +0 -6
  3. package/dist/cjs/composable-editor/editor-internal.js +3 -12
  4. package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
  5. package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +1 -7
  6. package/dist/cjs/ui/Appearance/ChromelessEditorContainer.js +26 -13
  7. package/dist/cjs/ui/Appearance/Comment/Comment.js +262 -7
  8. package/dist/cjs/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
  9. package/dist/cjs/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -6
  10. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -13
  11. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +15 -7
  12. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper.js +41 -10
  13. package/dist/cjs/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
  14. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -6
  15. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +192 -14
  16. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
  17. package/dist/cjs/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
  18. package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper.js +23 -7
  19. package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
  20. package/dist/cjs/ui/ChromeCollapsed/index.js +1 -7
  21. package/dist/cjs/ui/ContextPanel/index-compiled.js +0 -6
  22. package/dist/cjs/ui/ContextPanel/index.js +2 -11
  23. package/dist/cjs/ui/PluginSlot/PluginSlot-compiled.js +0 -7
  24. package/dist/cjs/ui/PluginSlot/index.js +1 -6
  25. package/dist/cjs/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
  26. package/dist/cjs/ui/Toolbar/ToolbarInner.js +1 -8
  27. package/dist/cjs/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
  28. package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +2 -11
  29. package/dist/cjs/ui/WithFlash/index.js +1 -6
  30. package/dist/cjs/ui/WithFlash/withFlash-compiled.js +1 -6
  31. package/dist/cjs/ui/quick-insert/getExtensionQuickInsertComponents.js +7 -4
  32. package/dist/cjs/version-wrapper.js +1 -1
  33. package/dist/es2019/composable-editor/editor-internal-compiled.js +0 -6
  34. package/dist/es2019/composable-editor/editor-internal.js +3 -10
  35. package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
  36. package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +1 -5
  37. package/dist/es2019/ui/Appearance/ChromelessEditorContainer.js +24 -12
  38. package/dist/es2019/ui/Appearance/Comment/Comment.js +254 -5
  39. package/dist/es2019/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
  40. package/dist/es2019/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -6
  41. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -8
  42. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +11 -5
  43. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper.js +37 -6
  44. package/dist/es2019/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
  45. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -4
  46. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +186 -11
  47. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
  48. package/dist/es2019/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
  49. package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper.js +24 -5
  50. package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
  51. package/dist/es2019/ui/ChromeCollapsed/index.js +1 -5
  52. package/dist/es2019/ui/ContextPanel/index-compiled.js +0 -6
  53. package/dist/es2019/ui/ContextPanel/index.js +2 -7
  54. package/dist/es2019/ui/PluginSlot/PluginSlot-compiled.js +0 -7
  55. package/dist/es2019/ui/PluginSlot/index.js +1 -4
  56. package/dist/es2019/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
  57. package/dist/es2019/ui/Toolbar/ToolbarInner.js +1 -5
  58. package/dist/es2019/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
  59. package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +2 -9
  60. package/dist/es2019/ui/WithFlash/index.js +1 -4
  61. package/dist/es2019/ui/WithFlash/withFlash-compiled.js +0 -6
  62. package/dist/es2019/ui/quick-insert/getExtensionQuickInsertComponents.js +6 -2
  63. package/dist/es2019/version-wrapper.js +1 -1
  64. package/dist/esm/composable-editor/editor-internal-compiled.js +0 -6
  65. package/dist/esm/composable-editor/editor-internal.js +3 -12
  66. package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +0 -5
  67. package/dist/esm/ui/Addon/ClickAreaBlock/index.js +1 -7
  68. package/dist/esm/ui/Appearance/ChromelessEditorContainer.js +25 -14
  69. package/dist/esm/ui/Appearance/Comment/Comment.js +260 -7
  70. package/dist/esm/ui/Appearance/Comment/FixedToolbar-compiled.js +0 -6
  71. package/dist/esm/ui/Appearance/Comment/StickyToolbar-compiled.js +0 -7
  72. package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -12
  73. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +13 -7
  74. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper.js +39 -10
  75. package/dist/esm/ui/Appearance/FullPage/FullPage-compiled.js +0 -6
  76. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -6
  77. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +190 -13
  78. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -5
  79. package/dist/esm/ui/Appearance/FullPage/MainToolbar-compiled.js +0 -6
  80. package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper.js +23 -7
  81. package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +0 -6
  82. package/dist/esm/ui/ChromeCollapsed/index.js +1 -7
  83. package/dist/esm/ui/ContextPanel/index-compiled.js +0 -6
  84. package/dist/esm/ui/ContextPanel/index.js +2 -11
  85. package/dist/esm/ui/PluginSlot/PluginSlot-compiled.js +0 -7
  86. package/dist/esm/ui/PluginSlot/index.js +1 -6
  87. package/dist/esm/ui/Toolbar/ToolbarComponentsWrapper-compiled.js +0 -6
  88. package/dist/esm/ui/Toolbar/ToolbarInner.js +1 -7
  89. package/dist/esm/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.js +0 -6
  90. package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +2 -11
  91. package/dist/esm/ui/WithFlash/index.js +1 -6
  92. package/dist/esm/ui/WithFlash/withFlash-compiled.js +0 -6
  93. package/dist/esm/ui/quick-insert/getExtensionQuickInsertComponents.js +8 -5
  94. package/dist/esm/version-wrapper.js +1 -1
  95. package/dist/types/composable-editor/editor-internal-compiled.d.ts +0 -6
  96. package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.d.ts +0 -4
  97. package/dist/types/ui/Appearance/ChromelessEditorContainer.d.ts +10 -7
  98. package/dist/types/ui/Appearance/Comment/Comment.d.ts +24 -2
  99. package/dist/types/ui/Appearance/Comment/FixedToolbar-compiled.d.ts +0 -6
  100. package/dist/types/ui/Appearance/Comment/StickyToolbar-compiled.d.ts +0 -6
  101. package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +7 -3
  102. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +2 -3
  103. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +54 -6
  104. package/dist/types/ui/Appearance/FullPage/MainToolbar-compiled.d.ts +0 -6
  105. package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +13 -3
  106. package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-compiled.d.ts +0 -6
  107. package/dist/types/ui/PluginSlot/PluginSlot-compiled.d.ts +0 -6
  108. package/dist/types/ui/Toolbar/ToolbarComponentsWrapper-compiled.d.ts +0 -6
  109. package/dist/types/ui/Toolbar/ToolbarSizeDetectorWrapper-compiled.d.ts +0 -6
  110. package/dist/types/ui/WithFlash/index.d.ts +1 -1
  111. package/dist/types/ui/WithFlash/withFlash-compiled.d.ts +0 -6
  112. package/package.json +44 -44
  113. package/dist/cjs/composable-editor/BaseThemeWrapper.js +0 -47
  114. package/dist/cjs/composable-editor/editor-internal-emotion.js +0 -35
  115. package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -36
  116. package/dist/cjs/ui/Appearance/Chromeless-compiled.js +0 -38
  117. package/dist/cjs/ui/Appearance/Chromeless-emotion.js +0 -89
  118. package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +0 -273
  119. package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +0 -339
  120. package/dist/cjs/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -89
  121. package/dist/cjs/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -126
  122. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -29
  123. package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -34
  124. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -57
  125. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -89
  126. package/dist/cjs/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -13
  127. package/dist/cjs/ui/Appearance/FullPage/FullPage-emotion.js +0 -38
  128. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -201
  129. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -398
  130. package/dist/cjs/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -63
  131. package/dist/cjs/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -13
  132. package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -35
  133. package/dist/cjs/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -70
  134. package/dist/cjs/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -13
  135. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +0 -65
  136. package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -37
  137. package/dist/cjs/ui/ContextPanel/index-emotion.js +0 -86
  138. package/dist/cjs/ui/PluginSlot/PluginSlot-emotion.js +0 -35
  139. package/dist/cjs/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -36
  140. package/dist/cjs/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -32
  141. package/dist/cjs/ui/WithFlash/withFlash-emotion.js +0 -91
  142. package/dist/es2019/composable-editor/BaseThemeWrapper.js +0 -35
  143. package/dist/es2019/composable-editor/editor-internal-emotion.js +0 -27
  144. package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -26
  145. package/dist/es2019/ui/Appearance/Chromeless-compiled.js +0 -30
  146. package/dist/es2019/ui/Appearance/Chromeless-emotion.js +0 -80
  147. package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +0 -260
  148. package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +0 -326
  149. package/dist/es2019/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -86
  150. package/dist/es2019/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -123
  151. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -19
  152. package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -25
  153. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -47
  154. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -79
  155. package/dist/es2019/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -5
  156. package/dist/es2019/ui/Appearance/FullPage/FullPage-emotion.js +0 -29
  157. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -190
  158. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -390
  159. package/dist/es2019/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -53
  160. package/dist/es2019/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -5
  161. package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -30
  162. package/dist/es2019/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -65
  163. package/dist/es2019/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -5
  164. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +0 -59
  165. package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -27
  166. package/dist/es2019/ui/ContextPanel/index-emotion.js +0 -74
  167. package/dist/es2019/ui/PluginSlot/PluginSlot-emotion.js +0 -25
  168. package/dist/es2019/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -28
  169. package/dist/es2019/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -24
  170. package/dist/es2019/ui/WithFlash/withFlash-emotion.js +0 -75
  171. package/dist/esm/composable-editor/BaseThemeWrapper.js +0 -39
  172. package/dist/esm/composable-editor/editor-internal-emotion.js +0 -28
  173. package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +0 -30
  174. package/dist/esm/ui/Appearance/Chromeless-compiled.js +0 -31
  175. package/dist/esm/ui/Appearance/Chromeless-emotion.js +0 -83
  176. package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +0 -266
  177. package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +0 -328
  178. package/dist/esm/ui/Appearance/Comment/FixedToolbar-emotion.js +0 -81
  179. package/dist/esm/ui/Appearance/Comment/StickyToolbar-emotion.js +0 -119
  180. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-compiled.js +0 -21
  181. package/dist/esm/ui/Appearance/FullPage/BeforeWrapper-emotion.js +0 -27
  182. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.js +0 -49
  183. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.js +0 -81
  184. package/dist/esm/ui/Appearance/FullPage/CustomToolbarWrapperMigration.js +0 -7
  185. package/dist/esm/ui/Appearance/FullPage/FullPage-emotion.js +0 -31
  186. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +0 -194
  187. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +0 -388
  188. package/dist/esm/ui/Appearance/FullPage/MainToolbar-emotion.js +0 -55
  189. package/dist/esm/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.js +0 -7
  190. package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-compiled.js +0 -29
  191. package/dist/esm/ui/Appearance/FullPage/MainToolbarWrapper-emotion.js +0 -62
  192. package/dist/esm/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.js +0 -7
  193. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +0 -59
  194. package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +0 -29
  195. package/dist/esm/ui/ContextPanel/index-emotion.js +0 -79
  196. package/dist/esm/ui/PluginSlot/PluginSlot-emotion.js +0 -29
  197. package/dist/esm/ui/Toolbar/ToolbarComponentsWrapper-emotion.js +0 -28
  198. package/dist/esm/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.js +0 -25
  199. package/dist/esm/ui/WithFlash/withFlash-emotion.js +0 -88
  200. package/dist/types/composable-editor/BaseThemeWrapper.d.ts +0 -7
  201. package/dist/types/composable-editor/editor-internal-emotion.d.ts +0 -15
  202. package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.d.ts +0 -12
  203. package/dist/types/ui/Appearance/Chromeless-compiled.d.ts +0 -18
  204. package/dist/types/ui/Appearance/Chromeless-emotion.d.ts +0 -18
  205. package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +0 -30
  206. package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +0 -20
  207. package/dist/types/ui/Appearance/Comment/FixedToolbar-emotion.d.ts +0 -19
  208. package/dist/types/ui/Appearance/Comment/StickyToolbar-emotion.d.ts +0 -21
  209. package/dist/types/ui/Appearance/FullPage/BeforeWrapper-compiled.d.ts +0 -16
  210. package/dist/types/ui/Appearance/FullPage/BeforeWrapper-emotion.d.ts +0 -16
  211. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-compiled.d.ts +0 -3
  212. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper-emotion.d.ts +0 -14
  213. package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapperMigration.d.ts +0 -4
  214. package/dist/types/ui/Appearance/FullPage/FullPage-emotion.d.ts +0 -7
  215. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +0 -57
  216. package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +0 -57
  217. package/dist/types/ui/Appearance/FullPage/MainToolbar-emotion.d.ts +0 -21
  218. package/dist/types/ui/Appearance/FullPage/MainToolbarIconBeforeMigration.d.ts +0 -4
  219. package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-compiled.d.ts +0 -19
  220. package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper-emotion.d.ts +0 -19
  221. package/dist/types/ui/Appearance/FullPage/NonCustomToolbarWrapperMigration.d.ts +0 -4
  222. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +0 -19
  223. package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-emotion.d.ts +0 -13
  224. package/dist/types/ui/ContextPanel/index-emotion.d.ts +0 -13
  225. package/dist/types/ui/PluginSlot/PluginSlot-emotion.d.ts +0 -12
  226. package/dist/types/ui/Toolbar/ToolbarComponentsWrapper-emotion.d.ts +0 -17
  227. package/dist/types/ui/Toolbar/ToolbarSizeDetectorWrapper-emotion.d.ts +0 -17
  228. package/dist/types/ui/WithFlash/withFlash-emotion.d.ts +0 -19
  229. /package/dist/cjs/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
  230. /package/dist/cjs/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
  231. /package/dist/cjs/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
  232. /package/dist/cjs/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
  233. /package/dist/cjs/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
  234. /package/dist/cjs/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
  235. /package/dist/es2019/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
  236. /package/dist/es2019/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
  237. /package/dist/es2019/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
  238. /package/dist/es2019/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
  239. /package/dist/es2019/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
  240. /package/dist/es2019/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
  241. /package/dist/esm/ui/Appearance/{Chromeless-compiled.compiled.css → ChromelessEditorContainer.compiled.css} +0 -0
  242. /package/dist/esm/ui/Appearance/Comment/{Comment-compiled.compiled.css → Comment.compiled.css} +0 -0
  243. /package/dist/esm/ui/Appearance/FullPage/{BeforeWrapper-compiled.compiled.css → BeforeWrapper.compiled.css} +0 -0
  244. /package/dist/esm/ui/Appearance/FullPage/{CustomToolbarWrapper-compiled.compiled.css → CustomToolbarWrapper.compiled.css} +0 -0
  245. /package/dist/esm/ui/Appearance/FullPage/{FullPageContentArea-compiled.compiled.css → FullPageContentArea.compiled.css} +0 -0
  246. /package/dist/esm/ui/Appearance/FullPage/{MainToolbarWrapper-compiled.compiled.css → MainToolbarWrapper.compiled.css} +0 -0
@@ -1,266 +0,0 @@
1
- /* Comment-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- import "./Comment-compiled.compiled.css";
5
- import { ax, ix } from "@compiled/react/runtime";
6
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
- /**
9
- * Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
10
- * Used via `componentWithCondition` in `Comment.tsx`.
11
- *
12
- * Cleanup: delete this file once the experiment has shipped.
13
- */
14
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
15
- import classnames from 'classnames';
16
- import { useIntl } from 'react-intl';
17
- import ButtonGroup from '@atlaskit/button/button-group';
18
- import Button from '@atlaskit/button/default/button';
19
- import { useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
20
- import messages from '@atlaskit/editor-common/messages';
21
- import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
22
- import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
23
- import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
24
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
25
- // Ignored via go/ees005
26
- // eslint-disable-next-line import/no-named-as-default
27
- import ClickAreaBlock from '../../Addon/ClickAreaBlock';
28
- import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
29
- import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
30
- import PluginSlot from '../../PluginSlot';
31
- import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
32
- import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
33
- import WithFlash from '../../WithFlash';
34
- import { CommentToolbar } from './CommentToolbar';
35
- import { MainToolbar } from './Toolbar';
36
- var commentEditorCompiledStyles = {
37
- commentEditor: "_19itno8c _2rko1qi0 _1e0c1txw _2lx21bp4 _1ul9clpc _4t3i1wug _bfhk1j9a _vchhusvi _p12f1kw7 _slp31hna _13dfutpp _gzr8u2gc _ghozu2gc _oafwu2gc",
38
- modernisedEditor: "_2rkopb1k",
39
- secondaryToolbar: "_vchhusvi _1bahesu3 _4cvr1h6o _1e0c1txw _ca0qutpp _u5f3v77o _n3tdutpp _19bvv77o",
40
- mainToolbarCustomComponentsSlotNew: "_1e0c1txw _1bahesu3 _4cvr1h6o _16jlkb7n _u5f3v47k _p7r11txw _t1edidpf",
41
- mainToolbarCustomComponentsSlotPaddingOverride: "_u5f3idpf",
42
- mainToolbarCustomComponentsSlotTwoLineToolbar: "_xugcidpf",
43
- contentAreaMaxHeight: "_c71lmz22 _18m91wug"
44
- };
45
- var appearance = 'comment';
46
- export var CommentEditorWithIntlCompiled = function CommentEditorWithIntlCompiled(props) {
47
- var _editorAPI$blockMenu$, _editorAPI$blockMenu;
48
- var editorAPI = props.editorAPI;
49
-
50
- // Get useStandardNodeWidth from block menu plugin shared state
51
- // Only access editorAPI when the experiment is enabled to avoid performance impact
52
- var useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.currentState()) === null || _editorAPI$blockMenu === void 0 ? void 0 : _editorAPI$blockMenu.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
53
- var _useSharedPluginState = useSharedPluginStateWithSelector(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
54
- var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
55
- return {
56
- maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
57
- primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
58
- editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
59
- };
60
- }),
61
- editorViewMode = _useSharedPluginState.editorViewMode,
62
- primaryToolbarComponentsState = _useSharedPluginState.primaryToolbarComponentsState,
63
- maxContentSizeReached = _useSharedPluginState.maxContentSizeReached;
64
- var primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarComponentsState);
65
- var _useSharedPluginState2 = useSharedPluginState(editorAPI, ['media']),
66
- mediaState = _useSharedPluginState2.mediaState;
67
- var intl = useIntl();
68
- var editorDOMElement = props.editorDOMElement,
69
- editorView = props.editorView,
70
- editorActions = props.editorActions,
71
- eventDispatcher = props.eventDispatcher,
72
- providerFactory = props.providerFactory,
73
- contentComponents = props.contentComponents,
74
- customContentComponents = props.customContentComponents,
75
- customPrimaryToolbarComponents = props.customPrimaryToolbarComponents,
76
- primaryToolbarComponentsProp = props.primaryToolbarComponents,
77
- customSecondaryToolbarComponents = props.customSecondaryToolbarComponents,
78
- popupsMountPoint = props.popupsMountPoint,
79
- popupsBoundariesElement = props.popupsBoundariesElement,
80
- popupsScrollableElement = props.popupsScrollableElement,
81
- maxHeight = props.maxHeight,
82
- _props$minHeight = props.minHeight,
83
- minHeight = _props$minHeight === void 0 ? 150 : _props$minHeight,
84
- onSave = props.onSave,
85
- onCancel = props.onCancel,
86
- disabled = props.disabled,
87
- dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
88
- useStickyToolbar = props.useStickyToolbar,
89
- pluginHooks = props.pluginHooks,
90
- featureFlags = props.featureFlags,
91
- innerRef = props.innerRef,
92
- isEditorModernisationEnabled = props.isEditorModernisationEnabled;
93
- var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
94
- var containerElement = React.useRef(null);
95
-
96
- // Wrapper container for toolbar and content area
97
- var wrapperElementRef = useMemo(function () {
98
- return innerRef || /*#__PURE__*/React.createRef();
99
- }, [innerRef]);
100
- var _useState = useState(false),
101
- _useState2 = _slicedToArray(_useState, 2),
102
- saveButtonDisabled = _useState2[0],
103
- setSaveButtonDisabled = _useState2[1];
104
- useEffect(function () {
105
- if (mediaState) {
106
- mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
107
- }
108
- return function () {
109
- return mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
110
- };
111
- }, [mediaState]);
112
- var handleSave = useCallback(function () {
113
- if (editorView && onSave) {
114
- onSave(editorView);
115
- }
116
- }, [editorView, onSave]);
117
- var handleCancel = useCallback(function () {
118
- if (editorView && onCancel) {
119
- onCancel(editorView);
120
- }
121
- }, [editorView, onCancel]);
122
- var isShortcutToFocusToolbar = useCallback(function (event) {
123
- //Alt + F9 to reach first element in this main toolbar
124
- return event.altKey && (event.key === 'F9' || event.keyCode === 120);
125
- }, []);
126
-
127
- // When primary toolbar components is undefined, do not show two line editor toolbar
128
- var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
129
- var handleEscape = useCallback(function (event) {
130
- if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
131
- editorView === null || editorView === void 0 || editorView.focus();
132
- }
133
- event.preventDefault();
134
- event.stopPropagation();
135
- }, [editorView]);
136
- var primaryToolbarComponents = primaryToolbarComponentsProp;
137
- if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
138
- primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
139
- }
140
- var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
141
- var wrapperStyle = useMemo(function () {
142
- return _objectSpread({
143
- minHeight: "".concat(minHeight, "px")
144
- }, maxHeight ? {
145
- '--comment-editor-max-height': "".concat(maxHeight, "px")
146
- } : {});
147
- }, [minHeight, maxHeight]);
148
- var customToolbarSlot = /*#__PURE__*/React.createElement("div", {
149
- className: ax([commentEditorCompiledStyles.mainToolbarCustomComponentsSlotNew, isTwoLineToolbarEnabled && commentEditorCompiledStyles.mainToolbarCustomComponentsSlotTwoLineToolbar, isToolbarAIFCEnabled && commentEditorCompiledStyles.mainToolbarCustomComponentsSlotPaddingOverride])
150
- }, customPrimaryToolbarComponents);
151
- return /*#__PURE__*/React.createElement(WithFlash, {
152
- animate: maxContentSizeReached
153
- }, /*#__PURE__*/React.createElement(WidthProvider, null, /*#__PURE__*/React.createElement("div", {
154
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- dynamic minHeight/maxHeight from props
155
- style: wrapperStyle
156
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
157
- ,
158
- className: ax([commentEditorCompiledStyles.commentEditor, isEditorModernisationEnabled && commentEditorCompiledStyles.modernisedEditor, "akEditor"]),
159
- ref: wrapperElementRef
160
- }, /*#__PURE__*/React.createElement(MainToolbar, {
161
- isEditorModernisationEnabled: isEditorModernisationEnabled,
162
- useStickyToolbar: useStickyToolbar,
163
- twoLineEditorToolbar: isTwoLineToolbarEnabled,
164
- isNewToolbarEnabled: isToolbarAIFCEnabled
165
- }, isToolbarAIFCEnabled ? /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
166
- editorView: editorView,
167
- childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
168
- isShortcutToFocusToolbar: isShortcutToFocusToolbar,
169
- handleEscape: handleEscape,
170
- editorAppearance: appearance,
171
- useStickyToolbar: useStickyToolbar,
172
- intl: intl
173
- }, /*#__PURE__*/React.createElement(CommentToolbar, {
174
- editorAPI: editorAPI,
175
- editorView: editorView,
176
- editorAppearance: appearance,
177
- disabled: !!disabled,
178
- popupsBoundariesElement: popupsBoundariesElement,
179
- popupsScrollableElement: popupsScrollableElement,
180
- popupsMountPoint: popupsMountPoint
181
- }), customPrimaryToolbarComponents ? customToolbarSlot : null) : /*#__PURE__*/React.createElement(ToolbarArrowKeyNavigationProvider, {
182
- editorView: editorView,
183
- childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
184
- isShortcutToFocusToolbar: isShortcutToFocusToolbar,
185
- handleEscape: handleEscape,
186
- editorAppearance: appearance,
187
- useStickyToolbar: useStickyToolbar,
188
- intl: intl
189
- }, /*#__PURE__*/React.createElement(Toolbar
190
- // Ignored via go/ees005
191
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
192
- , {
193
- editorView: editorView,
194
- editorActions: editorActions
195
- // Ignored via go/ees005
196
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
197
- ,
198
- eventDispatcher: eventDispatcher
199
- // Ignored via go/ees005
200
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
201
- ,
202
- providerFactory: providerFactory,
203
- appearance: appearance,
204
- items: primaryToolbarComponents,
205
- popupsMountPoint: popupsMountPoint,
206
- popupsBoundariesElement: popupsBoundariesElement,
207
- popupsScrollableElement: popupsScrollableElement,
208
- disabled: !!disabled,
209
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
210
- containerElement: containerElement.current,
211
- twoLineEditorToolbar: isTwoLineToolbarEnabled
212
- }), customToolbarSlot)), /*#__PURE__*/React.createElement(ClickAreaBlock, {
213
- editorView: editorView,
214
- editorDisabled: disabled
215
- }, /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref) {
216
- var width = _ref.width;
217
- return /*#__PURE__*/React.createElement(EditorContentContainer, {
218
- ref: containerElement,
219
- isScrollable: maxHeight ? true : undefined
220
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
221
- ,
222
- className: ax([maxHeight && commentEditorCompiledStyles.contentAreaMaxHeight, classnames('ak-editor-content-area', {
223
- 'less-margin': width < akEditorMobileBreakoutPoint
224
- })]),
225
- featureFlags: featureFlags,
226
- viewMode: editorViewMode,
227
- appearance: appearance,
228
- useStandardNodeWidth: useStandardNodeWidth
229
- }, customContentComponents && 'before' in customContentComponents ? contentComponentClickWrapper(customContentComponents.before) : contentComponentClickWrapper(customContentComponents), /*#__PURE__*/React.createElement(PluginSlot, {
230
- editorView: editorView,
231
- editorActions: editorActions,
232
- eventDispatcher: eventDispatcher,
233
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
234
- providerFactory: providerFactory,
235
- appearance: appearance,
236
- items: contentComponents,
237
- popupsMountPoint: popupsMountPoint,
238
- popupsBoundariesElement: popupsBoundariesElement,
239
- popupsScrollableElement: popupsScrollableElement,
240
- containerElement: containerElement.current,
241
- disabled: !!disabled,
242
- wrapperElement: wrapperElementRef.current,
243
- pluginHooks: pluginHooks
244
- }), editorDOMElement, customContentComponents && 'after' in customContentComponents ? contentComponentClickWrapper(customContentComponents.after) : null);
245
- }))), showSecondaryToolbar && /*#__PURE__*/React.createElement("div", {
246
- "data-testid": "ak-editor-secondary-toolbar",
247
- className: ax([commentEditorCompiledStyles.secondaryToolbar])
248
- }, /*#__PURE__*/React.createElement(ButtonGroup, null, !!onSave && /*#__PURE__*/React.createElement(Button, {
249
- appearance: "primary",
250
- onClick: handleSave,
251
- testId: "comment-save-button",
252
- isDisabled: disabled || saveButtonDisabled,
253
- interactionName: "editor-comment-save-button"
254
- }, intl.formatMessage(messages.saveButton)), !!onCancel && /*#__PURE__*/React.createElement(Button, {
255
- appearance: "subtle",
256
- onClick: handleCancel,
257
- testId: "comment-cancel-button",
258
- isDisabled: disabled,
259
- interactionName: "editor-comment-cancel-button"
260
- }, intl.formatMessage(messages.cancelButton))), /*#__PURE__*/React.createElement("span", {
261
- style: {
262
- flexGrow: 1
263
- }
264
- }), customSecondaryToolbarComponents)));
265
- };
266
- CommentEditorWithIntlCompiled.displayName = 'CommentEditorAppearance';
@@ -1,328 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- /**
4
- * @jsxRuntime classic
5
- * @jsx jsx
6
- */
7
- /**
8
- * Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
9
- * Used via `componentWithCondition` in `Comment.tsx`.
10
- *
11
- * Cleanup: delete this file once the experiment has shipped.
12
- */
13
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
14
-
15
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
16
- import { css, jsx } from '@emotion/react';
17
- import classnames from 'classnames';
18
- import { useIntl } from 'react-intl';
19
- import ButtonGroup from '@atlaskit/button/button-group';
20
- import Button from '@atlaskit/button/default/button';
21
- import { useSharedPluginState, useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
22
- import messages from '@atlaskit/editor-common/messages';
23
- import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
24
- import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
25
- import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
26
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
27
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
28
- // Ignored via go/ees005
29
- // eslint-disable-next-line import/no-named-as-default
30
- import ClickAreaBlock from '../../Addon/ClickAreaBlock';
31
- import { contentComponentClickWrapper } from '../../Addon/ClickAreaBlock/contentComponentWrapper';
32
- import EditorContentContainer from '../../EditorContentContainer/EditorContentContainer';
33
- import PluginSlot from '../../PluginSlot';
34
- import { getPrimaryToolbarComponents } from '../../Toolbar/getPrimaryToolbarComponents';
35
- import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSizeDetector';
36
- import WithFlash from '../../WithFlash';
37
- import { CommentToolbar } from './CommentToolbar';
38
- import { MainToolbar } from './Toolbar';
39
- var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
40
- var commentEditorStyles = css({
41
- display: 'flex',
42
- flexDirection: 'column',
43
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
44
- '.less-margin > .ProseMirror': {
45
- margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
46
- },
47
- minWidth: '272px',
48
- height: 'auto',
49
- backgroundColor: "var(--ds-background-input, #FFFFFF)",
50
- border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8C8F97)"),
51
- boxSizing: 'border-box',
52
- borderRadius: "var(--ds-radius-medium, 6px)",
53
- maxWidth: 'inherit',
54
- wordWrap: 'break-word'
55
- });
56
- var modernisedEditorStyles = css({
57
- borderRadius: "var(--ds-radius-xlarge, 12px)",
58
- borderColor: "var(--ds-border-input, #8C8F97)"
59
- });
60
- var secondaryToolbarStyles = css({
61
- boxSizing: 'border-box',
62
- justifyContent: 'flex-end',
63
- alignItems: 'center',
64
- display: 'flex',
65
- padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
66
- });
67
- var mainToolbarCustomComponentsSlotStyleNew = css({
68
- display: 'flex',
69
- justifyContent: 'flex-end',
70
- alignItems: 'center',
71
- flexGrow: 1,
72
- paddingRight: "var(--ds-space-250, 20px)",
73
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
74
- '> div': {
75
- display: 'flex',
76
- flexShrink: 0
77
- }
78
- });
79
- var mainToolbarCustomComponentsSlotStylePaddingOverride = css({
80
- paddingRight: 0
81
- });
82
- var mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = css(_defineProperty({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
83
- paddingRight: 0
84
- }));
85
- var appearance = 'comment';
86
- export var CommentEditorWithIntlEmotion = function CommentEditorWithIntlEmotion(props) {
87
- var _editorAPI$blockMenu$, _editorAPI$blockMenu;
88
- var editorAPI = props.editorAPI;
89
-
90
- // Get useStandardNodeWidth from block menu plugin shared state
91
- // Only access editorAPI when the experiment is enabled to avoid performance impact
92
- var useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.currentState()) === null || _editorAPI$blockMenu === void 0 ? void 0 : _editorAPI$blockMenu.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
93
- var _useSharedPluginState = useSharedPluginStateWithSelector(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
94
- var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
95
- return {
96
- maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
97
- primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
98
- editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
99
- };
100
- }),
101
- editorViewMode = _useSharedPluginState.editorViewMode,
102
- primaryToolbarComponentsState = _useSharedPluginState.primaryToolbarComponentsState,
103
- maxContentSizeReached = _useSharedPluginState.maxContentSizeReached;
104
- var primaryToolbarState = getPrimaryToolbarComponents(editorAPI, primaryToolbarComponentsState);
105
- var _useSharedPluginState2 = useSharedPluginState(editorAPI, ['media']),
106
- mediaState = _useSharedPluginState2.mediaState;
107
- var intl = useIntl();
108
- var editorDOMElement = props.editorDOMElement,
109
- editorView = props.editorView,
110
- editorActions = props.editorActions,
111
- eventDispatcher = props.eventDispatcher,
112
- providerFactory = props.providerFactory,
113
- contentComponents = props.contentComponents,
114
- customContentComponents = props.customContentComponents,
115
- customPrimaryToolbarComponents = props.customPrimaryToolbarComponents,
116
- primaryToolbarComponentsProp = props.primaryToolbarComponents,
117
- customSecondaryToolbarComponents = props.customSecondaryToolbarComponents,
118
- popupsMountPoint = props.popupsMountPoint,
119
- popupsBoundariesElement = props.popupsBoundariesElement,
120
- popupsScrollableElement = props.popupsScrollableElement,
121
- maxHeight = props.maxHeight,
122
- _props$minHeight = props.minHeight,
123
- minHeight = _props$minHeight === void 0 ? 150 : _props$minHeight,
124
- onSave = props.onSave,
125
- onCancel = props.onCancel,
126
- disabled = props.disabled,
127
- dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
128
- useStickyToolbar = props.useStickyToolbar,
129
- pluginHooks = props.pluginHooks,
130
- featureFlags = props.featureFlags,
131
- innerRef = props.innerRef,
132
- isEditorModernisationEnabled = props.isEditorModernisationEnabled;
133
- var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
134
- var containerElement = React.useRef(null);
135
-
136
- // Wrapper container for toolbar and content area
137
- var wrapperElementRef = useMemo(function () {
138
- return innerRef || /*#__PURE__*/React.createRef();
139
- }, [innerRef]);
140
- var _useState = useState(false),
141
- _useState2 = _slicedToArray(_useState, 2),
142
- saveButtonDisabled = _useState2[0],
143
- setSaveButtonDisabled = _useState2[1];
144
- useEffect(function () {
145
- if (mediaState) {
146
- mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
147
- }
148
- return function () {
149
- return mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
150
- };
151
- }, [mediaState]);
152
- var handleSave = useCallback(function () {
153
- if (editorView && onSave) {
154
- onSave(editorView);
155
- }
156
- }, [editorView, onSave]);
157
- var handleCancel = useCallback(function () {
158
- if (editorView && onCancel) {
159
- onCancel(editorView);
160
- }
161
- }, [editorView, onCancel]);
162
- var isShortcutToFocusToolbar = useCallback(function (event) {
163
- //Alt + F9 to reach first element in this main toolbar
164
- return event.altKey && (event.key === 'F9' || event.keyCode === 120);
165
- }, []);
166
-
167
- // When primary toolbar components is undefined, do not show two line editor toolbar
168
- var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
169
- var handleEscape = useCallback(function (event) {
170
- if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
171
- editorView === null || editorView === void 0 || editorView.focus();
172
- }
173
- event.preventDefault();
174
- event.stopPropagation();
175
- }, [editorView]);
176
- var primaryToolbarComponents = primaryToolbarComponentsProp;
177
- if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
178
- primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
179
- }
180
- var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
181
- var memoizedContentAreaStyles = useMemo(function () {
182
- return [maxHeight ?
183
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
184
- css({
185
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
186
- maxHeight: "".concat(maxHeight, "px"),
187
- // When maxHeight is set, content area should have overflow-y explicitly set as auto
188
- // As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
189
- // This will cause the content area to have content overflowing the container
190
- // so need to set overflow-y as auto to make sure the content area is scrollable
191
- overflowY: 'auto'
192
- }) : null];
193
- }, [maxHeight]);
194
- var contentAreaStyles = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? memoizedContentAreaStyles : [maxHeight ?
195
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
196
- css({
197
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
198
- maxHeight: "".concat(maxHeight, "px"),
199
- // When maxHeight is set, content area should have overflow-y explicitly set as auto
200
- // As we have overflow-x: clip for the content area, and when maxHeight prop is set, overflow-y will be computed as visible by default.
201
- // This will cause the content area to have content overflowing the container
202
- // so need to set overflow-y as auto to make sure the content area is scrollable
203
- overflowY: 'auto'
204
- }) : null];
205
- var customToolbarSlot = jsx("div", {
206
- css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
207
- }, customPrimaryToolbarComponents);
208
- return jsx(WithFlash, {
209
- animate: maxContentSizeReached
210
- }, jsx(WidthProvider, null, jsx("div", {
211
- css: [commentEditorStyles, isEditorModernisationEnabled && modernisedEditorStyles,
212
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
213
- css({
214
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
215
- minHeight: "".concat(minHeight, "px")
216
- })]
217
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
218
- ,
219
- className: "akEditor",
220
- ref: wrapperElementRef
221
- }, jsx(MainToolbar, {
222
- isEditorModernisationEnabled: isEditorModernisationEnabled,
223
- useStickyToolbar: useStickyToolbar,
224
- twoLineEditorToolbar: isTwoLineToolbarEnabled,
225
- isNewToolbarEnabled: isToolbarAIFCEnabled
226
- }, isToolbarAIFCEnabled ? jsx(ToolbarArrowKeyNavigationProvider, {
227
- editorView: editorView,
228
- childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
229
- isShortcutToFocusToolbar: isShortcutToFocusToolbar,
230
- handleEscape: handleEscape,
231
- editorAppearance: appearance,
232
- useStickyToolbar: useStickyToolbar,
233
- intl: intl
234
- }, jsx(CommentToolbar, {
235
- editorAPI: editorAPI,
236
- editorView: editorView,
237
- editorAppearance: appearance,
238
- disabled: !!disabled,
239
- popupsBoundariesElement: popupsBoundariesElement,
240
- popupsScrollableElement: popupsScrollableElement,
241
- popupsMountPoint: popupsMountPoint
242
- }), customPrimaryToolbarComponents ? customToolbarSlot : null) : jsx(ToolbarArrowKeyNavigationProvider, {
243
- editorView: editorView,
244
- childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
245
- isShortcutToFocusToolbar: isShortcutToFocusToolbar,
246
- handleEscape: handleEscape,
247
- editorAppearance: appearance,
248
- useStickyToolbar: useStickyToolbar,
249
- intl: intl
250
- }, jsx(Toolbar
251
- // Ignored via go/ees005
252
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
253
- , {
254
- editorView: editorView,
255
- editorActions: editorActions
256
- // Ignored via go/ees005
257
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
258
- ,
259
- eventDispatcher: eventDispatcher
260
- // Ignored via go/ees005
261
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
262
- ,
263
- providerFactory: providerFactory,
264
- appearance: appearance,
265
- items: primaryToolbarComponents,
266
- popupsMountPoint: popupsMountPoint,
267
- popupsBoundariesElement: popupsBoundariesElement,
268
- popupsScrollableElement: popupsScrollableElement,
269
- disabled: !!disabled,
270
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
271
- containerElement: containerElement.current,
272
- twoLineEditorToolbar: isTwoLineToolbarEnabled
273
- }), customToolbarSlot)), jsx(ClickAreaBlock, {
274
- editorView: editorView,
275
- editorDisabled: disabled
276
- }, jsx(WidthConsumer, null, function (_ref) {
277
- var width = _ref.width;
278
- return jsx(EditorContentContainer, {
279
- ref: containerElement,
280
- css: contentAreaStyles,
281
- isScrollable: maxHeight ? true : undefined
282
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
283
- ,
284
- className: classnames('ak-editor-content-area', {
285
- 'less-margin': width < akEditorMobileBreakoutPoint
286
- }),
287
- featureFlags: featureFlags,
288
- viewMode: editorViewMode,
289
- appearance: appearance,
290
- useStandardNodeWidth: useStandardNodeWidth
291
- }, customContentComponents && 'before' in customContentComponents ? contentComponentClickWrapper(customContentComponents.before) : contentComponentClickWrapper(customContentComponents), jsx(PluginSlot, {
292
- editorView: editorView,
293
- editorActions: editorActions,
294
- eventDispatcher: eventDispatcher,
295
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
296
- providerFactory: providerFactory,
297
- appearance: appearance,
298
- items: contentComponents,
299
- popupsMountPoint: popupsMountPoint,
300
- popupsBoundariesElement: popupsBoundariesElement,
301
- popupsScrollableElement: popupsScrollableElement,
302
- containerElement: containerElement.current,
303
- disabled: !!disabled,
304
- wrapperElement: wrapperElementRef.current,
305
- pluginHooks: pluginHooks
306
- }), editorDOMElement, customContentComponents && 'after' in customContentComponents ? contentComponentClickWrapper(customContentComponents.after) : null);
307
- }))), showSecondaryToolbar && jsx("div", {
308
- css: secondaryToolbarStyles,
309
- "data-testid": "ak-editor-secondary-toolbar"
310
- }, jsx(ButtonGroup, null, !!onSave && jsx(Button, {
311
- appearance: "primary",
312
- onClick: handleSave,
313
- testId: "comment-save-button",
314
- isDisabled: disabled || saveButtonDisabled,
315
- interactionName: "editor-comment-save-button"
316
- }, intl.formatMessage(messages.saveButton)), !!onCancel && jsx(Button, {
317
- appearance: "subtle",
318
- onClick: handleCancel,
319
- testId: "comment-cancel-button",
320
- isDisabled: disabled,
321
- interactionName: "editor-comment-cancel-button"
322
- }, intl.formatMessage(messages.cancelButton))), jsx("span", {
323
- style: {
324
- flexGrow: 1
325
- }
326
- }), customSecondaryToolbarComponents)));
327
- };
328
- CommentEditorWithIntlEmotion.displayName = 'CommentEditorAppearance';