@atlaskit/editor-plugin-code-block 3.5.0 → 3.5.2
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 +18 -0
- package/dist/cjs/toolbar.js +7 -3
- package/dist/es2019/toolbar.js +7 -3
- package/dist/esm/toolbar.js +7 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 3.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#152510](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152510)
|
|
8
|
+
[`dcf9edde7ac7b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcf9edde7ac7b) -
|
|
9
|
+
bump adf-schema to 42.0.1
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.5.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#151850](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151850)
|
|
17
|
+
[`730e4417d9ad8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/730e4417d9ad8) -
|
|
18
|
+
[ux] ED-25091: migrated code snippet to use new ADS icons
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 3.5.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -9,7 +9,9 @@ exports.languageListFilter = exports.getToolbarConfig = void 0;
|
|
|
9
9
|
var _codeBlock = require("@atlaskit/editor-common/code-block");
|
|
10
10
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
|
-
var
|
|
12
|
+
var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
13
|
+
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/migration/copy"));
|
|
14
|
+
var _textWrap = _interopRequireDefault(require("@atlaskit/icon/core/text-wrap"));
|
|
13
15
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
14
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
17
|
var _actions = require("./actions");
|
|
@@ -94,7 +96,8 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
94
96
|
id: 'editor.codeBlock.delete',
|
|
95
97
|
type: 'button',
|
|
96
98
|
appearance: 'danger',
|
|
97
|
-
icon:
|
|
99
|
+
icon: _delete.default,
|
|
100
|
+
iconFallback: _remove.default,
|
|
98
101
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
99
102
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
100
103
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
@@ -107,7 +110,8 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
107
110
|
id: 'editor.codeBlock.wrap',
|
|
108
111
|
type: 'button',
|
|
109
112
|
supportsViewMode: true,
|
|
110
|
-
icon:
|
|
113
|
+
icon: _textWrap.default,
|
|
114
|
+
iconFallback: _WrapIcon.WrapIcon,
|
|
111
115
|
onClick: (0, _actions.toggleWordWrapStateForCodeBlockNode)(editorAnalyticsAPI),
|
|
112
116
|
title: isWrapped ? formatMessage(_messages.codeBlockButtonMessages.unwrapCode) : formatMessage(_messages.codeBlockButtonMessages.wrapCode),
|
|
113
117
|
tabIndex: null,
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
|
|
2
2
|
import commonMessages, { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import
|
|
4
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
5
|
+
import CopyIcon from '@atlaskit/icon/core/migration/copy';
|
|
6
|
+
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
5
7
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
6
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import { changeLanguage, copyContentToClipboard, removeCodeBlock, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from './actions';
|
|
@@ -75,7 +77,8 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api) => (state, {
|
|
|
75
77
|
id: 'editor.codeBlock.delete',
|
|
76
78
|
type: 'button',
|
|
77
79
|
appearance: 'danger',
|
|
78
|
-
icon:
|
|
80
|
+
icon: DeleteIcon,
|
|
81
|
+
iconFallback: RemoveIcon,
|
|
79
82
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
80
83
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
81
84
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
@@ -88,7 +91,8 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api) => (state, {
|
|
|
88
91
|
id: 'editor.codeBlock.wrap',
|
|
89
92
|
type: 'button',
|
|
90
93
|
supportsViewMode: true,
|
|
91
|
-
icon:
|
|
94
|
+
icon: TextWrapIcon,
|
|
95
|
+
iconFallback: WrapIcon,
|
|
92
96
|
onClick: toggleWordWrapStateForCodeBlockNode(editorAnalyticsAPI),
|
|
93
97
|
title: isWrapped ? formatMessage(codeBlockButtonMessages.unwrapCode) : formatMessage(codeBlockButtonMessages.wrapCode),
|
|
94
98
|
tabIndex: null,
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
|
|
2
2
|
import commonMessages, { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
-
import
|
|
4
|
+
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
5
|
+
import CopyIcon from '@atlaskit/icon/core/migration/copy';
|
|
6
|
+
import TextWrapIcon from '@atlaskit/icon/core/text-wrap';
|
|
5
7
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
6
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import { changeLanguage, copyContentToClipboard, removeCodeBlock, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from './actions';
|
|
@@ -84,7 +86,8 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
84
86
|
id: 'editor.codeBlock.delete',
|
|
85
87
|
type: 'button',
|
|
86
88
|
appearance: 'danger',
|
|
87
|
-
icon:
|
|
89
|
+
icon: DeleteIcon,
|
|
90
|
+
iconFallback: RemoveIcon,
|
|
88
91
|
onMouseEnter: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
89
92
|
onMouseLeave: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, false),
|
|
90
93
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(nodeType, true),
|
|
@@ -97,7 +100,8 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
97
100
|
id: 'editor.codeBlock.wrap',
|
|
98
101
|
type: 'button',
|
|
99
102
|
supportsViewMode: true,
|
|
100
|
-
icon:
|
|
103
|
+
icon: TextWrapIcon,
|
|
104
|
+
iconFallback: WrapIcon,
|
|
101
105
|
onClick: toggleWordWrapStateForCodeBlockNode(editorAnalyticsAPI),
|
|
102
106
|
title: isWrapped ? formatMessage(codeBlockButtonMessages.unwrapCode) : formatMessage(codeBlockButtonMessages.wrapCode),
|
|
103
107
|
tabIndex: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^
|
|
34
|
+
"@atlaskit/adf-schema": "^42.0.2",
|
|
35
35
|
"@atlaskit/code": "^15.6.0",
|
|
36
|
-
"@atlaskit/editor-common": "^93.
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
36
|
+
"@atlaskit/editor-common": "^93.5.0",
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
38
38
|
"@atlaskit/editor-plugin-composition": "^1.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|