@atlaskit/editor-plugin-code-block 10.0.9 → 10.0.11

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
+ ## 10.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 10.0.10
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
14
+ Replace feature experiment util with cross platform alternative for platform_editor_block_menu
15
+ - Updated dependencies
16
+
3
17
  ## 10.0.9
4
18
 
5
19
  ### Patch Changes
@@ -14,6 +14,7 @@ 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
16
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
17
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
18
  var _editorCommands = require("./editor-commands");
18
19
  var _codeBlockAutoFullStopTransformPlugin = require("./pm-plugins/codeBlockAutoFullStopTransformPlugin");
19
20
  var _codeBlockCopySelectionPlugin = require("./pm-plugins/codeBlockCopySelectionPlugin");
@@ -30,7 +31,7 @@ var CODE_BLOCK_NODE_NAME = 'codeBlock';
30
31
  var codeBlockPlugin = function codeBlockPlugin(_ref) {
31
32
  var options = _ref.config,
32
33
  api = _ref.api;
33
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
34
+ if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
34
35
  var _api$blockMenu;
35
36
  api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
36
37
  type: 'block-menu-item',
@@ -79,6 +79,7 @@ var generateLineAttributesFromNode = exports.generateLineAttributesFromNode = fu
79
79
  var nodeTextContent = child.textContent;
80
80
  var nodeStartPos = pos;
81
81
  var lineStartIndex = nodeStartPos;
82
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
82
83
  var newLineAttributes = nodeTextContent.split('\n').map(function (line, index) {
83
84
  var lineLength = line.length;
84
85
  var lineStart = lineStartIndex + 1;
@@ -6,6 +6,7 @@ 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
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
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';
11
12
  import { codeBlockCopySelectionPlugin, copySelectionPluginKey } from './pm-plugins/codeBlockCopySelectionPlugin';
@@ -21,7 +22,7 @@ const codeBlockPlugin = ({
21
22
  config: options,
22
23
  api
23
24
  }) => {
24
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
25
+ if (editorExperiment('platform_editor_block_menu', true)) {
25
26
  var _api$blockMenu;
26
27
  api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents([{
27
28
  type: 'block-menu-item',
@@ -69,6 +69,7 @@ export const generateLineAttributesFromNode = node => {
69
69
  const nodeTextContent = child.textContent;
70
70
  const nodeStartPos = pos;
71
71
  let lineStartIndex = nodeStartPos;
72
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
72
73
  const newLineAttributes = nodeTextContent.split('\n').map((line, index) => {
73
74
  const lineLength = line.length;
74
75
  const lineStart = lineStartIndex + 1;
@@ -9,6 +9,7 @@ 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
11
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
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';
14
15
  import { codeBlockCopySelectionPlugin, copySelectionPluginKey } from './pm-plugins/codeBlockCopySelectionPlugin';
@@ -23,7 +24,7 @@ var CODE_BLOCK_NODE_NAME = 'codeBlock';
23
24
  var codeBlockPlugin = function codeBlockPlugin(_ref) {
24
25
  var options = _ref.config,
25
26
  api = _ref.api;
26
- if (expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
27
+ if (editorExperiment('platform_editor_block_menu', true)) {
27
28
  var _api$blockMenu;
28
29
  api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents([{
29
30
  type: 'block-menu-item',
@@ -72,6 +72,7 @@ export var generateLineAttributesFromNode = function generateLineAttributesFromN
72
72
  var nodeTextContent = child.textContent;
73
73
  var nodeStartPos = pos;
74
74
  var lineStartIndex = nodeStartPos;
75
+ // eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
75
76
  var newLineAttributes = nodeTextContent.split('\n').map(function (line, index) {
76
77
  var lineLength = line.length;
77
78
  var lineStart = lineStartIndex + 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-code-block",
3
- "version": "10.0.9",
3
+ "version": "10.0.11",
4
4
  "description": "Code block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/icon": "^33.0.0",
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
46
- "@atlaskit/tmp-editor-statsig": "^43.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^44.0.0",
47
47
  "@babel/runtime": "^7.0.0"
48
48
  },
49
49
  "peerDependencies": {