@atlaskit/editor-core 187.25.1 → 187.25.3

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 (62) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -2
  3. package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +2 -1
  4. package/dist/cjs/plugins/placeholder/index.js +6 -5
  5. package/dist/cjs/plugins/quick-insert/commands.js +0 -3
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/labs/next/presets/default.js +1 -1
  8. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +2 -1
  9. package/dist/es2019/plugins/placeholder/index.js +6 -5
  10. package/dist/es2019/plugins/quick-insert/commands.js +0 -2
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/labs/next/presets/default.js +1 -1
  13. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +2 -1
  14. package/dist/esm/plugins/placeholder/index.js +6 -5
  15. package/dist/esm/plugins/quick-insert/commands.js +0 -2
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/editor-next/hooks/useProviderFactory.d.ts +1 -1
  18. package/dist/types/editor-next/utils/handleProviders.d.ts +1 -2
  19. package/dist/types/index.d.ts +10 -3
  20. package/dist/types/labs/next/presets/default.d.ts +9 -10
  21. package/dist/types/plugins/code-block/index.d.ts +1 -1
  22. package/dist/types/plugins/placeholder/index.d.ts +1 -1
  23. package/dist/types/plugins/quick-insert/api.d.ts +1 -1
  24. package/dist/types/plugins/quick-insert/commands.d.ts +1 -1
  25. package/dist/types/plugins/quick-insert/index.d.ts +6 -5
  26. package/dist/types/plugins/quick-insert/plugin-key.d.ts +1 -1
  27. package/dist/types/plugins/quick-insert/search.d.ts +2 -2
  28. package/dist/types/plugins/quick-insert/types.d.ts +2 -22
  29. package/dist/types/types/editor-props.d.ts +1 -2
  30. package/dist/types/utils/prepare-quick-insert-provider.d.ts +4 -4
  31. package/dist/types-ts4.5/editor-next/hooks/useProviderFactory.d.ts +1 -1
  32. package/dist/types-ts4.5/editor-next/utils/handleProviders.d.ts +1 -2
  33. package/dist/types-ts4.5/index.d.ts +10 -3
  34. package/dist/types-ts4.5/labs/next/presets/default.d.ts +9 -10
  35. package/dist/types-ts4.5/plugins/code-block/index.d.ts +1 -1
  36. package/dist/types-ts4.5/plugins/placeholder/index.d.ts +1 -1
  37. package/dist/types-ts4.5/plugins/quick-insert/api.d.ts +1 -1
  38. package/dist/types-ts4.5/plugins/quick-insert/commands.d.ts +1 -1
  39. package/dist/types-ts4.5/plugins/quick-insert/index.d.ts +6 -5
  40. package/dist/types-ts4.5/plugins/quick-insert/plugin-key.d.ts +1 -1
  41. package/dist/types-ts4.5/plugins/quick-insert/search.d.ts +2 -2
  42. package/dist/types-ts4.5/plugins/quick-insert/types.d.ts +2 -22
  43. package/dist/types-ts4.5/types/editor-props.d.ts +1 -2
  44. package/dist/types-ts4.5/utils/prepare-quick-insert-provider.d.ts +4 -4
  45. package/package.json +2 -1
  46. package/report.api.md +15 -48
  47. package/tmp/api-report-tmp.d.ts +15 -46
  48. package/dist/cjs/plugins/composition/index.js +0 -33
  49. package/dist/cjs/plugins/composition/pm-plugins/main.js +0 -69
  50. package/dist/cjs/plugins/composition/pm-plugins/plugin-key.js +0 -9
  51. package/dist/es2019/plugins/composition/index.js +0 -23
  52. package/dist/es2019/plugins/composition/pm-plugins/main.js +0 -60
  53. package/dist/es2019/plugins/composition/pm-plugins/plugin-key.js +0 -2
  54. package/dist/esm/plugins/composition/index.js +0 -25
  55. package/dist/esm/plugins/composition/pm-plugins/main.js +0 -62
  56. package/dist/esm/plugins/composition/pm-plugins/plugin-key.js +0 -2
  57. package/dist/types/plugins/composition/index.d.ts +0 -8
  58. package/dist/types/plugins/composition/pm-plugins/main.d.ts +0 -4
  59. package/dist/types/plugins/composition/pm-plugins/plugin-key.d.ts +0 -6
  60. package/dist/types-ts4.5/plugins/composition/index.d.ts +0 -8
  61. package/dist/types-ts4.5/plugins/composition/pm-plugins/main.d.ts +0 -4
  62. package/dist/types-ts4.5/plugins/composition/pm-plugins/plugin-key.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.25.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cbff538b420`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cbff538b420) - [ED-19428] Move shared types from quick-insert plugin to editor-common as a first step towards decoupling it from editor-core
8
+
9
+ ## 187.25.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`f12aff135b6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f12aff135b6) - Extract Composition Plugin
14
+ - Updated dependencies
15
+
3
16
  ## 187.25.1
4
17
 
5
18
  ### Patch Changes
@@ -26,7 +26,7 @@ var _plugins = require("../../../plugins");
26
26
  var _editorPluginAnalytics = require("@atlaskit/editor-plugin-analytics");
27
27
  var _placeholder = _interopRequireDefault(require("../../../plugins/placeholder"));
28
28
  var _annotation = _interopRequireDefault(require("../../../plugins/annotation"));
29
- var _composition = _interopRequireDefault(require("../../../plugins/composition"));
29
+ var _editorPluginComposition = require("@atlaskit/editor-plugin-composition");
30
30
  var _quickInsert = _interopRequireDefault(require("../../../plugins/quick-insert"));
31
31
  var _selection = _interopRequireDefault(require("../../../plugins/selection"));
32
32
  var _codeBlock = _interopRequireDefault(require("../../../plugins/code-block"));
@@ -62,7 +62,7 @@ function createDefaultPreset(options) {
62
62
  }]);
63
63
  }
64
64
  return builder;
65
- }).add([_paste.default, options.paste]).add(_clipboard.default).add(_editorPluginFocus.focusPlugin).add(_composition.default).add([_base.default, options.base]).add(_editorPluginDecorations.decorationsPlugin).maybeAdd(_undoRedo.default, function (p, builder) {
65
+ }).add([_paste.default, options.paste]).add(_clipboard.default).add(_editorPluginFocus.focusPlugin).add(_editorPluginComposition.compositionPlugin).add([_base.default, options.base]).add(_editorPluginDecorations.decorationsPlugin).maybeAdd(_undoRedo.default, function (p, builder) {
66
66
  var _options$featureFlags;
67
67
  // The undo redo plugin needs to be add before the blockTypePlugin
68
68
  if ((_options$featureFlags = options.featureFlags) !== null && _options$featureFlags !== void 0 && _options$featureFlags.undoRedoButtons) {
@@ -19,9 +19,10 @@ var ideUX = function ideUX(pluginInjectionApi) {
19
19
  return new _safePlugin.SafePlugin({
20
20
  props: {
21
21
  handleTextInput: function handleTextInput(view, from, to, text) {
22
+ var _pluginInjectionApi$d;
22
23
  var state = view.state,
23
24
  dispatch = view.dispatch;
24
- var compositionPluginState = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.composition.sharedState.currentState();
25
+ var compositionPluginState = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.composition) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.sharedState.currentState();
25
26
  if ((0, _lineHandling.isCursorInsideCodeBlock)(state) && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
26
27
  var beforeText = (0, _lineHandling.getStartOfCurrentLine)(state).text;
27
28
  var afterText = (0, _lineHandling.getEndOfCurrentLine)(state).text;
@@ -83,13 +83,13 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
83
83
  key: pluginKey,
84
84
  state: {
85
85
  init: function init(_, state) {
86
- var _api$dependencies$foc;
87
- return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc = api.dependencies.focus.sharedState.currentState()) === null || _api$dependencies$foc === void 0 ? void 0 : _api$dependencies$foc.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
86
+ var _api$dependencies$foc, _api$dependencies$foc2;
87
+ return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc = api.dependencies.focus) === null || _api$dependencies$foc === void 0 ? void 0 : (_api$dependencies$foc2 = _api$dependencies$foc.sharedState.currentState()) === null || _api$dependencies$foc2 === void 0 ? void 0 : _api$dependencies$foc2.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
88
88
  },
89
89
  apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
90
- var _api$dependencies$foc2;
90
+ var _api$dependencies$foc3, _api$dependencies$foc4;
91
91
  var meta = tr.getMeta(pluginKey);
92
- var isEditorFocused = Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc2 = api.dependencies.focus.sharedState.currentState()) === null || _api$dependencies$foc2 === void 0 ? void 0 : _api$dependencies$foc2.hasFocus);
92
+ var isEditorFocused = Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc3 = api.dependencies.focus) === null || _api$dependencies$foc3 === void 0 ? void 0 : (_api$dependencies$foc4 = _api$dependencies$foc3.sharedState.currentState()) === null || _api$dependencies$foc4 === void 0 ? void 0 : _api$dependencies$foc4.hasFocus);
93
93
  if (meta) {
94
94
  if (meta.removePlaceholder) {
95
95
  return emptyPlaceholder;
@@ -103,11 +103,12 @@ function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api) {
103
103
  },
104
104
  props: {
105
105
  decorations: function decorations(editorState) {
106
+ var _api$dependencies$com;
106
107
  var _getPlaceholderState = getPlaceholderState(editorState),
107
108
  hasPlaceholder = _getPlaceholderState.hasPlaceholder,
108
109
  placeholderText = _getPlaceholderState.placeholderText,
109
110
  pos = _getPlaceholderState.pos;
110
- var compositionPluginState = api === null || api === void 0 ? void 0 : api.dependencies.composition.sharedState.currentState();
111
+ var compositionPluginState = api === null || api === void 0 ? void 0 : (_api$dependencies$com = api.dependencies.composition) === null || _api$dependencies$com === void 0 ? void 0 : _api$dependencies$com.sharedState.currentState();
111
112
  if (hasPlaceholder && placeholderText && pos !== undefined && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
112
113
  return createPlaceholderDecoration(editorState, placeholderText, pos);
113
114
  }
@@ -6,9 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.openElementBrowserModal = exports.insertItem = exports.closeElementBrowserModal = void 0;
7
7
  var _insert = require("@atlaskit/editor-common/insert");
8
8
  var _pluginKey = require("./plugin-key");
9
- // AFP-2532 TODO: Fix automatic suppressions below
10
- // eslint-disable-next-line @atlassian/tangerine/import/entry-points
11
-
12
9
  var openElementBrowserModal = function openElementBrowserModal() {
13
10
  return function (state, dispatch) {
14
11
  if (dispatch) {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.25.1";
9
+ var version = "187.25.3";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -20,7 +20,7 @@ import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
20
20
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
21
21
  import placeholderPlugin from '../../../plugins/placeholder';
22
22
  import annotationPlugin from '../../../plugins/annotation';
23
- import compositionPlugin from '../../../plugins/composition';
23
+ import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
24
24
  import quickInsertPlugin from '../../../plugins/quick-insert';
25
25
  import selectionPlugin from '../../../plugins/selection';
26
26
  import codeBlockPlugin from '../../../plugins/code-block';
@@ -13,11 +13,12 @@ const ideUX = pluginInjectionApi => {
13
13
  return new SafePlugin({
14
14
  props: {
15
15
  handleTextInput(view, from, to, text) {
16
+ var _pluginInjectionApi$d;
16
17
  const {
17
18
  state,
18
19
  dispatch
19
20
  } = view;
20
- const compositionPluginState = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.composition.sharedState.currentState();
21
+ const compositionPluginState = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.composition) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.sharedState.currentState();
21
22
  if (isCursorInsideCodeBlock(state) && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
22
23
  const beforeText = getStartOfCurrentLine(state).text;
23
24
  const afterText = getEndOfCurrentLine(state).text;
@@ -74,13 +74,13 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
74
74
  key: pluginKey,
75
75
  state: {
76
76
  init: (_, state) => {
77
- var _api$dependencies$foc;
78
- return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc = api.dependencies.focus.sharedState.currentState()) === null || _api$dependencies$foc === void 0 ? void 0 : _api$dependencies$foc.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
77
+ var _api$dependencies$foc, _api$dependencies$foc2;
78
+ return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc = api.dependencies.focus) === null || _api$dependencies$foc === void 0 ? void 0 : (_api$dependencies$foc2 = _api$dependencies$foc.sharedState.currentState()) === null || _api$dependencies$foc2 === void 0 ? void 0 : _api$dependencies$foc2.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
79
79
  },
80
80
  apply: (tr, _oldPluginState, _oldEditorState, newEditorState) => {
81
- var _api$dependencies$foc2;
81
+ var _api$dependencies$foc3, _api$dependencies$foc4;
82
82
  const meta = tr.getMeta(pluginKey);
83
- const isEditorFocused = Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc2 = api.dependencies.focus.sharedState.currentState()) === null || _api$dependencies$foc2 === void 0 ? void 0 : _api$dependencies$foc2.hasFocus);
83
+ const isEditorFocused = Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc3 = api.dependencies.focus) === null || _api$dependencies$foc3 === void 0 ? void 0 : (_api$dependencies$foc4 = _api$dependencies$foc3.sharedState.currentState()) === null || _api$dependencies$foc4 === void 0 ? void 0 : _api$dependencies$foc4.hasFocus);
84
84
  if (meta) {
85
85
  if (meta.removePlaceholder) {
86
86
  return emptyPlaceholder;
@@ -94,12 +94,13 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
94
94
  },
95
95
  props: {
96
96
  decorations(editorState) {
97
+ var _api$dependencies$com;
97
98
  const {
98
99
  hasPlaceholder,
99
100
  placeholderText,
100
101
  pos
101
102
  } = getPlaceholderState(editorState);
102
- const compositionPluginState = api === null || api === void 0 ? void 0 : api.dependencies.composition.sharedState.currentState();
103
+ const compositionPluginState = api === null || api === void 0 ? void 0 : (_api$dependencies$com = api.dependencies.composition) === null || _api$dependencies$com === void 0 ? void 0 : _api$dependencies$com.sharedState.currentState();
103
104
  if (hasPlaceholder && placeholderText && pos !== undefined && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
104
105
  return createPlaceholderDecoration(editorState, placeholderText, pos);
105
106
  }
@@ -1,5 +1,3 @@
1
- // AFP-2532 TODO: Fix automatic suppressions below
2
- // eslint-disable-next-line @atlassian/tangerine/import/entry-points
3
1
  import { insertSelectedItem } from '@atlaskit/editor-common/insert';
4
2
  import { pluginKey } from './plugin-key';
5
3
  export const openElementBrowserModal = () => (state, dispatch) => {
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.25.1";
2
+ export const version = "187.25.3";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -20,7 +20,7 @@ import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../../../plugins';
20
20
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
21
21
  import placeholderPlugin from '../../../plugins/placeholder';
22
22
  import annotationPlugin from '../../../plugins/annotation';
23
- import compositionPlugin from '../../../plugins/composition';
23
+ import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
24
24
  import quickInsertPlugin from '../../../plugins/quick-insert';
25
25
  import selectionPlugin from '../../../plugins/selection';
26
26
  import codeBlockPlugin from '../../../plugins/code-block';
@@ -13,9 +13,10 @@ var ideUX = function ideUX(pluginInjectionApi) {
13
13
  return new SafePlugin({
14
14
  props: {
15
15
  handleTextInput: function handleTextInput(view, from, to, text) {
16
+ var _pluginInjectionApi$d;
16
17
  var state = view.state,
17
18
  dispatch = view.dispatch;
18
- var compositionPluginState = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.composition.sharedState.currentState();
19
+ var compositionPluginState = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.composition) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.sharedState.currentState();
19
20
  if (isCursorInsideCodeBlock(state) && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
20
21
  var beforeText = getStartOfCurrentLine(state).text;
21
22
  var afterText = getEndOfCurrentLine(state).text;
@@ -73,13 +73,13 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
73
73
  key: pluginKey,
74
74
  state: {
75
75
  init: function init(_, state) {
76
- var _api$dependencies$foc;
77
- return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc = api.dependencies.focus.sharedState.currentState()) === null || _api$dependencies$foc === void 0 ? void 0 : _api$dependencies$foc.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
76
+ var _api$dependencies$foc, _api$dependencies$foc2;
77
+ return createPlaceHolderStateFrom(Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc = api.dependencies.focus) === null || _api$dependencies$foc === void 0 ? void 0 : (_api$dependencies$foc2 = _api$dependencies$foc.sharedState.currentState()) === null || _api$dependencies$foc2 === void 0 ? void 0 : _api$dependencies$foc2.hasFocus), state, defaultPlaceholderText, bracketPlaceholderText);
78
78
  },
79
79
  apply: function apply(tr, _oldPluginState, _oldEditorState, newEditorState) {
80
- var _api$dependencies$foc2;
80
+ var _api$dependencies$foc3, _api$dependencies$foc4;
81
81
  var meta = tr.getMeta(pluginKey);
82
- var isEditorFocused = Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc2 = api.dependencies.focus.sharedState.currentState()) === null || _api$dependencies$foc2 === void 0 ? void 0 : _api$dependencies$foc2.hasFocus);
82
+ var isEditorFocused = Boolean(api === null || api === void 0 ? void 0 : (_api$dependencies$foc3 = api.dependencies.focus) === null || _api$dependencies$foc3 === void 0 ? void 0 : (_api$dependencies$foc4 = _api$dependencies$foc3.sharedState.currentState()) === null || _api$dependencies$foc4 === void 0 ? void 0 : _api$dependencies$foc4.hasFocus);
83
83
  if (meta) {
84
84
  if (meta.removePlaceholder) {
85
85
  return emptyPlaceholder;
@@ -93,11 +93,12 @@ export function createPlugin(defaultPlaceholderText, bracketPlaceholderText, api
93
93
  },
94
94
  props: {
95
95
  decorations: function decorations(editorState) {
96
+ var _api$dependencies$com;
96
97
  var _getPlaceholderState = getPlaceholderState(editorState),
97
98
  hasPlaceholder = _getPlaceholderState.hasPlaceholder,
98
99
  placeholderText = _getPlaceholderState.placeholderText,
99
100
  pos = _getPlaceholderState.pos;
100
- var compositionPluginState = api === null || api === void 0 ? void 0 : api.dependencies.composition.sharedState.currentState();
101
+ var compositionPluginState = api === null || api === void 0 ? void 0 : (_api$dependencies$com = api.dependencies.composition) === null || _api$dependencies$com === void 0 ? void 0 : _api$dependencies$com.sharedState.currentState();
101
102
  if (hasPlaceholder && placeholderText && pos !== undefined && !(compositionPluginState !== null && compositionPluginState !== void 0 && compositionPluginState.isComposing)) {
102
103
  return createPlaceholderDecoration(editorState, placeholderText, pos);
103
104
  }
@@ -1,5 +1,3 @@
1
- // AFP-2532 TODO: Fix automatic suppressions below
2
- // eslint-disable-next-line @atlassian/tangerine/import/entry-points
3
1
  import { insertSelectedItem } from '@atlaskit/editor-common/insert';
4
2
  import { pluginKey } from './plugin-key';
5
3
  export var openElementBrowserModal = function openElementBrowserModal() {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.25.1";
2
+ export var version = "187.25.3";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -2,7 +2,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
3
3
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type EditorActions from '../../actions';
5
- import type { QuickInsertProvider } from '../../plugins/quick-insert/types';
5
+ import type { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { EditorNextProps } from '../../types/editor-props';
7
7
  export type ProviderFactoryState = {
8
8
  extensionProvider?: ExtensionProvider;
@@ -1,6 +1,5 @@
1
1
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
2
- import { ProviderFactory, Providers } from '@atlaskit/editor-common/provider-factory';
3
- import { QuickInsertProvider } from '../../plugins/quick-insert/types';
2
+ import type { ProviderFactory, Providers, QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
4
3
  /**
5
4
  *
6
5
  * Utility to set all the providers on a provider factory
@@ -18,7 +18,6 @@ export type { MentionProvider, PresenceProvider, } from '@atlaskit/mention/resou
18
18
  export { TeamMentionResource } from '@atlaskit/mention/team-resource';
19
19
  export { AnnotationUpdateEmitter } from './plugins/annotation';
20
20
  export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationInfo, AnnotationState, AnnotationTypeProvider, InlineCommentState, UpdateEvent, } from './plugins/annotation';
21
- export type { QuickInsertProvider, QuickInsertItem, QuickInsertItemId, QuickInsertActionInsert, } from '@atlaskit/editor-common/provider-factory';
22
21
  export { stateKey as mediaPluginKey } from './plugins/media/pm-plugins/main';
23
22
  export { mentionPluginKey } from './plugins/mentions';
24
23
  export { textColorPluginKey } from './plugins/text-color';
@@ -49,8 +48,16 @@ export { commitStatusPicker, setStatusPickerAt, updateStatus, updateStatusWithAn
49
48
  export { typeAheadPluginKey } from './plugins/type-ahead';
50
49
  export type { TypeAheadPluginState } from './plugins/type-ahead';
51
50
  export { pluginKey as quickInsertPluginKey, memoProcessItems as processQuickInsertItems, } from './plugins/quick-insert';
52
- export type { QuickInsertPluginState } from './plugins/quick-insert';
53
- export type { TypeAheadItem } from './plugins/type-ahead/types';
51
+ export type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
52
+ export type {
53
+ /**
54
+ * @deprecated Use QuickInsertItem from @atlaskit/editor-common/provider-factory instead
55
+ */
56
+ QuickInsertItem,
57
+ /**
58
+ * @deprecated Use QuickInsertProvider from @atlaskit/editor-common/provider-factory instead
59
+ */
60
+ QuickInsertProvider, } from '@atlaskit/editor-common/provider-factory';
54
61
  export { historyPluginKey } from './plugins/history';
55
62
  export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, } from '@atlaskit/editor-common/analytics';
56
63
  export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
@@ -6,8 +6,7 @@ import type { EditorPresetProps } from './types';
6
6
  import type { BlockTypePluginOptions } from '../../../plugins/block-type/types';
7
7
  import type { PlaceholderPluginOptions } from '../../../plugins/placeholder';
8
8
  import type { AnnotationProviders } from '../../../plugins/annotation';
9
- import type { TextFormattingOptions, HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
10
- import type { QuickInsertPluginOptions } from '../../../plugins/quick-insert';
9
+ import type { TextFormattingOptions, HyperlinkPluginOptions, QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
11
10
  import type { CodeBlockOptions } from '../../../plugins/code-block/types';
12
11
  import type { SelectionPluginOptions } from '../../../plugins/selection/types';
13
12
  import type { CardOptions } from '@atlaskit/editor-common/card';
@@ -50,9 +49,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
50
49
  removeDecoration: import("@atlaskit/editor-common/types").Command;
51
50
  };
52
51
  }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
53
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
52
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
54
53
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
55
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
54
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
56
55
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
57
56
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
58
57
  sharedState: {
@@ -97,9 +96,9 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
97
96
  removeDecoration: import("@atlaskit/editor-common/types").Command;
98
97
  };
99
98
  }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
100
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
99
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
101
100
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
102
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
101
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
103
102
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
104
103
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
105
104
  sharedState: {
@@ -435,9 +434,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
435
434
  removeDecoration: import("@atlaskit/editor-common/types").Command;
436
435
  };
437
436
  }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
438
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
437
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
439
438
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
440
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
439
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
441
440
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
442
441
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
443
442
  sharedState: {
@@ -482,9 +481,9 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
482
481
  removeDecoration: import("@atlaskit/editor-common/types").Command;
483
482
  };
484
483
  }>, (config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"composition", {
485
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
484
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
486
485
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"composition", {
487
- sharedState: import("../../../plugins/composition").CompositionState | undefined;
486
+ sharedState: import("@atlaskit/editor-plugin-composition").CompositionState;
488
487
  }>, import("@atlaskit/editor-common/types").OptionalPlugin<(config: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"analytics", {
489
488
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
490
489
  sharedState: {
@@ -2,7 +2,7 @@ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/t
2
2
  import type { CodeBlockOptions } from './types';
3
3
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
4
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
- import type compositionPlugin from '../composition';
5
+ import type { compositionPlugin } from '@atlaskit/editor-plugin-composition';
6
6
  declare const codeBlockPlugin: NextEditorPlugin<'codeBlock', {
7
7
  pluginConfiguration: CodeBlockOptions;
8
8
  dependencies: [
@@ -5,7 +5,7 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { NextEditorPlugin, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import type { focusPlugin } from '@atlaskit/editor-plugin-focus';
7
7
  export declare const pluginKey: PluginKey<any>;
8
- import type compositionPlugin from '../composition';
8
+ import type { compositionPlugin } from '@atlaskit/editor-plugin-composition';
9
9
  export declare const placeholderTestId = "placeholder-test-id";
10
10
  export declare function createPlaceholderDecoration(editorState: EditorState, placeholderText: string, pos?: number): DecorationSet;
11
11
  export declare function createPlugin(defaultPlaceholderText?: string, bracketPlaceholderText?: string, api?: ExtractInjectionAPI<typeof placeholderPlugin>): SafePlugin | undefined;
@@ -1,6 +1,6 @@
1
1
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
- import type { QuickInsertPluginOptions } from './types';
3
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
4
4
  export declare const createQuickInsertTools: (editorView: EditorView) => {
5
5
  getItems: (query: string, options?: QuickInsertPluginOptions) => QuickInsertItem[];
6
6
  };
@@ -1,4 +1,4 @@
1
- import type { QuickInsertItem } from '@atlaskit/editor-common/src/provider-factory/quick-insert-provider';
1
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
2
2
  import type { Command } from '../../types';
3
3
  export declare const openElementBrowserModal: () => Command;
4
4
  export declare const closeElementBrowserModal: () => Command;
@@ -1,9 +1,10 @@
1
- import { IntlShape } from 'react-intl-next';
2
- import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
- import { NextEditorPlugin } from '../../types';
1
+ import type { IntlShape } from 'react-intl-next';
2
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
+ import type { NextEditorPlugin } from '../../types';
4
4
  import { pluginKey } from './plugin-key';
5
- import { QuickInsertHandler, QuickInsertPluginOptions, QuickInsertPluginState } from './types';
6
- export type { QuickInsertHandler, QuickInsertPluginState, QuickInsertPluginOptions, };
5
+ import type { QuickInsertHandler } from './types';
6
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
7
+ export type { QuickInsertHandler, QuickInsertPluginOptions };
7
8
  export { pluginKey };
8
9
  declare const quickInsertPlugin: NextEditorPlugin<'quickInsert', {
9
10
  pluginConfiguration: QuickInsertPluginOptions | undefined;
@@ -1,3 +1,3 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { QuickInsertPluginState } from './types';
2
+ import type { QuickInsertPluginState } from '@atlaskit/editor-common/types';
3
3
  export declare const pluginKey: PluginKey<QuickInsertPluginState>;
@@ -1,5 +1,5 @@
1
- import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
2
- import { QuickInsertPluginState, QuickInsertPluginOptions } from './types';
1
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
2
+ import type { QuickInsertPluginState, QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
3
3
  export declare function find(query: string, items: QuickInsertItem[]): QuickInsertItem[];
4
4
  export declare const searchQuickInsertItems: (quickInsertState?: QuickInsertPluginState, options?: QuickInsertPluginOptions) => (query?: string, category?: string) => QuickInsertItem[];
5
5
  export declare const getFeaturedQuickInsertItems: ({ providedItems, lazyDefaultItems }: QuickInsertPluginState, options?: QuickInsertPluginOptions) => () => QuickInsertItem[];
@@ -1,24 +1,4 @@
1
- import { IntlShape } from 'react-intl-next';
2
- import { QuickInsertItem, QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
1
+ import type { IntlShape } from 'react-intl-next';
2
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
3
3
  export type { IconProps } from '@atlaskit/editor-common/types';
4
- import { EmptyStateHandler } from '../../types/empty-state-handler';
5
- export type { QuickInsertActionInsert, QuickInsertItem, QuickInsertProvider, } from '@atlaskit/editor-common/provider-factory';
6
- export type QuickInsertOptions = boolean | {
7
- provider: Promise<QuickInsertProvider>;
8
- };
9
4
  export type QuickInsertHandler = Array<QuickInsertItem> | ((intl: IntlShape) => Array<QuickInsertItem>);
10
- export type QuickInsertPluginState = {
11
- isElementBrowserModalOpen: boolean;
12
- lazyDefaultItems: () => QuickInsertItem[];
13
- providedItems?: QuickInsertItem[];
14
- provider?: QuickInsertProvider;
15
- emptyStateHandler?: EmptyStateHandler;
16
- };
17
- export type QuickInsertPluginStateKeys = keyof QuickInsertPluginState;
18
- export interface QuickInsertPluginOptions {
19
- headless?: boolean;
20
- disableDefaultItems?: boolean;
21
- enableElementBrowser?: boolean;
22
- elementBrowserHelpUrl?: string;
23
- emptyStateHandler?: EmptyStateHandler;
24
- }
@@ -6,7 +6,7 @@ import type { CardOptions } from '@atlaskit/editor-common/card';
6
6
  import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
7
7
  import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
8
8
  import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
9
- import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions, TextFormattingOptions } from '@atlaskit/editor-common/types';
9
+ import type { AllEditorPresetPluginTypes, Transformer, LinkingOptions, TextFormattingOptions, QuickInsertOptions } from '@atlaskit/editor-common/types';
10
10
  import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
11
11
  import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugin-table/types';
12
12
  import type { MentionProvider } from '@atlaskit/mention/resource';
@@ -23,7 +23,6 @@ import type { MediaOptions, MediaState } from '../plugins/media/types';
23
23
  import type { MentionPluginConfig } from '../plugins/mentions/types';
24
24
  import type { PanelPluginConfig } from '../plugins/panel/types';
25
25
  import type { PlaceholderTextOptions } from '../plugins/placeholder-text/types';
26
- import type { QuickInsertOptions } from '../plugins/quick-insert/types';
27
26
  import type { TextColorPluginConfig } from '../plugins/text-color/pm-plugins/main';
28
27
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
29
28
  import type { EditorAppearance } from './editor-appearance';
@@ -1,8 +1,8 @@
1
1
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
2
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
- import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
4
- import EditorActions from '../actions';
5
- import { QuickInsertOptions } from '../plugins/quick-insert/types';
2
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
+ import type { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
4
+ import type EditorActions from '../actions';
5
+ import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
6
6
  /**
7
7
  *
8
8
  * Used to combine the quickInsert provider and extension provider (if available)
@@ -2,7 +2,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
3
3
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type EditorActions from '../../actions';
5
- import type { QuickInsertProvider } from '../../plugins/quick-insert/types';
5
+ import type { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { EditorNextProps } from '../../types/editor-props';
7
7
  export type ProviderFactoryState = {
8
8
  extensionProvider?: ExtensionProvider;
@@ -1,6 +1,5 @@
1
1
  import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
2
- import { ProviderFactory, Providers } from '@atlaskit/editor-common/provider-factory';
3
- import { QuickInsertProvider } from '../../plugins/quick-insert/types';
2
+ import type { ProviderFactory, Providers, QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
4
3
  /**
5
4
  *
6
5
  * Utility to set all the providers on a provider factory
@@ -18,7 +18,6 @@ export type { MentionProvider, PresenceProvider, } from '@atlaskit/mention/resou
18
18
  export { TeamMentionResource } from '@atlaskit/mention/team-resource';
19
19
  export { AnnotationUpdateEmitter } from './plugins/annotation';
20
20
  export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationInfo, AnnotationState, AnnotationTypeProvider, InlineCommentState, UpdateEvent, } from './plugins/annotation';
21
- export type { QuickInsertProvider, QuickInsertItem, QuickInsertItemId, QuickInsertActionInsert, } from '@atlaskit/editor-common/provider-factory';
22
21
  export { stateKey as mediaPluginKey } from './plugins/media/pm-plugins/main';
23
22
  export { mentionPluginKey } from './plugins/mentions';
24
23
  export { textColorPluginKey } from './plugins/text-color';
@@ -49,8 +48,16 @@ export { commitStatusPicker, setStatusPickerAt, updateStatus, updateStatusWithAn
49
48
  export { typeAheadPluginKey } from './plugins/type-ahead';
50
49
  export type { TypeAheadPluginState } from './plugins/type-ahead';
51
50
  export { pluginKey as quickInsertPluginKey, memoProcessItems as processQuickInsertItems, } from './plugins/quick-insert';
52
- export type { QuickInsertPluginState } from './plugins/quick-insert';
53
- export type { TypeAheadItem } from './plugins/type-ahead/types';
51
+ export type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
52
+ export type {
53
+ /**
54
+ * @deprecated Use QuickInsertItem from @atlaskit/editor-common/provider-factory instead
55
+ */
56
+ QuickInsertItem,
57
+ /**
58
+ * @deprecated Use QuickInsertProvider from @atlaskit/editor-common/provider-factory instead
59
+ */
60
+ QuickInsertProvider, } from '@atlaskit/editor-common/provider-factory';
54
61
  export { historyPluginKey } from './plugins/history';
55
62
  export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, } from '@atlaskit/editor-common/analytics';
56
63
  export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';