@atlaskit/editor-core 187.14.3 → 187.14.7

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 (50) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -1
  3. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +153 -192
  4. package/dist/cjs/version-wrapper.js +1 -1
  5. package/dist/cjs/version.json +1 -1
  6. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -1
  7. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +126 -167
  8. package/dist/es2019/version-wrapper.js +1 -1
  9. package/dist/es2019/version.json +1 -1
  10. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -1
  11. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +155 -194
  12. package/dist/esm/version-wrapper.js +1 -1
  13. package/dist/esm/version.json +1 -1
  14. package/dist/types/labs/next/presets/default.d.ts +12 -4
  15. package/dist/types/plugins/avatar-group/index.d.ts +1 -1
  16. package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -1
  17. package/dist/types/plugins/code-block/types.d.ts +1 -1
  18. package/dist/types/plugins/collab-edit/index.d.ts +1 -2
  19. package/dist/types/plugins/collab-edit/types.d.ts +2 -25
  20. package/dist/types/plugins/collab-edit/utils.d.ts +1 -1
  21. package/dist/types/plugins/expand/index.d.ts +1 -1
  22. package/dist/types/plugins/extension/index.d.ts +3 -3
  23. package/dist/types/plugins/layout/types.d.ts +1 -1
  24. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +21 -3
  25. package/dist/types/plugins/panel/types.d.ts +1 -1
  26. package/dist/types/plugins/selection/types.d.ts +1 -3
  27. package/dist/types/plugins/tasks-and-decisions/types.d.ts +2 -2
  28. package/dist/types/types/editor-appearance-component.d.ts +1 -1
  29. package/dist/types/types/editor-props.d.ts +1 -1
  30. package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  31. package/dist/types-ts4.5/labs/next/presets/default.d.ts +12 -4
  32. package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +1 -1
  33. package/dist/types-ts4.5/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +1 -1
  34. package/dist/types-ts4.5/plugins/code-block/types.d.ts +1 -1
  35. package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +1 -2
  36. package/dist/types-ts4.5/plugins/collab-edit/types.d.ts +2 -25
  37. package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +1 -1
  38. package/dist/types-ts4.5/plugins/expand/index.d.ts +1 -1
  39. package/dist/types-ts4.5/plugins/extension/index.d.ts +3 -3
  40. package/dist/types-ts4.5/plugins/layout/types.d.ts +1 -1
  41. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +21 -3
  42. package/dist/types-ts4.5/plugins/panel/types.d.ts +1 -1
  43. package/dist/types-ts4.5/plugins/selection/types.d.ts +1 -3
  44. package/dist/types-ts4.5/plugins/tasks-and-decisions/types.d.ts +2 -2
  45. package/dist/types-ts4.5/types/editor-appearance-component.d.ts +1 -1
  46. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  47. package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -1
  48. package/package.json +4 -4
  49. package/report.api.md +4 -42
  50. package/tmp/api-report-tmp.d.ts +4 -41
@@ -5,18 +5,21 @@ import { jsx } from '@emotion/react';
5
5
  import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
6
6
  import type { MediaClientConfig } from '@atlaskit/media-core';
7
7
  import type { Props } from './types';
8
- import type { Dimensions } from '@atlaskit/editor-common/resizer';
8
+ import type { Dimensions, HandleResize, HandleResizeStart, Position, Snap } from '@atlaskit/editor-common/resizer';
9
9
  import type { WrappedComponentProps } from 'react-intl-next';
10
+ import type { GuidelineConfig, GuidelineSnapsReference } from '@atlaskit/editor-common/guideline';
10
11
  type State = {
11
12
  offsetLeft: number;
12
13
  isVideoFile: boolean;
13
14
  resizedPctWidth?: number;
14
15
  isResizing: boolean;
15
16
  size: Dimensions;
17
+ snaps: Snap;
16
18
  };
17
19
  export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
18
20
  type ResizableMediaSingleNextProps = Props & WrappedComponentProps;
19
21
  declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
22
+ private guidelines;
20
23
  constructor(props: ResizableMediaSingleNextProps);
21
24
  /**
22
25
  * Calculate media single node initial width if props.mediaSingleWidth is undefined
@@ -25,10 +28,10 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
25
28
  * @returns initial width in pixel
26
29
  */
27
30
  calcInitialWidth(): number;
28
- componentDidUpdate(prevProps: Props, prevState: State): boolean;
31
+ componentDidUpdate(prevProps: Props): boolean;
29
32
  isNestedNode(): boolean;
30
33
  private getDefaultGuidelines;
31
- private getSnaps;
34
+ private getAllGuidelines;
32
35
  get wrappedLayout(): boolean;
33
36
  componentDidMount(): Promise<void>;
34
37
  UNSAFE_componentWillReceiveProps(nextProps: Props): void;
@@ -51,6 +54,21 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
51
54
  private saveWrapper;
52
55
  private displayGuideline;
53
56
  private setIsResizing;
57
+ updateActiveGuidelines: (width: number | undefined, guidelines: GuidelineConfig[], guidelineSnapsReference: GuidelineSnapsReference) => void;
58
+ roundPixelValue: (value: number) => number;
59
+ getHeightFromNewWidth: (originalWidth: number, originalHeight: number, newWidth: number) => number;
60
+ calculateSizeState: (size: Position & Dimensions, delta: Dimensions, originalWidth: number | undefined, originalHeight: number, onResizeStop?: boolean) => {
61
+ width: number;
62
+ height: number;
63
+ calculatedWidthWithLayout: {
64
+ width: number | null;
65
+ layout: MediaSingleLayout;
66
+ };
67
+ };
68
+ selectCurrentMediaNode: () => void;
69
+ handleResizeStart: HandleResizeStart;
70
+ handleResize: HandleResize;
71
+ handleResizeStop: HandleResize;
54
72
  render(): jsx.JSX.Element;
55
73
  }
56
74
  export { ResizableMediaSingleNext as UnwrappedResizableMediaSingleNext };
@@ -1,5 +1,5 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { LongPressSelectionPluginOptions } from '../selection/types';
2
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
3
3
  export declare const pluginKey: PluginKey<any>;
4
4
  export interface PanelPluginOptions extends LongPressSelectionPluginOptions, PanelPluginConfig {
5
5
  }
@@ -1,14 +1,12 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
3
3
  export type { SelectionPluginState } from '@atlaskit/editor-common/selection';
4
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
4
5
  export declare const selectionPluginKey: PluginKey<any>;
5
6
  export { RelativeSelectionPos };
6
7
  export declare enum SelectionDirection {
7
8
  Before = -1,
8
9
  After = 1
9
10
  }
10
- export interface LongPressSelectionPluginOptions {
11
- useLongPressSelection?: boolean;
12
- }
13
11
  export interface SelectionPluginOptions extends LongPressSelectionPluginOptions {
14
12
  }
@@ -1,7 +1,7 @@
1
1
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import type { INPUT_METHOD, USER_CONTEXT } from '../analytics';
4
- import type { LongPressSelectionPluginOptions } from '../selection/types';
3
+ import type { INPUT_METHOD, USER_CONTEXT } from '@atlaskit/editor-common/analytics';
4
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
5
5
  export type TaskDecisionListType = 'taskList' | 'decisionList';
6
6
  export type TaskDecisionInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD;
7
7
  export type ContextData = {
@@ -6,7 +6,7 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { ReactHookFactory } from '@atlaskit/editor-common/types';
7
7
  import type EditorActions from '../actions';
8
8
  import type { EventDispatcher } from '../event-dispatcher';
9
- import type { CollabEditOptions } from '../plugins/collab-edit/types';
9
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
10
10
  import type { PrimaryToolbarComponents, ReactComponents } from '../types/editor-props';
11
11
  import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
12
12
  import type { UIComponentFactory } from '../types/ui-components';
@@ -15,7 +15,7 @@ import type EditorActions from '../actions';
15
15
  import type { AnnotationProviders } from '../plugins/annotation/types';
16
16
  import type { BlockTypePluginOptions } from '../plugins/block-type/types';
17
17
  import type { CodeBlockOptions } from '../plugins/code-block/types';
18
- import type { CollabEditOptions } from '../plugins/collab-edit/types';
18
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
19
19
  import type { DatePluginConfig } from '../plugins/date/types';
20
20
  import type { FindReplaceOptions } from '../plugins/find-replace/types';
21
21
  import type { LayoutPluginOptions } from '../plugins/layout/types';
@@ -6,7 +6,7 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  import type { WrappedComponentProps } from 'react-intl-next';
8
8
  import type { EditorAppearance, ToolbarUIComponentFactory, PrimaryToolbarComponents } from '../../../types';
9
- import type { CollabEditOptions } from '../../../plugins/collab-edit';
9
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
10
10
  import type { DispatchAnalyticsEvent } from '../../../plugins/analytics';
11
11
  import type { EventDispatcher } from '../../../event-dispatcher';
12
12
  import type { EditorActions } from '../../..';
@@ -413,11 +413,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
413
413
  ];
414
414
  actions: {
415
415
  prependToolbarButtons: import("@atlaskit/editor-plugin-hyperlink").PrependToolbarButtons;
416
- showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
417
416
  hideLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").HideLinkToolbar;
418
417
  insertLink: import("@atlaskit/editor-plugin-hyperlink").InsertLink;
419
418
  updateLink: import("@atlaskit/editor-plugin-hyperlink").UpdateLink;
420
419
  };
420
+ commands: {
421
+ showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
422
+ };
421
423
  sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
422
424
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"hyperlink", {
423
425
  pluginConfiguration: HyperlinkPluginOptions | undefined;
@@ -465,11 +467,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
465
467
  ];
466
468
  actions: {
467
469
  prependToolbarButtons: import("@atlaskit/editor-plugin-hyperlink").PrependToolbarButtons;
468
- showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
469
470
  hideLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").HideLinkToolbar;
470
471
  insertLink: import("@atlaskit/editor-plugin-hyperlink").InsertLink;
471
472
  updateLink: import("@atlaskit/editor-plugin-hyperlink").UpdateLink;
472
473
  };
474
+ commands: {
475
+ showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
476
+ };
473
477
  sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
474
478
  }>,
475
479
  ...import("@atlaskit/editor-common/types").AllEditorPresetPluginTypes[]
@@ -850,11 +854,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
850
854
  ];
851
855
  actions: {
852
856
  prependToolbarButtons: import("@atlaskit/editor-plugin-hyperlink").PrependToolbarButtons;
853
- showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
854
857
  hideLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").HideLinkToolbar;
855
858
  insertLink: import("@atlaskit/editor-plugin-hyperlink").InsertLink;
856
859
  updateLink: import("@atlaskit/editor-plugin-hyperlink").UpdateLink;
857
860
  };
861
+ commands: {
862
+ showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
863
+ };
858
864
  sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
859
865
  }> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"hyperlink", {
860
866
  pluginConfiguration: HyperlinkPluginOptions | undefined;
@@ -902,11 +908,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
902
908
  ];
903
909
  actions: {
904
910
  prependToolbarButtons: import("@atlaskit/editor-plugin-hyperlink").PrependToolbarButtons;
905
- showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
906
911
  hideLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").HideLinkToolbar;
907
912
  insertLink: import("@atlaskit/editor-plugin-hyperlink").InsertLink;
908
913
  updateLink: import("@atlaskit/editor-plugin-hyperlink").UpdateLink;
909
914
  };
915
+ commands: {
916
+ showLinkToolbar: import("@atlaskit/editor-plugin-hyperlink").ShowLinkToolbar;
917
+ };
910
918
  sharedState: import("@atlaskit/editor-common/link").HyperlinkState | undefined;
911
919
  }>,
912
920
  ...import("@atlaskit/editor-common/types").AllEditorPresetPluginTypes[]
@@ -1,5 +1,5 @@
1
1
  import { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
- import { CollabEditOptions } from '../collab-edit';
2
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
3
3
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  type Config = {
5
5
  collabEdit?: CollabEditOptions;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { EventDispatcher } from '../../../event-dispatcher';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
- import type { CollabEditOptions } from '../../collab-edit';
4
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
5
5
  import type { DispatchAnalyticsEvent } from '../../analytics';
6
6
  import type { FeatureFlags } from '@atlaskit/editor-common/types';
7
7
  declare const AvatarGroupPluginWrapper: (props: {
@@ -1,5 +1,5 @@
1
1
  import type { EditorAppearance } from '../../types';
2
- import { LongPressSelectionPluginOptions } from '../selection/types';
2
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
3
3
  export interface CodeBlockOptions extends LongPressSelectionPluginOptions {
4
4
  allowCopyToClipboard?: boolean;
5
5
  allowCompositionInputOverride?: boolean;
@@ -1,10 +1,9 @@
1
1
  import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
2
  import { pluginKey } from './plugin';
3
- import { CollabEditOptions, PrivateCollabEditOptions } from './types';
3
+ import { PrivateCollabEditOptions } from './types';
4
4
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  export { pluginKey };
7
- export type { CollabEditOptions };
8
7
  declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
9
8
  pluginConfiguration: PrivateCollabEditOptions;
10
9
  dependencies: [
@@ -1,29 +1,6 @@
1
- import { ReactElement } from 'react';
2
- import { Providers } from '@atlaskit/editor-common/provider-factory';
3
1
  import type { CollabEditProvider, SyncUpErrorFunction } from '@atlaskit/collab-provider';
4
- export type InviteToEditComponentProps = {
5
- children: ReactElement<InviteToEditButtonProps>;
6
- };
7
- export type InviteToEditButtonProps = {
8
- onClick: (event: React.MouseEvent<HTMLElement>) => void;
9
- selected: boolean;
10
- };
11
- export interface CollabInviteToEditProps {
12
- inviteToEditHandler?: (event: React.MouseEvent<HTMLElement>) => void;
13
- isInviteToEditButtonSelected?: boolean;
14
- inviteToEditComponent?: React.ComponentType<InviteToEditComponentProps>;
15
- }
16
- export interface CollabAnalyticsProps {
17
- /**
18
- * @description Control wether Synchrony entity error events are tracked
19
- */
20
- EXPERIMENTAL_allowInternalErrorAnalytics?: boolean;
21
- }
22
- export type CollabEditOptions = {
23
- provider?: Providers['collabEditProvider'];
24
- userId?: string;
25
- useNativePlugin?: boolean;
26
- } & CollabInviteToEditProps & CollabAnalyticsProps;
2
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
3
+ export type { InviteToEditComponentProps, InviteToEditButtonProps, CollabInviteToEditProps, CollabAnalyticsProps, } from '@atlaskit/editor-common/collab';
27
4
  export type PrivateCollabEditOptions = CollabEditOptions & {
28
5
  sanitizePrivateContent?: boolean;
29
6
  onSyncUpError?: SyncUpErrorFunction;
@@ -4,7 +4,7 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { EditorView, DecorationSet } from '@atlaskit/editor-prosemirror/view';
5
5
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
6
6
  import type { CollabParticipant } from '@atlaskit/collab-provider';
7
- import type { CollabEditOptions } from './types';
7
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
8
8
  export interface Color {
9
9
  solid: string;
10
10
  selection: string;
@@ -1,5 +1,5 @@
1
1
  import type { NextEditorPlugin, EditorProps } from '../../types';
2
- import type { LongPressSelectionPluginOptions } from '../selection/types';
2
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
3
3
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
4
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
5
  interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
@@ -1,7 +1,7 @@
1
- import { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
1
+ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
2
2
  import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
- import { NextEditorPlugin, EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
4
- import { LongPressSelectionPluginOptions } from '../selection/types';
3
+ import type { NextEditorPlugin, EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
4
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
5
5
  import type { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
7
7
  import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
@@ -1,5 +1,5 @@
1
1
  import type { Slice } from '@atlaskit/editor-prosemirror/model';
2
- import type { LongPressSelectionPluginOptions } from '../selection/types';
2
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
3
3
  export interface LayoutPluginOptions extends LongPressSelectionPluginOptions {
4
4
  allowBreakout?: boolean;
5
5
  UNSAFE_addSidebarLayouts?: boolean;
@@ -5,18 +5,21 @@ import { jsx } from '@emotion/react';
5
5
  import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
6
6
  import type { MediaClientConfig } from '@atlaskit/media-core';
7
7
  import type { Props } from './types';
8
- import type { Dimensions } from '@atlaskit/editor-common/resizer';
8
+ import type { Dimensions, HandleResize, HandleResizeStart, Position, Snap } from '@atlaskit/editor-common/resizer';
9
9
  import type { WrappedComponentProps } from 'react-intl-next';
10
+ import type { GuidelineConfig, GuidelineSnapsReference } from '@atlaskit/editor-common/guideline';
10
11
  type State = {
11
12
  offsetLeft: number;
12
13
  isVideoFile: boolean;
13
14
  resizedPctWidth?: number;
14
15
  isResizing: boolean;
15
16
  size: Dimensions;
17
+ snaps: Snap;
16
18
  };
17
19
  export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
18
20
  type ResizableMediaSingleNextProps = Props & WrappedComponentProps;
19
21
  declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
22
+ private guidelines;
20
23
  constructor(props: ResizableMediaSingleNextProps);
21
24
  /**
22
25
  * Calculate media single node initial width if props.mediaSingleWidth is undefined
@@ -25,10 +28,10 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
25
28
  * @returns initial width in pixel
26
29
  */
27
30
  calcInitialWidth(): number;
28
- componentDidUpdate(prevProps: Props, prevState: State): boolean;
31
+ componentDidUpdate(prevProps: Props): boolean;
29
32
  isNestedNode(): boolean;
30
33
  private getDefaultGuidelines;
31
- private getSnaps;
34
+ private getAllGuidelines;
32
35
  get wrappedLayout(): boolean;
33
36
  componentDidMount(): Promise<void>;
34
37
  UNSAFE_componentWillReceiveProps(nextProps: Props): void;
@@ -51,6 +54,21 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
51
54
  private saveWrapper;
52
55
  private displayGuideline;
53
56
  private setIsResizing;
57
+ updateActiveGuidelines: (width: number | undefined, guidelines: GuidelineConfig[], guidelineSnapsReference: GuidelineSnapsReference) => void;
58
+ roundPixelValue: (value: number) => number;
59
+ getHeightFromNewWidth: (originalWidth: number, originalHeight: number, newWidth: number) => number;
60
+ calculateSizeState: (size: Position & Dimensions, delta: Dimensions, originalWidth: number | undefined, originalHeight: number, onResizeStop?: boolean) => {
61
+ width: number;
62
+ height: number;
63
+ calculatedWidthWithLayout: {
64
+ width: number | null;
65
+ layout: MediaSingleLayout;
66
+ };
67
+ };
68
+ selectCurrentMediaNode: () => void;
69
+ handleResizeStart: HandleResizeStart;
70
+ handleResize: HandleResize;
71
+ handleResizeStop: HandleResize;
54
72
  render(): jsx.JSX.Element;
55
73
  }
56
74
  export { ResizableMediaSingleNext as UnwrappedResizableMediaSingleNext };
@@ -1,5 +1,5 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- import type { LongPressSelectionPluginOptions } from '../selection/types';
2
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
3
3
  export declare const pluginKey: PluginKey<any>;
4
4
  export interface PanelPluginOptions extends LongPressSelectionPluginOptions, PanelPluginConfig {
5
5
  }
@@ -1,14 +1,12 @@
1
1
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
2
  import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
3
3
  export type { SelectionPluginState } from '@atlaskit/editor-common/selection';
4
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
4
5
  export declare const selectionPluginKey: PluginKey<any>;
5
6
  export { RelativeSelectionPos };
6
7
  export declare enum SelectionDirection {
7
8
  Before = -1,
8
9
  After = 1
9
10
  }
10
- export interface LongPressSelectionPluginOptions {
11
- useLongPressSelection?: boolean;
12
- }
13
11
  export interface SelectionPluginOptions extends LongPressSelectionPluginOptions {
14
12
  }
@@ -1,7 +1,7 @@
1
1
  import type { NodeType } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
- import type { INPUT_METHOD, USER_CONTEXT } from '../analytics';
4
- import type { LongPressSelectionPluginOptions } from '../selection/types';
3
+ import type { INPUT_METHOD, USER_CONTEXT } from '@atlaskit/editor-common/analytics';
4
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
5
5
  export type TaskDecisionListType = 'taskList' | 'decisionList';
6
6
  export type TaskDecisionInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD;
7
7
  export type ContextData = {
@@ -6,7 +6,7 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { ReactHookFactory } from '@atlaskit/editor-common/types';
7
7
  import type EditorActions from '../actions';
8
8
  import type { EventDispatcher } from '../event-dispatcher';
9
- import type { CollabEditOptions } from '../plugins/collab-edit/types';
9
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
10
10
  import type { PrimaryToolbarComponents, ReactComponents } from '../types/editor-props';
11
11
  import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
12
12
  import type { UIComponentFactory } from '../types/ui-components';
@@ -15,7 +15,7 @@ import type EditorActions from '../actions';
15
15
  import type { AnnotationProviders } from '../plugins/annotation/types';
16
16
  import type { BlockTypePluginOptions } from '../plugins/block-type/types';
17
17
  import type { CodeBlockOptions } from '../plugins/code-block/types';
18
- import type { CollabEditOptions } from '../plugins/collab-edit/types';
18
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
19
19
  import type { DatePluginConfig } from '../plugins/date/types';
20
20
  import type { FindReplaceOptions } from '../plugins/find-replace/types';
21
21
  import type { LayoutPluginOptions } from '../plugins/layout/types';
@@ -6,7 +6,7 @@ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  import type { WrappedComponentProps } from 'react-intl-next';
8
8
  import type { EditorAppearance, ToolbarUIComponentFactory, PrimaryToolbarComponents } from '../../../types';
9
- import type { CollabEditOptions } from '../../../plugins/collab-edit';
9
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
10
10
  import type { DispatchAnalyticsEvent } from '../../../plugins/analytics';
11
11
  import type { EventDispatcher } from '../../../event-dispatcher';
12
12
  import type { EditorActions } from '../../..';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.14.3",
3
+ "version": "187.14.7",
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.36.0",
58
+ "@atlaskit/editor-common": "^74.38.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",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/editor-plugin-floating-toolbar": "^0.3.0",
70
70
  "@atlaskit/editor-plugin-grid": "^0.1.0",
71
71
  "@atlaskit/editor-plugin-guideline": "^0.3.4",
72
- "@atlaskit/editor-plugin-hyperlink": "^0.2.0",
72
+ "@atlaskit/editor-plugin-hyperlink": "^0.3.0",
73
73
  "@atlaskit/editor-plugin-table": "^2.6.0",
74
74
  "@atlaskit/editor-plugin-width": "^0.1.0",
75
75
  "@atlaskit/editor-prosemirror": "1.0.2",
@@ -156,7 +156,7 @@
156
156
  "@atlaskit/media-test-helpers": "^33.0.0",
157
157
  "@atlaskit/menu": "^1.9.0",
158
158
  "@atlaskit/platform-feature-flags": "^0.2.0",
159
- "@atlaskit/renderer": "^108.10.0",
159
+ "@atlaskit/renderer": "^108.11.0",
160
160
  "@atlaskit/section-message": "^6.4.0",
161
161
  "@atlaskit/smart-user-picker": "^6.1.0",
162
162
  "@atlaskit/synchrony-test-helpers": "^2.3.0",
package/report.api.md CHANGED
@@ -32,6 +32,7 @@ import { AnnotationTypes } from '@atlaskit/adf-schema';
32
32
  import { BrowserFreezetracking } from '@atlaskit/editor-common/types';
33
33
  import { CardOptions } from '@atlaskit/editor-common/card';
34
34
  import { CardProvider } from '@atlaskit/editor-common/provider-factory';
35
+ import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
35
36
  import { Color } from '@atlaskit/status/element';
36
37
  import { Command as Command_2 } from '@atlaskit/editor-common/types';
37
38
  import { ComponentType } from 'react';
@@ -102,6 +103,7 @@ import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
102
103
  import { jsx } from '@emotion/react';
103
104
  import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
104
105
  import type { LinkingOptions } from '@atlaskit/editor-common/types';
106
+ import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
105
107
  import { MacroAttributes } from '@atlaskit/editor-common/provider-factory';
106
108
  import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
107
109
  import { MarkConfig } from '@atlaskit/editor-common/types';
@@ -136,14 +138,14 @@ import { PresenceProvider } from '@atlaskit/mention/resource';
136
138
  import { PresenceResource } from '@atlaskit/mention/resource';
137
139
  import PropTypes from 'prop-types';
138
140
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
139
- import { Providers } from '@atlaskit/editor-common/provider-factory';
141
+ import type { Providers } from '@atlaskit/editor-common/provider-factory';
140
142
  import { PureComponent } from 'react';
141
143
  import { QuickInsertActionInsert } from '@atlaskit/editor-common/provider-factory';
142
144
  import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
143
145
  import { QuickInsertItemId } from '@atlaskit/editor-common/provider-factory';
144
146
  import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
145
147
  import { default as React_2 } from 'react';
146
- import { ReactElement } from 'react';
148
+ import type { ReactElement } from 'react';
147
149
  import type { ReactHookFactory } from '@atlaskit/editor-common/types';
148
150
  import type { ReplaceRawValue } from '@atlaskit/editor-common/types';
149
151
  import type { ResolvedEditorState } from '@atlaskit/collab-provider';
@@ -357,29 +359,6 @@ interface CodeBlockOptions extends LongPressSelectionPluginOptions {
357
359
  appearance?: EditorAppearance | undefined;
358
360
  }
359
361
 
360
- // @public (undocumented)
361
- interface CollabAnalyticsProps {
362
- EXPERIMENTAL_allowInternalErrorAnalytics?: boolean;
363
- }
364
-
365
- // @public (undocumented)
366
- type CollabEditOptions = {
367
- provider?: Providers['collabEditProvider'];
368
- userId?: string;
369
- useNativePlugin?: boolean;
370
- } & CollabInviteToEditProps &
371
- CollabAnalyticsProps;
372
-
373
- // @public (undocumented)
374
- interface CollabInviteToEditProps {
375
- // (undocumented)
376
- inviteToEditComponent?: React.ComponentType<InviteToEditComponentProps>;
377
- // (undocumented)
378
- inviteToEditHandler?: (event: React.MouseEvent<HTMLElement>) => void;
379
- // (undocumented)
380
- isInviteToEditButtonSelected?: boolean;
381
- }
382
-
383
362
  // @public (undocumented)
384
363
  export class CollapsedEditor extends React_2.Component<Props, State> {
385
364
  // (undocumented)
@@ -1248,17 +1227,6 @@ export const insertTaskDecisionCommand: (
1248
1227
  itemLocalId?: string,
1249
1228
  ) => Command;
1250
1229
 
1251
- // @public (undocumented)
1252
- type InviteToEditButtonProps = {
1253
- onClick: (event: React.MouseEvent<HTMLElement>) => void;
1254
- selected: boolean;
1255
- };
1256
-
1257
- // @public (undocumented)
1258
- type InviteToEditComponentProps = {
1259
- children: ReactElement<InviteToEditButtonProps>;
1260
- };
1261
-
1262
1230
  // @public (undocumented)
1263
1231
  interface LayoutPluginOptions extends LongPressSelectionPluginOptions {
1264
1232
  // (undocumented)
@@ -1294,12 +1262,6 @@ export interface ListState {
1294
1262
  // @public (undocumented)
1295
1263
  export const listStateKey: PluginKey<ListState>;
1296
1264
 
1297
- // @public (undocumented)
1298
- interface LongPressSelectionPluginOptions {
1299
- // (undocumented)
1300
- useLongPressSelection?: boolean;
1301
- }
1302
-
1303
1265
  export { MacroAttributes };
1304
1266
 
1305
1267
  export { MacroProvider };