@atlaskit/editor-core 188.8.0 → 188.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/composable-editor/editor-internal.js +2 -2
  3. package/dist/cjs/create-editor/ReactEditorView.js +796 -8
  4. package/dist/cjs/labs/next/presets/default.js +2 -2
  5. package/dist/cjs/labs/next/presets/universal.js +7 -4
  6. package/dist/cjs/plugins/index.js +0 -28
  7. package/dist/cjs/plugins/insert-block/index.js +4 -6
  8. package/dist/cjs/plugins/tasks-and-decisions/index.js +4 -3
  9. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
  10. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -13
  11. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +15 -7
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/composable-editor/editor-internal.js +1 -1
  14. package/dist/es2019/create-editor/ReactEditorView.js +753 -2
  15. package/dist/es2019/labs/next/presets/default.js +1 -1
  16. package/dist/es2019/labs/next/presets/universal.js +4 -1
  17. package/dist/es2019/plugins/index.js +0 -4
  18. package/dist/es2019/plugins/insert-block/index.js +4 -6
  19. package/dist/es2019/plugins/tasks-and-decisions/index.js +4 -3
  20. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
  21. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +43 -10
  22. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +13 -6
  23. package/dist/es2019/version-wrapper.js +1 -1
  24. package/dist/esm/composable-editor/editor-internal.js +1 -1
  25. package/dist/esm/create-editor/ReactEditorView.js +797 -8
  26. package/dist/esm/labs/next/presets/default.js +1 -1
  27. package/dist/esm/labs/next/presets/universal.js +4 -1
  28. package/dist/esm/plugins/index.js +0 -4
  29. package/dist/esm/plugins/insert-block/index.js +4 -6
  30. package/dist/esm/plugins/tasks-and-decisions/index.js +4 -3
  31. package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
  32. package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -12
  33. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +14 -7
  34. package/dist/esm/version-wrapper.js +1 -1
  35. package/dist/types/create-editor/ReactEditorView.d.ts +119 -5
  36. package/dist/types/labs/next/presets/default.d.ts +43 -43
  37. package/dist/types/plugins/index.d.ts +0 -4
  38. package/dist/types/plugins/insert-block/types.d.ts +3 -1
  39. package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -5
  40. package/dist/types/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
  41. package/dist/types/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
  42. package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
  43. package/dist/types/plugins/tasks-and-decisions/types.d.ts +6 -1
  44. package/dist/types/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
  45. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +119 -5
  46. package/dist/types-ts4.5/labs/next/presets/default.d.ts +43 -43
  47. package/dist/types-ts4.5/plugins/index.d.ts +0 -4
  48. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
  49. package/dist/types-ts4.5/plugins/tasks-and-decisions/index.d.ts +2 -5
  50. package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
  51. package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
  52. package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
  53. package/dist/types-ts4.5/plugins/tasks-and-decisions/types.d.ts +8 -1
  54. package/dist/types-ts4.5/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
  55. package/package.json +7 -7
  56. package/dist/cjs/create-editor/ReactEditorViewInternal.js +0 -812
  57. package/dist/cjs/create-editor/ReactEditorViewNext.js +0 -15
  58. package/dist/cjs/plugins/save-on-enter/index.js +0 -70
  59. package/dist/cjs/plugins/scroll-into-view/index.js +0 -55
  60. package/dist/cjs/plugins/status/actions.js +0 -158
  61. package/dist/cjs/plugins/status/analytics.js +0 -31
  62. package/dist/cjs/plugins/status/index.js +0 -143
  63. package/dist/cjs/plugins/status/keymap.js +0 -22
  64. package/dist/cjs/plugins/status/nodeviews/status.js +0 -58
  65. package/dist/cjs/plugins/status/plugin-key.js +0 -9
  66. package/dist/cjs/plugins/status/plugin.js +0 -133
  67. package/dist/cjs/plugins/status/types.js +0 -5
  68. package/dist/cjs/plugins/status/ui/statusPicker.js +0 -314
  69. package/dist/cjs/plugins/status/utils.js +0 -22
  70. package/dist/cjs/plugins/type-ahead/api.js +0 -215
  71. package/dist/cjs/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -205
  72. package/dist/cjs/plugins/type-ahead/commands/update-list-items.js +0 -23
  73. package/dist/cjs/plugins/type-ahead/commands/update-query.js +0 -27
  74. package/dist/cjs/plugins/type-ahead/commands/update-selected-index.js +0 -27
  75. package/dist/cjs/plugins/type-ahead/constants.js +0 -15
  76. package/dist/cjs/plugins/type-ahead/index.js +0 -14
  77. package/dist/cjs/plugins/type-ahead/insert-utils.js +0 -107
  78. package/dist/cjs/plugins/type-ahead/messages.js +0 -79
  79. package/dist/cjs/plugins/type-ahead/plugin.js +0 -382
  80. package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +0 -16
  81. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +0 -148
  82. package/dist/cjs/plugins/type-ahead/pm-plugins/input-rules.js +0 -36
  83. package/dist/cjs/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -22
  84. package/dist/cjs/plugins/type-ahead/pm-plugins/key.js +0 -8
  85. package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +0 -110
  86. package/dist/cjs/plugins/type-ahead/pm-plugins/reducer.js +0 -158
  87. package/dist/cjs/plugins/type-ahead/pm-plugins/utils.js +0 -18
  88. package/dist/cjs/plugins/type-ahead/stats-modifier.js +0 -42
  89. package/dist/cjs/plugins/type-ahead/transforms/close-type-ahead.js +0 -13
  90. package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -75
  91. package/dist/cjs/plugins/type-ahead/transforms/set-selection-before-query.js +0 -18
  92. package/dist/cjs/plugins/type-ahead/types.js +0 -5
  93. package/dist/cjs/plugins/type-ahead/ui/AssistiveText.js +0 -120
  94. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +0 -400
  95. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +0 -285
  96. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +0 -179
  97. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +0 -230
  98. package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -127
  99. package/dist/cjs/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -109
  100. package/dist/cjs/plugins/type-ahead/ui/hooks/use-load-items.js +0 -50
  101. package/dist/cjs/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -41
  102. package/dist/cjs/plugins/type-ahead/utils.js +0 -130
  103. package/dist/es2019/create-editor/ReactEditorViewInternal.js +0 -753
  104. package/dist/es2019/create-editor/ReactEditorViewNext.js +0 -7
  105. package/dist/es2019/plugins/save-on-enter/index.js +0 -63
  106. package/dist/es2019/plugins/scroll-into-view/index.js +0 -44
  107. package/dist/es2019/plugins/status/actions.js +0 -144
  108. package/dist/es2019/plugins/status/analytics.js +0 -18
  109. package/dist/es2019/plugins/status/index.js +0 -135
  110. package/dist/es2019/plugins/status/keymap.js +0 -13
  111. package/dist/es2019/plugins/status/nodeviews/status.js +0 -60
  112. package/dist/es2019/plugins/status/plugin-key.js +0 -3
  113. package/dist/es2019/plugins/status/plugin.js +0 -113
  114. package/dist/es2019/plugins/status/types.js +0 -1
  115. package/dist/es2019/plugins/status/ui/statusPicker.js +0 -293
  116. package/dist/es2019/plugins/status/utils.js +0 -12
  117. package/dist/es2019/plugins/type-ahead/api.js +0 -205
  118. package/dist/es2019/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -204
  119. package/dist/es2019/plugins/type-ahead/commands/update-list-items.js +0 -17
  120. package/dist/es2019/plugins/type-ahead/commands/update-query.js +0 -21
  121. package/dist/es2019/plugins/type-ahead/commands/update-selected-index.js +0 -21
  122. package/dist/es2019/plugins/type-ahead/constants.js +0 -9
  123. package/dist/es2019/plugins/type-ahead/index.js +0 -3
  124. package/dist/es2019/plugins/type-ahead/insert-utils.js +0 -106
  125. package/dist/es2019/plugins/type-ahead/messages.js +0 -73
  126. package/dist/es2019/plugins/type-ahead/plugin.js +0 -381
  127. package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +0 -10
  128. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -148
  129. package/dist/es2019/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
  130. package/dist/es2019/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
  131. package/dist/es2019/plugins/type-ahead/pm-plugins/key.js +0 -2
  132. package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +0 -106
  133. package/dist/es2019/plugins/type-ahead/pm-plugins/reducer.js +0 -160
  134. package/dist/es2019/plugins/type-ahead/pm-plugins/utils.js +0 -12
  135. package/dist/es2019/plugins/type-ahead/stats-modifier.js +0 -33
  136. package/dist/es2019/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
  137. package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -71
  138. package/dist/es2019/plugins/type-ahead/transforms/set-selection-before-query.js +0 -10
  139. package/dist/es2019/plugins/type-ahead/types.js +0 -1
  140. package/dist/es2019/plugins/type-ahead/ui/AssistiveText.js +0 -88
  141. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +0 -393
  142. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +0 -273
  143. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +0 -214
  144. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +0 -233
  145. package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -109
  146. package/dist/es2019/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -112
  147. package/dist/es2019/plugins/type-ahead/ui/hooks/use-load-items.js +0 -41
  148. package/dist/es2019/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -38
  149. package/dist/es2019/plugins/type-ahead/utils.js +0 -126
  150. package/dist/esm/create-editor/ReactEditorViewInternal.js +0 -806
  151. package/dist/esm/create-editor/ReactEditorViewNext.js +0 -7
  152. package/dist/esm/plugins/save-on-enter/index.js +0 -63
  153. package/dist/esm/plugins/scroll-into-view/index.js +0 -50
  154. package/dist/esm/plugins/status/actions.js +0 -151
  155. package/dist/esm/plugins/status/analytics.js +0 -24
  156. package/dist/esm/plugins/status/index.js +0 -136
  157. package/dist/esm/plugins/status/keymap.js +0 -15
  158. package/dist/esm/plugins/status/nodeviews/status.js +0 -51
  159. package/dist/esm/plugins/status/plugin-key.js +0 -3
  160. package/dist/esm/plugins/status/plugin.js +0 -115
  161. package/dist/esm/plugins/status/types.js +0 -1
  162. package/dist/esm/plugins/status/ui/statusPicker.js +0 -308
  163. package/dist/esm/plugins/status/utils.js +0 -16
  164. package/dist/esm/plugins/type-ahead/api.js +0 -209
  165. package/dist/esm/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -198
  166. package/dist/esm/plugins/type-ahead/commands/update-list-items.js +0 -17
  167. package/dist/esm/plugins/type-ahead/commands/update-query.js +0 -21
  168. package/dist/esm/plugins/type-ahead/commands/update-selected-index.js +0 -21
  169. package/dist/esm/plugins/type-ahead/constants.js +0 -9
  170. package/dist/esm/plugins/type-ahead/index.js +0 -3
  171. package/dist/esm/plugins/type-ahead/insert-utils.js +0 -101
  172. package/dist/esm/plugins/type-ahead/messages.js +0 -73
  173. package/dist/esm/plugins/type-ahead/plugin.js +0 -374
  174. package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +0 -10
  175. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -141
  176. package/dist/esm/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
  177. package/dist/esm/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
  178. package/dist/esm/plugins/type-ahead/pm-plugins/key.js +0 -2
  179. package/dist/esm/plugins/type-ahead/pm-plugins/main.js +0 -104
  180. package/dist/esm/plugins/type-ahead/pm-plugins/reducer.js +0 -151
  181. package/dist/esm/plugins/type-ahead/pm-plugins/utils.js +0 -12
  182. package/dist/esm/plugins/type-ahead/stats-modifier.js +0 -35
  183. package/dist/esm/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
  184. package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -69
  185. package/dist/esm/plugins/type-ahead/transforms/set-selection-before-query.js +0 -12
  186. package/dist/esm/plugins/type-ahead/types.js +0 -1
  187. package/dist/esm/plugins/type-ahead/ui/AssistiveText.js +0 -115
  188. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +0 -390
  189. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +0 -276
  190. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +0 -169
  191. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +0 -220
  192. package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -117
  193. package/dist/esm/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -103
  194. package/dist/esm/plugins/type-ahead/ui/hooks/use-load-items.js +0 -43
  195. package/dist/esm/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -35
  196. package/dist/esm/plugins/type-ahead/utils.js +0 -124
  197. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -119
  198. package/dist/types/create-editor/ReactEditorViewNext.d.ts +0 -8
  199. package/dist/types/plugins/save-on-enter/index.d.ts +0 -10
  200. package/dist/types/plugins/scroll-into-view/index.d.ts +0 -14
  201. package/dist/types/plugins/status/actions.d.ts +0 -16
  202. package/dist/types/plugins/status/analytics.d.ts +0 -4
  203. package/dist/types/plugins/status/index.d.ts +0 -15
  204. package/dist/types/plugins/status/keymap.d.ts +0 -3
  205. package/dist/types/plugins/status/nodeviews/status.d.ts +0 -25
  206. package/dist/types/plugins/status/plugin-key.d.ts +0 -4
  207. package/dist/types/plugins/status/plugin.d.ts +0 -7
  208. package/dist/types/plugins/status/types.d.ts +0 -18
  209. package/dist/types/plugins/status/ui/statusPicker.d.ts +0 -63
  210. package/dist/types/plugins/status/utils.d.ts +0 -5
  211. package/dist/types/plugins/type-ahead/api.d.ts +0 -61
  212. package/dist/types/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
  213. package/dist/types/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
  214. package/dist/types/plugins/type-ahead/commands/update-query.d.ts +0 -2
  215. package/dist/types/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
  216. package/dist/types/plugins/type-ahead/constants.d.ts +0 -8
  217. package/dist/types/plugins/type-ahead/index.d.ts +0 -4
  218. package/dist/types/plugins/type-ahead/insert-utils.d.ts +0 -18
  219. package/dist/types/plugins/type-ahead/messages.d.ts +0 -72
  220. package/dist/types/plugins/type-ahead/plugin.d.ts +0 -10
  221. package/dist/types/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
  222. package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
  223. package/dist/types/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
  224. package/dist/types/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
  225. package/dist/types/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
  226. package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
  227. package/dist/types/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
  228. package/dist/types/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
  229. package/dist/types/plugins/type-ahead/stats-modifier.d.ts +0 -20
  230. package/dist/types/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
  231. package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
  232. package/dist/types/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
  233. package/dist/types/plugins/type-ahead/types.d.ts +0 -109
  234. package/dist/types/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
  235. package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
  236. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
  237. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
  238. package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
  239. package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
  240. package/dist/types/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -3
  241. package/dist/types/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
  242. package/dist/types/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
  243. package/dist/types/plugins/type-ahead/utils.d.ts +0 -27
  244. package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -119
  245. package/dist/types-ts4.5/create-editor/ReactEditorViewNext.d.ts +0 -8
  246. package/dist/types-ts4.5/plugins/save-on-enter/index.d.ts +0 -10
  247. package/dist/types-ts4.5/plugins/scroll-into-view/index.d.ts +0 -14
  248. package/dist/types-ts4.5/plugins/status/actions.d.ts +0 -16
  249. package/dist/types-ts4.5/plugins/status/analytics.d.ts +0 -4
  250. package/dist/types-ts4.5/plugins/status/index.d.ts +0 -17
  251. package/dist/types-ts4.5/plugins/status/keymap.d.ts +0 -3
  252. package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +0 -25
  253. package/dist/types-ts4.5/plugins/status/plugin-key.d.ts +0 -4
  254. package/dist/types-ts4.5/plugins/status/plugin.d.ts +0 -7
  255. package/dist/types-ts4.5/plugins/status/types.d.ts +0 -18
  256. package/dist/types-ts4.5/plugins/status/ui/statusPicker.d.ts +0 -63
  257. package/dist/types-ts4.5/plugins/status/utils.d.ts +0 -5
  258. package/dist/types-ts4.5/plugins/type-ahead/api.d.ts +0 -61
  259. package/dist/types-ts4.5/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
  260. package/dist/types-ts4.5/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
  261. package/dist/types-ts4.5/plugins/type-ahead/commands/update-query.d.ts +0 -2
  262. package/dist/types-ts4.5/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
  263. package/dist/types-ts4.5/plugins/type-ahead/constants.d.ts +0 -8
  264. package/dist/types-ts4.5/plugins/type-ahead/index.d.ts +0 -4
  265. package/dist/types-ts4.5/plugins/type-ahead/insert-utils.d.ts +0 -18
  266. package/dist/types-ts4.5/plugins/type-ahead/messages.d.ts +0 -72
  267. package/dist/types-ts4.5/plugins/type-ahead/plugin.d.ts +0 -10
  268. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
  269. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
  270. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
  271. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
  272. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
  273. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
  274. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
  275. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
  276. package/dist/types-ts4.5/plugins/type-ahead/stats-modifier.d.ts +0 -20
  277. package/dist/types-ts4.5/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
  278. package/dist/types-ts4.5/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
  279. package/dist/types-ts4.5/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
  280. package/dist/types-ts4.5/plugins/type-ahead/types.d.ts +0 -111
  281. package/dist/types-ts4.5/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
  282. package/dist/types-ts4.5/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
  283. package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
  284. package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
  285. package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
  286. package/dist/types-ts4.5/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
  287. package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -7
  288. package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
  289. package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
  290. package/dist/types-ts4.5/plugins/type-ahead/utils.d.ts +0 -27
@@ -10,7 +10,7 @@ import { unsupportedContentPlugin } from '@atlaskit/editor-plugin-unsupported-co
10
10
  import { basePlugin } from '@atlaskit/editor-plugin-base';
11
11
  import { focusPlugin } from '@atlaskit/editor-plugin-focus';
12
12
  import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
13
- import typeAheadPlugin from '../../../plugins/type-ahead';
13
+ import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
14
14
  import submitEditorPlugin from '../../../plugins/submit-editor';
15
15
  import fakeTextCursorPlugin from '../../../plugins/fake-text-cursor';
16
16
  import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
@@ -1,4 +1,5 @@
1
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
1
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../../../plugins';
2
+ import { statusPlugin } from '@atlaskit/editor-plugin-status';
2
3
  import { datePlugin } from '../../../plugins/date';
3
4
  import { captionPlugin } from '@atlaskit/editor-plugin-caption';
4
5
  import { borderPlugin } from '@atlaskit/editor-plugin-border';
@@ -15,6 +16,8 @@ import { cardPlugin } from '@atlaskit/editor-plugin-card';
15
16
  import { tablesPlugin } from '@atlaskit/editor-plugin-table';
16
17
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
17
18
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
19
+ import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
20
+ import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
18
21
  import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
19
22
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
20
23
  import { createDefaultPreset } from './default';
@@ -15,12 +15,9 @@ export { default as mentionsPlugin } from './mentions';
15
15
  export { default as panelPlugin } from './panel';
16
16
  export { default as pastePlugin } from './paste';
17
17
  export { default as placeholderTextPlugin } from './placeholder-text';
18
- export { default as saveOnEnterPlugin } from './save-on-enter';
19
18
  export { default as submitEditorPlugin } from './submit-editor';
20
19
  export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
21
20
  export { default as textColorPlugin } from './text-color';
22
- export { default as typeAheadPlugin } from './type-ahead';
23
- export { default as statusPlugin } from './status';
24
21
  export { default as breakoutPlugin } from './breakout';
25
22
  export { default as alignmentPlugin } from './alignment';
26
23
  export { default as dataConsumerMarkPlugin } from './data-consumer';
@@ -32,7 +29,6 @@ export { default as customAutoformatPlugin } from './custom-autoformat';
32
29
  export { default as feedbackDialogPlugin } from './feedback-dialog';
33
30
  export { default as historyPlugin } from './history';
34
31
  export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
35
- export { default as scrollIntoViewPlugin } from './scroll-into-view';
36
32
  export { default as mobileDimensionsPlugin } from './mobile-dimensions';
37
33
  export { default as findReplacePlugin } from './find-replace';
38
34
  export { default as mobileSelectionPlugin } from './mobile-selection';
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
2
  import { WithProviders } from '@atlaskit/editor-common/provider-factory';
3
- import { isTypeAheadAllowed } from '../type-ahead/utils';
4
3
  import { pluginKey as layoutStateKey } from '../layout';
5
4
  import { insertMacroFromMacroBrowser } from '../macro';
6
5
  import WithPluginState from '../../ui/WithPluginState';
7
6
  import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
8
- import { pluginKey as typeAheadPluginKey } from '../type-ahead/pm-plugins/key';
9
7
  import { BLOCK_QUOTE, CODE_BLOCK, PANEL } from '@atlaskit/editor-plugin-block-type/consts';
10
8
  import { INPUT_METHOD } from '../analytics';
11
9
  import { pluginKey as placeholderTextStateKey } from '../placeholder-text/plugin-key';
@@ -69,7 +67,6 @@ const insertBlockPlugin = ({
69
67
  // `ToolbarInsertBlockWithInjectionApi` and remove `WithPluginState`
70
68
  return /*#__PURE__*/React.createElement(WithPluginState, {
71
69
  plugins: {
72
- typeAheadState: typeAheadPluginKey,
73
70
  macroState: macroStateKey,
74
71
  placeholderTextState: placeholderTextStateKey,
75
72
  layoutState: layoutStateKey
@@ -138,14 +135,15 @@ function ToolbarInsertBlockWithInjectionApi({
138
135
  mentionState,
139
136
  emojiState,
140
137
  blockTypeState,
141
- mediaState
142
- } = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media']);
138
+ mediaState,
139
+ typeAheadState
140
+ } = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload', 'mention', 'emoji', 'blockType', 'media', 'typeAhead']);
143
141
  return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
144
142
  pluginInjectionApi: pluginInjectionApi,
145
143
  buttons: buttons,
146
144
  isReducedSpacing: isToolbarReducedSpacing,
147
145
  isDisabled: disabled,
148
- isTypeAheadAllowed: isTypeAheadAllowed(editorView.state),
146
+ isTypeAheadAllowed: Boolean(typeAheadState === null || typeAheadState === void 0 ? void 0 : typeAheadState.isAllowed),
149
147
  editorView: editorView,
150
148
  tableSupported: !!editorView.state.schema.nodes.table,
151
149
  actionSupported: !!editorView.state.schema.nodes.taskItem,
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { css, jsx } from '@emotion/react';
3
3
  import { decisionItem, decisionList, taskItem, taskList } from '@atlaskit/adf-schema';
4
- import { INPUT_METHOD } from '../analytics';
4
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  import { messages as insertBlockMessages } from '../insert-block/ui/ToolbarInsertBlock/messages';
6
6
  import { IconAction, IconDecision } from '@atlaskit/editor-common/quick-insert';
7
7
  import { insertTaskDecisionAction, getListTypes } from './commands';
@@ -32,7 +32,8 @@ const tasksAndDecisionsPlugin = ({
32
32
  allowNestedTasks,
33
33
  consumeTabs,
34
34
  useLongPressSelection
35
- } = {}
35
+ } = {},
36
+ api
36
37
  }) => ({
37
38
  name: 'taskDecision',
38
39
  nodes() {
@@ -59,7 +60,7 @@ const tasksAndDecisionsPlugin = ({
59
60
  eventDispatcher,
60
61
  dispatch
61
62
  }) => {
62
- return createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, useLongPressSelection);
63
+ return createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, api, useLongPressSelection);
63
64
  }
64
65
  }, {
65
66
  name: 'tasksAndDecisionsInputRule',
@@ -1,11 +1,29 @@
1
1
  import React from 'react';
2
2
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
3
+ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
3
4
  import DecisionItem from '../ui/Decision';
4
- import { isTypeAheadOpen } from '../../type-ahead/utils';
5
+ const DecisionItemWrapper = ({
6
+ api,
7
+ forwardRef,
8
+ isContentNodeEmpty
9
+ }) => {
10
+ const {
11
+ typeAheadState
12
+ } = useSharedPluginState(api, ['typeAhead']);
13
+ return /*#__PURE__*/React.createElement(DecisionItem, {
14
+ contentRef: forwardRef,
15
+ showPlaceholder: isContentNodeEmpty && !(typeAheadState !== null && typeAheadState !== void 0 && typeAheadState.isOpen)
16
+ });
17
+ };
5
18
  class Decision extends ReactNodeView {
6
19
  isContentEmpty(node) {
7
20
  return node.content.childCount === 0;
8
21
  }
22
+ initWithAPI(api) {
23
+ this.init();
24
+ this.api = api;
25
+ return this;
26
+ }
9
27
  createDomRef() {
10
28
  const domRef = document.createElement('li');
11
29
  domRef.style['list-style-type'] = 'none';
@@ -21,9 +39,11 @@ class Decision extends ReactNodeView {
21
39
  };
22
40
  }
23
41
  render(_props, forwardRef) {
24
- return /*#__PURE__*/React.createElement(DecisionItem, {
25
- contentRef: forwardRef,
26
- showPlaceholder: this.isContentEmpty(this.node) && !isTypeAheadOpen(this.view.state)
42
+ const isContentNodeEmpty = this.isContentEmpty(this.node);
43
+ return /*#__PURE__*/React.createElement(DecisionItemWrapper, {
44
+ forwardRef: forwardRef,
45
+ isContentNodeEmpty: isContentNodeEmpty,
46
+ api: this.api
27
47
  });
28
48
  }
29
49
  viewShouldUpdate(nextNode) {
@@ -40,7 +60,7 @@ class Decision extends ReactNodeView {
40
60
  (_currentNode, _newNode) => !this.isContentEmpty(_newNode));
41
61
  }
42
62
  }
43
- export const decisionItemNodeView = (portalProviderAPI, eventDispatcher) => (node, view, getPos) => {
63
+ export const decisionItemNodeView = (portalProviderAPI, eventDispatcher, api) => (node, view, getPos) => {
44
64
  const hasIntlContext = true;
45
- return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).init();
65
+ return new Decision(node, view, getPos, portalProviderAPI, eventDispatcher, {}, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
46
66
  };
@@ -2,11 +2,37 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { AnalyticsListener } from '@atlaskit/analytics-next';
4
4
  import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
5
+ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
5
6
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
6
- import WithPluginState from '../../../ui/WithPluginState';
7
+ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
7
8
  import { stateKey as taskPluginKey } from '../pm-plugins/plugin-key';
8
9
  import TaskItem from '../ui/Task';
9
- import { isTypeAheadOpen } from '../../type-ahead/utils';
10
+
11
+ //import { isTypeAheadOpen } from '../../type-ahead/utils';
12
+
13
+ const TaskItemWrapper = ({
14
+ localId,
15
+ forwardRef,
16
+ isDone,
17
+ onChange,
18
+ isFocused,
19
+ isContentNodeEmpty,
20
+ providerFactory,
21
+ api
22
+ }) => {
23
+ const {
24
+ typeAheadState
25
+ } = useSharedPluginState(api, ['typeAhead']);
26
+ return /*#__PURE__*/React.createElement(TaskItem, {
27
+ taskId: localId,
28
+ contentRef: forwardRef,
29
+ isDone: isDone,
30
+ onChange: onChange,
31
+ isFocused: isFocused,
32
+ showPlaceholder: isContentNodeEmpty && !(typeAheadState !== null && typeAheadState !== void 0 && typeAheadState.isOpen),
33
+ providers: providerFactory
34
+ });
35
+ };
10
36
  class Task extends ReactNodeView {
11
37
  constructor(...args) {
12
38
  super(...args);
@@ -73,6 +99,11 @@ class Task extends ReactNodeView {
73
99
  }
74
100
  });
75
101
  }
102
+ initWithAPI(api) {
103
+ this.init();
104
+ this.api = api;
105
+ return this;
106
+ }
76
107
  isContentEmpty(node) {
77
108
  return node.content.childCount === 0;
78
109
  }
@@ -95,6 +126,7 @@ class Task extends ReactNodeView {
95
126
  localId,
96
127
  state
97
128
  } = this.node.attrs;
129
+ const isContentNodeEmpty = this.isContentEmpty(this.node);
98
130
  return /*#__PURE__*/React.createElement(AnalyticsListener, {
99
131
  channel: "fabric-elements",
100
132
  onEvent: this.addListAnalyticsData
@@ -105,14 +137,15 @@ class Task extends ReactNodeView {
105
137
  render: ({
106
138
  taskDecisionPlugin
107
139
  }) => {
108
- return /*#__PURE__*/React.createElement(TaskItem, {
109
- taskId: localId,
110
- contentRef: forwardRef,
140
+ return /*#__PURE__*/React.createElement(TaskItemWrapper, {
141
+ localId: localId,
142
+ forwardRef: forwardRef,
111
143
  isDone: state === 'DONE',
112
144
  onChange: this.handleOnChange,
113
- isFocused: (taskDecisionPlugin === null || taskDecisionPlugin === void 0 ? void 0 : taskDecisionPlugin.focusedTaskItemLocalId) === localId,
114
- showPlaceholder: this.isContentEmpty(this.node) && !isTypeAheadOpen(this.view.state),
115
- providers: props.providerFactory
145
+ isFocused: Boolean((taskDecisionPlugin === null || taskDecisionPlugin === void 0 ? void 0 : taskDecisionPlugin.focusedTaskItemLocalId) === localId),
146
+ isContentNodeEmpty: isContentNodeEmpty,
147
+ providerFactory: props.providerFactory,
148
+ api: this.api
116
149
  });
117
150
  }
118
151
  }));
@@ -131,11 +164,11 @@ class Task extends ReactNodeView {
131
164
  !this.isContentEmpty(newNode) && !!(currentNode.attrs.state === newNode.attrs.state));
132
165
  }
133
166
  }
134
- export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory) {
167
+ export function taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api) {
135
168
  return (node, view, getPos) => {
136
169
  const hasIntlContext = true;
137
170
  return new Task(node, view, getPos, portalProviderAPI, eventDispatcher, {
138
171
  providerFactory
139
- }, undefined, undefined, undefined, hasIntlContext).init();
172
+ }, undefined, undefined, undefined, hasIntlContext).initWithAPI(api);
140
173
  };
141
174
  }
@@ -1,14 +1,21 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { uuid } from '@atlaskit/adf-schema';
4
- import { nodesBetweenChanged, SetAttrsStep } from '../../../utils';
5
- import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
4
+ import { getStepRange } from '@atlaskit/editor-common/utils';
5
+ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
6
+ import { createSelectionClickHandler, GapCursorSelection } from '@atlaskit/editor-common/selection';
6
7
  import { decisionItemNodeView } from '../nodeviews/decisionItem';
7
8
  import { taskItemNodeViewFactory } from '../nodeviews/taskItem';
8
9
  import { stateKey } from './plugin-key';
9
10
  import { getTaskItemDataToFocus, getTaskItemDataAtPos, focusCheckboxAndUpdateSelection, removeCheckboxFocus } from './helpers';
10
- import { GapCursorSelection } from '@atlaskit/editor-common/selection';
11
11
  import { ACTIONS } from './types';
12
+ function nodesBetweenChanged(tr, f, startPos) {
13
+ const stepRange = getStepRange(tr);
14
+ if (!stepRange) {
15
+ return;
16
+ }
17
+ tr.doc.nodesBetween(stepRange.from, stepRange.to, f, startPos);
18
+ }
12
19
  const setContextIdentifierProvider = provider => (state, dispatch) => {
13
20
  if (dispatch) {
14
21
  dispatch(state.tr.setMeta(stateKey, {
@@ -18,12 +25,12 @@ const setContextIdentifierProvider = provider => (state, dispatch) => {
18
25
  }
19
26
  return true;
20
27
  };
21
- export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, useLongPressSelection = false) {
28
+ export function createPlugin(portalProviderAPI, eventDispatcher, providerFactory, dispatch, api, useLongPressSelection = false) {
22
29
  return new SafePlugin({
23
30
  props: {
24
31
  nodeViews: {
25
- taskItem: taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory),
26
- decisionItem: decisionItemNodeView(portalProviderAPI, eventDispatcher)
32
+ taskItem: taskItemNodeViewFactory(portalProviderAPI, eventDispatcher, providerFactory, api),
33
+ decisionItem: decisionItemNodeView(portalProviderAPI, eventDispatcher, api)
27
34
  },
28
35
  handleTextInput(view, from, to, text) {
29
36
  // When a decision item is selected and the user starts typing, the entire node
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "188.8.0";
2
+ export const version = "188.9.2";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -10,7 +10,7 @@ import { BaseTheme, WidthProvider } from '@atlaskit/editor-common/ui';
10
10
  import { getUiComponent } from '../create-editor';
11
11
  import ErrorBoundary from '../create-editor/ErrorBoundary';
12
12
  import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
13
- import ReactEditorView from '../create-editor/ReactEditorViewNext';
13
+ import ReactEditorView from '../create-editor/ReactEditorView';
14
14
  import { ContextAdapter } from '../nodeviews/context-adapter';
15
15
  import EditorContext from '../ui/EditorContext';
16
16
  import { useSetPresetContext } from '../presets/context';