@atlaskit/editor-plugin-code-block 1.3.3 → 1.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 +10 -0
- package/dist/cjs/plugin.js +2 -1
- package/dist/es2019/plugin.js +28 -25
- package/dist/esm/plugin.js +2 -1
- package/dist/types/types.d.ts +2 -1
- package/dist/types-ts4.5/types.d.ts +2 -1
- package/package.json +82 -102
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 1.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#110390](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110390)
|
|
8
|
+
[`bead123202369`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bead123202369) -
|
|
9
|
+
[ux] [ED-23642] Reordering the typeahead so that date, status, code block & info panel are above
|
|
10
|
+
the fold (in the top 5 results)
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 1.3.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -85,13 +85,14 @@ var codeBlockPlugin = function codeBlockPlugin(_ref) {
|
|
|
85
85
|
},
|
|
86
86
|
pluginsOptions: {
|
|
87
87
|
quickInsert: function quickInsert(_ref5) {
|
|
88
|
+
var _options$getEditorFea;
|
|
88
89
|
var formatMessage = _ref5.formatMessage;
|
|
89
90
|
return [{
|
|
90
91
|
id: 'codeblock',
|
|
91
92
|
title: formatMessage(_messages.blockTypeMessages.codeblock),
|
|
92
93
|
description: formatMessage(_messages.blockTypeMessages.codeblockDescription),
|
|
93
94
|
keywords: ['code block'],
|
|
94
|
-
priority: 700,
|
|
95
|
+
priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 400 : 700,
|
|
95
96
|
keyshortcut: '```',
|
|
96
97
|
icon: function icon() {
|
|
97
98
|
return /*#__PURE__*/_react.default.createElement(_quickInsert.IconCode, null);
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -74,31 +74,34 @@ 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
|
-
|
|
77
|
+
}) => {
|
|
78
|
+
var _options$getEditorFea;
|
|
79
|
+
return [{
|
|
80
|
+
id: 'codeblock',
|
|
81
|
+
title: formatMessage(blockTypeMessages.codeblock),
|
|
82
|
+
description: formatMessage(blockTypeMessages.codeblockDescription),
|
|
83
|
+
keywords: ['code block'],
|
|
84
|
+
priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 400 : 700,
|
|
85
|
+
keyshortcut: '```',
|
|
86
|
+
icon: () => /*#__PURE__*/React.createElement(IconCode, null),
|
|
87
|
+
action(_insert, state) {
|
|
88
|
+
var _api$analytics3;
|
|
89
|
+
const tr = createInsertCodeBlockTransaction({
|
|
90
|
+
state
|
|
91
|
+
});
|
|
92
|
+
api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions.attachAnalyticsEvent({
|
|
93
|
+
action: ACTION.INSERTED,
|
|
94
|
+
actionSubject: ACTION_SUBJECT.DOCUMENT,
|
|
95
|
+
actionSubjectId: ACTION_SUBJECT_ID.CODE_BLOCK,
|
|
96
|
+
attributes: {
|
|
97
|
+
inputMethod: INPUT_METHOD.QUICK_INSERT
|
|
98
|
+
},
|
|
99
|
+
eventType: EVENT_TYPE.TRACK
|
|
100
|
+
})(tr);
|
|
101
|
+
return tr;
|
|
102
|
+
}
|
|
103
|
+
}];
|
|
104
|
+
},
|
|
102
105
|
floatingToolbar: getToolbarConfig(options === null || options === void 0 ? void 0 : options.allowCopyToClipboard, api)
|
|
103
106
|
}
|
|
104
107
|
});
|
package/dist/esm/plugin.js
CHANGED
|
@@ -78,13 +78,14 @@ var codeBlockPlugin = function codeBlockPlugin(_ref) {
|
|
|
78
78
|
},
|
|
79
79
|
pluginsOptions: {
|
|
80
80
|
quickInsert: function quickInsert(_ref5) {
|
|
81
|
+
var _options$getEditorFea;
|
|
81
82
|
var formatMessage = _ref5.formatMessage;
|
|
82
83
|
return [{
|
|
83
84
|
id: 'codeblock',
|
|
84
85
|
title: formatMessage(blockTypeMessages.codeblock),
|
|
85
86
|
description: formatMessage(blockTypeMessages.codeblockDescription),
|
|
86
87
|
keywords: ['code block'],
|
|
87
|
-
priority: 700,
|
|
88
|
+
priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 400 : 700,
|
|
88
89
|
keyshortcut: '```',
|
|
89
90
|
icon: function icon() {
|
|
90
91
|
return /*#__PURE__*/React.createElement(IconCode, null);
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { EditorAppearance, LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { EditorAppearance, GetEditorFeatureFlags, 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;
|
|
6
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { EditorAppearance, LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { EditorAppearance, GetEditorFeatureFlags, 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;
|
|
6
7
|
}
|
package/package.json
CHANGED
|
@@ -1,103 +1,83 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
],
|
|
85
|
-
"imports": [
|
|
86
|
-
"import-no-extraneous-disable-for-examples-and-docs"
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"stricter": {
|
|
91
|
-
"no-unused-dependencies": {
|
|
92
|
-
"checkDevDependencies": true
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
"platform-feature-flags": {
|
|
96
|
-
"platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
},
|
|
99
|
-
"platform.editor.codeblock-preserve-newlines_54r3m": {
|
|
100
|
-
"type": "boolean"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
2
|
+
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
+
"version": "1.3.4",
|
|
4
|
+
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor: Scarlet",
|
|
12
|
+
"singleton": true,
|
|
13
|
+
"inPublicMirror": false,
|
|
14
|
+
"releaseModel": "continuous",
|
|
15
|
+
"runReact18": false
|
|
16
|
+
},
|
|
17
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
18
|
+
"main": "dist/cjs/index.js",
|
|
19
|
+
"module": "dist/esm/index.js",
|
|
20
|
+
"module:es2019": "dist/es2019/index.js",
|
|
21
|
+
"types": "dist/types/index.d.ts",
|
|
22
|
+
"typesVersions": {
|
|
23
|
+
">=4.5 <4.9": {
|
|
24
|
+
"*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"atlaskit:src": "src/index.ts",
|
|
29
|
+
"af:exports": {
|
|
30
|
+
".": "./src/index.ts"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@atlaskit/adf-schema": "^36.10.7",
|
|
34
|
+
"@atlaskit/code": "^15.2.0",
|
|
35
|
+
"@atlaskit/editor-common": "^82.6.0",
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^1.2.0",
|
|
37
|
+
"@atlaskit/editor-plugin-composition": "^1.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-decorations": "^1.1.0",
|
|
39
|
+
"@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
|
|
40
|
+
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
41
|
+
"@atlaskit/icon": "^22.3.0",
|
|
42
|
+
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
43
|
+
"@atlaskit/prosemirror-input-rules": "^3.1.0",
|
|
44
|
+
"@babel/runtime": "^7.0.0",
|
|
45
|
+
"raf-schd": "^4.0.3"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^16.8.0",
|
|
49
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"typescript": "~5.4.2"
|
|
53
|
+
},
|
|
54
|
+
"techstack": {
|
|
55
|
+
"@atlassian/frontend": {
|
|
56
|
+
"import-structure": ["atlassian-conventions"],
|
|
57
|
+
"circular-dependencies": ["file-and-folder-level"]
|
|
58
|
+
},
|
|
59
|
+
"@repo/internal": {
|
|
60
|
+
"dom-events": "use-bind-event-listener",
|
|
61
|
+
"analytics": ["analytics-next"],
|
|
62
|
+
"design-tokens": ["color"],
|
|
63
|
+
"theming": ["react-context"],
|
|
64
|
+
"ui-components": ["lite-mode"],
|
|
65
|
+
"deprecation": "no-deprecated-imports",
|
|
66
|
+
"styling": ["emotion", "emotion"],
|
|
67
|
+
"imports": ["import-no-extraneous-disable-for-examples-and-docs"]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"stricter": {
|
|
71
|
+
"no-unused-dependencies": {
|
|
72
|
+
"checkDevDependencies": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"platform-feature-flags": {
|
|
76
|
+
"platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
|
|
77
|
+
"type": "boolean"
|
|
78
|
+
},
|
|
79
|
+
"platform.editor.codeblock-preserve-newlines_54r3m": {
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|