@atlaskit/editor-core 187.41.0 → 187.41.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 (30) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/plugins/media/index.js +59 -54
  3. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +44 -29
  4. package/dist/cjs/plugins/media/ui/ToolbarMedia/index.js +20 -33
  5. package/dist/cjs/plugins/selection/pm-plugins/events/create-selection-between.js +1 -1
  6. package/dist/cjs/plugins/selection/pm-plugins/events/keydown.js +13 -1
  7. package/dist/cjs/version-wrapper.js +1 -1
  8. package/dist/es2019/plugins/media/index.js +28 -20
  9. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +45 -27
  10. package/dist/es2019/plugins/media/ui/ToolbarMedia/index.js +24 -32
  11. package/dist/es2019/plugins/selection/pm-plugins/events/create-selection-between.js +1 -1
  12. package/dist/es2019/plugins/selection/pm-plugins/events/keydown.js +13 -1
  13. package/dist/es2019/version-wrapper.js +1 -1
  14. package/dist/esm/plugins/media/index.js +57 -52
  15. package/dist/esm/plugins/media/nodeviews/mediaInline.js +44 -29
  16. package/dist/esm/plugins/media/ui/ToolbarMedia/index.js +20 -30
  17. package/dist/esm/plugins/selection/pm-plugins/events/create-selection-between.js +1 -1
  18. package/dist/esm/plugins/selection/pm-plugins/events/keydown.js +13 -1
  19. package/dist/esm/version-wrapper.js +1 -1
  20. package/dist/types/plugins/media/index.d.ts +1 -1
  21. package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +5 -4
  22. package/dist/types/plugins/media/types.d.ts +10 -1
  23. package/dist/types/plugins/media/ui/ToolbarMedia/index.d.ts +6 -10
  24. package/dist/types-ts4.5/plugins/media/index.d.ts +1 -1
  25. package/dist/types-ts4.5/plugins/media/nodeviews/mediaInline.d.ts +5 -4
  26. package/dist/types-ts4.5/plugins/media/types.d.ts +10 -1
  27. package/dist/types-ts4.5/plugins/media/ui/ToolbarMedia/index.d.ts +6 -10
  28. package/package.json +1 -1
  29. package/report.api.md +7 -1
  30. package/tmp/api-report-tmp.d.ts +7 -1
@@ -1,8 +1,8 @@
1
1
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
3
3
  import React from 'react';
4
- import type { EventDispatcher } from '../../../event-dispatcher';
5
- import type { getPosHandler, ProsemirrorGetPosHandler } from '../../../nodeviews/';
4
+ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
5
+ import type { getPosHandler as ProsemirrorGetPosHandler, getPosHandler } from '../types';
6
6
  import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
7
7
  import type { FileIdentifier } from '@atlaskit/media-client';
8
8
  import type { MediaProvider, ProviderFactory, ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
@@ -11,7 +11,7 @@ import type { MediaPluginState } from '../pm-plugins/types';
11
11
  import { MediaNodeUpdater } from './mediaNodeUpdater';
12
12
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
13
13
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
14
- import type mediaPlugin from '../index';
14
+ import type { MediaNextEditorPluginType } from '../next-plugin-type';
15
15
  export interface MediaInlineProps {
16
16
  mediaProvider: Promise<MediaProvider>;
17
17
  identifier: FileIdentifier;
@@ -35,6 +35,7 @@ export declare const handleNewNode: (props: MediaInlineProps) => void;
35
35
  export declare const MediaInline: React.FC<MediaInlineProps>;
36
36
  export interface MediaInlineNodeViewProps {
37
37
  providerFactory: ProviderFactory;
38
+ api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
38
39
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
39
40
  }
40
41
  export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInlineNodeViewProps> {
@@ -46,4 +47,4 @@ export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInl
46
47
  viewShouldUpdate(nextNode: PMNode): boolean;
47
48
  render(props: MediaInlineNodeViewProps): JSX.Element;
48
49
  }
49
- export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
50
+ export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -8,7 +8,9 @@ import type { MediaFeatureFlags } from '@atlaskit/media-common';
8
8
  import type { UploadParams, MediaFile } from '@atlaskit/media-picker/types';
9
9
  import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
10
10
  import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
11
- import type { PlaceholderTextOptions } from '../../plugins/placeholder-text/types';
11
+ interface PlaceholderTextOptions {
12
+ allowInserting?: boolean;
13
+ }
12
14
  export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
13
15
  export type MediaSingleWithType = 'pixel' | 'percentage';
14
16
  export interface MediaOptions {
@@ -106,3 +108,10 @@ export type MediaDecorationSpec = {
106
108
  type: 'media';
107
109
  selected: boolean;
108
110
  };
111
+ export type getPosHandler = getPosHandlerNode;
112
+ export type getPosHandlerNode = () => number | undefined;
113
+ export interface ReactNodeProps {
114
+ selected: boolean;
115
+ }
116
+ export type ForwardRef = (node: HTMLElement | null) => void;
117
+ export {};
@@ -1,17 +1,13 @@
1
1
  import React from 'react';
2
- import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { EventDispatcher } from '../../../../event-dispatcher';
5
- import type { MediaPluginState } from '../../pm-plugins/types';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { MediaNextEditorPluginType } from '../../next-plugin-type';
6
4
  import type { WrappedComponentProps } from 'react-intl-next';
7
- export interface Props<T extends MediaPluginState> {
8
- editorView: EditorView;
9
- pluginKey: PluginKey<T>;
10
- eventDispatcher: EventDispatcher;
5
+ export interface Props {
11
6
  isDisabled?: boolean;
12
7
  isReducedSpacing?: boolean;
8
+ api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
13
9
  }
14
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props<MediaPluginState> & WrappedComponentProps<"intl">>> & {
15
- WrappedComponent: React.ComponentType<Props<MediaPluginState> & WrappedComponentProps<"intl">>;
10
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
11
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
16
12
  };
17
13
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.41.0",
3
+ "version": "187.41.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
@@ -1287,7 +1287,7 @@ export interface MediaOptions {
1287
1287
  // (undocumented)
1288
1288
  allowResizingInTables?: boolean;
1289
1289
  // (undocumented)
1290
- allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
1290
+ allowTemplatePlaceholders?: PlaceholderTextOptions_2 | boolean;
1291
1291
  // (undocumented)
1292
1292
  altTextValidator?: (value: string) => string[];
1293
1293
  // (undocumented)
@@ -1671,6 +1671,12 @@ interface PlaceholderTextOptions {
1671
1671
  allowInserting?: boolean;
1672
1672
  }
1673
1673
 
1674
+ // @public (undocumented)
1675
+ interface PlaceholderTextOptions_2 {
1676
+ // (undocumented)
1677
+ allowInserting?: boolean;
1678
+ }
1679
+
1674
1680
  export { PortalProvider };
1675
1681
 
1676
1682
  export { PortalProviderAPI };
@@ -1162,7 +1162,7 @@ export interface MediaOptions {
1162
1162
  // (undocumented)
1163
1163
  allowResizingInTables?: boolean;
1164
1164
  // (undocumented)
1165
- allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
1165
+ allowTemplatePlaceholders?: PlaceholderTextOptions_2 | boolean;
1166
1166
  // (undocumented)
1167
1167
  altTextValidator?: (value: string) => string[];
1168
1168
  // (undocumented)
@@ -1500,6 +1500,12 @@ interface PlaceholderTextOptions {
1500
1500
  allowInserting?: boolean;
1501
1501
  }
1502
1502
 
1503
+ // @public (undocumented)
1504
+ interface PlaceholderTextOptions_2 {
1505
+ // (undocumented)
1506
+ allowInserting?: boolean;
1507
+ }
1508
+
1503
1509
  export { PortalProvider }
1504
1510
 
1505
1511
  export { PortalProviderAPI }