@atlaskit/editor-plugin-media 20.1.3 → 20.1.5
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 +15 -0
- package/dist/cjs/nodeviews/mediaInline.js +2 -2
- package/dist/cjs/nodeviews/mediaNodeView/media.js +4 -3
- package/dist/cjs/ui/ImageBorder/index.js +9 -4
- package/dist/es2019/nodeviews/mediaInline.js +1 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/es2019/ui/ImageBorder/index.js +9 -4
- package/dist/esm/nodeviews/mediaInline.js +1 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/esm/ui/ImageBorder/index.js +9 -4
- package/dist/types/nodeviews/mediaNodeView/media.d.ts +2 -1
- package/dist/types/nodeviews/styles.d.ts +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 20.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c942b90687404`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c942b90687404) -
|
|
8
|
+
Label the image border color and size radio groups for screen readers behind
|
|
9
|
+
platform_editor_a11y_border_radiogroup_label
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 20.1.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 20.1.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -21,7 +21,7 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
21
21
|
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
22
22
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
23
23
|
var _selectionBasedNodeView = require("@atlaskit/editor-common/selection-based-node-view");
|
|
24
|
-
var
|
|
24
|
+
var _loader = _interopRequireDefault(require("@atlaskit/media-card/loader"));
|
|
25
25
|
var _getMediaClient = require("@atlaskit/media-client-react/get-media-client");
|
|
26
26
|
var _LoadingView = require("@atlaskit/media-ui/LoadingView");
|
|
27
27
|
var _isType = require("../pm-plugins/utils/is-type");
|
|
@@ -219,7 +219,7 @@ var MediaInline = exports.MediaInline = function MediaInline(props) {
|
|
|
219
219
|
isSelected: props.isSelected,
|
|
220
220
|
isInline: true,
|
|
221
221
|
fallbackMediaNameFetcher: props.fallbackMediaNameFetcher
|
|
222
|
-
}, (0, _react2.jsx)(
|
|
222
|
+
}, (0, _react2.jsx)(_loader.default, {
|
|
223
223
|
isSelected: props.isSelected,
|
|
224
224
|
identifier: identifier,
|
|
225
225
|
mediaClientConfig: viewMediaClientConfig,
|
|
@@ -24,7 +24,8 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
|
24
24
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
25
25
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
26
26
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
27
|
-
var
|
|
27
|
+
var _cardLoader = _interopRequireDefault(require("@atlaskit/media-card/cardLoader"));
|
|
28
|
+
var _cardLoading = require("@atlaskit/media-card/cardLoading");
|
|
28
29
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
29
30
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
30
31
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -515,7 +516,7 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
515
516
|
dimensions: originalDimensions,
|
|
516
517
|
borderWidth: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
|
|
517
518
|
selected: selected
|
|
518
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
519
|
+
}, /*#__PURE__*/_react.default.createElement(_cardLoading.CardLoading, {
|
|
519
520
|
interactionName: "editor-media-card-loading"
|
|
520
521
|
})));
|
|
521
522
|
}
|
|
@@ -568,7 +569,7 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
568
569
|
// Format: "remix:{type}:{subtype}" e.g. "remix:infographic:corporate-doodle"
|
|
569
570
|
remixSource: dataConsumerMark === null || dataConsumerMark === void 0 || (_dataConsumerMark$att2 = dataConsumerMark.attrs.sources) === null || _dataConsumerMark$att2 === void 0 ? void 0 : _dataConsumerMark$att2[0]
|
|
570
571
|
})
|
|
571
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
572
|
+
}, /*#__PURE__*/_react.default.createElement(_cardLoader.default, {
|
|
572
573
|
mediaClientConfig: mediaClientConfig,
|
|
573
574
|
resizeMode: "stretchy-fit",
|
|
574
575
|
dimensions: maxDimensions,
|
|
@@ -19,6 +19,7 @@ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-d
|
|
|
19
19
|
var _strokeWeightLarge = _interopRequireDefault(require("@atlaskit/icon/core/stroke-weight-large"));
|
|
20
20
|
var _strokeWeightMedium = _interopRequireDefault(require("@atlaskit/icon/core/stroke-weight-medium"));
|
|
21
21
|
var _strokeWeightSmall = _interopRequireDefault(require("@atlaskit/icon/core/stroke-weight-small"));
|
|
22
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
22
23
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
25
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
@@ -192,9 +193,10 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
192
193
|
handleColorSubmenuEsc();
|
|
193
194
|
},
|
|
194
195
|
disableCloseOnArrowClick: true
|
|
195
|
-
}, (0, _react2.jsx)(_uiColor.ColorPalette
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
}, (0, _react2.jsx)(_uiColor.ColorPalette, {
|
|
197
|
+
ariaLabel: (0, _fg.fg)('platform_editor_a11y_border_radiogroup_label') ? formatMessage(_media.imageBorderMessages.borderColorRadioGroupAriaLabel) : undefined
|
|
198
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
199
|
+
,
|
|
198
200
|
onClick: function onClick(color) {
|
|
199
201
|
setBorder({
|
|
200
202
|
color: color
|
|
@@ -272,8 +274,11 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
272
274
|
},
|
|
273
275
|
disableCloseOnArrowClick: true
|
|
274
276
|
}, (0, _react2.jsx)("div", {
|
|
277
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
275
278
|
css: (0, _styles2.contextualSubMenu)(1),
|
|
276
|
-
ref: handleSubMenuRef
|
|
279
|
+
ref: handleSubMenuRef,
|
|
280
|
+
role: (0, _fg.fg)('platform_editor_a11y_border_radiogroup_label') ? 'radiogroup' : undefined,
|
|
281
|
+
"aria-label": (0, _fg.fg)('platform_editor_a11y_border_radiogroup_label') ? formatMessage(_media.imageBorderMessages.borderSizeRadioGroupAriaLabel) : undefined
|
|
277
282
|
}, borderSizeOptions.map(function (_ref2, idx) {
|
|
278
283
|
var name = _ref2.name,
|
|
279
284
|
value = _ref2.value,
|
|
@@ -10,7 +10,7 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
10
10
|
import { MediaInlineImageCard } from '@atlaskit/editor-common/media-inline';
|
|
11
11
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
12
12
|
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
13
|
-
import
|
|
13
|
+
import MediaInlineCard from '@atlaskit/media-card/loader';
|
|
14
14
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
15
15
|
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
16
16
|
import { isImage } from '../pm-plugins/utils/is-type';
|
|
@@ -9,7 +9,8 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
9
9
|
import { setNodeSelection, setTextSelection, withImageLoader } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
11
11
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
12
|
-
import
|
|
12
|
+
import Card from '@atlaskit/media-card/cardLoader';
|
|
13
|
+
import { CardLoading } from '@atlaskit/media-card/cardLoading';
|
|
13
14
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -17,6 +17,7 @@ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
|
17
17
|
import StrokeWeightLargeIcon from '@atlaskit/icon/core/stroke-weight-large';
|
|
18
18
|
import StrokeWeightMediumIcon from '@atlaskit/icon/core/stroke-weight-medium';
|
|
19
19
|
import StrokeWeightSmallIcon from '@atlaskit/icon/core/stroke-weight-small';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
21
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
21
22
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
23
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
@@ -172,9 +173,10 @@ const ImageBorder = ({
|
|
|
172
173
|
handleColorSubmenuEsc();
|
|
173
174
|
},
|
|
174
175
|
disableCloseOnArrowClick: true
|
|
175
|
-
}, jsx(ColorPalette
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
}, jsx(ColorPalette, {
|
|
177
|
+
ariaLabel: fg('platform_editor_a11y_border_radiogroup_label') ? formatMessage(messages.borderColorRadioGroupAriaLabel) : undefined
|
|
178
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
179
|
+
,
|
|
178
180
|
onClick: color => {
|
|
179
181
|
setBorder({
|
|
180
182
|
color
|
|
@@ -250,8 +252,11 @@ const ImageBorder = ({
|
|
|
250
252
|
},
|
|
251
253
|
disableCloseOnArrowClick: true
|
|
252
254
|
}, jsx("div", {
|
|
255
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
253
256
|
css: contextualSubMenu(1),
|
|
254
|
-
ref: handleSubMenuRef
|
|
257
|
+
ref: handleSubMenuRef,
|
|
258
|
+
role: fg('platform_editor_a11y_border_radiogroup_label') ? 'radiogroup' : undefined,
|
|
259
|
+
"aria-label": fg('platform_editor_a11y_border_radiogroup_label') ? formatMessage(messages.borderSizeRadioGroupAriaLabel) : undefined
|
|
255
260
|
}, borderSizeOptions.map(({
|
|
256
261
|
name,
|
|
257
262
|
value,
|
|
@@ -25,7 +25,7 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
25
25
|
import { MediaInlineImageCard } from '@atlaskit/editor-common/media-inline';
|
|
26
26
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
27
27
|
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
28
|
-
import
|
|
28
|
+
import MediaInlineCard from '@atlaskit/media-card/loader';
|
|
29
29
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
30
30
|
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
31
31
|
import { isImage } from '../pm-plugins/utils/is-type';
|
|
@@ -20,7 +20,8 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
20
20
|
import { setNodeSelection, setTextSelection, withImageLoader } from '@atlaskit/editor-common/utils';
|
|
21
21
|
import { findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
22
22
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
23
|
-
import
|
|
23
|
+
import Card from '@atlaskit/media-card/cardLoader';
|
|
24
|
+
import { CardLoading } from '@atlaskit/media-card/cardLoading';
|
|
24
25
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
25
26
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
26
27
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -18,6 +18,7 @@ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
|
18
18
|
import StrokeWeightLargeIcon from '@atlaskit/icon/core/stroke-weight-large';
|
|
19
19
|
import StrokeWeightMediumIcon from '@atlaskit/icon/core/stroke-weight-medium';
|
|
20
20
|
import StrokeWeightSmallIcon from '@atlaskit/icon/core/stroke-weight-small';
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
22
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
22
23
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
24
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
@@ -184,9 +185,10 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
184
185
|
handleColorSubmenuEsc();
|
|
185
186
|
},
|
|
186
187
|
disableCloseOnArrowClick: true
|
|
187
|
-
}, jsx(ColorPalette
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
}, jsx(ColorPalette, {
|
|
189
|
+
ariaLabel: fg('platform_editor_a11y_border_radiogroup_label') ? formatMessage(messages.borderColorRadioGroupAriaLabel) : undefined
|
|
190
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
191
|
+
,
|
|
190
192
|
onClick: function onClick(color) {
|
|
191
193
|
setBorder({
|
|
192
194
|
color: color
|
|
@@ -264,8 +266,11 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
264
266
|
},
|
|
265
267
|
disableCloseOnArrowClick: true
|
|
266
268
|
}, jsx("div", {
|
|
269
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
267
270
|
css: contextualSubMenu(1),
|
|
268
|
-
ref: handleSubMenuRef
|
|
271
|
+
ref: handleSubMenuRef,
|
|
272
|
+
role: fg('platform_editor_a11y_border_radiogroup_label') ? 'radiogroup' : undefined,
|
|
273
|
+
"aria-label": fg('platform_editor_a11y_border_radiogroup_label') ? formatMessage(messages.borderSizeRadioGroupAriaLabel) : undefined
|
|
269
274
|
}, borderSizeOptions.map(function (_ref2, idx) {
|
|
270
275
|
var name = _ref2.name,
|
|
271
276
|
value = _ref2.value,
|
|
@@ -5,7 +5,8 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import type { ImageLoaderProps } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { CardDimensions, CardOnClickCallback
|
|
8
|
+
import type { CardDimensions, CardOnClickCallback } from '@atlaskit/media-card/types';
|
|
9
|
+
import type { NumericalCardDimensions } from '@atlaskit/media-common/main-types';
|
|
9
10
|
import type { MediaClientConfig } from '@atlaskit/media-core/auth';
|
|
10
11
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
11
12
|
import type { MediaOptions, getPosHandler as ProsemirrorGetPosHandler, ReactNodeProps } from '../../types';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { NumericalCardDimensions } from '@atlaskit/media-
|
|
7
|
+
import type { NumericalCardDimensions } from '@atlaskit/media-common/main-types';
|
|
8
8
|
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
9
9
|
type MediaCardWrapperProps = {
|
|
10
10
|
borderWidth?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "20.1.
|
|
3
|
+
"version": "20.1.5",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
62
62
|
"@atlaskit/primitives": "^22.5.0",
|
|
63
63
|
"@atlaskit/textfield": "^10.2.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
64
|
+
"@atlaskit/tmp-editor-statsig": "^196.0.0",
|
|
65
65
|
"@atlaskit/tokens": "^17.0.0",
|
|
66
66
|
"@atlaskit/tooltip": "^24.3.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
@@ -74,13 +74,16 @@
|
|
|
74
74
|
"uuid": "^11.1.1"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@atlaskit/editor-common": "^122.
|
|
77
|
+
"@atlaskit/editor-common": "^122.8.0",
|
|
78
78
|
"@atlaskit/media-core": "^38.2.0",
|
|
79
79
|
"react": "^18.2.0 || ^19.2.0",
|
|
80
80
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
81
81
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
82
82
|
},
|
|
83
83
|
"platform-feature-flags": {
|
|
84
|
+
"platform_editor_a11y_border_radiogroup_label": {
|
|
85
|
+
"type": "boolean"
|
|
86
|
+
},
|
|
84
87
|
"platform_media_cross_client_copy": {
|
|
85
88
|
"type": "boolean"
|
|
86
89
|
},
|