@atlaskit/editor-core 187.32.5 → 187.32.7

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-core
2
2
 
3
+ ## 187.32.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8b78535f8bd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8b78535f8bd) - Fix sticky header not resize with table
8
+ - Updated dependencies
9
+
10
+ ## 187.32.6
11
+
12
+ ### Patch Changes
13
+
14
+ - [`20fa6edb5d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/20fa6edb5d4) - ED-19617 Extract Floating Toolbar VR test to editor-core
15
+ - [`7d9ffc3a1ce`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d9ffc3a1ce) - [ux] ED-19342 Fix: Inserting Code-Block at gap-cursor will not consume all the content after gap-cursor
16
+
3
17
  ## 187.32.5
4
18
 
5
19
  ### Patch Changes
@@ -7,10 +7,11 @@ exports.isConvertableToCodeBlock = isConvertableToCodeBlock;
7
7
  exports.transformToCodeBlockAction = transformToCodeBlockAction;
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
+ var _selection = require("@atlaskit/editor-common/selection");
10
11
  var _utils = require("@atlaskit/editor-common/utils");
11
12
  function transformToCodeBlockAction(state, start, attrs) {
12
13
  var startOfCodeBlockText = state.selection.$from;
13
- var endPosition = state.selection.empty ? startOfCodeBlockText.end() : state.selection.$to.pos;
14
+ var endPosition = state.selection.empty && !(state.selection instanceof _selection.GapCursorSelection) ? startOfCodeBlockText.end() : state.selection.$to.pos;
14
15
  var startLinePosition = startOfCodeBlockText.start();
15
16
  //when cmd+A is used to select the content. start position should be 0.
16
17
  var parentStartPosition = startOfCodeBlockText.depth === 0 ? 0 : startOfCodeBlockText.before();
@@ -60,7 +61,7 @@ function transformToCodeBlockAction(state, start, attrs) {
60
61
 
61
62
  // Reposition cursor when inserting into layouts or table headers
62
63
  var mapped = tr.doc.resolve(tr.mapping.map(startMapped) + 1);
63
- var selection = _state.TextSelection.findFrom(mapped, 1, true);
64
+ var selection = _state.TextSelection.findFrom(mapped, state.selection instanceof _selection.GapCursorSelection ? -1 : 1, true);
64
65
  if (selection) {
65
66
  return tr.setSelection(selection);
66
67
  }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.32.5";
9
+ var version = "187.32.7";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,9 +1,10 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection';
3
4
  import { timestampToString, mapSlice } from '@atlaskit/editor-common/utils';
4
5
  export function transformToCodeBlockAction(state, start, attrs) {
5
6
  const startOfCodeBlockText = state.selection.$from;
6
- const endPosition = state.selection.empty ? startOfCodeBlockText.end() : state.selection.$to.pos;
7
+ const endPosition = state.selection.empty && !(state.selection instanceof GapCursorSelection) ? startOfCodeBlockText.end() : state.selection.$to.pos;
7
8
  const startLinePosition = startOfCodeBlockText.start();
8
9
  //when cmd+A is used to select the content. start position should be 0.
9
10
  const parentStartPosition = startOfCodeBlockText.depth === 0 ? 0 : startOfCodeBlockText.before();
@@ -53,7 +54,7 @@ export function transformToCodeBlockAction(state, start, attrs) {
53
54
 
54
55
  // Reposition cursor when inserting into layouts or table headers
55
56
  const mapped = tr.doc.resolve(tr.mapping.map(startMapped) + 1);
56
- const selection = TextSelection.findFrom(mapped, 1, true);
57
+ const selection = TextSelection.findFrom(mapped, state.selection instanceof GapCursorSelection ? -1 : 1, true);
57
58
  if (selection) {
58
59
  return tr.setSelection(selection);
59
60
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.32.5";
2
+ export const version = "187.32.7";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,9 +1,10 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection';
3
4
  import { timestampToString, mapSlice } from '@atlaskit/editor-common/utils';
4
5
  export function transformToCodeBlockAction(state, start, attrs) {
5
6
  var startOfCodeBlockText = state.selection.$from;
6
- var endPosition = state.selection.empty ? startOfCodeBlockText.end() : state.selection.$to.pos;
7
+ var endPosition = state.selection.empty && !(state.selection instanceof GapCursorSelection) ? startOfCodeBlockText.end() : state.selection.$to.pos;
7
8
  var startLinePosition = startOfCodeBlockText.start();
8
9
  //when cmd+A is used to select the content. start position should be 0.
9
10
  var parentStartPosition = startOfCodeBlockText.depth === 0 ? 0 : startOfCodeBlockText.before();
@@ -53,7 +54,7 @@ export function transformToCodeBlockAction(state, start, attrs) {
53
54
 
54
55
  // Reposition cursor when inserting into layouts or table headers
55
56
  var mapped = tr.doc.resolve(tr.mapping.map(startMapped) + 1);
56
- var selection = TextSelection.findFrom(mapped, 1, true);
57
+ var selection = TextSelection.findFrom(mapped, state.selection instanceof GapCursorSelection ? -1 : 1, true);
57
58
  if (selection) {
58
59
  return tr.setSelection(selection);
59
60
  }
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.32.5";
2
+ export var version = "187.32.7";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.32.5",
3
+ "version": "187.32.7",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/code": "^14.6.0",
56
56
  "@atlaskit/date": "^0.10.0",
57
57
  "@atlaskit/datetime-picker": "^12.8.0",
58
- "@atlaskit/editor-common": "^74.53.0",
58
+ "@atlaskit/editor-common": "^74.54.0",
59
59
  "@atlaskit/editor-json-transformer": "^8.10.0",
60
60
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
61
61
  "@atlaskit/editor-palette": "1.5.1",
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/editor-plugin-hyperlink": "^0.3.0",
76
76
  "@atlaskit/editor-plugin-image-upload": "^0.1.0",
77
77
  "@atlaskit/editor-plugin-list": "^1.1.0",
78
- "@atlaskit/editor-plugin-table": "^2.10.0",
78
+ "@atlaskit/editor-plugin-table": "^2.11.0",
79
79
  "@atlaskit/editor-plugin-text-formatting": "^0.3.0",
80
80
  "@atlaskit/editor-plugin-type-ahead": "^0.1.0",
81
81
  "@atlaskit/editor-plugin-unsupported-content": "^0.1.0",
@@ -149,7 +149,7 @@
149
149
  "@atlaskit/collab-provider": "9.11.1",
150
150
  "@atlaskit/dropdown-menu": "^11.11.0",
151
151
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
152
- "@atlaskit/editor-plugin-table": "^2.10.0",
152
+ "@atlaskit/editor-plugin-table": "^2.11.0",
153
153
  "@atlaskit/flag": "^15.2.0",
154
154
  "@atlaskit/icon-object": "^6.3.0",
155
155
  "@atlaskit/inline-dialog": "^13.6.0",