@atlaskit/editor-core 185.16.3 → 185.16.5

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 (358) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +8 -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/index.js +0 -7
  33. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +14 -25
  34. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +39 -27
  35. package/dist/cjs/version-wrapper.js +1 -1
  36. package/dist/cjs/version.json +1 -1
  37. package/dist/es2019/i18n/cs.js +0 -35
  38. package/dist/es2019/i18n/da.js +0 -35
  39. package/dist/es2019/i18n/de.js +0 -35
  40. package/dist/es2019/i18n/en.js +0 -35
  41. package/dist/es2019/i18n/en_GB.js +0 -35
  42. package/dist/es2019/i18n/en_ZZ.js +0 -35
  43. package/dist/es2019/i18n/es.js +1 -35
  44. package/dist/es2019/i18n/fi.js +0 -35
  45. package/dist/es2019/i18n/fr.js +1 -35
  46. package/dist/es2019/i18n/hu.js +1 -35
  47. package/dist/es2019/i18n/it.js +1 -35
  48. package/dist/es2019/i18n/ja.js +1 -35
  49. package/dist/es2019/i18n/ko.js +0 -35
  50. package/dist/es2019/i18n/nb.js +1 -35
  51. package/dist/es2019/i18n/nl.js +1 -35
  52. package/dist/es2019/i18n/pl.js +1 -35
  53. package/dist/es2019/i18n/pt_BR.js +1 -35
  54. package/dist/es2019/i18n/ru.js +1 -35
  55. package/dist/es2019/i18n/sv.js +0 -35
  56. package/dist/es2019/i18n/th.js +0 -35
  57. package/dist/es2019/i18n/tr.js +1 -35
  58. package/dist/es2019/i18n/uk.js +1 -35
  59. package/dist/es2019/i18n/vi.js +0 -35
  60. package/dist/es2019/i18n/zh.js +1 -35
  61. package/dist/es2019/i18n/zh_TW.js +1 -35
  62. package/dist/es2019/labs/next/presets/mobile.js +1 -1
  63. package/dist/es2019/labs/next/presets/universal.js +1 -1
  64. package/dist/es2019/plugins/deprecated-card/doc.js +97 -0
  65. package/dist/es2019/plugins/deprecated-hyperlink/commands.js +1 -1
  66. package/dist/es2019/plugins/index.js +0 -1
  67. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -14
  68. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +13 -0
  69. package/dist/es2019/version-wrapper.js +1 -1
  70. package/dist/es2019/version.json +1 -1
  71. package/dist/esm/i18n/cs.js +0 -35
  72. package/dist/esm/i18n/da.js +0 -35
  73. package/dist/esm/i18n/de.js +0 -35
  74. package/dist/esm/i18n/en.js +0 -35
  75. package/dist/esm/i18n/en_GB.js +0 -35
  76. package/dist/esm/i18n/en_ZZ.js +0 -35
  77. package/dist/esm/i18n/es.js +1 -35
  78. package/dist/esm/i18n/fi.js +0 -35
  79. package/dist/esm/i18n/fr.js +1 -35
  80. package/dist/esm/i18n/hu.js +1 -35
  81. package/dist/esm/i18n/it.js +1 -35
  82. package/dist/esm/i18n/ja.js +1 -35
  83. package/dist/esm/i18n/ko.js +0 -35
  84. package/dist/esm/i18n/nb.js +1 -35
  85. package/dist/esm/i18n/nl.js +1 -35
  86. package/dist/esm/i18n/pl.js +1 -35
  87. package/dist/esm/i18n/pt_BR.js +1 -35
  88. package/dist/esm/i18n/ru.js +1 -35
  89. package/dist/esm/i18n/sv.js +0 -35
  90. package/dist/esm/i18n/th.js +0 -35
  91. package/dist/esm/i18n/tr.js +1 -35
  92. package/dist/esm/i18n/uk.js +1 -35
  93. package/dist/esm/i18n/vi.js +0 -35
  94. package/dist/esm/i18n/zh.js +1 -35
  95. package/dist/esm/i18n/zh_TW.js +1 -35
  96. package/dist/esm/labs/next/presets/mobile.js +1 -1
  97. package/dist/esm/labs/next/presets/universal.js +1 -1
  98. package/dist/esm/plugins/deprecated-card/doc.js +105 -0
  99. package/dist/esm/plugins/deprecated-hyperlink/commands.js +1 -1
  100. package/dist/esm/plugins/index.js +0 -1
  101. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +14 -25
  102. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +39 -27
  103. package/dist/esm/version-wrapper.js +1 -1
  104. package/dist/esm/version.json +1 -1
  105. package/dist/types/i18n/cs.d.ts +0 -35
  106. package/dist/types/i18n/da.d.ts +0 -35
  107. package/dist/types/i18n/de.d.ts +0 -35
  108. package/dist/types/i18n/en.d.ts +0 -35
  109. package/dist/types/i18n/en_GB.d.ts +0 -35
  110. package/dist/types/i18n/en_ZZ.d.ts +0 -35
  111. package/dist/types/i18n/es.d.ts +1 -35
  112. package/dist/types/i18n/fi.d.ts +0 -35
  113. package/dist/types/i18n/fr.d.ts +1 -35
  114. package/dist/types/i18n/hu.d.ts +1 -35
  115. package/dist/types/i18n/it.d.ts +1 -35
  116. package/dist/types/i18n/ja.d.ts +1 -35
  117. package/dist/types/i18n/ko.d.ts +0 -35
  118. package/dist/types/i18n/nb.d.ts +1 -35
  119. package/dist/types/i18n/nl.d.ts +1 -35
  120. package/dist/types/i18n/pl.d.ts +1 -35
  121. package/dist/types/i18n/pt_BR.d.ts +1 -35
  122. package/dist/types/i18n/ru.d.ts +1 -35
  123. package/dist/types/i18n/sv.d.ts +0 -35
  124. package/dist/types/i18n/th.d.ts +0 -35
  125. package/dist/types/i18n/tr.d.ts +1 -35
  126. package/dist/types/i18n/uk.d.ts +1 -35
  127. package/dist/types/i18n/vi.d.ts +0 -35
  128. package/dist/types/i18n/zh.d.ts +1 -35
  129. package/dist/types/i18n/zh_TW.d.ts +1 -35
  130. package/dist/types/plugins/deprecated-card/doc.d.ts +20 -0
  131. package/dist/types/plugins/index.d.ts +0 -1
  132. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +0 -1
  133. package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -0
  134. package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -2
  135. package/dist/types/plugins/paste/index.d.ts +1 -1
  136. package/dist/types-ts4.5/i18n/cs.d.ts +0 -35
  137. package/dist/types-ts4.5/i18n/da.d.ts +0 -35
  138. package/dist/types-ts4.5/i18n/de.d.ts +0 -35
  139. package/dist/types-ts4.5/i18n/en.d.ts +0 -35
  140. package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -35
  141. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -35
  142. package/dist/types-ts4.5/i18n/es.d.ts +1 -35
  143. package/dist/types-ts4.5/i18n/fi.d.ts +0 -35
  144. package/dist/types-ts4.5/i18n/fr.d.ts +1 -35
  145. package/dist/types-ts4.5/i18n/hu.d.ts +1 -35
  146. package/dist/types-ts4.5/i18n/it.d.ts +1 -35
  147. package/dist/types-ts4.5/i18n/ja.d.ts +1 -35
  148. package/dist/types-ts4.5/i18n/ko.d.ts +0 -35
  149. package/dist/types-ts4.5/i18n/nb.d.ts +1 -35
  150. package/dist/types-ts4.5/i18n/nl.d.ts +1 -35
  151. package/dist/types-ts4.5/i18n/pl.d.ts +1 -35
  152. package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -35
  153. package/dist/types-ts4.5/i18n/ru.d.ts +1 -35
  154. package/dist/types-ts4.5/i18n/sv.d.ts +0 -35
  155. package/dist/types-ts4.5/i18n/th.d.ts +0 -35
  156. package/dist/types-ts4.5/i18n/tr.d.ts +1 -35
  157. package/dist/types-ts4.5/i18n/uk.d.ts +1 -35
  158. package/dist/types-ts4.5/i18n/vi.d.ts +0 -35
  159. package/dist/types-ts4.5/i18n/zh.d.ts +1 -35
  160. package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -35
  161. package/dist/types-ts4.5/plugins/deprecated-card/doc.d.ts +20 -0
  162. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  163. package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +0 -1
  164. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -0
  165. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -2
  166. package/dist/types-ts4.5/plugins/paste/index.d.ts +1 -1
  167. package/package.json +6 -5
  168. package/tmp/api-report-tmp.d.ts +2307 -0
  169. package/dist/cjs/plugins/card/index.js +0 -139
  170. package/dist/cjs/plugins/card/messages.js +0 -20
  171. package/dist/cjs/plugins/card/nodeviews/blockCard.js +0 -163
  172. package/dist/cjs/plugins/card/nodeviews/datasource.js +0 -172
  173. package/dist/cjs/plugins/card/nodeviews/embedCard.js +0 -396
  174. package/dist/cjs/plugins/card/nodeviews/genericCard.js +0 -118
  175. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +0 -131
  176. package/dist/cjs/plugins/card/pm-plugins/actions.js +0 -122
  177. package/dist/cjs/plugins/card/pm-plugins/analytics/create-analytics-queue.js +0 -48
  178. package/dist/cjs/plugins/card/pm-plugins/analytics/events-from-tr.js +0 -353
  179. package/dist/cjs/plugins/card/pm-plugins/analytics/index.js +0 -19
  180. package/dist/cjs/plugins/card/pm-plugins/analytics/types.js +0 -5
  181. package/dist/cjs/plugins/card/pm-plugins/analytics/utils.js +0 -178
  182. package/dist/cjs/plugins/card/pm-plugins/doc.js +0 -478
  183. package/dist/cjs/plugins/card/pm-plugins/keymap.js +0 -64
  184. package/dist/cjs/plugins/card/pm-plugins/main.js +0 -212
  185. package/dist/cjs/plugins/card/pm-plugins/mountHyperlink.js +0 -47
  186. package/dist/cjs/plugins/card/pm-plugins/plugin-key.js +0 -9
  187. package/dist/cjs/plugins/card/pm-plugins/reducers.js +0 -111
  188. package/dist/cjs/plugins/card/pm-plugins/shouldReplaceLink.js +0 -35
  189. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +0 -58
  190. package/dist/cjs/plugins/card/pm-plugins/util/state.js +0 -49
  191. package/dist/cjs/plugins/card/toolbar.js +0 -364
  192. package/dist/cjs/plugins/card/types.js +0 -5
  193. package/dist/cjs/plugins/card/ui/DatasourceModal/ModalWithState.js +0 -25
  194. package/dist/cjs/plugins/card/ui/DatasourceModal/index.js +0 -60
  195. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +0 -256
  196. package/dist/cjs/plugins/card/ui/EditorSmartCardEvents.js +0 -21
  197. package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +0 -213
  198. package/dist/cjs/plugins/card/ui/HyperlinkToolbarAppearance.js +0 -173
  199. package/dist/cjs/plugins/card/ui/LayoutButton/index.js +0 -113
  200. package/dist/cjs/plugins/card/ui/LayoutButton/styled.js +0 -17
  201. package/dist/cjs/plugins/card/ui/LayoutButton/types.js +0 -5
  202. package/dist/cjs/plugins/card/ui/LayoutButton/utils.js +0 -19
  203. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +0 -151
  204. package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +0 -360
  205. package/dist/cjs/plugins/card/ui/SmallerEditIcon.js +0 -20
  206. package/dist/cjs/plugins/card/utils.js +0 -60
  207. package/dist/es2019/plugins/card/index.js +0 -131
  208. package/dist/es2019/plugins/card/messages.js +0 -13
  209. package/dist/es2019/plugins/card/nodeviews/blockCard.js +0 -130
  210. package/dist/es2019/plugins/card/nodeviews/datasource.js +0 -136
  211. package/dist/es2019/plugins/card/nodeviews/embedCard.js +0 -368
  212. package/dist/es2019/plugins/card/nodeviews/genericCard.js +0 -92
  213. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +0 -112
  214. package/dist/es2019/plugins/card/pm-plugins/actions.js +0 -57
  215. package/dist/es2019/plugins/card/pm-plugins/analytics/create-analytics-queue.js +0 -38
  216. package/dist/es2019/plugins/card/pm-plugins/analytics/events-from-tr.js +0 -333
  217. package/dist/es2019/plugins/card/pm-plugins/analytics/index.js +0 -2
  218. package/dist/es2019/plugins/card/pm-plugins/analytics/types.js +0 -1
  219. package/dist/es2019/plugins/card/pm-plugins/analytics/utils.js +0 -160
  220. package/dist/es2019/plugins/card/pm-plugins/doc.js +0 -451
  221. package/dist/es2019/plugins/card/pm-plugins/keymap.js +0 -59
  222. package/dist/es2019/plugins/card/pm-plugins/main.js +0 -208
  223. package/dist/es2019/plugins/card/pm-plugins/mountHyperlink.js +0 -37
  224. package/dist/es2019/plugins/card/pm-plugins/plugin-key.js +0 -2
  225. package/dist/es2019/plugins/card/pm-plugins/reducers.js +0 -110
  226. package/dist/es2019/plugins/card/pm-plugins/shouldReplaceLink.js +0 -25
  227. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +0 -48
  228. package/dist/es2019/plugins/card/pm-plugins/util/state.js +0 -26
  229. package/dist/es2019/plugins/card/toolbar.js +0 -362
  230. package/dist/es2019/plugins/card/types.js +0 -1
  231. package/dist/es2019/plugins/card/ui/DatasourceModal/ModalWithState.js +0 -19
  232. package/dist/es2019/plugins/card/ui/DatasourceModal/index.js +0 -48
  233. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +0 -225
  234. package/dist/es2019/plugins/card/ui/EditorSmartCardEvents.js +0 -15
  235. package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +0 -198
  236. package/dist/es2019/plugins/card/ui/HyperlinkToolbarAppearance.js +0 -86
  237. package/dist/es2019/plugins/card/ui/LayoutButton/index.js +0 -106
  238. package/dist/es2019/plugins/card/ui/LayoutButton/styled.js +0 -10
  239. package/dist/es2019/plugins/card/ui/LayoutButton/types.js +0 -1
  240. package/dist/es2019/plugins/card/ui/LayoutButton/utils.js +0 -15
  241. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +0 -117
  242. package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +0 -332
  243. package/dist/es2019/plugins/card/ui/SmallerEditIcon.js +0 -11
  244. package/dist/es2019/plugins/card/utils.js +0 -46
  245. package/dist/esm/plugins/card/index.js +0 -132
  246. package/dist/esm/plugins/card/messages.js +0 -13
  247. package/dist/esm/plugins/card/nodeviews/blockCard.js +0 -155
  248. package/dist/esm/plugins/card/nodeviews/datasource.js +0 -164
  249. package/dist/esm/plugins/card/nodeviews/embedCard.js +0 -387
  250. package/dist/esm/plugins/card/nodeviews/genericCard.js +0 -111
  251. package/dist/esm/plugins/card/nodeviews/inlineCard.js +0 -123
  252. package/dist/esm/plugins/card/pm-plugins/actions.js +0 -102
  253. package/dist/esm/plugins/card/pm-plugins/analytics/create-analytics-queue.js +0 -41
  254. package/dist/esm/plugins/card/pm-plugins/analytics/events-from-tr.js +0 -344
  255. package/dist/esm/plugins/card/pm-plugins/analytics/index.js +0 -2
  256. package/dist/esm/plugins/card/pm-plugins/analytics/types.js +0 -1
  257. package/dist/esm/plugins/card/pm-plugins/analytics/utils.js +0 -160
  258. package/dist/esm/plugins/card/pm-plugins/doc.js +0 -460
  259. package/dist/esm/plugins/card/pm-plugins/keymap.js +0 -58
  260. package/dist/esm/plugins/card/pm-plugins/main.js +0 -199
  261. package/dist/esm/plugins/card/pm-plugins/mountHyperlink.js +0 -39
  262. package/dist/esm/plugins/card/pm-plugins/plugin-key.js +0 -2
  263. package/dist/esm/plugins/card/pm-plugins/reducers.js +0 -103
  264. package/dist/esm/plugins/card/pm-plugins/shouldReplaceLink.js +0 -29
  265. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +0 -50
  266. package/dist/esm/plugins/card/pm-plugins/util/state.js +0 -40
  267. package/dist/esm/plugins/card/toolbar.js +0 -353
  268. package/dist/esm/plugins/card/types.js +0 -1
  269. package/dist/esm/plugins/card/ui/DatasourceModal/ModalWithState.js +0 -17
  270. package/dist/esm/plugins/card/ui/DatasourceModal/index.js +0 -49
  271. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +0 -243
  272. package/dist/esm/plugins/card/ui/EditorSmartCardEvents.js +0 -14
  273. package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +0 -202
  274. package/dist/esm/plugins/card/ui/HyperlinkToolbarAppearance.js +0 -163
  275. package/dist/esm/plugins/card/ui/LayoutButton/index.js +0 -102
  276. package/dist/esm/plugins/card/ui/LayoutButton/styled.js +0 -10
  277. package/dist/esm/plugins/card/ui/LayoutButton/types.js +0 -1
  278. package/dist/esm/plugins/card/ui/LayoutButton/utils.js +0 -12
  279. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +0 -140
  280. package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +0 -355
  281. package/dist/esm/plugins/card/ui/SmallerEditIcon.js +0 -11
  282. package/dist/esm/plugins/card/utils.js +0 -48
  283. package/dist/types/plugins/card/index.d.ts +0 -26
  284. package/dist/types/plugins/card/messages.d.ts +0 -12
  285. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +0 -26
  286. package/dist/types/plugins/card/nodeviews/datasource.d.ts +0 -42
  287. package/dist/types/plugins/card/nodeviews/embedCard.d.ts +0 -46
  288. package/dist/types/plugins/card/nodeviews/genericCard.d.ts +0 -37
  289. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +0 -23
  290. package/dist/types/plugins/card/pm-plugins/actions.d.ts +0 -23
  291. package/dist/types/plugins/card/pm-plugins/analytics/create-analytics-queue.d.ts +0 -10
  292. package/dist/types/plugins/card/pm-plugins/analytics/events-from-tr.d.ts +0 -17
  293. package/dist/types/plugins/card/pm-plugins/analytics/index.d.ts +0 -2
  294. package/dist/types/plugins/card/pm-plugins/analytics/types.d.ts +0 -12
  295. package/dist/types/plugins/card/pm-plugins/analytics/utils.d.ts +0 -32
  296. package/dist/types/plugins/card/pm-plugins/doc.d.ts +0 -23
  297. package/dist/types/plugins/card/pm-plugins/keymap.d.ts +0 -3
  298. package/dist/types/plugins/card/pm-plugins/main.d.ts +0 -6
  299. package/dist/types/plugins/card/pm-plugins/mountHyperlink.d.ts +0 -5
  300. package/dist/types/plugins/card/pm-plugins/plugin-key.d.ts +0 -3
  301. package/dist/types/plugins/card/pm-plugins/reducers.d.ts +0 -3
  302. package/dist/types/plugins/card/pm-plugins/shouldReplaceLink.d.ts +0 -2
  303. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +0 -8
  304. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +0 -31
  305. package/dist/types/plugins/card/toolbar.d.ts +0 -12
  306. package/dist/types/plugins/card/types.d.ts +0 -165
  307. package/dist/types/plugins/card/ui/DatasourceModal/ModalWithState.d.ts +0 -9
  308. package/dist/types/plugins/card/ui/DatasourceModal/index.d.ts +0 -11
  309. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +0 -47
  310. package/dist/types/plugins/card/ui/EditorSmartCardEvents.d.ts +0 -5
  311. package/dist/types/plugins/card/ui/EditorSmartCardEventsNext.d.ts +0 -18
  312. package/dist/types/plugins/card/ui/HyperlinkToolbarAppearance.d.ts +0 -32
  313. package/dist/types/plugins/card/ui/LayoutButton/index.d.ts +0 -9
  314. package/dist/types/plugins/card/ui/LayoutButton/styled.d.ts +0 -1
  315. package/dist/types/plugins/card/ui/LayoutButton/types.d.ts +0 -19
  316. package/dist/types/plugins/card/ui/LayoutButton/utils.d.ts +0 -5
  317. package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +0 -29
  318. package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +0 -61
  319. package/dist/types/plugins/card/ui/SmallerEditIcon.d.ts +0 -3
  320. package/dist/types/plugins/card/utils.d.ts +0 -19
  321. package/dist/types-ts4.5/plugins/card/index.d.ts +0 -26
  322. package/dist/types-ts4.5/plugins/card/messages.d.ts +0 -12
  323. package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +0 -26
  324. package/dist/types-ts4.5/plugins/card/nodeviews/datasource.d.ts +0 -42
  325. package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +0 -46
  326. package/dist/types-ts4.5/plugins/card/nodeviews/genericCard.d.ts +0 -37
  327. package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +0 -23
  328. package/dist/types-ts4.5/plugins/card/pm-plugins/actions.d.ts +0 -23
  329. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/create-analytics-queue.d.ts +0 -10
  330. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/events-from-tr.d.ts +0 -17
  331. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/index.d.ts +0 -2
  332. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/types.d.ts +0 -12
  333. package/dist/types-ts4.5/plugins/card/pm-plugins/analytics/utils.d.ts +0 -32
  334. package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +0 -23
  335. package/dist/types-ts4.5/plugins/card/pm-plugins/keymap.d.ts +0 -3
  336. package/dist/types-ts4.5/plugins/card/pm-plugins/main.d.ts +0 -6
  337. package/dist/types-ts4.5/plugins/card/pm-plugins/mountHyperlink.d.ts +0 -5
  338. package/dist/types-ts4.5/plugins/card/pm-plugins/plugin-key.d.ts +0 -3
  339. package/dist/types-ts4.5/plugins/card/pm-plugins/reducers.d.ts +0 -3
  340. package/dist/types-ts4.5/plugins/card/pm-plugins/shouldReplaceLink.d.ts +0 -2
  341. package/dist/types-ts4.5/plugins/card/pm-plugins/util/resolve.d.ts +0 -8
  342. package/dist/types-ts4.5/plugins/card/pm-plugins/util/state.d.ts +0 -31
  343. package/dist/types-ts4.5/plugins/card/toolbar.d.ts +0 -12
  344. package/dist/types-ts4.5/plugins/card/types.d.ts +0 -165
  345. package/dist/types-ts4.5/plugins/card/ui/DatasourceModal/ModalWithState.d.ts +0 -9
  346. package/dist/types-ts4.5/plugins/card/ui/DatasourceModal/index.d.ts +0 -11
  347. package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +0 -47
  348. package/dist/types-ts4.5/plugins/card/ui/EditorSmartCardEvents.d.ts +0 -5
  349. package/dist/types-ts4.5/plugins/card/ui/EditorSmartCardEventsNext.d.ts +0 -18
  350. package/dist/types-ts4.5/plugins/card/ui/HyperlinkToolbarAppearance.d.ts +0 -32
  351. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/index.d.ts +0 -9
  352. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/styled.d.ts +0 -1
  353. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/types.d.ts +0 -19
  354. package/dist/types-ts4.5/plugins/card/ui/LayoutButton/utils.d.ts +0 -5
  355. package/dist/types-ts4.5/plugins/card/ui/LinkToolbarAppearance.d.ts +0 -29
  356. package/dist/types-ts4.5/plugins/card/ui/ResizableEmbedCard.d.ts +0 -61
  357. package/dist/types-ts4.5/plugins/card/ui/SmallerEditIcon.d.ts +0 -3
  358. package/dist/types-ts4.5/plugins/card/utils.d.ts +0 -19
@@ -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 {};
@@ -1,47 +0,0 @@
1
- import React from 'react';
2
- import { Node } from 'prosemirror-model';
3
- import { EditorView } from 'prosemirror-view';
4
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
- import type { LinkInputType, LinkPickerOptions } from '@atlaskit/editor-common/types';
7
- import { HyperlinkAddToolbarProps } from '@atlaskit/editor-common/link';
8
- import type { Command, FloatingToolbarItem, FloatingToolbarConfig, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
9
- import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
10
- import { FeatureFlags } from '@atlaskit/editor-common/types';
11
- import type cardPlugin from '../index';
12
- import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
13
- export type EditLinkToolbarProps = {
14
- view: EditorView;
15
- providerFactory: ProviderFactory;
16
- url: string | undefined;
17
- text: string;
18
- node: Node;
19
- onSubmit?: (href: string, text?: string, inputMethod?: LinkInputType, analytic?: UIAnalyticsEvent | null | undefined) => void;
20
- linkPickerOptions?: LinkPickerOptions;
21
- featureFlags: FeatureFlags;
22
- forceFocusSelector: ForceFocusSelector | undefined;
23
- pluginInjectionApi: any;
24
- };
25
- export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, featureFlags, onClose, onEscapeCallback, onClickAwayCallback, pluginInjectionApi, }: HyperlinkAddToolbarProps & {
26
- pluginInjectionApi: any;
27
- }): JSX.Element;
28
- export declare class EditLinkToolbar extends React.Component<EditLinkToolbarProps> {
29
- componentDidUpdate(prevProps: EditLinkToolbarProps): void;
30
- componentWillUnmount(): void;
31
- /** Focus should move to the 'Edit link' button when the toolbar closes
32
- * and not close the floating toolbar.
33
- */
34
- private handleEsc;
35
- private hideLinkToolbar;
36
- render(): JSX.Element;
37
- }
38
- export declare const editLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
39
- export declare const buildEditLinkToolbar: ({ providerFactory, node, linkPicker, featureFlags, pluginInjectionApi, }: {
40
- providerFactory: ProviderFactory;
41
- node: Node;
42
- linkPicker?: LinkPickerOptions | undefined;
43
- featureFlags: FeatureFlags;
44
- pluginInjectionApi: ExtractInjectionAPI<typeof cardPlugin> | undefined;
45
- }) => FloatingToolbarItem<Command>;
46
- export declare const editLinkToolbarConfig: (showLinkingToolbar: boolean, lpLinkPicker: boolean) => Partial<FloatingToolbarConfig>;
47
- export declare const editDatasource: (node: Node, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
@@ -1,5 +0,0 @@
1
- import { FC } from 'react';
2
- import { EditorView } from 'prosemirror-view';
3
- export declare const EditorSmartCardEvents: FC<{
4
- editorView: EditorView;
5
- }>;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { EditorView } from 'prosemirror-view';
4
- type AnalyticsBindingsProps = {
5
- editorView: EditorView;
6
- };
7
- /**
8
- * Binds the @atlaskit/link-analytics callbacks
9
- * to the editor card plugin state events callbacks interfaces
10
- */
11
- export declare const EventsBinding: ({ editorView }: AnalyticsBindingsProps) => null;
12
- export declare class EditorSmartCardEventsNext extends React.PureComponent<AnalyticsBindingsProps> {
13
- static contextTypes: {
14
- contextAdapter: PropTypes.Requireable<object>;
15
- };
16
- render(): JSX.Element | null;
17
- }
18
- export {};
@@ -1,32 +0,0 @@
1
- import { Component } from 'react';
2
- import { ProviderFactory, CardProvider } from '@atlaskit/editor-common/provider-factory';
3
- import { CardOptions } from '@atlaskit/editor-common/card';
4
- import { IntlShape } from 'react-intl-next';
5
- import { EditorState } from 'prosemirror-state';
6
- import { EditorView } from 'prosemirror-view';
7
- import { CardPlatform } from '@atlaskit/smart-card';
8
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
9
- import type { CardPluginActions } from '@atlaskit/editor-common/card';
10
- export interface HyperlinkToolbarAppearanceProps {
11
- intl: IntlShape;
12
- editorState: EditorState;
13
- providerFactory: ProviderFactory;
14
- url: string;
15
- editorView?: EditorView;
16
- platform?: CardPlatform;
17
- cardOptions?: CardOptions;
18
- editorAnalyticsApi: EditorAnalyticsAPI | undefined;
19
- cardActions: CardPluginActions | undefined;
20
- }
21
- export interface HyperlinkToolbarAppearanceState {
22
- supportedUrlsMap: Map<string, boolean>;
23
- }
24
- export declare class HyperlinkToolbarAppearance extends Component<HyperlinkToolbarAppearanceProps, HyperlinkToolbarAppearanceState> {
25
- state: HyperlinkToolbarAppearanceState;
26
- cardProvider?: CardProvider;
27
- private getProvider;
28
- private resolveUrl;
29
- componentDidMount: () => Promise<void>;
30
- UNSAFE_componentWillReceiveProps(nextProps: HyperlinkToolbarAppearanceProps): void;
31
- render(): JSX.Element | null;
32
- }
@@ -1,9 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import { WrappedComponentProps } from 'react-intl-next';
4
- import { LayoutButtonProps, LayoutButtonWrapperProps } from './types';
5
- export declare const LayoutButton: React.FC<LayoutButtonProps>;
6
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<LayoutButtonWrapperProps & WrappedComponentProps<"intl">>> & {
7
- WrappedComponent: React.ComponentType<LayoutButtonWrapperProps & WrappedComponentProps<"intl">>;
8
- };
9
- export default _default;
@@ -1 +0,0 @@
1
- export declare const toolbarButtonWrapper: import("@emotion/react").SerializedStyles;
@@ -1,19 +0,0 @@
1
- import { EditorView } from 'prosemirror-view';
2
- import { IntlShape } from 'react-intl-next';
3
- import type cardPlugin from '../../index';
4
- import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
- export type DatasourceTableLayout = 'full-width' | 'center' | 'wide';
6
- export type LayoutButtonProps = {
7
- mountPoint?: HTMLElement;
8
- boundariesElement?: HTMLElement;
9
- scrollableElement?: HTMLElement;
10
- targetElement?: HTMLElement;
11
- layout: DatasourceTableLayout;
12
- onLayoutChange?: (layout: DatasourceTableLayout) => void;
13
- testId?: string;
14
- intl: IntlShape;
15
- };
16
- export interface LayoutButtonWrapperProps extends Pick<LayoutButtonProps, 'mountPoint' | 'boundariesElement' | 'scrollableElement'> {
17
- api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
18
- editorView: EditorView;
19
- }
@@ -1,5 +0,0 @@
1
- import { EditorView } from 'prosemirror-view';
2
- export declare const getDatasource: (editorView: EditorView) => import("prosemirror-utils").ContentNodeWithPos | {
3
- node: undefined;
4
- pos: undefined;
5
- };
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { EditorState } from 'prosemirror-state';
4
- import { EditorView } from 'prosemirror-view';
5
- import { IntlShape } from 'react-intl-next';
6
- import { CardContext } from '@atlaskit/link-provider';
7
- import { CardPlatform } from '@atlaskit/smart-card';
8
- import { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
9
- import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
10
- import { CardPluginActions } from '@atlaskit/editor-common/card';
11
- export interface LinkToolbarAppearanceProps {
12
- intl: IntlShape;
13
- editorAnalyticsApi: EditorAnalyticsAPI | undefined;
14
- currentAppearance?: CardAppearance;
15
- editorState: EditorState;
16
- editorView?: EditorView;
17
- url?: string;
18
- allowEmbeds?: boolean;
19
- allowBlockCards?: boolean;
20
- platform?: CardPlatform;
21
- cardActions: CardPluginActions | undefined;
22
- }
23
- export declare class LinkToolbarAppearance extends React.Component<LinkToolbarAppearanceProps, {}> {
24
- static contextTypes: {
25
- contextAdapter: PropTypes.Requireable<object>;
26
- };
27
- renderDropdown: (view?: EditorView, cardContext?: CardContext) => JSX.Element | null;
28
- render(): JSX.Element | null;
29
- }
@@ -1,61 +0,0 @@
1
- /// <reference path="../../../../../../../../typings/prosemirror.d.ts" />
2
- /** @jsx jsx */
3
- import React from 'react';
4
- import { jsx } from '@emotion/react';
5
- import { RichMediaLayout } from '@atlaskit/adf-schema';
6
- import { ResizerProps } from '@atlaskit/editor-common/ui';
7
- type State = {
8
- offsetLeft: number;
9
- resizedPctWidth?: number;
10
- };
11
- export type Props = Omit<ResizerProps, 'height' | 'width'> & {
12
- width?: number;
13
- height?: number;
14
- aspectRatio: number;
15
- };
16
- export default class ResizableEmbedCard extends React.Component<Props, State> {
17
- static defaultProps: {
18
- aspectRatio: number;
19
- };
20
- state: State;
21
- componentDidUpdate(): void;
22
- get wrappedLayout(): boolean;
23
- UNSAFE_componentWillReceiveProps(nextProps: Props): void;
24
- /**
25
- * When returning to center layout from a wrapped/aligned layout, it might actually
26
- * be wide or full-width
27
- */
28
- checkLayout(oldLayout: RichMediaLayout, newLayout: RichMediaLayout): void;
29
- calcNewSize: (newWidth: number, stop: boolean) => {
30
- width: number | null;
31
- layout: RichMediaLayout;
32
- };
33
- calcUnwrappedLayout: (pct: number, width: number) => 'center' | 'wide' | 'full-width';
34
- get $pos(): import("prosemirror-model").ResolvedPos | null;
35
- /**
36
- * The maxmimum number of grid columns this node can resize to.
37
- */
38
- get gridWidth(): number;
39
- calcOffsetLeft(): number;
40
- calcColumnLeftOffset: () => number;
41
- wrapper?: HTMLElement;
42
- get wideLayoutWidth(): number;
43
- calcSnapPoints(): number[];
44
- calcPxWidth: (useLayout?: RichMediaLayout) => number;
45
- get insideInlineLike(): boolean;
46
- highlights: (newWidth: number, snapPoints: number[]) => string[] | number[];
47
- /**
48
- * Previously height of the box was controlled with paddingTop/paddingBottom trick inside Wrapper.
49
- * It allowed height to be defined by a given percent ratio and so absolute value was defined by actual width.
50
- * Also, it was part of styled component, which was fine because it was static through out life time of component.
51
- *
52
- * Now, two things changed:
53
- * 1. If `height` is present we take it as actual height of the box, and hence we don't need
54
- * (or even can't have, due to lack of width value) paddingTop trick.
55
- * 2. Since `height` can be changing through out life time of a component, we can't have it as part of styled component,
56
- * and hence we use `style` prop.
57
- */
58
- private getHeightDefiningComponent;
59
- render(): jsx.JSX.Element;
60
- }
61
- export {};
@@ -1,3 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- export declare const SmallerEditIcon: () => jsx.JSX.Element;
@@ -1,19 +0,0 @@
1
- import { EditorState } from 'prosemirror-state';
2
- import { NodeType, Node } from 'prosemirror-model';
3
- import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
4
- import { CardInfo } from './types';
5
- export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
6
- export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
7
- export type TitleUrlPair = {
8
- title?: string;
9
- url?: string;
10
- };
11
- export declare const titleUrlPairFromNode: (node: Node) => TitleUrlPair;
12
- /**
13
- * Merges the title and url from attributes and CardInfo from the resolved view, preferring the CardInfo.
14
- * @param titleUrlPair title and url information from the node attributes
15
- * @param info information stored in state from the resolved UI component view
16
- */
17
- export declare const mergeCardInfo: (titleUrlPair: TitleUrlPair, info?: CardInfo) => TitleUrlPair;
18
- export declare const displayInfoForCard: (node: Node, info?: CardInfo) => TitleUrlPair;
19
- export declare const findCardInfo: (state: EditorState) => CardInfo | undefined;