@atlaskit/editor-plugin-code-block 4.2.4 → 4.2.6
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 +15 -0
- package/dist/cjs/pm-plugins/toolbar.js +2 -1
- package/dist/es2019/pm-plugins/toolbar.js +2 -1
- package/dist/esm/pm-plugins/toolbar.js +2 -1
- package/dist/types/pm-plugins/language-list.d.ts +12 -0
- package/dist/types-ts4.5/pm-plugins/language-list.d.ts +21 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 4.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.2.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#133457](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133457)
|
|
14
|
+
[`3feb915ee0488`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3feb915ee0488) -
|
|
15
|
+
[ux] A11Y-10108 fixing Inappropriate accessible name for code block wrap toggle button
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 4.2.4
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
|
|
|
13
13
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/migration/copy"));
|
|
14
14
|
var _deleteEditorRemove = _interopRequireDefault(require("@atlaskit/icon/core/migration/delete--editor-remove"));
|
|
15
15
|
var _textWrap = _interopRequireDefault(require("@atlaskit/icon/core/text-wrap"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _editorCommands = require("../editor-commands");
|
|
17
18
|
var _WrapIcon = require("../ui/icons/WrapIcon");
|
|
18
19
|
var _codeBlockCopySelectionPlugin = require("./codeBlockCopySelectionPlugin");
|
|
@@ -112,7 +113,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
112
113
|
icon: _textWrap.default,
|
|
113
114
|
iconFallback: _WrapIcon.WrapIcon,
|
|
114
115
|
onClick: (0, _editorCommands.toggleWordWrapStateForCodeBlockNode)(editorAnalyticsAPI),
|
|
115
|
-
title: isWrapped ? formatMessage(_messages.codeBlockButtonMessages.unwrapCode) : formatMessage(_messages.codeBlockButtonMessages.wrapCode),
|
|
116
|
+
title: (0, _platformFeatureFlags.fg)('editor_a11y_remove_unwrap_button') ? formatMessage(_messages.codeBlockButtonMessages.wrapCode) : isWrapped ? formatMessage(_messages.codeBlockButtonMessages.unwrapCode) : formatMessage(_messages.codeBlockButtonMessages.wrapCode),
|
|
116
117
|
tabIndex: null,
|
|
117
118
|
selected: isWrapped
|
|
118
119
|
};
|
|
@@ -5,6 +5,7 @@ import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
|
5
5
|
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
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { changeLanguage, copyContentToClipboard, removeCodeBlock, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
|
|
9
10
|
import { WrapIcon } from '../ui/icons/WrapIcon';
|
|
10
11
|
import { provideVisualFeedbackForCopyButton, removeVisualFeedbackForCopyButton } from './codeBlockCopySelectionPlugin';
|
|
@@ -93,7 +94,7 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api) => (state, {
|
|
|
93
94
|
icon: TextWrapIcon,
|
|
94
95
|
iconFallback: WrapIcon,
|
|
95
96
|
onClick: toggleWordWrapStateForCodeBlockNode(editorAnalyticsAPI),
|
|
96
|
-
title: isWrapped ? formatMessage(codeBlockButtonMessages.unwrapCode) : formatMessage(codeBlockButtonMessages.wrapCode),
|
|
97
|
+
title: fg('editor_a11y_remove_unwrap_button') ? formatMessage(codeBlockButtonMessages.wrapCode) : isWrapped ? formatMessage(codeBlockButtonMessages.unwrapCode) : formatMessage(codeBlockButtonMessages.wrapCode),
|
|
97
98
|
tabIndex: null,
|
|
98
99
|
selected: isWrapped
|
|
99
100
|
};
|
|
@@ -5,6 +5,7 @@ import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
|
5
5
|
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
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { changeLanguage, copyContentToClipboard, removeCodeBlock, resetCopiedState, toggleWordWrapStateForCodeBlockNode } from '../editor-commands';
|
|
9
10
|
import { WrapIcon } from '../ui/icons/WrapIcon';
|
|
10
11
|
import { provideVisualFeedbackForCopyButton, removeVisualFeedbackForCopyButton } from './codeBlockCopySelectionPlugin';
|
|
@@ -102,7 +103,7 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
102
103
|
icon: TextWrapIcon,
|
|
103
104
|
iconFallback: WrapIcon,
|
|
104
105
|
onClick: toggleWordWrapStateForCodeBlockNode(editorAnalyticsAPI),
|
|
105
|
-
title: isWrapped ? formatMessage(codeBlockButtonMessages.unwrapCode) : formatMessage(codeBlockButtonMessages.wrapCode),
|
|
106
|
+
title: fg('editor_a11y_remove_unwrap_button') ? formatMessage(codeBlockButtonMessages.wrapCode) : isWrapped ? formatMessage(codeBlockButtonMessages.unwrapCode) : formatMessage(codeBlockButtonMessages.wrapCode),
|
|
106
107
|
tabIndex: null,
|
|
107
108
|
selected: isWrapped
|
|
108
109
|
};
|
|
@@ -318,6 +318,10 @@ export declare const DEFAULT_LANGUAGES: ({
|
|
|
318
318
|
readonly name: "Protocol Buffers";
|
|
319
319
|
readonly alias: readonly ["protobuf", "proto"];
|
|
320
320
|
readonly value: "protobuf";
|
|
321
|
+
} | {
|
|
322
|
+
readonly name: "Handlebars";
|
|
323
|
+
readonly alias: readonly ["handlebars", "mustache"];
|
|
324
|
+
readonly value: "handlebars";
|
|
321
325
|
} | {
|
|
322
326
|
readonly name: "ABAP";
|
|
323
327
|
readonly alias: readonly ["abap"];
|
|
@@ -648,6 +652,10 @@ export declare function findMatchedLanguage(supportedLanguages: Language[], lang
|
|
|
648
652
|
readonly name: "Protocol Buffers";
|
|
649
653
|
readonly alias: readonly ["protobuf", "proto"];
|
|
650
654
|
readonly value: "protobuf";
|
|
655
|
+
} | {
|
|
656
|
+
readonly name: "Handlebars";
|
|
657
|
+
readonly alias: readonly ["handlebars", "mustache"];
|
|
658
|
+
readonly value: "handlebars";
|
|
651
659
|
} | {
|
|
652
660
|
readonly name: "ABAP";
|
|
653
661
|
readonly alias: readonly ["abap"];
|
|
@@ -979,6 +987,10 @@ export declare function createLanguageList(supportedLanguages: Language[]): ({
|
|
|
979
987
|
readonly name: "Protocol Buffers";
|
|
980
988
|
readonly alias: readonly ["protobuf", "proto"];
|
|
981
989
|
readonly value: "protobuf";
|
|
990
|
+
} | {
|
|
991
|
+
readonly name: "Handlebars";
|
|
992
|
+
readonly alias: readonly ["handlebars", "mustache"];
|
|
993
|
+
readonly value: "handlebars";
|
|
982
994
|
} | {
|
|
983
995
|
readonly name: "ABAP";
|
|
984
996
|
readonly alias: readonly ["abap"];
|
|
@@ -560,6 +560,13 @@ export declare const DEFAULT_LANGUAGES: ({
|
|
|
560
560
|
"proto"
|
|
561
561
|
];
|
|
562
562
|
readonly value: "protobuf";
|
|
563
|
+
} | {
|
|
564
|
+
readonly name: "Handlebars";
|
|
565
|
+
readonly alias: readonly [
|
|
566
|
+
"handlebars",
|
|
567
|
+
"mustache"
|
|
568
|
+
];
|
|
569
|
+
readonly value: "handlebars";
|
|
563
570
|
} | {
|
|
564
571
|
readonly name: "ABAP";
|
|
565
572
|
readonly alias: readonly [
|
|
@@ -1134,6 +1141,13 @@ export declare function findMatchedLanguage(supportedLanguages: Language[], lang
|
|
|
1134
1141
|
"proto"
|
|
1135
1142
|
];
|
|
1136
1143
|
readonly value: "protobuf";
|
|
1144
|
+
} | {
|
|
1145
|
+
readonly name: "Handlebars";
|
|
1146
|
+
readonly alias: readonly [
|
|
1147
|
+
"handlebars",
|
|
1148
|
+
"mustache"
|
|
1149
|
+
];
|
|
1150
|
+
readonly value: "handlebars";
|
|
1137
1151
|
} | {
|
|
1138
1152
|
readonly name: "ABAP";
|
|
1139
1153
|
readonly alias: readonly [
|
|
@@ -1709,6 +1723,13 @@ export declare function createLanguageList(supportedLanguages: Language[]): ({
|
|
|
1709
1723
|
"proto"
|
|
1710
1724
|
];
|
|
1711
1725
|
readonly value: "protobuf";
|
|
1726
|
+
} | {
|
|
1727
|
+
readonly name: "Handlebars";
|
|
1728
|
+
readonly alias: readonly [
|
|
1729
|
+
"handlebars",
|
|
1730
|
+
"mustache"
|
|
1731
|
+
];
|
|
1732
|
+
readonly value: "handlebars";
|
|
1712
1733
|
} | {
|
|
1713
1734
|
readonly name: "ABAP";
|
|
1714
1735
|
readonly alias: readonly [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.6",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
35
|
-
"@atlaskit/code": "^
|
|
36
|
-
"@atlaskit/editor-common": "^102.
|
|
35
|
+
"@atlaskit/code": "^17.0.0",
|
|
36
|
+
"@atlaskit/editor-common": "^102.18.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",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
42
|
-
"@atlaskit/icon": "^25.
|
|
42
|
+
"@atlaskit/icon": "^25.5.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
45
45
|
"@atlaskit/tmp-editor-statsig": "^4.6.0",
|
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
},
|
|
100
100
|
"editor_code_wrapping_perf_improvement_ed-25141": {
|
|
101
101
|
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"editor_a11y_remove_unwrap_button": {
|
|
104
|
+
"type": "boolean"
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
}
|