@atlaskit/editor-plugin-extension 22.0.7 → 22.0.8
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 +8 -0
- package/dist/cjs/pm-plugins/main.js +13 -18
- package/dist/es2019/pm-plugins/main.js +6 -9
- package/dist/esm/pm-plugins/main.js +13 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 22.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`45f8d6aea7dc6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/45f8d6aea7dc6) -
|
|
8
|
+
Clean up the permanently enabled `platform_editor_block_menu_transform_extensions` feature gate.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 22.0.7
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -13,7 +13,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
13
13
|
var _selection2 = require("@atlaskit/editor-common/selection");
|
|
14
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
16
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
17
16
|
var _commands = require("../editor-commands/commands");
|
|
18
17
|
var _blockTransforms = require("./block-transforms");
|
|
19
18
|
var _pluginFactory = require("./plugin-factory");
|
|
@@ -73,7 +72,7 @@ var createExtensionProviderHandler = exports.createExtensionProviderHandler = fu
|
|
|
73
72
|
while (1) switch (_context2.prev = _context2.next) {
|
|
74
73
|
case 0:
|
|
75
74
|
if (!(name === 'extensionProvider' && provider)) {
|
|
76
|
-
_context2.next =
|
|
75
|
+
_context2.next = 8;
|
|
77
76
|
break;
|
|
78
77
|
}
|
|
79
78
|
_context2.prev = 1;
|
|
@@ -87,35 +86,31 @@ var createExtensionProviderHandler = exports.createExtensionProviderHandler = fu
|
|
|
87
86
|
_context2.next = 3;
|
|
88
87
|
return (0, _updateEditButton.updateEditButton)(view, extensionProvider);
|
|
89
88
|
case 3:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
_context2.prev = 4;
|
|
95
|
-
_context2.next = 5;
|
|
89
|
+
_context2.prev = 3;
|
|
90
|
+
_context2.next = 4;
|
|
96
91
|
return extensionProvider.getExtensions();
|
|
97
|
-
case
|
|
92
|
+
case 4:
|
|
98
93
|
manifests = _context2.sent;
|
|
99
94
|
api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuTransforms((0, _blockTransforms.buildExtensionBlockTransforms)(manifests));
|
|
100
|
-
_context2.next =
|
|
95
|
+
_context2.next = 6;
|
|
101
96
|
break;
|
|
97
|
+
case 5:
|
|
98
|
+
_context2.prev = 5;
|
|
99
|
+
_t = _context2["catch"](3);
|
|
102
100
|
case 6:
|
|
103
|
-
_context2.
|
|
104
|
-
_t = _context2["catch"](4);
|
|
105
|
-
case 7:
|
|
106
|
-
_context2.next = 9;
|
|
101
|
+
_context2.next = 8;
|
|
107
102
|
break;
|
|
108
|
-
case
|
|
109
|
-
_context2.prev =
|
|
103
|
+
case 7:
|
|
104
|
+
_context2.prev = 7;
|
|
110
105
|
_t2 = _context2["catch"](1);
|
|
111
106
|
(0, _commands.updateState)({
|
|
112
107
|
extensionProvider: undefined
|
|
113
108
|
})(view.state, view.dispatch);
|
|
114
|
-
case
|
|
109
|
+
case 8:
|
|
115
110
|
case "end":
|
|
116
111
|
return _context2.stop();
|
|
117
112
|
}
|
|
118
|
-
}, _callee2, null, [[1,
|
|
113
|
+
}, _callee2, null, [[1, 7], [3, 5]]);
|
|
119
114
|
}));
|
|
120
115
|
return function (_x4, _x5) {
|
|
121
116
|
return _ref2.apply(this, arguments);
|
|
@@ -3,7 +3,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
3
3
|
import { GapCursorSelection, createSelectionClickHandler, isSelectionAtEndOfNode, isSelectionAtStartOfNode } from '@atlaskit/editor-common/selection';
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { findParentNodeOfTypeClosestToPos, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
6
|
import { clearEditingContext, updateState } from '../editor-commands/commands';
|
|
8
7
|
import { buildExtensionBlockTransforms } from './block-transforms';
|
|
9
8
|
import { createPluginState, getPluginState } from './plugin-factory';
|
|
@@ -39,14 +38,12 @@ export const createExtensionProviderHandler = (view, api) => async (name, provid
|
|
|
39
38
|
extensionProvider
|
|
40
39
|
})(view.state, view.dispatch);
|
|
41
40
|
await updateEditButton(view, extensionProvider);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// Transform registration remains unavailable when manifests cannot be loaded.
|
|
49
|
-
}
|
|
41
|
+
try {
|
|
42
|
+
var _api$blockMenu;
|
|
43
|
+
const manifests = await extensionProvider.getExtensions();
|
|
44
|
+
api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuTransforms(buildExtensionBlockTransforms(manifests));
|
|
45
|
+
} catch {
|
|
46
|
+
// Transform registration remains unavailable when manifests cannot be loaded.
|
|
50
47
|
}
|
|
51
48
|
} catch {
|
|
52
49
|
updateState({
|
|
@@ -6,7 +6,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
6
6
|
import { GapCursorSelection, createSelectionClickHandler, isSelectionAtEndOfNode, isSelectionAtStartOfNode } from '@atlaskit/editor-common/selection';
|
|
7
7
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { findParentNodeOfTypeClosestToPos, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
9
|
import { clearEditingContext, updateState } from '../editor-commands/commands';
|
|
11
10
|
import { buildExtensionBlockTransforms } from './block-transforms';
|
|
12
11
|
import { createPluginState, getPluginState } from './plugin-factory';
|
|
@@ -66,7 +65,7 @@ export var createExtensionProviderHandler = function createExtensionProviderHand
|
|
|
66
65
|
while (1) switch (_context2.prev = _context2.next) {
|
|
67
66
|
case 0:
|
|
68
67
|
if (!(name === 'extensionProvider' && provider)) {
|
|
69
|
-
_context2.next =
|
|
68
|
+
_context2.next = 8;
|
|
70
69
|
break;
|
|
71
70
|
}
|
|
72
71
|
_context2.prev = 1;
|
|
@@ -80,35 +79,31 @@ export var createExtensionProviderHandler = function createExtensionProviderHand
|
|
|
80
79
|
_context2.next = 3;
|
|
81
80
|
return updateEditButton(view, extensionProvider);
|
|
82
81
|
case 3:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
_context2.prev = 4;
|
|
88
|
-
_context2.next = 5;
|
|
82
|
+
_context2.prev = 3;
|
|
83
|
+
_context2.next = 4;
|
|
89
84
|
return extensionProvider.getExtensions();
|
|
90
|
-
case
|
|
85
|
+
case 4:
|
|
91
86
|
manifests = _context2.sent;
|
|
92
87
|
api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuTransforms(buildExtensionBlockTransforms(manifests));
|
|
93
|
-
_context2.next =
|
|
88
|
+
_context2.next = 6;
|
|
94
89
|
break;
|
|
90
|
+
case 5:
|
|
91
|
+
_context2.prev = 5;
|
|
92
|
+
_t = _context2["catch"](3);
|
|
95
93
|
case 6:
|
|
96
|
-
_context2.
|
|
97
|
-
_t = _context2["catch"](4);
|
|
98
|
-
case 7:
|
|
99
|
-
_context2.next = 9;
|
|
94
|
+
_context2.next = 8;
|
|
100
95
|
break;
|
|
101
|
-
case
|
|
102
|
-
_context2.prev =
|
|
96
|
+
case 7:
|
|
97
|
+
_context2.prev = 7;
|
|
103
98
|
_t2 = _context2["catch"](1);
|
|
104
99
|
updateState({
|
|
105
100
|
extensionProvider: undefined
|
|
106
101
|
})(view.state, view.dispatch);
|
|
107
|
-
case
|
|
102
|
+
case 8:
|
|
108
103
|
case "end":
|
|
109
104
|
return _context2.stop();
|
|
110
105
|
}
|
|
111
|
-
}, _callee2, null, [[1,
|
|
106
|
+
}, _callee2, null, [[1, 7], [3, 5]]);
|
|
112
107
|
}));
|
|
113
108
|
return function (_x4, _x5) {
|
|
114
109
|
return _ref2.apply(this, arguments);
|