@atlaskit/editor-plugin-code-block 4.4.0 → 4.4.1
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 +9 -0
- package/dist/cjs/editor-commands/index.js +41 -2
- package/dist/cjs/pm-plugins/toolbar.js +2 -2
- package/dist/es2019/editor-commands/index.js +43 -2
- package/dist/es2019/pm-plugins/toolbar.js +3 -3
- package/dist/esm/editor-commands/index.js +41 -2
- package/dist/esm/pm-plugins/toolbar.js +3 -3
- package/dist/types/editor-commands/index.d.ts +4 -1
- package/dist/types-ts4.5/editor-commands/index.d.ts +4 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 4.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149482](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149482)
|
|
8
|
+
[`1f1f73876c3c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f1f73876c3c8) -
|
|
9
|
+
ED-27860 Add analytics for copy and delete button in floating toolbars
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 4.4.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.copyContentToClipboard = exports.changeLanguage = void 0;
|
|
6
|
+
exports.copyContentToClipboardWithAnalytics = exports.copyContentToClipboard = exports.changeLanguage = void 0;
|
|
7
7
|
exports.createInsertCodeBlockTransaction = createInsertCodeBlockTransaction;
|
|
8
8
|
exports.ignoreFollowingMutations = void 0;
|
|
9
9
|
exports.insertCodeBlockWithAnalytics = insertCodeBlockWithAnalytics;
|
|
10
|
-
exports.toggleWordWrapStateForCodeBlockNode = exports.resetShouldIgnoreFollowingMutations = exports.resetCopiedState = exports.removeCodeBlock = void 0;
|
|
10
|
+
exports.toggleWordWrapStateForCodeBlockNode = exports.resetShouldIgnoreFollowingMutations = exports.resetCopiedState = exports.removeCodeBlockWithAnalytics = exports.removeCodeBlock = void 0;
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
12
|
var _clipboard = require("@atlaskit/editor-common/clipboard");
|
|
13
13
|
var _codeBlock = require("@atlaskit/editor-common/code-block");
|
|
@@ -20,6 +20,16 @@ var _actions = require("../pm-plugins/actions");
|
|
|
20
20
|
var _codeBlockCopySelectionPlugin = require("../pm-plugins/codeBlockCopySelectionPlugin");
|
|
21
21
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
22
22
|
var _transformToCodeBlock = require("../pm-plugins/transform-to-code-block");
|
|
23
|
+
var removeCodeBlockWithAnalytics = exports.removeCodeBlockWithAnalytics = function removeCodeBlockWithAnalytics(editorAnalyticsAPI) {
|
|
24
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
25
|
+
action: _analytics.ACTION.DELETED,
|
|
26
|
+
actionSubject: _analytics.ACTION_SUBJECT.CODE_BLOCK,
|
|
27
|
+
attributes: {
|
|
28
|
+
inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
|
|
29
|
+
},
|
|
30
|
+
eventType: _analytics.EVENT_TYPE.TRACK
|
|
31
|
+
})(removeCodeBlock);
|
|
32
|
+
};
|
|
23
33
|
var removeCodeBlock = exports.removeCodeBlock = function removeCodeBlock(state, dispatch) {
|
|
24
34
|
var nodes = state.schema.nodes,
|
|
25
35
|
tr = state.tr;
|
|
@@ -63,6 +73,35 @@ var changeLanguage = exports.changeLanguage = function changeLanguage(editorAnal
|
|
|
63
73
|
};
|
|
64
74
|
};
|
|
65
75
|
};
|
|
76
|
+
var copyContentToClipboardWithAnalytics = exports.copyContentToClipboardWithAnalytics = function copyContentToClipboardWithAnalytics(editorAnalyticsAPI) {
|
|
77
|
+
return function (state, dispatch) {
|
|
78
|
+
var nodes = state.schema.nodes,
|
|
79
|
+
tr = state.tr;
|
|
80
|
+
var codeBlock = (0, _utils.findParentNodeOfType)(nodes.codeBlock)(tr.selection);
|
|
81
|
+
var textContent = codeBlock && codeBlock.node.textContent;
|
|
82
|
+
if (textContent) {
|
|
83
|
+
(0, _clipboard.copyToClipboard)(textContent);
|
|
84
|
+
var copyToClipboardTr = tr;
|
|
85
|
+
copyToClipboardTr.setMeta(_pluginKey.pluginKey, {
|
|
86
|
+
type: _actions.ACTIONS.SET_COPIED_TO_CLIPBOARD,
|
|
87
|
+
data: true
|
|
88
|
+
});
|
|
89
|
+
copyToClipboardTr.setMeta(_codeBlockCopySelectionPlugin.copySelectionPluginKey, 'remove-selection');
|
|
90
|
+
if (editorAnalyticsAPI) {
|
|
91
|
+
var analyticsPayload = (0, _clipboard.getAnalyticsPayload)(state, _analytics.ACTION.COPIED);
|
|
92
|
+
if (analyticsPayload) {
|
|
93
|
+
analyticsPayload.attributes.inputMethod = _analytics.INPUT_METHOD.FLOATING_TB;
|
|
94
|
+
analyticsPayload.attributes.nodeType = codeBlock === null || codeBlock === void 0 ? void 0 : codeBlock.node.type.name;
|
|
95
|
+
editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(copyToClipboardTr);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (dispatch) {
|
|
99
|
+
dispatch(copyToClipboardTr);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return true;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
66
105
|
var copyContentToClipboard = exports.copyContentToClipboard = function copyContentToClipboard(state, dispatch) {
|
|
67
106
|
var nodes = state.schema.nodes,
|
|
68
107
|
tr = state.tr;
|
|
@@ -88,7 +88,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
88
88
|
icon: _copy.default,
|
|
89
89
|
// note: copyContentToClipboard contains logic that also removes the
|
|
90
90
|
// visual feedback for the copy button
|
|
91
|
-
onClick: _editorCommands.copyContentToClipboard,
|
|
91
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? (0, _editorCommands.copyContentToClipboardWithAnalytics)(editorAnalyticsAPI) : _editorCommands.copyContentToClipboard,
|
|
92
92
|
title: formatMessage(codeBlockState.contentCopied ? _messages.codeBlockButtonMessages.copiedCodeToClipboard : _messages.codeBlockButtonMessages.copyCodeToClipboard),
|
|
93
93
|
onMouseEnter: _codeBlockCopySelectionPlugin.provideVisualFeedbackForCopyButton,
|
|
94
94
|
// note: resetCopiedState contains logic that also removes the
|
|
@@ -110,7 +110,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
110
110
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
111
111
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
112
112
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
113
|
-
onClick: _editorCommands.removeCodeBlock,
|
|
113
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? (0, _editorCommands.removeCodeBlockWithAnalytics)(editorAnalyticsAPI) : _editorCommands.removeCodeBlock,
|
|
114
114
|
title: formatMessage(_messages.default.remove),
|
|
115
115
|
tabIndex: null
|
|
116
116
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, MODE, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { copyToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, MODE, PLATFORMS, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { copyToClipboard, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
3
3
|
import { codeBlockWrappedStates, isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
|
|
4
4
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
5
5
|
import { contentAllowedInCodeBlock, shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/insert';
|
|
@@ -10,6 +10,16 @@ import { ACTIONS } from '../pm-plugins/actions';
|
|
|
10
10
|
import { copySelectionPluginKey } from '../pm-plugins/codeBlockCopySelectionPlugin';
|
|
11
11
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
12
12
|
import { transformToCodeBlockAction } from '../pm-plugins/transform-to-code-block';
|
|
13
|
+
export const removeCodeBlockWithAnalytics = editorAnalyticsAPI => {
|
|
14
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
15
|
+
action: ACTION.DELETED,
|
|
16
|
+
actionSubject: ACTION_SUBJECT.CODE_BLOCK,
|
|
17
|
+
attributes: {
|
|
18
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
19
|
+
},
|
|
20
|
+
eventType: EVENT_TYPE.TRACK
|
|
21
|
+
})(removeCodeBlock);
|
|
22
|
+
};
|
|
13
23
|
export const removeCodeBlock = (state, dispatch) => {
|
|
14
24
|
const {
|
|
15
25
|
schema: {
|
|
@@ -55,6 +65,37 @@ export const changeLanguage = editorAnalyticsAPI => language => (state, dispatch
|
|
|
55
65
|
}
|
|
56
66
|
return true;
|
|
57
67
|
};
|
|
68
|
+
export const copyContentToClipboardWithAnalytics = editorAnalyticsAPI => (state, dispatch) => {
|
|
69
|
+
const {
|
|
70
|
+
schema: {
|
|
71
|
+
nodes
|
|
72
|
+
},
|
|
73
|
+
tr
|
|
74
|
+
} = state;
|
|
75
|
+
const codeBlock = findParentNodeOfType(nodes.codeBlock)(tr.selection);
|
|
76
|
+
const textContent = codeBlock && codeBlock.node.textContent;
|
|
77
|
+
if (textContent) {
|
|
78
|
+
copyToClipboard(textContent);
|
|
79
|
+
const copyToClipboardTr = tr;
|
|
80
|
+
copyToClipboardTr.setMeta(pluginKey, {
|
|
81
|
+
type: ACTIONS.SET_COPIED_TO_CLIPBOARD,
|
|
82
|
+
data: true
|
|
83
|
+
});
|
|
84
|
+
copyToClipboardTr.setMeta(copySelectionPluginKey, 'remove-selection');
|
|
85
|
+
if (editorAnalyticsAPI) {
|
|
86
|
+
const analyticsPayload = getAnalyticsPayload(state, ACTION.COPIED);
|
|
87
|
+
if (analyticsPayload) {
|
|
88
|
+
analyticsPayload.attributes.inputMethod = INPUT_METHOD.FLOATING_TB;
|
|
89
|
+
analyticsPayload.attributes.nodeType = codeBlock === null || codeBlock === void 0 ? void 0 : codeBlock.node.type.name;
|
|
90
|
+
editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(copyToClipboardTr);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (dispatch) {
|
|
94
|
+
dispatch(copyToClipboardTr);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
};
|
|
58
99
|
export const copyContentToClipboard = (state, dispatch) => {
|
|
59
100
|
const {
|
|
60
101
|
schema: {
|
|
@@ -6,7 +6,7 @@ import CopyIcon from '@atlaskit/icon/core/migration/copy';
|
|
|
6
6
|
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
7
7
|
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { changeLanguage, copyContentToClipboard, removeCodeBlock, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
|
|
9
|
+
import { changeLanguage, copyContentToClipboard, copyContentToClipboardWithAnalytics, removeCodeBlock, removeCodeBlockWithAnalytics, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
|
|
10
10
|
import { WrapIcon } from '../ui/icons/WrapIcon';
|
|
11
11
|
import { provideVisualFeedbackForCopyButton, removeVisualFeedbackForCopyButton } from './codeBlockCopySelectionPlugin';
|
|
12
12
|
import { createLanguageList, DEFAULT_LANGUAGES, getLanguageIdentifier } from './language-list';
|
|
@@ -64,7 +64,7 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
|
|
|
64
64
|
icon: CopyIcon,
|
|
65
65
|
// note: copyContentToClipboard contains logic that also removes the
|
|
66
66
|
// visual feedback for the copy button
|
|
67
|
-
onClick: copyContentToClipboard,
|
|
67
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? copyContentToClipboardWithAnalytics(editorAnalyticsAPI) : copyContentToClipboard,
|
|
68
68
|
title: formatMessage(codeBlockState.contentCopied ? codeBlockButtonMessages.copiedCodeToClipboard : codeBlockButtonMessages.copyCodeToClipboard),
|
|
69
69
|
onMouseEnter: provideVisualFeedbackForCopyButton,
|
|
70
70
|
// note: resetCopiedState contains logic that also removes the
|
|
@@ -86,7 +86,7 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
|
|
|
86
86
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
87
87
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
88
88
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
89
|
-
onClick: removeCodeBlock,
|
|
89
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeCodeBlockWithAnalytics(editorAnalyticsAPI) : removeCodeBlock,
|
|
90
90
|
title: formatMessage(commonMessages.remove),
|
|
91
91
|
tabIndex: null
|
|
92
92
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, MODE, PLATFORMS } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { copyToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, MODE, PLATFORMS, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { copyToClipboard, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
|
|
3
3
|
import { codeBlockWrappedStates, isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
|
|
4
4
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
5
5
|
import { contentAllowedInCodeBlock, shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/insert';
|
|
@@ -10,6 +10,16 @@ import { ACTIONS } from '../pm-plugins/actions';
|
|
|
10
10
|
import { copySelectionPluginKey } from '../pm-plugins/codeBlockCopySelectionPlugin';
|
|
11
11
|
import { pluginKey } from '../pm-plugins/plugin-key';
|
|
12
12
|
import { transformToCodeBlockAction } from '../pm-plugins/transform-to-code-block';
|
|
13
|
+
export var removeCodeBlockWithAnalytics = function removeCodeBlockWithAnalytics(editorAnalyticsAPI) {
|
|
14
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
15
|
+
action: ACTION.DELETED,
|
|
16
|
+
actionSubject: ACTION_SUBJECT.CODE_BLOCK,
|
|
17
|
+
attributes: {
|
|
18
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
19
|
+
},
|
|
20
|
+
eventType: EVENT_TYPE.TRACK
|
|
21
|
+
})(removeCodeBlock);
|
|
22
|
+
};
|
|
13
23
|
export var removeCodeBlock = function removeCodeBlock(state, dispatch) {
|
|
14
24
|
var nodes = state.schema.nodes,
|
|
15
25
|
tr = state.tr;
|
|
@@ -53,6 +63,35 @@ export var changeLanguage = function changeLanguage(editorAnalyticsAPI) {
|
|
|
53
63
|
};
|
|
54
64
|
};
|
|
55
65
|
};
|
|
66
|
+
export var copyContentToClipboardWithAnalytics = function copyContentToClipboardWithAnalytics(editorAnalyticsAPI) {
|
|
67
|
+
return function (state, dispatch) {
|
|
68
|
+
var nodes = state.schema.nodes,
|
|
69
|
+
tr = state.tr;
|
|
70
|
+
var codeBlock = findParentNodeOfType(nodes.codeBlock)(tr.selection);
|
|
71
|
+
var textContent = codeBlock && codeBlock.node.textContent;
|
|
72
|
+
if (textContent) {
|
|
73
|
+
copyToClipboard(textContent);
|
|
74
|
+
var copyToClipboardTr = tr;
|
|
75
|
+
copyToClipboardTr.setMeta(pluginKey, {
|
|
76
|
+
type: ACTIONS.SET_COPIED_TO_CLIPBOARD,
|
|
77
|
+
data: true
|
|
78
|
+
});
|
|
79
|
+
copyToClipboardTr.setMeta(copySelectionPluginKey, 'remove-selection');
|
|
80
|
+
if (editorAnalyticsAPI) {
|
|
81
|
+
var analyticsPayload = getAnalyticsPayload(state, ACTION.COPIED);
|
|
82
|
+
if (analyticsPayload) {
|
|
83
|
+
analyticsPayload.attributes.inputMethod = INPUT_METHOD.FLOATING_TB;
|
|
84
|
+
analyticsPayload.attributes.nodeType = codeBlock === null || codeBlock === void 0 ? void 0 : codeBlock.node.type.name;
|
|
85
|
+
editorAnalyticsAPI.attachAnalyticsEvent(analyticsPayload)(copyToClipboardTr);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (dispatch) {
|
|
89
|
+
dispatch(copyToClipboardTr);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return true;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
56
95
|
export var copyContentToClipboard = function copyContentToClipboard(state, dispatch) {
|
|
57
96
|
var nodes = state.schema.nodes,
|
|
58
97
|
tr = state.tr;
|
|
@@ -9,7 +9,7 @@ import CopyIcon from '@atlaskit/icon/core/migration/copy';
|
|
|
9
9
|
import RemoveIcon from '@atlaskit/icon/core/migration/delete--editor-remove';
|
|
10
10
|
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { changeLanguage, copyContentToClipboard, removeCodeBlock, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
|
|
12
|
+
import { changeLanguage, copyContentToClipboard, copyContentToClipboardWithAnalytics, removeCodeBlock, removeCodeBlockWithAnalytics, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
|
|
13
13
|
import { WrapIcon } from '../ui/icons/WrapIcon';
|
|
14
14
|
import { provideVisualFeedbackForCopyButton, removeVisualFeedbackForCopyButton } from './codeBlockCopySelectionPlugin';
|
|
15
15
|
import { createLanguageList, DEFAULT_LANGUAGES, getLanguageIdentifier } from './language-list';
|
|
@@ -78,7 +78,7 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
78
78
|
icon: CopyIcon,
|
|
79
79
|
// note: copyContentToClipboard contains logic that also removes the
|
|
80
80
|
// visual feedback for the copy button
|
|
81
|
-
onClick: copyContentToClipboard,
|
|
81
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? copyContentToClipboardWithAnalytics(editorAnalyticsAPI) : copyContentToClipboard,
|
|
82
82
|
title: formatMessage(codeBlockState.contentCopied ? codeBlockButtonMessages.copiedCodeToClipboard : codeBlockButtonMessages.copyCodeToClipboard),
|
|
83
83
|
onMouseEnter: provideVisualFeedbackForCopyButton,
|
|
84
84
|
// note: resetCopiedState contains logic that also removes the
|
|
@@ -100,7 +100,7 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
100
100
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
101
101
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
102
102
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
103
|
-
onClick: removeCodeBlock,
|
|
103
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeCodeBlockWithAnalytics(editorAnalyticsAPI) : removeCodeBlock,
|
|
104
104
|
title: formatMessage(commonMessages.remove),
|
|
105
105
|
tabIndex: null
|
|
106
106
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
export declare const removeCodeBlockWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
4
6
|
export declare const removeCodeBlock: Command;
|
|
5
7
|
export declare const changeLanguage: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (language: string) => Command;
|
|
8
|
+
export declare const copyContentToClipboardWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
6
9
|
export declare const copyContentToClipboard: Command;
|
|
7
10
|
export declare const resetCopiedState: Command;
|
|
8
11
|
export declare const ignoreFollowingMutations: Command;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
export declare const removeCodeBlockWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
4
6
|
export declare const removeCodeBlock: Command;
|
|
5
7
|
export declare const changeLanguage: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (language: string) => Command;
|
|
8
|
+
export declare const copyContentToClipboardWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
6
9
|
export declare const copyContentToClipboard: Command;
|
|
7
10
|
export declare const resetCopiedState: Command;
|
|
8
11
|
export declare const ignoreFollowingMutations: Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
35
|
-
"@atlaskit/code": "^17.
|
|
36
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/code": "^17.1.0",
|
|
36
|
+
"@atlaskit/editor-common": "^104.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
38
38
|
"@atlaskit/editor-plugin-composition": "^1.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/icon": "^25.6.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^4.16.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -100,6 +100,9 @@
|
|
|
100
100
|
"editor_code_wrapping_perf_improvement_ed-25141": {
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
+
"platform_editor_controls_patch_analytics_2": {
|
|
104
|
+
"type": "boolean"
|
|
105
|
+
},
|
|
103
106
|
"editor_a11y_remove_unwrap_button": {
|
|
104
107
|
"type": "boolean"
|
|
105
108
|
}
|