@atlaskit/editor-core 205.6.0 → 205.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 +21 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +23 -6
- package/dist/cjs/utils/extensions.js +6 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +24 -7
- package/dist/es2019/utils/extensions.js +4 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +23 -6
- package/dist/esm/utils/extensions.js +6 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 205.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#145243](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/145243)
|
|
8
|
+
[`7d32c3cc54ceb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7d32c3cc54ceb) -
|
|
9
|
+
Exposes a new getNodeWithPosByLocalId(localId: string) function in the ExtensionAPI
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 205.6.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#144882](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144882)
|
|
20
|
+
[`a14feb4c5d6c6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a14feb4c5d6c6) -
|
|
21
|
+
ED-27414 update user pref feature gate to unify frontend and ssr changes.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 205.6.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -80,6 +80,14 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
80
80
|
interactionState = _useSharedPluginState.interactionState;
|
|
81
81
|
var viewMode = (0, _getEditorViewModeSync.getEditorViewMode)(editorViewModeState, props.preset);
|
|
82
82
|
var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
83
|
+
if (!toolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
|
|
84
|
+
var _editorAPI$selectionT, _editorAPI$selectionT2;
|
|
85
|
+
// This is a workaround for the rendering issue with the selection toolbar
|
|
86
|
+
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
87
|
+
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
88
|
+
var defaultDocking = props.__livePage ? 'none' : 'top';
|
|
89
|
+
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 || (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 || (_editorAPI$selectionT2 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT2 === void 0 ? void 0 : _editorAPI$selectionT2.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
90
|
+
}
|
|
83
91
|
var primaryToolbarComponents = props.primaryToolbarComponents;
|
|
84
92
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
85
93
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
@@ -106,12 +114,21 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
106
114
|
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
107
115
|
exposure: true
|
|
108
116
|
})) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
|
|
118
|
+
if (toolbarDocking === 'none') {
|
|
119
|
+
primaryToolbarComponents = [];
|
|
120
|
+
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
121
|
+
isEditorToolbarHidden = true;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
} else {
|
|
125
|
+
var _primaryToolbarCompon;
|
|
126
|
+
if (toolbarDocking !== 'top') {
|
|
127
|
+
primaryToolbarComponents = [];
|
|
128
|
+
}
|
|
129
|
+
if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
130
|
+
isEditorToolbarHidden = true;
|
|
131
|
+
}
|
|
115
132
|
}
|
|
116
133
|
}
|
|
117
134
|
var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
@@ -65,6 +65,12 @@ var dummyExtensionAPI = {
|
|
|
65
65
|
_editInLegacyMacroBrowser: function _editInLegacyMacroBrowser() {
|
|
66
66
|
return showDummyAPIWarning('_editInLegacyMacroBrowser');
|
|
67
67
|
},
|
|
68
|
+
getNodeWithPosByLocalId: function getNodeWithPosByLocalId() {
|
|
69
|
+
return {
|
|
70
|
+
node: null,
|
|
71
|
+
pos: null
|
|
72
|
+
};
|
|
73
|
+
},
|
|
68
74
|
doc: {
|
|
69
75
|
insertAfter: function insertAfter() {
|
|
70
76
|
return showDummyAPIWarning('doc:insertAfter');
|
|
@@ -61,7 +61,15 @@ export const FullPageEditor = props => {
|
|
|
61
61
|
interactionState
|
|
62
62
|
} = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar', 'interaction']);
|
|
63
63
|
const viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
64
|
-
|
|
64
|
+
let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
65
|
+
if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
66
|
+
var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
|
|
67
|
+
// This is a workaround for the rendering issue with the selection toolbar
|
|
68
|
+
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
69
|
+
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
70
|
+
const defaultDocking = props.__livePage ? 'none' : 'top';
|
|
71
|
+
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 ? void 0 : (_editorAPI$selectionT3 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT3 === void 0 ? void 0 : _editorAPI$selectionT3.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
72
|
+
}
|
|
65
73
|
let primaryToolbarComponents = props.primaryToolbarComponents;
|
|
66
74
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
67
75
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
@@ -90,12 +98,21 @@ export const FullPageEditor = props => {
|
|
|
90
98
|
if (editorExperiment('platform_editor_controls', 'variant1', {
|
|
91
99
|
exposure: true
|
|
92
100
|
})) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
if (fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
102
|
+
if (toolbarDocking === 'none') {
|
|
103
|
+
primaryToolbarComponents = [];
|
|
104
|
+
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
105
|
+
isEditorToolbarHidden = true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
var _primaryToolbarCompon;
|
|
110
|
+
if (toolbarDocking !== 'top') {
|
|
111
|
+
primaryToolbarComponents = [];
|
|
112
|
+
}
|
|
113
|
+
if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
114
|
+
isEditorToolbarHidden = true;
|
|
115
|
+
}
|
|
99
116
|
}
|
|
100
117
|
}
|
|
101
118
|
const popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 ? void 0 : (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
@@ -49,6 +49,10 @@ const showDummyAPIWarning = location => {
|
|
|
49
49
|
const dummyExtensionAPI = {
|
|
50
50
|
editInContextPanel: () => showDummyAPIWarning('editInContextPanel'),
|
|
51
51
|
_editInLegacyMacroBrowser: () => showDummyAPIWarning('_editInLegacyMacroBrowser'),
|
|
52
|
+
getNodeWithPosByLocalId: () => ({
|
|
53
|
+
node: null,
|
|
54
|
+
pos: null
|
|
55
|
+
}),
|
|
52
56
|
doc: {
|
|
53
57
|
insertAfter: () => showDummyAPIWarning('doc:insertAfter'),
|
|
54
58
|
scrollTo: () => showDummyAPIWarning('doc:scrollTo'),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "205.
|
|
2
|
+
export const version = "205.7.0";
|
|
@@ -69,6 +69,14 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
69
69
|
interactionState = _useSharedPluginState.interactionState;
|
|
70
70
|
var viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
71
71
|
var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
72
|
+
if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
73
|
+
var _editorAPI$selectionT, _editorAPI$selectionT2;
|
|
74
|
+
// This is a workaround for the rendering issue with the selection toolbar
|
|
75
|
+
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
76
|
+
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
77
|
+
var defaultDocking = props.__livePage ? 'none' : 'top';
|
|
78
|
+
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 || (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 || (_editorAPI$selectionT2 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT2 === void 0 ? void 0 : _editorAPI$selectionT2.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
79
|
+
}
|
|
72
80
|
var primaryToolbarComponents = props.primaryToolbarComponents;
|
|
73
81
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
74
82
|
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
@@ -95,12 +103,21 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
95
103
|
if (editorExperiment('platform_editor_controls', 'variant1', {
|
|
96
104
|
exposure: true
|
|
97
105
|
})) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
if (fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
107
|
+
if (toolbarDocking === 'none') {
|
|
108
|
+
primaryToolbarComponents = [];
|
|
109
|
+
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
110
|
+
isEditorToolbarHidden = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
var _primaryToolbarCompon;
|
|
115
|
+
if (toolbarDocking !== 'top') {
|
|
116
|
+
primaryToolbarComponents = [];
|
|
117
|
+
}
|
|
118
|
+
if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
119
|
+
isEditorToolbarHidden = true;
|
|
120
|
+
}
|
|
104
121
|
}
|
|
105
122
|
}
|
|
106
123
|
var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
@@ -57,6 +57,12 @@ var dummyExtensionAPI = {
|
|
|
57
57
|
_editInLegacyMacroBrowser: function _editInLegacyMacroBrowser() {
|
|
58
58
|
return showDummyAPIWarning('_editInLegacyMacroBrowser');
|
|
59
59
|
},
|
|
60
|
+
getNodeWithPosByLocalId: function getNodeWithPosByLocalId() {
|
|
61
|
+
return {
|
|
62
|
+
node: null,
|
|
63
|
+
pos: null
|
|
64
|
+
};
|
|
65
|
+
},
|
|
60
66
|
doc: {
|
|
61
67
|
insertAfter: function insertAfter() {
|
|
62
68
|
return showDummyAPIWarning('doc:insertAfter');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "205.
|
|
2
|
+
export var version = "205.7.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "205.
|
|
3
|
+
"version": "205.7.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^23.0.0",
|
|
48
48
|
"@atlaskit/css": "^0.10.0",
|
|
49
|
-
"@atlaskit/editor-common": "^103.
|
|
49
|
+
"@atlaskit/editor-common": "^103.16.0",
|
|
50
50
|
"@atlaskit/editor-json-transformer": "^8.24.0",
|
|
51
51
|
"@atlaskit/editor-performance-metrics": "^2.1.0",
|
|
52
52
|
"@atlaskit/editor-plugin-quick-insert": "^2.4.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/platform-feature-flags-react": "^0.1.0",
|
|
62
62
|
"@atlaskit/react-ufo": "^3.6.0",
|
|
63
63
|
"@atlaskit/task-decision": "^19.1.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
64
|
+
"@atlaskit/tmp-editor-statsig": "^4.14.0",
|
|
65
65
|
"@atlaskit/tokens": "^4.8.0",
|
|
66
66
|
"@atlaskit/tooltip": "^20.0.0",
|
|
67
67
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@atlaskit/editor-plugin-annotation": "^2.7.0",
|
|
94
94
|
"@atlaskit/editor-plugin-card": "^5.4.0",
|
|
95
95
|
"@atlaskit/editor-plugin-list": "^4.2.0",
|
|
96
|
-
"@atlaskit/editor-plugin-paste": "^3.
|
|
96
|
+
"@atlaskit/editor-plugin-paste": "^3.3.0",
|
|
97
97
|
"@atlaskit/link-provider": "^2.1.0",
|
|
98
98
|
"@atlaskit/logo": "^16.0.0",
|
|
99
99
|
"@atlaskit/media-core": "^35.0.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@atlaskit/modal-dialog": "^14.1.0",
|
|
103
103
|
"@atlaskit/primitives": "^14.4.0",
|
|
104
104
|
"@atlaskit/renderer": "^114.10.0",
|
|
105
|
-
"@atlaskit/smart-card": "^36.
|
|
105
|
+
"@atlaskit/smart-card": "^36.9.0",
|
|
106
106
|
"@atlaskit/synchrony-test-helpers": "^3.1.0",
|
|
107
107
|
"@atlaskit/toggle": "^15.0.0",
|
|
108
108
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
@@ -684,6 +684,10 @@
|
|
|
684
684
|
"platform_editor_tables_table_selector": {
|
|
685
685
|
"type": "boolean",
|
|
686
686
|
"referenceOnly": true
|
|
687
|
+
},
|
|
688
|
+
"platform_editor_controls_toolbar_ssr_fix": {
|
|
689
|
+
"type": "boolean",
|
|
690
|
+
"referenceOnly": true
|
|
687
691
|
}
|
|
688
692
|
},
|
|
689
693
|
"stricter": {
|