@atlaskit/editor-core 187.25.2 → 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 (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/plugins/quick-insert/commands.js +0 -3
  3. package/dist/cjs/version-wrapper.js +1 -1
  4. package/dist/es2019/plugins/quick-insert/commands.js +0 -2
  5. package/dist/es2019/version-wrapper.js +1 -1
  6. package/dist/esm/plugins/quick-insert/commands.js +0 -2
  7. package/dist/esm/version-wrapper.js +1 -1
  8. package/dist/types/editor-next/hooks/useProviderFactory.d.ts +1 -1
  9. package/dist/types/editor-next/utils/handleProviders.d.ts +1 -2
  10. package/dist/types/index.d.ts +10 -3
  11. package/dist/types/labs/next/presets/default.d.ts +1 -2
  12. package/dist/types/plugins/quick-insert/api.d.ts +1 -1
  13. package/dist/types/plugins/quick-insert/commands.d.ts +1 -1
  14. package/dist/types/plugins/quick-insert/index.d.ts +6 -5
  15. package/dist/types/plugins/quick-insert/plugin-key.d.ts +1 -1
  16. package/dist/types/plugins/quick-insert/search.d.ts +2 -2
  17. package/dist/types/plugins/quick-insert/types.d.ts +2 -22
  18. package/dist/types/types/editor-props.d.ts +1 -2
  19. package/dist/types/utils/prepare-quick-insert-provider.d.ts +4 -4
  20. package/dist/types-ts4.5/editor-next/hooks/useProviderFactory.d.ts +1 -1
  21. package/dist/types-ts4.5/editor-next/utils/handleProviders.d.ts +1 -2
  22. package/dist/types-ts4.5/index.d.ts +10 -3
  23. package/dist/types-ts4.5/labs/next/presets/default.d.ts +1 -2
  24. package/dist/types-ts4.5/plugins/quick-insert/api.d.ts +1 -1
  25. package/dist/types-ts4.5/plugins/quick-insert/commands.d.ts +1 -1
  26. package/dist/types-ts4.5/plugins/quick-insert/index.d.ts +6 -5
  27. package/dist/types-ts4.5/plugins/quick-insert/plugin-key.d.ts +1 -1
  28. package/dist/types-ts4.5/plugins/quick-insert/search.d.ts +2 -2
  29. package/dist/types-ts4.5/plugins/quick-insert/types.d.ts +2 -22
  30. package/dist/types-ts4.5/types/editor-props.d.ts +1 -2
  31. package/dist/types-ts4.5/utils/prepare-quick-insert-provider.d.ts +4 -4
  32. package/package.json +1 -1
  33. package/report.api.md +15 -48
  34. package/tmp/api-report-tmp.d.ts +15 -46
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 187.25.2
4
10
 
5
11
  ### Patch Changes
@@ -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.2";
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('.');
@@ -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.2";
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
  };
@@ -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.2";
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';
@@ -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';
@@ -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';
@@ -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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.25.2",
3
+ "version": "187.25.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
package/report.api.md CHANGED
@@ -89,7 +89,7 @@ import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
89
89
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
90
90
  import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
91
91
  import { InputTracking } from '@atlaskit/editor-common/types';
92
- import { IntlShape } from 'react-intl-next';
92
+ import type { IntlShape } from 'react-intl-next';
93
93
  import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
94
94
  import { jsx } from '@emotion/react';
95
95
  import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
@@ -132,9 +132,10 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
132
132
  import type { Providers } from '@atlaskit/editor-common/provider-factory';
133
133
  import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
134
134
  import { PureComponent } from 'react';
135
- import { QuickInsertActionInsert } from '@atlaskit/editor-common/provider-factory';
136
135
  import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
137
- import { QuickInsertItemId } from '@atlaskit/editor-common/provider-factory';
136
+ import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
137
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
138
+ import type { QuickInsertPluginState } from '@atlaskit/editor-common/types';
138
139
  import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
139
140
  import { default as React_2 } from 'react';
140
141
  import type { ReactElement } from 'react';
@@ -157,8 +158,8 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
157
158
  import { TransactionTracking } from '@atlaskit/editor-common/types';
158
159
  import type { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
159
160
  import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
160
- import type { TypeAheadItem } from '@atlaskit/editor-common/types';
161
- import type { TypeAheadItem as TypeAheadItem_2 } from '@atlaskit/editor-common/provider-factory';
161
+ import { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
162
+ import type { TypeAheadItem as TypeAheadItem_2 } from '@atlaskit/editor-common/types';
162
163
  import type { TypeAheadStats } from '@atlaskit/editor-common/types';
163
164
  import { UIComponentFactory } from '@atlaskit/editor-common/types';
164
165
  import { UploadEndEventPayload } from '@atlaskit/media-picker/types';
@@ -412,8 +413,8 @@ export const createTypeAheadTools: (editorView: EditorView) => {
412
413
  close: (options?: CloseOptions) => boolean;
413
414
  openMention: (inputMethod: TypeAheadInputMethod) => boolean;
414
415
  searchMention: (query?: string) => {
415
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
416
- result: () => Promise<TypeAheadItem_2[] | undefined>;
416
+ type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
417
+ result: () => Promise<TypeAheadItem[] | undefined>;
417
418
  close: (options?: CloseOptions) => boolean;
418
419
  insert: ({
419
420
  index,
@@ -425,8 +426,8 @@ export const createTypeAheadTools: (editorView: EditorView) => {
425
426
  };
426
427
  openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
427
428
  searchQuickInsert: (query?: string) => {
428
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
429
- result: () => Promise<TypeAheadItem_2[] | undefined>;
429
+ type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
430
+ result: () => Promise<TypeAheadItem[] | undefined>;
430
431
  close: (options?: CloseOptions) => boolean;
431
432
  insert: ({
432
433
  index,
@@ -438,8 +439,8 @@ export const createTypeAheadTools: (editorView: EditorView) => {
438
439
  };
439
440
  openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
440
441
  searchEmoji: (query?: string) => {
441
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
442
- result: () => Promise<TypeAheadItem_2[] | undefined>;
442
+ type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
443
+ result: () => Promise<TypeAheadItem[] | undefined>;
443
444
  close: (options?: CloseOptions) => boolean;
444
445
  insert: ({
445
446
  index,
@@ -1160,9 +1161,9 @@ export const insertHorizontalRule: (
1160
1161
 
1161
1162
  // @public (undocumented)
1162
1163
  type InsertItemProps = {
1163
- contentItem: TypeAheadItem_2;
1164
+ contentItem: TypeAheadItem;
1164
1165
  query: string;
1165
- sourceListItem: TypeAheadItem_2[];
1166
+ sourceListItem: TypeAheadItem[];
1166
1167
  };
1167
1168
 
1168
1169
  // @public (undocumented)
@@ -1762,8 +1763,6 @@ type Props_5 = {
1762
1763
  // @public (undocumented)
1763
1764
  type ProsemirrorGetPosHandler = () => number | undefined;
1764
1765
 
1765
- export { QuickInsertActionInsert };
1766
-
1767
1766
  // @public (undocumented)
1768
1767
  type QuickInsertHandler =
1769
1768
  | ((intl: IntlShape) => Array<QuickInsertItem>)
@@ -1771,41 +1770,9 @@ type QuickInsertHandler =
1771
1770
 
1772
1771
  export { QuickInsertItem };
1773
1772
 
1774
- export { QuickInsertItemId };
1775
-
1776
- // @public (undocumented)
1777
- type QuickInsertOptions =
1778
- | boolean
1779
- | {
1780
- provider: Promise<QuickInsertProvider>;
1781
- };
1782
-
1783
1773
  // @public (undocumented)
1784
1774
  export const quickInsertPluginKey: PluginKey<QuickInsertPluginState>;
1785
1775
 
1786
- // @public (undocumented)
1787
- interface QuickInsertPluginOptions {
1788
- // (undocumented)
1789
- disableDefaultItems?: boolean;
1790
- // (undocumented)
1791
- elementBrowserHelpUrl?: string;
1792
- // (undocumented)
1793
- emptyStateHandler?: EmptyStateHandler;
1794
- // (undocumented)
1795
- enableElementBrowser?: boolean;
1796
- // (undocumented)
1797
- headless?: boolean;
1798
- }
1799
-
1800
- // @public (undocumented)
1801
- export type QuickInsertPluginState = {
1802
- isElementBrowserModalOpen: boolean;
1803
- lazyDefaultItems: () => QuickInsertItem[];
1804
- providedItems?: QuickInsertItem[];
1805
- provider?: QuickInsertProvider;
1806
- emptyStateHandler?: EmptyStateHandler;
1807
- };
1808
-
1809
1776
  export { QuickInsertProvider };
1810
1777
 
1811
1778
  // @public (undocumented)
@@ -2174,7 +2141,7 @@ export type TypeAheadPluginState = {
2174
2141
  decorationElement: HTMLElement | null;
2175
2142
  typeAheadHandlers: Array<TypeAheadHandler>;
2176
2143
  query: string;
2177
- items: Array<TypeAheadItem>;
2144
+ items: Array<TypeAheadItem_2>;
2178
2145
  triggerHandler?: TypeAheadHandler;
2179
2146
  selectedIndex: number;
2180
2147
  stats: TypeAheadStatsSerializable | null;
@@ -78,7 +78,7 @@ import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
78
78
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
79
79
  import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
80
80
  import { InputTracking } from '@atlaskit/editor-common/types';
81
- import { IntlShape } from 'react-intl-next';
81
+ import type { IntlShape } from 'react-intl-next';
82
82
  import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
83
83
  import { jsx } from '@emotion/react';
84
84
  import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
@@ -121,9 +121,10 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
121
121
  import type { Providers } from '@atlaskit/editor-common/provider-factory';
122
122
  import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
123
123
  import { PureComponent } from 'react';
124
- import { QuickInsertActionInsert } from '@atlaskit/editor-common/provider-factory';
125
124
  import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
126
- import { QuickInsertItemId } from '@atlaskit/editor-common/provider-factory';
125
+ import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
126
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
127
+ import type { QuickInsertPluginState } from '@atlaskit/editor-common/types';
127
128
  import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
128
129
  import { default as React_2 } from 'react';
129
130
  import type { ReactElement } from 'react';
@@ -146,8 +147,8 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
146
147
  import { TransactionTracking } from '@atlaskit/editor-common/types';
147
148
  import type { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
148
149
  import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
149
- import type { TypeAheadItem } from '@atlaskit/editor-common/types';
150
- import type { TypeAheadItem as TypeAheadItem_2 } from '@atlaskit/editor-common/provider-factory';
150
+ import { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
151
+ import type { TypeAheadItem as TypeAheadItem_2 } from '@atlaskit/editor-common/types';
151
152
  import type { TypeAheadStats } from '@atlaskit/editor-common/types';
152
153
  import { UIComponentFactory } from '@atlaskit/editor-common/types';
153
154
  import { UploadEndEventPayload } from '@atlaskit/media-picker/types';
@@ -388,8 +389,8 @@ export const createTypeAheadTools: (editorView: EditorView) => {
388
389
  close: (options?: CloseOptions) => boolean;
389
390
  openMention: (inputMethod: TypeAheadInputMethod) => boolean;
390
391
  searchMention: (query?: string) => {
391
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
392
- result: () => Promise<TypeAheadItem_2[] | undefined>;
392
+ type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
393
+ result: () => Promise<TypeAheadItem[] | undefined>;
393
394
  close: (options?: CloseOptions) => boolean;
394
395
  insert: ({ index, mode }: {
395
396
  index: number;
@@ -398,8 +399,8 @@ export const createTypeAheadTools: (editorView: EditorView) => {
398
399
  };
399
400
  openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
400
401
  searchQuickInsert: (query?: string) => {
401
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
402
- result: () => Promise<TypeAheadItem_2[] | undefined>;
402
+ type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
403
+ result: () => Promise<TypeAheadItem[] | undefined>;
403
404
  close: (options?: CloseOptions) => boolean;
404
405
  insert: ({ index, mode }: {
405
406
  index: number;
@@ -408,8 +409,8 @@ export const createTypeAheadTools: (editorView: EditorView) => {
408
409
  };
409
410
  openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
410
411
  searchEmoji: (query?: string) => {
411
- type: (appendValue: string) => Promise<TypeAheadItem_2[]> | undefined;
412
- result: () => Promise<TypeAheadItem_2[] | undefined>;
412
+ type: (appendValue: string) => Promise<TypeAheadItem[]> | undefined;
413
+ result: () => Promise<TypeAheadItem[] | undefined>;
413
414
  close: (options?: CloseOptions) => boolean;
414
415
  insert: ({ index, mode }: {
415
416
  index: number;
@@ -1044,9 +1045,9 @@ export const insertHorizontalRule: (inputMethod: INPUT_METHOD.FORMATTING | INPUT
1044
1045
 
1045
1046
  // @public (undocumented)
1046
1047
  type InsertItemProps = {
1047
- contentItem: TypeAheadItem_2;
1048
+ contentItem: TypeAheadItem;
1048
1049
  query: string;
1049
- sourceListItem: TypeAheadItem_2[];
1050
+ sourceListItem: TypeAheadItem[];
1050
1051
  };
1051
1052
 
1052
1053
  // @public (undocumented)
@@ -1574,46 +1575,14 @@ type Props_5 = {
1574
1575
  // @public (undocumented)
1575
1576
  type ProsemirrorGetPosHandler = () => number | undefined;
1576
1577
 
1577
- export { QuickInsertActionInsert }
1578
-
1579
1578
  // @public (undocumented)
1580
1579
  type QuickInsertHandler = ((intl: IntlShape) => Array<QuickInsertItem>) | Array<QuickInsertItem>;
1581
1580
 
1582
1581
  export { QuickInsertItem }
1583
1582
 
1584
- export { QuickInsertItemId }
1585
-
1586
- // @public (undocumented)
1587
- type QuickInsertOptions = boolean | {
1588
- provider: Promise<QuickInsertProvider>;
1589
- };
1590
-
1591
1583
  // @public (undocumented)
1592
1584
  export const quickInsertPluginKey: PluginKey<QuickInsertPluginState>;
1593
1585
 
1594
- // @public (undocumented)
1595
- interface QuickInsertPluginOptions {
1596
- // (undocumented)
1597
- disableDefaultItems?: boolean;
1598
- // (undocumented)
1599
- elementBrowserHelpUrl?: string;
1600
- // (undocumented)
1601
- emptyStateHandler?: EmptyStateHandler;
1602
- // (undocumented)
1603
- enableElementBrowser?: boolean;
1604
- // (undocumented)
1605
- headless?: boolean;
1606
- }
1607
-
1608
- // @public (undocumented)
1609
- export type QuickInsertPluginState = {
1610
- isElementBrowserModalOpen: boolean;
1611
- lazyDefaultItems: () => QuickInsertItem[];
1612
- providedItems?: QuickInsertItem[];
1613
- provider?: QuickInsertProvider;
1614
- emptyStateHandler?: EmptyStateHandler;
1615
- };
1616
-
1617
1586
  export { QuickInsertProvider }
1618
1587
 
1619
1588
  // @public (undocumented)
@@ -1934,7 +1903,7 @@ export type TypeAheadPluginState = {
1934
1903
  decorationElement: HTMLElement | null;
1935
1904
  typeAheadHandlers: Array<TypeAheadHandler>;
1936
1905
  query: string;
1937
- items: Array<TypeAheadItem>;
1906
+ items: Array<TypeAheadItem_2>;
1938
1907
  triggerHandler?: TypeAheadHandler;
1939
1908
  selectedIndex: number;
1940
1909
  stats: TypeAheadStatsSerializable | null;