@atlaskit/editor-core 187.6.10 → 187.7.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 +16 -0
- package/dist/cjs/plugins/media/pm-plugins/main.js +14 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +10 -0
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +1 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +12 -0
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +3 -0
- package/dist/types/plugins/media/pm-plugins/types.d.ts +13 -11
- package/dist/types/plugins/media/toolbar/index.d.ts +5 -5
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/pm-plugins/main.d.ts +3 -0
- package/dist/types-ts4.5/plugins/media/pm-plugins/types.d.ts +13 -11
- package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +5 -5
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/index.d.ts +3 -3
- package/package.json +3 -3
- package/report.api.md +6 -2
- package/tmp/api-report-tmp.d.ts +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b0277c41c33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b0277c41c33) - ED-19064: Fixed border issue when selecting and deleting header column, and fixed border issue of the column control decoration."
|
|
8
|
+
|
|
9
|
+
## 187.7.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`e83596269e5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e83596269e5) - Add isResizing support into media plugin
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 187.6.10
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.getMediaPluginState = exports.createPlugin = exports.MediaPluginStateImplementation = exports.MEDIA_CONTENT_WRAP_CLASS_NAME = void 0;
|
|
8
|
+
exports.getMediaPluginState = exports.createPlugin = exports.MediaPluginStateImplementation = exports.MEDIA_PLUGIN_IS_RESIZING_KEY = exports.MEDIA_CONTENT_WRAP_CLASS_NAME = void 0;
|
|
9
9
|
Object.defineProperty(exports, "stateKey", {
|
|
10
10
|
enumerable: true,
|
|
11
11
|
get: function get() {
|
|
@@ -50,6 +50,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
50
50
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
51
51
|
var MEDIA_CONTENT_WRAP_CLASS_NAME = 'media-content-wrap';
|
|
52
52
|
exports.MEDIA_CONTENT_WRAP_CLASS_NAME = MEDIA_CONTENT_WRAP_CLASS_NAME;
|
|
53
|
+
var MEDIA_PLUGIN_IS_RESIZING_KEY = 'mediaSinglePlugin.isResizing';
|
|
54
|
+
exports.MEDIA_PLUGIN_IS_RESIZING_KEY = MEDIA_PLUGIN_IS_RESIZING_KEY;
|
|
53
55
|
var createDropPlaceholder = function createDropPlaceholder(intl, allowDropLine) {
|
|
54
56
|
var dropPlaceholder = document.createElement('div');
|
|
55
57
|
var createElement = _react.default.createElement;
|
|
@@ -81,6 +83,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
81
83
|
(0, _defineProperty2.default)(this, "isFullscreen", false);
|
|
82
84
|
(0, _defineProperty2.default)(this, "layout", 'center');
|
|
83
85
|
(0, _defineProperty2.default)(this, "mediaNodes", []);
|
|
86
|
+
(0, _defineProperty2.default)(this, "isResizing", false);
|
|
84
87
|
(0, _defineProperty2.default)(this, "destroyed", false);
|
|
85
88
|
(0, _defineProperty2.default)(this, "removeOnCloseListener", function () {});
|
|
86
89
|
(0, _defineProperty2.default)(this, "onPopupToggleCallback", function () {});
|
|
@@ -491,6 +494,11 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
491
494
|
this.errorReporter = options.errorReporter || new _utils.ErrorReporter();
|
|
492
495
|
}
|
|
493
496
|
(0, _createClass2.default)(MediaPluginStateImplementation, [{
|
|
497
|
+
key: "setIsResizing",
|
|
498
|
+
value: function setIsResizing(isResizing) {
|
|
499
|
+
this.isResizing = isResizing;
|
|
500
|
+
}
|
|
501
|
+
}, {
|
|
494
502
|
key: "updateElement",
|
|
495
503
|
value: function updateElement() {
|
|
496
504
|
var newElement;
|
|
@@ -632,6 +640,11 @@ var createPlugin = function createPlugin(_schema, options, reactContext, getIntl
|
|
|
632
640
|
return new MediaPluginStateImplementation(state, options, mediaOptions, newInsertionBehaviour, dispatch, pluginInjectionApi);
|
|
633
641
|
},
|
|
634
642
|
apply: function apply(tr, pluginState) {
|
|
643
|
+
var isResizing = tr.getMeta(MEDIA_PLUGIN_IS_RESIZING_KEY);
|
|
644
|
+
if (isResizing !== undefined) {
|
|
645
|
+
pluginState.setIsResizing(isResizing);
|
|
646
|
+
}
|
|
647
|
+
|
|
635
648
|
// remap editing media single position if we're in collab
|
|
636
649
|
if (typeof pluginState.editingMediaSinglePos === 'number') {
|
|
637
650
|
pluginState.editingMediaSinglePos = tr.mapping.map(pluginState.editingMediaSinglePos);
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.
|
|
9
|
+
var version = "187.7.1";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -26,6 +26,7 @@ import { MediaTaskManager } from './mediaTaskManager';
|
|
|
26
26
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
27
27
|
export { stateKey } from './plugin-key';
|
|
28
28
|
export const MEDIA_CONTENT_WRAP_CLASS_NAME = 'media-content-wrap';
|
|
29
|
+
export const MEDIA_PLUGIN_IS_RESIZING_KEY = 'mediaSinglePlugin.isResizing';
|
|
29
30
|
const createDropPlaceholder = (intl, allowDropLine) => {
|
|
30
31
|
const dropPlaceholder = document.createElement('div');
|
|
31
32
|
const createElement = React.createElement;
|
|
@@ -54,6 +55,7 @@ export class MediaPluginStateImplementation {
|
|
|
54
55
|
_defineProperty(this, "isFullscreen", false);
|
|
55
56
|
_defineProperty(this, "layout", 'center');
|
|
56
57
|
_defineProperty(this, "mediaNodes", []);
|
|
58
|
+
_defineProperty(this, "isResizing", false);
|
|
57
59
|
_defineProperty(this, "destroyed", false);
|
|
58
60
|
_defineProperty(this, "removeOnCloseListener", () => {});
|
|
59
61
|
_defineProperty(this, "onPopupToggleCallback", () => {});
|
|
@@ -419,6 +421,9 @@ export class MediaPluginStateImplementation {
|
|
|
419
421
|
options.providerFactory.subscribe('contextIdentifierProvider', this.onContextIdentifierProvider);
|
|
420
422
|
this.errorReporter = options.errorReporter || new ErrorReporter();
|
|
421
423
|
}
|
|
424
|
+
setIsResizing(isResizing) {
|
|
425
|
+
this.isResizing = isResizing;
|
|
426
|
+
}
|
|
422
427
|
updateElement() {
|
|
423
428
|
let newElement;
|
|
424
429
|
const selectedContainer = this.selectedMediaContainerNode();
|
|
@@ -520,6 +525,11 @@ export const createPlugin = (_schema, options, reactContext, getIntl, dispatch,
|
|
|
520
525
|
return new MediaPluginStateImplementation(state, options, mediaOptions, newInsertionBehaviour, dispatch, pluginInjectionApi);
|
|
521
526
|
},
|
|
522
527
|
apply(tr, pluginState) {
|
|
528
|
+
const isResizing = tr.getMeta(MEDIA_PLUGIN_IS_RESIZING_KEY);
|
|
529
|
+
if (isResizing !== undefined) {
|
|
530
|
+
pluginState.setIsResizing(isResizing);
|
|
531
|
+
}
|
|
532
|
+
|
|
523
533
|
// remap editing media single position if we're in collab
|
|
524
534
|
if (typeof pluginState.editingMediaSinglePos === 'number') {
|
|
525
535
|
pluginState.editingMediaSinglePos = tr.mapping.map(pluginState.editingMediaSinglePos);
|
|
@@ -5,10 +5,9 @@ import React from 'react';
|
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from 'prosemirror-utils';
|
|
7
7
|
import { getMediaClient } from '@atlaskit/media-client';
|
|
8
|
-
import { calcPctFromPx, calcColumnsFromPx, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
8
|
+
import { calcPctFromPx, calcColumnsFromPx, wrappedLayouts, Resizer, calcMediaPxWidth, snapTo, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { wrapperStyle } from './styled';
|
|
11
|
-
import { Resizer, calcMediaPxWidth, snapTo, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
|
|
12
11
|
import { calculateSnapPoints } from '@atlaskit/editor-common/utils';
|
|
13
12
|
export default class ResizableMediaSingle extends React.Component {
|
|
14
13
|
constructor(...args) {
|
package/dist/es2019/version.json
CHANGED
|
@@ -35,6 +35,7 @@ import { MediaTaskManager } from './mediaTaskManager';
|
|
|
35
35
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
36
36
|
export { stateKey } from './plugin-key';
|
|
37
37
|
export var MEDIA_CONTENT_WRAP_CLASS_NAME = 'media-content-wrap';
|
|
38
|
+
export var MEDIA_PLUGIN_IS_RESIZING_KEY = 'mediaSinglePlugin.isResizing';
|
|
38
39
|
var createDropPlaceholder = function createDropPlaceholder(intl, allowDropLine) {
|
|
39
40
|
var dropPlaceholder = document.createElement('div');
|
|
40
41
|
var createElement = React.createElement;
|
|
@@ -66,6 +67,7 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
66
67
|
_defineProperty(this, "isFullscreen", false);
|
|
67
68
|
_defineProperty(this, "layout", 'center');
|
|
68
69
|
_defineProperty(this, "mediaNodes", []);
|
|
70
|
+
_defineProperty(this, "isResizing", false);
|
|
69
71
|
_defineProperty(this, "destroyed", false);
|
|
70
72
|
_defineProperty(this, "removeOnCloseListener", function () {});
|
|
71
73
|
_defineProperty(this, "onPopupToggleCallback", function () {});
|
|
@@ -476,6 +478,11 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
476
478
|
this.errorReporter = options.errorReporter || new ErrorReporter();
|
|
477
479
|
}
|
|
478
480
|
_createClass(MediaPluginStateImplementation, [{
|
|
481
|
+
key: "setIsResizing",
|
|
482
|
+
value: function setIsResizing(isResizing) {
|
|
483
|
+
this.isResizing = isResizing;
|
|
484
|
+
}
|
|
485
|
+
}, {
|
|
479
486
|
key: "updateElement",
|
|
480
487
|
value: function updateElement() {
|
|
481
488
|
var newElement;
|
|
@@ -615,6 +622,11 @@ export var createPlugin = function createPlugin(_schema, options, reactContext,
|
|
|
615
622
|
return new MediaPluginStateImplementation(state, options, mediaOptions, newInsertionBehaviour, dispatch, pluginInjectionApi);
|
|
616
623
|
},
|
|
617
624
|
apply: function apply(tr, pluginState) {
|
|
625
|
+
var isResizing = tr.getMeta(MEDIA_PLUGIN_IS_RESIZING_KEY);
|
|
626
|
+
if (isResizing !== undefined) {
|
|
627
|
+
pluginState.setIsResizing(isResizing);
|
|
628
|
+
}
|
|
629
|
+
|
|
618
630
|
// remap editing media single position if we're in collab
|
|
619
631
|
if (typeof pluginState.editingMediaSinglePos === 'number') {
|
|
620
632
|
pluginState.editingMediaSinglePos = tr.mapping.map(pluginState.editingMediaSinglePos);
|
|
@@ -15,10 +15,9 @@ import React from 'react';
|
|
|
15
15
|
import { jsx } from '@emotion/react';
|
|
16
16
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from 'prosemirror-utils';
|
|
17
17
|
import { getMediaClient } from '@atlaskit/media-client';
|
|
18
|
-
import { calcPctFromPx, calcColumnsFromPx, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
18
|
+
import { calcPctFromPx, calcColumnsFromPx, wrappedLayouts, Resizer, calcMediaPxWidth, snapTo, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
|
|
19
19
|
import { akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
20
20
|
import { wrapperStyle } from './styled';
|
|
21
|
-
import { Resizer, calcMediaPxWidth, snapTo, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
|
|
22
21
|
import { calculateSnapPoints } from '@atlaskit/editor-common/utils';
|
|
23
22
|
var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
|
|
24
23
|
_inherits(ResizableMediaSingle, _React$Component);
|
package/dist/esm/version.json
CHANGED
|
@@ -19,6 +19,7 @@ import type mediaPlugin from '../index';
|
|
|
19
19
|
export type { MediaState, MediaProvider, MediaStateStatus };
|
|
20
20
|
export { stateKey } from './plugin-key';
|
|
21
21
|
export declare const MEDIA_CONTENT_WRAP_CLASS_NAME = "media-content-wrap";
|
|
22
|
+
export declare const MEDIA_PLUGIN_IS_RESIZING_KEY = "mediaSinglePlugin.isResizing";
|
|
22
23
|
export declare class MediaPluginStateImplementation implements MediaPluginState {
|
|
23
24
|
allowsUploads: boolean;
|
|
24
25
|
mediaClientConfig?: MediaClientConfig;
|
|
@@ -34,6 +35,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
34
35
|
options: MediaPluginOptions;
|
|
35
36
|
mediaProvider?: MediaProvider;
|
|
36
37
|
newInsertionBehaviour?: boolean;
|
|
38
|
+
isResizing: boolean;
|
|
37
39
|
private view;
|
|
38
40
|
private destroyed;
|
|
39
41
|
private contextIdentifierProvider?;
|
|
@@ -55,6 +57,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
55
57
|
onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
56
58
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
57
59
|
getMediaOptions: () => MediaPluginOptions;
|
|
60
|
+
setIsResizing(isResizing: boolean): void;
|
|
58
61
|
updateElement(): void;
|
|
59
62
|
private isMediaSchemaNode;
|
|
60
63
|
private getDomElement;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
2
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
-
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
4
|
-
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import PickerFacade
|
|
10
|
-
import { Dispatch } from '../../../event-dispatcher';
|
|
11
|
-
import { ProsemirrorGetPosHandler } from '../../../nodeviews/types';
|
|
1
|
+
import type { Node as PMNode } from 'prosemirror-model';
|
|
2
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
4
|
+
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import type { MediaOptions, MediaState } from '../types';
|
|
6
|
+
import type { MediaPluginOptions } from '../media-plugin-options';
|
|
7
|
+
import type { EditorView } from 'prosemirror-view';
|
|
8
|
+
import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
9
|
+
import type PickerFacade from '../picker-facade';
|
|
10
|
+
import type { Dispatch } from '../../../event-dispatcher';
|
|
11
|
+
import type { ProsemirrorGetPosHandler } from '../../../nodeviews/types';
|
|
12
12
|
export interface MediaNodeWithPosHandler {
|
|
13
13
|
node: PMNode;
|
|
14
14
|
getPos: ProsemirrorGetPosHandler;
|
|
@@ -32,6 +32,7 @@ export interface MediaPluginState {
|
|
|
32
32
|
editingMediaSinglePos?: number;
|
|
33
33
|
showEditingDialog?: boolean;
|
|
34
34
|
mediaOptions?: MediaOptions;
|
|
35
|
+
isResizing: boolean;
|
|
35
36
|
dispatch?: Dispatch;
|
|
36
37
|
onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
37
38
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
@@ -54,6 +55,7 @@ export interface MediaPluginState {
|
|
|
54
55
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
55
56
|
handleDrag: (dragState: 'enter' | 'leave') => void;
|
|
56
57
|
updateElement(): void;
|
|
58
|
+
setIsResizing(isResizing: boolean): void;
|
|
57
59
|
setView(view: EditorView): void;
|
|
58
60
|
destroy(): void;
|
|
59
61
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
import { IntlShape } from 'react-intl-next';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { IntlShape } from 'react-intl-next';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { FloatingToolbarConfig } from '../../../plugins/floating-toolbar/types';
|
|
5
|
+
import type { MediaFloatingToolbarOptions } from '../types';
|
|
5
6
|
import type mediaPlugin from '../index';
|
|
6
|
-
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
7
|
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
|
-
import { Props } from './types';
|
|
5
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
|
+
import type { Props } from './types';
|
|
8
8
|
type State = {
|
|
9
9
|
offsetLeft: number;
|
|
10
10
|
isVideoFile: boolean;
|
|
@@ -19,6 +19,7 @@ import type mediaPlugin from '../index';
|
|
|
19
19
|
export type { MediaState, MediaProvider, MediaStateStatus };
|
|
20
20
|
export { stateKey } from './plugin-key';
|
|
21
21
|
export declare const MEDIA_CONTENT_WRAP_CLASS_NAME = "media-content-wrap";
|
|
22
|
+
export declare const MEDIA_PLUGIN_IS_RESIZING_KEY = "mediaSinglePlugin.isResizing";
|
|
22
23
|
export declare class MediaPluginStateImplementation implements MediaPluginState {
|
|
23
24
|
allowsUploads: boolean;
|
|
24
25
|
mediaClientConfig?: MediaClientConfig;
|
|
@@ -34,6 +35,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
34
35
|
options: MediaPluginOptions;
|
|
35
36
|
mediaProvider?: MediaProvider;
|
|
36
37
|
newInsertionBehaviour?: boolean;
|
|
38
|
+
isResizing: boolean;
|
|
37
39
|
private view;
|
|
38
40
|
private destroyed;
|
|
39
41
|
private contextIdentifierProvider?;
|
|
@@ -55,6 +57,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
55
57
|
onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
56
58
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
57
59
|
getMediaOptions: () => MediaPluginOptions;
|
|
60
|
+
setIsResizing(isResizing: boolean): void;
|
|
58
61
|
updateElement(): void;
|
|
59
62
|
private isMediaSchemaNode;
|
|
60
63
|
private getDomElement;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
2
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
-
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
4
|
-
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import PickerFacade
|
|
10
|
-
import { Dispatch } from '../../../event-dispatcher';
|
|
11
|
-
import { ProsemirrorGetPosHandler } from '../../../nodeviews/types';
|
|
1
|
+
import type { Node as PMNode } from 'prosemirror-model';
|
|
2
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
4
|
+
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import type { MediaOptions, MediaState } from '../types';
|
|
6
|
+
import type { MediaPluginOptions } from '../media-plugin-options';
|
|
7
|
+
import type { EditorView } from 'prosemirror-view';
|
|
8
|
+
import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
9
|
+
import type PickerFacade from '../picker-facade';
|
|
10
|
+
import type { Dispatch } from '../../../event-dispatcher';
|
|
11
|
+
import type { ProsemirrorGetPosHandler } from '../../../nodeviews/types';
|
|
12
12
|
export interface MediaNodeWithPosHandler {
|
|
13
13
|
node: PMNode;
|
|
14
14
|
getPos: ProsemirrorGetPosHandler;
|
|
@@ -32,6 +32,7 @@ export interface MediaPluginState {
|
|
|
32
32
|
editingMediaSinglePos?: number;
|
|
33
33
|
showEditingDialog?: boolean;
|
|
34
34
|
mediaOptions?: MediaOptions;
|
|
35
|
+
isResizing: boolean;
|
|
35
36
|
dispatch?: Dispatch;
|
|
36
37
|
onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
37
38
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
@@ -54,6 +55,7 @@ export interface MediaPluginState {
|
|
|
54
55
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
55
56
|
handleDrag: (dragState: 'enter' | 'leave') => void;
|
|
56
57
|
updateElement(): void;
|
|
58
|
+
setIsResizing(isResizing: boolean): void;
|
|
57
59
|
setView(view: EditorView): void;
|
|
58
60
|
destroy(): void;
|
|
59
61
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
import { IntlShape } from 'react-intl-next';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { IntlShape } from 'react-intl-next';
|
|
3
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { FloatingToolbarConfig } from '../../../plugins/floating-toolbar/types';
|
|
5
|
+
import type { MediaFloatingToolbarOptions } from '../types';
|
|
5
6
|
import type mediaPlugin from '../index';
|
|
6
|
-
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
7
|
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
|
-
import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
|
-
import { Props } from './types';
|
|
5
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
|
+
import type { Props } from './types';
|
|
8
8
|
type State = {
|
|
9
9
|
offsetLeft: number;
|
|
10
10
|
isVideoFile: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.
|
|
3
|
+
"version": "187.7.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
43
|
-
"@atlaskit/adf-schema": "^26.
|
|
43
|
+
"@atlaskit/adf-schema": "^26.4.0",
|
|
44
44
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
45
45
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
46
46
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/code": "^14.6.0",
|
|
56
56
|
"@atlaskit/date": "^0.10.0",
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
58
|
-
"@atlaskit/editor-common": "^74.
|
|
58
|
+
"@atlaskit/editor-common": "^74.29.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
60
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
package/report.api.md
CHANGED
|
@@ -104,7 +104,7 @@ import { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
104
104
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
105
105
|
import { MediaFeatureFlags as MediaFeatureFlags_2 } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
106
106
|
import { MediaFile } from '@atlaskit/media-picker/types';
|
|
107
|
-
import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
|
|
107
|
+
import type { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
|
|
108
108
|
import type { MentionDescription } from '@atlaskit/mention';
|
|
109
109
|
import { MentionProvider } from '@atlaskit/mention/resource';
|
|
110
110
|
import type { MentionProvider as MentionProvider_2 } from '@atlaskit/mention';
|
|
@@ -142,7 +142,7 @@ import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
|
142
142
|
import type { RefObject } from 'react';
|
|
143
143
|
import { ReplaceRawValue } from '@atlaskit/editor-common/types';
|
|
144
144
|
import type { ResolvedEditorState } from '@atlaskit/collab-provider';
|
|
145
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
145
|
+
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
146
146
|
import type { Schema } from 'prosemirror-model';
|
|
147
147
|
import type { SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
148
148
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
@@ -1496,6 +1496,8 @@ interface MediaPluginState {
|
|
|
1496
1496
|
// (undocumented)
|
|
1497
1497
|
isFullscreen: boolean;
|
|
1498
1498
|
// (undocumented)
|
|
1499
|
+
isResizing: boolean;
|
|
1500
|
+
// (undocumented)
|
|
1499
1501
|
layout: RichMediaLayout;
|
|
1500
1502
|
// (undocumented)
|
|
1501
1503
|
mediaClientConfig?: MediaClientConfig;
|
|
@@ -1527,6 +1529,8 @@ interface MediaPluginState {
|
|
|
1527
1529
|
// (undocumented)
|
|
1528
1530
|
setBrowseFn: (browseFn: () => void) => void;
|
|
1529
1531
|
// (undocumented)
|
|
1532
|
+
setIsResizing(isResizing: boolean): void;
|
|
1533
|
+
// (undocumented)
|
|
1530
1534
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider_2>) => Promise<void>;
|
|
1531
1535
|
// (undocumented)
|
|
1532
1536
|
setView(view: EditorView): void;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ import { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
93
93
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
94
94
|
import { MediaFeatureFlags as MediaFeatureFlags_2 } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
95
95
|
import { MediaFile } from '@atlaskit/media-picker/types';
|
|
96
|
-
import { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
|
|
96
|
+
import type { MediaProvider as MediaProvider_2 } from '@atlaskit/editor-common/provider-factory';
|
|
97
97
|
import type { MentionDescription } from '@atlaskit/mention';
|
|
98
98
|
import { MentionProvider } from '@atlaskit/mention/resource';
|
|
99
99
|
import type { MentionProvider as MentionProvider_2 } from '@atlaskit/mention';
|
|
@@ -131,7 +131,7 @@ import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
|
131
131
|
import type { RefObject } from 'react';
|
|
132
132
|
import { ReplaceRawValue } from '@atlaskit/editor-common/types';
|
|
133
133
|
import type { ResolvedEditorState } from '@atlaskit/collab-provider';
|
|
134
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
134
|
+
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
135
135
|
import type { Schema } from 'prosemirror-model';
|
|
136
136
|
import type { SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
137
137
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
@@ -1347,6 +1347,8 @@ interface MediaPluginState {
|
|
|
1347
1347
|
// (undocumented)
|
|
1348
1348
|
isFullscreen: boolean;
|
|
1349
1349
|
// (undocumented)
|
|
1350
|
+
isResizing: boolean;
|
|
1351
|
+
// (undocumented)
|
|
1350
1352
|
layout: RichMediaLayout;
|
|
1351
1353
|
// (undocumented)
|
|
1352
1354
|
mediaClientConfig?: MediaClientConfig;
|
|
@@ -1375,6 +1377,8 @@ interface MediaPluginState {
|
|
|
1375
1377
|
// (undocumented)
|
|
1376
1378
|
setBrowseFn: (browseFn: () => void) => void;
|
|
1377
1379
|
// (undocumented)
|
|
1380
|
+
setIsResizing(isResizing: boolean): void;
|
|
1381
|
+
// (undocumented)
|
|
1378
1382
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider_2>) => Promise<void>;
|
|
1379
1383
|
// (undocumented)
|
|
1380
1384
|
setView(view: EditorView): void;
|