@atlaskit/editor-plugin-media-insert 4.0.6 → 4.0.8
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 +18 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/{plugin.js → mediaInsertPlugin.js} +2 -1
- package/dist/cjs/{actions.js → pm-plugins/actions.js} +1 -1
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/ui/MediaFromURL.js +2 -2
- package/dist/cjs/ui/MediaInsertPicker.js +2 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/{plugin.js → mediaInsertPlugin.js} +2 -1
- package/dist/es2019/{actions.js → pm-plugins/actions.js} +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/MediaFromURL.js +1 -1
- package/dist/es2019/ui/MediaInsertPicker.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{plugin.js → mediaInsertPlugin.js} +2 -1
- package/dist/esm/mediaInsertPluginType.js +1 -0
- package/dist/esm/{actions.js → pm-plugins/actions.js} +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/ui/MediaFromURL.js +1 -1
- package/dist/esm/ui/MediaInsertPicker.js +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/mediaInsertPlugin.d.ts +2 -0
- package/dist/types/mediaInsertPluginType.d.ts +25 -0
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/{types-ts4.5/types.d.ts → types/types/index.d.ts} +2 -25
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/mediaInsertPlugin.d.ts +2 -0
- package/dist/types-ts4.5/mediaInsertPluginType.d.ts +25 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +1 -1
- package/dist/{types/types.d.ts → types-ts4.5/types/index.d.ts} +2 -25
- package/package.json +15 -12
- package/dist/types/plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugin.d.ts +0 -2
- /package/dist/cjs/{types.js → mediaInsertPluginType.js} +0 -0
- /package/dist/cjs/{hooks → ui/hooks}/use-focus-editor.js +0 -0
- /package/dist/cjs/{hooks → ui/hooks}/use-unholy-autofocus.js +0 -0
- /package/dist/es2019/{types.js → mediaInsertPluginType.js} +0 -0
- /package/dist/{esm/types.js → es2019/types/index.js} +0 -0
- /package/dist/es2019/{hooks → ui/hooks}/use-focus-editor.js +0 -0
- /package/dist/es2019/{hooks → ui/hooks}/use-unholy-autofocus.js +0 -0
- /package/dist/esm/{hooks → ui/hooks}/use-focus-editor.js +0 -0
- /package/dist/esm/{hooks → ui/hooks}/use-unholy-autofocus.js +0 -0
- /package/dist/types/{actions.d.ts → pm-plugins/actions.d.ts} +0 -0
- /package/dist/types/{hooks → ui/hooks}/use-focus-editor.d.ts +0 -0
- /package/dist/types/{hooks → ui/hooks}/use-unholy-autofocus.d.ts +0 -0
- /package/dist/types-ts4.5/{actions.d.ts → pm-plugins/actions.d.ts} +0 -0
- /package/dist/types-ts4.5/{hooks → ui/hooks}/use-focus-editor.d.ts +0 -0
- /package/dist/types-ts4.5/{hooks → ui/hooks}/use-unholy-autofocus.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media-insert
|
|
2
2
|
|
|
3
|
+
## 4.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.0.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#171350](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171350)
|
|
14
|
+
[`436dfb28a4833`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/436dfb28a4833) -
|
|
15
|
+
[ux] Support disabled type-ahead items while user is offline for media, emoji, and mentions.
|
|
16
|
+
- [#170868](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170868)
|
|
17
|
+
[`ed6ece7d3c533`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ed6ece7d3c533) -
|
|
18
|
+
ED-25814: refactors plugins to meet folder standards
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 4.0.6
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "mediaInsertPlugin", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return
|
|
9
|
+
return _mediaInsertPlugin.mediaInsertPlugin;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var _mediaInsertPlugin = require("./mediaInsertPlugin");
|
|
@@ -10,7 +10,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
10
10
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
11
11
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _actions = require("./actions");
|
|
13
|
+
var _actions = require("./pm-plugins/actions");
|
|
14
14
|
var _main = require("./pm-plugins/main");
|
|
15
15
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
16
16
|
var _MediaInsertPicker = require("./ui/MediaInsertPicker");
|
|
@@ -134,6 +134,7 @@ var mediaInsertPlugin = exports.mediaInsertPlugin = function mediaInsertPlugin(_
|
|
|
134
134
|
icon: function icon() {
|
|
135
135
|
return /*#__PURE__*/_react.default.createElement(_quickInsert.IconImages, null);
|
|
136
136
|
},
|
|
137
|
+
isDisabledOffline: true,
|
|
137
138
|
action: function action(insert) {
|
|
138
139
|
var _api$analytics;
|
|
139
140
|
// Insert empty string to remove the typeahead raw text
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.showMediaInsertPopup = exports.closeMediaInsertPicker = exports.ACTION_OPEN_POPUP = exports.ACTION_CLOSE_POPUP = void 0;
|
|
7
7
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
8
|
-
var _pluginKey = require("./
|
|
8
|
+
var _pluginKey = require("./plugin-key");
|
|
9
9
|
var ACTION_OPEN_POPUP = exports.ACTION_OPEN_POPUP = 'OPEN_POPUP';
|
|
10
10
|
var ACTION_CLOSE_POPUP = exports.ACTION_CLOSE_POPUP = 'CLOSE_POPUP';
|
|
11
11
|
var setPopupMeta = function setPopupMeta(_ref) {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createPlugin = void 0;
|
|
7
7
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
|
-
var _actions = require("
|
|
8
|
+
var _actions = require("./actions");
|
|
9
9
|
var _pluginKey = require("./plugin-key");
|
|
10
10
|
var createPlugin = exports.createPlugin = function createPlugin() {
|
|
11
11
|
return new _safePlugin.SafePlugin({
|
|
@@ -21,7 +21,7 @@ var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
|
21
21
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
22
22
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
23
23
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
24
|
-
var
|
|
24
|
+
var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-diagonal"));
|
|
25
25
|
var _filePreview = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/file-preview"));
|
|
26
26
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
27
27
|
var _primitives = require("@atlaskit/primitives");
|
|
@@ -332,7 +332,7 @@ function MediaFromURL(_ref) {
|
|
|
332
332
|
isLoading: previewState.isLoading,
|
|
333
333
|
isDisabled: !!error || !meta.dirty,
|
|
334
334
|
iconBefore: function iconBefore() {
|
|
335
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
335
|
+
return /*#__PURE__*/_react.default.createElement(_growDiagonal.default, {
|
|
336
336
|
label: "",
|
|
337
337
|
LEGACY_fallbackIcon: _filePreview.default
|
|
338
338
|
});
|
|
@@ -17,8 +17,8 @@ var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
18
|
var _primitives = require("@atlaskit/primitives");
|
|
19
19
|
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
20
|
-
var _useFocusEditor = require("
|
|
21
|
-
var _useUnholyAutofocus2 = require("
|
|
20
|
+
var _useFocusEditor = require("./hooks/use-focus-editor");
|
|
21
|
+
var _useUnholyAutofocus2 = require("./hooks/use-unholy-autofocus");
|
|
22
22
|
var _LocalMedia = require("./LocalMedia");
|
|
23
23
|
var _MediaFromURL = require("./MediaFromURL");
|
|
24
24
|
var _MediaInsertWrapper = require("./MediaInsertWrapper");
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { mediaInsertPlugin } from './
|
|
1
|
+
export { mediaInsertPlugin } from './mediaInsertPlugin';
|
|
@@ -3,7 +3,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, IN
|
|
|
3
3
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { IconImages } from '@atlaskit/editor-common/quick-insert';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { closeMediaInsertPicker, showMediaInsertPopup } from './actions';
|
|
6
|
+
import { closeMediaInsertPicker, showMediaInsertPopup } from './pm-plugins/actions';
|
|
7
7
|
import { createPlugin } from './pm-plugins/main';
|
|
8
8
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
9
9
|
import { MediaInsertPicker } from './ui/MediaInsertPicker';
|
|
@@ -126,6 +126,7 @@ export const mediaInsertPlugin = ({
|
|
|
126
126
|
priority: 400,
|
|
127
127
|
keywords: ['attachment', 'gif', 'media', 'picture', 'image', 'video', 'file'],
|
|
128
128
|
icon: () => /*#__PURE__*/React.createElement(IconImages, null),
|
|
129
|
+
isDisabledOffline: true,
|
|
129
130
|
action(insert) {
|
|
130
131
|
var _api$analytics, _api$analytics$action;
|
|
131
132
|
// Insert empty string to remove the typeahead raw text
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
|
-
import { pluginKey } from './
|
|
2
|
+
import { pluginKey } from './plugin-key';
|
|
3
3
|
export const ACTION_OPEN_POPUP = 'OPEN_POPUP';
|
|
4
4
|
export const ACTION_CLOSE_POPUP = 'CLOSE_POPUP';
|
|
5
5
|
const setPopupMeta = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { ACTION_CLOSE_POPUP, ACTION_OPEN_POPUP } from '
|
|
2
|
+
import { ACTION_CLOSE_POPUP, ACTION_OPEN_POPUP } from './actions';
|
|
3
3
|
import { pluginKey } from './plugin-key';
|
|
4
4
|
export const createPlugin = () => {
|
|
5
5
|
return new SafePlugin({
|
|
@@ -7,7 +7,7 @@ import Button from '@atlaskit/button/new';
|
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { mediaInsertMessages } from '@atlaskit/editor-common/messages';
|
|
9
9
|
import Form, { ErrorMessage, Field, FormFooter, MessageWrapper } from '@atlaskit/form';
|
|
10
|
-
import ExpandIcon from '@atlaskit/icon/core/
|
|
10
|
+
import ExpandIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
11
11
|
import { default as EditorFilePreviewIconLegacy } from '@atlaskit/icon/glyph/editor/file-preview';
|
|
12
12
|
import { getMediaClient } from '@atlaskit/media-client-react';
|
|
13
13
|
import { Box, Flex, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
@@ -9,8 +9,8 @@ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
9
9
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { Box } from '@atlaskit/primitives';
|
|
11
11
|
import Tabs, { Tab, TabList, useTabPanel } from '@atlaskit/tabs';
|
|
12
|
-
import { useFocusEditor } from '
|
|
13
|
-
import { useUnholyAutofocus } from '
|
|
12
|
+
import { useFocusEditor } from './hooks/use-focus-editor';
|
|
13
|
+
import { useUnholyAutofocus } from './hooks/use-unholy-autofocus';
|
|
14
14
|
import { LocalMedia } from './LocalMedia';
|
|
15
15
|
import { MediaFromURL } from './MediaFromURL';
|
|
16
16
|
import { MediaInsertWrapper } from './MediaInsertWrapper';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { mediaInsertPlugin } from './
|
|
1
|
+
export { mediaInsertPlugin } from './mediaInsertPlugin';
|
|
@@ -3,7 +3,7 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, IN
|
|
|
3
3
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { IconImages } from '@atlaskit/editor-common/quick-insert';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { closeMediaInsertPicker as _closeMediaInsertPicker, showMediaInsertPopup as _showMediaInsertPopup } from './actions';
|
|
6
|
+
import { closeMediaInsertPicker as _closeMediaInsertPicker, showMediaInsertPopup as _showMediaInsertPopup } from './pm-plugins/actions';
|
|
7
7
|
import { createPlugin } from './pm-plugins/main';
|
|
8
8
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
9
9
|
import { MediaInsertPicker } from './ui/MediaInsertPicker';
|
|
@@ -127,6 +127,7 @@ export var mediaInsertPlugin = function mediaInsertPlugin(_ref) {
|
|
|
127
127
|
icon: function icon() {
|
|
128
128
|
return /*#__PURE__*/React.createElement(IconImages, null);
|
|
129
129
|
},
|
|
130
|
+
isDisabledOffline: true,
|
|
130
131
|
action: function action(insert) {
|
|
131
132
|
var _api$analytics;
|
|
132
133
|
// Insert empty string to remove the typeahead raw text
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
|
-
import { pluginKey } from './
|
|
2
|
+
import { pluginKey } from './plugin-key';
|
|
3
3
|
export var ACTION_OPEN_POPUP = 'OPEN_POPUP';
|
|
4
4
|
export var ACTION_CLOSE_POPUP = 'CLOSE_POPUP';
|
|
5
5
|
var setPopupMeta = function setPopupMeta(_ref) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { ACTION_CLOSE_POPUP, ACTION_OPEN_POPUP } from '
|
|
2
|
+
import { ACTION_CLOSE_POPUP, ACTION_OPEN_POPUP } from './actions';
|
|
3
3
|
import { pluginKey } from './plugin-key';
|
|
4
4
|
export var createPlugin = function createPlugin() {
|
|
5
5
|
return new SafePlugin({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -15,7 +15,7 @@ import Button from '@atlaskit/button/new';
|
|
|
15
15
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
16
16
|
import { mediaInsertMessages } from '@atlaskit/editor-common/messages';
|
|
17
17
|
import Form, { ErrorMessage, Field, FormFooter, MessageWrapper } from '@atlaskit/form';
|
|
18
|
-
import ExpandIcon from '@atlaskit/icon/core/
|
|
18
|
+
import ExpandIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
19
19
|
import { default as EditorFilePreviewIconLegacy } from '@atlaskit/icon/glyph/editor/file-preview';
|
|
20
20
|
import { getMediaClient } from '@atlaskit/media-client-react';
|
|
21
21
|
import { Box, Flex, Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
@@ -9,8 +9,8 @@ import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
9
9
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { Box } from '@atlaskit/primitives';
|
|
11
11
|
import Tabs, { Tab, TabList, useTabPanel } from '@atlaskit/tabs';
|
|
12
|
-
import { useFocusEditor } from '
|
|
13
|
-
import { useUnholyAutofocus } from '
|
|
12
|
+
import { useFocusEditor } from './hooks/use-focus-editor';
|
|
13
|
+
import { useUnholyAutofocus } from './hooks/use-unholy-autofocus';
|
|
14
14
|
import { LocalMedia } from './LocalMedia';
|
|
15
15
|
import { MediaFromURL } from './MediaFromURL';
|
|
16
16
|
import { MediaInsertWrapper } from './MediaInsertWrapper';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { mediaInsertPlugin } from './
|
|
2
|
-
export type { MediaInsertPlugin, MediaInsertPluginState } from './
|
|
1
|
+
export { mediaInsertPlugin } from './mediaInsertPlugin';
|
|
2
|
+
export type { MediaInsertPlugin, MediaInsertPluginState } from './mediaInsertPluginType';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
|
+
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
5
|
+
export type MediaInsertPluginState = {
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
mountInfo?: {
|
|
8
|
+
ref: HTMLElement;
|
|
9
|
+
mountPoint: HTMLElement;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type MediaInsertPlugin = NextEditorPlugin<'mediaInsert', {
|
|
13
|
+
dependencies: [
|
|
14
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
15
|
+
MediaPlugin,
|
|
16
|
+
OptionalPlugin<FeatureFlagsPlugin>
|
|
17
|
+
];
|
|
18
|
+
sharedState: MediaInsertPluginState;
|
|
19
|
+
commands: {
|
|
20
|
+
showMediaInsertPopup: (mountInfo?: {
|
|
21
|
+
ref: HTMLElement;
|
|
22
|
+
mountPoint: HTMLElement;
|
|
23
|
+
}) => EditorCommand;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { MediaInsertPluginState } from '../
|
|
2
|
+
import type { MediaInsertPluginState } from '../mediaInsertPluginType';
|
|
3
3
|
export declare const createPlugin: () => SafePlugin<MediaInsertPluginState>;
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
7
|
-
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
8
5
|
import { type MediaState, type MediaStateEventSubscriber } from '@atlaskit/editor-plugin-media/types';
|
|
9
|
-
|
|
10
|
-
isOpen?: boolean;
|
|
11
|
-
mountInfo?: {
|
|
12
|
-
ref: HTMLElement;
|
|
13
|
-
mountPoint: HTMLElement;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
6
|
+
import type { MediaInsertPlugin } from '../mediaInsertPluginType';
|
|
16
7
|
export type InsertMediaSingle = (props: {
|
|
17
8
|
mediaState: MediaState;
|
|
18
9
|
inputMethod: InputMethodInsertMedia;
|
|
19
10
|
}) => boolean;
|
|
20
|
-
export type MediaInsertPlugin = NextEditorPlugin<'mediaInsert', {
|
|
21
|
-
dependencies: [
|
|
22
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
23
|
-
MediaPlugin,
|
|
24
|
-
OptionalPlugin<FeatureFlagsPlugin>
|
|
25
|
-
];
|
|
26
|
-
sharedState: MediaInsertPluginState;
|
|
27
|
-
commands: {
|
|
28
|
-
showMediaInsertPopup: (mountInfo?: {
|
|
29
|
-
ref: HTMLElement;
|
|
30
|
-
mountPoint: HTMLElement;
|
|
31
|
-
}) => EditorCommand;
|
|
32
|
-
};
|
|
33
|
-
}>;
|
|
34
11
|
export type InsertExternalMediaSingle = (props: {
|
|
35
12
|
url: string;
|
|
36
13
|
alt: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { mediaInsertPlugin } from './
|
|
2
|
-
export type { MediaInsertPlugin, MediaInsertPluginState } from './
|
|
1
|
+
export { mediaInsertPlugin } from './mediaInsertPlugin';
|
|
2
|
+
export type { MediaInsertPlugin, MediaInsertPluginState } from './mediaInsertPluginType';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
4
|
+
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
5
|
+
export type MediaInsertPluginState = {
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
mountInfo?: {
|
|
8
|
+
ref: HTMLElement;
|
|
9
|
+
mountPoint: HTMLElement;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type MediaInsertPlugin = NextEditorPlugin<'mediaInsert', {
|
|
13
|
+
dependencies: [
|
|
14
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
15
|
+
MediaPlugin,
|
|
16
|
+
OptionalPlugin<FeatureFlagsPlugin>
|
|
17
|
+
];
|
|
18
|
+
sharedState: MediaInsertPluginState;
|
|
19
|
+
commands: {
|
|
20
|
+
showMediaInsertPopup: (mountInfo?: {
|
|
21
|
+
ref: HTMLElement;
|
|
22
|
+
mountPoint: HTMLElement;
|
|
23
|
+
}) => EditorCommand;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { MediaInsertPluginState } from '../
|
|
2
|
+
import type { MediaInsertPluginState } from '../mediaInsertPluginType';
|
|
3
3
|
export declare const createPlugin: () => SafePlugin<MediaInsertPluginState>;
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Providers } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UiComponentFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
6
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
7
|
-
import type { MediaPlugin } from '@atlaskit/editor-plugin-media';
|
|
8
5
|
import { type MediaState, type MediaStateEventSubscriber } from '@atlaskit/editor-plugin-media/types';
|
|
9
|
-
|
|
10
|
-
isOpen?: boolean;
|
|
11
|
-
mountInfo?: {
|
|
12
|
-
ref: HTMLElement;
|
|
13
|
-
mountPoint: HTMLElement;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
6
|
+
import type { MediaInsertPlugin } from '../mediaInsertPluginType';
|
|
16
7
|
export type InsertMediaSingle = (props: {
|
|
17
8
|
mediaState: MediaState;
|
|
18
9
|
inputMethod: InputMethodInsertMedia;
|
|
19
10
|
}) => boolean;
|
|
20
|
-
export type MediaInsertPlugin = NextEditorPlugin<'mediaInsert', {
|
|
21
|
-
dependencies: [
|
|
22
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
23
|
-
MediaPlugin,
|
|
24
|
-
OptionalPlugin<FeatureFlagsPlugin>
|
|
25
|
-
];
|
|
26
|
-
sharedState: MediaInsertPluginState;
|
|
27
|
-
commands: {
|
|
28
|
-
showMediaInsertPopup: (mountInfo?: {
|
|
29
|
-
ref: HTMLElement;
|
|
30
|
-
mountPoint: HTMLElement;
|
|
31
|
-
}) => EditorCommand;
|
|
32
|
-
};
|
|
33
|
-
}>;
|
|
34
11
|
export type InsertExternalMediaSingle = (props: {
|
|
35
12
|
url: string;
|
|
36
13
|
alt: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media-insert",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.8",
|
|
4
4
|
"description": "Media Insert plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,35 +25,38 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
27
27
|
"@atlaskit/button": "^20.3.0",
|
|
28
|
-
"@atlaskit/editor-common": "^95.
|
|
28
|
+
"@atlaskit/editor-common": "^95.10.0",
|
|
29
29
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
30
30
|
"@atlaskit/editor-plugin-media": "^1.42.0",
|
|
31
|
-
"@atlaskit/editor-prosemirror": "6.
|
|
31
|
+
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
32
32
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
33
|
-
"@atlaskit/form": "^10.
|
|
34
|
-
"@atlaskit/icon": "^
|
|
35
|
-
"@atlaskit/media-card": "^78.
|
|
36
|
-
"@atlaskit/media-client": "^28.
|
|
37
|
-
"@atlaskit/media-client-react": "^2.
|
|
33
|
+
"@atlaskit/form": "^10.6.0",
|
|
34
|
+
"@atlaskit/icon": "^23.0.0",
|
|
35
|
+
"@atlaskit/media-card": "^78.15.0",
|
|
36
|
+
"@atlaskit/media-client": "^28.5.0",
|
|
37
|
+
"@atlaskit/media-client-react": "^2.4.0",
|
|
38
38
|
"@atlaskit/media-picker": "^67.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
40
|
-
"@atlaskit/primitives": "^13.
|
|
41
|
-
"@atlaskit/section-message": "^6.
|
|
40
|
+
"@atlaskit/primitives": "^13.3.0",
|
|
41
|
+
"@atlaskit/section-message": "^6.8.0",
|
|
42
42
|
"@atlaskit/tabs": "^16.5.0",
|
|
43
43
|
"@atlaskit/textfield": "^6.6.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^2.22.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"react": "^16.8.0",
|
|
47
47
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@atlaskit/tokens": "^2.
|
|
50
|
+
"@atlaskit/tokens": "^2.4.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"typescript": "~5.4.2"
|
|
54
54
|
},
|
|
55
55
|
"techstack": {
|
|
56
56
|
"@atlassian/frontend": {
|
|
57
|
+
"code-structure": [
|
|
58
|
+
"editor-plugin"
|
|
59
|
+
],
|
|
57
60
|
"import-structure": [
|
|
58
61
|
"atlassian-conventions"
|
|
59
62
|
],
|
package/dist/types/plugin.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|