@atlaskit/editor-plugin-media 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 0.3.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42899](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42899) [`4b3e40bff6f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4b3e40bff6f) - Added a new media plugin state `allowInlineImages` to support upcoming feature development.
|
|
8
|
+
|
|
3
9
|
## 0.3.13
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -31,6 +31,7 @@ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
|
31
31
|
var _view2 = require("@atlaskit/editor-prosemirror/view");
|
|
32
32
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
33
33
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
34
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
34
35
|
var _helpers = _interopRequireWildcard(require("../commands/helpers"));
|
|
35
36
|
var helpers = _helpers;
|
|
36
37
|
var _pickerFacade = _interopRequireDefault(require("../picker-facade"));
|
|
@@ -81,6 +82,7 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
81
82
|
(0, _defineProperty2.default)(this, "mediaNodes", []);
|
|
82
83
|
(0, _defineProperty2.default)(this, "isResizing", false);
|
|
83
84
|
(0, _defineProperty2.default)(this, "resizingWidth", 0);
|
|
85
|
+
(0, _defineProperty2.default)(this, "allowInlineImages", false);
|
|
84
86
|
(0, _defineProperty2.default)(this, "destroyed", false);
|
|
85
87
|
(0, _defineProperty2.default)(this, "removeOnCloseListener", function () {});
|
|
86
88
|
(0, _defineProperty2.default)(this, "onPopupToggleCallback", function () {});
|
|
@@ -492,6 +494,9 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
492
494
|
return _this.setMediaProvider(provider);
|
|
493
495
|
});
|
|
494
496
|
options.providerFactory.subscribe('contextIdentifierProvider', this.onContextIdentifierProvider);
|
|
497
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.inline-image.base-support')) {
|
|
498
|
+
this.allowInlineImages = true;
|
|
499
|
+
}
|
|
495
500
|
this.errorReporter = options.errorReporter || new _utils.ErrorReporter();
|
|
496
501
|
this.singletonCreatedAt = (performance || Date).now();
|
|
497
502
|
}
|
|
@@ -13,6 +13,7 @@ import { findDomRefAtPos, findParentNodeOfType, findSelectedNodeOfType, isNodeSe
|
|
|
13
13
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
14
14
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
15
15
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
16
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
import * as helpers from '../commands/helpers';
|
|
17
18
|
import { updateMediaSingleNodeAttrs } from '../commands/helpers';
|
|
18
19
|
import PickerFacade from '../picker-facade';
|
|
@@ -55,6 +56,7 @@ export class MediaPluginStateImplementation {
|
|
|
55
56
|
_defineProperty(this, "mediaNodes", []);
|
|
56
57
|
_defineProperty(this, "isResizing", false);
|
|
57
58
|
_defineProperty(this, "resizingWidth", 0);
|
|
59
|
+
_defineProperty(this, "allowInlineImages", false);
|
|
58
60
|
_defineProperty(this, "destroyed", false);
|
|
59
61
|
_defineProperty(this, "removeOnCloseListener", () => {});
|
|
60
62
|
_defineProperty(this, "onPopupToggleCallback", () => {});
|
|
@@ -422,6 +424,9 @@ export class MediaPluginStateImplementation {
|
|
|
422
424
|
assert(nodes.media && (nodes.mediaGroup || nodes.mediaSingle), 'Editor: unable to init media plugin - media or mediaGroup/mediaSingle node absent in schema');
|
|
423
425
|
options.providerFactory.subscribe('mediaProvider', (_name, provider) => this.setMediaProvider(provider));
|
|
424
426
|
options.providerFactory.subscribe('contextIdentifierProvider', this.onContextIdentifierProvider);
|
|
427
|
+
if (getBooleanFF('platform.editor.media.inline-image.base-support')) {
|
|
428
|
+
this.allowInlineImages = true;
|
|
429
|
+
}
|
|
425
430
|
this.errorReporter = options.errorReporter || new ErrorReporter();
|
|
426
431
|
this.singletonCreatedAt = (performance || Date).now();
|
|
427
432
|
}
|
|
@@ -22,6 +22,7 @@ import { findDomRefAtPos, findParentNodeOfType, findSelectedNodeOfType, isNodeSe
|
|
|
22
22
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
23
23
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
24
24
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
25
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
25
26
|
import * as helpers from '../commands/helpers';
|
|
26
27
|
import { updateMediaSingleNodeAttrs } from '../commands/helpers';
|
|
27
28
|
import PickerFacade from '../picker-facade';
|
|
@@ -66,6 +67,7 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
66
67
|
_defineProperty(this, "mediaNodes", []);
|
|
67
68
|
_defineProperty(this, "isResizing", false);
|
|
68
69
|
_defineProperty(this, "resizingWidth", 0);
|
|
70
|
+
_defineProperty(this, "allowInlineImages", false);
|
|
69
71
|
_defineProperty(this, "destroyed", false);
|
|
70
72
|
_defineProperty(this, "removeOnCloseListener", function () {});
|
|
71
73
|
_defineProperty(this, "onPopupToggleCallback", function () {});
|
|
@@ -477,6 +479,9 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
477
479
|
return _this.setMediaProvider(provider);
|
|
478
480
|
});
|
|
479
481
|
options.providerFactory.subscribe('contextIdentifierProvider', this.onContextIdentifierProvider);
|
|
482
|
+
if (getBooleanFF('platform.editor.media.inline-image.base-support')) {
|
|
483
|
+
this.allowInlineImages = true;
|
|
484
|
+
}
|
|
480
485
|
this.errorReporter = options.errorReporter || new ErrorReporter();
|
|
481
486
|
this.singletonCreatedAt = (performance || Date).now();
|
|
482
487
|
}
|
|
@@ -37,6 +37,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
37
37
|
isResizing: boolean;
|
|
38
38
|
resizingWidth: number;
|
|
39
39
|
currentMaxWidth?: number;
|
|
40
|
+
allowInlineImages: boolean;
|
|
40
41
|
private view;
|
|
41
42
|
private destroyed;
|
|
42
43
|
private contextIdentifierProvider?;
|
|
@@ -37,6 +37,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
37
37
|
isResizing: boolean;
|
|
38
38
|
resizingWidth: number;
|
|
39
39
|
currentMaxWidth?: number;
|
|
40
|
+
allowInlineImages: boolean;
|
|
40
41
|
private view;
|
|
41
42
|
private destroyed;
|
|
42
43
|
private contextIdentifierProvider?;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -129,6 +129,9 @@
|
|
|
129
129
|
"platform-feature-flags": {
|
|
130
130
|
"platform.editor.media.extended-resize-experience": {
|
|
131
131
|
"type": "boolean"
|
|
132
|
+
},
|
|
133
|
+
"platform.editor.media.inline-image.base-support": {
|
|
134
|
+
"type": "boolean"
|
|
132
135
|
}
|
|
133
136
|
},
|
|
134
137
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|