@atlaskit/editor-plugin-code-block 1.5.1 → 2.0.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 +23 -0
- package/dist/cjs/plugin.js +1 -2
- package/dist/es2019/plugin.js +25 -28
- package/dist/esm/plugin.js +1 -2
- package/dist/types/types.d.ts +1 -2
- package/dist/types-ts4.5/types.d.ts +1 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`d9b562bd66f8e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d9b562bd66f8e) -
|
|
8
|
+
[ux] [ED-23947] restoring the original order of the typeahead menu so that actions, media,
|
|
9
|
+
mentions and emojis are above the fold (in the top 5 results). this change is a major because it
|
|
10
|
+
removes the `getEditorFeatureFlags prop` for plugins. if any consumers who have adopted these
|
|
11
|
+
changes to the public API, they should remove them on their side too.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
17
|
+
## 1.5.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#114548](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114548)
|
|
22
|
+
[`8b2d47bffb50e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b2d47bffb50e) -
|
|
23
|
+
bump adf-schema version
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 1.5.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -85,14 +85,13 @@ var codeBlockPlugin = function codeBlockPlugin(_ref) {
|
|
|
85
85
|
},
|
|
86
86
|
pluginsOptions: {
|
|
87
87
|
quickInsert: function quickInsert(_ref5) {
|
|
88
|
-
var _options$getEditorFea;
|
|
89
88
|
var formatMessage = _ref5.formatMessage;
|
|
90
89
|
return [{
|
|
91
90
|
id: 'codeblock',
|
|
92
91
|
title: formatMessage(_messages.blockTypeMessages.codeblock),
|
|
93
92
|
description: formatMessage(_messages.blockTypeMessages.codeblockDescription),
|
|
94
93
|
keywords: ['code block'],
|
|
95
|
-
priority:
|
|
94
|
+
priority: 700,
|
|
96
95
|
keyshortcut: '```',
|
|
97
96
|
icon: function icon() {
|
|
98
97
|
return /*#__PURE__*/_react.default.createElement(_quickInsert.IconCode, null);
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -74,34 +74,31 @@ const codeBlockPlugin = ({
|
|
|
74
74
|
pluginsOptions: {
|
|
75
75
|
quickInsert: ({
|
|
76
76
|
formatMessage
|
|
77
|
-
}) => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
}];
|
|
104
|
-
},
|
|
77
|
+
}) => [{
|
|
78
|
+
id: 'codeblock',
|
|
79
|
+
title: formatMessage(blockTypeMessages.codeblock),
|
|
80
|
+
description: formatMessage(blockTypeMessages.codeblockDescription),
|
|
81
|
+
keywords: ['code block'],
|
|
82
|
+
priority: 700,
|
|
83
|
+
keyshortcut: '```',
|
|
84
|
+
icon: () => /*#__PURE__*/React.createElement(IconCode, null),
|
|
85
|
+
action(_insert, state) {
|
|
86
|
+
var _api$analytics3;
|
|
87
|
+
const tr = createInsertCodeBlockTransaction({
|
|
88
|
+
state
|
|
89
|
+
});
|
|
90
|
+
api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions.attachAnalyticsEvent({
|
|
91
|
+
action: ACTION.INSERTED,
|
|
92
|
+
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
93
|
+
actionSubjectId: ACTION_SUBJECT_ID.CODE_BLOCK,
|
|
94
|
+
attributes: {
|
|
95
|
+
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
96
|
+
},
|
|
97
|
+
eventType: EVENT_TYPE.TRACK
|
|
98
|
+
})(tr);
|
|
99
|
+
return tr;
|
|
100
|
+
}
|
|
101
|
+
}],
|
|
105
102
|
floatingToolbar: getToolbarConfig(options === null || options === void 0 ? void 0 : options.allowCopyToClipboard, api)
|
|
106
103
|
}
|
|
107
104
|
});
|
package/dist/esm/plugin.js
CHANGED
|
@@ -78,14 +78,13 @@ var codeBlockPlugin = function codeBlockPlugin(_ref) {
|
|
|
78
78
|
},
|
|
79
79
|
pluginsOptions: {
|
|
80
80
|
quickInsert: function quickInsert(_ref5) {
|
|
81
|
-
var _options$getEditorFea;
|
|
82
81
|
var formatMessage = _ref5.formatMessage;
|
|
83
82
|
return [{
|
|
84
83
|
id: 'codeblock',
|
|
85
84
|
title: formatMessage(blockTypeMessages.codeblock),
|
|
86
85
|
description: formatMessage(blockTypeMessages.codeblockDescription),
|
|
87
86
|
keywords: ['code block'],
|
|
88
|
-
priority:
|
|
87
|
+
priority: 700,
|
|
89
88
|
keyshortcut: '```',
|
|
90
89
|
icon: function icon() {
|
|
91
90
|
return /*#__PURE__*/React.createElement(IconCode, null);
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { EditorAppearance,
|
|
1
|
+
import type { EditorAppearance, LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
2
2
|
export interface CodeBlockOptions extends LongPressSelectionPluginOptions {
|
|
3
3
|
allowCopyToClipboard?: boolean;
|
|
4
4
|
allowCompositionInputOverride?: boolean;
|
|
5
5
|
appearance?: EditorAppearance | undefined;
|
|
6
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { EditorAppearance,
|
|
1
|
+
import type { EditorAppearance, LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
2
2
|
export interface CodeBlockOptions extends LongPressSelectionPluginOptions {
|
|
3
3
|
allowCopyToClipboard?: boolean;
|
|
4
4
|
allowCompositionInputOverride?: boolean;
|
|
5
5
|
appearance?: EditorAppearance | undefined;
|
|
6
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
7
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/adf-schema": "^
|
|
36
|
+
"@atlaskit/adf-schema": "^39.0.3",
|
|
37
37
|
"@atlaskit/code": "^15.3.0",
|
|
38
|
-
"@atlaskit/editor-common": "^
|
|
38
|
+
"@atlaskit/editor-common": "^84.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
40
40
|
"@atlaskit/editor-plugin-composition": "^1.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|