@atlaskit/editor-plugin-media 1.9.3 → 1.9.5

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,20 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 1.9.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.9.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#82153](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82153) [`480761cfea9c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/480761cfea9c) - Make the annotation plugin optional for media plugin.
14
+ - [#81852](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/81852) [`555dccbfa979`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/555dccbfa979) - React 18 types for editor-plugin-media
15
+ - [#82076](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/82076) [`614af0864121`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/614af0864121) - [ux] Remove seperator between edit and open link buttons on media floating toolbar
16
+ - Updated dependencies
17
+
3
18
  ## 1.9.3
4
19
 
5
20
  ### Patch Changes
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.LinkToolbarAppearance = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
10
  var _react = _interopRequireWildcard(require("react"));
12
11
  var _react2 = require("@emotion/react");
13
12
  var _adfSchema = require("@atlaskit/adf-schema");
@@ -19,12 +18,14 @@ var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"))
19
18
  var _pluginKey = require("../pm-plugins/plugin-key");
20
19
  var _checkMediaType = require("../utils/check-media-type");
21
20
  var _currentMediaNode = require("../utils/current-media-node");
22
- var _templateObject;
23
- /** @jsx jsx */
24
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
26
- // need this wrapper, need to have 4px between items.
27
- var wrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
23
+ /** @jsx jsx */
24
+
25
+ var wrapperStyles = (0, _react2.css)({
26
+ display: 'flex',
27
+ alignItems: 'center'
28
+ });
28
29
  var LinkToolbarAppearance = exports.LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
29
30
  var editorState = _ref.editorState,
30
31
  mediaLinkingState = _ref.mediaLinkingState,
@@ -61,7 +62,7 @@ var LinkToolbarAppearance = exports.LinkToolbarAppearance = function LinkToolbar
61
62
  var title = intl.formatMessage(_messages.linkToolbarMessages.editLink);
62
63
  var linkTitle = intl.formatMessage(isValidUrl ? _messages.linkMessages.openLink : _messages.linkToolbarMessages.unableToOpenLink);
63
64
  return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
64
- css: wrapper
65
+ css: wrapperStyles
65
66
  }, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
66
67
  onClick: onEditLink,
67
68
  title: title,
@@ -70,9 +71,7 @@ var LinkToolbarAppearance = exports.LinkToolbarAppearance = function LinkToolbar
70
71
  keymap: _keymaps.addLink
71
72
  }),
72
73
  testId: "edit-link-button"
73
- }, title)), (0, _react2.jsx)("div", {
74
- css: wrapper
75
- }, (0, _react2.jsx)(_ui.FloatingToolbarSeparator, null)), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
74
+ }, title)), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
76
75
  target: "_blank",
77
76
  href: isValidUrl ? mediaLinkingState.link : undefined,
78
77
  disabled: !isValidUrl,
@@ -10,12 +10,10 @@ import OpenIcon from '@atlaskit/icon/glyph/shortcut';
10
10
  import { stateKey } from '../pm-plugins/plugin-key';
11
11
  import { checkMediaType } from '../utils/check-media-type';
12
12
  import { currentMediaInlineNode, currentMediaNode } from '../utils/current-media-node';
13
- // need this wrapper, need to have 4px between items.
14
- const wrapper = css`
15
- display: flex;
16
- align-items: center;
17
- margin-right: ${"var(--ds-space-050, 4px)"};
18
- `;
13
+ const wrapperStyles = css({
14
+ display: 'flex',
15
+ alignItems: 'center'
16
+ });
19
17
  export const LinkToolbarAppearance = ({
20
18
  editorState,
21
19
  mediaLinkingState,
@@ -50,7 +48,7 @@ export const LinkToolbarAppearance = ({
50
48
  const title = intl.formatMessage(linkToolbarMessages.editLink);
51
49
  const linkTitle = intl.formatMessage(isValidUrl ? linkMessages.openLink : linkToolbarMessages.unableToOpenLink);
52
50
  return jsx(Fragment, null, jsx("div", {
53
- css: wrapper
51
+ css: wrapperStyles
54
52
  }, jsx(ToolbarButton, {
55
53
  onClick: onEditLink,
56
54
  title: title,
@@ -59,9 +57,7 @@ export const LinkToolbarAppearance = ({
59
57
  keymap: addLink
60
58
  }),
61
59
  testId: "edit-link-button"
62
- }, title)), jsx("div", {
63
- css: wrapper
64
- }, jsx(Separator, null)), jsx(ToolbarButton, {
60
+ }, title)), jsx(ToolbarButton, {
65
61
  target: "_blank",
66
62
  href: isValidUrl ? mediaLinkingState.link : undefined,
67
63
  disabled: !isValidUrl,
@@ -1,6 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
- var _templateObject;
4
2
  /** @jsx jsx */
5
3
  import React, { Fragment, useEffect, useState } from 'react';
6
4
  import { css, jsx } from '@emotion/react';
@@ -13,8 +11,10 @@ import OpenIcon from '@atlaskit/icon/glyph/shortcut';
13
11
  import { stateKey } from '../pm-plugins/plugin-key';
14
12
  import { checkMediaType } from '../utils/check-media-type';
15
13
  import { currentMediaInlineNode, currentMediaNode } from '../utils/current-media-node';
16
- // need this wrapper, need to have 4px between items.
17
- var wrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
14
+ var wrapperStyles = css({
15
+ display: 'flex',
16
+ alignItems: 'center'
17
+ });
18
18
  export var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
19
19
  var editorState = _ref.editorState,
20
20
  mediaLinkingState = _ref.mediaLinkingState,
@@ -51,7 +51,7 @@ export var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
51
51
  var title = intl.formatMessage(linkToolbarMessages.editLink);
52
52
  var linkTitle = intl.formatMessage(isValidUrl ? linkMessages.openLink : linkToolbarMessages.unableToOpenLink);
53
53
  return jsx(Fragment, null, jsx("div", {
54
- css: wrapper
54
+ css: wrapperStyles
55
55
  }, jsx(ToolbarButton, {
56
56
  onClick: onEditLink,
57
57
  title: title,
@@ -60,9 +60,7 @@ export var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
60
60
  keymap: addLink
61
61
  }),
62
62
  testId: "edit-link-button"
63
- }, title)), jsx("div", {
64
- css: wrapper
65
- }, jsx(Separator, null)), jsx(ToolbarButton, {
63
+ }, title)), jsx(ToolbarButton, {
66
64
  target: "_blank",
67
65
  href: isValidUrl ? mediaLinkingState.link : undefined,
68
66
  disabled: !isValidUrl,
@@ -26,7 +26,7 @@ export type MediaNextEditorPluginType = NextEditorPlugin<'media', {
26
26
  EditorDisabledPlugin,
27
27
  FocusPlugin,
28
28
  SelectionPlugin,
29
- AnnotationPlugin
29
+ OptionalPlugin<AnnotationPlugin>
30
30
  ];
31
31
  sharedState: MediaPluginState | null;
32
32
  actions: {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
@@ -32,7 +32,7 @@ export declare const createMediaNodeUpdater: (props: MediaInlineProps) => MediaN
32
32
  */
33
33
  export declare const updateMediaNodeAttributes: (props: MediaInlineProps, mediaNodeUpdater: MediaNodeUpdater) => Promise<void>;
34
34
  export declare const handleNewNode: (props: MediaInlineProps) => void;
35
- export declare const MediaInline: React.FC<MediaInlineProps>;
35
+ export declare const MediaInline: (props: MediaInlineProps) => JSX.Element;
36
36
  export interface MediaInlineNodeViewProps {
37
37
  providerFactory: ProviderFactory;
38
38
  api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
@@ -1,9 +1,9 @@
1
- import type { FC } from 'react';
1
+ /// <reference types="react" />
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { MediaPluginState } from '../pm-plugins/types';
4
4
  interface FilePreviewProps {
5
5
  mediaPluginState: MediaPluginState;
6
6
  intl: IntlShape;
7
7
  }
8
- export declare const FilePreviewItem: FC<FilePreviewProps>;
8
+ export declare const FilePreviewItem: ({ mediaPluginState, intl, }: FilePreviewProps) => JSX.Element;
9
9
  export {};
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import type { IntlShape } from 'react-intl-next';
4
5
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
6
  import type { MediaLinkingState } from '../pm-plugins/linking';
@@ -12,4 +13,4 @@ export interface LinkingToolbarProps {
12
13
  onOpenLink: React.MouseEventHandler;
13
14
  isInlineNode?: boolean;
14
15
  }
15
- export declare const LinkToolbarAppearance: React.FC<LinkingToolbarProps>;
16
+ export declare const LinkToolbarAppearance: ({ editorState, mediaLinkingState, intl, onAddLink, onEditLink, onOpenLink, isInlineNode, }: LinkingToolbarProps) => jsx.JSX.Element | null;
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { jsx } from '@emotion/react';
3
2
  import type { IntlShape } from 'react-intl-next';
4
3
  import type { PixelEntryProps } from './types';
5
4
  export declare const PixelEntry: ({ width, mediaWidth, mediaHeight, onSubmit, minWidth, maxWidth, onChange, intl: { formatMessage }, showMigration, onMigrate, }: PixelEntryProps) => jsx.JSX.Element;
6
- export declare const FullWidthDisplay: React.FC<{
5
+ export declare const FullWidthDisplay: ({ intl: { formatMessage }, }: {
7
6
  intl: IntlShape;
8
- }>;
7
+ }) => jsx.JSX.Element;
@@ -26,7 +26,7 @@ export type MediaNextEditorPluginType = NextEditorPlugin<'media', {
26
26
  EditorDisabledPlugin,
27
27
  FocusPlugin,
28
28
  SelectionPlugin,
29
- AnnotationPlugin
29
+ OptionalPlugin<AnnotationPlugin>
30
30
  ];
31
31
  sharedState: MediaPluginState | null;
32
32
  actions: {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
@@ -32,7 +32,7 @@ export declare const createMediaNodeUpdater: (props: MediaInlineProps) => MediaN
32
32
  */
33
33
  export declare const updateMediaNodeAttributes: (props: MediaInlineProps, mediaNodeUpdater: MediaNodeUpdater) => Promise<void>;
34
34
  export declare const handleNewNode: (props: MediaInlineProps) => void;
35
- export declare const MediaInline: React.FC<MediaInlineProps>;
35
+ export declare const MediaInline: (props: MediaInlineProps) => JSX.Element;
36
36
  export interface MediaInlineNodeViewProps {
37
37
  providerFactory: ProviderFactory;
38
38
  api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
@@ -1,9 +1,9 @@
1
- import type { FC } from 'react';
1
+ /// <reference types="react" />
2
2
  import type { IntlShape } from 'react-intl-next';
3
3
  import type { MediaPluginState } from '../pm-plugins/types';
4
4
  interface FilePreviewProps {
5
5
  mediaPluginState: MediaPluginState;
6
6
  intl: IntlShape;
7
7
  }
8
- export declare const FilePreviewItem: FC<FilePreviewProps>;
8
+ export declare const FilePreviewItem: ({ mediaPluginState, intl, }: FilePreviewProps) => JSX.Element;
9
9
  export {};
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import type { IntlShape } from 'react-intl-next';
4
5
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
6
  import type { MediaLinkingState } from '../pm-plugins/linking';
@@ -12,4 +13,4 @@ export interface LinkingToolbarProps {
12
13
  onOpenLink: React.MouseEventHandler;
13
14
  isInlineNode?: boolean;
14
15
  }
15
- export declare const LinkToolbarAppearance: React.FC<LinkingToolbarProps>;
16
+ export declare const LinkToolbarAppearance: ({ editorState, mediaLinkingState, intl, onAddLink, onEditLink, onOpenLink, isInlineNode, }: LinkingToolbarProps) => jsx.JSX.Element | null;
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { jsx } from '@emotion/react';
3
2
  import type { IntlShape } from 'react-intl-next';
4
3
  import type { PixelEntryProps } from './types';
5
4
  export declare const PixelEntry: ({ width, mediaWidth, mediaHeight, onSubmit, minWidth, maxWidth, onChange, intl: { formatMessage }, showMigration, onMigrate, }: PixelEntryProps) => jsx.JSX.Element;
6
- export declare const FullWidthDisplay: React.FC<{
5
+ export declare const FullWidthDisplay: ({ intl: { formatMessage }, }: {
7
6
  intl: IntlShape;
8
- }>;
7
+ }) => jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,10 +37,10 @@
37
37
  "@atlaskit/analytics-namespaced-context": "^6.9.0",
38
38
  "@atlaskit/analytics-next": "^9.2.0",
39
39
  "@atlaskit/button": "^17.7.0",
40
- "@atlaskit/editor-common": "^78.12.0",
40
+ "@atlaskit/editor-common": "^78.14.0",
41
41
  "@atlaskit/editor-palette": "1.5.2",
42
42
  "@atlaskit/editor-plugin-analytics": "^1.0.0",
43
- "@atlaskit/editor-plugin-annotation": "1.3.2",
43
+ "@atlaskit/editor-plugin-annotation": "1.4.0",
44
44
  "@atlaskit/editor-plugin-decorations": "^1.0.0",
45
45
  "@atlaskit/editor-plugin-editor-disabled": "^1.0.0",
46
46
  "@atlaskit/editor-plugin-floating-toolbar": "^1.2.0",
@@ -57,13 +57,13 @@
57
57
  "@atlaskit/media-card": "^77.10.0",
58
58
  "@atlaskit/media-client": "^26.2.0",
59
59
  "@atlaskit/media-client-react": "^2.0.0",
60
- "@atlaskit/media-common": "^11.0.0",
60
+ "@atlaskit/media-common": "^11.1.0",
61
61
  "@atlaskit/media-filmstrip": "^47.0.0",
62
62
  "@atlaskit/media-picker": "^66.3.0",
63
63
  "@atlaskit/media-ui": "^25.4.0",
64
64
  "@atlaskit/media-viewer": "^48.3.0",
65
65
  "@atlaskit/platform-feature-flags": "^0.2.0",
66
- "@atlaskit/primitives": "^4.1.0",
66
+ "@atlaskit/primitives": "^5.0.0",
67
67
  "@atlaskit/textfield": "^6.1.0",
68
68
  "@atlaskit/theme": "^12.6.0",
69
69
  "@atlaskit/tokens": "^1.41.0",
@@ -109,11 +109,9 @@
109
109
  "ui-components": [
110
110
  "lite-mode"
111
111
  ],
112
- "deprecation": [
113
- "no-deprecated-imports"
114
- ],
112
+ "deprecation": "no-deprecated-imports",
115
113
  "styling": [
116
- "static",
114
+ "emotion",
117
115
  "emotion"
118
116
  ],
119
117
  "imports": [
@@ -155,4 +153,4 @@
155
153
  "checkDevDependencies": true
156
154
  }
157
155
  }
158
- }
156
+ }