@atlaskit/editor-core 185.16.3 → 185.16.6

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 (366) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +14 -0
  3. package/dist/cjs/i18n/cs.js +0 -35
  4. package/dist/cjs/i18n/da.js +0 -35
  5. package/dist/cjs/i18n/de.js +0 -35
  6. package/dist/cjs/i18n/en.js +0 -35
  7. package/dist/cjs/i18n/en_GB.js +0 -35
  8. package/dist/cjs/i18n/en_ZZ.js +0 -35
  9. package/dist/cjs/i18n/es.js +1 -35
  10. package/dist/cjs/i18n/fi.js +0 -35
  11. package/dist/cjs/i18n/fr.js +1 -35
  12. package/dist/cjs/i18n/hu.js +1 -35
  13. package/dist/cjs/i18n/it.js +1 -35
  14. package/dist/cjs/i18n/ja.js +1 -35
  15. package/dist/cjs/i18n/ko.js +0 -35
  16. package/dist/cjs/i18n/nb.js +1 -35
  17. package/dist/cjs/i18n/nl.js +1 -35
  18. package/dist/cjs/i18n/pl.js +1 -35
  19. package/dist/cjs/i18n/pt_BR.js +1 -35
  20. package/dist/cjs/i18n/ru.js +1 -35
  21. package/dist/cjs/i18n/sv.js +0 -35
  22. package/dist/cjs/i18n/th.js +0 -35
  23. package/dist/cjs/i18n/tr.js +1 -35
  24. package/dist/cjs/i18n/uk.js +1 -35
  25. package/dist/cjs/i18n/vi.js +0 -35
  26. package/dist/cjs/i18n/zh.js +1 -35
  27. package/dist/cjs/i18n/zh_TW.js +1 -35
  28. package/dist/cjs/labs/next/presets/mobile.js +1 -1
  29. package/dist/cjs/labs/next/presets/universal.js +2 -2
  30. package/dist/cjs/plugins/deprecated-card/doc.js +111 -0
  31. package/dist/cjs/plugins/deprecated-hyperlink/commands.js +1 -1
  32. package/dist/cjs/plugins/expand/commands.js +15 -12
  33. package/dist/cjs/plugins/expand/nodeviews/index.js +4 -1
  34. package/dist/cjs/plugins/index.js +0 -7
  35. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +14 -25
  36. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +39 -27
  37. package/dist/cjs/version-wrapper.js +1 -1
  38. package/dist/cjs/version.json +1 -1
  39. package/dist/es2019/i18n/cs.js +0 -35
  40. package/dist/es2019/i18n/da.js +0 -35
  41. package/dist/es2019/i18n/de.js +0 -35
  42. package/dist/es2019/i18n/en.js +0 -35
  43. package/dist/es2019/i18n/en_GB.js +0 -35
  44. package/dist/es2019/i18n/en_ZZ.js +0 -35
  45. package/dist/es2019/i18n/es.js +1 -35
  46. package/dist/es2019/i18n/fi.js +0 -35
  47. package/dist/es2019/i18n/fr.js +1 -35
  48. package/dist/es2019/i18n/hu.js +1 -35
  49. package/dist/es2019/i18n/it.js +1 -35
  50. package/dist/es2019/i18n/ja.js +1 -35
  51. package/dist/es2019/i18n/ko.js +0 -35
  52. package/dist/es2019/i18n/nb.js +1 -35
  53. package/dist/es2019/i18n/nl.js +1 -35
  54. package/dist/es2019/i18n/pl.js +1 -35
  55. package/dist/es2019/i18n/pt_BR.js +1 -35
  56. package/dist/es2019/i18n/ru.js +1 -35
  57. package/dist/es2019/i18n/sv.js +0 -35
  58. package/dist/es2019/i18n/th.js +0 -35
  59. package/dist/es2019/i18n/tr.js +1 -35
  60. package/dist/es2019/i18n/uk.js +1 -35
  61. package/dist/es2019/i18n/vi.js +0 -35
  62. package/dist/es2019/i18n/zh.js +1 -35
  63. package/dist/es2019/i18n/zh_TW.js +1 -35
  64. package/dist/es2019/labs/next/presets/mobile.js +1 -1
  65. package/dist/es2019/labs/next/presets/universal.js +1 -1
  66. package/dist/es2019/plugins/deprecated-card/doc.js +97 -0
  67. package/dist/es2019/plugins/deprecated-hyperlink/commands.js +1 -1
  68. package/dist/es2019/plugins/expand/commands.js +13 -14
  69. package/dist/es2019/plugins/expand/nodeviews/index.js +4 -1
  70. package/dist/es2019/plugins/index.js +0 -1
  71. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -14
  72. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +13 -0
  73. package/dist/es2019/version-wrapper.js +1 -1
  74. package/dist/es2019/version.json +1 -1
  75. package/dist/esm/i18n/cs.js +0 -35
  76. package/dist/esm/i18n/da.js +0 -35
  77. package/dist/esm/i18n/de.js +0 -35
  78. package/dist/esm/i18n/en.js +0 -35
  79. package/dist/esm/i18n/en_GB.js +0 -35
  80. package/dist/esm/i18n/en_ZZ.js +0 -35
  81. package/dist/esm/i18n/es.js +1 -35
  82. package/dist/esm/i18n/fi.js +0 -35
  83. package/dist/esm/i18n/fr.js +1 -35
  84. package/dist/esm/i18n/hu.js +1 -35
  85. package/dist/esm/i18n/it.js +1 -35
  86. package/dist/esm/i18n/ja.js +1 -35
  87. package/dist/esm/i18n/ko.js +0 -35
  88. package/dist/esm/i18n/nb.js +1 -35
  89. package/dist/esm/i18n/nl.js +1 -35
  90. package/dist/esm/i18n/pl.js +1 -35
  91. package/dist/esm/i18n/pt_BR.js +1 -35
  92. package/dist/esm/i18n/ru.js +1 -35
  93. package/dist/esm/i18n/sv.js +0 -35
  94. package/dist/esm/i18n/th.js +0 -35
  95. package/dist/esm/i18n/tr.js +1 -35
  96. package/dist/esm/i18n/uk.js +1 -35
  97. package/dist/esm/i18n/vi.js +0 -35
  98. package/dist/esm/i18n/zh.js +1 -35
  99. package/dist/esm/i18n/zh_TW.js +1 -35
  100. package/dist/esm/labs/next/presets/mobile.js +1 -1
  101. package/dist/esm/labs/next/presets/universal.js +1 -1
  102. package/dist/esm/plugins/deprecated-card/doc.js +105 -0
  103. package/dist/esm/plugins/deprecated-hyperlink/commands.js +1 -1
  104. package/dist/esm/plugins/expand/commands.js +16 -13
  105. package/dist/esm/plugins/expand/nodeviews/index.js +4 -1
  106. package/dist/esm/plugins/index.js +0 -1
  107. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +14 -25
  108. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +39 -27
  109. package/dist/esm/version-wrapper.js +1 -1
  110. package/dist/esm/version.json +1 -1
  111. package/dist/types/i18n/cs.d.ts +0 -35
  112. package/dist/types/i18n/da.d.ts +0 -35
  113. package/dist/types/i18n/de.d.ts +0 -35
  114. package/dist/types/i18n/en.d.ts +0 -35
  115. package/dist/types/i18n/en_GB.d.ts +0 -35
  116. package/dist/types/i18n/en_ZZ.d.ts +0 -35
  117. package/dist/types/i18n/es.d.ts +1 -35
  118. package/dist/types/i18n/fi.d.ts +0 -35
  119. package/dist/types/i18n/fr.d.ts +1 -35
  120. package/dist/types/i18n/hu.d.ts +1 -35
  121. package/dist/types/i18n/it.d.ts +1 -35
  122. package/dist/types/i18n/ja.d.ts +1 -35
  123. package/dist/types/i18n/ko.d.ts +0 -35
  124. package/dist/types/i18n/nb.d.ts +1 -35
  125. package/dist/types/i18n/nl.d.ts +1 -35
  126. package/dist/types/i18n/pl.d.ts +1 -35
  127. package/dist/types/i18n/pt_BR.d.ts +1 -35
  128. package/dist/types/i18n/ru.d.ts +1 -35
  129. package/dist/types/i18n/sv.d.ts +0 -35
  130. package/dist/types/i18n/th.d.ts +0 -35
  131. package/dist/types/i18n/tr.d.ts +1 -35
  132. package/dist/types/i18n/uk.d.ts +1 -35
  133. package/dist/types/i18n/vi.d.ts +0 -35
  134. package/dist/types/i18n/zh.d.ts +1 -35
  135. package/dist/types/i18n/zh_TW.d.ts +1 -35
  136. package/dist/types/plugins/deprecated-card/doc.d.ts +20 -0
  137. package/dist/types/plugins/expand/commands.d.ts +1 -1
  138. package/dist/types/plugins/index.d.ts +0 -1
  139. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +0 -1
  140. package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -0
  141. package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -2
  142. package/dist/types/plugins/paste/index.d.ts +1 -1
  143. package/dist/types-ts4.5/i18n/cs.d.ts +0 -35
  144. package/dist/types-ts4.5/i18n/da.d.ts +0 -35
  145. package/dist/types-ts4.5/i18n/de.d.ts +0 -35
  146. package/dist/types-ts4.5/i18n/en.d.ts +0 -35
  147. package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -35
  148. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -35
  149. package/dist/types-ts4.5/i18n/es.d.ts +1 -35
  150. package/dist/types-ts4.5/i18n/fi.d.ts +0 -35
  151. package/dist/types-ts4.5/i18n/fr.d.ts +1 -35
  152. package/dist/types-ts4.5/i18n/hu.d.ts +1 -35
  153. package/dist/types-ts4.5/i18n/it.d.ts +1 -35
  154. package/dist/types-ts4.5/i18n/ja.d.ts +1 -35
  155. package/dist/types-ts4.5/i18n/ko.d.ts +0 -35
  156. package/dist/types-ts4.5/i18n/nb.d.ts +1 -35
  157. package/dist/types-ts4.5/i18n/nl.d.ts +1 -35
  158. package/dist/types-ts4.5/i18n/pl.d.ts +1 -35
  159. package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -35
  160. package/dist/types-ts4.5/i18n/ru.d.ts +1 -35
  161. package/dist/types-ts4.5/i18n/sv.d.ts +0 -35
  162. package/dist/types-ts4.5/i18n/th.d.ts +0 -35
  163. package/dist/types-ts4.5/i18n/tr.d.ts +1 -35
  164. package/dist/types-ts4.5/i18n/uk.d.ts +1 -35
  165. package/dist/types-ts4.5/i18n/vi.d.ts +0 -35
  166. package/dist/types-ts4.5/i18n/zh.d.ts +1 -35
  167. package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -35
  168. package/dist/types-ts4.5/plugins/deprecated-card/doc.d.ts +20 -0
  169. package/dist/types-ts4.5/plugins/expand/commands.d.ts +1 -1
  170. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  171. package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +0 -1
  172. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -0
  173. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -2
  174. package/dist/types-ts4.5/plugins/paste/index.d.ts +1 -1
  175. package/package.json +6 -5
  176. package/tmp/api-report-tmp.d.ts +2307 -0
  177. package/dist/cjs/plugins/card/index.js +0 -139
  178. package/dist/cjs/plugins/card/messages.js +0 -20
  179. package/dist/cjs/plugins/card/nodeviews/blockCard.js +0 -163
  180. package/dist/cjs/plugins/card/nodeviews/datasource.js +0 -172
  181. package/dist/cjs/plugins/card/nodeviews/embedCard.js +0 -396
  182. package/dist/cjs/plugins/card/nodeviews/genericCard.js +0 -118
  183. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +0 -131
  184. package/dist/cjs/plugins/card/pm-plugins/actions.js +0 -122
  185. package/dist/cjs/plugins/card/pm-plugins/analytics/create-analytics-queue.js +0 -48
  186. package/dist/cjs/plugins/card/pm-plugins/analytics/events-from-tr.js +0 -353
  187. package/dist/cjs/plugins/card/pm-plugins/analytics/index.js +0 -19
  188. package/dist/cjs/plugins/card/pm-plugins/analytics/types.js +0 -5
  189. package/dist/cjs/plugins/card/pm-plugins/analytics/utils.js +0 -178
  190. package/dist/cjs/plugins/card/pm-plugins/doc.js +0 -478
  191. package/dist/cjs/plugins/card/pm-plugins/keymap.js +0 -64
  192. package/dist/cjs/plugins/card/pm-plugins/main.js +0 -212
  193. package/dist/cjs/plugins/card/pm-plugins/mountHyperlink.js +0 -47
  194. package/dist/cjs/plugins/card/pm-plugins/plugin-key.js +0 -9
  195. package/dist/cjs/plugins/card/pm-plugins/reducers.js +0 -111
  196. package/dist/cjs/plugins/card/pm-plugins/shouldReplaceLink.js +0 -35
  197. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +0 -58
  198. package/dist/cjs/plugins/card/pm-plugins/util/state.js +0 -49
  199. package/dist/cjs/plugins/card/toolbar.js +0 -364
  200. package/dist/cjs/plugins/card/types.js +0 -5
  201. package/dist/cjs/plugins/card/ui/DatasourceModal/ModalWithState.js +0 -25
  202. package/dist/cjs/plugins/card/ui/DatasourceModal/index.js +0 -60
  203. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +0 -256
  204. package/dist/cjs/plugins/card/ui/EditorSmartCardEvents.js +0 -21
  205. package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +0 -213
  206. package/dist/cjs/plugins/card/ui/HyperlinkToolbarAppearance.js +0 -173
  207. package/dist/cjs/plugins/card/ui/LayoutButton/index.js +0 -113
  208. package/dist/cjs/plugins/card/ui/LayoutButton/styled.js +0 -17
  209. package/dist/cjs/plugins/card/ui/LayoutButton/types.js +0 -5
  210. package/dist/cjs/plugins/card/ui/LayoutButton/utils.js +0 -19
  211. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +0 -151
  212. package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +0 -360
  213. package/dist/cjs/plugins/card/ui/SmallerEditIcon.js +0 -20
  214. package/dist/cjs/plugins/card/utils.js +0 -60
  215. package/dist/es2019/plugins/card/index.js +0 -131
  216. package/dist/es2019/plugins/card/messages.js +0 -13
  217. package/dist/es2019/plugins/card/nodeviews/blockCard.js +0 -130
  218. package/dist/es2019/plugins/card/nodeviews/datasource.js +0 -136
  219. package/dist/es2019/plugins/card/nodeviews/embedCard.js +0 -368
  220. package/dist/es2019/plugins/card/nodeviews/genericCard.js +0 -92
  221. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +0 -112
  222. package/dist/es2019/plugins/card/pm-plugins/actions.js +0 -57
  223. package/dist/es2019/plugins/card/pm-plugins/analytics/create-analytics-queue.js +0 -38
  224. package/dist/es2019/plugins/card/pm-plugins/analytics/events-from-tr.js +0 -333
  225. package/dist/es2019/plugins/card/pm-plugins/analytics/index.js +0 -2
  226. package/dist/es2019/plugins/card/pm-plugins/analytics/types.js +0 -1
  227. package/dist/es2019/plugins/card/pm-plugins/analytics/utils.js +0 -160
  228. package/dist/es2019/plugins/card/pm-plugins/doc.js +0 -451
  229. package/dist/es2019/plugins/card/pm-plugins/keymap.js +0 -59
  230. package/dist/es2019/plugins/card/pm-plugins/main.js +0 -208
  231. package/dist/es2019/plugins/card/pm-plugins/mountHyperlink.js +0 -37
  232. package/dist/es2019/plugins/card/pm-plugins/plugin-key.js +0 -2
  233. package/dist/es2019/plugins/card/pm-plugins/reducers.js +0 -110
  234. package/dist/es2019/plugins/card/pm-plugins/shouldReplaceLink.js +0 -25
  235. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +0 -48
  236. package/dist/es2019/plugins/card/pm-plugins/util/state.js +0 -26
  237. package/dist/es2019/plugins/card/toolbar.js +0 -362
  238. package/dist/es2019/plugins/card/types.js +0 -1
  239. package/dist/es2019/plugins/card/ui/DatasourceModal/ModalWithState.js +0 -19
  240. package/dist/es2019/plugins/card/ui/DatasourceModal/index.js +0 -48
  241. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +0 -225
  242. package/dist/es2019/plugins/card/ui/EditorSmartCardEvents.js +0 -15
  243. package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +0 -198
  244. package/dist/es2019/plugins/card/ui/HyperlinkToolbarAppearance.js +0 -86
  245. package/dist/es2019/plugins/card/ui/LayoutButton/index.js +0 -106
  246. package/dist/es2019/plugins/card/ui/LayoutButton/styled.js +0 -10
  247. package/dist/es2019/plugins/card/ui/LayoutButton/types.js +0 -1
  248. package/dist/es2019/plugins/card/ui/LayoutButton/utils.js +0 -15
  249. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +0 -117
  250. package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +0 -332
  251. package/dist/es2019/plugins/card/ui/SmallerEditIcon.js +0 -11
  252. package/dist/es2019/plugins/card/utils.js +0 -46
  253. package/dist/esm/plugins/card/index.js +0 -132
  254. package/dist/esm/plugins/card/messages.js +0 -13
  255. package/dist/esm/plugins/card/nodeviews/blockCard.js +0 -155
  256. package/dist/esm/plugins/card/nodeviews/datasource.js +0 -164
  257. package/dist/esm/plugins/card/nodeviews/embedCard.js +0 -387
  258. package/dist/esm/plugins/card/nodeviews/genericCard.js +0 -111
  259. package/dist/esm/plugins/card/nodeviews/inlineCard.js +0 -123
  260. package/dist/esm/plugins/card/pm-plugins/actions.js +0 -102
  261. package/dist/esm/plugins/card/pm-plugins/analytics/create-analytics-queue.js +0 -41
  262. package/dist/esm/plugins/card/pm-plugins/analytics/events-from-tr.js +0 -344
  263. package/dist/esm/plugins/card/pm-plugins/analytics/index.js +0 -2
  264. package/dist/esm/plugins/card/pm-plugins/analytics/types.js +0 -1
  265. package/dist/esm/plugins/card/pm-plugins/analytics/utils.js +0 -160
  266. package/dist/esm/plugins/card/pm-plugins/doc.js +0 -460
  267. package/dist/esm/plugins/card/pm-plugins/keymap.js +0 -58
  268. package/dist/esm/plugins/card/pm-plugins/main.js +0 -199
  269. package/dist/esm/plugins/card/pm-plugins/mountHyperlink.js +0 -39
  270. package/dist/esm/plugins/card/pm-plugins/plugin-key.js +0 -2
  271. package/dist/esm/plugins/card/pm-plugins/reducers.js +0 -103
  272. package/dist/esm/plugins/card/pm-plugins/shouldReplaceLink.js +0 -29
  273. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +0 -50
  274. package/dist/esm/plugins/card/pm-plugins/util/state.js +0 -40
  275. package/dist/esm/plugins/card/toolbar.js +0 -353
  276. package/dist/esm/plugins/card/types.js +0 -1
  277. package/dist/esm/plugins/card/ui/DatasourceModal/ModalWithState.js +0 -17
  278. package/dist/esm/plugins/card/ui/DatasourceModal/index.js +0 -49
  279. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +0 -243
  280. package/dist/esm/plugins/card/ui/EditorSmartCardEvents.js +0 -14
  281. package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +0 -202
  282. package/dist/esm/plugins/card/ui/HyperlinkToolbarAppearance.js +0 -163
  283. package/dist/esm/plugins/card/ui/LayoutButton/index.js +0 -102
  284. package/dist/esm/plugins/card/ui/LayoutButton/styled.js +0 -10
  285. package/dist/esm/plugins/card/ui/LayoutButton/types.js +0 -1
  286. package/dist/esm/plugins/card/ui/LayoutButton/utils.js +0 -12
  287. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +0 -140
  288. package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +0 -355
  289. package/dist/esm/plugins/card/ui/SmallerEditIcon.js +0 -11
  290. package/dist/esm/plugins/card/utils.js +0 -48
  291. package/dist/types/plugins/card/index.d.ts +0 -26
  292. package/dist/types/plugins/card/messages.d.ts +0 -12
  293. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +0 -26
  294. package/dist/types/plugins/card/nodeviews/datasource.d.ts +0 -42
  295. package/dist/types/plugins/card/nodeviews/embedCard.d.ts +0 -46
  296. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +0 -37
  297. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +0 -23
  298. package/dist/types/plugins/card/pm-plugins/actions.d.ts +0 -23
  299. package/dist/types/plugins/card/pm-plugins/analytics/create-analytics-queue.d.ts +0 -10
  300. package/dist/types/plugins/card/pm-plugins/analytics/events-from-tr.d.ts +0 -17
  301. package/dist/types/plugins/card/pm-plugins/analytics/index.d.ts +0 -2
  302. package/dist/types/plugins/card/pm-plugins/analytics/types.d.ts +0 -12
  303. package/dist/types/plugins/card/pm-plugins/analytics/utils.d.ts +0 -32
  304. package/dist/types/plugins/card/pm-plugins/doc.d.ts +0 -23
  305. package/dist/types/plugins/card/pm-plugins/keymap.d.ts +0 -3
  306. package/dist/types/plugins/card/pm-plugins/main.d.ts +0 -6
  307. package/dist/types/plugins/card/pm-plugins/mountHyperlink.d.ts +0 -5
  308. package/dist/types/plugins/card/pm-plugins/plugin-key.d.ts +0 -3
  309. package/dist/types/plugins/card/pm-plugins/reducers.d.ts +0 -3
  310. package/dist/types/plugins/card/pm-plugins/shouldReplaceLink.d.ts +0 -2
  311. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +0 -8
  312. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +0 -31
  313. package/dist/types/plugins/card/toolbar.d.ts +0 -12
  314. package/dist/types/plugins/card/types.d.ts +0 -165
  315. package/dist/types/plugins/card/ui/DatasourceModal/ModalWithState.d.ts +0 -9
  316. package/dist/types/plugins/card/ui/DatasourceModal/index.d.ts +0 -11
  317. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +0 -47
  318. package/dist/types/plugins/card/ui/EditorSmartCardEvents.d.ts +0 -5
  319. package/dist/types/plugins/card/ui/EditorSmartCardEventsNext.d.ts +0 -18
  320. package/dist/types/plugins/card/ui/HyperlinkToolbarAppearance.d.ts +0 -32
  321. package/dist/types/plugins/card/ui/LayoutButton/index.d.ts +0 -9
  322. package/dist/types/plugins/card/ui/LayoutButton/styled.d.ts +0 -1
  323. package/dist/types/plugins/card/ui/LayoutButton/types.d.ts +0 -19
  324. package/dist/types/plugins/card/ui/LayoutButton/utils.d.ts +0 -5
  325. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +0 -29
  326. package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +0 -61
  327. package/dist/types/plugins/card/ui/SmallerEditIcon.d.ts +0 -3
  328. package/dist/types/plugins/card/utils.d.ts +0 -19
  329. package/dist/types-ts4.5/plugins/card/index.d.ts +0 -26
  330. package/dist/types-ts4.5/plugins/card/messages.d.ts +0 -12
  331. package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +0 -26
  332. package/dist/types-ts4.5/plugins/card/nodeviews/datasource.d.ts +0 -42
  333. package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +0 -46
  334. package/dist/types-ts4.5/plugins/card/nodeviews/genericCard.d.ts +0 -37
  335. package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +0 -23
  336. package/dist/types-ts4.5/plugins/card/pm-plugins/actions.d.ts +0 -23
  337. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/create-analytics-queue.d.ts +0 -10
  338. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/events-from-tr.d.ts +0 -17
  339. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/index.d.ts +0 -2
  340. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/types.d.ts +0 -12
  341. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/utils.d.ts +0 -32
  342. package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +0 -23
  343. package/dist/types-ts4.5/plugins/card/pm-plugins/keymap.d.ts +0 -3
  344. package/dist/types-ts4.5/plugins/card/pm-plugins/main.d.ts +0 -6
  345. package/dist/types-ts4.5/plugins/card/pm-plugins/mountHyperlink.d.ts +0 -5
  346. package/dist/types-ts4.5/plugins/card/pm-plugins/plugin-key.d.ts +0 -3
  347. package/dist/types-ts4.5/plugins/card/pm-plugins/reducers.d.ts +0 -3
  348. package/dist/types-ts4.5/plugins/card/pm-plugins/shouldReplaceLink.d.ts +0 -2
  349. package/dist/types-ts4.5/plugins/card/pm-plugins/util/resolve.d.ts +0 -8
  350. package/dist/types-ts4.5/plugins/card/pm-plugins/util/state.d.ts +0 -31
  351. package/dist/types-ts4.5/plugins/card/toolbar.d.ts +0 -12
  352. package/dist/types-ts4.5/plugins/card/types.d.ts +0 -165
  353. package/dist/types-ts4.5/plugins/card/ui/DatasourceModal/ModalWithState.d.ts +0 -9
  354. package/dist/types-ts4.5/plugins/card/ui/DatasourceModal/index.d.ts +0 -11
  355. package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +0 -47
  356. package/dist/types-ts4.5/plugins/card/ui/EditorSmartCardEvents.d.ts +0 -5
  357. package/dist/types-ts4.5/plugins/card/ui/EditorSmartCardEventsNext.d.ts +0 -18
  358. package/dist/types-ts4.5/plugins/card/ui/HyperlinkToolbarAppearance.d.ts +0 -32
  359. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/index.d.ts +0 -9
  360. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/styled.d.ts +0 -1
  361. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/types.d.ts +0 -19
  362. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/utils.d.ts +0 -5
  363. package/dist/types-ts4.5/plugins/card/ui/LinkToolbarAppearance.d.ts +0 -29
  364. package/dist/types-ts4.5/plugins/card/ui/ResizableEmbedCard.d.ts +0 -61
  365. package/dist/types-ts4.5/plugins/card/ui/SmallerEditIcon.d.ts +0 -3
  366. package/dist/types-ts4.5/plugins/card/utils.d.ts +0 -19
@@ -1,26 +0,0 @@
1
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import { CardPluginOptions } from './types';
3
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
- import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type { widthPlugin } from '@atlaskit/editor-plugin-width';
6
- import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
7
- import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
8
- import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
9
- import type { CardPluginActions } from '@atlaskit/editor-common/card';
10
- import { CardPluginState } from './types';
11
- import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
12
- declare const cardPlugin: NextEditorPlugin<'card', {
13
- pluginConfiguration: CardPluginOptions;
14
- dependencies: [
15
- typeof featureFlagsPlugin,
16
- typeof analyticsPlugin,
17
- typeof widthPlugin,
18
- typeof decorationsPlugin,
19
- typeof gridPlugin,
20
- FloatingToolbarPlugin,
21
- typeof hyperlinkPlugin
22
- ];
23
- sharedState: CardPluginState | null;
24
- actions: CardPluginActions;
25
- }>;
26
- export default cardPlugin;
@@ -1,12 +0,0 @@
1
- export declare const messages: {
2
- datasourceJiraIssue: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- datasourceJiraIssueDescription: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- };
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { SmartCardProps } from './genericCard';
4
- import ReactNodeView from '@atlaskit/editor-common/react-node-view';
5
- export declare class BlockCardComponent extends React.PureComponent<SmartCardProps> {
6
- private scrollContainer?;
7
- onClick: () => void;
8
- static contextTypes: {
9
- contextAdapter: PropTypes.Requireable<object>;
10
- };
11
- UNSAFE_componentWillMount(): void;
12
- onResolve: (data: {
13
- url?: string | undefined;
14
- title?: string | undefined;
15
- }) => void;
16
- gapCursorSpan: () => JSX.Element | undefined;
17
- onError: ({ err }: {
18
- err?: Error | undefined;
19
- }) => void;
20
- render(): JSX.Element;
21
- }
22
- export type BlockCardNodeViewProps = Pick<SmartCardProps, 'platform' | 'showServerActions'>;
23
- export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
24
- createDomRef(): HTMLElement;
25
- render(): JSX.Element;
26
- }
@@ -1,42 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
- import { jsx } from '@emotion/react';
5
- import { Node as PMNode } from 'prosemirror-model';
6
- import { EditorView } from 'prosemirror-view';
7
- import ReactNodeView, { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
8
- import { DatasourceTableLayout } from '../ui/LayoutButton/types';
9
- import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
10
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
11
- import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
12
- import type cardPlugin from '../index';
13
- interface DatasourceProps extends ReactComponentProps {
14
- node: PMNode;
15
- view: EditorView;
16
- getPos: getPosHandler;
17
- portalProviderAPI: PortalProviderAPI;
18
- eventDispatcher: EventDispatcher;
19
- hasIntlContext: boolean;
20
- pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
21
- }
22
- interface DatasourceComponentProps extends ReactComponentProps, Pick<DatasourceProps, 'node' | 'view' | 'getPos'> {
23
- }
24
- export declare class DatasourceComponent extends React.PureComponent<DatasourceComponentProps> {
25
- static contextTypes: {
26
- contextAdapter: PropTypes.Requireable<object>;
27
- };
28
- constructor(props: DatasourceComponentProps);
29
- private getPosSafely;
30
- private getDatasource;
31
- private getTableView;
32
- handleColumnChange: (columnKeys: string[]) => void;
33
- render(): jsx.JSX.Element | null;
34
- }
35
- export declare class Datasource extends ReactNodeView<DatasourceProps> {
36
- private tableWidth;
37
- constructor(props: DatasourceProps);
38
- createDomRef(): HTMLElement;
39
- calcTableWidth: (layout: DatasourceTableLayout, containerWidth?: number) => number | 'inherit';
40
- render(): jsx.JSX.Element;
41
- }
42
- export {};
@@ -1,46 +0,0 @@
1
- import React from 'react';
2
- import { Node as PMNode } from 'prosemirror-model';
3
- import PropTypes from 'prop-types';
4
- import { SmartCardProps } from './genericCard';
5
- import { RichMediaLayout } from '@atlaskit/adf-schema';
6
- import ReactNodeView from '@atlaskit/editor-common/react-node-view';
7
- export type EmbedCardState = {
8
- hasPreview: boolean;
9
- liveHeight?: number;
10
- initialAspectRatio?: number;
11
- };
12
- export declare class EmbedCardComponent extends React.PureComponent<SmartCardProps, EmbedCardState> {
13
- private scrollContainer?;
14
- private embedIframeRef;
15
- onClick: () => void;
16
- static contextTypes: {
17
- contextAdapter: PropTypes.Requireable<object>;
18
- };
19
- state: EmbedCardState;
20
- UNSAFE_componentWillMount(): void;
21
- private getPosSafely;
22
- onResolve: (data: {
23
- url?: string | undefined;
24
- title?: string | undefined;
25
- aspectRatio?: number | undefined;
26
- }) => void;
27
- updateSize: (pctWidth: number | null, layout: RichMediaLayout) => true | undefined;
28
- private getLineLength;
29
- /**
30
- * Even though render is capable of listening and reacting to iframely wrapper iframe sent `resize` events
31
- * it's good idea to store latest actual height in ADF, so that when renderer (well, editor as well) is loading
32
- * we will show embed window of appropriate size and avoid unnecessary content jumping.
33
- */
34
- saveOriginalDimensionsAttributes: (height: number, width: number | undefined) => void;
35
- onHeightUpdate: (height: number) => void;
36
- onError: ({ err }: {
37
- err?: Error | undefined;
38
- }) => void;
39
- render(): JSX.Element;
40
- }
41
- export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'platform' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi'>;
42
- export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
43
- viewShouldUpdate(nextNode: PMNode): boolean;
44
- createDomRef(): HTMLElement;
45
- render(): JSX.Element;
46
- }
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import { Node as PMNode } from 'prosemirror-model';
3
- import { EditorView } from 'prosemirror-view';
4
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
- import { CardPlatform } from '@atlaskit/smart-card';
6
- import { SmartCardContext } from '@atlaskit/link-provider';
7
- import { getPosHandler, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
8
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
9
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
10
- import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
11
- import type cardPlugin from '../index';
12
- export type EditorContext<T> = React.Context<T> & {
13
- value: T;
14
- };
15
- export interface CardNodeViewProps extends ReactComponentProps {
16
- providerFactory?: ProviderFactory;
17
- platform?: CardPlatform;
18
- eventDispatcher?: EventDispatcher<any>;
19
- }
20
- export interface CardProps extends CardNodeViewProps {
21
- children?: React.ReactNode;
22
- node: PMNode;
23
- view: EditorView;
24
- getPos: getPosHandler;
25
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
26
- isMobile?: boolean;
27
- eventDispatcher?: EventDispatcher<any>;
28
- allowResizing?: boolean;
29
- fullWidthMode?: boolean;
30
- useAlternativePreloader?: boolean;
31
- showServerActions?: boolean;
32
- pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>;
33
- }
34
- export interface SmartCardProps extends CardProps {
35
- cardContext?: EditorContext<typeof SmartCardContext>;
36
- }
37
- export declare function Card(SmartCardComponent: React.ComponentType<SmartCardProps>, UnsupportedComponent: React.ComponentType): React.ComponentType<CardProps>;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { SmartCardProps } from './genericCard';
4
- import type { InlineNodeViewComponentProps } from '@atlaskit/editor-common/react-node-view';
5
- export declare class InlineCardComponent extends React.PureComponent<SmartCardProps> {
6
- private scrollContainer?;
7
- private onClick;
8
- static contextTypes: {
9
- contextAdapter: PropTypes.Requireable<object>;
10
- };
11
- UNSAFE_componentWillMount(): void;
12
- onResolve: (data: {
13
- url?: string | undefined;
14
- title?: string | undefined;
15
- }) => void;
16
- onError: (data: {
17
- url?: string | undefined;
18
- err?: Error | undefined;
19
- }) => void;
20
- render(): JSX.Element | null;
21
- }
22
- export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'showServerActions'>;
23
- export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps): JSX.Element;
@@ -1,23 +0,0 @@
1
- import { Transaction } from 'prosemirror-state';
2
- import { CardProvider } from '@atlaskit/editor-common/provider-factory';
3
- import { CardPluginAction, Request, CardInfo, SmartLinkEventsNext } from '../types';
4
- import { SmartLinkEvents } from '@atlaskit/smart-card';
5
- import { DatasourceTableLayout } from '../ui/LayoutButton/types';
6
- import { DatasourceModalType } from '@atlaskit/editor-common/types';
7
- export declare const cardAction: (tr: Transaction, action: CardPluginAction) => Transaction;
8
- export declare const resolveCard: (url: string) => (tr: Transaction) => Transaction;
9
- export declare const queueCards: (requests: Request[]) => (tr: Transaction) => Transaction;
10
- export declare const registerCard: (info: CardInfo) => (tr: Transaction) => Transaction;
11
- export declare const registerSmartCardEvents: (smartLinkEvents: SmartLinkEvents) => (tr: Transaction) => Transaction;
12
- export declare const registerSmartCardEventsNext: (smartLinkEvents: SmartLinkEventsNext) => (tr: Transaction) => Transaction;
13
- export declare const setProvider: (cardProvider: CardProvider | null) => (tr: Transaction) => Transaction;
14
- export declare const setDatasourceTableRef: (datasourceTableRef?: HTMLElement) => (tr: Transaction) => Transaction;
15
- export declare const setCardLayout: (layout: DatasourceTableLayout) => (tr: Transaction) => Transaction;
16
- export declare const setCardLayoutAndDatasourceTableRef: ({ layout, datasourceTableRef, }: {
17
- layout: DatasourceTableLayout;
18
- datasourceTableRef?: HTMLElement | undefined;
19
- }) => (tr: Transaction) => Transaction;
20
- export declare const showLinkToolbar: (tr: Transaction) => Transaction;
21
- export declare const hideLinkToolbar: (tr: Transaction) => Transaction;
22
- export declare const showDatasourceModal: (modalType: DatasourceModalType) => (tr: Transaction) => Transaction;
23
- export declare const hideDatasourceModal: (tr: Transaction) => Transaction;
@@ -1,10 +0,0 @@
1
- import { LifecycleEvent, SmartLinkEventsNext } from '../../types';
2
- /**
3
- * Simple mechanism to defer analytics related callbacks
4
- */
5
- export declare const createAnalyticsQueue: (enabled?: boolean) => {
6
- push: (...events: LifecycleEvent[]) => void;
7
- flush: () => void;
8
- setCallbacks: (callbacks: SmartLinkEventsNext) => void;
9
- getSize: () => number;
10
- };
@@ -1,17 +0,0 @@
1
- import { EditorState, ReadonlyTransaction, Transaction } from 'prosemirror-state';
2
- import { LifecycleEvent } from '../../types';
3
- import { Link } from './types';
4
- export declare const findChangedLinks: (tr: Transaction | ReadonlyTransaction, state: EditorState) => {
5
- removed: Link[];
6
- inserted: Link[];
7
- updated: ({
8
- removed: Link;
9
- inserted: Link;
10
- } | {
11
- inserted: Link;
12
- previous: {
13
- display?: string;
14
- };
15
- })[];
16
- };
17
- export declare function eventsFromTransaction(tr: ReadonlyTransaction, state: EditorState): LifecycleEvent[];
@@ -1,2 +0,0 @@
1
- export { createAnalyticsQueue } from './create-analytics-queue';
2
- export { eventsFromTransaction } from './events-from-tr';
@@ -1,12 +0,0 @@
1
- import { Mark, Node } from 'prosemirror-model';
2
- export type Link = {
3
- type: 'node';
4
- pos: number;
5
- node: Node;
6
- nodeContext: string;
7
- } | {
8
- type: 'mark';
9
- pos: number;
10
- mark: Mark;
11
- nodeContext: string;
12
- };
@@ -1,32 +0,0 @@
1
- import { Node, Schema } from 'prosemirror-model';
2
- import { ReadonlyTransaction, Transaction } from 'prosemirror-state';
3
- import { Link } from './types';
4
- /**
5
- * Whether a node is a "link" node, ie inline card, block card, embed card
6
- * (but not a text node with a link mark)
7
- */
8
- export declare function isLinkNode(node: Node): boolean;
9
- /**
10
- * Analytics appearance for link object
11
- */
12
- export declare function appearanceForLink(link: Link): "url" | import("@atlaskit/editor-common/provider-factory").CardAppearance;
13
- /**
14
- * Determine if a node is considered to be a link
15
- */
16
- export declare const isLink: (schema: Schema, node: Node) => boolean;
17
- /**
18
- * Given a node, find all nodes and marks that are considered "links"
19
- * @param state EditorState
20
- * @param fragment Fragment to search
21
- * @returns Array of nodes and marks found in the fragment that are "links"
22
- */
23
- export declare function findLinksInNode(doc: Node, schema: Schema, node: Node, offset: number): Link[];
24
- export declare function getLinkUrl(link: Link): string | undefined;
25
- export declare const getLinkNodeContext: (doc: Node, pos: number) => string;
26
- export declare const linkObjectFromNode: (doc: Node, schema: Schema, node: Node, pos: number) => Link | undefined;
27
- export declare const findLinksAtPositions: (tr: Transaction | ReadonlyTransaction, positions: number[]) => Link[];
28
- /**
29
- * Returns whether or not two sets of links appear to likely be the same set of links
30
- * That they are in the same order and that both their hrefs and appearances match
31
- */
32
- export declare const areSameLinks: (linksA: Link[], linksB: Link[]) => boolean;
@@ -1,23 +0,0 @@
1
- import { EditorState, Transaction } from 'prosemirror-state';
2
- import { Node } from 'prosemirror-model';
3
- import { EditorView } from 'prosemirror-view';
4
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
5
- import { CardAdf, DatasourceAdf, CardAppearance } from '@atlaskit/editor-common/provider-factory';
6
- import { ACTION, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
7
- import type { Command } from '@atlaskit/editor-common/types';
8
- import type { InlineCardAdf } from '@atlaskit/smart-card';
9
- import { Request } from '../types';
10
- import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
11
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
12
- export declare const replaceQueuedUrlWithCard: (url: string, cardData: CardAdf | DatasourceAdf, analyticsAction?: ACTION, editorAnalyticsApi?: EditorAnalyticsAPI, createAnalyticsEvent?: CreateUIAnalyticsEvent) => Command;
13
- export declare const handleFallbackWithAnalytics: (request: Request, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
14
- export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined) => Transaction;
15
- export declare const queueCardFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, previousAppearance?: CardAppearance | 'url') => Transaction;
16
- export declare const convertHyperlinkToSmartCard: (state: EditorState, source: CardReplacementInputMethod, appearance: CardAppearance, normalizeLinkText?: boolean) => Transaction;
17
- export declare const changeSelectedCardToLink: (text?: string, href?: string, sendAnalytics?: boolean, node?: Node, pos?: number, editorAnalyticsApi?: EditorAnalyticsAPI) => Command;
18
- export declare const changeSelectedCardToLinkFallback: (text?: string, href?: string, sendAnalytics?: boolean, node?: Node, pos?: number, editorAnalyticsApi?: EditorAnalyticsAPI) => Command;
19
- export declare const updateCard: (href: string, sourceEvent?: UIAnalyticsEvent | null | undefined) => Command;
20
- export declare const changeSelectedCardToText: (text: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
21
- export declare const setSelectedCardAppearance: (appearance: CardAppearance, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
22
- export declare const updateExistingDatasource: (state: EditorState, node: Node, newAdf: DatasourceAdf | InlineCardAdf, view: EditorView) => void;
23
- export declare const insertDatasource: (state: EditorState, adf: DatasourceAdf | InlineCardAdf, view: EditorView) => void;
@@ -1,3 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
3
- export declare function cardKeymap(featureFlags: FeatureFlags): SafePlugin;
@@ -1,6 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { CardPluginOptions, CardPluginState } from '../types';
3
- import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
4
- import type cardPlugin from '../index';
5
- export { pluginKey } from './plugin-key';
6
- export declare const createPlugin: (options: CardPluginOptions, pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined) => (pmPluginFactoryParams: PMPluginFactoryParams) => SafePlugin<CardPluginState>;
@@ -1,5 +0,0 @@
1
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type cardPlugin from '..';
4
- import { CardPluginOptions } from '../types';
5
- export declare const mountHyperlinkPlugin: (pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined, options: CardPluginOptions) => SafePlugin<any>;
@@ -1,3 +0,0 @@
1
- import { PluginKey } from 'prosemirror-state';
2
- import { CardPluginState } from '../types';
3
- export declare const pluginKey: PluginKey<CardPluginState>;
@@ -1,3 +0,0 @@
1
- import { CardPluginState, CardPluginAction } from '../types';
2
- declare const _default: (state: CardPluginState, action: CardPluginAction) => CardPluginState;
3
- export default _default;
@@ -1,2 +0,0 @@
1
- import { Node } from 'prosemirror-model';
2
- export declare function shouldReplaceLink(node: Node, compareLinkText?: boolean, compareToUrl?: string): boolean;
@@ -1,8 +0,0 @@
1
- import { CardProvider, DatasourceAdf } from '@atlaskit/editor-common/provider-factory';
2
- import { EditorView } from 'prosemirror-view';
3
- import { Request } from '../../types';
4
- import { CardOptions } from '@atlaskit/editor-common/card';
5
- import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
7
- export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined) => Promise<void | import("@atlaskit/linking-common").InlineCardAdf | import("@atlaskit/linking-common").BlockCardAdf | import("@atlaskit/linking-common").EmbedCardAdf | DatasourceAdf>;
8
- export declare const handleProvider: (_: 'cardProvider', provider: Promise<CardProvider> | undefined, view: EditorView) => void;
@@ -1,31 +0,0 @@
1
- import { EditorState, ReadonlyTransaction } from 'prosemirror-state';
2
- import { CardPluginState, Request } from '../../types';
3
- export declare const getPluginState: (editorState: EditorState) => CardPluginState | undefined;
4
- export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState, tr: ReadonlyTransaction) => {
5
- requests: {
6
- pos: number;
7
- url: string;
8
- appearance: import("@atlaskit/editor-common/provider-factory").CardAppearance;
9
- compareLinkText: boolean;
10
- source: import("@atlaskit/editor-common/card").CardReplacementInputMethod;
11
- previousAppearance?: "url" | import("@atlaskit/editor-common/provider-factory").CardAppearance | undefined;
12
- analyticsAction?: import("@atlaskit/editor-common/analytics").ACTION | undefined;
13
- shouldReplaceLink?: boolean | undefined;
14
- sourceEvent?: import("@atlaskit/analytics-next").UIAnalyticsEvent | null | undefined;
15
- }[];
16
- cards: {
17
- pos: number;
18
- title?: string | undefined;
19
- url?: string | undefined;
20
- }[];
21
- provider: import("@atlaskit/editor-common/provider-factory").CardProvider | null;
22
- showLinkingToolbar: boolean;
23
- smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents | undefined;
24
- smartLinkEventsNext?: import("../../types").SmartLinkEventsNext | undefined;
25
- editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance | undefined;
26
- showDatasourceModal: boolean;
27
- datasourceModalType?: "jira" | undefined;
28
- datasourceTableRef?: HTMLElement | undefined;
29
- layout?: import("../../ui/LayoutButton/types").DatasourceTableLayout | undefined;
30
- };
31
- export declare const getNewRequests: (oldState: CardPluginState | undefined, currentState: CardPluginState) => Request[];
@@ -1,12 +0,0 @@
1
- import { CardPlatform } from '@atlaskit/smart-card';
2
- import type { Command, FloatingToolbarHandler } from '@atlaskit/editor-common/types';
3
- import { CardOptions } from '@atlaskit/editor-common/card';
4
- import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
- import { LinkPickerOptions } from '@atlaskit/editor-common/types';
6
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
7
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
8
- import type cardPlugin from './index';
9
- export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
10
- export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
11
- export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
12
- export declare const floatingToolbar: (cardOptions: CardOptions, featureFlags: FeatureFlags, platform?: CardPlatform, linkPickerOptions?: LinkPickerOptions, pluginInjectionApi?: ExtractInjectionAPI<typeof cardPlugin>) => FloatingToolbarHandler;
@@ -1,165 +0,0 @@
1
- import { ACTION } from '@atlaskit/editor-common/analytics';
2
- import { CardProvider, CardAppearance } from '@atlaskit/editor-common/provider-factory';
3
- import { SmartLinkEvents } from '@atlaskit/smart-card';
4
- import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
5
- import type { CardOptions, CardReplacementInputMethod } from '@atlaskit/editor-common/card';
6
- import type { EditorAppearance } from '@atlaskit/editor-common/types';
7
- import { LinkPickerOptions } from '@atlaskit/editor-common/types';
8
- import { DatasourceTableLayout } from './ui/LayoutButton/types';
9
- import { DatasourceModalType } from '@atlaskit/editor-common/types';
10
- export type CardInfo = {
11
- title?: string;
12
- url?: string;
13
- pos: number;
14
- };
15
- export type Request = {
16
- /**
17
- * The position of the link in the doc this request for upgrade is for
18
- */
19
- pos: number;
20
- /**
21
- * The URL of the link being upgraded/resolved
22
- */
23
- url: string;
24
- /**
25
- * The requested appearance to upgrade to
26
- */
27
- appearance: CardAppearance;
28
- /**
29
- * Determines if the link should only be replaced after successful
30
- * resolution if the link's text content still matches its href
31
- * (ie has not been changed by the user since the resolve request).
32
- */
33
- compareLinkText: boolean;
34
- /**
35
- * Analytics input method which preserves "how" the change
36
- * has occured. Used when analytics are dispatched after the link
37
- * is successfully/unsuccessfully resolved.
38
- */
39
- source: CardReplacementInputMethod;
40
- /**
41
- * The previous appearance of the link
42
- * This is necessary when tracking an update of a link
43
- * where the link begins as a smart card, then is updated by
44
- * replacing with a hyperlink and queueing it for upgrade
45
- */
46
- previousAppearance?: CardAppearance | 'url';
47
- /**
48
- * Analytics action to be used when disaptching
49
- * analytics events once the link is successfully/unsuccessfully
50
- * resolved. Preserves the users "intent" ie was this a link
51
- * being inserted or updated?
52
- */
53
- analyticsAction?: ACTION;
54
- /**
55
- * Describes if the requested `appearance` MUST be returned by the card provider
56
- * when resolving the link, because the request is associated with the user intent
57
- * to explicitly change the link appearance to the target appearance (view switcher), and therefore
58
- * should not be affected by "default appearances" or "user preferences"
59
- */
60
- shouldReplaceLink?: boolean;
61
- /**
62
- * Source UI that triggered this step if relevant
63
- * Primarily for transfering link picker UI event from initial UI action
64
- * through to the end of the link queue/request saga
65
- */
66
- sourceEvent?: UIAnalyticsEvent | null | undefined;
67
- };
68
- export type Metadata<T = {}> = {
69
- url: string;
70
- display: string;
71
- isUndo?: boolean;
72
- isRedo?: boolean;
73
- action?: string;
74
- inputMethod?: string;
75
- sourceEvent?: unknown;
76
- nodeContext?: string;
77
- } & T;
78
- export type UpdateMetadata = {
79
- previousDisplay?: string;
80
- };
81
- export type SmartLinkEventsNext = {
82
- created: (metadata: Metadata) => void;
83
- updated: (metadata: Metadata<UpdateMetadata>) => void;
84
- deleted: (metadata: Metadata) => void;
85
- };
86
- export type LifecycleEventType = keyof SmartLinkEventsNext;
87
- /**
88
- * Describes the shape of an event that will be stored
89
- * in the Card state until it can be dispatched
90
- * as a side-effect in a view update
91
- */
92
- export type LifecycleEvent<Type extends keyof SmartLinkEventsNext = keyof SmartLinkEventsNext> = {
93
- type: Type;
94
- data: Parameters<SmartLinkEventsNext[Type]>[0];
95
- };
96
- export type CardPluginState = {
97
- requests: Request[];
98
- provider: CardProvider | null;
99
- cards: CardInfo[];
100
- showLinkingToolbar: boolean;
101
- smartLinkEvents?: SmartLinkEvents;
102
- smartLinkEventsNext?: SmartLinkEventsNext;
103
- editorAppearance?: EditorAppearance;
104
- showDatasourceModal: boolean;
105
- datasourceModalType?: DatasourceModalType;
106
- datasourceTableRef?: HTMLElement;
107
- layout?: DatasourceTableLayout;
108
- };
109
- export type CardPluginOptions = CardOptions & {
110
- editorAppearance?: EditorAppearance;
111
- platform: 'mobile' | 'web';
112
- fullWidthMode?: boolean;
113
- linkPicker?: LinkPickerOptions;
114
- };
115
- export type SetProvider = {
116
- type: 'SET_PROVIDER';
117
- provider: CardProvider | null;
118
- };
119
- export type Queue = {
120
- type: 'QUEUE';
121
- requests: Request[];
122
- };
123
- export type Resolve = {
124
- type: 'RESOLVE';
125
- url: string;
126
- };
127
- export type Register = {
128
- type: 'REGISTER';
129
- info: CardInfo;
130
- };
131
- export type ShowLinkToolbar = {
132
- type: 'SHOW_LINK_TOOLBAR';
133
- };
134
- export type HideLinkToolbar = {
135
- type: 'HIDE_LINK_TOOLBAR';
136
- };
137
- export type ShowDatasourceModal = {
138
- type: 'SHOW_DATASOURCE_MODAL';
139
- modalType: DatasourceModalType;
140
- };
141
- export type HideDatasourceModal = {
142
- type: 'HIDE_DATASOURCE_MODAL';
143
- };
144
- export type RegisterSmartCardEvents = {
145
- type: 'REGISTER_EVENTS';
146
- smartLinkEvents: SmartLinkEvents;
147
- };
148
- export type RegisterSmartCardEventsNext = {
149
- type: 'REGISTER_EVENTS_NEXT';
150
- smartLinkEvents: SmartLinkEventsNext;
151
- };
152
- export type SetDatasourceTableRef = {
153
- type: 'SET_DATASOURCE_TABLE_REF';
154
- datasourceTableRef?: HTMLElement;
155
- };
156
- export type SetCardLayout = {
157
- type: 'SET_CARD_LAYOUT';
158
- layout: DatasourceTableLayout;
159
- };
160
- export type SetCardLayoutAndDatasourceTableRef = {
161
- type: 'SET_CARD_LAYOUT_AND_DATASOURCE_TABLE_REF';
162
- layout: DatasourceTableLayout;
163
- datasourceTableRef?: HTMLElement;
164
- };
165
- export type CardPluginAction = SetProvider | Queue | Resolve | Register | ShowLinkToolbar | HideLinkToolbar | ShowDatasourceModal | HideDatasourceModal | RegisterSmartCardEvents | RegisterSmartCardEventsNext | SetDatasourceTableRef | SetCardLayout | SetCardLayoutAndDatasourceTableRef;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { EditorView } from 'prosemirror-view';
3
- import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type cardPlugin from '../../index';
5
- declare const ModalWithState: ({ api, editorView, }: {
6
- api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
7
- editorView: EditorView;
8
- }) => JSX.Element | null;
9
- export default ModalWithState;
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { EditorView } from 'prosemirror-view';
3
- import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
- import { DatasourceModalType } from '@atlaskit/editor-common/types';
5
- type DatasourceModalProps = {
6
- view: EditorView;
7
- editorAnalyticsApi?: EditorAnalyticsAPI;
8
- modalType?: DatasourceModalType;
9
- };
10
- export declare const DatasourceModal: ({ view, modalType }: DatasourceModalProps) => JSX.Element | null;
11
- export {};