@atlaskit/editor-plugin-insert-block 2.7.2 → 2.8.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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-insert-block
|
|
2
2
|
|
|
3
|
+
## 2.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#116013](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116013)
|
|
8
|
+
[`18e022766bfd3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/18e022766bfd3) -
|
|
9
|
+
[ux] ED-26464 Hiding primary toolbar and docking contextual toolbar items to top
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 2.7.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -111,7 +111,7 @@ function delayUntilIdle(cb) {
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
114
|
-
var
|
|
114
|
+
var _options$appearance4;
|
|
115
115
|
var _ref$config = _ref.config,
|
|
116
116
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
117
117
|
api = _ref.api;
|
|
@@ -155,10 +155,15 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
|
|
|
155
155
|
renderNode: renderNode
|
|
156
156
|
});
|
|
157
157
|
};
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'control', {
|
|
159
|
+
exposure: true
|
|
160
|
+
})) {
|
|
161
|
+
var _api$primaryToolbar;
|
|
162
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
163
|
+
name: 'insertBlock',
|
|
164
|
+
component: primaryToolbarComponent
|
|
165
|
+
});
|
|
166
|
+
}
|
|
162
167
|
var plugin = {
|
|
163
168
|
name: 'insertBlock',
|
|
164
169
|
actions: {
|
|
@@ -306,7 +311,9 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
|
|
|
306
311
|
return [];
|
|
307
312
|
}
|
|
308
313
|
},
|
|
309
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar)
|
|
314
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && (0, _experiments.editorExperiment)('platform_editor_controls', 'control', {
|
|
315
|
+
exposure: true
|
|
316
|
+
}) ? primaryToolbarComponent : undefined
|
|
310
317
|
};
|
|
311
318
|
if (
|
|
312
319
|
// @ts-ignore
|
|
@@ -97,7 +97,7 @@ export const insertBlockPlugin = ({
|
|
|
97
97
|
config: options = {},
|
|
98
98
|
api
|
|
99
99
|
}) => {
|
|
100
|
-
var
|
|
100
|
+
var _options$appearance4;
|
|
101
101
|
const editorViewRef = {
|
|
102
102
|
current: null
|
|
103
103
|
};
|
|
@@ -139,10 +139,15 @@ export const insertBlockPlugin = ({
|
|
|
139
139
|
renderNode: renderNode
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
if (editorExperiment('platform_editor_controls', 'control', {
|
|
143
|
+
exposure: true
|
|
144
|
+
})) {
|
|
145
|
+
var _api$primaryToolbar;
|
|
146
|
+
api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
|
|
147
|
+
name: 'insertBlock',
|
|
148
|
+
component: primaryToolbarComponent
|
|
149
|
+
});
|
|
150
|
+
}
|
|
146
151
|
const plugin = {
|
|
147
152
|
name: 'insertBlock',
|
|
148
153
|
actions: {
|
|
@@ -293,7 +298,9 @@ export const insertBlockPlugin = ({
|
|
|
293
298
|
return [];
|
|
294
299
|
}
|
|
295
300
|
},
|
|
296
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar)
|
|
301
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && editorExperiment('platform_editor_controls', 'control', {
|
|
302
|
+
exposure: true
|
|
303
|
+
}) ? primaryToolbarComponent : undefined
|
|
297
304
|
};
|
|
298
305
|
if (
|
|
299
306
|
// @ts-ignore
|
|
@@ -100,7 +100,7 @@ function delayUntilIdle(cb) {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
export var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
103
|
-
var
|
|
103
|
+
var _options$appearance4;
|
|
104
104
|
var _ref$config = _ref.config,
|
|
105
105
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
106
106
|
api = _ref.api;
|
|
@@ -144,10 +144,15 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
144
144
|
renderNode: renderNode
|
|
145
145
|
});
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
if (editorExperiment('platform_editor_controls', 'control', {
|
|
148
|
+
exposure: true
|
|
149
|
+
})) {
|
|
150
|
+
var _api$primaryToolbar;
|
|
151
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
152
|
+
name: 'insertBlock',
|
|
153
|
+
component: primaryToolbarComponent
|
|
154
|
+
});
|
|
155
|
+
}
|
|
151
156
|
var plugin = {
|
|
152
157
|
name: 'insertBlock',
|
|
153
158
|
actions: {
|
|
@@ -295,7 +300,9 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
|
|
|
295
300
|
return [];
|
|
296
301
|
}
|
|
297
302
|
},
|
|
298
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar)
|
|
303
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && editorExperiment('platform_editor_controls', 'control', {
|
|
304
|
+
exposure: true
|
|
305
|
+
}) ? primaryToolbarComponent : undefined
|
|
299
306
|
};
|
|
300
307
|
if (
|
|
301
308
|
// @ts-ignore
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
1
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { InsertBlockPlugin } from './insertBlockPluginType';
|
|
4
4
|
export declare const toolbarSizeToButtons: (toolbarSize: ToolbarSize, appearance?: EditorAppearance) => 0 | 2 | 3 | 5 | 7;
|
|
5
5
|
export declare const insertBlockPlugin: InsertBlockPlugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
2
1
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { InsertBlockPlugin } from './insertBlockPluginType';
|
|
4
4
|
export declare const toolbarSizeToButtons: (toolbarSize: ToolbarSize, appearance?: EditorAppearance) => 0 | 2 | 3 | 5 | 7;
|
|
5
5
|
export declare const insertBlockPlugin: InsertBlockPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/button": "^20.5.0",
|
|
35
|
-
"@atlaskit/editor-common": "^99.
|
|
35
|
+
"@atlaskit/editor-common": "^99.18.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.12.0",
|
|
37
|
-
"@atlaskit/editor-plugin-block-type": "^4.
|
|
37
|
+
"@atlaskit/editor-plugin-block-type": "^4.4.0",
|
|
38
38
|
"@atlaskit/editor-plugin-code-block": "^3.7.0",
|
|
39
39
|
"@atlaskit/editor-plugin-connectivity": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-date": "^2.6.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/editor-plugin-expand": "^2.12.0",
|
|
43
43
|
"@atlaskit/editor-plugin-extension": "^3.5.0",
|
|
44
44
|
"@atlaskit/editor-plugin-feature-flags": "^1.3.0",
|
|
45
|
-
"@atlaskit/editor-plugin-hyperlink": "^3.
|
|
45
|
+
"@atlaskit/editor-plugin-hyperlink": "^3.5.0",
|
|
46
46
|
"@atlaskit/editor-plugin-image-upload": "^1.4.0",
|
|
47
47
|
"@atlaskit/editor-plugin-layout": "^1.15.0",
|
|
48
48
|
"@atlaskit/editor-plugin-media": "^1.45.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/editor-plugin-metrics": "^3.2.0",
|
|
52
52
|
"@atlaskit/editor-plugin-panel": "^3.3.0",
|
|
53
53
|
"@atlaskit/editor-plugin-placeholder-text": "^1.11.0",
|
|
54
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^2.
|
|
54
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.3.0",
|
|
55
55
|
"@atlaskit/editor-plugin-quick-insert": "^1.10.0",
|
|
56
56
|
"@atlaskit/editor-plugin-rule": "^1.11.0",
|
|
57
57
|
"@atlaskit/editor-plugin-status": "^2.8.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
62
62
|
"@atlaskit/editor-shared-styles": "^3.3.0",
|
|
63
63
|
"@atlaskit/emoji": "^67.14.0",
|
|
64
|
-
"@atlaskit/heading": "4.3.
|
|
64
|
+
"@atlaskit/heading": "4.3.1",
|
|
65
65
|
"@atlaskit/icon": "^23.10.0",
|
|
66
66
|
"@atlaskit/icon-lab": "^2.7.0",
|
|
67
67
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|