@atlaskit/editor-core 185.2.27 → 185.3.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 +17 -0
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +6 -2
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +7 -2
- package/dist/cjs/plugins/date/nodeviews/date.js +2 -1
- package/dist/cjs/plugins/expand/nodeviews/index.js +41 -10
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +2 -1
- package/dist/cjs/plugins/media/commands/captions.js +3 -0
- package/dist/cjs/plugins/media/commands/helpers.js +3 -3
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +35 -4
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +25 -11
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +5 -1
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +8 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +5 -1
- package/dist/cjs/plugins/media/utils/media-common.js +3 -0
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +7 -1
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +8 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +11 -5
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +12 -5
- package/dist/es2019/plugins/date/nodeviews/date.js +2 -1
- package/dist/es2019/plugins/expand/nodeviews/index.js +41 -10
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +2 -1
- package/dist/es2019/plugins/media/commands/captions.js +3 -0
- package/dist/es2019/plugins/media/commands/helpers.js +3 -3
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +39 -4
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +10 -2
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +5 -1
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +8 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +5 -1
- package/dist/es2019/plugins/media/utils/media-common.js +3 -0
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +7 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +8 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/card/nodeviews/blockCard.js +6 -2
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +7 -2
- package/dist/esm/plugins/date/nodeviews/date.js +2 -1
- package/dist/esm/plugins/expand/nodeviews/index.js +41 -10
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +2 -1
- package/dist/esm/plugins/media/commands/captions.js +3 -0
- package/dist/esm/plugins/media/commands/helpers.js +3 -3
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +35 -4
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +25 -11
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +5 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +8 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +5 -1
- package/dist/esm/plugins/media/utils/media-common.js +3 -0
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +7 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +8 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/nodeviews/types.d.ts +2 -2
- package/dist/types/plugins/expand/nodeviews/index.d.ts +0 -1
- package/dist/types/plugins/media/commands/captions.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/mediaGroup.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/types.d.ts +2 -2
- package/dist/types-ts4.5/plugins/expand/nodeviews/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/commands/captions.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaGroup.d.ts +1 -1
- package/package.json +13 -9
- package/report.api.md +2 -2
- package/tmp/api-report-tmp.d.ts +2 -2
|
@@ -41,7 +41,7 @@ export var updateAllMediaSingleNodesAttrs = function updateAllMediaSingleNodesAt
|
|
|
41
41
|
var validMediaNodePositions = mediaNodes.reduce(function (acc, _ref) {
|
|
42
42
|
var getPos = _ref.getPos;
|
|
43
43
|
var pos = getPos();
|
|
44
|
-
if (isNaN(pos) || typeof pos === 'number' && !isMediaNode(pos, state)) {
|
|
44
|
+
if (typeof pos !== 'number' || isNaN(pos) || typeof pos === 'number' && !isMediaNode(pos, state)) {
|
|
45
45
|
return acc;
|
|
46
46
|
}
|
|
47
47
|
acc.push(pos);
|
|
@@ -64,7 +64,7 @@ export var updateAllMediaSingleNodesAttrs = function updateAllMediaSingleNodesAt
|
|
|
64
64
|
export var updateCurrentMediaNodeAttrs = function updateCurrentMediaNodeAttrs(attrs, mediaNode) {
|
|
65
65
|
return function (state, dispatch) {
|
|
66
66
|
var pos = mediaNode.getPos();
|
|
67
|
-
if (isNaN(pos) || typeof pos === 'number' && !isMediaNode(pos, state)) {
|
|
67
|
+
if (typeof pos !== 'number' || isNaN(pos) || typeof pos === 'number' && !isMediaNode(pos, state)) {
|
|
68
68
|
return false;
|
|
69
69
|
}
|
|
70
70
|
var tr = state.tr;
|
|
@@ -85,7 +85,7 @@ export var updateMediaSingleNodeAttrs = function updateMediaSingleNodeAttrs(id,
|
|
|
85
85
|
}
|
|
86
86
|
var tr = state.tr;
|
|
87
87
|
var pos = mediaNodeWithPos.getPos();
|
|
88
|
-
if (!isMediaNode(pos, state)) {
|
|
88
|
+
if (typeof pos !== 'number' || !isMediaNode(pos, state)) {
|
|
89
89
|
return false;
|
|
90
90
|
}
|
|
91
91
|
tr.step(new SetAttrsStep(pos, attrs)).setMeta('addToHistory', false);
|
|
@@ -25,7 +25,11 @@ import { injectIntl } from 'react-intl-next';
|
|
|
25
25
|
import { messages } from './messages';
|
|
26
26
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
27
27
|
var isMediaGroupSelectedFromProps = function isMediaGroupSelectedFromProps(props) {
|
|
28
|
-
|
|
28
|
+
var pos = props.getPos();
|
|
29
|
+
if (typeof pos !== 'number') {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return isNodeSelectedOrInRange(props.anchorPos, props.headPos, pos, props.node.nodeSize);
|
|
29
33
|
};
|
|
30
34
|
var hasSelectionChanged = function hasSelectionChanged(oldProps, newProps) {
|
|
31
35
|
if (isMediaGroupSelectedFromProps(oldProps) !== isMediaGroupSelectedFromProps(newProps)) {
|
|
@@ -66,7 +70,16 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
66
70
|
_this.mediaNodes = [];
|
|
67
71
|
node.forEach(function (item, childOffset) {
|
|
68
72
|
var getPos = function getPos() {
|
|
69
|
-
|
|
73
|
+
var pos = props.getPos();
|
|
74
|
+
if (typeof pos !== 'number') {
|
|
75
|
+
// That may seems weird, but the previous type wasn't match with the real ProseMirror code. And a lot of Media API was built expecting a number
|
|
76
|
+
// Because the original code would return NaN on runtime
|
|
77
|
+
// We are just make it explict now.
|
|
78
|
+
// We may run a deep investagation on Media code to figure out a better fix. But, for now, we want to keep the current behavior.
|
|
79
|
+
// TODO: ED-13910 prosemirror-bump leftovers
|
|
80
|
+
return NaN;
|
|
81
|
+
}
|
|
82
|
+
return pos + childOffset + 1;
|
|
70
83
|
};
|
|
71
84
|
_this.mediaNodes.push(item);
|
|
72
85
|
if (updatedAttrs) {
|
|
@@ -108,7 +121,16 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
108
121
|
var items = _this.mediaNodes.map(function (item, idx) {
|
|
109
122
|
// We declared this to get a fresh position every time
|
|
110
123
|
var getNodePos = function getNodePos() {
|
|
111
|
-
|
|
124
|
+
var pos = getPos();
|
|
125
|
+
if (typeof pos !== 'number') {
|
|
126
|
+
// That may seems weird, but the previous type wasn't match with the real ProseMirror code. And a lot of Media API was built expecting a number
|
|
127
|
+
// Because the original code would return NaN on runtime
|
|
128
|
+
// We are just make it explict now.
|
|
129
|
+
// We may run a deep investagation on Media code to figure out a better fix. But, for now, we want to keep the current behavior.
|
|
130
|
+
// TODO: ED-13910 prosemirror-bump leftovers
|
|
131
|
+
return NaN;
|
|
132
|
+
}
|
|
133
|
+
return pos + idx + 1;
|
|
112
134
|
};
|
|
113
135
|
|
|
114
136
|
// Media Inline creates a floating toolbar with the same options, excludes these options if enabled
|
|
@@ -175,7 +197,16 @@ var MediaGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
175
197
|
isMediaSingle: false
|
|
176
198
|
});
|
|
177
199
|
getPos = function getPos() {
|
|
178
|
-
|
|
200
|
+
var pos = _this2.props.getPos();
|
|
201
|
+
if (typeof pos !== 'number') {
|
|
202
|
+
// That may seems weird, but the previous type wasn't match with the real ProseMirror code. And a lot of Media API was built expecting a number
|
|
203
|
+
// Because the original code would return NaN on runtime
|
|
204
|
+
// We are just make it explict now.
|
|
205
|
+
// We may run a deep investagation on Media code to figure out a better fix. But, for now, we want to keep the current behavior.
|
|
206
|
+
// TODO: ED-13910 prosemirror-bump leftovers
|
|
207
|
+
return NaN;
|
|
208
|
+
}
|
|
209
|
+
return pos + 1;
|
|
179
210
|
};
|
|
180
211
|
contextId = mediaNodeUpdater.getNodeContextId();
|
|
181
212
|
if (contextId) {
|
|
@@ -216,7 +216,7 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
216
216
|
})));
|
|
217
217
|
_defineProperty(this, "uploadExternalMedia", /*#__PURE__*/function () {
|
|
218
218
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(getPos) {
|
|
219
|
-
var node, mediaProvider, uploadMediaClientConfig, mediaClient, collection, uploader, uploadableFileUpfrontIds, dimensions;
|
|
219
|
+
var node, mediaProvider, uploadMediaClientConfig, mediaClient, collection, uploader, uploadableFileUpfrontIds, dimensions, pos;
|
|
220
220
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
221
221
|
while (1) switch (_context7.prev = _context7.next) {
|
|
222
222
|
case 0:
|
|
@@ -226,7 +226,7 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
226
226
|
case 3:
|
|
227
227
|
mediaProvider = _context7.sent;
|
|
228
228
|
if (!(node && mediaProvider)) {
|
|
229
|
-
_context7.next =
|
|
229
|
+
_context7.next = 24;
|
|
230
230
|
break;
|
|
231
231
|
}
|
|
232
232
|
uploadMediaClientConfig = mediaProvider.uploadMediaClientConfig;
|
|
@@ -244,17 +244,24 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
244
244
|
case 13:
|
|
245
245
|
uploader = _context7.sent;
|
|
246
246
|
uploadableFileUpfrontIds = uploader.uploadableFileUpfrontIds, dimensions = uploader.dimensions;
|
|
247
|
-
|
|
247
|
+
pos = getPos();
|
|
248
|
+
if (!(typeof pos !== 'number')) {
|
|
249
|
+
_context7.next = 18;
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
return _context7.abrupt("return");
|
|
253
|
+
case 18:
|
|
254
|
+
replaceExternalMedia(pos + 1, {
|
|
248
255
|
id: uploadableFileUpfrontIds.id,
|
|
249
256
|
collection: collection,
|
|
250
257
|
height: dimensions.height,
|
|
251
258
|
width: dimensions.width,
|
|
252
259
|
occurrenceKey: uploadableFileUpfrontIds.occurrenceKey
|
|
253
260
|
})(_this.props.view.state, _this.props.view.dispatch);
|
|
254
|
-
_context7.next =
|
|
261
|
+
_context7.next = 24;
|
|
255
262
|
break;
|
|
256
|
-
case
|
|
257
|
-
_context7.prev =
|
|
263
|
+
case 21:
|
|
264
|
+
_context7.prev = 21;
|
|
258
265
|
_context7.t0 = _context7["catch"](10);
|
|
259
266
|
//keep it as external media
|
|
260
267
|
if (_this.props.dispatchAnalyticsEvent) {
|
|
@@ -264,11 +271,11 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
264
271
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
265
272
|
});
|
|
266
273
|
}
|
|
267
|
-
case
|
|
274
|
+
case 24:
|
|
268
275
|
case "end":
|
|
269
276
|
return _context7.stop();
|
|
270
277
|
}
|
|
271
|
-
}, _callee7, null, [[10,
|
|
278
|
+
}, _callee7, null, [[10, 21]]);
|
|
272
279
|
}));
|
|
273
280
|
return function (_x3) {
|
|
274
281
|
return _ref8.apply(this, arguments);
|
|
@@ -360,7 +367,7 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
360
367
|
})));
|
|
361
368
|
_defineProperty(this, "copyNodeFromBlobUrl", /*#__PURE__*/function () {
|
|
362
369
|
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(getPos) {
|
|
363
|
-
var attrs, url, mediaAttrs, mediaProvider, currentCollectionName, contextId, id, collection, height, width, mimeType, name, size, uploadMediaClientConfig, mediaClient, auth, source, destination, mediaFile;
|
|
370
|
+
var attrs, url, mediaAttrs, mediaProvider, currentCollectionName, contextId, id, collection, height, width, mimeType, name, size, uploadMediaClientConfig, mediaClient, auth, source, destination, mediaFile, pos;
|
|
364
371
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
365
372
|
while (1) switch (_context10.prev = _context10.next) {
|
|
366
373
|
case 0:
|
|
@@ -419,7 +426,14 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
419
426
|
return mediaClient.file.copyFile(source, destination);
|
|
420
427
|
case 25:
|
|
421
428
|
mediaFile = _context10.sent;
|
|
422
|
-
|
|
429
|
+
pos = getPos();
|
|
430
|
+
if (!(typeof pos !== 'number')) {
|
|
431
|
+
_context10.next = 29;
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
return _context10.abrupt("return");
|
|
435
|
+
case 29:
|
|
436
|
+
replaceExternalMedia(pos + 1, {
|
|
423
437
|
id: mediaFile.id,
|
|
424
438
|
collection: currentCollectionName,
|
|
425
439
|
height: height,
|
|
@@ -428,7 +442,7 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
|
|
|
428
442
|
__fileMimeType: mimeType,
|
|
429
443
|
__fileSize: size
|
|
430
444
|
})(_this.props.view.state, _this.props.view.dispatch);
|
|
431
|
-
case
|
|
445
|
+
case 30:
|
|
432
446
|
case "end":
|
|
433
447
|
return _context10.stop();
|
|
434
448
|
}
|
|
@@ -55,10 +55,14 @@ export var MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
_this.selectMediaSingle(event);
|
|
56
56
|
});
|
|
57
57
|
_defineProperty(_assertThisInitialized(_this), "selectMediaSingle", function (event) {
|
|
58
|
+
var propPos = _this.props.getPos();
|
|
59
|
+
if (typeof propPos !== 'number') {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
58
63
|
// We need to call "stopPropagation" here in order to prevent the browser from navigating to
|
|
59
64
|
// another URL if the media node is wrapped in a link mark.
|
|
60
65
|
event.stopPropagation();
|
|
61
|
-
var propPos = _this.props.getPos();
|
|
62
66
|
var state = _this.props.view.state;
|
|
63
67
|
if (event.shiftKey) {
|
|
64
68
|
// don't select text if there is current selection in a table (as this would override selected cells)
|
|
@@ -169,10 +169,14 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
169
169
|
}());
|
|
170
170
|
_defineProperty(_assertThisInitialized(_this), "selectMediaSingle", function (_ref3) {
|
|
171
171
|
var event = _ref3.event;
|
|
172
|
+
var propPos = _this.props.getPos();
|
|
173
|
+
if (typeof propPos !== 'number') {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
|
|
172
177
|
// We need to call "stopPropagation" here in order to prevent the browser from navigating to
|
|
173
178
|
// another URL if the media node is wrapped in a link mark.
|
|
174
179
|
event.stopPropagation();
|
|
175
|
-
var propPos = _this.props.getPos();
|
|
176
180
|
var state = _this.props.view.state;
|
|
177
181
|
if (event.shiftKey) {
|
|
178
182
|
// don't select text if there is current selection in a table (as this would override selected cells)
|
|
@@ -244,6 +248,9 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
244
248
|
insertAndSelectCaptionFromMediaSinglePos(getPos(), node)(view.state, view.dispatch);
|
|
245
249
|
});
|
|
246
250
|
_defineProperty(_assertThisInitialized(_this), "getLineLength", function (view, pos) {
|
|
251
|
+
if (typeof pos !== 'number') {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
247
254
|
if (isRichMediaInsideOfBlockNode(view, pos)) {
|
|
248
255
|
var $pos = view.state.doc.resolve(pos);
|
|
249
256
|
var domNode = view.nodeDOM($pos.pos);
|
|
@@ -293,7 +293,11 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
293
293
|
_defineProperty(this, "handleMediaNodeRemoval", function (node, getPos) {
|
|
294
294
|
var getNode = node;
|
|
295
295
|
if (!getNode) {
|
|
296
|
-
|
|
296
|
+
var pos = getPos();
|
|
297
|
+
if (typeof pos !== 'number') {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
getNode = _this.view.state.doc.nodeAt(pos);
|
|
297
301
|
}
|
|
298
302
|
removeMediaNode(_this.view, getNode, getPos);
|
|
299
303
|
});
|
|
@@ -111,6 +111,9 @@ export var removeMediaNode = function removeMediaNode(view, node, getPos) {
|
|
|
111
111
|
selection = state.selection,
|
|
112
112
|
doc = state.doc;
|
|
113
113
|
var currentMediaNodePos = getPos();
|
|
114
|
+
if (typeof currentMediaNodePos !== 'number') {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
114
117
|
tr.deleteRange(currentMediaNodePos, currentMediaNodePos + node.nodeSize);
|
|
115
118
|
if (isTemporary(id)) {
|
|
116
119
|
tr.setMeta('addToHistory', false);
|
|
@@ -40,6 +40,9 @@ export var PlaceholderTextNodeView = /*#__PURE__*/function () {
|
|
|
40
40
|
e.preventDefault();
|
|
41
41
|
var _view = this.view;
|
|
42
42
|
var startNodePosition = this.getPos();
|
|
43
|
+
if (typeof startNodePosition !== 'number') {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
43
46
|
var tr = _view.state.tr;
|
|
44
47
|
tr.setSelection(Selection.near(tr.doc.resolve(startNodePosition)));
|
|
45
48
|
_view.dispatch(tr);
|
|
@@ -56,7 +59,10 @@ export var PlaceholderTextNodeView = /*#__PURE__*/function () {
|
|
|
56
59
|
var view = this.view,
|
|
57
60
|
node = this.node;
|
|
58
61
|
var placeholderStartPosition = this.getPos();
|
|
59
|
-
|
|
62
|
+
if (typeof placeholderStartPosition !== 'number') {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
var placeholderEndPosition = placeholderStartPosition + node.nodeSize;
|
|
60
66
|
var selection = view.state.selection;
|
|
61
67
|
|
|
62
68
|
// when the selection is set right after the placeholder.
|
|
@@ -31,6 +31,9 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
31
31
|
_defineProperty(_assertThisInitialized(_this), "handleOnChange", function (taskId, isChecked) {
|
|
32
32
|
var tr = _this.view.state.tr;
|
|
33
33
|
var nodePos = _this.getPos();
|
|
34
|
+
if (typeof nodePos !== 'number') {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
34
37
|
|
|
35
38
|
// SetAttrsStep should be used to prevent task updates from being dropped when mapping task ticks
|
|
36
39
|
// from a previous version of the document, such as a published page.
|
|
@@ -52,7 +55,11 @@ var Task = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
52
55
|
*/
|
|
53
56
|
_defineProperty(_assertThisInitialized(_this), "addListAnalyticsData", function (event) {
|
|
54
57
|
try {
|
|
55
|
-
var
|
|
58
|
+
var nodePos = _this.getPos();
|
|
59
|
+
if (typeof nodePos !== 'number') {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
var resolvedPos = _this.view.state.doc.resolve(nodePos);
|
|
56
63
|
var position = resolvedPos.index();
|
|
57
64
|
var listSize = resolvedPos.parent.childCount;
|
|
58
65
|
var listLocalId = resolvedPos.parent.attrs.localId;
|
package/dist/esm/version.json
CHANGED
|
@@ -2,9 +2,9 @@ import { Node as PMNode } from 'prosemirror-model';
|
|
|
2
2
|
export interface ReactNodeProps {
|
|
3
3
|
selected: boolean;
|
|
4
4
|
}
|
|
5
|
-
export type ProsemirrorGetPosHandler = () => number;
|
|
5
|
+
export type ProsemirrorGetPosHandler = () => number | undefined;
|
|
6
6
|
export type getPosHandler = getPosHandlerNode | boolean;
|
|
7
|
-
export type getPosHandlerNode = () => number;
|
|
7
|
+
export type getPosHandlerNode = () => number | undefined;
|
|
8
8
|
export type ReactComponentProps = {
|
|
9
9
|
[key: string]: unknown;
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Node as PMNode } from 'prosemirror-model';
|
|
2
2
|
import { Command } from '../../../types';
|
|
3
3
|
export declare const selectCaptionFromMediaSinglePos: (mediaSingleNodePos: number, mediaSingleNode: PMNode) => Command;
|
|
4
|
-
export declare const insertAndSelectCaptionFromMediaSinglePos: (mediaSingleNodePos: number, mediaSingleNode: PMNode) => Command;
|
|
4
|
+
export declare const insertAndSelectCaptionFromMediaSinglePos: (mediaSingleNodePos: number | undefined, mediaSingleNode: PMNode) => Command;
|
|
@@ -15,7 +15,7 @@ export type MediaGroupProps = {
|
|
|
15
15
|
forwardRef?: (ref: HTMLElement) => void;
|
|
16
16
|
node: PMNode;
|
|
17
17
|
view: EditorView;
|
|
18
|
-
getPos: () => number;
|
|
18
|
+
getPos: () => number | undefined;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
allowLazyLoading?: boolean;
|
|
21
21
|
mediaProvider: Promise<MediaProvider>;
|
|
@@ -2,9 +2,9 @@ import { Node as PMNode } from 'prosemirror-model';
|
|
|
2
2
|
export interface ReactNodeProps {
|
|
3
3
|
selected: boolean;
|
|
4
4
|
}
|
|
5
|
-
export type ProsemirrorGetPosHandler = () => number;
|
|
5
|
+
export type ProsemirrorGetPosHandler = () => number | undefined;
|
|
6
6
|
export type getPosHandler = getPosHandlerNode | boolean;
|
|
7
|
-
export type getPosHandlerNode = () => number;
|
|
7
|
+
export type getPosHandlerNode = () => number | undefined;
|
|
8
8
|
export type ReactComponentProps = {
|
|
9
9
|
[key: string]: unknown;
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Node as PMNode } from 'prosemirror-model';
|
|
2
2
|
import { Command } from '../../../types';
|
|
3
3
|
export declare const selectCaptionFromMediaSinglePos: (mediaSingleNodePos: number, mediaSingleNode: PMNode) => Command;
|
|
4
|
-
export declare const insertAndSelectCaptionFromMediaSinglePos: (mediaSingleNodePos: number, mediaSingleNode: PMNode) => Command;
|
|
4
|
+
export declare const insertAndSelectCaptionFromMediaSinglePos: (mediaSingleNodePos: number | undefined, mediaSingleNode: PMNode) => Command;
|
|
@@ -15,7 +15,7 @@ export type MediaGroupProps = {
|
|
|
15
15
|
forwardRef?: (ref: HTMLElement) => void;
|
|
16
16
|
node: PMNode;
|
|
17
17
|
view: EditorView;
|
|
18
|
-
getPos: () => number;
|
|
18
|
+
getPos: () => number | undefined;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
allowLazyLoading?: boolean;
|
|
21
21
|
mediaProvider: Promise<MediaProvider>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "185.
|
|
3
|
+
"version": "185.3.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@atlaskit/code": "^14.6.0",
|
|
50
50
|
"@atlaskit/date": "^0.10.0",
|
|
51
51
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
52
|
-
"@atlaskit/editor-common": "^74.
|
|
52
|
+
"@atlaskit/editor-common": "^74.9.0",
|
|
53
53
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
54
54
|
"@atlaskit/editor-markdown-transformer": "^5.2.0",
|
|
55
|
-
"@atlaskit/editor-palette": "1.5.
|
|
56
|
-
"@atlaskit/editor-plugin-analytics": "^0.0.
|
|
57
|
-
"@atlaskit/editor-plugin-content-insertion": "^0.0.
|
|
55
|
+
"@atlaskit/editor-palette": "1.5.1",
|
|
56
|
+
"@atlaskit/editor-plugin-analytics": "^0.0.3",
|
|
57
|
+
"@atlaskit/editor-plugin-content-insertion": "^0.0.3",
|
|
58
58
|
"@atlaskit/editor-plugin-context-panel": "^0.1.0",
|
|
59
59
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
60
60
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
66
66
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
67
67
|
"@atlaskit/emoji": "^67.4.0",
|
|
68
|
-
"@atlaskit/empty-state": "^7.
|
|
68
|
+
"@atlaskit/empty-state": "^7.6.0",
|
|
69
69
|
"@atlaskit/form": "^8.11.0",
|
|
70
70
|
"@atlaskit/icon": "^21.12.0",
|
|
71
71
|
"@atlaskit/icon-object": "^6.3.0",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"@atlaskit/media-client": "^23.1.0",
|
|
78
78
|
"@atlaskit/media-common": "^7.0.0",
|
|
79
79
|
"@atlaskit/media-filmstrip": "^47.0.0",
|
|
80
|
-
"@atlaskit/media-picker": "^66.
|
|
81
|
-
"@atlaskit/media-ui": "^23.
|
|
80
|
+
"@atlaskit/media-picker": "^66.1.0",
|
|
81
|
+
"@atlaskit/media-ui": "^23.1.0",
|
|
82
82
|
"@atlaskit/media-viewer": "^48.0.0",
|
|
83
83
|
"@atlaskit/mention": "^22.1.0",
|
|
84
84
|
"@atlaskit/menu": "^1.7.0",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@atlaskit/textfield": "^5.5.0",
|
|
100
100
|
"@atlaskit/theme": "^12.5.0",
|
|
101
101
|
"@atlaskit/toggle": "^12.6.0",
|
|
102
|
-
"@atlaskit/tokens": "^1.
|
|
102
|
+
"@atlaskit/tokens": "^1.9.0",
|
|
103
103
|
"@atlaskit/tooltip": "^17.8.0",
|
|
104
104
|
"@atlaskit/width-detector": "^4.1.0",
|
|
105
105
|
"@babel/runtime": "^7.0.0",
|
|
@@ -248,6 +248,10 @@
|
|
|
248
248
|
},
|
|
249
249
|
"platform.linking-platform.editor.fix-link-insert-analytics": {
|
|
250
250
|
"type": "boolean"
|
|
251
|
+
},
|
|
252
|
+
"platform.design-system-team.menu-selected-state-change_0see9": {
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"referenceOnly": "true"
|
|
251
255
|
}
|
|
252
256
|
}
|
|
253
257
|
}
|
package/report.api.md
CHANGED
|
@@ -1202,7 +1202,7 @@ export function getNodesCount(node: Node_2): Record<string, number>;
|
|
|
1202
1202
|
type getPosHandler = boolean | getPosHandlerNode;
|
|
1203
1203
|
|
|
1204
1204
|
// @public (undocumented)
|
|
1205
|
-
type getPosHandlerNode = () => number;
|
|
1205
|
+
type getPosHandlerNode = () => number | undefined;
|
|
1206
1206
|
|
|
1207
1207
|
// @public
|
|
1208
1208
|
export function hasVisibleContent(node: Node_2): boolean;
|
|
@@ -2003,7 +2003,7 @@ type Props_5 = {
|
|
|
2003
2003
|
};
|
|
2004
2004
|
|
|
2005
2005
|
// @public (undocumented)
|
|
2006
|
-
type ProsemirrorGetPosHandler = () => number;
|
|
2006
|
+
type ProsemirrorGetPosHandler = () => number | undefined;
|
|
2007
2007
|
|
|
2008
2008
|
export { QuickInsertActionInsert };
|
|
2009
2009
|
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -1101,7 +1101,7 @@ export function getNodesCount(node: Node_2): Record<string, number>;
|
|
|
1101
1101
|
type getPosHandler = boolean | getPosHandlerNode;
|
|
1102
1102
|
|
|
1103
1103
|
// @public (undocumented)
|
|
1104
|
-
type getPosHandlerNode = () => number;
|
|
1104
|
+
type getPosHandlerNode = () => number | undefined;
|
|
1105
1105
|
|
|
1106
1106
|
// @public
|
|
1107
1107
|
export function hasVisibleContent(node: Node_2): boolean;
|
|
@@ -1784,7 +1784,7 @@ type Props_5 = {
|
|
|
1784
1784
|
};
|
|
1785
1785
|
|
|
1786
1786
|
// @public (undocumented)
|
|
1787
|
-
type ProsemirrorGetPosHandler = () => number;
|
|
1787
|
+
type ProsemirrorGetPosHandler = () => number | undefined;
|
|
1788
1788
|
|
|
1789
1789
|
export { QuickInsertActionInsert }
|
|
1790
1790
|
|