@atlaskit/editor-plugin-media 0.6.11 → 0.7.0
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,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#61685](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61685) [`ac1ec9ea4cd3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ac1ec9ea4cd3) - [ux] Add border mark support to mediaInline in Editor/Renderer
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 0.6.12
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#62165](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62165) [`b44ac0968d79`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b44ac0968d79) - [ED-21562] Bump @atlaskit/adf-schema to 35.2.0 for border mark update
|
|
18
|
+
|
|
3
19
|
## 0.6.11
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -115,6 +115,7 @@ var handleNewNode = exports.handleNewNode = function handleNewNode(props) {
|
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
117
|
var MediaInline = exports.MediaInline = function MediaInline(props) {
|
|
118
|
+
var _props$node;
|
|
118
119
|
var _useState = (0, _react.useState)(),
|
|
119
120
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
120
121
|
viewMediaClientConfig = _useState2[0],
|
|
@@ -185,6 +186,9 @@ var MediaInline = exports.MediaInline = function MediaInline(props) {
|
|
|
185
186
|
});
|
|
186
187
|
}
|
|
187
188
|
var allowInlineImages = props.mediaPluginState.allowInlineImages;
|
|
189
|
+
var borderMark = (_props$node = props.node) === null || _props$node === void 0 || (_props$node = _props$node.marks) === null || _props$node === void 0 ? void 0 : _props$node.find(function (mark) {
|
|
190
|
+
return mark.type.name === 'border';
|
|
191
|
+
});
|
|
188
192
|
if (allowInlineImages && (0, _isType.isImage)(type)) {
|
|
189
193
|
return /*#__PURE__*/_react.default.createElement(_mediaInline.MediaInlineImageCard, {
|
|
190
194
|
mediaClient: (0, _mediaClientReact.getMediaClient)(viewMediaClientConfig),
|
|
@@ -192,7 +196,11 @@ var MediaInline = exports.MediaInline = function MediaInline(props) {
|
|
|
192
196
|
isSelected: props.isSelected,
|
|
193
197
|
alt: alt,
|
|
194
198
|
width: width,
|
|
195
|
-
height: height
|
|
199
|
+
height: height,
|
|
200
|
+
border: {
|
|
201
|
+
borderSize: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
|
|
202
|
+
borderColor: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color
|
|
203
|
+
}
|
|
196
204
|
});
|
|
197
205
|
}
|
|
198
206
|
return /*#__PURE__*/_react.default.createElement(_mediaCard.MediaInlineCard, {
|
|
@@ -62,6 +62,7 @@ export const handleNewNode = props => {
|
|
|
62
62
|
mediaPluginState.handleMediaNodeMount(node, () => getPos());
|
|
63
63
|
};
|
|
64
64
|
export const MediaInline = props => {
|
|
65
|
+
var _props$node, _props$node$marks;
|
|
65
66
|
const [viewMediaClientConfig, setViewMediaClientConfig] = useState();
|
|
66
67
|
const [isContextIdUnsync, setIsContextIdUnsync] = useState(true);
|
|
67
68
|
useEffect(() => {
|
|
@@ -114,6 +115,7 @@ export const MediaInline = props => {
|
|
|
114
115
|
const {
|
|
115
116
|
allowInlineImages
|
|
116
117
|
} = props.mediaPluginState;
|
|
118
|
+
const borderMark = (_props$node = props.node) === null || _props$node === void 0 ? void 0 : (_props$node$marks = _props$node.marks) === null || _props$node$marks === void 0 ? void 0 : _props$node$marks.find(mark => mark.type.name === 'border');
|
|
117
119
|
if (allowInlineImages && isImage(type)) {
|
|
118
120
|
return /*#__PURE__*/React.createElement(MediaInlineImageCard, {
|
|
119
121
|
mediaClient: getMediaClient(viewMediaClientConfig),
|
|
@@ -121,7 +123,11 @@ export const MediaInline = props => {
|
|
|
121
123
|
isSelected: props.isSelected,
|
|
122
124
|
alt: alt,
|
|
123
125
|
width: width,
|
|
124
|
-
height: height
|
|
126
|
+
height: height,
|
|
127
|
+
border: {
|
|
128
|
+
borderSize: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
|
|
129
|
+
borderColor: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color
|
|
130
|
+
}
|
|
125
131
|
});
|
|
126
132
|
}
|
|
127
133
|
return /*#__PURE__*/React.createElement(MediaInlineCard, {
|
|
@@ -105,6 +105,7 @@ export var handleNewNode = function handleNewNode(props) {
|
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
107
|
export var MediaInline = function MediaInline(props) {
|
|
108
|
+
var _props$node;
|
|
108
109
|
var _useState = useState(),
|
|
109
110
|
_useState2 = _slicedToArray(_useState, 2),
|
|
110
111
|
viewMediaClientConfig = _useState2[0],
|
|
@@ -175,6 +176,9 @@ export var MediaInline = function MediaInline(props) {
|
|
|
175
176
|
});
|
|
176
177
|
}
|
|
177
178
|
var allowInlineImages = props.mediaPluginState.allowInlineImages;
|
|
179
|
+
var borderMark = (_props$node = props.node) === null || _props$node === void 0 || (_props$node = _props$node.marks) === null || _props$node === void 0 ? void 0 : _props$node.find(function (mark) {
|
|
180
|
+
return mark.type.name === 'border';
|
|
181
|
+
});
|
|
178
182
|
if (allowInlineImages && isImage(type)) {
|
|
179
183
|
return /*#__PURE__*/React.createElement(MediaInlineImageCard, {
|
|
180
184
|
mediaClient: getMediaClient(viewMediaClientConfig),
|
|
@@ -182,7 +186,11 @@ export var MediaInline = function MediaInline(props) {
|
|
|
182
186
|
isSelected: props.isSelected,
|
|
183
187
|
alt: alt,
|
|
184
188
|
width: width,
|
|
185
|
-
height: height
|
|
189
|
+
height: height,
|
|
190
|
+
border: {
|
|
191
|
+
borderSize: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
|
|
192
|
+
borderColor: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.color
|
|
193
|
+
}
|
|
186
194
|
});
|
|
187
195
|
}
|
|
188
196
|
return /*#__PURE__*/React.createElement(MediaInlineCard, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"./types": "./src/types.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^35.
|
|
35
|
+
"@atlaskit/adf-schema": "^35.2.0",
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
38
|
-
"@atlaskit/button": "^17.
|
|
39
|
-
"@atlaskit/editor-common": "^76.
|
|
38
|
+
"@atlaskit/button": "^17.1.0",
|
|
39
|
+
"@atlaskit/editor-common": "^76.28.0",
|
|
40
40
|
"@atlaskit/editor-palette": "1.5.2",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
42
42
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
65
65
|
"@atlaskit/textfield": "^6.0.0",
|
|
66
66
|
"@atlaskit/theme": "^12.6.0",
|
|
67
|
-
"@atlaskit/tokens": "^1.
|
|
68
|
-
"@atlaskit/tooltip": "^18.
|
|
67
|
+
"@atlaskit/tokens": "^1.31.0",
|
|
68
|
+
"@atlaskit/tooltip": "^18.1.0",
|
|
69
69
|
"@babel/runtime": "^7.0.0",
|
|
70
70
|
"@emotion/react": "^11.7.1",
|
|
71
71
|
"classnames": "^2.2.5",
|