@atlaskit/editor-plugin-media 2.3.22 → 2.4.1

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,27 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 2.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#139216](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139216)
8
+ [`e8f596d2b1910`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e8f596d2b1910) -
9
+ [ux] Cleaned up platform_editor_controls_patch_1 FG
10
+ - Updated dependencies
11
+
12
+ ## 2.4.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#139139](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139139)
17
+ [`7f6b665d778dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7f6b665d778dd) -
18
+ [https://product-fabric.atlassian.net/browse/ED-27499](ED-27499) - the new
19
+ `@atlassian/confluence-presets` package with Confluence `full-page` preset is created
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 2.3.22
4
26
 
5
27
  ### Patch Changes
@@ -799,12 +799,12 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
799
799
  });
800
800
  }
801
801
  var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
802
- return (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_1') ? {
802
+ return {
803
803
  onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
804
804
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
805
805
  onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
806
806
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
807
- } : undefined;
807
+ };
808
808
  };
809
809
  items.push({
810
810
  type: 'overflow-dropdown',
@@ -797,12 +797,12 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
797
797
  type: 'separator'
798
798
  });
799
799
  }
800
- const hoverDecorationProps = (nodeType, className) => fg('platform_editor_controls_patch_1') ? {
800
+ const hoverDecorationProps = (nodeType, className) => ({
801
801
  onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
802
802
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
803
803
  onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
804
804
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
805
- } : undefined;
805
+ });
806
806
  items.push({
807
807
  type: 'overflow-dropdown',
808
808
  id: 'media',
@@ -789,12 +789,12 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
789
789
  });
790
790
  }
791
791
  var hoverDecorationProps = function hoverDecorationProps(nodeType, className) {
792
- return fg('platform_editor_controls_patch_1') ? {
792
+ return {
793
793
  onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
794
794
  onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className),
795
795
  onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true, className),
796
796
  onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false, className)
797
- } : undefined;
797
+ };
798
798
  };
799
799
  items.push({
800
800
  type: 'overflow-dropdown',
@@ -1,2 +1,3 @@
1
1
  export type { MediaNextEditorPluginType as MediaPlugin } from './mediaPluginType';
2
+ export type { MediaPluginOptions } from './types/index';
2
3
  export { mediaPlugin } from './mediaPlugin';
@@ -3,5 +3,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
5
  import type { MediaNextEditorPluginType } from '../mediaPluginType';
6
- import type { MediaOptions } from '../types';
7
- export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
6
+ export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
@@ -4,5 +4,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
4
4
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import type { MediaNextEditorPluginType } from '../mediaPluginType';
7
- import type { MediaOptions } from '../types';
8
- export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
7
+ export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
@@ -27,4 +27,4 @@ declare const IntlMediaGroup: React.FC<import("react-intl-next").WithIntlProps<M
27
27
  WrappedComponent: React.ComponentType<MediaGroupProps>;
28
28
  };
29
29
  export default IntlMediaGroup;
30
- export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
30
+ export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -8,7 +8,7 @@ import type { ExtractInjectionAPI, EditorContainerWidth as WidthPluginState } fr
8
8
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
9
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
10
10
  import type { MediaNextEditorPluginType } from '../../mediaPluginType';
11
- import type { getPosHandler, MediaOptions } from '../../types';
11
+ import type { getPosHandler } from '../../types';
12
12
  import type { MediaNodeViewProps } from '../types';
13
13
  interface MediaNodeWithPluginStateComponentProps {
14
14
  width?: WidthPluginState;
@@ -29,5 +29,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
29
29
  renderMediaNodeWithProviders: ({ contextIdentifierProvider }: Providers) => React.JSX.Element;
30
30
  render(): React.JSX.Element;
31
31
  }
32
- export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
32
+ export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
33
33
  export {};
@@ -15,7 +15,7 @@ interface PlaceholderTextOptions {
15
15
  export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
16
16
  export type MediaSingleWithType = 'pixel' | 'percentage';
17
17
  export type MediaCopyScope = 'editor' | 'context';
18
- export interface MediaOptions {
18
+ export interface MediaPluginOptions {
19
19
  provider?: Providers['mediaProvider'];
20
20
  /**
21
21
  * @experimental
@@ -56,6 +56,12 @@ export interface MediaOptions {
56
56
  forceHandlePositioning?: HandlePositioning;
57
57
  mediaShallowCopyScope?: MediaCopyScope;
58
58
  }
59
+ /**
60
+ * @private
61
+ * @deprecated Use {@link MediaPluginOptions} instead.
62
+ * @see https://product-fabric.atlassian.net/browse/ED-27496
63
+ */
64
+ export type MediaOptions = MediaPluginOptions;
59
65
  export interface MediaSingleOptions {
60
66
  disableLayout?: boolean;
61
67
  }
@@ -1,2 +1,3 @@
1
1
  export type { MediaNextEditorPluginType as MediaPlugin } from './mediaPluginType';
2
+ export type { MediaPluginOptions } from './types/index';
2
3
  export { mediaPlugin } from './mediaPlugin';
@@ -3,5 +3,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
3
3
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
4
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
5
  import type { MediaNextEditorPluginType } from '../mediaPluginType';
6
- import type { MediaOptions } from '../types';
7
- export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
6
+ export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
@@ -4,5 +4,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
4
4
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import type { MediaNextEditorPluginType } from '../mediaPluginType';
7
- import type { MediaOptions } from '../types';
8
- export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
7
+ export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
@@ -27,4 +27,4 @@ declare const IntlMediaGroup: React.FC<import("react-intl-next").WithIntlProps<M
27
27
  WrappedComponent: React.ComponentType<MediaGroupProps>;
28
28
  };
29
29
  export default IntlMediaGroup;
30
- export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
30
+ export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -8,7 +8,7 @@ import type { ExtractInjectionAPI, EditorContainerWidth as WidthPluginState } fr
8
8
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
9
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
10
10
  import type { MediaNextEditorPluginType } from '../../mediaPluginType';
11
- import type { getPosHandler, MediaOptions } from '../../types';
11
+ import type { getPosHandler } from '../../types';
12
12
  import type { MediaNodeViewProps } from '../types';
13
13
  interface MediaNodeWithPluginStateComponentProps {
14
14
  width?: WidthPluginState;
@@ -29,5 +29,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
29
29
  renderMediaNodeWithProviders: ({ contextIdentifierProvider }: Providers) => React.JSX.Element;
30
30
  render(): React.JSX.Element;
31
31
  }
32
- export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
32
+ export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
33
33
  export {};
@@ -15,7 +15,7 @@ interface PlaceholderTextOptions {
15
15
  export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
16
16
  export type MediaSingleWithType = 'pixel' | 'percentage';
17
17
  export type MediaCopyScope = 'editor' | 'context';
18
- export interface MediaOptions {
18
+ export interface MediaPluginOptions {
19
19
  provider?: Providers['mediaProvider'];
20
20
  /**
21
21
  * @experimental
@@ -56,6 +56,12 @@ export interface MediaOptions {
56
56
  forceHandlePositioning?: HandlePositioning;
57
57
  mediaShallowCopyScope?: MediaCopyScope;
58
58
  }
59
+ /**
60
+ * @private
61
+ * @deprecated Use {@link MediaPluginOptions} instead.
62
+ * @see https://product-fabric.atlassian.net/browse/ED-27496
63
+ */
64
+ export type MediaOptions = MediaPluginOptions;
59
65
  export interface MediaSingleOptions {
60
66
  disableLayout?: boolean;
61
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "2.3.22",
3
+ "version": "2.4.1",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,15 +38,15 @@
38
38
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
39
39
  "@atlaskit/analytics-next": "^11.0.0",
40
40
  "@atlaskit/button": "^23.0.0",
41
- "@atlaskit/editor-common": "^103.0.0",
41
+ "@atlaskit/editor-common": "^103.4.0",
42
42
  "@atlaskit/editor-palette": "^2.1.0",
43
43
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
44
- "@atlaskit/editor-plugin-annotation": "^2.2.0",
44
+ "@atlaskit/editor-plugin-annotation": "^2.5.0",
45
45
  "@atlaskit/editor-plugin-connectivity": "^2.0.0",
46
46
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
47
47
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
48
- "@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
49
- "@atlaskit/editor-plugin-floating-toolbar": "^3.3.0",
48
+ "@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
49
+ "@atlaskit/editor-plugin-floating-toolbar": "^3.6.0",
50
50
  "@atlaskit/editor-plugin-focus": "^1.5.0",
51
51
  "@atlaskit/editor-plugin-grid": "^2.0.0",
52
52
  "@atlaskit/editor-plugin-guideline": "^2.0.0",
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/media-ui": "^28.1.0",
67
67
  "@atlaskit/media-viewer": "^52.0.0",
68
68
  "@atlaskit/platform-feature-flags": "^1.1.0",
69
- "@atlaskit/primitives": "^14.3.0",
69
+ "@atlaskit/primitives": "^14.4.0",
70
70
  "@atlaskit/textfield": "^8.0.0",
71
71
  "@atlaskit/theme": "^18.0.0",
72
72
  "@atlaskit/tmp-editor-statsig": "^4.6.0",
@@ -174,9 +174,6 @@
174
174
  "platform_editor_multi_images_overridden_upload_fix": {
175
175
  "type": "boolean"
176
176
  },
177
- "platform_editor_controls_patch_1": {
178
- "type": "boolean"
179
- },
180
177
  "platform_editor_remove_media_inline_feature_flag": {
181
178
  "type": "boolean"
182
179
  },