@atlaskit/editor-plugin-insert-block 1.6.1 → 1.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 +14 -0
- package/dist/cjs/plugin.js +5 -5
- package/dist/es2019/plugin.js +5 -5
- package/dist/esm/plugin.js +5 -5
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-insert-block
|
|
2
2
|
|
|
3
|
+
## 1.7.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
|
## 1.6.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -49,6 +49,7 @@ function handleInsertBlockType(insertCodeBlock, insertPanel, insertBlockQuote) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
52
|
+
var _api$primaryToolbar;
|
|
52
53
|
var _ref$config = _ref.config,
|
|
53
54
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
54
55
|
api = _ref.api;
|
|
@@ -98,6 +99,10 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
|
|
|
98
99
|
renderNode: renderNode
|
|
99
100
|
});
|
|
100
101
|
};
|
|
102
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
103
|
+
name: 'insertBlock',
|
|
104
|
+
component: primaryToolbarComponent
|
|
105
|
+
});
|
|
101
106
|
return {
|
|
102
107
|
name: 'insertBlock',
|
|
103
108
|
actions: {
|
|
@@ -110,16 +115,11 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
|
|
|
110
115
|
}
|
|
111
116
|
},
|
|
112
117
|
usePluginHook: function usePluginHook() {
|
|
113
|
-
var _api$core, _api$primaryToolbar;
|
|
114
118
|
(0, _react.useLayoutEffect)(function () {
|
|
115
119
|
return function () {
|
|
116
120
|
toggleDropdownMenuOptionsRef.current = null;
|
|
117
121
|
};
|
|
118
122
|
}, []);
|
|
119
|
-
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({
|
|
120
|
-
name: 'insertBlock',
|
|
121
|
-
component: primaryToolbarComponent
|
|
122
|
-
}));
|
|
123
123
|
},
|
|
124
124
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
125
125
|
};
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -40,6 +40,7 @@ export const insertBlockPlugin = ({
|
|
|
40
40
|
config: options = {},
|
|
41
41
|
api
|
|
42
42
|
}) => {
|
|
43
|
+
var _api$primaryToolbar;
|
|
43
44
|
const toggleDropdownMenuOptionsRef = {
|
|
44
45
|
current: null
|
|
45
46
|
};
|
|
@@ -87,6 +88,10 @@ export const insertBlockPlugin = ({
|
|
|
87
88
|
renderNode: renderNode
|
|
88
89
|
});
|
|
89
90
|
};
|
|
91
|
+
api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
|
|
92
|
+
name: 'insertBlock',
|
|
93
|
+
component: primaryToolbarComponent
|
|
94
|
+
});
|
|
90
95
|
return {
|
|
91
96
|
name: 'insertBlock',
|
|
92
97
|
actions: {
|
|
@@ -99,16 +104,11 @@ export const insertBlockPlugin = ({
|
|
|
99
104
|
}
|
|
100
105
|
},
|
|
101
106
|
usePluginHook: () => {
|
|
102
|
-
var _api$core, _api$primaryToolbar;
|
|
103
107
|
useLayoutEffect(() => {
|
|
104
108
|
return () => {
|
|
105
109
|
toggleDropdownMenuOptionsRef.current = null;
|
|
106
110
|
};
|
|
107
111
|
}, []);
|
|
108
|
-
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({
|
|
109
|
-
name: 'insertBlock',
|
|
110
|
-
component: primaryToolbarComponent
|
|
111
|
-
}));
|
|
112
112
|
},
|
|
113
113
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
114
114
|
};
|
package/dist/esm/plugin.js
CHANGED
|
@@ -39,6 +39,7 @@ function handleInsertBlockType(insertCodeBlock, insertPanel, insertBlockQuote) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
export var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
42
|
+
var _api$primaryToolbar;
|
|
42
43
|
var _ref$config = _ref.config,
|
|
43
44
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
44
45
|
api = _ref.api;
|
|
@@ -88,6 +89,10 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
88
89
|
renderNode: renderNode
|
|
89
90
|
});
|
|
90
91
|
};
|
|
92
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
93
|
+
name: 'insertBlock',
|
|
94
|
+
component: primaryToolbarComponent
|
|
95
|
+
});
|
|
91
96
|
return {
|
|
92
97
|
name: 'insertBlock',
|
|
93
98
|
actions: {
|
|
@@ -100,16 +105,11 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
100
105
|
}
|
|
101
106
|
},
|
|
102
107
|
usePluginHook: function usePluginHook() {
|
|
103
|
-
var _api$core, _api$primaryToolbar;
|
|
104
108
|
useLayoutEffect(function () {
|
|
105
109
|
return function () {
|
|
106
110
|
toggleDropdownMenuOptionsRef.current = null;
|
|
107
111
|
};
|
|
108
112
|
}, []);
|
|
109
|
-
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({
|
|
110
|
-
name: 'insertBlock',
|
|
111
|
-
component: primaryToolbarComponent
|
|
112
|
-
}));
|
|
113
113
|
},
|
|
114
114
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
115
115
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,22 +33,22 @@
|
|
|
33
33
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/editor-common": "^87.
|
|
36
|
+
"@atlaskit/editor-common": "^87.3.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.6.0",
|
|
38
|
-
"@atlaskit/editor-plugin-block-type": "^3.
|
|
38
|
+
"@atlaskit/editor-plugin-block-type": "^3.11.0",
|
|
39
39
|
"@atlaskit/editor-plugin-code-block": "^3.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-date": "^2.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-emoji": "^2.2.0",
|
|
42
42
|
"@atlaskit/editor-plugin-expand": "^2.2.0",
|
|
43
43
|
"@atlaskit/editor-plugin-extension": "^1.12.0",
|
|
44
|
-
"@atlaskit/editor-plugin-hyperlink": "^2.
|
|
44
|
+
"@atlaskit/editor-plugin-hyperlink": "^2.7.0",
|
|
45
45
|
"@atlaskit/editor-plugin-image-upload": "^1.2.0",
|
|
46
46
|
"@atlaskit/editor-plugin-layout": "^1.6.0",
|
|
47
47
|
"@atlaskit/editor-plugin-media": "^1.27.0",
|
|
48
48
|
"@atlaskit/editor-plugin-mentions": "^2.2.0",
|
|
49
49
|
"@atlaskit/editor-plugin-panel": "^2.2.0",
|
|
50
50
|
"@atlaskit/editor-plugin-placeholder-text": "^1.6.0",
|
|
51
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
51
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
52
52
|
"@atlaskit/editor-plugin-quick-insert": "^1.2.0",
|
|
53
53
|
"@atlaskit/editor-plugin-rule": "^1.7.0",
|
|
54
54
|
"@atlaskit/editor-plugin-status": "^2.3.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@atlaskit/editor-plugin-type-ahead": "^1.6.0",
|
|
58
58
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
59
59
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
60
|
-
"@atlaskit/emoji": "^67.
|
|
61
|
-
"@atlaskit/icon": "^22.
|
|
60
|
+
"@atlaskit/emoji": "^67.7.0",
|
|
61
|
+
"@atlaskit/icon": "^22.9.0",
|
|
62
62
|
"@atlaskit/primitives": "^11.1.0",
|
|
63
63
|
"@atlaskit/theme": "^12.11.0",
|
|
64
64
|
"@atlaskit/tokens": "^1.56.0",
|