@atlaskit/editor-core 185.2.24 → 185.2.26

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 (239) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/editor-next/editor-internal.js +3 -3
  3. package/dist/cjs/index.js +4 -4
  4. package/dist/cjs/labs/next/Editor.js +3 -3
  5. package/dist/cjs/labs/next/presets/universal.js +6 -5
  6. package/dist/cjs/nodeviews/index.js +1 -16
  7. package/dist/cjs/plugins/annotation/index.js +31 -21
  8. package/dist/cjs/plugins/annotation/nodeviews/index.js +2 -2
  9. package/dist/cjs/plugins/base/index.js +0 -6
  10. package/dist/cjs/plugins/caption/index.js +1 -2
  11. package/dist/cjs/plugins/caption/nodeviews/index.js +3 -3
  12. package/dist/cjs/plugins/caption/pm-plugins/main.js +4 -2
  13. package/dist/cjs/plugins/card/nodeviews/embedCard.js +4 -4
  14. package/dist/cjs/plugins/extension/actions.js +6 -4
  15. package/dist/cjs/plugins/extension/commands.js +19 -16
  16. package/dist/cjs/plugins/extension/context-panel.js +4 -4
  17. package/dist/cjs/plugins/extension/extension-api.js +1 -1
  18. package/dist/cjs/plugins/extension/index.js +11 -4
  19. package/dist/cjs/plugins/extension/nodeviews/extension.js +2 -2
  20. package/dist/cjs/plugins/extension/pm-plugins/keymap.js +2 -2
  21. package/dist/cjs/plugins/extension/pm-plugins/main.js +10 -5
  22. package/dist/cjs/plugins/extension/toolbar.js +8 -6
  23. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +11 -6
  24. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +5 -2
  25. package/dist/cjs/plugins/index.js +0 -7
  26. package/dist/cjs/plugins/jira-issue/index.js +2 -2
  27. package/dist/cjs/plugins/media/index.js +2 -2
  28. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +25 -19
  29. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +3 -3
  30. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +16 -10
  31. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  32. package/dist/cjs/plugins/media/pm-plugins/main.js +25 -8
  33. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +2 -2
  34. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +2 -2
  35. package/dist/cjs/plugins/unsupported-content/index.js +6 -4
  36. package/dist/cjs/test-utils.js +0 -7
  37. package/dist/cjs/ui/ContextPanel/index.js +9 -2
  38. package/dist/cjs/utils/action.js +1 -1
  39. package/dist/cjs/version-wrapper.js +1 -1
  40. package/dist/cjs/version.json +1 -1
  41. package/dist/es2019/editor-next/editor-internal.js +1 -1
  42. package/dist/es2019/index.js +1 -1
  43. package/dist/es2019/labs/next/Editor.js +1 -1
  44. package/dist/es2019/labs/next/presets/universal.js +7 -6
  45. package/dist/es2019/nodeviews/index.js +1 -2
  46. package/dist/es2019/plugins/annotation/index.js +34 -23
  47. package/dist/es2019/plugins/annotation/nodeviews/index.js +1 -1
  48. package/dist/es2019/plugins/base/index.js +0 -4
  49. package/dist/es2019/plugins/caption/index.js +1 -4
  50. package/dist/es2019/plugins/caption/nodeviews/index.js +2 -2
  51. package/dist/es2019/plugins/caption/pm-plugins/main.js +4 -2
  52. package/dist/es2019/plugins/card/nodeviews/embedCard.js +2 -2
  53. package/dist/es2019/plugins/extension/actions.js +6 -4
  54. package/dist/es2019/plugins/extension/commands.js +6 -7
  55. package/dist/es2019/plugins/extension/context-panel.js +4 -4
  56. package/dist/es2019/plugins/extension/extension-api.js +1 -1
  57. package/dist/es2019/plugins/extension/index.js +11 -4
  58. package/dist/es2019/plugins/extension/nodeviews/extension.js +1 -1
  59. package/dist/es2019/plugins/extension/pm-plugins/keymap.js +2 -2
  60. package/dist/es2019/plugins/extension/pm-plugins/main.js +10 -5
  61. package/dist/es2019/plugins/extension/toolbar.js +8 -4
  62. package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +11 -6
  63. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +5 -2
  64. package/dist/es2019/plugins/index.js +0 -1
  65. package/dist/es2019/plugins/jira-issue/index.js +1 -1
  66. package/dist/es2019/plugins/media/index.js +2 -2
  67. package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +21 -14
  68. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +2 -2
  69. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +13 -9
  70. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
  71. package/dist/es2019/plugins/media/pm-plugins/main.js +28 -11
  72. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
  73. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
  74. package/dist/es2019/plugins/unsupported-content/index.js +1 -1
  75. package/dist/es2019/test-utils.js +0 -1
  76. package/dist/es2019/ui/ContextPanel/index.js +8 -1
  77. package/dist/es2019/utils/action.js +1 -1
  78. package/dist/es2019/version-wrapper.js +1 -1
  79. package/dist/es2019/version.json +1 -1
  80. package/dist/esm/editor-next/editor-internal.js +1 -1
  81. package/dist/esm/index.js +1 -1
  82. package/dist/esm/labs/next/Editor.js +1 -1
  83. package/dist/esm/labs/next/presets/universal.js +7 -6
  84. package/dist/esm/nodeviews/index.js +1 -2
  85. package/dist/esm/plugins/annotation/index.js +32 -22
  86. package/dist/esm/plugins/annotation/nodeviews/index.js +1 -1
  87. package/dist/esm/plugins/base/index.js +0 -6
  88. package/dist/esm/plugins/caption/index.js +1 -2
  89. package/dist/esm/plugins/caption/nodeviews/index.js +2 -2
  90. package/dist/esm/plugins/caption/pm-plugins/main.js +4 -2
  91. package/dist/esm/plugins/card/nodeviews/embedCard.js +4 -4
  92. package/dist/esm/plugins/extension/actions.js +6 -4
  93. package/dist/esm/plugins/extension/commands.js +18 -15
  94. package/dist/esm/plugins/extension/context-panel.js +4 -4
  95. package/dist/esm/plugins/extension/extension-api.js +1 -1
  96. package/dist/esm/plugins/extension/index.js +11 -4
  97. package/dist/esm/plugins/extension/nodeviews/extension.js +1 -1
  98. package/dist/esm/plugins/extension/pm-plugins/keymap.js +2 -2
  99. package/dist/esm/plugins/extension/pm-plugins/main.js +10 -5
  100. package/dist/esm/plugins/extension/toolbar.js +8 -6
  101. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +11 -6
  102. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -2
  103. package/dist/esm/plugins/index.js +0 -1
  104. package/dist/esm/plugins/jira-issue/index.js +1 -1
  105. package/dist/esm/plugins/media/index.js +2 -2
  106. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +24 -18
  107. package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -2
  108. package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +15 -9
  109. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
  110. package/dist/esm/plugins/media/pm-plugins/main.js +26 -9
  111. package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
  112. package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
  113. package/dist/esm/plugins/unsupported-content/index.js +1 -1
  114. package/dist/esm/test-utils.js +0 -1
  115. package/dist/esm/ui/ContextPanel/index.js +8 -1
  116. package/dist/esm/utils/action.js +1 -1
  117. package/dist/esm/version-wrapper.js +1 -1
  118. package/dist/esm/version.json +1 -1
  119. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -1
  120. package/dist/types/index.d.ts +1 -1
  121. package/dist/types/labs/next/internal/components/EditorInternal.d.ts +2 -2
  122. package/dist/types/labs/next/internal/editor-props-type.d.ts +1 -1
  123. package/dist/types/labs/next/internal/hooks/use-editor/create-editor.d.ts +1 -1
  124. package/dist/types/labs/next/presets/cxhtml.d.ts +18 -2
  125. package/dist/types/labs/next/presets/default.d.ts +36 -4
  126. package/dist/types/labs/next/presets/mobile.d.ts +18 -2
  127. package/dist/types/nodeviews/index.d.ts +0 -2
  128. package/dist/types/plugins/annotation/index.d.ts +3 -1
  129. package/dist/types/plugins/annotation/nodeviews/index.d.ts +2 -1
  130. package/dist/types/plugins/annotation/pm-plugins/types.d.ts +2 -2
  131. package/dist/types/plugins/caption/index.d.ts +1 -1
  132. package/dist/types/plugins/caption/nodeviews/index.d.ts +7 -4
  133. package/dist/types/plugins/caption/pm-plugins/main.d.ts +5 -4
  134. package/dist/types/plugins/card/nodeviews/embedCard.d.ts +2 -2
  135. package/dist/types/plugins/extension/actions.d.ts +2 -1
  136. package/dist/types/plugins/extension/commands.d.ts +4 -3
  137. package/dist/types/plugins/extension/context-panel.d.ts +2 -1
  138. package/dist/types/plugins/extension/extension-api.d.ts +2 -0
  139. package/dist/types/plugins/extension/index.d.ts +4 -2
  140. package/dist/types/plugins/extension/nodeviews/extension.d.ts +3 -2
  141. package/dist/types/plugins/extension/pm-plugins/keymap.d.ts +2 -1
  142. package/dist/types/plugins/extension/pm-plugins/main.d.ts +5 -3
  143. package/dist/types/plugins/extension/toolbar.d.ts +8 -1
  144. package/dist/types/plugins/extension/types.d.ts +2 -0
  145. package/dist/types/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
  146. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +7 -3
  147. package/dist/types/plugins/index.d.ts +0 -1
  148. package/dist/types/plugins/media/index.d.ts +3 -1
  149. package/dist/types/plugins/media/nodeviews/mediaGroup.d.ts +5 -3
  150. package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +6 -3
  151. package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +6 -4
  152. package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +2 -2
  153. package/dist/types/plugins/media/types.d.ts +4 -0
  154. package/dist/types/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +1 -1
  155. package/dist/types/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +1 -1
  156. package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +1 -1
  157. package/dist/types/test-utils.d.ts +0 -1
  158. package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +1 -1
  159. package/dist/types-ts4.5/index.d.ts +1 -1
  160. package/dist/types-ts4.5/labs/next/internal/components/EditorInternal.d.ts +2 -2
  161. package/dist/types-ts4.5/labs/next/internal/editor-props-type.d.ts +1 -1
  162. package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/create-editor.d.ts +1 -1
  163. package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +20 -2
  164. package/dist/types-ts4.5/labs/next/presets/default.d.ts +40 -4
  165. package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +20 -2
  166. package/dist/types-ts4.5/nodeviews/index.d.ts +0 -2
  167. package/dist/types-ts4.5/plugins/annotation/index.d.ts +3 -1
  168. package/dist/types-ts4.5/plugins/annotation/nodeviews/index.d.ts +2 -1
  169. package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +2 -2
  170. package/dist/types-ts4.5/plugins/caption/index.d.ts +1 -1
  171. package/dist/types-ts4.5/plugins/caption/nodeviews/index.d.ts +7 -4
  172. package/dist/types-ts4.5/plugins/caption/pm-plugins/main.d.ts +5 -4
  173. package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +2 -2
  174. package/dist/types-ts4.5/plugins/extension/actions.d.ts +2 -1
  175. package/dist/types-ts4.5/plugins/extension/commands.d.ts +4 -3
  176. package/dist/types-ts4.5/plugins/extension/context-panel.d.ts +2 -1
  177. package/dist/types-ts4.5/plugins/extension/extension-api.d.ts +2 -0
  178. package/dist/types-ts4.5/plugins/extension/index.d.ts +4 -2
  179. package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +3 -2
  180. package/dist/types-ts4.5/plugins/extension/pm-plugins/keymap.d.ts +2 -1
  181. package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +5 -3
  182. package/dist/types-ts4.5/plugins/extension/toolbar.d.ts +8 -1
  183. package/dist/types-ts4.5/plugins/extension/types.d.ts +2 -0
  184. package/dist/types-ts4.5/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
  185. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +7 -3
  186. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  187. package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
  188. package/dist/types-ts4.5/plugins/media/nodeviews/mediaGroup.d.ts +5 -3
  189. package/dist/types-ts4.5/plugins/media/nodeviews/mediaInline.d.ts +6 -3
  190. package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +6 -4
  191. package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +2 -2
  192. package/dist/types-ts4.5/plugins/media/types.d.ts +4 -0
  193. package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +1 -1
  194. package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +1 -1
  195. package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/main.d.ts +1 -1
  196. package/dist/types-ts4.5/test-utils.d.ts +0 -1
  197. package/package.json +3 -2
  198. package/report.api.md +20 -85
  199. package/tmp/api-report-tmp.d.ts +18 -68
  200. package/dist/cjs/nodeviews/ReactNodeView.js +0 -224
  201. package/dist/cjs/nodeviews/SelectionBasedNodeView.js +0 -169
  202. package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +0 -72
  203. package/dist/cjs/plugins/context-panel/index.js +0 -66
  204. package/dist/cjs/plugins/context-panel/transforms.js +0 -13
  205. package/dist/cjs/plugins/context-panel/types.js +0 -5
  206. package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +0 -43
  207. package/dist/cjs/ui/PortalProvider/index.js +0 -252
  208. package/dist/es2019/nodeviews/ReactNodeView.js +0 -170
  209. package/dist/es2019/nodeviews/SelectionBasedNodeView.js +0 -158
  210. package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +0 -48
  211. package/dist/es2019/plugins/context-panel/index.js +0 -45
  212. package/dist/es2019/plugins/context-panel/transforms.js +0 -4
  213. package/dist/es2019/plugins/context-panel/types.js +0 -1
  214. package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +0 -37
  215. package/dist/es2019/ui/PortalProvider/index.js +0 -184
  216. package/dist/esm/nodeviews/ReactNodeView.js +0 -217
  217. package/dist/esm/nodeviews/SelectionBasedNodeView.js +0 -163
  218. package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +0 -62
  219. package/dist/esm/plugins/context-panel/index.js +0 -57
  220. package/dist/esm/plugins/context-panel/transforms.js +0 -6
  221. package/dist/esm/plugins/context-panel/types.js +0 -1
  222. package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +0 -36
  223. package/dist/esm/ui/PortalProvider/index.js +0 -242
  224. package/dist/types/nodeviews/ReactNodeView.d.ts +0 -52
  225. package/dist/types/nodeviews/SelectionBasedNodeView.d.ts +0 -53
  226. package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +0 -13
  227. package/dist/types/plugins/context-panel/index.d.ts +0 -11
  228. package/dist/types/plugins/context-panel/transforms.d.ts +0 -2
  229. package/dist/types/plugins/context-panel/types.d.ts +0 -1
  230. package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
  231. package/dist/types/ui/PortalProvider/index.d.ts +0 -51
  232. package/dist/types-ts4.5/nodeviews/ReactNodeView.d.ts +0 -52
  233. package/dist/types-ts4.5/nodeviews/SelectionBasedNodeView.d.ts +0 -53
  234. package/dist/types-ts4.5/plugins/base/pm-plugins/react-nodeview.d.ts +0 -13
  235. package/dist/types-ts4.5/plugins/context-panel/index.d.ts +0 -11
  236. package/dist/types-ts4.5/plugins/context-panel/transforms.d.ts +0 -2
  237. package/dist/types-ts4.5/plugins/context-panel/types.d.ts +0 -1
  238. package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
  239. package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +0 -51
@@ -1,6 +1,7 @@
1
1
  import { ExtensionAPI } from '@atlaskit/editor-common/extensions';
2
2
  import type { EditorView } from 'prosemirror-view';
3
3
  import { MacroProvider } from '../macro';
4
+ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
4
5
  interface EditInLegacyMacroBrowserArgs {
5
6
  view: EditorView;
6
7
  macroProvider?: MacroProvider;
@@ -8,6 +9,7 @@ interface EditInLegacyMacroBrowserArgs {
8
9
  export declare const getEditInLegacyMacroBrowser: ({ view, macroProvider, }: EditInLegacyMacroBrowserArgs) => () => void;
9
10
  interface CreateExtensionAPIOptions {
10
11
  editorView: EditorView;
12
+ applyChange: ApplyChangeHandler | undefined;
11
13
  editInLegacyMacroBrowser?: () => void;
12
14
  }
13
15
  export declare const createExtensionAPI: (options: CreateExtensionAPIOptions) => ExtensionAPI;
@@ -1,9 +1,10 @@
1
1
  import { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
2
2
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
- import { NextEditorPlugin, EditorAppearance } from '../../types';
3
+ import { NextEditorPlugin, EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
4
4
  import { LongPressSelectionPluginOptions } from '../selection/types';
5
5
  import type { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
7
+ import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
7
8
  interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
8
9
  allowAutoSave?: boolean;
9
10
  breakoutEnabled?: boolean;
@@ -15,7 +16,8 @@ declare const extensionPlugin: NextEditorPlugin<'extension', {
15
16
  dependencies: [
16
17
  typeof featureFlagsPlugin,
17
18
  typeof widthPlugin,
18
- typeof decorationsPlugin
19
+ typeof decorationsPlugin,
20
+ OptionalPlugin<typeof contextPanelPlugin>
19
21
  ];
20
22
  }>;
21
23
  export default extensionPlugin;
@@ -5,8 +5,9 @@ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
5
5
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
7
7
  import { EditorAppearance } from '../../../types/editor-appearance';
8
- import { ForwardRef, getPosHandler, ReactNodeView } from '../../../nodeviews';
9
- import { PortalProviderAPI } from '../../../ui/PortalProvider';
8
+ import { ForwardRef, getPosHandler } from '../../../nodeviews';
9
+ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
10
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
10
11
  import { EventDispatcher } from '../../../event-dispatcher';
11
12
  import type { widthPlugin } from '@atlaskit/editor-plugin-width';
12
13
  interface ExtensionNodeViewOptions {
@@ -1,2 +1,3 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- export default function keymapPlugin(): SafePlugin;
2
+ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
3
+ export default function keymapPlugin(applyChange: ApplyChangeHandler | undefined): SafePlugin;
@@ -6,18 +6,20 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
7
7
  import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
8
  import { EditorAppearance } from '../../../types/editor-appearance';
9
- import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
10
- import { PortalProviderAPI } from '../../../ui/PortalProvider';
9
+ import { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
10
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
11
11
  import { getPluginState, createCommand } from '../plugin-factory';
12
12
  import { pluginKey } from '../plugin-key';
13
13
  import type extensionPlugin from '../index';
14
+ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
14
15
  export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
15
16
  export declare const createContextIdentifierProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
16
- export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, }: {
17
+ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
17
18
  view: EditorView;
18
19
  prevState: EditorState;
19
20
  domAtPos: EditorView['domAtPos'];
20
21
  extensionHandlers: ExtensionHandlers;
22
+ applyChange: ApplyChangeHandler | undefined;
21
23
  }) => true | undefined;
22
24
  declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<typeof extensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
23
25
  appearance?: EditorAppearance;
@@ -1,5 +1,6 @@
1
1
  import { FloatingToolbarHandler } from '../floating-toolbar/types';
2
2
  import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
3
+ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
3
4
  export declare const messages: {
4
5
  edit: {
5
6
  id: string;
@@ -32,4 +33,10 @@ export declare const messages: {
32
33
  description: string;
33
34
  };
34
35
  };
35
- export declare const getToolbarConfig: (breakoutEnabled: boolean | undefined, hoverDecoration: HoverDecorationHandler | undefined) => FloatingToolbarHandler;
36
+ interface GetToolbarConfigProps {
37
+ breakoutEnabled: boolean | undefined;
38
+ hoverDecoration: HoverDecorationHandler | undefined;
39
+ applyChangeToContextPanel: ApplyChangeHandler | undefined;
40
+ }
41
+ export declare const getToolbarConfig: ({ breakoutEnabled, hoverDecoration, applyChangeToContextPanel, }: GetToolbarConfigProps) => FloatingToolbarHandler;
42
+ export {};
@@ -1,5 +1,6 @@
1
1
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
2
2
  import { UpdateExtension, ExtensionProvider, Parameters, TransformBefore, TransformAfter } from '@atlaskit/editor-common/extensions';
3
+ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
3
4
  export type ExtensionState<T extends Parameters = Parameters> = {
4
5
  localId?: string;
5
6
  autoSaveResolve?: () => void;
@@ -13,6 +14,7 @@ export type ExtensionState<T extends Parameters = Parameters> = {
13
14
  processParametersBefore?: TransformBefore<T>;
14
15
  processParametersAfter?: TransformAfter<T>;
15
16
  positions?: Record<number, number>;
17
+ applyChangeToContextPanel: ApplyChangeHandler | undefined;
16
18
  };
17
19
  export type ExtensionAction<T extends Parameters = Parameters> = {
18
20
  type: 'UPDATE_STATE';
@@ -2,11 +2,13 @@
2
2
  import { Node as PMNode } from 'prosemirror-model';
3
3
  import { EditorView } from 'prosemirror-view';
4
4
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
5
+ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
5
6
  interface Props {
6
7
  node: PMNode;
7
8
  extensionProvider: ExtensionProvider;
8
9
  editorView: EditorView;
9
10
  separator?: 'start' | 'end' | 'both';
11
+ applyChangeToContextPanel: ApplyChangeHandler | undefined;
10
12
  }
11
13
  export declare const ExtensionsPlaceholder: (props: Props) => JSX.Element | null;
12
14
  export {};
@@ -7,8 +7,9 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
7
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
8
8
  import { FloatingToolbarItem } from '../types';
9
9
  import { WrappedComponentProps } from 'react-intl-next';
10
- import { FeatureFlags, PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
11
- import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
10
+ import { FeatureFlags, PluginInjectionAPIWithDependencies, OptionalPlugin } from '@atlaskit/editor-common/types';
11
+ import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
12
+ import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
12
13
  export type Item = FloatingToolbarItem<Function>;
13
14
  export interface Props {
14
15
  items: Array<Item>;
@@ -26,7 +27,10 @@ export interface Props {
26
27
  extensionsProvider?: ExtensionProvider;
27
28
  scrollable?: boolean;
28
29
  featureFlags: FeatureFlags;
29
- api: PluginInjectionAPIWithDependency<typeof decorationsPlugin> | undefined;
30
+ api: PluginInjectionAPIWithDependencies<[
31
+ typeof decorationsPlugin,
32
+ OptionalPlugin<typeof contextPanelPlugin>
33
+ ]> | undefined;
30
34
  }
31
35
  export declare const isSameItem: (leftItem: Item, rightItem: Item) => boolean;
32
36
  export declare const areSameItems: (leftArr?: Array<Item>, rightArr?: Array<Item>) => boolean;
@@ -53,7 +53,6 @@ export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
53
53
  export { default as scrollIntoViewPlugin } from './scroll-into-view';
54
54
  export { default as mobileDimensionsPlugin } from './mobile-dimensions';
55
55
  export { default as findReplacePlugin } from './find-replace';
56
- export { default as contextPanelPlugin } from './context-panel';
57
56
  export { default as selectionPlugin } from './selection';
58
57
  export { default as mobileSelectionPlugin } from './mobile-selection';
59
58
  export { default as clipboardPlugin } from './clipboard';
@@ -10,6 +10,7 @@ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
10
10
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
11
11
  import { MediaPluginState } from './pm-plugins/types';
12
12
  import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
13
+ import type editorDisabled from '../editor-disabled';
13
14
  export type { MediaState, MediaProvider, CustomMediaPicker };
14
15
  export { insertMediaSingleNode } from './utils/media-single';
15
16
  declare const mediaPlugin: NextEditorPlugin<'media', {
@@ -20,7 +21,8 @@ declare const mediaPlugin: NextEditorPlugin<'media', {
20
21
  typeof gridPlugin,
21
22
  typeof widthPlugin,
22
23
  typeof decorationsPlugin,
23
- FloatingToolbarPlugin
24
+ FloatingToolbarPlugin,
25
+ typeof editorDisabled
24
26
  ];
25
27
  sharedState: MediaPluginState | null;
26
28
  }>;
@@ -4,11 +4,13 @@ import { MediaClientConfig } from '@atlaskit/media-core';
4
4
  import { Node as PMNode } from 'prosemirror-model';
5
5
  import { EditorView, NodeView } from 'prosemirror-view';
6
6
  import React from 'react';
7
- import { EventDispatcher } from '../../../event-dispatcher';
7
+ import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
8
8
  import { getPosHandler } from '../../../nodeviews/';
9
- import { PortalProviderAPI } from '../../../ui/PortalProvider';
9
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
10
10
  import { MediaOptions } from '../types';
11
11
  import { WrappedComponentProps } from 'react-intl-next';
12
+ import type mediaPlugin from '../index';
13
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
12
14
  export type MediaGroupProps = {
13
15
  forwardRef?: (ref: HTMLElement) => void;
14
16
  node: PMNode;
@@ -30,4 +32,4 @@ declare const IntlMediaGroup: React.FC<import("react-intl-next").WithIntlProps<M
30
32
  WrappedComponent: React.ComponentType<MediaGroupProps>;
31
33
  };
32
34
  export default IntlMediaGroup;
33
- export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions?: MediaOptions) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
35
+ export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -2,14 +2,17 @@ import { Node as PMNode } from 'prosemirror-model';
2
2
  import { EditorView, NodeView } from 'prosemirror-view';
3
3
  import React from 'react';
4
4
  import { EventDispatcher } from '../../../event-dispatcher';
5
- import { getPosHandler, ProsemirrorGetPosHandler, SelectionBasedNodeView } from '../../../nodeviews/';
5
+ import { getPosHandler, ProsemirrorGetPosHandler } from '../../../nodeviews/';
6
+ import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
6
7
  import { FileIdentifier } from '@atlaskit/media-client';
7
8
  import { ProviderFactory, ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
8
9
  import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
9
- import { PortalProviderAPI } from '../../../../src/ui/PortalProvider';
10
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
10
11
  import { MediaPluginState } from '../pm-plugins/types';
11
12
  import { MediaNodeUpdater } from './mediaNodeUpdater';
12
13
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
14
+ import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
15
+ import type mediaPlugin from '../index';
13
16
  export interface MediaInlineProps {
14
17
  mediaProvider: Promise<MediaProvider>;
15
18
  identifier: FileIdentifier;
@@ -44,4 +47,4 @@ export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInl
44
47
  viewShouldUpdate(nextNode: PMNode): boolean;
45
48
  render(props: MediaInlineNodeViewProps): JSX.Element;
46
49
  }
47
- export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
50
+ export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -3,18 +3,20 @@ import { MediaADFAttrs } from '@atlaskit/adf-schema';
3
3
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { Providers, MediaProvider, ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
5
5
  import { Node as PMNode } from 'prosemirror-model';
6
- import { EditorView } from 'prosemirror-view';
6
+ import { EditorView, Decoration } from 'prosemirror-view';
7
7
  import { EventDispatcher } from '../../../../event-dispatcher';
8
- import { getPosHandler, SelectionBasedNodeView } from '../../../../nodeviews';
9
- import { PortalProviderAPI } from '../../../../ui/PortalProvider';
8
+ import { getPosHandler } from '../../../../nodeviews';
9
+ import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
10
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
10
11
  import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
11
12
  import { MediaOptions } from '../../types';
12
13
  import { MediaNodeViewProps } from '../types';
13
14
  import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
14
15
  import type mediaPlugin from '../../index';
15
16
  declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
17
+ private isSelected;
16
18
  createDomRef(): HTMLElement;
17
- viewShouldUpdate(nextNode: PMNode): boolean;
19
+ viewShouldUpdate(nextNode: PMNode, decorations: Decoration[]): boolean;
18
20
  stopEvent(event: Event): boolean;
19
21
  getAttrs(): MediaADFAttrs;
20
22
  isMediaBlobUrl(): boolean;
@@ -11,12 +11,12 @@ import { CardEvent } from '@atlaskit/media-card';
11
11
  import { MediaClientConfig } from '@atlaskit/media-core';
12
12
  import { getPosHandler, ForwardRef } from '../../../nodeviews/';
13
13
  import { EventDispatcher } from '../../../event-dispatcher';
14
- import { PortalProviderAPI } from '../../../ui/PortalProvider';
14
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
15
15
  import { MediaOptions } from '../types';
16
16
  import { MediaSingleNodeProps, MediaSingleNodeViewProps } from './types';
17
17
  import { MediaNodeUpdater } from './mediaNodeUpdater';
18
18
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
19
- import ReactNodeView from '../../../nodeviews/ReactNodeView';
19
+ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
20
20
  import type mediaPlugin from '../index';
21
21
  export interface MediaSingleNodeState {
22
22
  width?: number;
@@ -100,3 +100,7 @@ export type MediaFloatingToolbarOptions = {
100
100
  altTextValidator?: (value: string) => string[];
101
101
  getEditorFeatureFlags?: GetEditorFeatureFlags;
102
102
  };
103
+ export type MediaDecorationSpec = {
104
+ type: 'media';
105
+ selected: boolean;
106
+ };
@@ -1,5 +1,5 @@
1
1
  import { NodeView } from 'prosemirror-view';
2
2
  import { EventDispatcher } from '../../../event-dispatcher';
3
3
  import { getPosHandler } from '../../../nodeviews';
4
- import { PortalProviderAPI } from '../../../ui/PortalProvider';
4
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
5
5
  export declare const decisionItemNodeView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher) => (node: any, view: any, getPos: getPosHandler) => NodeView;
@@ -2,7 +2,7 @@ import { NodeView } from 'prosemirror-view';
2
2
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
3
  import { EventDispatcher } from '../../../event-dispatcher';
4
4
  import { getPosHandler } from '../../../nodeviews';
5
- import { PortalProviderAPI } from '../../../ui/PortalProvider';
5
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
6
6
  export interface Props {
7
7
  providerFactory: ProviderFactory;
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
3
  import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
4
- import { PortalProviderAPI } from '../../../ui/PortalProvider';
4
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
5
5
  export declare function createPlugin(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, useLongPressSelection?: boolean): SafePlugin<any, any>;
@@ -27,7 +27,6 @@ type PluginData = {
27
27
  export declare const createPMSchemaAndPlugins: (inputPreset?: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>) => (pluginFactoryParams: Omit<LightPMPluginFactoryParams, 'schema'> & {
28
28
  pluginInjectionAPI: EditorPluginInjectionAPI;
29
29
  }) => PluginData;
30
- export { PortalProviderAPI } from './ui/PortalProvider';
31
30
  export { EventDispatcher } from './event-dispatcher';
32
31
  export type { Dispatch } from './event-dispatcher';
33
32
  export { GapCursorSelection, Side as GapCursorSide, } from './plugins/selection/gap-cursor/selection';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "185.2.24",
3
+ "version": "185.2.26",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -49,12 +49,13 @@
49
49
  "@atlaskit/code": "^14.6.0",
50
50
  "@atlaskit/date": "^0.10.0",
51
51
  "@atlaskit/datetime-picker": "^12.7.0",
52
- "@atlaskit/editor-common": "^74.7.0",
52
+ "@atlaskit/editor-common": "^74.8.0",
53
53
  "@atlaskit/editor-json-transformer": "^8.9.0",
54
54
  "@atlaskit/editor-markdown-transformer": "^5.2.0",
55
55
  "@atlaskit/editor-palette": "1.5.0",
56
56
  "@atlaskit/editor-plugin-analytics": "^0.0.2",
57
57
  "@atlaskit/editor-plugin-content-insertion": "^0.0.2",
58
+ "@atlaskit/editor-plugin-context-panel": "^0.1.0",
58
59
  "@atlaskit/editor-plugin-decorations": "^0.1.0",
59
60
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",
60
61
  "@atlaskit/editor-plugin-floating-toolbar": "^0.2.0",
package/report.api.md CHANGED
@@ -121,6 +121,9 @@ import { PerformanceTracking } from '@atlaskit/editor-common/types';
121
121
  import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
122
122
  import { PluginKey } from 'prosemirror-state';
123
123
  import { PMPlugin } from '@atlaskit/editor-common/types';
124
+ import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
125
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
126
+ import { PortalRenderer } from '@atlaskit/editor-common/portal-provider';
124
127
  import { PositionType } from '@atlaskit/tooltip/types';
125
128
  import { PresenceProvider } from '@atlaskit/mention/resource';
126
129
  import { PresenceResource } from '@atlaskit/mention/resource';
@@ -147,7 +150,6 @@ import { setTextSelection } from '@atlaskit/editor-common/utils';
147
150
  import { SEVERITY } from '@atlaskit/editor-common/utils';
148
151
  import { TaskDecisionProvider } from '@atlaskit/task-decision';
149
152
  import { TeamMentionResource } from '@atlaskit/mention/team-resource';
150
- import type { ThemeModes } from '@atlaskit/theme/types';
151
153
  import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
152
154
  import { Transaction } from 'prosemirror-state';
153
155
  import { TransactionTracking } from '@atlaskit/editor-common/types';
@@ -259,16 +261,6 @@ interface BasePluginOptions {
259
261
  ufo?: boolean;
260
262
  }
261
263
 
262
- // @public (undocumented)
263
- type BasePortalProviderProps = {
264
- render: (
265
- portalProviderAPI: PortalProviderAPI,
266
- ) => JSX.Element | React_2.ReactChild | null;
267
- onAnalyticsEvent?: FireAnalyticsCallback;
268
- useAnalyticsContext?: boolean;
269
- themeMode?: ThemeModes;
270
- } & WrappedComponentProps;
271
-
272
264
  // @public (undocumented)
273
265
  export class BaseReactEditorView<T = {}> extends ReactEditorView_2<T> {}
274
266
 
@@ -778,6 +770,19 @@ type EditorContextProps = {
778
770
  editorActions?: EditorActions;
779
771
  };
780
772
 
773
+ // @public (undocumented)
774
+ const editorDisabledPlugin: NextEditorPlugin<
775
+ 'editorDisabled',
776
+ {
777
+ sharedState: EditorDisabledPluginState;
778
+ }
779
+ >;
780
+
781
+ // @public (undocumented)
782
+ type EditorDisabledPluginState = {
783
+ editorDisabled: boolean;
784
+ };
785
+
781
786
  export { EditorFeatureFlags };
782
787
 
783
788
  // @public (undocumented)
@@ -1561,6 +1566,7 @@ export const mediaPlugin: NextEditorPlugin<
1561
1566
  typeof widthPlugin,
1562
1567
  typeof decorationsPlugin,
1563
1568
  FloatingToolbarPlugin,
1569
+ typeof editorDisabledPlugin,
1564
1570
  ];
1565
1571
  sharedState: MediaPluginState | null;
1566
1572
  }
@@ -1799,13 +1805,6 @@ type MobileUploadEndEventPayload = {
1799
1805
  };
1800
1806
  };
1801
1807
 
1802
- // @public (undocumented)
1803
- type MountedPortal = {
1804
- children: () => React_2.ReactChild | null;
1805
- hasAnalyticsContext: boolean;
1806
- hasIntlContext: boolean;
1807
- };
1808
-
1809
1808
  // @public (undocumented)
1810
1809
  const name_2: string;
1811
1810
  export { name_2 as name };
@@ -1923,75 +1922,11 @@ interface PlaceholderTextOptions {
1923
1922
  allowInserting?: boolean;
1924
1923
  }
1925
1924
 
1926
- // @public (undocumented)
1927
- export const PortalProvider: React_2.FC<
1928
- WithIntlProps<BasePortalProviderProps>
1929
- > & {
1930
- WrappedComponent: React_2.ComponentType<BasePortalProviderProps>;
1931
- };
1932
-
1933
- // @public (undocumented)
1934
- export class PortalProviderAPI extends EventDispatcher {
1935
- constructor(
1936
- intl: IntlShape,
1937
- onAnalyticsEvent?: FireAnalyticsCallback,
1938
- analyticsContext?: boolean,
1939
- themeMode?: ThemeModes,
1940
- );
1941
- // (undocumented)
1942
- context: any;
1943
- // (undocumented)
1944
- forceUpdate({
1945
- intl,
1946
- themeMode,
1947
- }: {
1948
- intl: IntlShape;
1949
- themeMode: ThemeModes | undefined;
1950
- }): void;
1951
- // (undocumented)
1952
- intl: IntlShape;
1953
- // (undocumented)
1954
- onAnalyticsEvent?: FireAnalyticsCallback;
1955
- // (undocumented)
1956
- portals: Map<HTMLElement, MountedPortal>;
1957
- // (undocumented)
1958
- remove(container: HTMLElement): void;
1959
- // (undocumented)
1960
- render(
1961
- children: () => JSX.Element | React_2.ReactChild | null,
1962
- container: HTMLElement,
1963
- hasAnalyticsContext?: boolean,
1964
- hasIntlContext?: boolean,
1965
- ): void;
1966
- // (undocumented)
1967
- setContext: (context: any) => void;
1968
- // (undocumented)
1969
- themeMode?: ThemeModes;
1970
- // (undocumented)
1971
- useAnalyticsContext?: boolean;
1972
- }
1973
-
1974
- // @public (undocumented)
1975
- export class PortalRenderer extends React_2.Component<
1976
- {
1977
- portalProviderAPI: PortalProviderAPI;
1978
- },
1979
- PortalRendererState
1980
- > {
1981
- constructor(props: { portalProviderAPI: PortalProviderAPI });
1982
- // (undocumented)
1983
- handleUpdate: (portals: Portals) => void;
1984
- // (undocumented)
1985
- render(): JSX.Element;
1986
- }
1925
+ export { PortalProvider };
1987
1926
 
1988
- // @public (undocumented)
1989
- type PortalRendererState = {
1990
- portals: Portals;
1991
- };
1927
+ export { PortalProviderAPI };
1992
1928
 
1993
- // @public (undocumented)
1994
- type Portals = Map<HTMLElement, React_2.ReactChild>;
1929
+ export { PortalRenderer };
1995
1930
 
1996
1931
  // @public (undocumented)
1997
1932
  type Predicate = (state: EditorState, view?: EditorView) => boolean;
@@ -110,6 +110,9 @@ import { PerformanceTracking } from '@atlaskit/editor-common/types';
110
110
  import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
111
111
  import { PluginKey } from 'prosemirror-state';
112
112
  import { PMPlugin } from '@atlaskit/editor-common/types';
113
+ import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
114
+ import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
115
+ import { PortalRenderer } from '@atlaskit/editor-common/portal-provider';
113
116
  import { PositionType } from '@atlaskit/tooltip/types';
114
117
  import { PresenceProvider } from '@atlaskit/mention/resource';
115
118
  import { PresenceResource } from '@atlaskit/mention/resource';
@@ -136,7 +139,6 @@ import { setTextSelection } from '@atlaskit/editor-common/utils';
136
139
  import { SEVERITY } from '@atlaskit/editor-common/utils';
137
140
  import { TaskDecisionProvider } from '@atlaskit/task-decision';
138
141
  import { TeamMentionResource } from '@atlaskit/mention/team-resource';
139
- import type { ThemeModes } from '@atlaskit/theme/types';
140
142
  import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
141
143
  import { Transaction } from 'prosemirror-state';
142
144
  import { TransactionTracking } from '@atlaskit/editor-common/types';
@@ -246,14 +248,6 @@ interface BasePluginOptions {
246
248
  ufo?: boolean;
247
249
  }
248
250
 
249
- // @public (undocumented)
250
- type BasePortalProviderProps = {
251
- render: (portalProviderAPI: PortalProviderAPI) => JSX.Element | React_2.ReactChild | null;
252
- onAnalyticsEvent?: FireAnalyticsCallback;
253
- useAnalyticsContext?: boolean;
254
- themeMode?: ThemeModes;
255
- } & WrappedComponentProps;
256
-
257
251
  // @public (undocumented)
258
252
  export class BaseReactEditorView<T = {}> extends ReactEditorView_2<T> {
259
253
  }
@@ -711,6 +705,16 @@ type EditorContextProps = {
711
705
  editorActions?: EditorActions;
712
706
  };
713
707
 
708
+ // @public (undocumented)
709
+ const editorDisabledPlugin: NextEditorPlugin<'editorDisabled', {
710
+ sharedState: EditorDisabledPluginState;
711
+ }>;
712
+
713
+ // @public (undocumented)
714
+ type EditorDisabledPluginState = {
715
+ editorDisabled: boolean;
716
+ };
717
+
714
718
  export { EditorFeatureFlags }
715
719
 
716
720
  // @public (undocumented)
@@ -1394,7 +1398,8 @@ export const mediaPlugin: NextEditorPlugin<'media', {
1394
1398
  typeof gridPlugin,
1395
1399
  typeof widthPlugin,
1396
1400
  typeof decorationsPlugin,
1397
- FloatingToolbarPlugin
1401
+ FloatingToolbarPlugin,
1402
+ typeof editorDisabledPlugin
1398
1403
  ];
1399
1404
  sharedState: MediaPluginState | null;
1400
1405
  }>;
@@ -1599,13 +1604,6 @@ type MobileUploadEndEventPayload = {
1599
1604
  };
1600
1605
  };
1601
1606
 
1602
- // @public (undocumented)
1603
- type MountedPortal = {
1604
- children: () => React_2.ReactChild | null;
1605
- hasAnalyticsContext: boolean;
1606
- hasIntlContext: boolean;
1607
- };
1608
-
1609
1607
  // @public (undocumented)
1610
1608
  const name_2: string;
1611
1609
  export { name_2 as name }
@@ -1711,59 +1709,11 @@ interface PlaceholderTextOptions {
1711
1709
  allowInserting?: boolean;
1712
1710
  }
1713
1711
 
1714
- // @public (undocumented)
1715
- export const PortalProvider: React_2.FC<WithIntlProps<BasePortalProviderProps>> & {
1716
- WrappedComponent: React_2.ComponentType<BasePortalProviderProps>;
1717
- };
1712
+ export { PortalProvider }
1718
1713
 
1719
- // @public (undocumented)
1720
- export class PortalProviderAPI extends EventDispatcher {
1721
- constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean, themeMode?: ThemeModes);
1722
- // (undocumented)
1723
- context: any;
1724
- // (undocumented)
1725
- forceUpdate({ intl, themeMode, }: {
1726
- intl: IntlShape;
1727
- themeMode: ThemeModes | undefined;
1728
- }): void;
1729
- // (undocumented)
1730
- intl: IntlShape;
1731
- // (undocumented)
1732
- onAnalyticsEvent?: FireAnalyticsCallback;
1733
- // (undocumented)
1734
- portals: Map<HTMLElement, MountedPortal>;
1735
- // (undocumented)
1736
- remove(container: HTMLElement): void;
1737
- // (undocumented)
1738
- render(children: () => JSX.Element | React_2.ReactChild | null, container: HTMLElement, hasAnalyticsContext?: boolean, hasIntlContext?: boolean): void;
1739
- // (undocumented)
1740
- setContext: (context: any) => void;
1741
- // (undocumented)
1742
- themeMode?: ThemeModes;
1743
- // (undocumented)
1744
- useAnalyticsContext?: boolean;
1745
- }
1714
+ export { PortalProviderAPI }
1746
1715
 
1747
- // @public (undocumented)
1748
- export class PortalRenderer extends React_2.Component<{
1749
- portalProviderAPI: PortalProviderAPI;
1750
- }, PortalRendererState> {
1751
- constructor(props: {
1752
- portalProviderAPI: PortalProviderAPI;
1753
- });
1754
- // (undocumented)
1755
- handleUpdate: (portals: Portals) => void;
1756
- // (undocumented)
1757
- render(): JSX.Element;
1758
- }
1759
-
1760
- // @public (undocumented)
1761
- type PortalRendererState = {
1762
- portals: Portals;
1763
- };
1764
-
1765
- // @public (undocumented)
1766
- type Portals = Map<HTMLElement, React_2.ReactChild>;
1716
+ export { PortalRenderer }
1767
1717
 
1768
1718
  // @public (undocumented)
1769
1719
  type Predicate = (state: EditorState, view?: EditorView) => boolean;