@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
@@ -1,124 +0,0 @@
1
- import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
2
- import { pluginKey as typeAheadPluginKey } from './pm-plugins/key';
3
- import { updateSelectedIndex } from './commands/update-selected-index';
4
- import { StatsModifier } from './stats-modifier';
5
- import { typeAheadListMessages } from './messages';
6
- export var isTypeAheadHandler = function isTypeAheadHandler(handler) {
7
- return handler && Object.values(TypeAheadAvailableNodes).includes(handler.id) && typeof handler.trigger === 'string' && typeof handler.selectItem === 'function' && typeof handler.getItems === 'function';
8
- };
9
-
10
- /** Is a typeahead plugin open? */
11
- export var isTypeAheadOpen = function isTypeAheadOpen(editorState) {
12
- var _typeAheadPluginKey$g;
13
- return !!(typeAheadPluginKey !== null && typeAheadPluginKey !== void 0 && (_typeAheadPluginKey$g = typeAheadPluginKey.getState(editorState)) !== null && _typeAheadPluginKey$g !== void 0 && (_typeAheadPluginKey$g = _typeAheadPluginKey$g.decorationSet) !== null && _typeAheadPluginKey$g !== void 0 && _typeAheadPluginKey$g.find().length);
14
- };
15
- export var getPluginState = function getPluginState(editorState) {
16
- return typeAheadPluginKey.getState(editorState);
17
- };
18
- export var getTypeAheadHandler = function getTypeAheadHandler(editorState) {
19
- var _typeAheadPluginKey$g2;
20
- return (_typeAheadPluginKey$g2 = typeAheadPluginKey.getState(editorState)) === null || _typeAheadPluginKey$g2 === void 0 ? void 0 : _typeAheadPluginKey$g2.triggerHandler;
21
- };
22
- export var getTypeAheadQuery = function getTypeAheadQuery(editorState) {
23
- var _typeAheadPluginKey$g3;
24
- return (_typeAheadPluginKey$g3 = typeAheadPluginKey.getState(editorState)) === null || _typeAheadPluginKey$g3 === void 0 ? void 0 : _typeAheadPluginKey$g3.query;
25
- };
26
- export var isTypeAheadAllowed = function isTypeAheadAllowed(state) {
27
- var isOpen = isTypeAheadOpen(state);
28
- // if the TypeAhead is open
29
- // we should not allow it
30
- return !isOpen;
31
- };
32
- export var findHandler = function findHandler(id, state) {
33
- var pluginState = typeAheadPluginKey.getState(state);
34
- if (!pluginState || !pluginState.typeAheadHandlers || pluginState.typeAheadHandlers.length === 0) {
35
- return null;
36
- }
37
- var typeAheadHandlers = pluginState.typeAheadHandlers;
38
- return typeAheadHandlers.find(function (h) {
39
- return h.id === id;
40
- }) || null;
41
- };
42
- export var findHandlerByTrigger = function findHandlerByTrigger(_ref) {
43
- var trigger = _ref.trigger,
44
- editorState = _ref.editorState;
45
- var pluginState = typeAheadPluginKey.getState(editorState);
46
- if (!pluginState || !pluginState.typeAheadHandlers || pluginState.typeAheadHandlers.length === 0) {
47
- return null;
48
- }
49
- var typeAheadHandlers = pluginState.typeAheadHandlers;
50
- return typeAheadHandlers.find(function (h) {
51
- return h.trigger === trigger;
52
- }) || null;
53
- };
54
- export var moveSelectedIndex = function moveSelectedIndex(_ref2) {
55
- var editorView = _ref2.editorView,
56
- direction = _ref2.direction;
57
- return function () {
58
- var typeAheadState = getPluginState(editorView.state);
59
- if (!typeAheadState) {
60
- return;
61
- }
62
- var selectedIndex = typeAheadState.selectedIndex,
63
- items = typeAheadState.items;
64
- var stats = typeAheadState.stats instanceof StatsModifier ? typeAheadState.stats : new StatsModifier();
65
- var nextIndex;
66
- if (direction === 'next') {
67
- stats.increaseArrowDown();
68
-
69
- /**
70
- * See: https://product-fabric.atlassian.net/browse/ED-17200
71
- * `selectedIndex` is forced to -1 now to not immediately focus the typeahead
72
- * and only do so when there is explicit logic to focus into the typeahead
73
- * options.
74
- *
75
- * This check for "set index to 1 when -1"
76
- * - is a temporary workaround to get back the previous behaviour without
77
- * entirely reverting the a11y improvements
78
- *
79
- */
80
- if (selectedIndex === -1 && items.length > 1) {
81
- nextIndex = 1;
82
- } else {
83
- nextIndex = selectedIndex >= items.length - 1 ? 0 : selectedIndex + 1;
84
- }
85
- } else {
86
- stats.increaseArrowUp();
87
- nextIndex = selectedIndex <= 0 ? items.length - 1 : selectedIndex - 1;
88
- }
89
- updateSelectedIndex(nextIndex)(editorView.state, editorView.dispatch);
90
- };
91
- };
92
- export var getTypeAheadListAriaLabels = function getTypeAheadListAriaLabels(trigger, intl, item) {
93
- var _item$mention, _item$mention2, _item$emoji, _item$emoji2, _item$emoji3;
94
- switch (trigger) {
95
- case '@':
96
- return {
97
- popupAriaLabel: intl.formatMessage(typeAheadListMessages.mentionPopupLabel),
98
- listItemAriaLabel: intl.formatMessage(typeAheadListMessages.metionListItemLabel, {
99
- name: (item === null || item === void 0 || (_item$mention = item.mention) === null || _item$mention === void 0 ? void 0 : _item$mention.name) || '',
100
- shortName: (item === null || item === void 0 || (_item$mention2 = item.mention) === null || _item$mention2 === void 0 ? void 0 : _item$mention2.mentionName) || ''
101
- })
102
- };
103
- case '/':
104
- return {
105
- popupAriaLabel: intl.formatMessage(typeAheadListMessages.quickInsertPopupLabel),
106
- listItemAriaLabel: intl.formatMessage(typeAheadListMessages.emojiListItemLabel, {
107
- name: (item === null || item === void 0 ? void 0 : item.title) || '',
108
- shortcut: (item === null || item === void 0 || (_item$emoji = item.emoji) === null || _item$emoji === void 0 ? void 0 : _item$emoji.shortName) || ''
109
- })
110
- };
111
- case ':':
112
- return {
113
- popupAriaLabel: intl.formatMessage(typeAheadListMessages.emojiPopupLabel),
114
- listItemAriaLabel: intl.formatMessage(typeAheadListMessages.emojiListItemLabel, {
115
- name: (item === null || item === void 0 || (_item$emoji2 = item.emoji) === null || _item$emoji2 === void 0 ? void 0 : _item$emoji2.name) || '',
116
- shortcut: (item === null || item === void 0 || (_item$emoji3 = item.emoji) === null || _item$emoji3 === void 0 ? void 0 : _item$emoji3.shortName) || ''
117
- })
118
- };
119
- default:
120
- return {
121
- popupAriaLabel: intl.formatMessage(typeAheadListMessages.typeAheadPopupLabel)
122
- };
123
- }
124
- };
@@ -1,119 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { EditorState } from '@atlaskit/editor-prosemirror/state';
4
- import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
5
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
- import type { WrappedComponentProps } from 'react-intl-next';
8
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
9
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
10
- import type { ErrorReporter, SEVERITY } from '@atlaskit/editor-common/utils';
11
- import { ExperienceStore } from '@atlaskit/editor-common/ufo';
12
- import type { Transformer, AllEditorPresetPluginTypes } from '@atlaskit/editor-common/types';
13
- import type { Dispatch } from '../event-dispatcher';
14
- import { EventDispatcher } from '../event-dispatcher';
15
- import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
16
- import type { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
17
- import type { EditorNextProps } from '../types/editor-props';
18
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
19
- import type { SetEditorAPI } from '../presets/context';
20
- import { TransactionTracker } from '../utils/performance/track-transactions';
21
- import type { FireAnalyticsCallback, AnalyticsEventPayload, DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
22
- import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
23
- export interface EditorViewProps {
24
- editorProps: EditorProps | EditorNextProps;
25
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
26
- providerFactory: ProviderFactory;
27
- portalProviderAPI: PortalProviderAPI;
28
- disabled?: boolean;
29
- experienceStore?: ExperienceStore;
30
- setEditorApi?: SetEditorAPI;
31
- render?: (props: {
32
- editor: JSX.Element;
33
- view?: EditorView;
34
- config: EditorConfig;
35
- eventDispatcher: EventDispatcher;
36
- transformer?: Transformer<string>;
37
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
38
- editorRef: React.RefObject<HTMLDivElement>;
39
- }) => JSX.Element;
40
- onEditorCreated: (instance: {
41
- view: EditorView;
42
- config: EditorConfig;
43
- eventDispatcher: EventDispatcher;
44
- transformer?: Transformer<string>;
45
- }) => void;
46
- onEditorDestroyed: (instance: {
47
- view: EditorView;
48
- config: EditorConfig;
49
- eventDispatcher: EventDispatcher;
50
- transformer?: Transformer<string>;
51
- }) => void;
52
- preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
53
- }
54
- interface CreateEditorStateOptions {
55
- props: EditorViewProps;
56
- context: EditorReactContext;
57
- doc?: string | Object | PMNode;
58
- resetting?: boolean;
59
- selectionAtStart?: boolean;
60
- }
61
- export declare class ReactEditorView<T = {}> extends React.Component<EditorViewProps & WrappedComponentProps & T, {}, EditorReactContext> {
62
- view?: EditorView;
63
- eventDispatcher: EventDispatcher;
64
- contentTransformer?: Transformer<string>;
65
- config: EditorConfig;
66
- editorState: EditorState;
67
- errorReporter: ErrorReporter;
68
- dispatch: Dispatch;
69
- proseMirrorRenderedSeverity?: SEVERITY;
70
- transactionTracker: TransactionTracker;
71
- validTransactionCount: number;
72
- experienceStore?: ExperienceStore;
73
- editorRef: React.RefObject<HTMLDivElement>;
74
- static contextTypes: {
75
- getAtlaskitAnalyticsEventHandlers: PropTypes.Requireable<(...args: any[]) => any>;
76
- };
77
- private canDispatchTransactions;
78
- private focusTimeoutId?;
79
- private reliabilityInterval?;
80
- private pluginPerformanceObserver;
81
- private featureFlags;
82
- private pluginInjectionAPI;
83
- private onPluginObservation;
84
- get transactionTracking(): import("@atlaskit/editor-common/types").TransactionTracking;
85
- private getPluginNames;
86
- private countNodes;
87
- private isTransactionTrackingExplicitlyDisabled;
88
- constructor(props: EditorViewProps & WrappedComponentProps & T, context: EditorReactContext);
89
- getEditorState: () => EditorState | undefined;
90
- getEditorView: () => EditorView | undefined;
91
- UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
92
- formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
93
- resetEditorState: ({ doc, shouldScrollToBottom, }: {
94
- doc: string;
95
- shouldScrollToBottom: boolean;
96
- }) => void;
97
- blur: () => void;
98
- reconfigureState(props: EditorViewProps): void;
99
- handleAnalyticsEvent: FireAnalyticsCallback;
100
- componentDidMount(): void;
101
- /**
102
- * Clean up any non-PM resources when the editor is unmounted
103
- */
104
- componentWillUnmount(): void;
105
- private editorPlugins;
106
- getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
107
- createEditorState: (options: CreateEditorStateOptions) => EditorState;
108
- private onEditorViewStateUpdated;
109
- private trackValidTransactions;
110
- private dispatchTransaction;
111
- getDirectEditorProps: (state?: EditorState) => DirectEditorProps;
112
- private createEditorView;
113
- handleEditorViewRef: (node: HTMLDivElement) => void;
114
- dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
115
- private createEditor;
116
- private editor;
117
- render(): JSX.Element;
118
- }
119
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { EditorViewProps } from './ReactEditorViewInternal';
3
- import { WrappedComponentProps } from 'react-intl-next';
4
- export declare function ReactEditorViewEditor<T = {}>(props: EditorViewProps & WrappedComponentProps & T): JSX.Element;
5
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps<"intl">>> & {
6
- WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps<"intl">>;
7
- };
8
- export default _default;
@@ -1,10 +0,0 @@
1
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { Dispatch } from '../../event-dispatcher';
4
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
5
- export declare function createPlugin(eventDispatch: Dispatch, onSave?: (editorView: EditorView) => void): SafePlugin | undefined;
6
- type Config = (editorView: EditorView) => void;
7
- declare const saveOnEnterPlugin: NextEditorPlugin<'saveOnEnter', {
8
- pluginConfiguration: Config | undefined;
9
- }>;
10
- export default saveOnEnterPlugin;
@@ -1,14 +0,0 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
3
- /**
4
- * Plugin to scroll the user's selection into view whenever the user updates
5
- * the document eg. inserting, deleting, formatting
6
- *
7
- * Behaviour is on by default, can be explicitly opted out of for a transaction by
8
- * setting scrollIntoView=false meta
9
- * We ignore collab transactions, appended transactions, transactions without steps,
10
- * transactions with addToHistory=false meta and typeahead trigger transactions
11
- */
12
- export declare const scrollIntoViewPluginKey: PluginKey<any>;
13
- declare const scrollIntoViewPlugin: NextEditorPlugin<'scrollIntoView'>;
14
- export default scrollIntoViewPlugin;
@@ -1,16 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { Command } from '@atlaskit/editor-common/types';
4
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
5
- import type { TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
6
- import type { StatusType, ClosingPayload } from './types';
7
- export declare const DEFAULT_STATUS: StatusType;
8
- export declare const createStatus: (showStatusPickerAtOffset?: number) => (insert: (node: Node | Object | string, opts: {
9
- selectInlineNode: boolean;
10
- }) => Transaction, state: EditorState) => Transaction;
11
- export declare const updateStatus: (status?: StatusType) => Command;
12
- export type UpdateStatus = (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command;
13
- export declare const updateStatusWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: TOOLBAR_MENU_TYPE, status?: StatusType) => Command;
14
- export declare const setStatusPickerAt: (showStatusPickerAt: number | null) => (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
15
- export declare const removeStatus: (showStatusPickerAt: number) => Command;
16
- export declare const commitStatusPicker: (closingPayload?: ClosingPayload) => (editorView: EditorView) => void;
@@ -1,4 +0,0 @@
1
- import type { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
- export declare const FABRIC_CHANNEL = "fabric-elements";
3
- export declare const createStatusAnalyticsAndFire: (createAnalyticsEvent?: CreateUIAnalyticsEvent) => (payload: AnalyticsEventPayload) => void;
4
- export declare const analyticsState: (isNew: boolean | undefined) => "update" | "new";
@@ -1,15 +0,0 @@
1
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { UpdateStatus } from './actions';
3
- import { commitStatusPicker } from './actions';
4
- import type { StatusPluginOptions } from './types';
5
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
- export type StatusPlugin = NextEditorPlugin<'status', {
7
- dependencies: [OptionalPlugin<AnalyticsPlugin>];
8
- pluginConfiguration: StatusPluginOptions | undefined;
9
- actions: {
10
- commitStatusPicker: typeof commitStatusPicker;
11
- updateStatus: UpdateStatus;
12
- };
13
- }>;
14
- declare const statusPlugin: StatusPlugin;
15
- export default statusPlugin;
@@ -1,3 +0,0 @@
1
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- export declare function keymapPlugin(): SafePlugin;
3
- export default keymapPlugin;
@@ -1,25 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import { jsx } from '@emotion/react';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { IntlShape } from 'react-intl-next';
6
- import type { Color, StatusStyle } from '@atlaskit/status/element';
7
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
8
- import type { InlineNodeViewComponentProps } from '@atlaskit/editor-common/react-node-view';
9
- import type { StatusPluginOptions } from '../types';
10
- export interface ContainerProps {
11
- view: EditorView;
12
- intl: IntlShape;
13
- text?: string;
14
- color: Color;
15
- style?: StatusStyle;
16
- localId?: string;
17
- eventDispatcher?: EventDispatcher;
18
- }
19
- export declare const IntlStatusContainerView: React.FC<import("react-intl-next").WithIntlProps<ContainerProps>> & {
20
- WrappedComponent: React.ComponentType<ContainerProps>;
21
- };
22
- export type Props = InlineNodeViewComponentProps & {
23
- options: StatusPluginOptions | undefined;
24
- };
25
- export declare const StatusNodeView: (props: Props) => jsx.JSX.Element;
@@ -1,4 +0,0 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { StatusState } from './types';
3
- export declare const pluginKeyName = "statusPlugin";
4
- export declare const pluginKey: PluginKey<StatusState>;
@@ -1,7 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
3
- import type { StatusPluginOptions } from './types';
4
- export { pluginKey, pluginKeyName } from './plugin-key';
5
- export type { StatusState, StatusType, ClosingPayload } from './types';
6
- declare const createPlugin: (pmPluginFactoryParams: PMPluginFactoryParams, options?: StatusPluginOptions) => SafePlugin<any>;
7
- export default createPlugin;
@@ -1,18 +0,0 @@
1
- import type { Color as ColorType } from '@atlaskit/status/element';
2
- import type { closingMethods } from './ui/statusPicker';
3
- export type StatusType = {
4
- color: ColorType;
5
- text: string;
6
- localId?: string;
7
- };
8
- export type StatusState = {
9
- isNew: boolean;
10
- showStatusPickerAt: number | null;
11
- };
12
- export interface StatusPluginOptions {
13
- menuDisabled: boolean;
14
- allowZeroWidthSpaceAfter?: boolean;
15
- }
16
- export type ClosingPayload = {
17
- closingMethod: closingMethods;
18
- };
@@ -1,63 +0,0 @@
1
- import React from 'react';
2
- import { jsx } from '@emotion/react';
3
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
- import type { ColorType as Color } from '@atlaskit/status/picker';
5
- import type { StatusType, ClosingPayload } from '../plugin';
6
- export declare enum InputMethod {
7
- blur = "blur",
8
- escKey = "escKey",
9
- enterKey = "enterKey"
10
- }
11
- export declare enum closingMethods {
12
- ArrowLeft = "arrowLeft",
13
- ArrowRight = "arrowRight"
14
- }
15
- export interface Props {
16
- target: HTMLElement | null;
17
- closeStatusPicker: (closingPayload?: ClosingPayload) => void;
18
- onSelect: (status: StatusType) => void;
19
- onTextChanged: (status: StatusType, isNew: boolean) => void;
20
- onEnter: (status: StatusType) => void;
21
- isNew?: boolean;
22
- defaultText?: string;
23
- defaultColor?: Color;
24
- defaultLocalId?: string;
25
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
26
- mountTo?: HTMLElement;
27
- boundariesElement?: HTMLElement;
28
- scrollableElement?: HTMLElement;
29
- }
30
- export interface State {
31
- color: Color;
32
- text: string;
33
- localId?: string;
34
- isNew?: boolean;
35
- }
36
- export declare class StatusPickerWithoutAnalytcs extends React.Component<Props, State> {
37
- private startTime;
38
- private inputMethod?;
39
- private createStatusAnalyticsAndFireFunc;
40
- private popupBodyWrapper;
41
- private focusTimeout;
42
- constructor(props: Props);
43
- private fireStatusPopupOpenedAnalytics;
44
- private fireStatusPopupClosedAnalytics;
45
- private reset;
46
- componentDidMount(): void;
47
- componentWillUnmount(): void;
48
- componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<State>, _snapshot?: any): void;
49
- private extractStateFromProps;
50
- handleClickOutside: (event: Event) => void;
51
- private handleEscapeKeydown;
52
- private handleTabPress;
53
- private handleArrow;
54
- private onKeyDown;
55
- render(): jsx.JSX.Element | null;
56
- private onColorHover;
57
- private onColorClick;
58
- private onTextChanged;
59
- private onEnter;
60
- private handlePopupClick;
61
- }
62
- declare const _default: React.ForwardRefExoticComponent<Omit<Props, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any>>;
63
- export default _default;
@@ -1,5 +0,0 @@
1
- import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import type { StatusType } from './types';
3
- export declare const mayGetStatusAtSelection: (selection: Selection) => StatusType | null;
4
- export declare const isEmptyStatus: (node: StatusType) => boolean;
5
- export declare const setNodeSelectionNearPos: (tr: Transaction, pos: number) => Transaction;
@@ -1,61 +0,0 @@
1
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
3
- import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
4
- import type { TypeAheadInputMethod } from '@atlaskit/editor-plugin-type-ahead';
5
- import type { TypeAheadHandler } from './types';
6
- import type { Command } from '@atlaskit/editor-common/types';
7
- type CloseOptions = {
8
- insertCurrentQueryAsRawText: boolean;
9
- attachCommand?: Command;
10
- };
11
- type InsertItemProps = {
12
- contentItem: TypeAheadItem;
13
- query: string;
14
- sourceListItem: TypeAheadItem[];
15
- };
16
- /**
17
- * Please do not use it. Ping #help-editor and talk to the Lego team before use it.
18
- *
19
- * @private
20
- * @deprecated
21
- *
22
- */
23
- export declare const createTypeAheadTools: (editorView: EditorView) => {
24
- isOpen: () => TypeAheadHandler | false;
25
- currentQuery: () => string | undefined;
26
- close: (options?: CloseOptions) => boolean;
27
- openMention: (inputMethod: TypeAheadInputMethod) => boolean;
28
- searchMention: (query?: string) => {
29
- type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
30
- result: () => Promise<TypeAheadItem[] | undefined>;
31
- close: (options?: CloseOptions) => boolean;
32
- insert: ({ index, mode }: {
33
- index: number;
34
- mode?: SelectItemMode | undefined;
35
- }) => Promise<void>;
36
- };
37
- openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
38
- searchQuickInsert: (query?: string) => {
39
- type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
40
- result: () => Promise<TypeAheadItem[] | undefined>;
41
- close: (options?: CloseOptions) => boolean;
42
- insert: ({ index, mode }: {
43
- index: number;
44
- mode?: SelectItemMode | undefined;
45
- }) => Promise<void>;
46
- };
47
- openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
48
- searchEmoji: (query?: string) => {
49
- type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
50
- result: () => Promise<TypeAheadItem[] | undefined>;
51
- close: (options?: CloseOptions) => boolean;
52
- insert: ({ index, mode }: {
53
- index: number;
54
- mode?: SelectItemMode | undefined;
55
- }) => Promise<void>;
56
- };
57
- insertItemMention: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
58
- insertItemEmoji: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
59
- insertItemQuickInsert: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
60
- };
61
- export {};
@@ -1,12 +0,0 @@
1
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
3
- import type { TypeAheadHandler, TypeAheadItem } from '../types';
4
- type Props = {
5
- item: TypeAheadItem;
6
- handler: TypeAheadHandler;
7
- mode: SelectItemMode;
8
- sourceListItem: Array<TypeAheadItem>;
9
- query: string;
10
- };
11
- export declare const insertTypeAheadItem: (view: EditorView) => ({ item, handler, mode, query, sourceListItem }: Props) => void;
12
- export {};
@@ -1,3 +0,0 @@
1
- import type { TypeAheadItem } from '../types';
2
- import type { Command } from '@atlaskit/editor-common/types';
3
- export declare const updateListItem: (items: Array<TypeAheadItem>) => Command;
@@ -1,2 +0,0 @@
1
- import type { Command } from '@atlaskit/editor-common/types';
2
- export declare const updateQuery: (query: string) => Command;
@@ -1,2 +0,0 @@
1
- import type { Command } from '@atlaskit/editor-common/types';
2
- export declare const updateSelectedIndex: (selectedIndex: number) => Command;
@@ -1,8 +0,0 @@
1
- export declare const TYPE_AHEAD_DECORATION_KEY = "typeahead_decoration_key";
2
- export declare const TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = "typeaheadDecoration";
3
- export declare const TYPE_AHEAD_POPUP_CONTENT_CLASS = "fabric-editor-typeahead";
4
- export declare const TYPE_AHEAD_DECORATION_ELEMENT_ID = "typeahaed_decoration_element_id";
5
- export declare enum CloseSelectionOptions {
6
- BEFORE_TEXT_INSERTED = "BEFORE_TEXT_INSERTED",
7
- AFTER_TEXT_INSERTED = "AFTER_TEXT_INSERTED"
8
- }
@@ -1,4 +0,0 @@
1
- import { typeAheadPlugin } from './plugin';
2
- export default typeAheadPlugin;
3
- export { typeAheadPlugin };
4
- export type { TypeAheadHandler, TypeAheadInputMethod, TypeAheadPlugin, TypeAheadPluginOptions, TypeAheadPluginState, } from './types';
@@ -1,18 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { Node as PMNode, Fragment } from '@atlaskit/editor-prosemirror/model';
3
- type Position = {
4
- start: number;
5
- end: number;
6
- };
7
- export declare const insertBlockNode: ({ node, tr, position, }: {
8
- node: PMNode;
9
- tr: Transaction;
10
- position: Position;
11
- }) => Transaction;
12
- export declare const insertInlineNodeOrFragment: ({ maybeFragment, tr, position, selectInlineNode, }: {
13
- maybeFragment: Fragment | PMNode;
14
- tr: Transaction;
15
- position: Position;
16
- selectInlineNode: boolean;
17
- }) => Transaction;
18
- export {};
@@ -1,72 +0,0 @@
1
- export declare const typeAheadListMessages: {
2
- typeAheadPopupLabel: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- quickInsertPopupLabel: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- quickInsertInputLabel: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- emojiPopupLabel: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- emojiInputLabel: {
23
- id: string;
24
- defaultMessage: string;
25
- description: string;
26
- };
27
- mentionPopupLabel: {
28
- id: string;
29
- defaultMessage: string;
30
- description: string;
31
- };
32
- mentionInputLabel: {
33
- id: string;
34
- defaultMessage: string;
35
- description: string;
36
- };
37
- metionListItemLabel: {
38
- id: string;
39
- defaultMessage: string;
40
- description: string;
41
- };
42
- emojiListItemLabel: {
43
- id: string;
44
- defaultMessage: string;
45
- description: string;
46
- };
47
- inputQueryAssistiveLabel: {
48
- id: string;
49
- defaultMessage: string;
50
- description: string;
51
- };
52
- searchResultsLabel: {
53
- id: string;
54
- defaultMessage: string;
55
- description: string;
56
- };
57
- noSearchResultsLabel: {
58
- id: string;
59
- defaultMessage: string;
60
- description: string;
61
- };
62
- descriptionLabel: {
63
- id: string;
64
- defaultMessage: string;
65
- description: string;
66
- };
67
- shortcutLabel: {
68
- id: string;
69
- defaultMessage: string;
70
- description: string;
71
- };
72
- };