@atlaskit/editor-core 173.0.0 → 173.0.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 +7 -0
- package/dist/cjs/utils/selection.js +6 -8
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/utils/selection.js +1 -9
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/utils/selection.js +1 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/utils/selection.d.ts +1 -2
- package/dist/types-ts4.0/utils/selection.d.ts +1 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 173.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`74abc212007`](https://bitbucket.org/atlassian/atlassian-frontend/commits/74abc212007) - Move `setTextSelection` from `editor-core` to `editor-common`, then re-export it form `editor-core` to ensure there are no breaking changes
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 173.0.0
|
|
4
11
|
|
|
5
12
|
### Major Changes
|
|
@@ -15,7 +15,12 @@ Object.defineProperty(exports, "setNodeSelection", {
|
|
|
15
15
|
return _utils.setNodeSelection;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
exports
|
|
18
|
+
Object.defineProperty(exports, "setTextSelection", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _utils.setTextSelection;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
19
24
|
|
|
20
25
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
26
|
|
|
@@ -31,13 +36,6 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
31
36
|
|
|
32
37
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
38
|
|
|
34
|
-
function setTextSelection(view, anchor, head) {
|
|
35
|
-
var state = view.state,
|
|
36
|
-
dispatch = view.dispatch;
|
|
37
|
-
var tr = state.tr.setSelection(_prosemirrorState.TextSelection.create(state.doc, anchor, head));
|
|
38
|
-
dispatch(tr);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
39
|
function setAllSelection(view) {
|
|
42
40
|
var state = view.state,
|
|
43
41
|
dispatch = view.dispatch;
|
|
@@ -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 = "173.0.
|
|
9
|
+
var version = "173.0.1";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
2
2
|
import { NodeSelection, TextSelection, AllSelection } from 'prosemirror-state';
|
|
3
3
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
4
|
-
export { setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
5
|
-
export function setTextSelection(view, anchor, head) {
|
|
6
|
-
const {
|
|
7
|
-
state,
|
|
8
|
-
dispatch
|
|
9
|
-
} = view;
|
|
10
|
-
const tr = state.tr.setSelection(TextSelection.create(state.doc, anchor, head));
|
|
11
|
-
dispatch(tr);
|
|
12
|
-
}
|
|
4
|
+
export { setNodeSelection, setTextSelection } from '@atlaskit/editor-common/utils';
|
|
13
5
|
export function setAllSelection(view) {
|
|
14
6
|
const {
|
|
15
7
|
state,
|
package/dist/es2019/version.json
CHANGED
|
@@ -7,13 +7,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7
7
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
8
8
|
import { NodeSelection, TextSelection, AllSelection } from 'prosemirror-state';
|
|
9
9
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
10
|
-
export { setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
11
|
-
export function setTextSelection(view, anchor, head) {
|
|
12
|
-
var state = view.state,
|
|
13
|
-
dispatch = view.dispatch;
|
|
14
|
-
var tr = state.tr.setSelection(TextSelection.create(state.doc, anchor, head));
|
|
15
|
-
dispatch(tr);
|
|
16
|
-
}
|
|
10
|
+
export { setNodeSelection, setTextSelection } from '@atlaskit/editor-common/utils';
|
|
17
11
|
export function setAllSelection(view) {
|
|
18
12
|
var state = view.state,
|
|
19
13
|
dispatch = view.dispatch;
|
package/dist/esm/version.json
CHANGED
|
@@ -2,8 +2,7 @@ import { EditorView } from 'prosemirror-view';
|
|
|
2
2
|
import { Transaction, EditorState, Selection } from 'prosemirror-state';
|
|
3
3
|
import { Node } from 'prosemirror-model';
|
|
4
4
|
import { Side } from '@atlaskit/editor-common/selection';
|
|
5
|
-
export { setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
6
|
-
export declare function setTextSelection(view: EditorView, anchor: number, head?: number): void;
|
|
5
|
+
export { setNodeSelection, setTextSelection, } from '@atlaskit/editor-common/utils';
|
|
7
6
|
export declare function setAllSelection(view: EditorView): void;
|
|
8
7
|
export declare function setGapCursorSelection(view: EditorView, pos: number, side: Side): void;
|
|
9
8
|
export declare function setCellSelection(view: EditorView, anchor: number, head?: number): void;
|
|
@@ -2,8 +2,7 @@ import { EditorView } from 'prosemirror-view';
|
|
|
2
2
|
import { Transaction, EditorState, Selection } from 'prosemirror-state';
|
|
3
3
|
import { Node } from 'prosemirror-model';
|
|
4
4
|
import { Side } from '@atlaskit/editor-common/selection';
|
|
5
|
-
export { setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
6
|
-
export declare function setTextSelection(view: EditorView, anchor: number, head?: number): void;
|
|
5
|
+
export { setNodeSelection, setTextSelection, } from '@atlaskit/editor-common/utils';
|
|
7
6
|
export declare function setAllSelection(view: EditorView): void;
|
|
8
7
|
export declare function setGapCursorSelection(view: EditorView, pos: number, side: Side): void;
|
|
9
8
|
export declare function setCellSelection(view: EditorView, anchor: number, head?: number): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "173.0.
|
|
3
|
+
"version": "173.0.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/code": "^14.4.0",
|
|
49
49
|
"@atlaskit/date": "^0.9.0",
|
|
50
50
|
"@atlaskit/datetime-picker": "^12.3.0",
|
|
51
|
-
"@atlaskit/editor-common": "^70.
|
|
51
|
+
"@atlaskit/editor-common": "^70.1.0",
|
|
52
52
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
53
53
|
"@atlaskit/editor-markdown-transformer": "^4.1.0",
|
|
54
54
|
"@atlaskit/editor-shared-styles": "^2.2.0",
|