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