@atlaskit/editor-plugin-code-block 24.0.1 → 24.0.3
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 24.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f0dbb923807b7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0dbb923807b7) -
|
|
8
|
+
Clean up feature gate `platform_editor_code_block_add_line_number_button`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 24.0.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 24.0.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -149,8 +149,9 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
149
149
|
filterOption: languageListFilter
|
|
150
150
|
};
|
|
151
151
|
var areAnyNewToolbarFlagsEnabled = (0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
|
|
152
|
+
var isQ4LovabilityEnabled = (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true);
|
|
152
153
|
var languagePicker;
|
|
153
|
-
if (
|
|
154
|
+
if (isQ4LovabilityEnabled) {
|
|
154
155
|
var autoDetectEntry = typeof localId === 'string' ? autoDetectState === null || autoDetectState === void 0 ? void 0 : autoDetectState.languageDetectionMap[localId] : undefined;
|
|
155
156
|
var autoDetectPickerValue = getAutoDetectPickerValue({
|
|
156
157
|
autoDetectEntry: autoDetectEntry,
|
|
@@ -300,7 +301,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
300
301
|
return (0, _utils.findDomRefAtPos)(pos, view.domAtPos.bind(view));
|
|
301
302
|
},
|
|
302
303
|
nodeType: nodeType,
|
|
303
|
-
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat((0, _toConsumableArray2.default)(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], (0, _toConsumableArray2.default)(
|
|
304
|
+
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat((0, _toConsumableArray2.default)(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], (0, _toConsumableArray2.default)(isQ4LovabilityEnabled ? [codeBlockLineNumbersButton].concat((0, _toConsumableArray2.default)(formatCodeProvider ? [formatCodeButton] : [])) : []), (0, _toConsumableArray2.default)(copyAndDeleteButtonMenuItems)),
|
|
304
305
|
scrollable: true
|
|
305
306
|
};
|
|
306
307
|
};
|
|
@@ -119,8 +119,9 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
|
|
|
119
119
|
filterOption: languageListFilter
|
|
120
120
|
};
|
|
121
121
|
const areAnyNewToolbarFlagsEnabled = areToolbarFlagsEnabled(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
|
|
122
|
+
const isQ4LovabilityEnabled = expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true);
|
|
122
123
|
let languagePicker;
|
|
123
|
-
if (
|
|
124
|
+
if (isQ4LovabilityEnabled) {
|
|
124
125
|
const autoDetectEntry = typeof localId === 'string' ? autoDetectState === null || autoDetectState === void 0 ? void 0 : autoDetectState.languageDetectionMap[localId] : undefined;
|
|
125
126
|
const autoDetectPickerValue = getAutoDetectPickerValue({
|
|
126
127
|
autoDetectEntry,
|
|
@@ -268,7 +269,7 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
|
|
|
268
269
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
269
270
|
getDomRef: view => findDomRefAtPos(pos, view.domAtPos.bind(view)),
|
|
270
271
|
nodeType,
|
|
271
|
-
items: [(_languagePicker = languagePicker) !== null && _languagePicker !== void 0 ? _languagePicker : languageSelect, ...(areAnyNewToolbarFlagsEnabled ? [] : [separator]), codeBlockWrapButton, ...(
|
|
272
|
+
items: [(_languagePicker = languagePicker) !== null && _languagePicker !== void 0 ? _languagePicker : languageSelect, ...(areAnyNewToolbarFlagsEnabled ? [] : [separator]), codeBlockWrapButton, ...(isQ4LovabilityEnabled ? [codeBlockLineNumbersButton, ...(formatCodeProvider ? [formatCodeButton] : [])] : []), ...copyAndDeleteButtonMenuItems],
|
|
272
273
|
scrollable: true
|
|
273
274
|
};
|
|
274
275
|
};
|
|
@@ -140,8 +140,9 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
140
140
|
filterOption: languageListFilter
|
|
141
141
|
};
|
|
142
142
|
var areAnyNewToolbarFlagsEnabled = areToolbarFlagsEnabled(Boolean(api === null || api === void 0 ? void 0 : api.toolbar));
|
|
143
|
+
var isQ4LovabilityEnabled = expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true);
|
|
143
144
|
var languagePicker;
|
|
144
|
-
if (
|
|
145
|
+
if (isQ4LovabilityEnabled) {
|
|
145
146
|
var autoDetectEntry = typeof localId === 'string' ? autoDetectState === null || autoDetectState === void 0 ? void 0 : autoDetectState.languageDetectionMap[localId] : undefined;
|
|
146
147
|
var autoDetectPickerValue = getAutoDetectPickerValue({
|
|
147
148
|
autoDetectEntry: autoDetectEntry,
|
|
@@ -291,7 +292,7 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
291
292
|
return findDomRefAtPos(pos, view.domAtPos.bind(view));
|
|
292
293
|
},
|
|
293
294
|
nodeType: nodeType,
|
|
294
|
-
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat(_toConsumableArray(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], _toConsumableArray(
|
|
295
|
+
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat(_toConsumableArray(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], _toConsumableArray(isQ4LovabilityEnabled ? [codeBlockLineNumbersButton].concat(_toConsumableArray(formatCodeProvider ? [formatCodeButton] : [])) : []), _toConsumableArray(copyAndDeleteButtonMenuItems)),
|
|
295
296
|
scrollable: true
|
|
296
297
|
};
|
|
297
298
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.3",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
46
46
|
"@atlaskit/react-select": "^4.12.0",
|
|
47
47
|
"@atlaskit/select": "^23.1.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^212.0.0",
|
|
49
49
|
"@atlaskit/tokens": "^20.1.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@compiled/react": "^1.0.2"
|
|
@@ -62,9 +62,6 @@
|
|
|
62
62
|
"platform_editor_adf_with_localid": {
|
|
63
63
|
"type": "boolean"
|
|
64
64
|
},
|
|
65
|
-
"platform_editor_code_block_add_line_number_button": {
|
|
66
|
-
"type": "boolean"
|
|
67
|
-
},
|
|
68
65
|
"platform_editor_code_block_mermaid_language": {
|
|
69
66
|
"type": "boolean"
|
|
70
67
|
}
|