@atlaskit/editor-plugin-code-block 4.1.2 → 4.2.0

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,18 @@
1
1
  # @atlaskit/editor-plugin-code-block
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#124688](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/124688)
8
+ [`9b1137bda6f87`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b1137bda6f87) -
9
+ [ux] ED-25486 Updates cmd+a behaviour to progressively select nodes behind
10
+ platform_editor_cmd_a_progressively_select_nodes experiment.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 4.1.2
4
17
 
5
18
  ### Patch Changes
@@ -9,6 +9,7 @@ var _utils = require("@atlaskit/editor-common/utils");
9
9
  var _keymap = require("@atlaskit/editor-prosemirror/keymap");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
12
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
13
  var _bracketHandling = require("./ide-ux/bracket-handling");
13
14
  var _commands = require("./ide-ux/commands");
14
15
  var _lineHandling = require("./ide-ux/line-handling");
@@ -115,7 +116,7 @@ var ideUX = function ideUX(pluginInjectionApi) {
115
116
  }),
116
117
  'Shift-Tab': (0, _utils.filterCommand)(_lineHandling.isSelectionEntirelyInsideCodeBlock, (0, _commands.outdent)(editorAnalyticsAPI)),
117
118
  'Mod-a': function ModA(state, dispatch) {
118
- if ((0, _lineHandling.isSelectionEntirelyInsideCodeBlock)(state)) {
119
+ if ((0, _lineHandling.isSelectionEntirelyInsideCodeBlock)(state) && (0, _experiments.editorExperiment)('platform_editor_cmd_a_progressively_select_nodes', false)) {
119
120
  var _state$selection = state.selection,
120
121
  $from = _state$selection.$from,
121
122
  $to = _state$selection.$to;
@@ -3,6 +3,7 @@ import { filterCommand as filter } from '@atlaskit/editor-common/utils';
3
3
  import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
6
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { getAutoClosingBracketInfo, shouldAutoCloseBracket } from './ide-ux/bracket-handling';
7
8
  import { indent, insertIndent, insertNewlineWithIndent, outdent } from './ide-ux/commands';
8
9
  import { getEndOfCurrentLine, getLineInfo, getStartOfCurrentLine, isCursorInsideCodeBlock, isSelectionEntirelyInsideCodeBlock } from './ide-ux/line-handling';
@@ -117,7 +118,7 @@ const ideUX = pluginInjectionApi => {
117
118
  }),
118
119
  'Shift-Tab': filter(isSelectionEntirelyInsideCodeBlock, outdent(editorAnalyticsAPI)),
119
120
  'Mod-a': (state, dispatch) => {
120
- if (isSelectionEntirelyInsideCodeBlock(state)) {
121
+ if (isSelectionEntirelyInsideCodeBlock(state) && editorExperiment('platform_editor_cmd_a_progressively_select_nodes', false)) {
121
122
  const {
122
123
  $from,
123
124
  $to
@@ -3,6 +3,7 @@ import { filterCommand as filter } from '@atlaskit/editor-common/utils';
3
3
  import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
6
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { getAutoClosingBracketInfo, shouldAutoCloseBracket } from './ide-ux/bracket-handling';
7
8
  import { indent, insertIndent, insertNewlineWithIndent, outdent } from './ide-ux/commands';
8
9
  import { getEndOfCurrentLine, getLineInfo, getStartOfCurrentLine, isCursorInsideCodeBlock, isSelectionEntirelyInsideCodeBlock } from './ide-ux/line-handling';
@@ -109,7 +110,7 @@ var ideUX = function ideUX(pluginInjectionApi) {
109
110
  }),
110
111
  'Shift-Tab': filter(isSelectionEntirelyInsideCodeBlock, outdent(editorAnalyticsAPI)),
111
112
  'Mod-a': function ModA(state, dispatch) {
112
- if (isSelectionEntirelyInsideCodeBlock(state)) {
113
+ if (isSelectionEntirelyInsideCodeBlock(state) && editorExperiment('platform_editor_cmd_a_progressively_select_nodes', false)) {
113
114
  var _state$selection = state.selection,
114
115
  $from = _state$selection.$from,
115
116
  $to = _state$selection.$to;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-code-block",
3
- "version": "4.1.2",
3
+ "version": "4.2.0",
4
4
  "description": "Code block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^47.6.0",
35
35
  "@atlaskit/code": "^16.0.0",
36
- "@atlaskit/editor-common": "^102.0.0",
36
+ "@atlaskit/editor-common": "^102.3.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^2.1.0",
38
38
  "@atlaskit/editor-plugin-composition": "^1.3.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^2.0.0",
@@ -42,6 +42,7 @@
42
42
  "@atlaskit/icon": "^24.1.0",
43
43
  "@atlaskit/platform-feature-flags": "^1.1.0",
44
44
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
45
+ "@atlaskit/tmp-editor-statsig": "^3.5.0",
45
46
  "@babel/runtime": "^7.0.0"
46
47
  },
47
48
  "peerDependencies": {