@atlaskit/editor-core 226.1.7 → 226.3.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 +31 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/create-editor/ReactEditorView.js +2 -2
- package/dist/cjs/ui/Appearance/Chromeless.js +2 -2
- package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +2 -1
- package/dist/cjs/ui/ContextPanel/index.js +2 -1
- package/dist/cjs/ui/Toolbar/Toolbar.js +3 -3
- package/dist/cjs/ui/quick-insert/ExtensionQuickInsertIcon.js +18 -1
- package/dist/cjs/ui/quick-insert/getExtensionQuickInsertComponents.js +39 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -2
- package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +2 -1
- package/dist/es2019/ui/ContextPanel/index.js +2 -1
- package/dist/es2019/ui/Toolbar/Toolbar.js +3 -3
- package/dist/es2019/ui/quick-insert/ExtensionQuickInsertIcon.js +20 -1
- package/dist/es2019/ui/quick-insert/getExtensionQuickInsertComponents.js +50 -24
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -2
- package/dist/esm/ui/Appearance/Chromeless.js +2 -2
- package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +2 -1
- package/dist/esm/ui/ContextPanel/index.js +2 -1
- package/dist/esm/ui/Toolbar/Toolbar.js +3 -3
- package/dist/esm/ui/quick-insert/ExtensionQuickInsertIcon.js +18 -1
- package/dist/esm/ui/quick-insert/getExtensionQuickInsertComponents.js +39 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +70 -69
- package/report.api.md +0 -805
|
@@ -1,20 +1,56 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
3
3
|
import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
|
|
4
|
+
import { STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
4
5
|
import { EXTENSION_ITEM_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
5
6
|
import { ExtensionQuickInsertMenuItem } from './ExtensionQuickInsertMenuItem';
|
|
7
|
+
var structureExtensionItemKeyRanks = {
|
|
8
|
+
'toc:toc': 600,
|
|
9
|
+
'native-tabs:native-tabs': 1900,
|
|
10
|
+
'cards:quick-insert': 2000,
|
|
11
|
+
'carousel:quick-insert': 2100,
|
|
12
|
+
'spotlight:quick-insert': 2200,
|
|
13
|
+
'com.atlassian.linking-platform.create:linking-platform-create-jira-issue': 2500,
|
|
14
|
+
'com.atlassian.linking-platform.create:linking-platform-create-confluence-page': 2600,
|
|
15
|
+
'create-from-template:create-from-template': 2700,
|
|
16
|
+
'anchor:anchor': 2900,
|
|
17
|
+
'smart-button:quick-insert': 3000
|
|
18
|
+
};
|
|
19
|
+
var UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK = 3100;
|
|
20
|
+
var getStructureExtensionItemRank = function getStructureExtensionItemRank(item) {
|
|
21
|
+
return structureExtensionItemKeyRanks[item.key];
|
|
22
|
+
};
|
|
23
|
+
var isStructureExtensionItem = function isStructureExtensionItem(item) {
|
|
24
|
+
return getQuickInsertMenuItemParents({
|
|
25
|
+
categories: item.categories,
|
|
26
|
+
rank: 0
|
|
27
|
+
}).some(function (parent) {
|
|
28
|
+
return parent.key === STRUCTURE_SECTION.key;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
6
31
|
export var getExtensionQuickInsertComponents = function getExtensionQuickInsertComponents(_ref) {
|
|
7
32
|
var apiRef = _ref.apiRef,
|
|
8
33
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
9
34
|
items = _ref.items;
|
|
35
|
+
var unrecognizedStructureItemRanks = new Map(items.filter(isStructureExtensionItem).filter(function (item) {
|
|
36
|
+
return getStructureExtensionItemRank(item) === undefined;
|
|
37
|
+
}).sort(function (firstItem, secondItem) {
|
|
38
|
+
return firstItem.title.localeCompare(secondItem.title) || firstItem.key.localeCompare(secondItem.key);
|
|
39
|
+
}).map(function (item, index) {
|
|
40
|
+
return [item, UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK + index];
|
|
41
|
+
}));
|
|
10
42
|
return items.map(function (item, index) {
|
|
11
|
-
var _item$priority;
|
|
43
|
+
var _unrecognizedStructur, _item$priority;
|
|
44
|
+
var structureRank = getStructureExtensionItemRank(item);
|
|
45
|
+
var isStructureItem = structureRank !== undefined;
|
|
46
|
+
var categories = isStructureItem ? ['structure'] : item.categories;
|
|
47
|
+
var fallbackRank = (_unrecognizedStructur = unrecognizedStructureItemRanks.get(item)) !== null && _unrecognizedStructur !== void 0 ? _unrecognizedStructur : EXTENSION_ITEM_RANK + ((_item$priority = item.priority) !== null && _item$priority !== void 0 ? _item$priority : index);
|
|
12
48
|
return {
|
|
13
49
|
type: 'menu-item',
|
|
14
50
|
key: item.key,
|
|
15
51
|
parents: getQuickInsertMenuItemParents({
|
|
16
|
-
categories:
|
|
17
|
-
rank:
|
|
52
|
+
categories: categories,
|
|
53
|
+
rank: structureRank !== null && structureRank !== void 0 ? structureRank : fallbackRank
|
|
18
54
|
}),
|
|
19
55
|
match: createQuickInsertMatcher(function () {
|
|
20
56
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "226.
|
|
3
|
+
"version": "226.3.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,46 +37,47 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@atlaskit/activity-provider": "^3.
|
|
40
|
+
"@atlaskit/activity-provider": "^3.1.0",
|
|
41
41
|
"@atlaskit/adf-schema": "^57.2.0",
|
|
42
42
|
"@atlaskit/afm-i18n-platform-editor-editor-core": "2.200.0",
|
|
43
|
-
"@atlaskit/analytics-namespaced-context": "^8.
|
|
44
|
-
"@atlaskit/analytics-next": "^12.
|
|
43
|
+
"@atlaskit/analytics-namespaced-context": "^8.2.0",
|
|
44
|
+
"@atlaskit/analytics-next": "^12.5.0",
|
|
45
45
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
46
|
-
"@atlaskit/button": "^25.
|
|
46
|
+
"@atlaskit/button": "^25.3.0",
|
|
47
47
|
"@atlaskit/css": "^1.1.0",
|
|
48
|
-
"@atlaskit/editor-json-transformer": "^9.
|
|
48
|
+
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
49
49
|
"@atlaskit/editor-performance-metrics": "^3.2.0",
|
|
50
50
|
"@atlaskit/editor-plugin-block-menu": "^15.0.0",
|
|
51
51
|
"@atlaskit/editor-plugin-connectivity": "^16.0.0",
|
|
52
|
-
"@atlaskit/editor-plugin-quick-insert": "^16.
|
|
53
|
-
"@atlaskit/editor-plugin-selection-extension": "^19.
|
|
52
|
+
"@atlaskit/editor-plugin-quick-insert": "^16.2.0",
|
|
53
|
+
"@atlaskit/editor-plugin-selection-extension": "^19.1.0",
|
|
54
54
|
"@atlaskit/editor-plugin-user-preferences": "^14.0.0",
|
|
55
55
|
"@atlaskit/editor-plugins": "^16.1.0",
|
|
56
56
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
57
|
-
"@atlaskit/editor-shared-styles": "^4.
|
|
57
|
+
"@atlaskit/editor-shared-styles": "^4.1.0",
|
|
58
58
|
"@atlaskit/editor-ssr-renderer": "^11.0.0",
|
|
59
59
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
60
60
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
61
|
-
"@atlaskit/emoji": "^72.
|
|
61
|
+
"@atlaskit/emoji": "^72.2.0",
|
|
62
62
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
63
|
-
"@atlaskit/heading": "^7.
|
|
64
|
-
"@atlaskit/icon": "^37.
|
|
63
|
+
"@atlaskit/heading": "^7.2.0",
|
|
64
|
+
"@atlaskit/icon": "^37.6.0",
|
|
65
|
+
"@atlaskit/icon-lab": "^7.7.0",
|
|
65
66
|
"@atlaskit/link": "^5.1.0",
|
|
66
|
-
"@atlaskit/media-card": "^81.
|
|
67
|
-
"@atlaskit/mention": "^27.
|
|
67
|
+
"@atlaskit/media-card": "^81.9.0",
|
|
68
|
+
"@atlaskit/mention": "^27.19.0",
|
|
68
69
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
69
|
-
"@atlaskit/platform-feature-flags": "^2.
|
|
70
|
+
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
70
71
|
"@atlaskit/platform-feature-flags-react": "^1.2.0",
|
|
71
|
-
"@atlaskit/popup": "^6.
|
|
72
|
-
"@atlaskit/primitives": "^22.
|
|
72
|
+
"@atlaskit/popup": "^6.3.0",
|
|
73
|
+
"@atlaskit/primitives": "^22.5.0",
|
|
73
74
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
74
75
|
"@atlaskit/react-ufo": "^7.7.0",
|
|
75
|
-
"@atlaskit/task-decision": "^21.
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
77
|
-
"@atlaskit/tokens": "^16.
|
|
78
|
-
"@atlaskit/tooltip": "^24.
|
|
79
|
-
"@atlaskit/width-detector": "^7.
|
|
76
|
+
"@atlaskit/task-decision": "^21.9.0",
|
|
77
|
+
"@atlaskit/tmp-editor-statsig": "^169.0.0",
|
|
78
|
+
"@atlaskit/tokens": "^16.10.0",
|
|
79
|
+
"@atlaskit/tooltip": "^24.3.0",
|
|
80
|
+
"@atlaskit/width-detector": "^7.2.0",
|
|
80
81
|
"@babel/runtime": "^7.0.0",
|
|
81
82
|
"@compiled/react": "^1.0.2",
|
|
82
83
|
"@emotion/react": "^11.7.1",
|
|
@@ -91,9 +92,9 @@
|
|
|
91
92
|
"uuid": "^3.1.0"
|
|
92
93
|
},
|
|
93
94
|
"peerDependencies": {
|
|
94
|
-
"@atlaskit/editor-common": "^120.
|
|
95
|
-
"@atlaskit/link-provider": "^5.
|
|
96
|
-
"@atlaskit/media-core": "^38.
|
|
95
|
+
"@atlaskit/editor-common": "^120.10.0",
|
|
96
|
+
"@atlaskit/link-provider": "^5.5.0",
|
|
97
|
+
"@atlaskit/media-core": "^38.2.0",
|
|
97
98
|
"react": "^18.2.0",
|
|
98
99
|
"react-dom": "^18.2.0",
|
|
99
100
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -103,75 +104,75 @@
|
|
|
103
104
|
"@af/editor-libra": "workspace:^",
|
|
104
105
|
"@af/suppress-react-warnings": "workspace:^",
|
|
105
106
|
"@af/visual-regression": "workspace:^",
|
|
106
|
-
"@atlaskit/adf-utils": "^20.
|
|
107
|
-
"@atlaskit/analytics-gas-types": "^6.
|
|
108
|
-
"@atlaskit/analytics-listeners": "^11.
|
|
109
|
-
"@atlaskit/code": "^19.
|
|
110
|
-
"@atlaskit/collab-provider": "^25.
|
|
107
|
+
"@atlaskit/adf-utils": "^20.8.0",
|
|
108
|
+
"@atlaskit/analytics-gas-types": "^6.2.0",
|
|
109
|
+
"@atlaskit/analytics-listeners": "^11.3.0",
|
|
110
|
+
"@atlaskit/code": "^19.2.0",
|
|
111
|
+
"@atlaskit/collab-provider": "^25.1.0",
|
|
111
112
|
"@atlaskit/docs": "^12.2.0",
|
|
112
|
-
"@atlaskit/drawer": "^14.
|
|
113
|
+
"@atlaskit/drawer": "^14.3.0",
|
|
113
114
|
"@atlaskit/editor-plugin-alignment": "^17.0.0",
|
|
114
115
|
"@atlaskit/editor-plugin-annotation": "^16.0.0",
|
|
115
|
-
"@atlaskit/editor-plugin-base": "^17.
|
|
116
|
-
"@atlaskit/editor-plugin-card": "^22.
|
|
116
|
+
"@atlaskit/editor-plugin-base": "^17.1.0",
|
|
117
|
+
"@atlaskit/editor-plugin-card": "^22.1.0",
|
|
117
118
|
"@atlaskit/editor-plugin-code-block-advanced": "^16.0.0",
|
|
118
119
|
"@atlaskit/editor-plugin-collab-edit": "^17.0.0",
|
|
119
|
-
"@atlaskit/editor-plugin-content-insertion": "^16.
|
|
120
|
+
"@atlaskit/editor-plugin-content-insertion": "^16.1.0",
|
|
120
121
|
"@atlaskit/editor-plugin-editor-viewmode": "^18.0.0",
|
|
121
|
-
"@atlaskit/editor-plugin-extension": "^19.
|
|
122
|
-
"@atlaskit/editor-plugin-grid": "^16.
|
|
123
|
-
"@atlaskit/editor-plugin-guideline": "^16.
|
|
122
|
+
"@atlaskit/editor-plugin-extension": "^19.1.0",
|
|
123
|
+
"@atlaskit/editor-plugin-grid": "^16.1.0",
|
|
124
|
+
"@atlaskit/editor-plugin-guideline": "^16.1.0",
|
|
124
125
|
"@atlaskit/editor-plugin-highlight": "^16.0.0",
|
|
125
|
-
"@atlaskit/editor-plugin-insert-block": "^17.
|
|
126
|
-
"@atlaskit/editor-plugin-layout": "^17.
|
|
127
|
-
"@atlaskit/editor-plugin-list": "^18.
|
|
128
|
-
"@atlaskit/editor-plugin-media": "^18.
|
|
129
|
-
"@atlaskit/editor-plugin-paste": "^17.
|
|
126
|
+
"@atlaskit/editor-plugin-insert-block": "^17.1.0",
|
|
127
|
+
"@atlaskit/editor-plugin-layout": "^17.2.0",
|
|
128
|
+
"@atlaskit/editor-plugin-list": "^18.1.0",
|
|
129
|
+
"@atlaskit/editor-plugin-media": "^18.1.0",
|
|
130
|
+
"@atlaskit/editor-plugin-paste": "^17.1.0",
|
|
130
131
|
"@atlaskit/editor-plugin-selection-marker": "^16.0.0",
|
|
131
132
|
"@atlaskit/editor-plugin-show-diff": "^14.2.0",
|
|
132
133
|
"@atlaskit/editor-plugin-synced-block": "^14.0.0",
|
|
133
|
-
"@atlaskit/editor-plugin-table": "^28.
|
|
134
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^19.
|
|
135
|
-
"@atlaskit/editor-plugin-text-color": "^16.
|
|
136
|
-
"@atlaskit/editor-plugin-toolbar-lists-indentation": "^17.
|
|
134
|
+
"@atlaskit/editor-plugin-table": "^28.1.0",
|
|
135
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^19.1.0",
|
|
136
|
+
"@atlaskit/editor-plugin-text-color": "^16.1.0",
|
|
137
|
+
"@atlaskit/editor-plugin-toolbar-lists-indentation": "^17.1.0",
|
|
137
138
|
"@atlaskit/editor-plugin-track-changes": "^15.0.0",
|
|
138
139
|
"@atlaskit/editor-synced-block-provider": "^12.1.0",
|
|
139
140
|
"@atlaskit/editor-synced-block-renderer": "^14.1.0",
|
|
140
141
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
141
|
-
"@atlaskit/form": "^17.
|
|
142
|
-
"@atlaskit/link-provider": "^5.
|
|
143
|
-
"@atlaskit/linking-common": "^12.
|
|
144
|
-
"@atlaskit/logo": "^21.
|
|
145
|
-
"@atlaskit/media-core": "^38.
|
|
142
|
+
"@atlaskit/form": "^17.2.0",
|
|
143
|
+
"@atlaskit/link-provider": "^5.5.0",
|
|
144
|
+
"@atlaskit/linking-common": "^12.1.0",
|
|
145
|
+
"@atlaskit/logo": "^21.6.0",
|
|
146
|
+
"@atlaskit/media-core": "^38.2.0",
|
|
146
147
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
147
|
-
"@atlaskit/media-picker": "^72.
|
|
148
|
-
"@atlaskit/media-test-helpers": "^42.
|
|
149
|
-
"@atlaskit/media-ui": "^30.
|
|
150
|
-
"@atlaskit/modal-dialog": "^16.
|
|
148
|
+
"@atlaskit/media-picker": "^72.4.0",
|
|
149
|
+
"@atlaskit/media-test-helpers": "^42.4.0",
|
|
150
|
+
"@atlaskit/media-ui": "^30.15.0",
|
|
151
|
+
"@atlaskit/modal-dialog": "^16.6.0",
|
|
151
152
|
"@atlaskit/navigation-system": "^10.16.0",
|
|
152
|
-
"@atlaskit/popper": "^9.
|
|
153
|
-
"@atlaskit/portal": "^6.
|
|
154
|
-
"@atlaskit/profilecard": "^26.
|
|
155
|
-
"@atlaskit/radio": "^10.
|
|
156
|
-
"@atlaskit/renderer": "^137.
|
|
157
|
-
"@atlaskit/section-message": "^10.
|
|
158
|
-
"@atlaskit/spinner": "^20.
|
|
153
|
+
"@atlaskit/popper": "^9.4.0",
|
|
154
|
+
"@atlaskit/portal": "^6.4.0",
|
|
155
|
+
"@atlaskit/profilecard": "^26.21.0",
|
|
156
|
+
"@atlaskit/radio": "^10.2.0",
|
|
157
|
+
"@atlaskit/renderer": "^137.2.0",
|
|
158
|
+
"@atlaskit/section-message": "^10.2.0",
|
|
159
|
+
"@atlaskit/spinner": "^20.4.0",
|
|
159
160
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
160
|
-
"@atlaskit/textarea": "^10.
|
|
161
|
-
"@atlaskit/textfield": "^10.
|
|
162
|
-
"@atlaskit/toggle": "^17.
|
|
161
|
+
"@atlaskit/textarea": "^10.2.0",
|
|
162
|
+
"@atlaskit/textfield": "^10.2.0",
|
|
163
|
+
"@atlaskit/toggle": "^17.3.0",
|
|
163
164
|
"@atlaskit/util-data-test": "^19.1.0",
|
|
164
165
|
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
165
166
|
"@atlassian/a11y-playwright-testing": "^0.12.0",
|
|
166
167
|
"@atlassian/adf-schema-json": "^1.35.0",
|
|
167
168
|
"@atlassian/editor-rovo-bridge": "^14.0.0",
|
|
168
169
|
"@atlassian/experiment-test-utils": "^0.2.0",
|
|
169
|
-
"@atlassian/feature-flags-test-utils": "^1.
|
|
170
|
-
"@atlassian/search-client": "^2.
|
|
171
|
-
"@atlassian/search-provider": "^17.
|
|
170
|
+
"@atlassian/feature-flags-test-utils": "^1.3.0",
|
|
171
|
+
"@atlassian/search-client": "^2.18.0",
|
|
172
|
+
"@atlassian/search-provider": "^17.1.0",
|
|
172
173
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
173
174
|
"@atlassian/testing-library": "^0.11.0",
|
|
174
|
-
"@atlassian/user-profile-card": "^1.
|
|
175
|
+
"@atlassian/user-profile-card": "^1.32.0",
|
|
175
176
|
"@emotion/jest": "^11.8.0",
|
|
176
177
|
"@testing-library/react": "^16.3.0",
|
|
177
178
|
"@types/diff": "^5.0.2",
|