@atlaskit/editor-core 226.3.2 → 226.3.4
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 +15 -0
- package/dist/cjs/create-editor/create-schema.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +3 -2
- package/dist/cjs/ui/quick-insert/getExtensionQuickInsertComponents.js +4 -2
- package/dist/cjs/utils/extensions.js +5 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/create-schema.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +2 -1
- package/dist/es2019/ui/quick-insert/getExtensionQuickInsertComponents.js +4 -2
- package/dist/es2019/utils/extensions.js +3 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/create-schema.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +2 -1
- package/dist/esm/ui/quick-insert/getExtensionQuickInsertComponents.js +4 -2
- package/dist/esm/utils/extensions.js +5 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +8 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 226.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 226.3.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`25ed290dcc443`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/25ed290dcc443) -
|
|
14
|
+
Add Quick Insert category selection support for slash commands behind the
|
|
15
|
+
platform_editor_slash_command feature flag.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 226.3.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createSchema = createSchema;
|
|
7
7
|
exports.wrapToDOMProxy = exports.wrapNodeSpecProxy = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _sanitizeNodes = require("@atlaskit/adf-schema/sanitizeNodes");
|
|
9
9
|
var _legacyRankPlugins = require("@atlaskit/editor-common/legacy-rank-plugins");
|
|
10
10
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
11
11
|
var _addMetadataAttributes = require("./addMetadataAttributes");
|
|
@@ -70,7 +70,7 @@ function createSchema(editorConfig) {
|
|
|
70
70
|
acc[mark.name] = wrapNodeSpecProxy(mark.mark);
|
|
71
71
|
return acc;
|
|
72
72
|
}, {}));
|
|
73
|
-
var nodes = (0,
|
|
73
|
+
var nodes = (0, _sanitizeNodes.sanitizeNodes)(editorConfig.nodes.sort((0, _legacyRankPlugins.sortByOrder)('nodes')).reduce(function (acc, node) {
|
|
74
74
|
acc[node.name] = wrapNodeSpecProxy(node.node);
|
|
75
75
|
return acc;
|
|
76
76
|
}, {}), marks);
|
|
@@ -11,7 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _reactIntl = require("react-intl");
|
|
14
|
-
var
|
|
14
|
+
var _decisionList = require("@atlaskit/adf-schema/decision-list");
|
|
15
|
+
var _taskList = require("@atlaskit/adf-schema/task-list");
|
|
15
16
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
16
17
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
17
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
@@ -63,7 +64,7 @@ var editorContentAreaProsemirrorStyle = (0, _react2.css)({
|
|
|
63
64
|
'& > *': {
|
|
64
65
|
clear: 'both'
|
|
65
66
|
}
|
|
66
|
-
}, "> p, > ul, > ol:not(".concat(
|
|
67
|
+
}, "> p, > ul, > ol:not(".concat(_taskList.taskListSelector, "):not(").concat(_decisionList.decisionListSelector, "), > h1, > h2, > h3, > h4, > h5, > h6"), {
|
|
67
68
|
clear: 'none'
|
|
68
69
|
}), '> p:last-child', {
|
|
69
70
|
marginBottom: "var(--ds-space-300, 24px)"
|
|
@@ -29,7 +29,8 @@ var getStructureExtensionItemRank = function getStructureExtensionItemRank(item)
|
|
|
29
29
|
};
|
|
30
30
|
var isStructureExtensionItem = function isStructureExtensionItem(item) {
|
|
31
31
|
return (0, _getMenuItemParents.getQuickInsertMenuItemParents)({
|
|
32
|
-
|
|
32
|
+
category: item.category,
|
|
33
|
+
legacyCategories: item.categories,
|
|
33
34
|
rank: 0
|
|
34
35
|
}).some(function (parent) {
|
|
35
36
|
return parent.key === _keys.STRUCTURE_SECTION.key;
|
|
@@ -56,7 +57,8 @@ var getExtensionQuickInsertComponents = exports.getExtensionQuickInsertComponent
|
|
|
56
57
|
type: 'menu-item',
|
|
57
58
|
key: item.key,
|
|
58
59
|
parents: (0, _getMenuItemParents.getQuickInsertMenuItemParents)({
|
|
59
|
-
|
|
60
|
+
category: item.category,
|
|
61
|
+
legacyCategories: categories,
|
|
60
62
|
rank: structureRank !== null && structureRank !== void 0 ? structureRank : fallbackRank
|
|
61
63
|
}),
|
|
62
64
|
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function () {
|
|
@@ -127,7 +127,7 @@ function _extensionProviderToQuickInsertProvider() {
|
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
return _objectSpread(_objectSpread(_objectSpread({}, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_app_category_analytics') && item.app ? {
|
|
130
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_app_category_analytics') && item.app ? {
|
|
131
131
|
app: item.app
|
|
132
132
|
} : {}), {}, {
|
|
133
133
|
// Add module key so typeahead/quick-insert can identify items
|
|
@@ -143,7 +143,10 @@ function _extensionProviderToQuickInsertProvider() {
|
|
|
143
143
|
},
|
|
144
144
|
keywords: item.keywords,
|
|
145
145
|
featured: item.featured,
|
|
146
|
-
priority: item.priority
|
|
146
|
+
priority: item.priority
|
|
147
|
+
}, item.category ? {
|
|
148
|
+
category: item.category
|
|
149
|
+
} : {}), {}, {
|
|
147
150
|
categories: item.categories
|
|
148
151
|
}, item.lozenge != null && {
|
|
149
152
|
lozenge: item.lozenge
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
8
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
9
|
-
var version = exports.version = "226.3.
|
|
9
|
+
var version = exports.version = "226.3.3";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sanitizeNodes } from '@atlaskit/adf-schema/
|
|
1
|
+
import { sanitizeNodes } from '@atlaskit/adf-schema/sanitizeNodes';
|
|
2
2
|
import { sortByOrder } from '@atlaskit/editor-common/legacy-rank-plugins';
|
|
3
3
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { addMetadataAttributes } from './addMetadataAttributes';
|
|
@@ -9,7 +9,8 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
9
9
|
import { css, jsx, useTheme } from '@emotion/react';
|
|
10
10
|
import classnames from 'classnames';
|
|
11
11
|
import { injectIntl } from 'react-intl';
|
|
12
|
-
import { decisionListSelector
|
|
12
|
+
import { decisionListSelector } from '@atlaskit/adf-schema/decision-list';
|
|
13
|
+
import { taskListSelector } from '@atlaskit/adf-schema/task-list';
|
|
13
14
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
14
15
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
15
16
|
import { akEditorFullPageNarrowBreakout, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
@@ -19,7 +19,8 @@ const structureExtensionItemKeyRanks = {
|
|
|
19
19
|
const UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK = 3100;
|
|
20
20
|
const getStructureExtensionItemRank = item => structureExtensionItemKeyRanks[item.key];
|
|
21
21
|
const isStructureExtensionItem = item => getQuickInsertMenuItemParents({
|
|
22
|
-
|
|
22
|
+
category: item.category,
|
|
23
|
+
legacyCategories: item.categories,
|
|
23
24
|
rank: 0
|
|
24
25
|
}).some(parent => parent.key === STRUCTURE_SECTION.key);
|
|
25
26
|
export const getExtensionQuickInsertComponents = ({
|
|
@@ -38,7 +39,8 @@ export const getExtensionQuickInsertComponents = ({
|
|
|
38
39
|
type: 'menu-item',
|
|
39
40
|
key: item.key,
|
|
40
41
|
parents: getQuickInsertMenuItemParents({
|
|
41
|
-
|
|
42
|
+
category: item.category,
|
|
43
|
+
legacyCategories: categories,
|
|
42
44
|
rank: structureRank !== null && structureRank !== void 0 ? structureRank : fallbackRank
|
|
43
45
|
}),
|
|
44
46
|
match: createQuickInsertMatcher(() => ({
|
|
@@ -104,6 +104,9 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
|
|
|
104
104
|
keywords: item.keywords,
|
|
105
105
|
featured: item.featured,
|
|
106
106
|
priority: item.priority,
|
|
107
|
+
...(item.category ? {
|
|
108
|
+
category: item.category
|
|
109
|
+
} : {}),
|
|
107
110
|
categories: item.categories,
|
|
108
111
|
...(item.lozenge != null && {
|
|
109
112
|
lozenge: item.lozenge
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sanitizeNodes } from '@atlaskit/adf-schema/
|
|
1
|
+
import { sanitizeNodes } from '@atlaskit/adf-schema/sanitizeNodes';
|
|
2
2
|
import { sortByOrder } from '@atlaskit/editor-common/legacy-rank-plugins';
|
|
3
3
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { addMetadataAttributes } from './addMetadataAttributes';
|
|
@@ -10,7 +10,8 @@ import React, { useImperativeHandle, useRef } from 'react';
|
|
|
10
10
|
import { css, jsx, useTheme } from '@emotion/react';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import { injectIntl } from 'react-intl';
|
|
13
|
-
import { decisionListSelector
|
|
13
|
+
import { decisionListSelector } from '@atlaskit/adf-schema/decision-list';
|
|
14
|
+
import { taskListSelector } from '@atlaskit/adf-schema/task-list';
|
|
14
15
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
15
16
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
16
17
|
import { akEditorFullPageNarrowBreakout, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
@@ -22,7 +22,8 @@ var getStructureExtensionItemRank = function getStructureExtensionItemRank(item)
|
|
|
22
22
|
};
|
|
23
23
|
var isStructureExtensionItem = function isStructureExtensionItem(item) {
|
|
24
24
|
return getQuickInsertMenuItemParents({
|
|
25
|
-
|
|
25
|
+
category: item.category,
|
|
26
|
+
legacyCategories: item.categories,
|
|
26
27
|
rank: 0
|
|
27
28
|
}).some(function (parent) {
|
|
28
29
|
return parent.key === STRUCTURE_SECTION.key;
|
|
@@ -49,7 +50,8 @@ export var getExtensionQuickInsertComponents = function getExtensionQuickInsertC
|
|
|
49
50
|
type: 'menu-item',
|
|
50
51
|
key: item.key,
|
|
51
52
|
parents: getQuickInsertMenuItemParents({
|
|
52
|
-
|
|
53
|
+
category: item.category,
|
|
54
|
+
legacyCategories: categories,
|
|
53
55
|
rank: structureRank !== null && structureRank !== void 0 ? structureRank : fallbackRank
|
|
54
56
|
}),
|
|
55
57
|
match: createQuickInsertMatcher(function () {
|
|
@@ -121,7 +121,7 @@ function _extensionProviderToQuickInsertProvider() {
|
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
|
-
return _objectSpread(_objectSpread(_objectSpread({}, isExperimentEnabled('platform_editor_slash_app_category_analytics') && item.app ? {
|
|
124
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, isExperimentEnabled('platform_editor_slash_app_category_analytics') && item.app ? {
|
|
125
125
|
app: item.app
|
|
126
126
|
} : {}), {}, {
|
|
127
127
|
// Add module key so typeahead/quick-insert can identify items
|
|
@@ -137,7 +137,10 @@ function _extensionProviderToQuickInsertProvider() {
|
|
|
137
137
|
},
|
|
138
138
|
keywords: item.keywords,
|
|
139
139
|
featured: item.featured,
|
|
140
|
-
priority: item.priority
|
|
140
|
+
priority: item.priority
|
|
141
|
+
}, item.category ? {
|
|
142
|
+
category: item.category
|
|
143
|
+
} : {}), {}, {
|
|
141
144
|
categories: item.categories
|
|
142
145
|
}, item.lozenge != null && {
|
|
143
146
|
lozenge: item.lozenge
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "226.3.
|
|
3
|
+
"version": "226.3.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/css": "^1.1.0",
|
|
48
48
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
49
49
|
"@atlaskit/editor-performance-metrics": "^3.2.0",
|
|
50
|
-
"@atlaskit/editor-plugin-block-menu": "^15.
|
|
50
|
+
"@atlaskit/editor-plugin-block-menu": "^15.1.0",
|
|
51
51
|
"@atlaskit/editor-plugin-connectivity": "^16.0.0",
|
|
52
52
|
"@atlaskit/editor-plugin-quick-insert": "^16.2.0",
|
|
53
53
|
"@atlaskit/editor-plugin-selection-extension": "^19.1.0",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"@atlaskit/popup": "^6.3.0",
|
|
73
73
|
"@atlaskit/primitives": "^22.5.0",
|
|
74
74
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
75
|
-
"@atlaskit/react-ufo": "^7.
|
|
75
|
+
"@atlaskit/react-ufo": "^7.8.0",
|
|
76
76
|
"@atlaskit/task-decision": "^21.9.0",
|
|
77
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
77
|
+
"@atlaskit/tmp-editor-statsig": "^173.0.0",
|
|
78
78
|
"@atlaskit/tokens": "^16.11.0",
|
|
79
79
|
"@atlaskit/tooltip": "^24.3.0",
|
|
80
80
|
"@atlaskit/width-detector": "^7.2.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"uuid": "^3.1.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@atlaskit/editor-common": "^120.
|
|
95
|
+
"@atlaskit/editor-common": "^120.11.0",
|
|
96
96
|
"@atlaskit/link-provider": "^5.5.0",
|
|
97
97
|
"@atlaskit/media-core": "^38.2.0",
|
|
98
98
|
"react": "^18.2.0",
|
|
@@ -129,10 +129,10 @@
|
|
|
129
129
|
"@atlaskit/editor-plugin-media": "^18.1.0",
|
|
130
130
|
"@atlaskit/editor-plugin-paste": "^17.1.0",
|
|
131
131
|
"@atlaskit/editor-plugin-selection-marker": "^16.0.0",
|
|
132
|
-
"@atlaskit/editor-plugin-show-diff": "^14.
|
|
132
|
+
"@atlaskit/editor-plugin-show-diff": "^14.3.0",
|
|
133
133
|
"@atlaskit/editor-plugin-synced-block": "^14.0.0",
|
|
134
134
|
"@atlaskit/editor-plugin-table": "^28.1.0",
|
|
135
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^19.
|
|
135
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^19.2.0",
|
|
136
136
|
"@atlaskit/editor-plugin-text-color": "^16.1.0",
|
|
137
137
|
"@atlaskit/editor-plugin-toolbar-lists-indentation": "^17.1.0",
|
|
138
138
|
"@atlaskit/editor-plugin-track-changes": "^15.0.0",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@atlassian/search-provider": "^17.1.0",
|
|
173
173
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
174
174
|
"@atlassian/testing-library": "^0.11.0",
|
|
175
|
-
"@atlassian/user-profile-card": "^1.
|
|
175
|
+
"@atlassian/user-profile-card": "^1.34.0",
|
|
176
176
|
"@emotion/jest": "^11.8.0",
|
|
177
177
|
"@testing-library/react": "^16.3.0",
|
|
178
178
|
"@types/diff": "^5.0.2",
|
|
@@ -187,26 +187,6 @@
|
|
|
187
187
|
"react-intl": "^7.0.0",
|
|
188
188
|
"url-search-params": "^0.10.0"
|
|
189
189
|
},
|
|
190
|
-
"techstack": {
|
|
191
|
-
"@atlassian/frontend": {
|
|
192
|
-
"import-structure": [
|
|
193
|
-
"atlassian-conventions"
|
|
194
|
-
],
|
|
195
|
-
"circular-dependencies": [
|
|
196
|
-
"file-level"
|
|
197
|
-
]
|
|
198
|
-
},
|
|
199
|
-
"@repo/internal": {
|
|
200
|
-
"deprecation": "no-deprecated-imports",
|
|
201
|
-
"design-tokens": [
|
|
202
|
-
"color"
|
|
203
|
-
],
|
|
204
|
-
"styling": [
|
|
205
|
-
"compiled",
|
|
206
|
-
"emotion"
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
190
|
"platform-feature-flags": {
|
|
211
191
|
"platform_comment_container_query": {
|
|
212
192
|
"type": "boolean"
|