@atlaskit/editor-core 180.1.0 → 181.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 (426) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/cjs/actions/index.js +25 -10
  3. package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
  4. package/dist/cjs/create-editor/ReactEditorView.js +0 -5
  5. package/dist/cjs/create-editor/ReactEditorViewInternal.js +73 -103
  6. package/dist/cjs/create-editor/create-plugins-list.js +37 -5
  7. package/dist/cjs/create-editor/feature-flags-from-props.js +31 -26
  8. package/dist/cjs/create-editor/preset-utils.js +27 -0
  9. package/dist/cjs/editor-next/editor-internal.js +2 -2
  10. package/dist/cjs/editor-next/editor-migration-component.js +18 -2
  11. package/dist/cjs/editor-next/hooks/useProviderFactory.js +4 -3
  12. package/dist/cjs/editor-next/index.js +13 -9
  13. package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
  14. package/dist/cjs/editor-next/utils/handleProviders.js +17 -22
  15. package/dist/cjs/editor.js +20 -13
  16. package/dist/cjs/keymaps/consts.js +1 -16
  17. package/dist/cjs/labs/next/presets/cxhtml.js +56 -55
  18. package/dist/cjs/labs/next/presets/default.js +15 -42
  19. package/dist/cjs/labs/next/presets/mobile.js +76 -89
  20. package/dist/cjs/labs/next/presets/universal.js +330 -257
  21. package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
  22. package/dist/cjs/plugins/analytics/plugin.js +6 -0
  23. package/dist/cjs/plugins/annotation/utils.js +2 -36
  24. package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
  25. package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
  26. package/dist/cjs/plugins/caption/index.js +0 -7
  27. package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -4
  28. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
  29. package/dist/cjs/plugins/card/pm-plugins/main.js +6 -3
  30. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
  31. package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
  32. package/dist/cjs/plugins/collab-edit/provider/index.js +1 -8
  33. package/dist/cjs/plugins/collab-edit/provider/types.js +1 -12
  34. package/dist/cjs/plugins/context-panel/index.js +1 -6
  35. package/dist/cjs/plugins/data-consumer/index.js +0 -8
  36. package/dist/cjs/plugins/date/utils/internal.js +0 -4
  37. package/dist/cjs/plugins/extension/commands.js +1 -8
  38. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +9 -2
  39. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -2
  40. package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -0
  41. package/dist/cjs/plugins/feedback-dialog/index.js +1 -4
  42. package/dist/cjs/plugins/floating-toolbar/ui/Button.js +7 -3
  43. package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +10 -5
  44. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
  45. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
  46. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +24 -8
  47. package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
  48. package/dist/cjs/plugins/fragment/index.js +0 -8
  49. package/dist/cjs/plugins/help-dialog/commands.js +2 -6
  50. package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
  51. package/dist/cjs/plugins/layout/styles.js +10 -1
  52. package/dist/cjs/plugins/list/utils/find.js +0 -28
  53. package/dist/cjs/plugins/list/utils/indentation.js +1 -25
  54. package/dist/cjs/plugins/list/utils/node.js +0 -5
  55. package/dist/cjs/plugins/list/utils/selection.js +2 -15
  56. package/dist/cjs/plugins/media/utils/media-common.js +1 -20
  57. package/dist/cjs/plugins/mentions/nodeviews/mention.js +100 -16
  58. package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -18
  59. package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
  60. package/dist/cjs/plugins/mobile-dimensions/index.js +1 -4
  61. package/dist/cjs/plugins/paste/index.js +1 -2
  62. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +123 -87
  63. package/dist/cjs/plugins/paste/util/index.js +0 -46
  64. package/dist/cjs/plugins/quick-insert/assets/index.js +1 -27
  65. package/dist/cjs/plugins/selection/gap-cursor/actions.js +49 -44
  66. package/dist/cjs/plugins/status/utils.js +1 -15
  67. package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -1
  68. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
  69. package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
  70. package/dist/cjs/plugins/text-formatting/utils.js +1 -26
  71. package/dist/cjs/plugins/type-ahead/constants.js +1 -7
  72. package/dist/cjs/plugins/type-ahead/index.js +4 -1
  73. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +6 -37
  74. package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -2
  75. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +41 -4
  76. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +2 -0
  77. package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
  78. package/dist/cjs/plugins/type-ahead/utils.js +25 -24
  79. package/dist/cjs/test-utils.js +4 -12
  80. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
  81. package/dist/cjs/ui/ColorPalette/index.js +18 -0
  82. package/dist/cjs/ui/ColorPickerButton/index.js +6 -2
  83. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
  84. package/dist/cjs/ui/ConfigPanel/utils.js +4 -17
  85. package/dist/cjs/ui/ContentStyles/index.js +1 -1
  86. package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -1
  87. package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
  88. package/dist/cjs/ui/Resizer/utils.js +1 -3
  89. package/dist/cjs/ui/styles.js +3 -7
  90. package/dist/cjs/utils/get-editor-plugins.js +1 -3
  91. package/dist/cjs/utils/index.js +9 -269
  92. package/dist/cjs/utils/input-rules.js +1 -15
  93. package/dist/cjs/version-wrapper.js +1 -1
  94. package/dist/cjs/version.json +1 -1
  95. package/dist/es2019/actions/index.js +23 -9
  96. package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
  97. package/dist/es2019/create-editor/ReactEditorView.js +0 -5
  98. package/dist/es2019/create-editor/ReactEditorViewInternal.js +67 -82
  99. package/dist/es2019/create-editor/create-plugins-list.js +32 -5
  100. package/dist/es2019/create-editor/feature-flags-from-props.js +31 -26
  101. package/dist/es2019/create-editor/preset-utils.js +15 -0
  102. package/dist/es2019/editor-next/editor-internal.js +2 -2
  103. package/dist/es2019/editor-next/editor-migration-component.js +19 -2
  104. package/dist/es2019/editor-next/hooks/useProviderFactory.js +4 -3
  105. package/dist/es2019/editor-next/index.js +13 -7
  106. package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
  107. package/dist/es2019/editor-next/utils/handleProviders.js +18 -24
  108. package/dist/es2019/editor.js +20 -11
  109. package/dist/es2019/keymaps/consts.js +7 -11
  110. package/dist/es2019/labs/next/presets/cxhtml.js +56 -53
  111. package/dist/es2019/labs/next/presets/default.js +18 -38
  112. package/dist/es2019/labs/next/presets/mobile.js +88 -88
  113. package/dist/es2019/labs/next/presets/universal.js +338 -265
  114. package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
  115. package/dist/es2019/plugins/analytics/plugin.js +7 -0
  116. package/dist/es2019/plugins/annotation/utils.js +2 -30
  117. package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
  118. package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
  119. package/dist/es2019/plugins/caption/index.js +0 -2
  120. package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -4
  121. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
  122. package/dist/es2019/plugins/card/pm-plugins/main.js +6 -3
  123. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
  124. package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
  125. package/dist/es2019/plugins/collab-edit/provider/index.js +1 -1
  126. package/dist/es2019/plugins/collab-edit/provider/types.js +1 -10
  127. package/dist/es2019/plugins/context-panel/index.js +0 -3
  128. package/dist/es2019/plugins/data-consumer/index.js +0 -7
  129. package/dist/es2019/plugins/date/utils/internal.js +0 -3
  130. package/dist/es2019/plugins/extension/commands.js +0 -6
  131. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +12 -2
  132. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +3 -0
  133. package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +1 -0
  134. package/dist/es2019/plugins/feedback-dialog/index.js +0 -2
  135. package/dist/es2019/plugins/floating-toolbar/ui/Button.js +7 -3
  136. package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +10 -5
  137. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
  138. package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
  139. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +21 -4
  140. package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
  141. package/dist/es2019/plugins/fragment/index.js +0 -7
  142. package/dist/es2019/plugins/help-dialog/commands.js +1 -2
  143. package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
  144. package/dist/es2019/plugins/layout/styles.js +12 -4
  145. package/dist/es2019/plugins/list/utils/find.js +0 -27
  146. package/dist/es2019/plugins/list/utils/indentation.js +0 -23
  147. package/dist/es2019/plugins/list/utils/node.js +1 -4
  148. package/dist/es2019/plugins/list/utils/selection.js +2 -15
  149. package/dist/es2019/plugins/media/utils/media-common.js +1 -19
  150. package/dist/es2019/plugins/mentions/nodeviews/mention.js +64 -16
  151. package/dist/es2019/plugins/mentions/type-ahead/index.js +1 -14
  152. package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
  153. package/dist/es2019/plugins/mobile-dimensions/index.js +0 -3
  154. package/dist/es2019/plugins/paste/index.js +1 -2
  155. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +126 -94
  156. package/dist/es2019/plugins/paste/util/index.js +5 -45
  157. package/dist/es2019/plugins/quick-insert/assets/index.js +0 -8
  158. package/dist/es2019/plugins/selection/gap-cursor/actions.js +56 -56
  159. package/dist/es2019/plugins/status/utils.js +1 -11
  160. package/dist/es2019/plugins/text-color/pm-plugins/main.js +1 -1
  161. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
  162. package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
  163. package/dist/es2019/plugins/text-formatting/utils.js +0 -19
  164. package/dist/es2019/plugins/type-ahead/constants.js +0 -5
  165. package/dist/es2019/plugins/type-ahead/index.js +4 -1
  166. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +4 -37
  167. package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +4 -2
  168. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +41 -4
  169. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -0
  170. package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
  171. package/dist/es2019/plugins/type-ahead/utils.js +22 -25
  172. package/dist/es2019/test-utils.js +4 -7
  173. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
  174. package/dist/es2019/ui/ColorPalette/index.js +2 -1
  175. package/dist/es2019/ui/ColorPickerButton/index.js +6 -2
  176. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -0
  177. package/dist/es2019/ui/ConfigPanel/utils.js +0 -6
  178. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  179. package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +1 -1
  180. package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
  181. package/dist/es2019/ui/Resizer/utils.js +0 -1
  182. package/dist/es2019/ui/styles.js +0 -6
  183. package/dist/es2019/utils/get-editor-plugins.js +1 -3
  184. package/dist/es2019/utils/index.js +13 -199
  185. package/dist/es2019/utils/input-rules.js +0 -14
  186. package/dist/es2019/version-wrapper.js +1 -1
  187. package/dist/es2019/version.json +1 -1
  188. package/dist/esm/actions/index.js +23 -9
  189. package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
  190. package/dist/esm/create-editor/ReactEditorView.js +0 -5
  191. package/dist/esm/create-editor/ReactEditorViewInternal.js +73 -102
  192. package/dist/esm/create-editor/create-plugins-list.js +36 -5
  193. package/dist/esm/create-editor/feature-flags-from-props.js +31 -26
  194. package/dist/esm/create-editor/preset-utils.js +21 -0
  195. package/dist/esm/editor-next/editor-internal.js +2 -2
  196. package/dist/esm/editor-next/editor-migration-component.js +18 -2
  197. package/dist/esm/editor-next/hooks/useProviderFactory.js +4 -3
  198. package/dist/esm/editor-next/index.js +13 -9
  199. package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
  200. package/dist/esm/editor-next/utils/handleProviders.js +17 -22
  201. package/dist/esm/editor.js +20 -13
  202. package/dist/esm/keymaps/consts.js +7 -11
  203. package/dist/esm/labs/next/presets/cxhtml.js +56 -55
  204. package/dist/esm/labs/next/presets/default.js +18 -41
  205. package/dist/esm/labs/next/presets/mobile.js +88 -90
  206. package/dist/esm/labs/next/presets/universal.js +330 -257
  207. package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
  208. package/dist/esm/plugins/analytics/plugin.js +6 -0
  209. package/dist/esm/plugins/annotation/utils.js +2 -32
  210. package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
  211. package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
  212. package/dist/esm/plugins/caption/index.js +0 -2
  213. package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -4
  214. package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
  215. package/dist/esm/plugins/card/pm-plugins/main.js +6 -3
  216. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
  217. package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
  218. package/dist/esm/plugins/collab-edit/provider/index.js +1 -1
  219. package/dist/esm/plugins/collab-edit/provider/types.js +1 -10
  220. package/dist/esm/plugins/context-panel/index.js +0 -3
  221. package/dist/esm/plugins/data-consumer/index.js +0 -7
  222. package/dist/esm/plugins/date/utils/internal.js +0 -3
  223. package/dist/esm/plugins/extension/commands.js +0 -6
  224. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +9 -2
  225. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +2 -2
  226. package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +1 -0
  227. package/dist/esm/plugins/feedback-dialog/index.js +0 -2
  228. package/dist/esm/plugins/floating-toolbar/ui/Button.js +7 -3
  229. package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -5
  230. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
  231. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
  232. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +24 -8
  233. package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
  234. package/dist/esm/plugins/fragment/index.js +0 -7
  235. package/dist/esm/plugins/help-dialog/commands.js +0 -3
  236. package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
  237. package/dist/esm/plugins/layout/styles.js +11 -2
  238. package/dist/esm/plugins/list/utils/find.js +0 -27
  239. package/dist/esm/plugins/list/utils/indentation.js +0 -23
  240. package/dist/esm/plugins/list/utils/node.js +1 -4
  241. package/dist/esm/plugins/list/utils/selection.js +2 -12
  242. package/dist/esm/plugins/media/utils/media-common.js +1 -17
  243. package/dist/esm/plugins/mentions/nodeviews/mention.js +97 -16
  244. package/dist/esm/plugins/mentions/type-ahead/index.js +1 -18
  245. package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
  246. package/dist/esm/plugins/mobile-dimensions/index.js +0 -3
  247. package/dist/esm/plugins/paste/index.js +1 -2
  248. package/dist/esm/plugins/paste/pm-plugins/analytics.js +122 -86
  249. package/dist/esm/plugins/paste/util/index.js +5 -45
  250. package/dist/esm/plugins/quick-insert/assets/index.js +0 -20
  251. package/dist/esm/plugins/selection/gap-cursor/actions.js +52 -45
  252. package/dist/esm/plugins/status/utils.js +1 -13
  253. package/dist/esm/plugins/text-color/pm-plugins/main.js +1 -1
  254. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
  255. package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
  256. package/dist/esm/plugins/text-formatting/utils.js +0 -21
  257. package/dist/esm/plugins/type-ahead/constants.js +0 -5
  258. package/dist/esm/plugins/type-ahead/index.js +4 -1
  259. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +4 -33
  260. package/dist/esm/plugins/type-ahead/pm-plugins/main.js +4 -2
  261. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +41 -4
  262. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -0
  263. package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
  264. package/dist/esm/plugins/type-ahead/utils.js +24 -22
  265. package/dist/esm/test-utils.js +4 -7
  266. package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
  267. package/dist/esm/ui/ColorPalette/index.js +2 -1
  268. package/dist/esm/ui/ColorPickerButton/index.js +6 -2
  269. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -0
  270. package/dist/esm/ui/ConfigPanel/utils.js +3 -14
  271. package/dist/esm/ui/ContentStyles/index.js +1 -1
  272. package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +1 -1
  273. package/dist/esm/ui/ElementBrowser/constants.js +0 -1
  274. package/dist/esm/ui/Resizer/utils.js +0 -1
  275. package/dist/esm/ui/styles.js +2 -5
  276. package/dist/esm/utils/get-editor-plugins.js +1 -3
  277. package/dist/esm/utils/index.js +13 -196
  278. package/dist/esm/utils/input-rules.js +0 -13
  279. package/dist/esm/version-wrapper.js +1 -1
  280. package/dist/esm/version.json +1 -1
  281. package/dist/types/actions/index.d.ts +4 -4
  282. package/dist/types/create-editor/ReactEditorView.d.ts +0 -3
  283. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +9 -7
  284. package/dist/types/create-editor/ReactEditorViewNext.d.ts +3 -4
  285. package/dist/types/create-editor/create-plugins-list.d.ts +3 -5
  286. package/dist/types/create-editor/preset-utils.d.ts +2 -0
  287. package/dist/types/editor-next/editor-internal.d.ts +9 -9
  288. package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +2 -2
  289. package/dist/types/editor-next/hooks/useProviderFactory.d.ts +2 -2
  290. package/dist/types/editor-next/index.d.ts +6 -6
  291. package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -2
  292. package/dist/types/editor-next/utils/editorPropTypes.d.ts +1 -1
  293. package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
  294. package/dist/types/editor-next/utils/handleProviders.d.ts +2 -2
  295. package/dist/types/editor-next/utils/onEditorCreated.d.ts +2 -2
  296. package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +1 -1
  297. package/dist/types/editor.d.ts +7 -4
  298. package/dist/types/keymaps/consts.d.ts +0 -11
  299. package/dist/types/labs/next/presets/cxhtml.d.ts +33 -1
  300. package/dist/types/labs/next/presets/default.d.ts +67 -10
  301. package/dist/types/labs/next/presets/mobile.d.ts +33 -1
  302. package/dist/types/labs/next/presets/universal.d.ts +5 -13
  303. package/dist/types/labs/next/presets/useUniversalPreset.d.ts +7 -0
  304. package/dist/types/nodeviews/context-adapter.d.ts +0 -1
  305. package/dist/types/nodeviews/index.d.ts +0 -1
  306. package/dist/types/plugins/alignment/pm-plugins/types.d.ts +0 -11
  307. package/dist/types/plugins/annotation/utils.d.ts +0 -17
  308. package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
  309. package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
  310. package/dist/types/plugins/caption/index.d.ts +0 -2
  311. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
  312. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +1 -0
  313. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
  314. package/dist/types/plugins/code-block/actions.d.ts +0 -4
  315. package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
  316. package/dist/types/plugins/collab-edit/provider/index.d.ts +1 -2
  317. package/dist/types/plugins/collab-edit/provider/types.d.ts +1 -36
  318. package/dist/types/plugins/context-panel/index.d.ts +2 -3
  319. package/dist/types/plugins/data-consumer/index.d.ts +0 -2
  320. package/dist/types/plugins/date/utils/internal.d.ts +0 -1
  321. package/dist/types/plugins/extension/commands.d.ts +0 -1
  322. package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
  323. package/dist/types/plugins/feedback-dialog/index.d.ts +0 -2
  324. package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +3 -1
  325. package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
  326. package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
  327. package/dist/types/plugins/fragment/index.d.ts +0 -2
  328. package/dist/types/plugins/help-dialog/commands.d.ts +0 -1
  329. package/dist/types/plugins/history/actions.d.ts +1 -2
  330. package/dist/types/plugins/layout/styles.d.ts +2 -1
  331. package/dist/types/plugins/list/utils/find.d.ts +0 -1
  332. package/dist/types/plugins/list/utils/indentation.d.ts +0 -1
  333. package/dist/types/plugins/list/utils/node.d.ts +0 -2
  334. package/dist/types/plugins/list/utils/selection.d.ts +0 -3
  335. package/dist/types/plugins/media/utils/media-common.d.ts +0 -5
  336. package/dist/types/plugins/mentions/types.d.ts +1 -2
  337. package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +2 -3
  338. package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -6
  339. package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -4
  340. package/dist/types/plugins/mobile-dimensions/index.d.ts +0 -1
  341. package/dist/types/plugins/paste/index.d.ts +0 -1
  342. package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +6 -3
  343. package/dist/types/plugins/paste/util/index.d.ts +0 -6
  344. package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
  345. package/dist/types/plugins/status/utils.d.ts +0 -3
  346. package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
  347. package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
  348. package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
  349. package/dist/types/plugins/text-formatting/utils.d.ts +0 -4
  350. package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
  351. package/dist/types/plugins/type-ahead/index.d.ts +1 -0
  352. package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +2 -11
  353. package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
  354. package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
  355. package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +1 -0
  356. package/dist/types/plugins/type-ahead/utils.d.ts +3 -3
  357. package/dist/types/test-utils.d.ts +4 -5
  358. package/dist/types/types/editor-appearance-component.d.ts +2 -2
  359. package/dist/types/types/editor-props.d.ts +55 -42
  360. package/dist/types/ui/Appearance/Chromeless.d.ts +0 -5
  361. package/dist/types/ui/Appearance/Comment/Comment.d.ts +0 -7
  362. package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +3 -2
  363. package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -4
  364. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
  365. package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
  366. package/dist/types/ui/ColorPalette/Palettes/index.d.ts +1 -1
  367. package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -1
  368. package/dist/types/ui/ColorPalette/index.d.ts +2 -1
  369. package/dist/types/ui/ColorPickerButton/index.d.ts +4 -2
  370. package/dist/types/ui/ConfigPanel/types.d.ts +0 -3
  371. package/dist/types/ui/ConfigPanel/utils.d.ts +2 -3
  372. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  373. package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +0 -3
  374. package/dist/types/ui/ElementBrowser/constants.d.ts +0 -1
  375. package/dist/types/ui/ElementBrowser/types.d.ts +0 -5
  376. package/dist/types/ui/Resizer/utils.d.ts +0 -1
  377. package/dist/types/ui/styles.d.ts +0 -1
  378. package/dist/types/utils/index.d.ts +6 -65
  379. package/dist/types/utils/input-rules.d.ts +1 -2
  380. package/dist/types/utils/table.d.ts +0 -1
  381. package/package.json +23 -24
  382. package/report.api.md +155 -146
  383. package/dist/cjs/labs/next/presets/preset.js +0 -101
  384. package/dist/cjs/plugins/analytics/types/type-ahead.js +0 -5
  385. package/dist/cjs/plugins/collab-edit/provider/channel.js +0 -313
  386. package/dist/cjs/plugins/collab-edit/provider/logger.js +0 -17
  387. package/dist/cjs/plugins/collab-edit/provider/mock-users.js +0 -19
  388. package/dist/cjs/plugins/data-consumer/plugin-key.js +0 -9
  389. package/dist/cjs/plugins/media/toolbar/toolbar-messages.js +0 -15
  390. package/dist/cjs/profiler/render-count.js +0 -60
  391. package/dist/cjs/ui/ColorPalette/Color/index.js +0 -9
  392. package/dist/cjs/ui/ConfigPanel/FieldDescription.js +0 -19
  393. package/dist/cjs/ui/WithPluginState/types.js +0 -5
  394. package/dist/es2019/labs/next/presets/preset.js +0 -68
  395. package/dist/es2019/plugins/analytics/types/type-ahead.js +0 -1
  396. package/dist/es2019/plugins/collab-edit/provider/channel.js +0 -179
  397. package/dist/es2019/plugins/collab-edit/provider/logger.js +0 -8
  398. package/dist/es2019/plugins/collab-edit/provider/mock-users.js +0 -12
  399. package/dist/es2019/plugins/data-consumer/plugin-key.js +0 -2
  400. package/dist/es2019/plugins/media/toolbar/toolbar-messages.js +0 -8
  401. package/dist/es2019/profiler/render-count.js +0 -53
  402. package/dist/es2019/ui/ColorPalette/Color/index.js +0 -2
  403. package/dist/es2019/ui/ConfigPanel/FieldDescription.js +0 -12
  404. package/dist/es2019/ui/WithPluginState/types.js +0 -1
  405. package/dist/esm/labs/next/presets/preset.js +0 -93
  406. package/dist/esm/plugins/analytics/types/type-ahead.js +0 -1
  407. package/dist/esm/plugins/collab-edit/provider/channel.js +0 -305
  408. package/dist/esm/plugins/collab-edit/provider/logger.js +0 -10
  409. package/dist/esm/plugins/collab-edit/provider/mock-users.js +0 -12
  410. package/dist/esm/plugins/data-consumer/plugin-key.js +0 -2
  411. package/dist/esm/plugins/media/toolbar/toolbar-messages.js +0 -8
  412. package/dist/esm/profiler/render-count.js +0 -49
  413. package/dist/esm/ui/ColorPalette/Color/index.js +0 -2
  414. package/dist/esm/ui/ConfigPanel/FieldDescription.js +0 -11
  415. package/dist/esm/ui/WithPluginState/types.js +0 -1
  416. package/dist/types/labs/next/presets/preset.d.ts +0 -46
  417. package/dist/types/plugins/analytics/types/type-ahead.d.ts +0 -1
  418. package/dist/types/plugins/collab-edit/provider/channel.d.ts +0 -48
  419. package/dist/types/plugins/collab-edit/provider/logger.d.ts +0 -1
  420. package/dist/types/plugins/collab-edit/provider/mock-users.d.ts +0 -6
  421. package/dist/types/plugins/data-consumer/plugin-key.d.ts +0 -2
  422. package/dist/types/plugins/media/toolbar/toolbar-messages.d.ts +0 -7
  423. package/dist/types/profiler/render-count.d.ts +0 -14
  424. package/dist/types/ui/ColorPalette/Color/index.d.ts +0 -2
  425. package/dist/types/ui/ConfigPanel/FieldDescription.d.ts +0 -6
  426. package/dist/types/ui/WithPluginState/types.d.ts +0 -10
@@ -21,7 +21,7 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
21
  var _editorPalette = require("@atlaskit/editor-palette");
22
22
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
23
23
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
24
- var _ColorPalette = _interopRequireDefault(require("../../../../ui/ColorPalette"));
24
+ var _ColorPalette = _interopRequireWildcard(require("../../../../ui/ColorPalette"));
25
25
  var _Dropdown = _interopRequireDefault(require("../../../../ui/Dropdown"));
26
26
  var _styles = require("../../../../ui/styles");
27
27
  var _ToolbarButton = _interopRequireWildcard(require("../../../../ui/ToolbarButton"));
@@ -232,14 +232,16 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
232
232
  }, (0, _react2.jsx)("div", {
233
233
  "data-testid": "text-color-palette"
234
234
  }, (0, _react2.jsx)(_ColorPalette.default, {
235
- palette: palette,
236
235
  onClick: function onClick(color) {
237
236
  return _this2.changeTextColor(color, pluginState.disabled);
238
237
  },
239
238
  selectedColor: pluginState.color,
240
- textPalette: true,
241
- hexToPaletteColor: _editorPalette.hexToEditorTextPaletteColor,
242
- useSomewhatSemanticTextColorNames: useSomewhatSemanticTextColorNames
239
+ paletteOptions: {
240
+ palette: palette,
241
+ hexToPaletteColor: _editorPalette.hexToEditorTextPaletteColor,
242
+ paletteColorTooltipMessages: _ColorPalette.textPaletteTooltipMessages,
243
+ showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
244
+ }
243
245
  }))), (0, _react2.jsx)("span", {
244
246
  css: _styles.separatorStyles
245
247
  }));
@@ -23,10 +23,15 @@ function replaceTextUsingCaptureGroup(text) {
23
23
  var _match = (0, _slicedToArray2.default)(match, 4),
24
24
  prefix = _match[1],
25
25
  suffix = _match[3];
26
- var replacement = (prefix || '') + text + (suffix || '');
26
+ var replacement = text + (suffix || '');
27
27
  var tr = state.tr,
28
28
  $to = state.selection.$to;
29
- tr.replaceWith(start, end, state.schema.text(replacement, $to.marks()));
29
+ var startPos = start + (prefix || '').length;
30
+ var safePos = Math.min(
31
+ // I know it is almost impossible to have a negative value at this point.
32
+ // But, this is JS #trustnoone
33
+ Math.max(startPos, 0), end);
34
+ tr.replaceWith(safePos, end, state.schema.text(replacement, $to.marks()));
30
35
  tr.setSelection(_prosemirrorState.Selection.near(tr.doc.resolve(tr.selection.to)));
31
36
  return tr;
32
37
  };
@@ -76,6 +81,7 @@ function createSingleQuotesRules() {
76
81
  // apostrophe
77
82
  createReplacementRule('’', /(\w+)(')(\w+)$/)];
78
83
  }
84
+
79
85
  /**
80
86
  * Get replacement rules related to product
81
87
  */
@@ -3,34 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.nodeLen = exports.markActive = exports.isIgnorable = exports.isBlockNode = exports.isArrayContainsContent = exports.hasCode = exports.domIndex = exports.compareItemsArrays = exports.checkFormattingIsPresent = exports.anyMarkActive = void 0;
6
+ exports.markActive = exports.isArrayContainsContent = exports.hasCode = exports.compareItemsArrays = exports.checkFormattingIsPresent = exports.anyMarkActive = void 0;
7
7
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
8
8
  var _clearFormatting = require("./commands/clear-formatting");
9
- var nodeLen = function nodeLen(node) {
10
- return node.nodeType === 3 && node.nodeValue ? node.nodeValue.length : node.childNodes.length;
11
- };
12
- exports.nodeLen = nodeLen;
13
- var isIgnorable = function isIgnorable(dom) {
14
- return dom.pmViewDesc && dom.pmViewDesc.size === 0;
15
- };
16
- exports.isIgnorable = isIgnorable;
17
- var isBlockNode = function isBlockNode(dom) {
18
- var desc = dom.pmViewDesc;
19
- return desc && desc.node && desc.node.isBlock;
20
- };
21
- exports.isBlockNode = isBlockNode;
22
- var domIndex = function domIndex(node) {
23
- if (node) {
24
- for (var index = 0;; index++) {
25
- node = node.previousSibling;
26
- if (!node) {
27
- return index;
28
- }
29
- }
30
- }
31
- return;
32
- };
33
- exports.domIndex = domIndex;
34
9
  var hasCode = function hasCode(state, pos) {
35
10
  var code = state.schema.marks.code;
36
11
  var node = pos >= 0 && state.doc.nodeAt(pos);
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TYPE_AHEAD_POPUP_CONTENT_CLASS = exports.TYPE_AHEAD_DECORATION_KEY = exports.TYPE_AHEAD_DECORATION_ELEMENT_ID = exports.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = exports.NavigationDirection = exports.CloseSelectionOptions = void 0;
6
+ exports.TYPE_AHEAD_POPUP_CONTENT_CLASS = exports.TYPE_AHEAD_DECORATION_KEY = exports.TYPE_AHEAD_DECORATION_ELEMENT_ID = exports.TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = exports.CloseSelectionOptions = void 0;
7
7
  var TYPE_AHEAD_DECORATION_KEY = 'typeahead_decoration_key';
8
8
  exports.TYPE_AHEAD_DECORATION_KEY = TYPE_AHEAD_DECORATION_KEY;
9
9
  var TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = 'typeaheadDecoration';
@@ -12,12 +12,6 @@ var TYPE_AHEAD_POPUP_CONTENT_CLASS = 'fabric-editor-typeahead';
12
12
  exports.TYPE_AHEAD_POPUP_CONTENT_CLASS = TYPE_AHEAD_POPUP_CONTENT_CLASS;
13
13
  var TYPE_AHEAD_DECORATION_ELEMENT_ID = 'typeahaed_decoration_element_id';
14
14
  exports.TYPE_AHEAD_DECORATION_ELEMENT_ID = TYPE_AHEAD_DECORATION_ELEMENT_ID;
15
- var NavigationDirection;
16
- exports.NavigationDirection = NavigationDirection;
17
- (function (NavigationDirection) {
18
- NavigationDirection[NavigationDirection["LEFT"] = -1] = "LEFT";
19
- NavigationDirection[NavigationDirection["RIGHT"] = 1] = "RIGHT";
20
- })(NavigationDirection || (exports.NavigationDirection = NavigationDirection = {}));
21
15
  var CloseSelectionOptions;
22
16
  exports.CloseSelectionOptions = CloseSelectionOptions;
23
17
  (function (CloseSelectionOptions) {
@@ -127,6 +127,8 @@ var TypeAheadMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
127
127
  *
128
128
  */
129
129
  var typeAheadPlugin = function typeAheadPlugin(options) {
130
+ var _options$useBetterTyp;
131
+ var useBetterTypeaheadNavigation = (_options$useBetterTyp = options === null || options === void 0 ? void 0 : options.useBetterTypeaheadNavigation) !== null && _options$useBetterTyp !== void 0 ? _options$useBetterTyp : true;
130
132
  var fireAnalyticsCallback = (0, _analytics.fireAnalyticsEvent)(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
131
133
  var popupMountRef = {
132
134
  current: null
@@ -153,7 +155,8 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
153
155
  popupMountRef: popupMountRef,
154
156
  reactDispatch: dispatch,
155
157
  typeAheadHandlers: typeAhead,
156
- createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent
158
+ createAnalyticsEvent: options === null || options === void 0 ? void 0 : options.createAnalyticsEvent,
159
+ useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
157
160
  });
158
161
  }
159
162
  }, {
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.isSelectionInsideTypeAhead = exports.findDecorationElement = exports.factoryDecorations = void 0;
7
+ exports.factoryDecorations = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactDom = _interopRequireDefault(require("react-dom"));
10
10
  var _uuid = _interopRequireDefault(require("uuid"));
@@ -22,7 +22,8 @@ var _closeTypeAhead = require("../transforms/close-type-ahead");
22
22
  var factoryDecorations = function factoryDecorations(_ref) {
23
23
  var intl = _ref.intl,
24
24
  popupMountRef = _ref.popupMountRef,
25
- createAnalyticsEvent = _ref.createAnalyticsEvent;
25
+ createAnalyticsEvent = _ref.createAnalyticsEvent,
26
+ useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
26
27
  var createDecorations = function createDecorations(tr, _ref2) {
27
28
  var triggerHandler = _ref2.triggerHandler,
28
29
  inputMethod = _ref2.inputMethod,
@@ -94,7 +95,8 @@ var factoryDecorations = function factoryDecorations(_ref) {
94
95
  popupsBoundariesElement: (_popupMountRef$curren2 = popupMountRef.current) === null || _popupMountRef$curren2 === void 0 ? void 0 : _popupMountRef$curren2.popupsBoundariesElement,
95
96
  popupsScrollableElement: (_popupMountRef$curren3 = popupMountRef.current) === null || _popupMountRef$curren3 === void 0 ? void 0 : _popupMountRef$curren3.popupsScrollableElement,
96
97
  onUndoRedo: onUndoRedo,
97
- reopenQuery: reopenQuery
98
+ reopenQuery: reopenQuery,
99
+ useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
98
100
  })), typeaheadComponent);
99
101
  shouldFocusCursorInsideQuery = false;
100
102
  return typeaheadComponent;
@@ -146,37 +148,4 @@ var factoryDecorations = function factoryDecorations(_ref) {
146
148
  removeDecorations: removeDecorations
147
149
  };
148
150
  };
149
- exports.factoryDecorations = factoryDecorations;
150
- var isSelectionInsideTypeAhead = function isSelectionInsideTypeAhead(_ref4) {
151
- var decorationSet = _ref4.decorationSet,
152
- selection = _ref4.selection;
153
- if (!decorationSet || decorationSet === _prosemirrorView.DecorationSet.empty) {
154
- return false;
155
- }
156
- var typeAheadDecorations = decorationSet.find(undefined, undefined, function (spec) {
157
- return spec.isTypeAheadDecoration;
158
- });
159
- if (!typeAheadDecorations || typeAheadDecorations.length === 0) {
160
- return false;
161
- }
162
- return typeAheadDecorations.some(function (dec) {
163
- return dec.from === selection.from && dec.to === selection.to;
164
- });
165
- };
166
- exports.isSelectionInsideTypeAhead = isSelectionInsideTypeAhead;
167
- var findDecorationElement = function findDecorationElement(_ref5) {
168
- var selection = _ref5.selection,
169
- decorationSet = _ref5.decorationSet;
170
- if (!decorationSet || decorationSet === _prosemirrorView.DecorationSet.empty || !(selection instanceof _prosemirrorState.TextSelection) || !selection.$cursor) {
171
- return null;
172
- }
173
- var pos = selection.$cursor.pos;
174
- var decoration = decorationSet.find(pos, pos, function (spec) {
175
- return spec === null || spec === void 0 ? void 0 : spec.isTypeAheadDecoration;
176
- });
177
- if (!decoration || decoration.length !== 1) {
178
- return null;
179
- }
180
- return document.querySelector("#".concat(decoration[0].spec.key));
181
- };
182
- exports.findDecorationElement = findDecorationElement;
151
+ exports.factoryDecorations = factoryDecorations;
@@ -31,12 +31,14 @@ function createPlugin(_ref) {
31
31
  popupMountRef = _ref.popupMountRef,
32
32
  createAnalyticsEvent = _ref.createAnalyticsEvent,
33
33
  typeAheadHandlers = _ref.typeAheadHandlers,
34
- getIntl = _ref.getIntl;
34
+ getIntl = _ref.getIntl,
35
+ useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
35
36
  var intl = getIntl();
36
37
  var _factoryDecorations = (0, _decorations.factoryDecorations)({
37
38
  intl: intl,
38
39
  popupMountRef: popupMountRef,
39
- createAnalyticsEvent: createAnalyticsEvent
40
+ createAnalyticsEvent: createAnalyticsEvent,
41
+ useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
40
42
  }),
41
43
  createDecorations = _factoryDecorations.createDecorations,
42
44
  removeDecorations = _factoryDecorations.removeDecorations;
@@ -76,7 +76,8 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
76
76
  onQueryFocus = _ref.onQueryFocus,
77
77
  onUndoRedo = _ref.onUndoRedo,
78
78
  editorView = _ref.editorView,
79
- items = _ref.items;
79
+ items = _ref.items,
80
+ useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
80
81
  var ref = (0, _react.useRef)(document.createElement('span'));
81
82
  var inputRef = (0, _react.useRef)(null);
82
83
  var _useState = (0, _react.useState)(null),
@@ -149,6 +150,19 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
149
150
  // Some suggested the other workaround maybe listen on`keypress` instead of `keydown`
150
151
  if (!event.isComposing || event.which !== 229 && event.keyCode !== 229) {
151
152
  if (selectedIndex === -1) {
153
+ if (useBetterTypeaheadNavigation) {
154
+ /**
155
+ * TODO DTR-1401: (also see ED-17200) There are two options
156
+ * here, either
157
+ * - set the index directly to 1 in WrapperTypeAhead.tsx's
158
+ * `insertSelectedItem` at the cost of breaking some of the a11y
159
+ * focus changes,
160
+ * - or do this jank at the cost of some small analytics noise.
161
+ *
162
+ * The focus behaviour still needs cleanup
163
+ */
164
+ selectPreviousItem();
165
+ }
152
166
  selectNextItem();
153
167
  }
154
168
  onItemSelect(event.shiftKey ? _typeAhead.SelectItemMode.SHIFT_ENTER : _typeAhead.SelectItemMode.ENTER);
@@ -156,18 +170,41 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
156
170
  break;
157
171
  case 'Tab':
158
172
  if (selectedIndex === -1) {
173
+ if (useBetterTypeaheadNavigation) {
174
+ /**
175
+ * TODO DTR-1401: (also see ED-17200) There are two options
176
+ * here, either
177
+ * - set the index directly to 1 in WrapperTypeAhead.tsx's
178
+ * `insertSelectedItem` at the cost of breaking some of the a11y
179
+ * focus changes,
180
+ * - or do this jank at the cost of some small analytics noise.
181
+ *
182
+ */
183
+ selectPreviousItem();
184
+ }
159
185
  selectNextItem();
160
186
  }
187
+ // TODO DTR-1401: why is this calling select item when hitting tab? fix this in DTR-1401
161
188
  onItemSelect(_typeAhead.SelectItemMode.TAB);
162
189
  break;
163
190
  case 'ArrowDown':
164
- if (selectedIndex === -1) {
191
+ if (useBetterTypeaheadNavigation) {
165
192
  selectNextItem();
193
+ } else {
194
+ // TODO DTR-1401: why were we preventing selection?
195
+ if (selectedIndex === -1) {
196
+ selectNextItem();
197
+ }
166
198
  }
167
199
  break;
168
200
  case 'ArrowUp':
169
- if (selectedIndex === -1) {
201
+ if (useBetterTypeaheadNavigation) {
170
202
  selectPreviousItem();
203
+ } else {
204
+ // TODO DTR-1401: why were we preventing selection?
205
+ if (selectedIndex === -1) {
206
+ selectPreviousItem();
207
+ }
171
208
  }
172
209
  break;
173
210
  }
@@ -180,7 +217,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
180
217
  event.preventDefault();
181
218
  return false;
182
219
  }
183
- }, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state]);
220
+ }, [useBetterTypeaheadNavigation, onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state]);
184
221
  var onClick = (0, _react.useCallback)(function (event) {
185
222
  var _inputRef$current;
186
223
  event.stopPropagation();
@@ -185,6 +185,8 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
185
185
  selectPreviousItem();
186
186
  event.preventDefault();
187
187
  break;
188
+
189
+ // TODO DTR-1401: why is this calling item click when hitting tab? fix this in DTR-1401
188
190
  case 'Tab':
189
191
  //Tab key quick inserts the selected item.
190
192
  onItemClick(_typeAhead.SelectItemMode.TAB, selectedIndex);
@@ -29,7 +29,8 @@ var WrapperTypeAhead = /*#__PURE__*/_react.default.memo(function (_ref) {
29
29
  inputMethod = _ref.inputMethod,
30
30
  getDecorationPosition = _ref.getDecorationPosition,
31
31
  reopenQuery = _ref.reopenQuery,
32
- onUndoRedo = _ref.onUndoRedo;
32
+ onUndoRedo = _ref.onUndoRedo,
33
+ useBetterTypeaheadNavigation = _ref.useBetterTypeaheadNavigation;
33
34
  var _useState = (0, _react.useState)(false),
34
35
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
35
36
  closed = _useState2[0],
@@ -51,15 +52,17 @@ var WrapperTypeAhead = /*#__PURE__*/_react.default.memo(function (_ref) {
51
52
  var selectNextItem = (0, _react.useMemo)(function () {
52
53
  return (0, _utils.moveSelectedIndex)({
53
54
  editorView: editorView,
54
- direction: 'next'
55
+ direction: 'next',
56
+ useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
55
57
  });
56
- }, [editorView]);
58
+ }, [editorView, useBetterTypeaheadNavigation]);
57
59
  var selectPreviousItem = (0, _react.useMemo)(function () {
58
60
  return (0, _utils.moveSelectedIndex)({
59
61
  editorView: editorView,
60
- direction: 'previous'
62
+ direction: 'previous',
63
+ useBetterTypeaheadNavigation: useBetterTypeaheadNavigation
61
64
  });
62
- }, [editorView]);
65
+ }, [editorView, useBetterTypeaheadNavigation]);
63
66
  var cancel = (0, _react.useCallback)(function (_ref2) {
64
67
  var setSelectionAt = _ref2.setSelectionAt,
65
68
  addPrefixTrigger = _ref2.addPrefixTrigger,
@@ -110,6 +113,7 @@ var WrapperTypeAhead = /*#__PURE__*/_react.default.memo(function (_ref) {
110
113
  return null;
111
114
  }
112
115
  return /*#__PURE__*/_react.default.createElement(_InputQuery.InputQuery, {
116
+ useBetterTypeaheadNavigation: useBetterTypeaheadNavigation,
113
117
  triggerQueryPrefix: triggerHandler.trigger,
114
118
  onQueryChange: setQuery,
115
119
  onItemSelect: insertSelectedItem,
@@ -3,31 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.findTypeAheadDecorations = exports.findHandlerByTrigger = exports.findHandler = void 0;
7
- var _prosemirrorState = require("prosemirror-state");
8
- var _prosemirrorView = require("prosemirror-view");
6
+ exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.findHandlerByTrigger = exports.findHandler = void 0;
9
7
  var _typeAhead = require("@atlaskit/editor-common/type-ahead");
10
8
  var _key = require("./pm-plugins/key");
11
9
  var _updateSelectedIndex = require("./commands/update-selected-index");
12
10
  var _statsModifier = require("./stats-modifier");
13
11
  var _messages = require("./messages");
14
- var findTypeAheadDecorations = function findTypeAheadDecorations(state) {
15
- var selection = state.selection;
16
- var _typeAheadPluginKey$g = _key.pluginKey.getState(state),
17
- decorationSet = _typeAheadPluginKey$g.decorationSet;
18
- if (!decorationSet || decorationSet === _prosemirrorView.DecorationSet.empty || !(selection instanceof _prosemirrorState.TextSelection) || !selection.$cursor) {
19
- return null;
20
- }
21
- var pos = selection.$cursor.pos;
22
- var decoration = decorationSet.find(pos, pos, function (spec) {
23
- return spec === null || spec === void 0 ? void 0 : spec.isTypeAheadDecoration;
24
- });
25
- if (!decoration || decoration.length !== 1) {
26
- return null;
27
- }
28
- return decoration[0];
29
- };
30
- exports.findTypeAheadDecorations = findTypeAheadDecorations;
31
12
  var isTypeAheadHandler = function isTypeAheadHandler(handler) {
32
13
  return handler && Object.values(_typeAhead.TypeAheadAvailableNodes).includes(handler.id) && typeof handler.trigger === 'string' && typeof handler.selectItem === 'function' && typeof handler.getItems === 'function';
33
14
  };
@@ -35,8 +16,8 @@ var isTypeAheadHandler = function isTypeAheadHandler(handler) {
35
16
  /** Is a typeahead plugin open? */
36
17
  exports.isTypeAheadHandler = isTypeAheadHandler;
37
18
  var isTypeAheadOpen = function isTypeAheadOpen(editorState) {
38
- var _typeAheadPluginKey$g2, _typeAheadPluginKey$g3;
39
- return (_key.pluginKey === null || _key.pluginKey === void 0 ? void 0 : (_typeAheadPluginKey$g2 = _key.pluginKey.getState(editorState)) === null || _typeAheadPluginKey$g2 === void 0 ? void 0 : (_typeAheadPluginKey$g3 = _typeAheadPluginKey$g2.decorationSet) === null || _typeAheadPluginKey$g3 === void 0 ? void 0 : _typeAheadPluginKey$g3.find().length) > 0;
19
+ var _typeAheadPluginKey$g, _typeAheadPluginKey$g2;
20
+ return (_key.pluginKey === null || _key.pluginKey === void 0 ? void 0 : (_typeAheadPluginKey$g = _key.pluginKey.getState(editorState)) === null || _typeAheadPluginKey$g === void 0 ? void 0 : (_typeAheadPluginKey$g2 = _typeAheadPluginKey$g.decorationSet) === null || _typeAheadPluginKey$g2 === void 0 ? void 0 : _typeAheadPluginKey$g2.find().length) > 0;
40
21
  };
41
22
  exports.isTypeAheadOpen = isTypeAheadOpen;
42
23
  var getPluginState = function getPluginState(editorState) {
@@ -84,7 +65,8 @@ var findHandlerByTrigger = function findHandlerByTrigger(_ref) {
84
65
  exports.findHandlerByTrigger = findHandlerByTrigger;
85
66
  var moveSelectedIndex = function moveSelectedIndex(_ref2) {
86
67
  var editorView = _ref2.editorView,
87
- direction = _ref2.direction;
68
+ direction = _ref2.direction,
69
+ useBetterTypeaheadNavigation = _ref2.useBetterTypeaheadNavigation;
88
70
  return function () {
89
71
  var typeAheadState = getPluginState(editorView.state);
90
72
  if (!typeAheadState) {
@@ -96,7 +78,26 @@ var moveSelectedIndex = function moveSelectedIndex(_ref2) {
96
78
  var nextIndex;
97
79
  if (direction === 'next') {
98
80
  stats.increaseArrowDown();
99
- nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
81
+ if (useBetterTypeaheadNavigation) {
82
+ /**
83
+ * See: https://product-fabric.atlassian.net/browse/ED-17200
84
+ * `selectedIndex` is forced to -1 now to not immediately focus the typeahead
85
+ * and only do so when there is explicit logic to focus into the typeahead
86
+ * options.
87
+ *
88
+ * This check for "set index to 1 when -1"
89
+ * - is a temporary workaround to get back the previous behaviour without
90
+ * entirely reverting the a11y improvements
91
+ *
92
+ */
93
+ if (selectedIndex === -1 && items.length > 1) {
94
+ nextIndex = 1;
95
+ } else {
96
+ nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
97
+ }
98
+ } else {
99
+ nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
100
+ }
100
101
  } else {
101
102
  stats.increaseArrowUp();
102
103
  nextIndex = selectedIndex <= 0 ? items.length - 1 : selectedIndex - 1;
@@ -28,12 +28,6 @@ Object.defineProperty(exports, "PortalProviderAPI", {
28
28
  return _PortalProvider.PortalProviderAPI;
29
29
  }
30
30
  });
31
- Object.defineProperty(exports, "Preset", {
32
- enumerable: true,
33
- get: function get() {
34
- return _preset.Preset;
35
- }
36
- });
37
31
  exports.createPMSchemaAndPlugins = void 0;
38
32
  Object.defineProperty(exports, "createTypeAheadTools", {
39
33
  enumerable: true,
@@ -48,11 +42,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
48
42
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
49
43
  var _prosemirrorState = require("prosemirror-state");
50
44
  var _sortByOrder = require("./create-editor/sort-by-order");
51
- var _preset = require("./labs/next/presets/preset");
52
45
  var _createSchema = require("./create-editor/create-schema");
53
46
  var _base = _interopRequireDefault(require("./plugins/base"));
54
47
  var _pluginKey = require("./plugins/analytics/plugin-key");
55
48
  var _api = require("./plugins/type-ahead/api");
49
+ var _preset = require("@atlaskit/editor-common/preset");
56
50
  var _PortalProvider = require("./ui/PortalProvider");
57
51
  var _eventDispatcher = require("./event-dispatcher");
58
52
  var _selection = require("./plugins/selection/gap-cursor/selection");
@@ -106,13 +100,11 @@ function lightProcessPluginsList(editorPlugins) {
106
100
  });
107
101
  }
108
102
  var createPMSchemaAndPlugins = function createPMSchemaAndPlugins() {
109
- var preset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _preset.Preset();
103
+ var inputPreset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _preset.EditorPresetBuilder();
110
104
  return function (pluginFactoryParams) {
111
105
  var editorPlugins = [];
112
- if (!preset.has(_base.default)) {
113
- preset.add(_base.default);
114
- }
115
- editorPlugins = preset.getEditorPlugins();
106
+ var preset = inputPreset.has(_base.default) ? inputPreset : inputPreset.add(_base.default);
107
+ editorPlugins = preset.build();
116
108
  var editorConfig = lightProcessPluginsList(editorPlugins);
117
109
  var schema = (0, _createSchema.createSchema)(editorConfig);
118
110
  var plugins = editorConfig.plugins.sort((0, _sortByOrder.sortByOrder)('plugins')).map(function (_ref) {
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
4
+ var _typeof3 = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.mainToolbarCustomComponentsSlotStyle = exports.TableControlsPadding = exports.MainToolbar = void 0;
9
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
11
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
12
  var _react = _interopRequireWildcard(require("react"));
@@ -15,7 +16,7 @@ var _colors = require("@atlaskit/theme/colors");
15
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
17
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
17
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
20
  var TableControlsPadding = 20;
20
21
  exports.TableControlsPadding = TableControlsPadding;
21
22
  var mainToolbarWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)(), "var(--ds-surface, white)", TableControlsPadding);
@@ -25,10 +26,18 @@ var StickyToolbar = function StickyToolbar(props) {
25
26
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
26
27
  top = _useState2[0],
27
28
  setTop = _useState2[1];
29
+
30
+ // ED-15802: if externalToolbarRef is passed in, set top to externalToolbarRef?.current?.clientHeight
31
+ // else if offsetTop is a number set top to offsetTop
32
+ // otherwise top is 0 as initial state
28
33
  (0, _react.useEffect)(function () {
29
34
  var _props$externalToolba, _props$externalToolba2;
30
- setTop(((_props$externalToolba = props.externalToolbarRef) === null || _props$externalToolba === void 0 ? void 0 : (_props$externalToolba2 = _props$externalToolba.current) === null || _props$externalToolba2 === void 0 ? void 0 : _props$externalToolba2.clientHeight) || 0);
31
- }, [setTop, props.externalToolbarRef]);
35
+ if ((_props$externalToolba = props.externalToolbarRef) !== null && _props$externalToolba !== void 0 && (_props$externalToolba2 = _props$externalToolba.current) !== null && _props$externalToolba2 !== void 0 && _props$externalToolba2.clientHeight) {
36
+ setTop(props.externalToolbarRef.current.clientHeight);
37
+ } else {
38
+ setTop(props.offsetTop || 0);
39
+ }
40
+ }, [props.externalToolbarRef, props.offsetTop]);
32
41
  return (0, _react2.jsx)("div", {
33
42
  css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n top: ", "px;\n "])), top)],
34
43
  "data-testid": "ak-editor-main-toolbar",
@@ -41,13 +50,39 @@ var FixedToolbar = function FixedToolbar(props) {
41
50
  "data-testid": "ak-editor-main-toolbar"
42
51
  }, props.children);
43
52
  };
53
+
54
+ /**
55
+ * ED-15802: Scenarios when a sticky bar is used:
56
+ * 1. useStickyToolbar is true
57
+ * 2. useStickyToolbar is a DOM element
58
+ * 3. useStickyToolbar is an object and has offsetTop key;
59
+ */
60
+ var getStickyParameters = function getStickyParameters(configuration) {
61
+ // const isUsingStickyOffset, isHTMLElement is used so TS can properly infer types.
62
+ var isHTMLElement = (0, _typeof2.default)(configuration) === 'object' && !('offsetTop' in configuration);
63
+ var isUsingStickyOffset = (0, _typeof2.default)(configuration) === 'object' && 'offsetTop' in configuration;
64
+ if ((0, _typeof2.default)(configuration) !== 'object') {
65
+ return {
66
+ externalToolbarRef: undefined,
67
+ offsetTop: undefined
68
+ };
69
+ }
70
+ if (isUsingStickyOffset) {
71
+ return {
72
+ offsetTop: configuration.offsetTop
73
+ };
74
+ }
75
+ if (isHTMLElement) {
76
+ return {
77
+ externalToolbarRef: configuration
78
+ };
79
+ }
80
+ };
44
81
  var MainToolbar = function MainToolbar(_ref) {
45
82
  var useStickyToolbar = _ref.useStickyToolbar,
46
83
  children = _ref.children;
47
- if (!!useStickyToolbar) {
48
- return (0, _react2.jsx)(StickyToolbar, {
49
- externalToolbarRef: typeof useStickyToolbar === 'boolean' ? undefined : useStickyToolbar
50
- }, children);
84
+ if (useStickyToolbar) {
85
+ return (0, _react2.jsx)(StickyToolbar, getStickyParameters(useStickyToolbar), children);
51
86
  }
52
87
  return (0, _react2.jsx)(FixedToolbar, null, children);
53
88
  };
@@ -3,7 +3,25 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "ColorPalette", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _uiColor.ColorPalette;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "backgroundPaletteTooltipMessages", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _uiColor.backgroundPaletteTooltipMessages;
16
+ }
17
+ });
6
18
  exports.default = void 0;
19
+ Object.defineProperty(exports, "textPaletteTooltipMessages", {
20
+ enumerable: true,
21
+ get: function get() {
22
+ return _uiColor.textPaletteTooltipMessages;
23
+ }
24
+ });
7
25
  var _uiColor = require("@atlaskit/editor-common/ui-color");
8
26
  var _default = _uiColor.ColorPalette;
9
27
  exports.default = _default;
@@ -143,13 +143,17 @@ var ColorPickerButton = function ColorPickerButton(props) {
143
143
  isOpenedByKeyboard: isOpenedByKeyboard,
144
144
  isPopupPositioned: isPopupPositioned
145
145
  }, (0, _react2.jsx)(ColorPaletteWithListeners, {
146
- palette: props.colorPalette,
147
146
  cols: props.cols,
148
147
  selectedColor: selectedColor,
149
148
  onClick: onColorSelected,
150
149
  handleClickOutside: togglePopup,
151
150
  handleEscapeKeydown: handleEsc,
152
- hexToPaletteColor: props.hexToPaletteColor
151
+ paletteOptions: {
152
+ palette: props.colorPalette,
153
+ hexToPaletteColor: props.hexToPaletteColor,
154
+ showSomewhatSemanticTooltips: props.showSomewhatSemanticTooltips,
155
+ paletteColorTooltipMessages: props.paletteColorTooltipMessages
156
+ }
153
157
  }))));
154
158
  };
155
159
  var title = props.title || '';
@@ -40,6 +40,7 @@ function Expand(_ref) {
40
40
  expanded = _useState2[0],
41
41
  setExpanded = _useState2[1];
42
42
  return (0, _react2.jsx)("div", {
43
+ "data-testid": "expand-config-field",
43
44
  css: expandContainer
44
45
  }, (0, _react2.jsx)("div", {
45
46
  css: expandControl