@atlaskit/editor-plugin-block-type 3.10.2 → 3.11.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 +14 -0
- package/dist/cjs/plugin/index.js +5 -7
- package/dist/es2019/plugin/index.js +5 -7
- package/dist/esm/plugin/index.js +5 -7
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 3.11.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#126478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126478)
|
8
|
+
[`ca1665ebbfe4d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca1665ebbfe4d) -
|
9
|
+
[ED-23435] Store primary toolbar component registry in a plugin variable instead of in plugin
|
10
|
+
state to avoid having to add effects to all plugins and enable SSR for the toolbar. [Breaking
|
11
|
+
change] Converted registerComponent from the primary toolbar plugin into an action.
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- Updated dependencies
|
16
|
+
|
3
17
|
## 3.10.2
|
4
18
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/plugin/index.js
CHANGED
@@ -101,6 +101,7 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed,
|
|
101
101
|
}];
|
102
102
|
};
|
103
103
|
var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3) {
|
104
|
+
var _api$primaryToolbar;
|
104
105
|
var options = _ref3.config,
|
105
106
|
api = _ref3.api;
|
106
107
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref4) {
|
@@ -122,6 +123,10 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
122
123
|
shouldUseDefaultRole: false
|
123
124
|
});
|
124
125
|
};
|
126
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
127
|
+
name: 'blockType',
|
128
|
+
component: primaryToolbarComponent
|
129
|
+
});
|
125
130
|
return {
|
126
131
|
name: 'blockType',
|
127
132
|
nodes: function nodes() {
|
@@ -190,13 +195,6 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
190
195
|
}
|
191
196
|
return _main.pluginKey.getState(editorState);
|
192
197
|
},
|
193
|
-
usePluginHook: function usePluginHook() {
|
194
|
-
var _api$core, _api$primaryToolbar;
|
195
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
196
|
-
name: 'blockType',
|
197
|
-
component: primaryToolbarComponent
|
198
|
-
}));
|
199
|
-
},
|
200
198
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
201
199
|
pluginsOptions: {
|
202
200
|
quickInsert: function quickInsert(intl) {
|
@@ -88,6 +88,7 @@ const blockTypePlugin = ({
|
|
88
88
|
config: options,
|
89
89
|
api
|
90
90
|
}) => {
|
91
|
+
var _api$primaryToolbar;
|
91
92
|
const primaryToolbarComponent = ({
|
92
93
|
popupsMountPoint,
|
93
94
|
popupsBoundariesElement,
|
@@ -108,6 +109,10 @@ const blockTypePlugin = ({
|
|
108
109
|
shouldUseDefaultRole: false
|
109
110
|
});
|
110
111
|
};
|
112
|
+
api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
|
113
|
+
name: 'blockType',
|
114
|
+
component: primaryToolbarComponent
|
115
|
+
});
|
111
116
|
return {
|
112
117
|
name: 'blockType',
|
113
118
|
nodes() {
|
@@ -175,13 +180,6 @@ const blockTypePlugin = ({
|
|
175
180
|
}
|
176
181
|
return pluginKey.getState(editorState);
|
177
182
|
},
|
178
|
-
usePluginHook: () => {
|
179
|
-
var _api$core, _api$primaryToolbar;
|
180
|
-
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
181
|
-
name: 'blockType',
|
182
|
-
component: primaryToolbarComponent
|
183
|
-
}));
|
184
|
-
},
|
185
183
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
186
184
|
pluginsOptions: {
|
187
185
|
quickInsert: intl => {
|
package/dist/esm/plugin/index.js
CHANGED
@@ -88,6 +88,7 @@ var blockquotePluginOptions = function blockquotePluginOptions(_ref2, isAllowed,
|
|
88
88
|
}];
|
89
89
|
};
|
90
90
|
var blockTypePlugin = function blockTypePlugin(_ref3) {
|
91
|
+
var _api$primaryToolbar;
|
91
92
|
var options = _ref3.config,
|
92
93
|
api = _ref3.api;
|
93
94
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref4) {
|
@@ -109,6 +110,10 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
109
110
|
shouldUseDefaultRole: false
|
110
111
|
});
|
111
112
|
};
|
113
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
114
|
+
name: 'blockType',
|
115
|
+
component: primaryToolbarComponent
|
116
|
+
});
|
112
117
|
return {
|
113
118
|
name: 'blockType',
|
114
119
|
nodes: function nodes() {
|
@@ -177,13 +182,6 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
177
182
|
}
|
178
183
|
return pluginKey.getState(editorState);
|
179
184
|
},
|
180
|
-
usePluginHook: function usePluginHook() {
|
181
|
-
var _api$core, _api$primaryToolbar;
|
182
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
183
|
-
name: 'blockType',
|
184
|
-
component: primaryToolbarComponent
|
185
|
-
}));
|
186
|
-
},
|
187
185
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined,
|
188
186
|
pluginsOptions: {
|
189
187
|
quickInsert: function quickInsert(intl) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.11.0",
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
5
5
|
"author": "Atlassian Pty Ltd",
|
6
6
|
"license": "Apache-2.0",
|
@@ -36,13 +36,13 @@
|
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
38
|
"@atlaskit/adf-schema": "^40.3.0",
|
39
|
-
"@atlaskit/editor-common": "^87.
|
39
|
+
"@atlaskit/editor-common": "^87.3.0",
|
40
40
|
"@atlaskit/editor-plugin-analytics": "^1.6.0",
|
41
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
41
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
42
42
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
43
43
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
44
44
|
"@atlaskit/editor-tables": "^2.8.0",
|
45
|
-
"@atlaskit/icon": "^22.
|
45
|
+
"@atlaskit/icon": "^22.9.0",
|
46
46
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
47
47
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
48
48
|
"@atlaskit/theme": "^12.11.0",
|