@atlaskit/editor-plugin-code-block 13.1.0 → 13.1.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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-code-block
|
|
2
2
|
|
|
3
|
+
## 13.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`44ba0da4e85d7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44ba0da4e85d7) -
|
|
8
|
+
Gate the code block formatting button behind platform_editor_code_block_formatting
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 13.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -271,7 +271,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig() {
|
|
|
271
271
|
return (0, _utils.findDomRefAtPos)(pos, view.domAtPos.bind(view));
|
|
272
272
|
},
|
|
273
273
|
nodeType: nodeType,
|
|
274
|
-
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat((0, _toConsumableArray2.default)(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_code_block_add_line_number_button') ? [codeBlockLineNumbersButton, formatCodeButton] : []), (0, _toConsumableArray2.default)(copyAndDeleteButtonMenuItems)),
|
|
274
|
+
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat((0, _toConsumableArray2.default)(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_code_block_add_line_number_button') ? [codeBlockLineNumbersButton] : []), (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_code_block_add_line_number_button') && (0, _platformFeatureFlags.fg)('platform_editor_code_block_formatting') ? [formatCodeButton] : []), (0, _toConsumableArray2.default)(copyAndDeleteButtonMenuItems)),
|
|
275
275
|
scrollable: true
|
|
276
276
|
};
|
|
277
277
|
};
|
|
@@ -246,7 +246,9 @@ export const getToolbarConfig = (allowCopyToClipboard = false, api, overrideLang
|
|
|
246
246
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
247
247
|
getDomRef: view => findDomRefAtPos(pos, view.domAtPos.bind(view)),
|
|
248
248
|
nodeType,
|
|
249
|
-
items: [(_languagePicker = languagePicker) !== null && _languagePicker !== void 0 ? _languagePicker : languageSelect, ...(areAnyNewToolbarFlagsEnabled ? [] : [separator]), codeBlockWrapButton, ...(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_add_line_number_button') ? [codeBlockLineNumbersButton
|
|
249
|
+
items: [(_languagePicker = languagePicker) !== null && _languagePicker !== void 0 ? _languagePicker : languageSelect, ...(areAnyNewToolbarFlagsEnabled ? [] : [separator]), codeBlockWrapButton, ...(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_add_line_number_button') ? [codeBlockLineNumbersButton] : []),
|
|
250
|
+
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
251
|
+
...(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_add_line_number_button') && fg('platform_editor_code_block_formatting') ? [formatCodeButton] : []), ...copyAndDeleteButtonMenuItems],
|
|
250
252
|
scrollable: true
|
|
251
253
|
};
|
|
252
254
|
};
|
|
@@ -262,7 +262,7 @@ export var getToolbarConfig = function getToolbarConfig() {
|
|
|
262
262
|
return findDomRefAtPos(pos, view.domAtPos.bind(view));
|
|
263
263
|
},
|
|
264
264
|
nodeType: nodeType,
|
|
265
|
-
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat(_toConsumableArray(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], _toConsumableArray(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_add_line_number_button') ? [codeBlockLineNumbersButton, formatCodeButton] : []), _toConsumableArray(copyAndDeleteButtonMenuItems)),
|
|
265
|
+
items: [languagePicker !== null && languagePicker !== void 0 ? languagePicker : languageSelect].concat(_toConsumableArray(areAnyNewToolbarFlagsEnabled ? [] : [separator]), [codeBlockWrapButton], _toConsumableArray(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_add_line_number_button') ? [codeBlockLineNumbersButton] : []), _toConsumableArray(expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_add_line_number_button') && fg('platform_editor_code_block_formatting') ? [formatCodeButton] : []), _toConsumableArray(copyAndDeleteButtonMenuItems)),
|
|
266
266
|
scrollable: true
|
|
267
267
|
};
|
|
268
268
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.1",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"@atlaskit/primitives": "^19.0.0",
|
|
51
51
|
"@atlaskit/prosemirror-input-rules": "^3.7.0",
|
|
52
52
|
"@atlaskit/select": "^21.12.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^89.
|
|
54
|
-
"@atlaskit/tokens": "^13.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^89.4.0",
|
|
54
|
+
"@atlaskit/tokens": "^13.3.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|
|
56
|
-
"@compiled/react": "
|
|
56
|
+
"@compiled/react": "patch:@compiled/react@npm%3A0.20.0#~/.yarn/patches/@compiled-react-npm-0.20.0-a771aa67a6.patch"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^115.
|
|
59
|
+
"@atlaskit/editor-common": "^115.7.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
62
62
|
},
|
|
@@ -111,6 +111,9 @@
|
|
|
111
111
|
"platform_editor_code_block_add_line_number_button": {
|
|
112
112
|
"type": "boolean"
|
|
113
113
|
},
|
|
114
|
+
"platform_editor_code_block_formatting": {
|
|
115
|
+
"type": "boolean"
|
|
116
|
+
},
|
|
114
117
|
"platform_editor_code_block_language_detection_flow": {
|
|
115
118
|
"type": "boolean"
|
|
116
119
|
}
|