@atlaskit/editor-plugin-block-controls 11.2.18 → 11.2.20
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/pm-plugins/main.js +76 -82
- package/dist/es2019/pm-plugins/main.js +31 -37
- package/dist/esm/pm-plugins/main.js +76 -82
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -453,43 +453,41 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
|
|
|
453
453
|
var _activeNode7, _activeNode8;
|
|
454
454
|
var oldQuickInsertButton = (0, _decorationsQuickInsertButton.findQuickInsertInsertButtonDecoration)(decorations, (_activeNode7 = activeNode) === null || _activeNode7 === void 0 ? void 0 : _activeNode7.rootPos, (_activeNode8 = activeNode) === null || _activeNode8 === void 0 ? void 0 : _activeNode8.rootPos);
|
|
455
455
|
decorations = decorations.remove(oldQuickInsertButton);
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
var
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
_loop();
|
|
470
|
-
}
|
|
471
|
-
} catch (err) {
|
|
472
|
-
_iterator.e(err);
|
|
473
|
-
} finally {
|
|
474
|
-
_iterator.f();
|
|
456
|
+
var _iterator = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
457
|
+
_step;
|
|
458
|
+
try {
|
|
459
|
+
var _loop2 = function _loop2() {
|
|
460
|
+
var _activeNode1, _activeNode10;
|
|
461
|
+
var factory = _step.value;
|
|
462
|
+
var old = decorations.find((_activeNode1 = activeNode) === null || _activeNode1 === void 0 ? void 0 : _activeNode1.rootPos, (_activeNode10 = activeNode) === null || _activeNode10 === void 0 ? void 0 : _activeNode10.rootPos, function (spec) {
|
|
463
|
+
return spec.type === factory.type;
|
|
464
|
+
});
|
|
465
|
+
decorations = decorations.remove(old);
|
|
466
|
+
};
|
|
467
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
468
|
+
_loop2();
|
|
475
469
|
}
|
|
470
|
+
} catch (err) {
|
|
471
|
+
_iterator.e(err);
|
|
472
|
+
} finally {
|
|
473
|
+
_iterator.f();
|
|
476
474
|
}
|
|
477
475
|
if (rightSideControlsEnabled && isViewMode && (0, _platformFeatureFlags.fg)('confluence_remix_button_right_side_block_fg')) {
|
|
478
476
|
var _iterator2 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
479
477
|
_step2;
|
|
480
478
|
try {
|
|
481
|
-
var
|
|
479
|
+
var _loop = function _loop() {
|
|
482
480
|
var factory = _step2.value;
|
|
483
481
|
if (factory.showInViewMode) {
|
|
484
|
-
var
|
|
485
|
-
var old = decorations.find((
|
|
482
|
+
var _activeNode9, _activeNode0;
|
|
483
|
+
var old = decorations.find((_activeNode9 = activeNode) === null || _activeNode9 === void 0 ? void 0 : _activeNode9.rootPos, (_activeNode0 = activeNode) === null || _activeNode0 === void 0 ? void 0 : _activeNode0.rootPos, function (spec) {
|
|
486
484
|
return spec.type === factory.type;
|
|
487
485
|
});
|
|
488
486
|
decorations = decorations.remove(old);
|
|
489
487
|
}
|
|
490
488
|
};
|
|
491
489
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
492
|
-
|
|
490
|
+
_loop();
|
|
493
491
|
}
|
|
494
492
|
} catch (err) {
|
|
495
493
|
_iterator2.e(err);
|
|
@@ -536,69 +534,65 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
|
|
|
536
534
|
editorState: newState
|
|
537
535
|
});
|
|
538
536
|
decorations = decorations.add(newState.doc, [quickInsertButton]);
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
rootNodeType: latestActiveNode.rootNodeType
|
|
560
|
-
};
|
|
561
|
-
var old = decorations.find((_activeNode15 = activeNode) === null || _activeNode15 === void 0 ? void 0 : _activeNode15.rootPos, (_activeNode16 = activeNode) === null || _activeNode16 === void 0 ? void 0 : _activeNode16.rootPos, function (spec) {
|
|
562
|
-
return spec.type === factory.type;
|
|
563
|
-
});
|
|
564
|
-
decorations = decorations.remove(old);
|
|
565
|
-
|
|
566
|
-
// determines whether to show the decorations, see malleableUiPlugin.tsx
|
|
567
|
-
if (factory.shouldCreate && !factory.shouldCreate(params)) {
|
|
568
|
-
return 0; // continue
|
|
569
|
-
}
|
|
570
|
-
var dec = factory.create(params);
|
|
571
|
-
decorations = decorations.add(newState.doc, [dec]);
|
|
572
|
-
},
|
|
573
|
-
_ret;
|
|
574
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
575
|
-
_ret = _loop3();
|
|
576
|
-
if (_ret === 0) continue;
|
|
577
|
-
}
|
|
578
|
-
} catch (err) {
|
|
579
|
-
_iterator3.e(err);
|
|
580
|
-
} finally {
|
|
581
|
-
_iterator3.f();
|
|
582
|
-
}
|
|
583
|
-
} else {
|
|
584
|
-
var _iterator4 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
585
|
-
_step4;
|
|
586
|
-
try {
|
|
587
|
-
var _loop4 = function _loop4() {
|
|
588
|
-
var factory = _step4.value;
|
|
589
|
-
var old = decorations.find(0, newState.doc.nodeSize, function (spec) {
|
|
537
|
+
if (rightSideControlsEnabled) {
|
|
538
|
+
var _iterator3 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
539
|
+
_step3;
|
|
540
|
+
try {
|
|
541
|
+
var _loop3 = function _loop3() {
|
|
542
|
+
var _activeNode15, _activeNode16;
|
|
543
|
+
var factory = _step3.value;
|
|
544
|
+
if (!latestActiveNode || latestActiveNode.rootPos === undefined) {
|
|
545
|
+
return 0; // continue
|
|
546
|
+
}
|
|
547
|
+
var params = {
|
|
548
|
+
editorState: newState,
|
|
549
|
+
nodeViewPortalProviderAPI: nodeViewPortalProviderAPI,
|
|
550
|
+
anchorName: latestActiveNode.anchorName,
|
|
551
|
+
nodeType: latestActiveNode.nodeType,
|
|
552
|
+
rootPos: latestActiveNode.rootPos,
|
|
553
|
+
rootAnchorName: latestActiveNode.rootAnchorName,
|
|
554
|
+
rootNodeType: latestActiveNode.rootNodeType
|
|
555
|
+
};
|
|
556
|
+
var old = decorations.find((_activeNode15 = activeNode) === null || _activeNode15 === void 0 ? void 0 : _activeNode15.rootPos, (_activeNode16 = activeNode) === null || _activeNode16 === void 0 ? void 0 : _activeNode16.rootPos, function (spec) {
|
|
590
557
|
return spec.type === factory.type;
|
|
591
558
|
});
|
|
592
559
|
decorations = decorations.remove(old);
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
560
|
+
|
|
561
|
+
// determines whether to show the decorations, see malleableUiPlugin.tsx
|
|
562
|
+
if (factory.shouldCreate && !factory.shouldCreate(params)) {
|
|
563
|
+
return 0; // continue
|
|
564
|
+
}
|
|
565
|
+
var dec = factory.create(params);
|
|
566
|
+
decorations = decorations.add(newState.doc, [dec]);
|
|
567
|
+
},
|
|
568
|
+
_ret;
|
|
569
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
570
|
+
_ret = _loop3();
|
|
571
|
+
if (_ret === 0) continue;
|
|
572
|
+
}
|
|
573
|
+
} catch (err) {
|
|
574
|
+
_iterator3.e(err);
|
|
575
|
+
} finally {
|
|
576
|
+
_iterator3.f();
|
|
577
|
+
}
|
|
578
|
+
} else {
|
|
579
|
+
var _iterator4 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
580
|
+
_step4;
|
|
581
|
+
try {
|
|
582
|
+
var _loop4 = function _loop4() {
|
|
583
|
+
var factory = _step4.value;
|
|
584
|
+
var old = decorations.find(0, newState.doc.nodeSize, function (spec) {
|
|
585
|
+
return spec.type === factory.type;
|
|
586
|
+
});
|
|
587
|
+
decorations = decorations.remove(old);
|
|
588
|
+
};
|
|
589
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
590
|
+
_loop4();
|
|
601
591
|
}
|
|
592
|
+
} catch (err) {
|
|
593
|
+
_iterator4.e(err);
|
|
594
|
+
} finally {
|
|
595
|
+
_iterator4.f();
|
|
602
596
|
}
|
|
603
597
|
}
|
|
604
598
|
}
|
|
@@ -443,12 +443,10 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
|
|
|
443
443
|
var _activeNode7, _activeNode8;
|
|
444
444
|
const oldQuickInsertButton = findQuickInsertInsertButtonDecoration(decorations, (_activeNode7 = activeNode) === null || _activeNode7 === void 0 ? void 0 : _activeNode7.rootPos, (_activeNode8 = activeNode) === null || _activeNode8 === void 0 ? void 0 : _activeNode8.rootPos);
|
|
445
445
|
decorations = decorations.remove(oldQuickInsertButton);
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
decorations = decorations.remove(old);
|
|
451
|
-
}
|
|
446
|
+
for (const factory of nodeDecorationRegistry) {
|
|
447
|
+
var _activeNode9, _activeNode0;
|
|
448
|
+
const old = decorations.find((_activeNode9 = activeNode) === null || _activeNode9 === void 0 ? void 0 : _activeNode9.rootPos, (_activeNode0 = activeNode) === null || _activeNode0 === void 0 ? void 0 : _activeNode0.rootPos, spec => spec.type === factory.type);
|
|
449
|
+
decorations = decorations.remove(old);
|
|
452
450
|
}
|
|
453
451
|
if (rightSideControlsEnabled && isViewMode && fg('confluence_remix_button_right_side_block_fg')) {
|
|
454
452
|
for (const factory of nodeDecorationRegistry) {
|
|
@@ -498,39 +496,35 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
|
|
|
498
496
|
editorState: newState
|
|
499
497
|
});
|
|
500
498
|
decorations = decorations.add(newState.doc, [quickInsertButton]);
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
var _activeNode15, _activeNode16;
|
|
507
|
-
if (!latestActiveNode || latestActiveNode.rootPos === undefined) {
|
|
508
|
-
continue;
|
|
509
|
-
}
|
|
510
|
-
const params = {
|
|
511
|
-
editorState: newState,
|
|
512
|
-
nodeViewPortalProviderAPI,
|
|
513
|
-
anchorName: latestActiveNode.anchorName,
|
|
514
|
-
nodeType: latestActiveNode.nodeType,
|
|
515
|
-
rootPos: latestActiveNode.rootPos,
|
|
516
|
-
rootAnchorName: latestActiveNode.rootAnchorName,
|
|
517
|
-
rootNodeType: latestActiveNode.rootNodeType
|
|
518
|
-
};
|
|
519
|
-
const old = decorations.find((_activeNode15 = activeNode) === null || _activeNode15 === void 0 ? void 0 : _activeNode15.rootPos, (_activeNode16 = activeNode) === null || _activeNode16 === void 0 ? void 0 : _activeNode16.rootPos, spec => spec.type === factory.type);
|
|
520
|
-
decorations = decorations.remove(old);
|
|
521
|
-
|
|
522
|
-
// determines whether to show the decorations, see malleableUiPlugin.tsx
|
|
523
|
-
if (factory.shouldCreate && !factory.shouldCreate(params)) {
|
|
524
|
-
continue;
|
|
525
|
-
}
|
|
526
|
-
const dec = factory.create(params);
|
|
527
|
-
decorations = decorations.add(newState.doc, [dec]);
|
|
499
|
+
if (rightSideControlsEnabled) {
|
|
500
|
+
for (const factory of nodeDecorationRegistry) {
|
|
501
|
+
var _activeNode15, _activeNode16;
|
|
502
|
+
if (!latestActiveNode || latestActiveNode.rootPos === undefined) {
|
|
503
|
+
continue;
|
|
528
504
|
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
505
|
+
const params = {
|
|
506
|
+
editorState: newState,
|
|
507
|
+
nodeViewPortalProviderAPI,
|
|
508
|
+
anchorName: latestActiveNode.anchorName,
|
|
509
|
+
nodeType: latestActiveNode.nodeType,
|
|
510
|
+
rootPos: latestActiveNode.rootPos,
|
|
511
|
+
rootAnchorName: latestActiveNode.rootAnchorName,
|
|
512
|
+
rootNodeType: latestActiveNode.rootNodeType
|
|
513
|
+
};
|
|
514
|
+
const old = decorations.find((_activeNode15 = activeNode) === null || _activeNode15 === void 0 ? void 0 : _activeNode15.rootPos, (_activeNode16 = activeNode) === null || _activeNode16 === void 0 ? void 0 : _activeNode16.rootPos, spec => spec.type === factory.type);
|
|
515
|
+
decorations = decorations.remove(old);
|
|
516
|
+
|
|
517
|
+
// determines whether to show the decorations, see malleableUiPlugin.tsx
|
|
518
|
+
if (factory.shouldCreate && !factory.shouldCreate(params)) {
|
|
519
|
+
continue;
|
|
533
520
|
}
|
|
521
|
+
const dec = factory.create(params);
|
|
522
|
+
decorations = decorations.add(newState.doc, [dec]);
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
for (const factory of nodeDecorationRegistry) {
|
|
526
|
+
const old = decorations.find(0, newState.doc.nodeSize, spec => spec.type === factory.type);
|
|
527
|
+
decorations = decorations.remove(old);
|
|
534
528
|
}
|
|
535
529
|
}
|
|
536
530
|
}
|
|
@@ -446,43 +446,41 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
|
|
|
446
446
|
var _activeNode7, _activeNode8;
|
|
447
447
|
var oldQuickInsertButton = findQuickInsertInsertButtonDecoration(decorations, (_activeNode7 = activeNode) === null || _activeNode7 === void 0 ? void 0 : _activeNode7.rootPos, (_activeNode8 = activeNode) === null || _activeNode8 === void 0 ? void 0 : _activeNode8.rootPos);
|
|
448
448
|
decorations = decorations.remove(oldQuickInsertButton);
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
var
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
_loop();
|
|
463
|
-
}
|
|
464
|
-
} catch (err) {
|
|
465
|
-
_iterator.e(err);
|
|
466
|
-
} finally {
|
|
467
|
-
_iterator.f();
|
|
449
|
+
var _iterator = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
450
|
+
_step;
|
|
451
|
+
try {
|
|
452
|
+
var _loop2 = function _loop2() {
|
|
453
|
+
var _activeNode1, _activeNode10;
|
|
454
|
+
var factory = _step.value;
|
|
455
|
+
var old = decorations.find((_activeNode1 = activeNode) === null || _activeNode1 === void 0 ? void 0 : _activeNode1.rootPos, (_activeNode10 = activeNode) === null || _activeNode10 === void 0 ? void 0 : _activeNode10.rootPos, function (spec) {
|
|
456
|
+
return spec.type === factory.type;
|
|
457
|
+
});
|
|
458
|
+
decorations = decorations.remove(old);
|
|
459
|
+
};
|
|
460
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
461
|
+
_loop2();
|
|
468
462
|
}
|
|
463
|
+
} catch (err) {
|
|
464
|
+
_iterator.e(err);
|
|
465
|
+
} finally {
|
|
466
|
+
_iterator.f();
|
|
469
467
|
}
|
|
470
468
|
if (rightSideControlsEnabled && isViewMode && fg('confluence_remix_button_right_side_block_fg')) {
|
|
471
469
|
var _iterator2 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
472
470
|
_step2;
|
|
473
471
|
try {
|
|
474
|
-
var
|
|
472
|
+
var _loop = function _loop() {
|
|
475
473
|
var factory = _step2.value;
|
|
476
474
|
if (factory.showInViewMode) {
|
|
477
|
-
var
|
|
478
|
-
var old = decorations.find((
|
|
475
|
+
var _activeNode9, _activeNode0;
|
|
476
|
+
var old = decorations.find((_activeNode9 = activeNode) === null || _activeNode9 === void 0 ? void 0 : _activeNode9.rootPos, (_activeNode0 = activeNode) === null || _activeNode0 === void 0 ? void 0 : _activeNode0.rootPos, function (spec) {
|
|
479
477
|
return spec.type === factory.type;
|
|
480
478
|
});
|
|
481
479
|
decorations = decorations.remove(old);
|
|
482
480
|
}
|
|
483
481
|
};
|
|
484
482
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
485
|
-
|
|
483
|
+
_loop();
|
|
486
484
|
}
|
|
487
485
|
} catch (err) {
|
|
488
486
|
_iterator2.e(err);
|
|
@@ -529,69 +527,65 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
|
|
|
529
527
|
editorState: newState
|
|
530
528
|
});
|
|
531
529
|
decorations = decorations.add(newState.doc, [quickInsertButton]);
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
var
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
rootNodeType: latestActiveNode.rootNodeType
|
|
553
|
-
};
|
|
554
|
-
var old = decorations.find((_activeNode15 = activeNode) === null || _activeNode15 === void 0 ? void 0 : _activeNode15.rootPos, (_activeNode16 = activeNode) === null || _activeNode16 === void 0 ? void 0 : _activeNode16.rootPos, function (spec) {
|
|
555
|
-
return spec.type === factory.type;
|
|
556
|
-
});
|
|
557
|
-
decorations = decorations.remove(old);
|
|
558
|
-
|
|
559
|
-
// determines whether to show the decorations, see malleableUiPlugin.tsx
|
|
560
|
-
if (factory.shouldCreate && !factory.shouldCreate(params)) {
|
|
561
|
-
return 0; // continue
|
|
562
|
-
}
|
|
563
|
-
var dec = factory.create(params);
|
|
564
|
-
decorations = decorations.add(newState.doc, [dec]);
|
|
565
|
-
},
|
|
566
|
-
_ret;
|
|
567
|
-
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
568
|
-
_ret = _loop3();
|
|
569
|
-
if (_ret === 0) continue;
|
|
570
|
-
}
|
|
571
|
-
} catch (err) {
|
|
572
|
-
_iterator3.e(err);
|
|
573
|
-
} finally {
|
|
574
|
-
_iterator3.f();
|
|
575
|
-
}
|
|
576
|
-
} else {
|
|
577
|
-
var _iterator4 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
578
|
-
_step4;
|
|
579
|
-
try {
|
|
580
|
-
var _loop4 = function _loop4() {
|
|
581
|
-
var factory = _step4.value;
|
|
582
|
-
var old = decorations.find(0, newState.doc.nodeSize, function (spec) {
|
|
530
|
+
if (rightSideControlsEnabled) {
|
|
531
|
+
var _iterator3 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
532
|
+
_step3;
|
|
533
|
+
try {
|
|
534
|
+
var _loop3 = function _loop3() {
|
|
535
|
+
var _activeNode15, _activeNode16;
|
|
536
|
+
var factory = _step3.value;
|
|
537
|
+
if (!latestActiveNode || latestActiveNode.rootPos === undefined) {
|
|
538
|
+
return 0; // continue
|
|
539
|
+
}
|
|
540
|
+
var params = {
|
|
541
|
+
editorState: newState,
|
|
542
|
+
nodeViewPortalProviderAPI: nodeViewPortalProviderAPI,
|
|
543
|
+
anchorName: latestActiveNode.anchorName,
|
|
544
|
+
nodeType: latestActiveNode.nodeType,
|
|
545
|
+
rootPos: latestActiveNode.rootPos,
|
|
546
|
+
rootAnchorName: latestActiveNode.rootAnchorName,
|
|
547
|
+
rootNodeType: latestActiveNode.rootNodeType
|
|
548
|
+
};
|
|
549
|
+
var old = decorations.find((_activeNode15 = activeNode) === null || _activeNode15 === void 0 ? void 0 : _activeNode15.rootPos, (_activeNode16 = activeNode) === null || _activeNode16 === void 0 ? void 0 : _activeNode16.rootPos, function (spec) {
|
|
583
550
|
return spec.type === factory.type;
|
|
584
551
|
});
|
|
585
552
|
decorations = decorations.remove(old);
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
553
|
+
|
|
554
|
+
// determines whether to show the decorations, see malleableUiPlugin.tsx
|
|
555
|
+
if (factory.shouldCreate && !factory.shouldCreate(params)) {
|
|
556
|
+
return 0; // continue
|
|
557
|
+
}
|
|
558
|
+
var dec = factory.create(params);
|
|
559
|
+
decorations = decorations.add(newState.doc, [dec]);
|
|
560
|
+
},
|
|
561
|
+
_ret;
|
|
562
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
563
|
+
_ret = _loop3();
|
|
564
|
+
if (_ret === 0) continue;
|
|
565
|
+
}
|
|
566
|
+
} catch (err) {
|
|
567
|
+
_iterator3.e(err);
|
|
568
|
+
} finally {
|
|
569
|
+
_iterator3.f();
|
|
570
|
+
}
|
|
571
|
+
} else {
|
|
572
|
+
var _iterator4 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
573
|
+
_step4;
|
|
574
|
+
try {
|
|
575
|
+
var _loop4 = function _loop4() {
|
|
576
|
+
var factory = _step4.value;
|
|
577
|
+
var old = decorations.find(0, newState.doc.nodeSize, function (spec) {
|
|
578
|
+
return spec.type === factory.type;
|
|
579
|
+
});
|
|
580
|
+
decorations = decorations.remove(old);
|
|
581
|
+
};
|
|
582
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
583
|
+
_loop4();
|
|
594
584
|
}
|
|
585
|
+
} catch (err) {
|
|
586
|
+
_iterator4.e(err);
|
|
587
|
+
} finally {
|
|
588
|
+
_iterator4.f();
|
|
595
589
|
}
|
|
596
590
|
}
|
|
597
591
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.20",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@atlaskit/editor-plugin-interaction": "^19.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-limited-mode": "^7.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-metrics": "^11.0.0",
|
|
41
|
-
"@atlaskit/editor-plugin-quick-insert": "^10.
|
|
41
|
+
"@atlaskit/editor-plugin-quick-insert": "^10.3.0",
|
|
42
42
|
"@atlaskit/editor-plugin-selection": "^10.0.0",
|
|
43
|
-
"@atlaskit/editor-plugin-toolbar": "^7.
|
|
43
|
+
"@atlaskit/editor-plugin-toolbar": "^7.2.0",
|
|
44
44
|
"@atlaskit/editor-plugin-type-ahead": "^10.0.0",
|
|
45
45
|
"@atlaskit/editor-plugin-user-intent": "^8.1.0",
|
|
46
46
|
"@atlaskit/editor-plugin-width": "^11.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
50
50
|
"@atlaskit/icon": "^34.5.0",
|
|
51
|
-
"@atlaskit/icon-lab": "^6.
|
|
51
|
+
"@atlaskit/icon-lab": "^6.9.0",
|
|
52
52
|
"@atlaskit/link": "^3.4.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop": "^1.8.0",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^19.0.0",
|
|
58
58
|
"@atlaskit/theme": "^23.2.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^80.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^13.0.0",
|
|
61
|
-
"@atlaskit/tooltip": "^22.
|
|
61
|
+
"@atlaskit/tooltip": "^22.2.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|
|
64
64
|
"bind-event-listener": "^3.0.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"uuid": "^3.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@atlaskit/editor-common": "^114.
|
|
70
|
+
"@atlaskit/editor-common": "^114.30.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"react-dom": "^18.2.0",
|
|
73
73
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -138,9 +138,6 @@
|
|
|
138
138
|
"platform_editor_table_sticky_header_patch_6": {
|
|
139
139
|
"type": "boolean"
|
|
140
140
|
},
|
|
141
|
-
"platform_editor_expose_block_controls_deco_api": {
|
|
142
|
-
"type": "boolean"
|
|
143
|
-
},
|
|
144
141
|
"platform_editor_block_menu_jira_patch_1": {
|
|
145
142
|
"type": "boolean"
|
|
146
143
|
},
|