@atlaskit/editor-core 183.1.1 → 184.0.0

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 (268) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/i18n/da.js +1 -1
  3. package/dist/cjs/i18n/en_ZZ.js +8 -34
  4. package/dist/cjs/i18n/it.js +1 -1
  5. package/dist/cjs/i18n/nb.js +3 -3
  6. package/dist/cjs/i18n/nl.js +4 -4
  7. package/dist/cjs/i18n/pl.js +1 -1
  8. package/dist/cjs/i18n/pt_BR.js +1 -1
  9. package/dist/cjs/i18n/ru.js +1 -1
  10. package/dist/cjs/i18n/th.js +2 -2
  11. package/dist/cjs/i18n/uk.js +1 -1
  12. package/dist/cjs/i18n/vi.js +2 -2
  13. package/dist/cjs/i18n/zh.js +1 -1
  14. package/dist/cjs/labs/next/full-page.js +2 -6
  15. package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +4 -2
  16. package/dist/cjs/labs/next/presets/default.js +2 -2
  17. package/dist/cjs/labs/next/presets/universal.js +2 -1
  18. package/dist/cjs/plugins/breakout/index.js +54 -35
  19. package/dist/cjs/plugins/card/toolbar.js +4 -3
  20. package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -3
  21. package/dist/cjs/plugins/copy-button/commands.js +8 -1
  22. package/dist/cjs/plugins/extension/index.js +1 -1
  23. package/dist/cjs/plugins/extension/nodeviews/extension.js +5 -3
  24. package/dist/cjs/plugins/extension/pm-plugins/main.js +6 -6
  25. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +34 -4
  26. package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
  27. package/dist/cjs/plugins/extension/ui/Extension/index.js +4 -2
  28. package/dist/cjs/plugins/help-dialog/index.js +12 -8
  29. package/dist/cjs/plugins/index.js +0 -14
  30. package/dist/cjs/plugins/layout/pm-plugins/main.js +0 -1
  31. package/dist/cjs/plugins/media/index.js +15 -5
  32. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
  33. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +53 -34
  34. package/dist/cjs/plugins/media/styles.js +1 -1
  35. package/dist/cjs/plugins/media/toolbar/index.js +4 -3
  36. package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +4 -1
  37. package/dist/cjs/plugins/paste/pm-plugins/main.js +7 -1
  38. package/dist/cjs/test-utils.js +6 -1
  39. package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
  40. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -2
  41. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -2
  42. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
  43. package/dist/cjs/ui/ContentStyles/index.js +9 -10
  44. package/dist/cjs/ui/ContextPanel/index.js +67 -56
  45. package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +10 -11
  46. package/dist/cjs/ui/Resizer/index.js +8 -8
  47. package/dist/cjs/ui/WidthEmitter/index.js +10 -4
  48. package/dist/cjs/utils/clipboard.js +18 -11
  49. package/dist/cjs/utils/performance/instrumented-plugin.js +14 -2
  50. package/dist/cjs/version-wrapper.js +1 -1
  51. package/dist/cjs/version.json +1 -1
  52. package/dist/es2019/i18n/da.js +1 -1
  53. package/dist/es2019/i18n/en_ZZ.js +8 -34
  54. package/dist/es2019/i18n/it.js +1 -1
  55. package/dist/es2019/i18n/nb.js +3 -3
  56. package/dist/es2019/i18n/nl.js +4 -4
  57. package/dist/es2019/i18n/pl.js +1 -1
  58. package/dist/es2019/i18n/pt_BR.js +1 -1
  59. package/dist/es2019/i18n/ru.js +1 -1
  60. package/dist/es2019/i18n/th.js +2 -2
  61. package/dist/es2019/i18n/uk.js +1 -1
  62. package/dist/es2019/i18n/vi.js +2 -2
  63. package/dist/es2019/i18n/zh.js +1 -1
  64. package/dist/es2019/labs/next/full-page.js +2 -5
  65. package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +4 -2
  66. package/dist/es2019/labs/next/presets/default.js +1 -1
  67. package/dist/es2019/labs/next/presets/universal.js +2 -1
  68. package/dist/es2019/plugins/breakout/index.js +48 -31
  69. package/dist/es2019/plugins/card/toolbar.js +4 -3
  70. package/dist/es2019/plugins/collab-edit/plugin-state.js +2 -4
  71. package/dist/es2019/plugins/copy-button/commands.js +9 -2
  72. package/dist/es2019/plugins/extension/index.js +1 -1
  73. package/dist/es2019/plugins/extension/nodeviews/extension.js +5 -3
  74. package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
  75. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +38 -2
  76. package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
  77. package/dist/es2019/plugins/extension/ui/Extension/index.js +4 -2
  78. package/dist/es2019/plugins/help-dialog/index.js +14 -9
  79. package/dist/es2019/plugins/index.js +0 -2
  80. package/dist/es2019/plugins/layout/pm-plugins/main.js +0 -1
  81. package/dist/es2019/plugins/media/index.js +15 -5
  82. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +21 -10
  83. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +53 -33
  84. package/dist/es2019/plugins/media/styles.js +1 -7
  85. package/dist/es2019/plugins/media/toolbar/index.js +4 -4
  86. package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +9 -9
  87. package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -1
  88. package/dist/es2019/test-utils.js +6 -1
  89. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
  90. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
  91. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
  92. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
  93. package/dist/es2019/ui/ContentStyles/index.js +1 -2
  94. package/dist/es2019/ui/ContextPanel/index.js +66 -43
  95. package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +8 -9
  96. package/dist/es2019/ui/Resizer/index.js +1 -1
  97. package/dist/es2019/ui/WidthEmitter/index.js +10 -4
  98. package/dist/es2019/utils/clipboard.js +12 -7
  99. package/dist/es2019/utils/performance/instrumented-plugin.js +15 -2
  100. package/dist/es2019/version-wrapper.js +1 -1
  101. package/dist/es2019/version.json +1 -1
  102. package/dist/esm/i18n/da.js +1 -1
  103. package/dist/esm/i18n/en_ZZ.js +8 -34
  104. package/dist/esm/i18n/it.js +1 -1
  105. package/dist/esm/i18n/nb.js +3 -3
  106. package/dist/esm/i18n/nl.js +4 -4
  107. package/dist/esm/i18n/pl.js +1 -1
  108. package/dist/esm/i18n/pt_BR.js +1 -1
  109. package/dist/esm/i18n/ru.js +1 -1
  110. package/dist/esm/i18n/th.js +2 -2
  111. package/dist/esm/i18n/uk.js +1 -1
  112. package/dist/esm/i18n/vi.js +2 -2
  113. package/dist/esm/i18n/zh.js +1 -1
  114. package/dist/esm/labs/next/full-page.js +2 -5
  115. package/dist/esm/labs/next/presets/create-stub-internal-apis.js +4 -2
  116. package/dist/esm/labs/next/presets/default.js +1 -1
  117. package/dist/esm/labs/next/presets/universal.js +2 -1
  118. package/dist/esm/plugins/breakout/index.js +54 -35
  119. package/dist/esm/plugins/card/toolbar.js +4 -3
  120. package/dist/esm/plugins/collab-edit/plugin-state.js +2 -3
  121. package/dist/esm/plugins/copy-button/commands.js +9 -2
  122. package/dist/esm/plugins/extension/index.js +1 -1
  123. package/dist/esm/plugins/extension/nodeviews/extension.js +5 -3
  124. package/dist/esm/plugins/extension/pm-plugins/main.js +6 -6
  125. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +33 -2
  126. package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
  127. package/dist/esm/plugins/extension/ui/Extension/index.js +4 -2
  128. package/dist/esm/plugins/help-dialog/index.js +12 -8
  129. package/dist/esm/plugins/index.js +0 -2
  130. package/dist/esm/plugins/layout/pm-plugins/main.js +0 -1
  131. package/dist/esm/plugins/media/index.js +15 -5
  132. package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
  133. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +54 -35
  134. package/dist/esm/plugins/media/styles.js +2 -2
  135. package/dist/esm/plugins/media/toolbar/index.js +4 -3
  136. package/dist/esm/plugins/media/ui/ImageBorder/styles.js +4 -1
  137. package/dist/esm/plugins/paste/pm-plugins/main.js +7 -1
  138. package/dist/esm/test-utils.js +6 -1
  139. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
  140. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
  141. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
  142. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
  143. package/dist/esm/ui/ContentStyles/index.js +1 -2
  144. package/dist/esm/ui/ContextPanel/index.js +64 -53
  145. package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +10 -11
  146. package/dist/esm/ui/Resizer/index.js +1 -1
  147. package/dist/esm/ui/WidthEmitter/index.js +10 -4
  148. package/dist/esm/utils/clipboard.js +16 -10
  149. package/dist/esm/utils/performance/instrumented-plugin.js +14 -2
  150. package/dist/esm/version-wrapper.js +1 -1
  151. package/dist/esm/version.json +1 -1
  152. package/dist/types/actions/index.d.ts +1 -1
  153. package/dist/types/create-editor/get-plugins.d.ts +2 -0
  154. package/dist/types/i18n/en_ZZ.d.ts +2 -28
  155. package/dist/types/index.d.ts +0 -1
  156. package/dist/types/plugins/breakout/index.d.ts +4 -0
  157. package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -1
  158. package/dist/types/plugins/card/index.d.ts +2 -2
  159. package/dist/types/plugins/collab-edit/actions.d.ts +3 -2
  160. package/dist/types/plugins/collab-edit/events/handlers.d.ts +3 -3
  161. package/dist/types/plugins/collab-edit/events/initialize.d.ts +1 -1
  162. package/dist/types/plugins/collab-edit/events/send-transaction.d.ts +1 -1
  163. package/dist/types/plugins/collab-edit/index.d.ts +0 -1
  164. package/dist/types/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
  165. package/dist/types/plugins/collab-edit/participants.d.ts +1 -1
  166. package/dist/types/plugins/collab-edit/plugin.d.ts +0 -2
  167. package/dist/types/plugins/collab-edit/types.d.ts +1 -3
  168. package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
  169. package/dist/types/plugins/collab-edit/utils.d.ts +2 -1
  170. package/dist/types/plugins/extension/index.d.ts +2 -1
  171. package/dist/types/plugins/extension/nodeviews/extension.d.ts +4 -1
  172. package/dist/types/plugins/extension/pm-plugins/main.d.ts +3 -1
  173. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
  174. package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
  175. package/dist/types/plugins/extension/ui/Extension/index.d.ts +3 -0
  176. package/dist/types/plugins/help-dialog/index.d.ts +3 -1
  177. package/dist/types/plugins/index.d.ts +0 -3
  178. package/dist/types/plugins/media/index.d.ts +12 -2
  179. package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
  180. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
  181. package/dist/types/plugins/media/nodeviews/types.d.ts +2 -1
  182. package/dist/types/plugins/media/toolbar/index.d.ts +3 -1
  183. package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
  184. package/dist/types/test-utils.d.ts +3 -1
  185. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  186. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
  187. package/dist/types/ui/ContextPanel/index.d.ts +3 -4
  188. package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
  189. package/dist/types/ui/PluginSlot/index.d.ts +1 -1
  190. package/dist/types/ui/Resizer/types.d.ts +2 -2
  191. package/dist/types/utils/clipboard.d.ts +1 -0
  192. package/dist/types-ts4.5/actions/index.d.ts +1 -1
  193. package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -0
  194. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +2 -28
  195. package/dist/types-ts4.5/index.d.ts +0 -1
  196. package/dist/types-ts4.5/plugins/breakout/index.d.ts +6 -0
  197. package/dist/types-ts4.5/plugins/breakout/ui/LayoutButton.d.ts +1 -1
  198. package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
  199. package/dist/types-ts4.5/plugins/collab-edit/actions.d.ts +3 -2
  200. package/dist/types-ts4.5/plugins/collab-edit/events/handlers.d.ts +3 -3
  201. package/dist/types-ts4.5/plugins/collab-edit/events/initialize.d.ts +1 -1
  202. package/dist/types-ts4.5/plugins/collab-edit/events/send-transaction.d.ts +1 -1
  203. package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +0 -1
  204. package/dist/types-ts4.5/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
  205. package/dist/types-ts4.5/plugins/collab-edit/participants.d.ts +1 -1
  206. package/dist/types-ts4.5/plugins/collab-edit/plugin.d.ts +0 -2
  207. package/dist/types-ts4.5/plugins/collab-edit/types.d.ts +1 -3
  208. package/dist/types-ts4.5/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
  209. package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +2 -1
  210. package/dist/types-ts4.5/plugins/extension/index.d.ts +3 -1
  211. package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +4 -1
  212. package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +3 -1
  213. package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
  214. package/dist/types-ts4.5/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
  215. package/dist/types-ts4.5/plugins/extension/ui/Extension/index.d.ts +3 -0
  216. package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +5 -1
  217. package/dist/types-ts4.5/plugins/index.d.ts +0 -3
  218. package/dist/types-ts4.5/plugins/media/index.d.ts +9 -2
  219. package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
  220. package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
  221. package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +2 -1
  222. package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +3 -1
  223. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
  224. package/dist/types-ts4.5/test-utils.d.ts +3 -1
  225. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  226. package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -1
  227. package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +3 -4
  228. package/dist/types-ts4.5/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
  229. package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +1 -1
  230. package/dist/types-ts4.5/ui/Resizer/types.d.ts +2 -2
  231. package/dist/types-ts4.5/utils/clipboard.d.ts +1 -0
  232. package/package.json +20 -18
  233. package/report.api.md +15 -63
  234. package/dist/cjs/plugins/collab-edit/provider/index.js +0 -5
  235. package/dist/cjs/plugins/collab-edit/provider/types.js +0 -5
  236. package/dist/cjs/plugins/grid/index.js +0 -207
  237. package/dist/cjs/plugins/grid/styles.js +0 -16
  238. package/dist/cjs/plugins/grid/types.js +0 -5
  239. package/dist/cjs/plugins/width/index.js +0 -88
  240. package/dist/cjs/ui/ContextPanel/context.js +0 -89
  241. package/dist/es2019/plugins/collab-edit/provider/index.js +0 -1
  242. package/dist/es2019/plugins/collab-edit/provider/types.js +0 -1
  243. package/dist/es2019/plugins/grid/index.js +0 -168
  244. package/dist/es2019/plugins/grid/styles.js +0 -36
  245. package/dist/es2019/plugins/grid/types.js +0 -1
  246. package/dist/es2019/plugins/width/index.js +0 -72
  247. package/dist/es2019/ui/ContextPanel/context.js +0 -65
  248. package/dist/esm/plugins/collab-edit/provider/index.js +0 -1
  249. package/dist/esm/plugins/collab-edit/provider/types.js +0 -1
  250. package/dist/esm/plugins/grid/index.js +0 -191
  251. package/dist/esm/plugins/grid/styles.js +0 -7
  252. package/dist/esm/plugins/grid/types.js +0 -1
  253. package/dist/esm/plugins/width/index.js +0 -78
  254. package/dist/esm/ui/ContextPanel/context.js +0 -79
  255. package/dist/types/plugins/collab-edit/provider/index.d.ts +0 -1
  256. package/dist/types/plugins/collab-edit/provider/types.d.ts +0 -1
  257. package/dist/types/plugins/grid/index.d.ts +0 -25
  258. package/dist/types/plugins/grid/styles.d.ts +0 -2
  259. package/dist/types/plugins/grid/types.d.ts +0 -7
  260. package/dist/types/plugins/width/index.d.ts +0 -18
  261. package/dist/types/ui/ContextPanel/context.d.ts +0 -24
  262. package/dist/types-ts4.5/plugins/collab-edit/provider/index.d.ts +0 -1
  263. package/dist/types-ts4.5/plugins/collab-edit/provider/types.d.ts +0 -1
  264. package/dist/types-ts4.5/plugins/grid/index.d.ts +0 -27
  265. package/dist/types-ts4.5/plugins/grid/styles.d.ts +0 -2
  266. package/dist/types-ts4.5/plugins/grid/types.d.ts +0 -7
  267. package/dist/types-ts4.5/plugins/width/index.d.ts +0 -18
  268. package/dist/types-ts4.5/ui/ContextPanel/context.d.ts +0 -24
@@ -140,11 +140,11 @@ export default {
140
140
  'fabric.editor.helpDialogTips': 'Trykk på {keyMap} for å åpne denne dialogen',
141
141
  'fabric.editor.hyperlink.linkAriaLabel': 'Koblingsetikett',
142
142
  'fabric.editor.hyperlink.searchLinkAriaDescription': 'Forslag vises nedenfor etter hvert som du skriver inn i feltet',
143
- 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {finner ingen resultater} one {fant {count,number} resultat} other {fant {count,number} resultater}}',
143
+ 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {fant ingen resultater} one {fant {count,number} resultat} other {fant {count,number} resultater}}',
144
144
  'fabric.editor.hyperlinkToolbarPlaceholder': 'Lim inn eller søk etter kobling',
145
145
  'fabric.editor.imageBorderBold': 'Fet',
146
146
  'fabric.editor.imageBorderColor': 'Farge',
147
- 'fabric.editor.imageBorderMedium': 'Medium',
147
+ 'fabric.editor.imageBorderMedium': 'Middels',
148
148
  'fabric.editor.imageBorderOptions': 'Alternativer for kantlinje',
149
149
  'fabric.editor.imageBorderSize': 'Størrelse',
150
150
  'fabric.editor.imageBorderSubtle': 'Diskret',
@@ -158,7 +158,7 @@ export default {
158
158
  'fabric.editor.inputQueryAssistiveTxt': 'Når resultater for autofullføring er tilgjengelig, bruker du pil opp og pil ned for å se gjennom og enter for å velge. Brukere av berøringsenheter kan utforske ved å berøre eller sveipe.',
159
159
  'fabric.editor.invalidDateError': 'Oppgi en gyldig dato',
160
160
  'fabric.editor.invalidLink': 'Skriv inn en gyldig kobling.',
161
- 'fabric.editor.inviteItem.title': '{userRole, select, admin {Inviter teammedlem til {productName}} trusted {Inviter teammedlem til {productName}} other {Legg til teammedlem i {productName}}}',
161
+ 'fabric.editor.inviteItem.title': '{userRole, select, admin {Inviter teammedlemmer til {productName}} trusted {Inviter teammedlemmer til {productName}} other {Legg til teammedlem i {productName}}}',
162
162
  'fabric.editor.italic': 'Kursiv',
163
163
  'fabric.editor.keyboardShortcuts': 'Tastatursnarveier',
164
164
  'fabric.editor.leftSidebar': 'Sidelinje til venstre',
@@ -8,7 +8,7 @@
8
8
  //Dutch (Netherlands)
9
9
  export default {
10
10
  'fabric.editor.addAltText': 'Alt-tekst',
11
- 'fabric.editor.addImageBorder': 'Rand toevoegen',
11
+ 'fabric.editor.addImageBorder': 'Kader toevoegen',
12
12
  'fabric.editor.alignCenter': 'Midden uitgelijnd',
13
13
  'fabric.editor.alignLeft': 'Links uitlijnen',
14
14
  'fabric.editor.alignRight': 'Rechts uitgelijnd',
@@ -145,7 +145,7 @@ export default {
145
145
  'fabric.editor.imageBorderBold': 'Vet',
146
146
  'fabric.editor.imageBorderColor': 'Kleur',
147
147
  'fabric.editor.imageBorderMedium': 'Medium',
148
- 'fabric.editor.imageBorderOptions': 'Randopties',
148
+ 'fabric.editor.imageBorderOptions': 'Kaderopties',
149
149
  'fabric.editor.imageBorderSize': 'Grootte',
150
150
  'fabric.editor.imageBorderSubtle': 'Subtiel',
151
151
  'fabric.editor.improvement': 'Verbetering',
@@ -158,7 +158,7 @@ export default {
158
158
  'fabric.editor.inputQueryAssistiveTxt': 'Wanneer resultaten voor automatisch aanvullen beschikbaar zijn, kun je de pijlen naar boven en beneden gebruiken om ze te bekijken en Enter om ze te selecteren. Touch-apparaatgebruikers verkennen door middel van aanraking of met veegbewegingen.',
159
159
  'fabric.editor.invalidDateError': 'Voer een geldige datum in',
160
160
  'fabric.editor.invalidLink': 'Voer een geldige link in.',
161
- 'fabric.editor.inviteItem.title': '{userRole, select, admin {Nodig teamgenoot uit voor {productName}} trusted {Nodig teamgenoot uit voor {productName}} other {Voeg teamgenoot toe aan {productName}}}',
161
+ 'fabric.editor.inviteItem.title': '{userRole, select, admin {Nodig teamgenoten uit voor {productName}} trusted {Nodig teamgenoten uit voor {productName}} other {Voeg teamgenoten toe aan {productName}}}',
162
162
  'fabric.editor.italic': 'Cursief',
163
163
  'fabric.editor.keyboardShortcuts': 'Sneltoetsen',
164
164
  'fabric.editor.leftSidebar': 'Zijbalk aan linkerkant',
@@ -195,7 +195,7 @@ export default {
195
195
  'fabric.editor.placeholderTextPlaceholder': 'Voeg plaatsaanduidingstekst toe',
196
196
  'fabric.editor.quickInsert': 'Snel invoegen',
197
197
  'fabric.editor.redo': 'Pas opnieuw toe',
198
- 'fabric.editor.removeImageBorder': 'Rand verwijderen',
198
+ 'fabric.editor.removeImageBorder': 'Kader verwijderen',
199
199
  'fabric.editor.replace': 'Vervangen',
200
200
  'fabric.editor.replaceAll': 'Alles vervangen',
201
201
  'fabric.editor.replaceWith': 'Vervangen met',
@@ -140,7 +140,7 @@ export default {
140
140
  'fabric.editor.helpDialogTips': 'Naciśnij {keyMap}, aby szybko otworzyć okno dialogowe w dowolnym momencie',
141
141
  'fabric.editor.hyperlink.linkAriaLabel': 'Etykieta łącza',
142
142
  'fabric.editor.hyperlink.searchLinkAriaDescription': 'Sugestie będą pojawiały się poniżej w miarę wpisywania tekstu w polu',
143
- 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {Nie znaleziono wyników} one {znaleziono {count,number} wynik} few {znaleziono {count,number} wyniki} many {znaleziono {count,number} wyników} other {znaleziono {count,number} wyniku}}',
143
+ 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {nie znaleziono wyników} one {znaleziono {count,number} wynik} few {znaleziono {count,number} wyniki} many {znaleziono {count,number} wyników} other {znaleziono {count,number} wyniku}}',
144
144
  'fabric.editor.hyperlinkToolbarPlaceholder': 'Wklej lub wyszukaj łącze',
145
145
  'fabric.editor.imageBorderBold': 'Pogrubiony',
146
146
  'fabric.editor.imageBorderColor': 'Kolor',
@@ -158,7 +158,7 @@ export default {
158
158
  'fabric.editor.inputQueryAssistiveTxt': 'Quando os resultados do preenchimento automático estiverem disponíveis, use as setas para cima e para baixo para analisar e a tecla enter para selecionar. Toque nos usuários do dispositivo, explore por toque ou com gestos de deslizar.',
159
159
  'fabric.editor.invalidDateError': 'Informe uma data válida',
160
160
  'fabric.editor.invalidLink': 'Insira um link válido.',
161
- 'fabric.editor.inviteItem.title': '{userRole, select, admin {Convidar colega de equipe para {productName}} trusted {Convidar colega de equipe para {productName}} other {Adicionar colega de equipe ao {productName}}}',
161
+ 'fabric.editor.inviteItem.title': '{userRole, select, admin {Convidar colega de equipe para {productName}} trusted {Convidar colega de equipe para {productName}} other {Adicionar colega de equipe para {productName}}}',
162
162
  'fabric.editor.italic': 'Itálico',
163
163
  'fabric.editor.keyboardShortcuts': 'Atalhos de teclado',
164
164
  'fabric.editor.leftSidebar': 'Barra lateral esquerda',
@@ -140,7 +140,7 @@ export default {
140
140
  'fabric.editor.helpDialogTips': 'Это окно можно быстро открыть в любое время нажатием {keyMap}',
141
141
  'fabric.editor.hyperlink.linkAriaLabel': 'Метка для ссылки',
142
142
  'fabric.editor.hyperlink.searchLinkAriaDescription': 'Предложения будут появляться по мере ввода текста в поле',
143
- 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {ничего не найдено} one {найден {count,number} результат} few {найдено {count,number} результата} many {найдено {count,number} результатов} other {найдено {count,number} результата}}',
143
+ 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {нет результатов} one {найден {count,number} результат} few {найдено {count,number} результата} many {найдено {count,number} результатов} other {найдено {count,number} результата}}',
144
144
  'fabric.editor.hyperlinkToolbarPlaceholder': 'Вставить или искать ссылку',
145
145
  'fabric.editor.imageBorderBold': 'Широкая',
146
146
  'fabric.editor.imageBorderColor': 'Цвет',
@@ -142,7 +142,7 @@ export default {
142
142
  'fabric.editor.hyperlink.searchLinkAriaDescription': 'ข้อเสนอแนะจะปรากฏด้านล่างเมื่อคุณพิมพ์ลงในช่อง',
143
143
  'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {ไม่พบผลลัพธ์} other {พบผลลัพธ์ {count,number} รายการ}}',
144
144
  'fabric.editor.hyperlinkToolbarPlaceholder': 'วางหรือค้นหาลิงก์',
145
- 'fabric.editor.imageBorderBold': 'เข้ม',
145
+ 'fabric.editor.imageBorderBold': 'ตัวหนา',
146
146
  'fabric.editor.imageBorderColor': 'สี',
147
147
  'fabric.editor.imageBorderMedium': 'ปานกลาง',
148
148
  'fabric.editor.imageBorderOptions': 'ตัวเลือกขอบ',
@@ -158,7 +158,7 @@ export default {
158
158
  'fabric.editor.inputQueryAssistiveTxt': 'เมื่อผลการป้อนอัตโนมัติพร้อมใช้งานแล้ว ให้ใช้ลูกศรขึ้นและลงเพื่อตรวจสอบและกด Enter เพื่อเลือก ผู้ใช้อุปกรณ์สัมผัส สำรวจโดยการแตะหรือการปัดนิ้ว',
159
159
  'fabric.editor.invalidDateError': 'ป้อนวันที่ที่ถูกต้อง',
160
160
  'fabric.editor.invalidLink': 'โปรดป้อนลิงก์ที่ถูกต้อง',
161
- 'fabric.editor.inviteItem.title': '{userRole, select, admin {เชิญเพื่อนร่วมทีมไปยัง {productName}} trusted {เชิญเพื่อนร่วมทีมไปยัง {productName}} other {เพิ่มเพื่อนร่วมทีมไปยัง {productName}}}',
161
+ 'fabric.editor.inviteItem.title': '{userRole, select, admin {เชิญเพื่อนร่วมทีมให้ไปยัง {productName}} trusted {เชิญเพื่อนร่วมทีมให้ไปยัง {productName}} other {เพิ่มเพื่อนร่วมทีมไปยัง {productName}}}',
162
162
  'fabric.editor.italic': 'ตัวเอียง',
163
163
  'fabric.editor.keyboardShortcuts': 'ปุ่มลัด',
164
164
  'fabric.editor.leftSidebar': 'แถบด้านซ้าย',
@@ -140,7 +140,7 @@ export default {
140
140
  'fabric.editor.helpDialogTips': 'Натисніть {keyMap}, щоб відкрити це вікно будь-коли',
141
141
  'fabric.editor.hyperlink.linkAriaLabel': 'Мітка посилання',
142
142
  'fabric.editor.hyperlink.searchLinkAriaDescription': 'Коли ви будете набирати у полі текст, нижче з’явиться список варіантів',
143
- 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {Немає результатів} one {{count,number} результат} few {{count,number} результати} many {{count,number} результатів} other {{count,number} результатів}}',
143
+ 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {нічого не знайдено} one {{count,number} результат} few {{count,number} результати} many {{count,number} результатів} other {{count,number} результатів}}',
144
144
  'fabric.editor.hyperlinkToolbarPlaceholder': 'Вставте або знайдіть посилання',
145
145
  'fabric.editor.imageBorderBold': 'Жирна',
146
146
  'fabric.editor.imageBorderColor': 'Колір',
@@ -140,7 +140,7 @@ export default {
140
140
  'fabric.editor.helpDialogTips': 'Nhấn {keyMap} để mở nhanh hộp thoại này bất kỳ lúc nào',
141
141
  'fabric.editor.hyperlink.linkAriaLabel': 'Nhãn liên kết',
142
142
  'fabric.editor.hyperlink.searchLinkAriaDescription': 'Các đề xuất sẽ xuất hiện bên dưới khi bạn nhập thông tin vào trường',
143
- 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {không tìm thấy kết quả nào} other {Đã tìm thấy {count,number} kết quả}}',
143
+ 'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {không tìm thấy kết quả} other {Đã tìm thấy {count,number} kết quả}}',
144
144
  'fabric.editor.hyperlinkToolbarPlaceholder': 'Dán hoặc tìm kiếm liên kết',
145
145
  'fabric.editor.imageBorderBold': 'In đậm',
146
146
  'fabric.editor.imageBorderColor': 'Màu sắc',
@@ -158,7 +158,7 @@ export default {
158
158
  'fabric.editor.inputQueryAssistiveTxt': 'Khi có sẵn kết quả tự hoàn tất, hãy dùng các mũi tên lên và xuống để xem lại và enter để chọn. Người dùng thiết bị cảm ứng, khám phá bằng thao tác chạm hoặc bằng các cử chỉ vuốt.',
159
159
  'fabric.editor.invalidDateError': 'Nhập ngày hợp lệ',
160
160
  'fabric.editor.invalidLink': 'Vui lòng nhập một liên kết hợp lệ.',
161
- 'fabric.editor.inviteItem.title': '{userRole, select, admin {Mời đồng nghiệp cùng nhóm vào {productName}} trusted {Mời đồng nghiệp cùng nhóm vào {productName}} other {Thêm đồng nghiệp cùng nhóm vào {productName}}}',
161
+ 'fabric.editor.inviteItem.title': '{userRole, select, admin {Mời thành viên cùng nhóm vào {productName}} trusted {Mời thành viên cùng nhóm vào {productName}} other {Thêm thành viên cùng nhóm vào {productName}}}',
162
162
  'fabric.editor.italic': 'In nghiêng',
163
163
  'fabric.editor.keyboardShortcuts': 'Phím tắt bàn phím',
164
164
  'fabric.editor.leftSidebar': 'Thanh bên trái',
@@ -142,7 +142,7 @@ export default {
142
142
  'fabric.editor.hyperlink.searchLinkAriaDescription': '在字段中输入内容时,下方会显示建议内容',
143
143
  'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {未找到结果} other {找到 {count,number} 个结果}}',
144
144
  'fabric.editor.hyperlinkToolbarPlaceholder': '粘贴或搜索链接',
145
- 'fabric.editor.imageBorderBold': '粗体',
145
+ 'fabric.editor.imageBorderBold': '加粗',
146
146
  'fabric.editor.imageBorderColor': '颜色',
147
147
  'fabric.editor.imageBorderMedium': '中等',
148
148
  'fabric.editor.imageBorderOptions': '边框选项',
@@ -8,7 +8,6 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
8
8
  import { BaseTheme } from '@atlaskit/editor-common/ui';
9
9
  import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
10
10
  import ContentStyles from '../../ui/ContentStyles';
11
- import WidthEmitter from '../../ui/WidthEmitter';
12
11
  import { ClickAreaBlock } from '../../ui/Addon';
13
12
  import { scrollbarStyles } from '../../ui/styles';
14
13
  import { tableFullPageEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
@@ -17,7 +16,7 @@ import { Editor, EditorContent, useEditorSharedConfig } from './Editor';
17
16
  import { Toolbar } from './Toolbar';
18
17
  import { ContentComponents } from './ContentComponents';
19
18
  import { useCreateAnalyticsHandler } from './internal/hooks/use-analytics';
20
- import { ContextPanelWidthProvider } from '../../ui/ContextPanel/context';
19
+ import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
21
20
  const fullPageEditorWrapper = css`
22
21
  min-width: 340px;
23
22
  height: 100%;
@@ -186,9 +185,7 @@ function FullPage(props) {
186
185
  containerElement: scrollContainerRef.current
187
186
  }))))), contextPanel && jsx("div", {
188
187
  css: sidebarArea
189
- }, contextPanel), jsx(WidthEmitter, {
190
- editorView: config === null || config === void 0 ? void 0 : config.editorView
191
- }))))));
188
+ }, contextPanel))))));
192
189
  }
193
190
  FullPage.displayName = 'FullPageEditor';
194
191
  const FullPageWithAnalytics = withAnalyticsEvents()(FullPage);
@@ -23,8 +23,10 @@ export const createStubInternalApis = () => {
23
23
  // That means, there is no createAnalyticsEvent available at all.
24
24
  // This should not happen, but if it does, we will send a mock function to avoid
25
25
  // regression on SmartLinks (they are the only one using this function directly)
26
- // eslint-disable-next-line no-console
27
- console.error('This should never be called, if it does we have a problem');
26
+ if (process.env.NODE_ENV === 'development') {
27
+ // eslint-disable-next-line no-console
28
+ console.error('This should never be called, if it does we have a problem');
29
+ }
28
30
  return {
29
31
  fire: () => {}
30
32
  };
@@ -5,7 +5,7 @@ import blockTypePlugin from '../../../plugins/block-type';
5
5
  import clearMarksOnChangeToEmptyDocumentPlugin from '../../../plugins/clear-marks-on-change-to-empty-document';
6
6
  import hyperlinkPlugin from '../../../plugins/hyperlink';
7
7
  import textFormattingPlugin from '../../../plugins/text-formatting';
8
- import widthPlugin from '../../../plugins/width';
8
+ import { widthPlugin } from '@atlaskit/editor-plugin-width';
9
9
  import unsupportedContentPlugin from '../../../plugins/unsupported-content';
10
10
  import basePlugin from '../../../plugins/base';
11
11
  import editorDisabledPlugin from '../../../plugins/editor-disabled';
@@ -1,4 +1,5 @@
1
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, gridPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, contextPanelPlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
1
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, contextPanelPlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
2
+ import { gridPlugin } from '@atlaskit/editor-plugin-grid';
2
3
  import cardPlugin from '../../../plugins/card';
3
4
  import { tablesPlugin } from '@atlaskit/editor-plugin-table';
4
5
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
@@ -3,13 +3,12 @@ import React from 'react';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { breakout } from '@atlaskit/adf-schema';
5
5
  import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
6
- import WithPluginState from '../../ui/WithPluginState';
7
- import { pluginKey as widthPluginKey } from '../width';
8
6
  import LayoutButton from './ui/LayoutButton';
9
7
  import { BreakoutCssClassName } from './constants';
10
8
  import { pluginKey } from './plugin-key';
11
9
  import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
12
10
  import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
11
+ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
13
12
  class BreakoutView {
14
13
  constructor(
15
14
  /**
@@ -17,12 +16,12 @@ class BreakoutView {
17
16
  * of the prosemirror and prosemirror types mean using PMNode
18
17
  * is not problematic.
19
18
  */
20
- mark, view, eventDispatcher) {
19
+ mark, view, pluginInjectionApi) {
21
20
  _defineProperty(this, "updateWidth", widthState => {
22
21
  // we skip updating the width of breakout nodes if the editorView dom
23
22
  // element was hidden (to avoid breakout width and button thrashing
24
23
  // when an editor is hidden, re-rendered and unhidden).
25
- if (widthState.width === 0) {
24
+ if (widthState === undefined || widthState.width === 0) {
26
25
  return;
27
26
  }
28
27
  let containerStyle = ``;
@@ -81,14 +80,16 @@ class BreakoutView {
81
80
  this.mark = mark;
82
81
  this.view = view;
83
82
  this.contentDOM = contentDOM;
84
- this.eventDispatcher = eventDispatcher;
85
- eventDispatcher.on(widthPluginKey.key, this.updateWidth);
86
- this.updateWidth(widthPluginKey.getState(this.view.state));
83
+ this.unsubscribe = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width.sharedState.onChange(({
84
+ nextSharedState
85
+ }) => this.updateWidth(nextSharedState));
86
+ this.updateWidth(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width.sharedState.currentState());
87
87
  }
88
88
  // NOTE: Lifecycle events doesn't work for mark NodeView. So currently this is a no-op.
89
89
  // @see https://github.com/ProseMirror/prosemirror/issues/1082
90
90
  destroy() {
91
- this.eventDispatcher.off(widthPluginKey.key, this.updateWidth);
91
+ var _this$unsubscribe;
92
+ (_this$unsubscribe = this.unsubscribe) === null || _this$unsubscribe === void 0 ? void 0 : _this$unsubscribe.call(this);
92
93
  }
93
94
  }
94
95
  function shouldPluginStateUpdate(newBreakoutNode, currentBreakoutNode) {
@@ -97,9 +98,8 @@ function shouldPluginStateUpdate(newBreakoutNode, currentBreakoutNode) {
97
98
  }
98
99
  return newBreakoutNode || currentBreakoutNode ? true : false;
99
100
  }
100
- function createPlugin({
101
- dispatch,
102
- eventDispatcher
101
+ function createPlugin(pluginInjectionApi, {
102
+ dispatch
103
103
  }) {
104
104
  return new SafePlugin({
105
105
  state: {
@@ -130,18 +130,38 @@ function createPlugin({
130
130
  // See the following link for more details:
131
131
  // https://prosemirror.net/docs/ref/#view.EditorProps.nodeViews.
132
132
  breakout: (mark, view) => {
133
- return new BreakoutView(mark, view, eventDispatcher);
133
+ return new BreakoutView(mark, view, pluginInjectionApi);
134
134
  }
135
135
  }
136
136
  }
137
137
  });
138
138
  }
139
- const breakoutPlugin = options => ({
139
+ const LayoutButtonWrapper = ({
140
+ api,
141
+ editorView,
142
+ boundariesElement,
143
+ scrollableElement,
144
+ mountPoint
145
+ }) => {
146
+ var _breakoutState$breako;
147
+ // Re-render with `width` (but don't use state) due to https://bitbucket.org/atlassian/%7Bc8e2f021-38d2-46d0-9b7a-b3f7b428f724%7D/pull-requests/24272
148
+ const {
149
+ breakoutState
150
+ } = useSharedPluginState(api, ['width', 'breakout']);
151
+ return /*#__PURE__*/React.createElement(LayoutButton, {
152
+ editorView: editorView,
153
+ mountPoint: mountPoint,
154
+ boundariesElement: boundariesElement,
155
+ scrollableElement: scrollableElement,
156
+ node: (_breakoutState$breako = breakoutState === null || breakoutState === void 0 ? void 0 : breakoutState.breakoutNode) !== null && _breakoutState$breako !== void 0 ? _breakoutState$breako : null
157
+ });
158
+ };
159
+ const breakoutPlugin = (options, api) => ({
140
160
  name: 'breakout',
141
161
  pmPlugins() {
142
162
  return [{
143
163
  name: 'breakout',
144
- plugin: createPlugin
164
+ plugin: props => createPlugin(api, props)
145
165
  }];
146
166
  },
147
167
  marks() {
@@ -150,6 +170,14 @@ const breakoutPlugin = options => ({
150
170
  mark: breakout
151
171
  }];
152
172
  },
173
+ getSharedState(editorState) {
174
+ if (!editorState) {
175
+ return {
176
+ breakoutNode: undefined
177
+ };
178
+ }
179
+ return pluginKey.getState(editorState);
180
+ },
153
181
  contentComponent({
154
182
  editorView,
155
183
  popupsMountPoint,
@@ -160,23 +188,12 @@ const breakoutPlugin = options => ({
160
188
  if (options && !options.allowBreakoutButton) {
161
189
  return null;
162
190
  }
163
- return /*#__PURE__*/React.createElement(WithPluginState, {
164
- plugins: {
165
- breakoutPluginState: pluginKey,
166
- widthPluginState: widthPluginKey
167
- },
168
- render: ({
169
- breakoutPluginState
170
- }) => {
171
- var _breakoutPluginState$;
172
- return /*#__PURE__*/React.createElement(LayoutButton, {
173
- editorView: editorView,
174
- mountPoint: popupsMountPoint,
175
- boundariesElement: popupsBoundariesElement,
176
- scrollableElement: popupsScrollableElement,
177
- node: (_breakoutPluginState$ = breakoutPluginState === null || breakoutPluginState === void 0 ? void 0 : breakoutPluginState.breakoutNode) !== null && _breakoutPluginState$ !== void 0 ? _breakoutPluginState$ : null
178
- });
179
- }
191
+ return /*#__PURE__*/React.createElement(LayoutButtonWrapper, {
192
+ api: api,
193
+ mountPoint: popupsMountPoint,
194
+ editorView: editorView,
195
+ boundariesElement: popupsBoundariesElement,
196
+ scrollableElement: popupsScrollableElement
180
197
  });
181
198
  }
182
199
  });
@@ -158,8 +158,8 @@ const unlinkCard = (node, state, editorAnalyticsApi) => {
158
158
  }
159
159
  return () => false;
160
160
  };
161
- const buildAlignmentOptions = (state, intl, cardOptions) => {
162
- return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
161
+ const buildAlignmentOptions = (state, intl, widthPluginDependencyApi, cardOptions) => {
162
+ return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
163
163
  };
164
164
  const withToolbarMetadata = command => commandWithMetadata(command, {
165
165
  inputMethod: INPUT_METHOD.FLOATING_TB
@@ -245,7 +245,8 @@ const generateToolbarItems = (state, featureFlags, intl, providerFactory, cardOp
245
245
  onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
246
246
  }];
247
247
  if (currentAppearance === 'embed') {
248
- const alignmentOptions = buildAlignmentOptions(state, intl, cardOptions);
248
+ var _pluginInjectionApi$d5;
249
+ const alignmentOptions = buildAlignmentOptions(state, intl, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d5 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.width, cardOptions);
249
250
  if (alignmentOptions.length) {
250
251
  alignmentOptions.push({
251
252
  type: 'separator'
@@ -89,10 +89,8 @@ export class PluginState {
89
89
  remove = remove.concat(oldPointers);
90
90
  }
91
91
  const endOfDocPos = tr.doc.nodeSize - 2;
92
- const {
93
- anchor,
94
- head
95
- } = telepointerData.selection;
92
+ const anchor = telepointerData.selection.anchor;
93
+ const head = telepointerData.selection.head;
96
94
  let rawFrom = anchor < head ? anchor : head;
97
95
  let rawTo = anchor >= head ? anchor : head;
98
96
  if (rawFrom > endOfDocPos) {
@@ -1,9 +1,11 @@
1
1
  import { copyButtonPluginKey } from './pm-plugins/plugin-key';
2
2
  import { hoverDecoration } from '../base/pm-plugins/decoration';
3
- import { copyHTMLToClipboard } from '../../utils/clipboard';
3
+ import { NodeSelection } from 'prosemirror-state';
4
+ import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '../../utils/clipboard';
4
5
  import { getSelectedNodeOrNodeParentByNodeType, toDOM } from './utils';
5
6
  import { addAnalytics, ACTION, INPUT_METHOD } from '../analytics';
6
7
  import { getAnalyticsPayload } from '../clipboard/pm-plugins/main';
8
+ import { browser } from '@atlaskit/editor-common/utils';
7
9
  export function createToolbarCopyCommandForMark(markType) {
8
10
  function command(state, dispatch) {
9
11
  const textNode = state.tr.selection.$head.parent.maybeChild(state.tr.selection.$head.index());
@@ -121,7 +123,12 @@ export const createToolbarCopyCommandForNode = nodeType => (state, dispatch) =>
121
123
  // https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
122
124
  div.firstChild.setAttribute('data-pm-slice', '0 0 []');
123
125
  }
124
- copyHTMLToClipboard(div);
126
+ // ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
127
+ if (browser.safari && state.selection instanceof NodeSelection && state.selection.node.type === state.schema.nodes.extension) {
128
+ copyHTMLToClipboardPolyfill(div);
129
+ } else {
130
+ copyHTMLToClipboard(div);
131
+ }
125
132
  }
126
133
  copyToClipboardTr.setMeta('scrollIntoView', false);
127
134
  dispatch(copyToClipboardTr);
@@ -31,7 +31,7 @@ const extensionPlugin = (options = {}, api) => {
31
31
  eventDispatcher
32
32
  }) => {
33
33
  const extensionHandlers = options.extensionHandlers || {};
34
- return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, options.useLongPressSelection, {
34
+ return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, api, options.useLongPressSelection, {
35
35
  appearance: options.appearance
36
36
  });
37
37
  }
@@ -43,17 +43,19 @@ export class ExtensionNode extends ReactNodeView {
43
43
  providerFactory: props.providerFactory,
44
44
  handleContentDOMRef: forwardRef,
45
45
  extensionHandlers: props.extensionHandlers,
46
- editorAppearance: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : _props$extensionNodeV.appearance
46
+ editorAppearance: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : _props$extensionNodeV.appearance,
47
+ pluginInjectionApi: props.pluginInjectionApi
47
48
  }));
48
49
  }
49
50
  }
50
- export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions) {
51
+ export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi) {
51
52
  return (node, view, getPos) => {
52
53
  const hasIntlContext = true;
53
54
  return new ExtensionNode(node, view, getPos, portalProviderAPI, eventDispatcher, {
54
55
  providerFactory,
55
56
  extensionHandlers,
56
- extensionNodeViewOptions
57
+ extensionNodeViewOptions,
58
+ pluginInjectionApi
57
59
  }, undefined, undefined, undefined, hasIntlContext).init();
58
60
  };
59
61
  }
@@ -125,7 +125,7 @@ export const handleUpdate = ({
125
125
  }
126
126
  return true;
127
127
  };
128
- const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, useLongPressSelection = false, options = {}) => {
128
+ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}) => {
129
129
  const state = createPluginState(dispatch, {
130
130
  showEditButton: false,
131
131
  showContextPanel: false
@@ -160,11 +160,11 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
160
160
  props: {
161
161
  nodeViews: {
162
162
  // WARNING: referentiality-plugin also creates these nodeviews
163
- extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions),
163
+ extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi),
164
164
  // WARNING: referentiality-plugin also creates these nodeviews
165
- bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions),
165
+ bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi),
166
166
  // WARNING: referentiality-plugin also creates these nodeviews
167
- inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions)
167
+ inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi)
168
168
  },
169
169
  handleClickOn: createSelectionClickHandler(['extension', 'bodiedExtension'], target => !target.closest('.extension-content'), {
170
170
  useLongPressSelection
@@ -7,9 +7,8 @@ import { calculateBreakoutStyles } from '@atlaskit/editor-common/utils';
7
7
  import { wrapperStyle, header, content, contentWrapper, widerLayoutClassName } from './styles';
8
8
  import { overlay } from '../styles';
9
9
  import ExtensionLozenge from '../Lozenge';
10
- import { pluginKey as widthPluginKey } from '../../../../width';
11
- import WithPluginState from '../../../../../ui/WithPluginState';
12
10
  import classnames from 'classnames';
11
+ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
13
12
  function ExtensionWithPluginState(props) {
14
13
  const {
15
14
  node,
@@ -92,6 +91,39 @@ function ExtensionWithPluginState(props) {
92
91
  }))));
93
92
  }
94
93
  const Extension = props => {
94
+ // TODO: ED-17836 This code is here because confluence injects
95
+ // the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
96
+ // which cannot access the `pluginInjectionApi`. When we move
97
+ // Confluence to using presets we can remove this workaround.
98
+ const {
99
+ pluginInjectionApi
100
+ } = props;
101
+ return pluginInjectionApi === undefined ? jsx(ExtensionDeprecated, props) : jsx(ExtensionWithSharedState, props);
102
+ };
103
+ const ExtensionWithSharedState = props => {
104
+ const {
105
+ pluginInjectionApi
106
+ } = props;
107
+ const {
108
+ widthState
109
+ } = useSharedPluginState(pluginInjectionApi, ['width']);
110
+ return jsx(ExtensionWithPluginState, _extends({
111
+ widthState: widthState
112
+ }, props));
113
+ };
114
+ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
115
+ // TODO: ED-17836 This code is here because Confluence injects
116
+ // the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
117
+ // which cannot access the `pluginInjectionApi`. When we move
118
+ // Confluence to using presets we can remove this workaround.
119
+ // @ts-ignore
120
+ const widthPluginKey = {
121
+ key: 'widthPlugin$',
122
+ getState: state => {
123
+ return state['widthPlugin$'];
124
+ }
125
+ };
126
+ const ExtensionDeprecated = props => {
95
127
  return jsx(WithPluginState, {
96
128
  editorView: props.view,
97
129
  plugins: {
@@ -104,6 +136,10 @@ const Extension = props => {
104
136
  }, props))
105
137
  });
106
138
  };
139
+ /**
140
+ * End workaround
141
+ */
142
+
107
143
  export default overflowShadow(Extension, {
108
144
  overflowSelector: '.extension-overflow-wrapper'
109
145
  });
@@ -134,7 +134,8 @@ export default class ExtensionComponent extends Component {
134
134
  handleContentDOMRef,
135
135
  editorView,
136
136
  references,
137
- editorAppearance
137
+ editorAppearance,
138
+ pluginInjectionApi
138
139
  } = this.props;
139
140
  const extensionHandlerResult = this.tryExtensionHandler();
140
141
  switch (node.type.name) {
@@ -148,7 +149,8 @@ export default class ExtensionComponent extends Component {
148
149
  handleContentDOMRef: handleContentDOMRef,
149
150
  view: editorView,
150
151
  editorAppearance: editorAppearance,
151
- hideFrame: (_this$state$_privateP = this.state._privateProps) === null || _this$state$_privateP === void 0 ? void 0 : _this$state$_privateP.__hideFrame
152
+ hideFrame: (_this$state$_privateP = this.state._privateProps) === null || _this$state$_privateP === void 0 ? void 0 : _this$state$_privateP.__hideFrame,
153
+ pluginInjectionApi: pluginInjectionApi
152
154
  }, extensionHandlerResult);
153
155
  case 'inlineExtension':
154
156
  return /*#__PURE__*/React.createElement(InlineExtension, {
@@ -16,7 +16,8 @@ export default class Extension extends Component {
16
16
  handleContentDOMRef,
17
17
  extensionHandlers,
18
18
  references,
19
- editorAppearance
19
+ editorAppearance,
20
+ pluginInjectionApi
20
21
  } = this.props;
21
22
  return /*#__PURE__*/React.createElement(ExtensionComponent, {
22
23
  editorView: editorView,
@@ -26,7 +27,8 @@ export default class Extension extends Component {
26
27
  extensionProvider: extensionProvider,
27
28
  handleContentDOMRef: handleContentDOMRef,
28
29
  extensionHandlers: extensionHandlers,
29
- editorAppearance: editorAppearance
30
+ editorAppearance: editorAppearance,
31
+ pluginInjectionApi: pluginInjectionApi
30
32
  });
31
33
  });
32
34
  this.providerFactory = props.providerFactory || new ProviderFactory();