@atlaskit/editor-plugin-code-block 12.0.11 → 12.0.13
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
|
+
## 12.0.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2fb1c8a74a856`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2fb1c8a74a856) -
|
|
8
|
+
ADF Change 101: Add wrap and hideLineNumbers attributes to codeBlock stage-0 variants
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 12.0.12
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 12.0.11
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
|
13
13
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
14
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
18
|
var _editorCommands = require("./editor-commands");
|
|
18
19
|
var _codeBlockAutoFullStopTransformPlugin = require("./pm-plugins/codeBlockAutoFullStopTransformPlugin");
|
|
@@ -52,7 +53,7 @@ var codeBlockPlugin = function codeBlockPlugin(_ref) {
|
|
|
52
53
|
nodes: function nodes() {
|
|
53
54
|
return [{
|
|
54
55
|
name: 'codeBlock',
|
|
55
|
-
node: (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.codeBlockWithLocalId : _adfSchema.codeBlock
|
|
56
|
+
node: (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) ? _adfSchema.codeBlockWithExtendedAttributes : (0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? _adfSchema.codeBlockWithLocalId : _adfSchema.codeBlock
|
|
56
57
|
}];
|
|
57
58
|
},
|
|
58
59
|
getSharedState: function getSharedState(state) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema';
|
|
2
|
+
import { codeBlock, codeBlockWithExtendedAttributes, codeBlockWithLocalId } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu';
|
|
5
5
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconCode } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
10
|
import { createInsertCodeBlockTransaction, insertCodeBlockWithAnalytics } from './editor-commands';
|
|
10
11
|
import { codeBlockAutoFullStopTransformPlugin } from './pm-plugins/codeBlockAutoFullStopTransformPlugin';
|
|
@@ -43,7 +44,7 @@ const codeBlockPlugin = ({
|
|
|
43
44
|
nodes() {
|
|
44
45
|
return [{
|
|
45
46
|
name: 'codeBlock',
|
|
46
|
-
node: fg('platform_editor_adf_with_localid') ? codeBlockWithLocalId : codeBlock
|
|
47
|
+
node: expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) ? codeBlockWithExtendedAttributes : fg('platform_editor_adf_with_localid') ? codeBlockWithLocalId : codeBlock
|
|
47
48
|
}];
|
|
48
49
|
},
|
|
49
50
|
getSharedState(state) {
|
|
@@ -2,12 +2,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema';
|
|
5
|
+
import { codeBlock, codeBlockWithExtendedAttributes, codeBlockWithLocalId } from '@atlaskit/adf-schema';
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu';
|
|
8
8
|
import { blockTypeMessages } from '@atlaskit/editor-common/messages';
|
|
9
9
|
import { IconCode } from '@atlaskit/editor-common/quick-insert';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
13
|
import { createInsertCodeBlockTransaction, insertCodeBlockWithAnalytics } from './editor-commands';
|
|
13
14
|
import { codeBlockAutoFullStopTransformPlugin } from './pm-plugins/codeBlockAutoFullStopTransformPlugin';
|
|
@@ -45,7 +46,7 @@ var codeBlockPlugin = function codeBlockPlugin(_ref) {
|
|
|
45
46
|
nodes: function nodes() {
|
|
46
47
|
return [{
|
|
47
48
|
name: 'codeBlock',
|
|
48
|
-
node: fg('platform_editor_adf_with_localid') ? codeBlockWithLocalId : codeBlock
|
|
49
|
+
node: expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) ? codeBlockWithExtendedAttributes : fg('platform_editor_adf_with_localid') ? codeBlockWithLocalId : codeBlock
|
|
49
50
|
}];
|
|
50
51
|
},
|
|
51
52
|
getSharedState: function getSharedState(state) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-code-block",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.13",
|
|
4
4
|
"description": "Code block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^52.
|
|
31
|
-
"@atlaskit/code": "^17.
|
|
30
|
+
"@atlaskit/adf-schema": "^52.8.0",
|
|
31
|
+
"@atlaskit/code": "^17.5.0",
|
|
32
32
|
"@atlaskit/editor-plugin-analytics": "^10.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-block-menu": "^9.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-composition": "^9.0.0",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@atlaskit/icon": "^34.3.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^74.7.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@atlaskit/editor-common": "^114.
|
|
50
|
+
"@atlaskit/editor-common": "^114.18.0",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
52
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
53
53
|
},
|