@atlaskit/editor-plugin-media 9.9.1 → 10.0.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 +12 -0
- package/dist/cjs/nodeviews/mediaGroupNext.js +1 -0
- package/dist/cjs/nodeviews/mediaInline.js +1 -1
- package/dist/cjs/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/cjs/nodeviews/mediaSingle.js +2 -1
- package/dist/cjs/nodeviews/mediaSingleNext.js +1 -1
- package/dist/cjs/nodeviews/styles.js +1 -1
- package/dist/cjs/pm-plugins/alt-text/index.js +15 -13
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
- package/dist/cjs/pm-plugins/linking/index.js +2 -2
- package/dist/cjs/pm-plugins/pixel-resizing/index.js +12 -10
- package/dist/cjs/pm-plugins/pixel-resizing/ui/index.js +1 -1
- package/dist/cjs/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
- package/dist/cjs/ui/ImageBorder/index.js +1 -1
- package/dist/cjs/ui/Media/DropPlaceholder.js +1 -1
- package/dist/cjs/ui/MediaLinkingToolbar.js +1 -1
- package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/cjs/ui/ToolbarMedia/index.js +4 -1
- package/dist/cjs/ui/toolbar/layout-group.js +1 -1
- package/dist/cjs/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/es2019/nodeviews/mediaGroupNext.js +1 -0
- package/dist/es2019/nodeviews/mediaInline.js +1 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/es2019/nodeviews/mediaSingle.js +2 -1
- package/dist/es2019/nodeviews/mediaSingleNext.js +1 -1
- package/dist/es2019/nodeviews/styles.js +1 -1
- package/dist/es2019/pm-plugins/alt-text/index.js +5 -5
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
- package/dist/es2019/pm-plugins/linking/index.js +2 -4
- package/dist/es2019/pm-plugins/pixel-resizing/index.js +5 -5
- package/dist/es2019/pm-plugins/pixel-resizing/ui/index.js +1 -1
- package/dist/es2019/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
- package/dist/es2019/ui/ImageBorder/index.js +1 -1
- package/dist/es2019/ui/Media/DropPlaceholder.js +1 -1
- package/dist/es2019/ui/MediaLinkingToolbar.js +1 -1
- package/dist/es2019/ui/MediaPicker/PickerFacadeProvider.js +1 -0
- package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/es2019/ui/ToolbarMedia/index.js +4 -1
- package/dist/es2019/ui/toolbar/layout-group.js +1 -1
- package/dist/es2019/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/esm/nodeviews/mediaGroupNext.js +1 -0
- package/dist/esm/nodeviews/mediaInline.js +1 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/esm/nodeviews/mediaSingle.js +2 -1
- package/dist/esm/nodeviews/mediaSingleNext.js +1 -1
- package/dist/esm/nodeviews/styles.js +1 -1
- package/dist/esm/pm-plugins/alt-text/index.js +14 -13
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
- package/dist/esm/pm-plugins/linking/index.js +2 -3
- package/dist/esm/pm-plugins/pixel-resizing/index.js +11 -10
- package/dist/esm/pm-plugins/pixel-resizing/ui/index.js +1 -1
- package/dist/esm/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
- package/dist/esm/ui/ImageBorder/index.js +1 -1
- package/dist/esm/ui/Media/DropPlaceholder.js +1 -1
- package/dist/esm/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/esm/ui/ToolbarMedia/index.js +4 -1
- package/dist/esm/ui/toolbar/layout-group.js +1 -1
- package/dist/esm/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/types/nodeviews/lazy-media-group.d.ts +3 -2
- package/dist/types/nodeviews/lazy-media-inline.d.ts +2 -1
- package/dist/types/nodeviews/mediaGroup.d.ts +2 -2
- package/dist/types/nodeviews/mediaGroupNext.d.ts +2 -2
- package/dist/types/nodeviews/mediaNodeView/index.d.ts +2 -2
- package/dist/types/nodeviews/mediaNodeView/media.d.ts +2 -2
- package/dist/types/nodeviews/mediaSingle.d.ts +2 -1
- package/dist/types/nodeviews/toDOM-fixes/media.d.ts +18 -17
- package/dist/types/nodeviews/toDOM-fixes/mediaGroup.d.ts +7 -6
- package/dist/types/nodeviews/toDOM-fixes/mediaInline.d.ts +18 -17
- package/dist/types/pm-plugins/alt-text/commands.d.ts +5 -4
- package/dist/types/pm-plugins/alt-text/index.d.ts +7 -3
- package/dist/types/pm-plugins/alt-text/ui/AltTextEdit.d.ts +2 -2
- package/dist/types/pm-plugins/linking/index.d.ts +4 -1
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/pm-plugins/picker-facade.d.ts +2 -7
- package/dist/types/pm-plugins/pixel-resizing/commands.d.ts +4 -3
- package/dist/types/pm-plugins/pixel-resizing/index.d.ts +7 -5
- package/dist/types/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
- package/dist/types/pm-plugins/utils/media-single.d.ts +2 -1
- package/dist/types/ui/ImageBorder/styles.d.ts +10 -9
- package/dist/types/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types/ui/ResizableMediaSingle/index.d.ts +3 -2
- package/dist/types/ui/ResizableMediaSingle/styled.d.ts +2 -1
- package/dist/types/ui/ToolbarMedia/index.d.ts +3 -3
- package/dist/types/ui/hooks/useMediaProvider.d.ts +2 -1
- package/dist/types/ui/toolbar/commands.d.ts +2 -2
- package/dist/types/ui/toolbar/utils.d.ts +4 -3
- package/dist/types-ts4.5/nodeviews/lazy-media-group.d.ts +3 -2
- package/dist/types-ts4.5/nodeviews/lazy-media-inline.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaNodeView/media.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/media.d.ts +18 -17
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +7 -6
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaInline.d.ts +18 -17
- package/dist/types-ts4.5/pm-plugins/alt-text/commands.d.ts +5 -4
- package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +7 -3
- package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +4 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/picker-facade.d.ts +2 -7
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/commands.d.ts +4 -3
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/index.d.ts +7 -5
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +2 -1
- package/dist/types-ts4.5/ui/ImageBorder/styles.d.ts +10 -9
- package/dist/types-ts4.5/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/ResizableMediaSingle/styled.d.ts +2 -1
- package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/hooks/useMediaProvider.d.ts +2 -1
- package/dist/types-ts4.5/ui/toolbar/commands.d.ts +2 -2
- package/dist/types-ts4.5/ui/toolbar/utils.d.ts +4 -3
- package/package.json +18 -18
|
@@ -15,12 +15,13 @@ function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prot
|
|
|
15
15
|
*/
|
|
16
16
|
import { useCallback, useMemo } from 'react';
|
|
17
17
|
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
19
19
|
import { jsx } from '@emotion/react';
|
|
20
20
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
21
21
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
22
22
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
23
23
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
24
25
|
import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
25
26
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
26
27
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
@@ -11,7 +11,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
11
11
|
*/
|
|
12
12
|
import React, { Fragment } from 'react';
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
17
17
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { MediaBorderGapFiller } from '@atlaskit/editor-common/ui';
|
|
10
10
|
export var MediaSingleNodeSelector = 'media-single-node';
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { pluginFactory, pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
3
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import reducer from './reducer';
|
|
5
6
|
var pluginKey = new PluginKey('mediaAltTextPlugin');
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
return {
|
|
13
|
-
isAltTextEditorOpen: false
|
|
14
|
-
};
|
|
7
|
+
var dest = pluginFactory(pluginKey, reducer, {
|
|
8
|
+
onSelectionChanged: function onSelectionChanged(tr, newState) {
|
|
9
|
+
// dont close alt text for undo/redo transactions (if it comes from prosemirror-history)
|
|
10
|
+
if (tr.getMeta(pmHistoryPluginKey)) {
|
|
11
|
+
return newState;
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
return {
|
|
14
|
+
isAltTextEditorOpen: false
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var createPluginState = dest.createPluginState;
|
|
19
|
+
var createCommand = dest.createCommand;
|
|
20
|
+
var getPluginState = dest.getPluginState;
|
|
20
21
|
export var createPlugin = function createPlugin(_ref) {
|
|
21
22
|
var dispatch = _ref.dispatch,
|
|
22
23
|
providerFactory = _ref.providerFactory;
|
|
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
13
13
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
17
17
|
import { css, jsx } from '@emotion/react';
|
|
18
18
|
import { injectIntl } from 'react-intl-next';
|
|
19
19
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -273,4 +273,5 @@ export var AltTextEditComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
273
273
|
}
|
|
274
274
|
}]);
|
|
275
275
|
}(React.Component);
|
|
276
|
-
|
|
276
|
+
var _default_1 = withAnalyticsEvents()(injectIntl(AltTextEditComponent));
|
|
277
|
+
export default _default_1;
|
|
@@ -49,9 +49,8 @@ var mediaLinkingPluginFactory = pluginFactory(mediaLinkingPluginKey, reducer, {
|
|
|
49
49
|
mapping: mapping,
|
|
50
50
|
onSelectionChanged: onSelectionChanged
|
|
51
51
|
});
|
|
52
|
-
var createMediaLinkingCommand = mediaLinkingPluginFactory.createCommand
|
|
53
|
-
|
|
54
|
-
export { createMediaLinkingCommand, getMediaLinkingState };
|
|
52
|
+
export var createMediaLinkingCommand = mediaLinkingPluginFactory.createCommand;
|
|
53
|
+
export var getMediaLinkingState = mediaLinkingPluginFactory.getPluginState;
|
|
55
54
|
export default (function (dispatch) {
|
|
56
55
|
return new SafePlugin({
|
|
57
56
|
key: mediaLinkingPluginKey,
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
3
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import reducer from './reducer';
|
|
5
6
|
var pluginKey = new PluginKey('mediaPixelResizingPlugin');
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
var dest = pluginFactory(pluginKey, reducer, {
|
|
8
|
+
onSelectionChanged: function onSelectionChanged() {
|
|
9
|
+
return {
|
|
10
|
+
isPixelEditorOpen: false
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
var createPluginState = dest.createPluginState;
|
|
15
|
+
var createCommand = dest.createCommand;
|
|
16
|
+
var getPluginState = dest.getPluginState;
|
|
16
17
|
export var createPlugin = function createPlugin(_ref) {
|
|
17
18
|
var dispatch = _ref.dispatch;
|
|
18
19
|
return new SafePlugin({
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
*/
|
|
8
8
|
import { useCallback } from 'react';
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
11
11
|
import { jsx } from '@emotion/react';
|
|
12
12
|
import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
|
|
13
13
|
import { calcMinWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
6
6
|
* @jsx jsx
|
|
7
7
|
*/
|
|
8
8
|
import { useCallback, useEffect, useMemo, useState, useRef, Fragment } from 'react';
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
10
10
|
import { jsx, css } from '@emotion/react';
|
|
11
11
|
import Button from '@atlaskit/button';
|
|
12
12
|
import { IconButton } from '@atlaskit/button/new';
|
|
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
5
5
|
*/
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { imageBorderMessages as messages } from '@atlaskit/editor-common/media';
|
|
11
11
|
import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
8
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
@@ -12,7 +12,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
12
12
|
*/
|
|
13
13
|
import React, { Fragment } from 'react';
|
|
14
14
|
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
16
16
|
import { css, jsx } from '@emotion/react';
|
|
17
17
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
18
18
|
import { container, containerWithProvider, inputWrapper, RecentSearch } from '@atlaskit/editor-common/link';
|
|
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { Fragment, useEffect, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { resizableMediaMigrationNotificationStyle } from './styles';
|
|
8
8
|
export var ResizableMediaMigrationNotification = function ResizableMediaMigrationNotification() {
|
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
6
6
|
*/
|
|
7
7
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
10
10
|
import { jsx } from '@emotion/react';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import throttle from 'lodash/throttle';
|
|
@@ -15,7 +15,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
15
15
|
*/
|
|
16
16
|
import React from 'react';
|
|
17
17
|
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
19
19
|
import { jsx } from '@emotion/react';
|
|
20
20
|
import { calculateOffsetLeft } from '@atlaskit/editor-common/media-single';
|
|
21
21
|
import { calcColumnsFromPx, calcMediaPxWidth, calcPctFromPx, handleSides, imageAlignmentMap, Resizer, snapTo, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { ButtonGroup } from '@atlaskit/button';
|
|
8
8
|
import { FloatingToolbarButton as Button, FloatingToolbarSeparator } from '@atlaskit/editor-common/ui';
|
|
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { Fragment, useEffect, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
11
11
|
import { addLink, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
3
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
3
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
6
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
6
|
-
import type {
|
|
7
|
-
export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options:
|
|
7
|
+
import type { MediaPluginOptions } from '../types';
|
|
8
|
+
export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
|
+
import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
4
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
6
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
7
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
7
|
-
export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) =>
|
|
8
|
+
export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => NodeViewConstructor;
|
|
@@ -5,5 +5,5 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
8
|
-
import type { getPosHandler,
|
|
9
|
-
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions:
|
|
8
|
+
import type { getPosHandler, MediaPluginOptions } from '../types';
|
|
9
|
+
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { MediaOptions } from '../types';
|
|
7
|
-
export declare const MediaGroupNext: React.FC<
|
|
7
|
+
export declare const MediaGroupNext: React.FC<WithIntlProps<{
|
|
8
8
|
allowLazyLoading?: boolean;
|
|
9
9
|
anchorPos: number;
|
|
10
10
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
@@ -9,7 +9,7 @@ import type { SharedInteractionState } from '@atlaskit/editor-plugin-interaction
|
|
|
9
9
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
10
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
12
|
-
import type { getPosHandler, getPosHandlerNode, MediaOptions } from '../../types';
|
|
12
|
+
import type { getPosHandler, getPosHandlerNode, MediaOptions, MediaPluginOptions } from '../../types';
|
|
13
13
|
import type { MediaNodeViewProps } from '../types';
|
|
14
14
|
interface MediaNodeWithPluginStateComponentProps {
|
|
15
15
|
interactionState?: SharedInteractionState['interactionState'];
|
|
@@ -41,5 +41,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
41
41
|
render(): React.JSX.Element;
|
|
42
42
|
destroy(): void;
|
|
43
43
|
}
|
|
44
|
-
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions:
|
|
44
|
+
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
|
|
45
45
|
export {};
|
|
@@ -59,5 +59,5 @@ export declare class MediaNode extends Component<MediaNodeProps, MediaNodeState>
|
|
|
59
59
|
private onFullscreenChange;
|
|
60
60
|
private handleNewNode;
|
|
61
61
|
}
|
|
62
|
-
declare const
|
|
63
|
-
export default
|
|
62
|
+
declare const _default_1: React.ComponentClass<MediaNodeProps & ImageLoaderProps>;
|
|
63
|
+
export default _default_1;
|
|
@@ -5,6 +5,7 @@ import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
7
7
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
+
import { SelectedState } from '@atlaskit/editor-common/utils';
|
|
8
9
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
9
10
|
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
11
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
@@ -23,7 +24,7 @@ declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps
|
|
|
23
24
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
24
25
|
subscribeToViewModeChange(domRef: HTMLElement): (() => void) | undefined;
|
|
25
26
|
updateDomRefContentEditable(domRef: HTMLElement, editorViewMode?: 'edit' | 'view'): void;
|
|
26
|
-
checkAndUpdateSelectionType: () =>
|
|
27
|
+
checkAndUpdateSelectionType: () => SelectedState | null;
|
|
27
28
|
isNodeSelected: () => boolean;
|
|
28
29
|
getNodeMediaId(node: PMNode): string | undefined;
|
|
29
30
|
stopEvent(event: Event): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
3
|
/**
|
|
3
4
|
* Duplicate consts from `media-card`.
|
|
4
5
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -15,29 +16,29 @@ export declare const defaultImageCardDimensions: {
|
|
|
15
16
|
height: number;
|
|
16
17
|
};
|
|
17
18
|
export declare const mediaSpecWithFixedToDOM: () => {
|
|
18
|
-
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
19
|
-
content?: string;
|
|
20
|
-
marks?: string;
|
|
21
|
-
group?: string;
|
|
22
|
-
inline?: boolean;
|
|
23
19
|
atom?: boolean;
|
|
24
20
|
attrs?: {
|
|
25
|
-
[name: string]:
|
|
21
|
+
[name: string]: AttributeSpec;
|
|
26
22
|
};
|
|
27
|
-
selectable?: boolean;
|
|
28
|
-
draggable?: boolean;
|
|
29
23
|
code?: boolean;
|
|
30
|
-
|
|
24
|
+
content?: string;
|
|
25
|
+
defining?: boolean;
|
|
31
26
|
definingAsContext?: boolean;
|
|
32
27
|
definingForContent?: boolean;
|
|
33
|
-
|
|
28
|
+
disableDropCursor?: boolean | ((view: EditorView, pos: {
|
|
29
|
+
inside: number;
|
|
30
|
+
pos: number;
|
|
31
|
+
}, event: DragEvent) => boolean);
|
|
32
|
+
draggable?: boolean;
|
|
33
|
+
group?: string;
|
|
34
|
+
inline?: boolean;
|
|
34
35
|
isolating?: boolean;
|
|
35
|
-
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
36
|
-
toDebugString?: (node: PMNode) => string;
|
|
37
36
|
leafText?: (node: PMNode) => string;
|
|
38
37
|
linebreakReplacement?: boolean;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
marks?: string;
|
|
39
|
+
parseDOM?: readonly TagParseRule[];
|
|
40
|
+
selectable?: boolean;
|
|
41
|
+
toDebugString?: (node: PMNode) => string;
|
|
42
|
+
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
43
|
+
whitespace?: "pre" | "normal";
|
|
43
44
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DOMOutputSpec } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { AttributeSpec, DOMOutputSpec, Node, TagParseRule } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
3
|
/**
|
|
3
4
|
* Duplicate consts from `media-card`.
|
|
4
5
|
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
@@ -42,7 +43,7 @@ export declare const mediaGroupSpecWithFixedToDOM: () => {
|
|
|
42
43
|
inline?: boolean;
|
|
43
44
|
atom?: boolean;
|
|
44
45
|
attrs?: {
|
|
45
|
-
[name: string]:
|
|
46
|
+
[name: string]: AttributeSpec;
|
|
46
47
|
};
|
|
47
48
|
selectable?: boolean;
|
|
48
49
|
draggable?: boolean;
|
|
@@ -52,11 +53,11 @@ export declare const mediaGroupSpecWithFixedToDOM: () => {
|
|
|
52
53
|
definingForContent?: boolean;
|
|
53
54
|
defining?: boolean;
|
|
54
55
|
isolating?: boolean;
|
|
55
|
-
parseDOM?: readonly
|
|
56
|
-
toDebugString?: (node:
|
|
57
|
-
leafText?: (node:
|
|
56
|
+
parseDOM?: readonly TagParseRule[];
|
|
57
|
+
toDebugString?: (node: Node) => string;
|
|
58
|
+
leafText?: (node: Node) => string;
|
|
58
59
|
linebreakReplacement?: boolean;
|
|
59
|
-
disableDropCursor?: boolean | ((view:
|
|
60
|
+
disableDropCursor?: boolean | ((view: EditorView, pos: {
|
|
60
61
|
pos: number;
|
|
61
62
|
inside: number;
|
|
62
63
|
}, event: DragEvent) => boolean);
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
3
|
export declare const mediaInlineSpecWithFixedToDOM: () => {
|
|
3
|
-
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
4
|
-
content?: string;
|
|
5
|
-
marks?: string;
|
|
6
|
-
group?: string;
|
|
7
|
-
inline?: boolean;
|
|
8
4
|
atom?: boolean;
|
|
9
5
|
attrs?: {
|
|
10
|
-
[name: string]:
|
|
6
|
+
[name: string]: AttributeSpec;
|
|
11
7
|
};
|
|
12
|
-
selectable?: boolean;
|
|
13
|
-
draggable?: boolean;
|
|
14
8
|
code?: boolean;
|
|
15
|
-
|
|
9
|
+
content?: string;
|
|
10
|
+
defining?: boolean;
|
|
16
11
|
definingAsContext?: boolean;
|
|
17
12
|
definingForContent?: boolean;
|
|
18
|
-
|
|
13
|
+
disableDropCursor?: boolean | ((view: EditorView, pos: {
|
|
14
|
+
inside: number;
|
|
15
|
+
pos: number;
|
|
16
|
+
}, event: DragEvent) => boolean);
|
|
17
|
+
draggable?: boolean;
|
|
18
|
+
group?: string;
|
|
19
|
+
inline?: boolean;
|
|
19
20
|
isolating?: boolean;
|
|
20
|
-
parseDOM?: readonly import("prosemirror-model").TagParseRule[];
|
|
21
|
-
toDebugString?: (node: PMNode) => string;
|
|
22
21
|
leafText?: (node: PMNode) => string;
|
|
23
22
|
linebreakReplacement?: boolean;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
marks?: string;
|
|
24
|
+
parseDOM?: readonly TagParseRule[];
|
|
25
|
+
selectable?: boolean;
|
|
26
|
+
toDebugString?: (node: PMNode) => string;
|
|
27
|
+
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
28
|
+
whitespace?: "pre" | "normal";
|
|
28
29
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
export declare const closeMediaAltTextMenuAndSave: (altText?: string) => Command;
|
|
4
|
+
export declare const closeMediaAltTextMenu: Command;
|
|
5
|
+
export declare const openMediaAltTextMenu: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
6
|
+
export declare const updateAltText: (newAltText: string) => Command;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { Command, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { MediaAltTextAction } from './actions';
|
|
5
|
+
import type { MediaAltTextState } from './types';
|
|
6
|
+
declare const createCommand: <A = MediaAltTextAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
7
|
+
declare const getPluginState: (state: EditorState) => MediaAltTextState;
|
|
8
|
+
export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<MediaAltTextState>;
|
|
5
9
|
export { createCommand, getPluginState };
|
|
@@ -41,7 +41,7 @@ export declare class AltTextEditComponent extends React.Component<Props, AltText
|
|
|
41
41
|
private handleOnBlur;
|
|
42
42
|
private handleClearText;
|
|
43
43
|
}
|
|
44
|
-
declare const
|
|
44
|
+
declare const _default_1: React.ForwardRefExoticComponent<Omit<Omit<Props, 'intl'> & {
|
|
45
45
|
forwardedRef?: React.Ref<any>;
|
|
46
46
|
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
47
|
-
export default
|
|
47
|
+
export default _default_1;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
6
|
import type { MediaLinkingActions } from './actions';
|
|
5
7
|
import type { MediaLinkingState } from './types';
|
|
6
8
|
export declare const mediaLinkingPluginKey: PluginKey<MediaLinkingState>;
|
|
7
|
-
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<
|
|
9
|
+
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
10
|
+
export declare const getMediaLinkingState: (state: EditorState) => MediaLinkingState;
|
|
8
11
|
declare const _default: (dispatch: Dispatch) => SafePlugin<MediaLinkingState>;
|
|
9
12
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
|
|
|
3
3
|
import type { InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
5
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
6
|
-
import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
8
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -75,7 +75,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
75
75
|
updateElement(): void;
|
|
76
76
|
private isMediaSchemaNode;
|
|
77
77
|
private getDomElement;
|
|
78
|
-
get contextIdentifierProvider():
|
|
78
|
+
get contextIdentifierProvider(): ContextIdentifierProvider | undefined;
|
|
79
79
|
onNodeInserted: (id: string, selectionPosition: number) => void;
|
|
80
80
|
/**
|
|
81
81
|
* we insert a new file by inserting a initial state for that file.
|
|
@@ -4,11 +4,6 @@ import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
4
4
|
import type { UploadEndEventPayload, UploadErrorEventPayload, UploadParams, UploadPreviewUpdateEventPayload } from '@atlaskit/media-picker/types';
|
|
5
5
|
import type { CustomMediaPicker, MediaState, MediaStateEventSubscriber, MobileUploadEndEventPayload } from '../types';
|
|
6
6
|
type PickerType = 'clipboard' | 'dropzone' | 'customMediaPicker';
|
|
7
|
-
type ExtendedComponentConfigs = {
|
|
8
|
-
clipboard: null;
|
|
9
|
-
customMediaPicker: CustomMediaPicker;
|
|
10
|
-
dropzone: null;
|
|
11
|
-
};
|
|
12
7
|
export type PickerFacadeConfig = {
|
|
13
8
|
errorReporter: ErrorReportingHandler;
|
|
14
9
|
featureFlags?: MediaFeatureFlags;
|
|
@@ -17,7 +12,7 @@ export type PickerFacadeConfig = {
|
|
|
17
12
|
type NewMediaEvent = (state: MediaState, onStateChanged: MediaStateEventSubscriber, pickerType?: string) => void;
|
|
18
13
|
export default class PickerFacade {
|
|
19
14
|
readonly config: PickerFacadeConfig;
|
|
20
|
-
readonly pickerConfig?:
|
|
15
|
+
readonly pickerConfig?: CustomMediaPicker | null | undefined;
|
|
21
16
|
private picker?;
|
|
22
17
|
private onDragListeners;
|
|
23
18
|
private pickerType;
|
|
@@ -25,7 +20,7 @@ export default class PickerFacade {
|
|
|
25
20
|
private eventListeners;
|
|
26
21
|
private analyticsName;
|
|
27
22
|
erroredFiles: Set<string>;
|
|
28
|
-
constructor(pickerType: PickerType, config: PickerFacadeConfig, pickerConfig?:
|
|
23
|
+
constructor(pickerType: PickerType, config: PickerFacadeConfig, pickerConfig?: CustomMediaPicker | null | undefined, analyticsName?: string);
|
|
29
24
|
init(): Promise<PickerFacade>;
|
|
30
25
|
get type(): PickerType;
|
|
31
26
|
get mediaPicker(): CustomMediaPicker | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
1
2
|
import { type Transaction, type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const openPixelEditor: () =>
|
|
3
|
-
export declare const closePixelEditor: () =>
|
|
4
|
-
export declare const closePixelEditorAndSave: (saveTransform: (tr: Transaction, state: EditorState) => Transaction) =>
|
|
3
|
+
export declare const openPixelEditor: () => Command;
|
|
4
|
+
export declare const closePixelEditor: () => Command;
|
|
5
|
+
export declare const closePixelEditorAndSave: (saveTransform: (tr: Transaction, state: EditorState) => Transaction) => Command;
|