@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
package/CHANGELOG.md
CHANGED
|
@@ -172,6 +172,7 @@ var runMediaNodeUpdate = /*#__PURE__*/function () {
|
|
|
172
172
|
};
|
|
173
173
|
}();
|
|
174
174
|
var noop = function noop() {};
|
|
175
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
175
176
|
var MediaGroupNext = exports.MediaGroupNext = (0, _reactIntlNext.injectIntl)( /*#__PURE__*/_react.default.memo(function (props) {
|
|
176
177
|
var _props$mediaOptions = props.mediaOptions,
|
|
177
178
|
allowLazyLoading = _props$mediaOptions.allowLazyLoading,
|
|
@@ -34,7 +34,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
34
34
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
35
35
|
* @jsxRuntime classic
|
|
36
36
|
* @jsx jsx
|
|
37
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
37
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
38
38
|
var createMediaNodeUpdater = function createMediaNodeUpdater(props) {
|
|
39
39
|
var node = props.node;
|
|
40
40
|
return new _mediaNodeUpdater.MediaNodeUpdater(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -394,4 +394,5 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
394
394
|
}
|
|
395
395
|
}]);
|
|
396
396
|
}(_react.Component);
|
|
397
|
-
var
|
|
397
|
+
var _default_1 = (0, _utils.withImageLoader)(MediaNode);
|
|
398
|
+
var _default = exports.default = _default_1;
|
|
@@ -28,7 +28,8 @@ function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototyp
|
|
|
28
28
|
* @jsxRuntime classic
|
|
29
29
|
* @jsx jsx
|
|
30
30
|
* @jsxFrag
|
|
31
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
31
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
32
33
|
var selector = function selector(states) {
|
|
33
34
|
var _states$mediaState, _states$mediaState2, _states$annotationSta, _states$annotationSta2, _states$widthState, _states$widthState2, _states$editorDisable, _states$editorViewMod;
|
|
34
35
|
return {
|
|
@@ -37,7 +37,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
37
37
|
* @jsxRuntime classic
|
|
38
38
|
* @jsx jsx
|
|
39
39
|
* @jsxFrag
|
|
40
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
40
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
41
41
|
var figureWrapperStyles = (0, _react2.css)({
|
|
42
42
|
margin: 0
|
|
43
43
|
});
|
|
@@ -13,7 +13,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
13
13
|
* @jsx jsx
|
|
14
14
|
*/
|
|
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
|
|
|
18
18
|
var MediaSingleNodeSelector = exports.MediaSingleNodeSelector = 'media-single-node';
|
|
19
19
|
var absoluteDivStyles = (0, _react2.css)({
|
|
@@ -9,21 +9,23 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
13
|
+
|
|
12
14
|
var pluginKey = new _state.PluginKey('mediaAltTextPlugin');
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
isAltTextEditorOpen: false
|
|
21
|
-
};
|
|
15
|
+
var dest = (0, _utils.pluginFactory)(pluginKey, _reducer.default, {
|
|
16
|
+
onSelectionChanged: function onSelectionChanged(tr, newState) {
|
|
17
|
+
// dont close alt text for undo/redo transactions (if it comes from prosemirror-history)
|
|
18
|
+
if (tr.getMeta(_utils.pmHistoryPluginKey)) {
|
|
19
|
+
return newState;
|
|
22
20
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
return {
|
|
22
|
+
isAltTextEditorOpen: false
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
var createPluginState = dest.createPluginState;
|
|
27
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
28
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
27
29
|
var createPlugin = exports.createPlugin = function createPlugin(_ref) {
|
|
28
30
|
var dispatch = _ref.dispatch,
|
|
29
31
|
providerFactory = _ref.providerFactory;
|
|
@@ -29,7 +29,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
|
|
|
29
29
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
30
30
|
* @jsxRuntime classic
|
|
31
31
|
* @jsx jsx
|
|
32
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
32
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
33
33
|
var MAX_ALT_TEXT_LENGTH = exports.MAX_ALT_TEXT_LENGTH = 510; // double tweet length
|
|
34
34
|
|
|
35
35
|
var supportTextStyles = (0, _react2.css)({
|
|
@@ -276,4 +276,5 @@ var AltTextEditComponent = exports.AltTextEditComponent = /*#__PURE__*/function
|
|
|
276
276
|
}
|
|
277
277
|
}]);
|
|
278
278
|
}(_react.default.Component);
|
|
279
|
-
var
|
|
279
|
+
var _default_1 = (0, _analyticsNext.withAnalyticsEvents)()((0, _reactIntlNext.injectIntl)(AltTextEditComponent));
|
|
280
|
+
var _default = exports.default = _default_1;
|
|
@@ -56,8 +56,8 @@ var mediaLinkingPluginFactory = (0, _utils.pluginFactory)(mediaLinkingPluginKey,
|
|
|
56
56
|
mapping: mapping,
|
|
57
57
|
onSelectionChanged: onSelectionChanged
|
|
58
58
|
});
|
|
59
|
-
var createMediaLinkingCommand = exports.createMediaLinkingCommand = mediaLinkingPluginFactory.createCommand
|
|
60
|
-
|
|
59
|
+
var createMediaLinkingCommand = exports.createMediaLinkingCommand = mediaLinkingPluginFactory.createCommand;
|
|
60
|
+
var getMediaLinkingState = exports.getMediaLinkingState = mediaLinkingPluginFactory.getPluginState;
|
|
61
61
|
var _default = exports.default = function _default(dispatch) {
|
|
62
62
|
return new _safePlugin.SafePlugin({
|
|
63
63
|
key: mediaLinkingPluginKey,
|
|
@@ -9,17 +9,19 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
13
|
+
|
|
12
14
|
var pluginKey = new _state.PluginKey('mediaPixelResizingPlugin');
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
var dest = (0, _utils.pluginFactory)(pluginKey, _reducer.default, {
|
|
16
|
+
onSelectionChanged: function onSelectionChanged() {
|
|
17
|
+
return {
|
|
18
|
+
isPixelEditorOpen: false
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
var createPluginState = dest.createPluginState;
|
|
23
|
+
var createCommand = exports.createCommand = dest.createCommand;
|
|
24
|
+
var getPluginState = exports.getPluginState = dest.getPluginState;
|
|
23
25
|
var createPlugin = exports.createPlugin = function createPlugin(_ref) {
|
|
24
26
|
var dispatch = _ref.dispatch;
|
|
25
27
|
return new _safePlugin.SafePlugin({
|
|
@@ -25,7 +25,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
25
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
|
|
26
26
|
* @jsxRuntime classic
|
|
27
27
|
* @jsx jsx
|
|
28
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
28
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
29
29
|
var PixelEntry = exports.PixelEntry = function PixelEntry(_ref) {
|
|
30
30
|
var _pluginInjectionApi$w, _pluginInjectionApi$m, _pluginInjectionApi$f;
|
|
31
31
|
var editorView = _ref.editorView,
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
27
27
|
* @jsx jsx
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives
|
|
33
33
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
@@ -28,7 +28,7 @@ var _styles2 = require("./styles");
|
|
|
28
28
|
* @jsx jsx
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
32
32
|
|
|
33
33
|
var ImageBorder = function ImageBorder(_ref) {
|
|
34
34
|
var formatMessage = _ref.intl.formatMessage,
|
|
@@ -16,7 +16,7 @@ var _media2 = require("../../nodeviews/mediaNodeView/media");
|
|
|
16
16
|
* @jsxRuntime classic
|
|
17
17
|
* @jsx jsx
|
|
18
18
|
*/
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
20
20
|
|
|
21
21
|
var iconWrapperStyles = (0, _react.css)({
|
|
22
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -28,7 +28,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
|
|
|
28
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
29
29
|
* @jsxRuntime classic
|
|
30
30
|
* @jsx jsx
|
|
31
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
31
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
32
32
|
var validationWrapper = (0, _react2.css)({
|
|
33
33
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
34
34
|
lineHeight: 0,
|
|
@@ -20,7 +20,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
20
20
|
* @jsx jsx
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
24
24
|
|
|
25
25
|
var interactiveStyles = (0, _react2.css)({
|
|
26
26
|
cursor: 'pointer'
|
|
@@ -10,7 +10,7 @@ var _styles = require("./styles");
|
|
|
10
10
|
* @jsxRuntime classic
|
|
11
11
|
* @jsx jsx
|
|
12
12
|
*/
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
14
14
|
|
|
15
15
|
var ResizableMediaMigrationNotification = exports.ResizableMediaMigrationNotification = function ResizableMediaMigrationNotification() {
|
|
16
16
|
return (0, _react.jsx)("div", {
|
|
@@ -34,7 +34,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
34
34
|
* @jsx jsx
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
38
38
|
|
|
39
39
|
var resizerNextTestId = exports.resizerNextTestId = 'mediaSingle.resizerNext.testid';
|
|
40
40
|
var getNodePosition = function getNodePosition(getPos) {
|
|
@@ -28,7 +28,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
|
|
|
28
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
29
29
|
* @jsxRuntime classic
|
|
30
30
|
* @jsx jsx
|
|
31
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
31
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
32
32
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
33
33
|
var ResizableMediaSingle = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
34
34
|
function ResizableMediaSingle() {
|
|
@@ -47,4 +47,7 @@ var ToolbarMedia = function ToolbarMedia(_ref) {
|
|
|
47
47
|
})
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
52
|
+
var _default_1 = (0, _reactIntlNext.injectIntl)(ToolbarMedia);
|
|
53
|
+
var _default = exports.default = _default_1;
|
|
@@ -12,7 +12,7 @@ var _primitives = require("@atlaskit/primitives");
|
|
|
12
12
|
* @jsxRuntime classic
|
|
13
13
|
* @jsx jsx
|
|
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
|
|
|
17
17
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
18
18
|
|
|
@@ -24,7 +24,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
28
28
|
|
|
29
29
|
var wrapperStyles = (0, _react2.css)({
|
|
30
30
|
display: 'flex',
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { useEffect, useMemo, useState } 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 { jsx } from '@emotion/react';
|
|
9
9
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { MediaInlineImageCard } from '@atlaskit/editor-common/media-inline';
|
|
@@ -6,12 +6,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
6
6
|
*/
|
|
7
7
|
import { useCallback, useMemo } 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 { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
12
12
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
13
13
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
14
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
15
16
|
import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
16
17
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
18
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { Fragment } 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 { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
|
|
11
11
|
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 const MediaSingleNodeSelector = 'media-single-node';
|
|
@@ -1,13 +1,10 @@
|
|
|
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
|
const pluginKey = new PluginKey('mediaAltTextPlugin');
|
|
6
|
-
const {
|
|
7
|
-
createPluginState,
|
|
8
|
-
createCommand,
|
|
9
|
-
getPluginState
|
|
10
|
-
} = pluginFactory(pluginKey, reducer, {
|
|
7
|
+
const dest = pluginFactory(pluginKey, reducer, {
|
|
11
8
|
onSelectionChanged: (tr, newState) => {
|
|
12
9
|
// dont close alt text for undo/redo transactions (if it comes from prosemirror-history)
|
|
13
10
|
if (tr.getMeta(pmHistoryPluginKey)) {
|
|
@@ -18,6 +15,9 @@ const {
|
|
|
18
15
|
};
|
|
19
16
|
}
|
|
20
17
|
});
|
|
18
|
+
const createPluginState = dest.createPluginState;
|
|
19
|
+
const createCommand = dest.createCommand;
|
|
20
|
+
const getPluginState = dest.getPluginState;
|
|
21
21
|
export const createPlugin = ({
|
|
22
22
|
dispatch,
|
|
23
23
|
providerFactory
|
|
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
6
6
|
|
|
7
7
|
import React 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 { css, jsx } from '@emotion/react';
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -263,4 +263,5 @@ export class AltTextEditComponent extends React.Component {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
const _default_1 = withAnalyticsEvents()(injectIntl(AltTextEditComponent));
|
|
267
|
+
export default _default_1;
|
|
@@ -47,10 +47,8 @@ const mediaLinkingPluginFactory = pluginFactory(mediaLinkingPluginKey, reducer,
|
|
|
47
47
|
mapping,
|
|
48
48
|
onSelectionChanged
|
|
49
49
|
});
|
|
50
|
-
export const
|
|
51
|
-
|
|
52
|
-
getPluginState: getMediaLinkingState
|
|
53
|
-
} = mediaLinkingPluginFactory;
|
|
50
|
+
export const createMediaLinkingCommand = mediaLinkingPluginFactory.createCommand;
|
|
51
|
+
export const getMediaLinkingState = mediaLinkingPluginFactory.getPluginState;
|
|
54
52
|
export default (dispatch => new SafePlugin({
|
|
55
53
|
key: mediaLinkingPluginKey,
|
|
56
54
|
state: mediaLinkingPluginFactory.createPluginState(dispatch, initialState)
|
|
@@ -1,19 +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
|
const pluginKey = new PluginKey('mediaPixelResizingPlugin');
|
|
6
|
-
const {
|
|
7
|
-
createPluginState,
|
|
8
|
-
createCommand,
|
|
9
|
-
getPluginState
|
|
10
|
-
} = pluginFactory(pluginKey, reducer, {
|
|
7
|
+
const dest = pluginFactory(pluginKey, reducer, {
|
|
11
8
|
onSelectionChanged() {
|
|
12
9
|
return {
|
|
13
10
|
isPixelEditorOpen: false
|
|
14
11
|
};
|
|
15
12
|
}
|
|
16
13
|
});
|
|
14
|
+
const createPluginState = dest.createPluginState;
|
|
15
|
+
const createCommand = dest.createCommand;
|
|
16
|
+
const getPluginState = dest.getPluginState;
|
|
17
17
|
export const createPlugin = ({
|
|
18
18
|
dispatch
|
|
19
19
|
}) => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { useCallback } 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 { jsx } from '@emotion/react';
|
|
9
9
|
import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
|
|
10
10
|
import { calcMinWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
5
5
|
* @jsx jsx
|
|
6
6
|
*/
|
|
7
7
|
import { useCallback, useEffect, useMemo, useState, useRef, Fragment } from 'react';
|
|
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, css } from '@emotion/react';
|
|
10
10
|
import Button from '@atlaskit/button';
|
|
11
11
|
import { IconButton } from '@atlaskit/button/new';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } 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 { jsx } from '@emotion/react';
|
|
9
9
|
import { imageBorderMessages as messages } from '@atlaskit/editor-common/media';
|
|
10
10
|
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';
|
|
@@ -5,7 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { Fragment } 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 { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import { container, containerWithProvider, inputWrapper, RecentSearch } from '@atlaskit/editor-common/link';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { Fragment, useEffect, useState } 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 { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
10
|
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 const ResizableMediaMigrationNotification = () => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } 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 { jsx } from '@emotion/react';
|
|
9
9
|
import classnames from 'classnames';
|
|
10
10
|
import throttle from 'lodash/throttle';
|
|
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
6
6
|
*/
|
|
7
7
|
import React 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 { calculateOffsetLeft } from '@atlaskit/editor-common/media-single';
|
|
12
12
|
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';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { Fragment, useEffect, useState } 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 { isSafeUrl } from '@atlaskit/adf-schema';
|
|
10
10
|
import { addLink, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
@@ -163,6 +163,7 @@ var runMediaNodeUpdate = /*#__PURE__*/function () {
|
|
|
163
163
|
};
|
|
164
164
|
}();
|
|
165
165
|
var noop = function noop() {};
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
166
167
|
export var MediaGroupNext = injectIntl( /*#__PURE__*/React.memo(function (props) {
|
|
167
168
|
var _props$mediaOptions = props.mediaOptions,
|
|
168
169
|
allowLazyLoading = _props$mediaOptions.allowLazyLoading,
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
*/
|
|
20
20
|
import { useEffect, useMemo, useState } from 'react';
|
|
21
21
|
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
23
23
|
import { jsx } from '@emotion/react';
|
|
24
24
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
25
25
|
import { MediaInlineImageCard } from '@atlaskit/editor-common/media-inline';
|