@atlaskit/editor-plugin-code-block 4.4.6 → 4.4.8
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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 4.4.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#165113](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165113)
|
|
8
|
+
[`867bcb05452bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/867bcb05452bf) -
|
|
9
|
+
Cleaned up platform_editor_controls_patch_analytics and platform_editor_controls_patch_analytics_2
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.4.7
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 4.4.6
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -20,8 +20,7 @@ var _WrapIcon = require("../ui/icons/WrapIcon");
|
|
|
20
20
|
var _codeBlockCopySelectionPlugin = require("./codeBlockCopySelectionPlugin");
|
|
21
21
|
var _languageList = require("./language-list");
|
|
22
22
|
var _pluginKey = require("./plugin-key");
|
|
23
|
-
function
|
|
24
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
25
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
26
|
var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
@@ -86,9 +85,9 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
86
85
|
supportsViewMode: true,
|
|
87
86
|
appearance: 'subtle',
|
|
88
87
|
icon: _copy.default,
|
|
89
|
-
// note:
|
|
88
|
+
// note: copyContentToClipboardWithAnalytics contains logic that also removes the
|
|
90
89
|
// visual feedback for the copy button
|
|
91
|
-
onClick: (0,
|
|
90
|
+
onClick: (0, _editorCommands.copyContentToClipboardWithAnalytics)(editorAnalyticsAPI),
|
|
92
91
|
title: formatMessage(codeBlockState.contentCopied ? _messages.codeBlockButtonMessages.copiedCodeToClipboard : _messages.codeBlockButtonMessages.copyCodeToClipboard),
|
|
93
92
|
onMouseEnter: _codeBlockCopySelectionPlugin.provideVisualFeedbackForCopyButton,
|
|
94
93
|
// note: resetCopiedState contains logic that also removes the
|
|
@@ -110,7 +109,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
110
109
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
111
110
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
112
111
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
113
|
-
onClick: (0,
|
|
112
|
+
onClick: (0, _editorCommands.removeCodeBlockWithAnalytics)(editorAnalyticsAPI),
|
|
114
113
|
title: formatMessage(_messages.default.remove),
|
|
115
114
|
tabIndex: null
|
|
116
115
|
};
|
|
@@ -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,
|
|
9
|
+
import { changeLanguage, copyContentToClipboardWithAnalytics, 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';
|
|
@@ -62,9 +62,9 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
|
|
|
62
62
|
supportsViewMode: true,
|
|
63
63
|
appearance: 'subtle',
|
|
64
64
|
icon: CopyIcon,
|
|
65
|
-
// note:
|
|
65
|
+
// note: copyContentToClipboardWithAnalytics contains logic that also removes the
|
|
66
66
|
// visual feedback for the copy button
|
|
67
|
-
onClick:
|
|
67
|
+
onClick: copyContentToClipboardWithAnalytics(editorAnalyticsAPI),
|
|
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:
|
|
89
|
+
onClick: removeCodeBlockWithAnalytics(editorAnalyticsAPI),
|
|
90
90
|
title: formatMessage(commonMessages.remove),
|
|
91
91
|
tabIndex: null
|
|
92
92
|
};
|
|
@@ -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,
|
|
12
|
+
import { changeLanguage, copyContentToClipboardWithAnalytics, 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';
|
|
@@ -76,9 +76,9 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
76
76
|
supportsViewMode: true,
|
|
77
77
|
appearance: 'subtle',
|
|
78
78
|
icon: CopyIcon,
|
|
79
|
-
// note:
|
|
79
|
+
// note: copyContentToClipboardWithAnalytics contains logic that also removes the
|
|
80
80
|
// visual feedback for the copy button
|
|
81
|
-
onClick:
|
|
81
|
+
onClick: copyContentToClipboardWithAnalytics(editorAnalyticsAPI),
|
|
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:
|
|
103
|
+
onClick: removeCodeBlockWithAnalytics(editorAnalyticsAPI),
|
|
104
104
|
title: formatMessage(commonMessages.remove),
|
|
105
105
|
tabIndex: null
|
|
106
106
|
};
|
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.8",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
35
35
|
"@atlaskit/code": "^17.2.0",
|
|
36
|
-
"@atlaskit/editor-common": "^106.
|
|
36
|
+
"@atlaskit/editor-common": "^106.3.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-composition": "^1.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
41
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
41
|
+
"@atlaskit/editor-plugin-interaction": "^2.0.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
43
43
|
"@atlaskit/icon": "^26.4.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^5.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^5.14.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
@@ -101,9 +101,6 @@
|
|
|
101
101
|
"editor_code_wrapping_perf_improvement_ed-25141": {
|
|
102
102
|
"type": "boolean"
|
|
103
103
|
},
|
|
104
|
-
"platform_editor_controls_patch_analytics_2": {
|
|
105
|
-
"type": "boolean"
|
|
106
|
-
},
|
|
107
104
|
"editor_a11y_remove_unwrap_button": {
|
|
108
105
|
"type": "boolean"
|
|
109
106
|
},
|