@atlaskit/editor-core 187.27.1 → 187.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.28.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9ebabeaa630`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9ebabeaa630) - added ExtractPublicEditorAPI type helper
8
+
9
+ ### Patch Changes
10
+
11
+ - [`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete version.json
12
+ - Updated dependencies
13
+
3
14
  ## 187.27.1
4
15
 
5
16
  ### Patch Changes
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -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.27.1";
9
+ var version = "187.28.0";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.27.1";
2
+ export const version = "187.28.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.27.1";
2
+ export var version = "187.28.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,12 +1,5 @@
1
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
3
- import type { EmojiPlugin } from '../emoji';
4
- import type datePlugin from '../date';
5
- import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
- import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
- import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
- import type mentionsPlugin from '../mentions';
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ import type { InsertBlockPluginDependencies } from './types';
10
3
  export interface InsertBlockOptions {
11
4
  allowTables?: boolean;
12
5
  allowExpand?: boolean;
@@ -18,15 +11,6 @@ export interface InsertBlockOptions {
18
11
  }
19
12
  declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
20
13
  pluginConfiguration: InsertBlockOptions | undefined;
21
- dependencies: [
22
- typeof featureFlagsPlugin,
23
- OptionalPlugin<typeof tablesPlugin>,
24
- OptionalPlugin<typeof hyperlinkPlugin>,
25
- OptionalPlugin<typeof datePlugin>,
26
- OptionalPlugin<typeof analyticsPlugin>,
27
- OptionalPlugin<ImageUploadPlugin>,
28
- OptionalPlugin<typeof mentionsPlugin>,
29
- OptionalPlugin<EmojiPlugin>
30
- ];
14
+ dependencies: InsertBlockPluginDependencies;
31
15
  }>;
32
16
  export default insertBlockPlugin;
@@ -0,0 +1,19 @@
1
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
3
+ import type { EmojiPlugin } from '../emoji';
4
+ import type datePlugin from '../date';
5
+ import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
+ import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
+ import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
+ import type mentionsPlugin from '../mentions';
10
+ export type InsertBlockPluginDependencies = [
11
+ typeof featureFlagsPlugin,
12
+ OptionalPlugin<typeof tablesPlugin>,
13
+ OptionalPlugin<typeof hyperlinkPlugin>,
14
+ OptionalPlugin<typeof datePlugin>,
15
+ OptionalPlugin<typeof analyticsPlugin>,
16
+ OptionalPlugin<ImageUploadPlugin>,
17
+ OptionalPlugin<typeof mentionsPlugin>,
18
+ OptionalPlugin<EmojiPlugin>
19
+ ];
@@ -1,13 +1,13 @@
1
1
  import type { INPUT_METHOD, DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { EditorActionsOptions as EditorActions, FeatureFlags, ExtractInjectionAPI, ImageUploadPluginReferenceEvent, Command } from '@atlaskit/editor-common/types';
3
+ import type { EditorActionsOptions as EditorActions, FeatureFlags, ImageUploadPluginReferenceEvent, Command, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
4
4
  import type { EmojiProvider } from '@atlaskit/emoji';
5
5
  import type { BlockType } from '../../../block-type/types';
6
6
  import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
7
7
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
8
8
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
9
  import type { BlockMenuItem } from './create-items';
10
- import type insertBlockPlugin from '../../index';
10
+ import type { InsertBlockPluginDependencies } from '../../types';
11
11
  export interface Props {
12
12
  buttons: number;
13
13
  isReducedSpacing: boolean;
@@ -48,7 +48,7 @@ export interface Props {
48
48
  onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
49
49
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
50
50
  featureFlags: FeatureFlags;
51
- pluginInjectionApi?: ExtractInjectionAPI<typeof insertBlockPlugin>;
51
+ pluginInjectionApi?: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies>;
52
52
  mentionsDisabled?: boolean;
53
53
  }
54
54
  export interface State {
@@ -1,14 +1,8 @@
1
1
  import type { DependencyList } from 'react';
2
2
  import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
3
- import type { AllEditorPresetPluginTypes, PublicPluginAPI, NextEditorPlugin } from '@atlaskit/editor-common/types';
4
- type ExtractNextEditorPlugins<Plugins extends AllEditorPresetPluginTypes[]> = {
5
- [PluginNumber in keyof Plugins]: Plugins[PluginNumber] extends NextEditorPlugin<infer Name, infer Metadata> ? NextEditorPlugin<Name, Metadata> : Plugins[PluginNumber] extends [
6
- NextEditorPlugin<infer Name, infer Metadata>,
7
- any
8
- ] ? NextEditorPlugin<Name, Metadata> : never;
9
- };
3
+ import type { AllEditorPresetPluginTypes, ExtractPublicEditorAPI } from '@atlaskit/editor-common/types';
10
4
  interface PresetAPI<PluginNames extends string[] = [], StackPlugins extends AllEditorPresetPluginTypes[] = []> {
11
- editorApi: PublicPluginAPI<ExtractNextEditorPlugins<StackPlugins>> | undefined;
5
+ editorApi: ExtractPublicEditorAPI<EditorPresetBuilder<PluginNames, StackPlugins>> | undefined;
12
6
  preset: EditorPresetBuilder<PluginNames, StackPlugins>;
13
7
  }
14
8
  /**
@@ -1,12 +1,5 @@
1
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
3
- import type { EmojiPlugin } from '../emoji';
4
- import type datePlugin from '../date';
5
- import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
- import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
- import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
- import type mentionsPlugin from '../mentions';
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ import type { InsertBlockPluginDependencies } from './types';
10
3
  export interface InsertBlockOptions {
11
4
  allowTables?: boolean;
12
5
  allowExpand?: boolean;
@@ -18,15 +11,6 @@ export interface InsertBlockOptions {
18
11
  }
19
12
  declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
20
13
  pluginConfiguration: InsertBlockOptions | undefined;
21
- dependencies: [
22
- typeof featureFlagsPlugin,
23
- OptionalPlugin<typeof tablesPlugin>,
24
- OptionalPlugin<typeof hyperlinkPlugin>,
25
- OptionalPlugin<typeof datePlugin>,
26
- OptionalPlugin<typeof analyticsPlugin>,
27
- OptionalPlugin<ImageUploadPlugin>,
28
- OptionalPlugin<typeof mentionsPlugin>,
29
- OptionalPlugin<EmojiPlugin>
30
- ];
14
+ dependencies: InsertBlockPluginDependencies;
31
15
  }>;
32
16
  export default insertBlockPlugin;
@@ -0,0 +1,19 @@
1
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
2
+ import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
3
+ import type { EmojiPlugin } from '../emoji';
4
+ import type datePlugin from '../date';
5
+ import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
6
+ import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
7
+ import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
+ import type mentionsPlugin from '../mentions';
10
+ export type InsertBlockPluginDependencies = [
11
+ typeof featureFlagsPlugin,
12
+ OptionalPlugin<typeof tablesPlugin>,
13
+ OptionalPlugin<typeof hyperlinkPlugin>,
14
+ OptionalPlugin<typeof datePlugin>,
15
+ OptionalPlugin<typeof analyticsPlugin>,
16
+ OptionalPlugin<ImageUploadPlugin>,
17
+ OptionalPlugin<typeof mentionsPlugin>,
18
+ OptionalPlugin<EmojiPlugin>
19
+ ];
@@ -1,13 +1,13 @@
1
1
  import type { INPUT_METHOD, DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- import type { EditorActionsOptions as EditorActions, FeatureFlags, ExtractInjectionAPI, ImageUploadPluginReferenceEvent, Command } from '@atlaskit/editor-common/types';
3
+ import type { EditorActionsOptions as EditorActions, FeatureFlags, ImageUploadPluginReferenceEvent, Command, PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
4
4
  import type { EmojiProvider } from '@atlaskit/emoji';
5
5
  import type { BlockType } from '../../../block-type/types';
6
6
  import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
7
7
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
8
8
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
9
  import type { BlockMenuItem } from './create-items';
10
- import type insertBlockPlugin from '../../index';
10
+ import type { InsertBlockPluginDependencies } from '../../types';
11
11
  export interface Props {
12
12
  buttons: number;
13
13
  isReducedSpacing: boolean;
@@ -48,7 +48,7 @@ export interface Props {
48
48
  onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
49
49
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
50
50
  featureFlags: FeatureFlags;
51
- pluginInjectionApi?: ExtractInjectionAPI<typeof insertBlockPlugin>;
51
+ pluginInjectionApi?: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies>;
52
52
  mentionsDisabled?: boolean;
53
53
  }
54
54
  export interface State {
@@ -1,16 +1,10 @@
1
1
  import type { DependencyList } from 'react';
2
2
  import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
3
- import type { AllEditorPresetPluginTypes, PublicPluginAPI, NextEditorPlugin } from '@atlaskit/editor-common/types';
4
- type ExtractNextEditorPlugins<Plugins extends AllEditorPresetPluginTypes[]> = {
5
- [PluginNumber in keyof Plugins]: Plugins[PluginNumber] extends NextEditorPlugin<infer Name, infer Metadata> ? NextEditorPlugin<Name, Metadata> : Plugins[PluginNumber] extends [
6
- NextEditorPlugin<infer Name, infer Metadata>,
7
- any
8
- ] ? NextEditorPlugin<Name, Metadata> : never;
9
- };
3
+ import type { AllEditorPresetPluginTypes, ExtractPublicEditorAPI } from '@atlaskit/editor-common/types';
10
4
  interface PresetAPI<PluginNames extends string[] = [
11
5
  ], StackPlugins extends AllEditorPresetPluginTypes[] = [
12
6
  ]> {
13
- editorApi: PublicPluginAPI<ExtractNextEditorPlugins<StackPlugins>> | undefined;
7
+ editorApi: ExtractPublicEditorAPI<EditorPresetBuilder<PluginNames, StackPlugins>> | undefined;
14
8
  preset: EditorPresetBuilder<PluginNames, StackPlugins>;
15
9
  }
16
10
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.27.1",
3
+ "version": "187.28.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/code": "^14.6.0",
56
56
  "@atlaskit/date": "^0.10.0",
57
57
  "@atlaskit/datetime-picker": "^12.7.0",
58
- "@atlaskit/editor-common": "^74.48.0",
58
+ "@atlaskit/editor-common": "^74.49.0",
59
59
  "@atlaskit/editor-json-transformer": "^8.10.0",
60
60
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
61
61
  "@atlaskit/editor-palette": "1.5.1",
@@ -112,7 +112,7 @@
112
112
  "@atlaskit/textfield": "^5.6.0",
113
113
  "@atlaskit/theme": "^12.5.0",
114
114
  "@atlaskit/toggle": "^12.6.0",
115
- "@atlaskit/tokens": "^1.14.0",
115
+ "@atlaskit/tokens": "^1.15.0",
116
116
  "@atlaskit/tooltip": "^17.8.0",
117
117
  "@atlaskit/width-detector": "^4.1.0",
118
118
  "@babel/runtime": "^7.0.0",