@atlaskit/prosemirror-collab 0.2.5 → 0.2.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 +12 -0
- package/dist/cjs/index.js +5 -6
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/package.json +6 -9
- package/report.api.md +5 -5
- package/tmp/api-report-tmp.d.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## 1.3.0 (2022-05-30)
|
|
2
2
|
|
|
3
|
+
## 0.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`4e6f1bf8511`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e6f1bf8511) - [ED-19233] Import prosemirror libraries from internal facade package
|
|
14
|
+
|
|
3
15
|
## 0.2.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.receiveTransaction = receiveTransaction;
|
|
|
11
11
|
exports.sendableSteps = sendableSteps;
|
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
13
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
14
|
-
var
|
|
14
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
15
15
|
var Rebaseable = /*#__PURE__*/(0, _createClass2.default)(function Rebaseable(step, inverted, origin) {
|
|
16
16
|
(0, _classCallCheck2.default)(this, Rebaseable);
|
|
17
17
|
this.step = step;
|
|
@@ -72,7 +72,7 @@ function unconfirmedFrom(transform) {
|
|
|
72
72
|
}
|
|
73
73
|
return result;
|
|
74
74
|
}
|
|
75
|
-
var collabKey = new
|
|
75
|
+
var collabKey = new _state.PluginKey('collab');
|
|
76
76
|
/// Creates a plugin that enables the collaborative editing framework
|
|
77
77
|
/// for the editor.
|
|
78
78
|
function collab() {
|
|
@@ -83,7 +83,7 @@ function collab() {
|
|
|
83
83
|
// eslint-disable-next-line eqeqeq
|
|
84
84
|
config.clientID == null ? Math.floor(Math.random() * 0xffffffff) : config.clientID
|
|
85
85
|
};
|
|
86
|
-
return new
|
|
86
|
+
return new _state.Plugin({
|
|
87
87
|
key: collabKey,
|
|
88
88
|
state: {
|
|
89
89
|
init: function init() {
|
|
@@ -100,7 +100,6 @@ function collab() {
|
|
|
100
100
|
return collab;
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
|
-
// @ts-expect-error
|
|
104
103
|
config: conf,
|
|
105
104
|
// This is used to notify the history plugin to not merge steps,
|
|
106
105
|
// so that the history can be rebased.
|
|
@@ -146,8 +145,8 @@ function receiveTransaction(state, steps, clientIDs) {
|
|
|
146
145
|
unconfirmed = [];
|
|
147
146
|
}
|
|
148
147
|
var newCollabState = new CollabState(version, unconfirmed);
|
|
149
|
-
if (options && options.mapSelectionBackward && state.selection instanceof
|
|
150
|
-
tr.setSelection(
|
|
148
|
+
if (options && options.mapSelectionBackward && state.selection instanceof _state.TextSelection) {
|
|
149
|
+
tr.setSelection(_state.TextSelection.between(tr.doc.resolve(tr.mapping.map(state.selection.anchor, -1)), tr.doc.resolve(tr.mapping.map(state.selection.head, -1)), -1));
|
|
151
150
|
tr.updated &= ~1;
|
|
152
151
|
}
|
|
153
152
|
return tr.setMeta('rebased', nUnconfirmed).setMeta('addToHistory', false).setMeta(collabKey, newCollabState);
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin, PluginKey, TextSelection } from 'prosemirror
|
|
1
|
+
import { Plugin, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
class Rebaseable {
|
|
3
3
|
constructor(step, inverted, origin) {
|
|
4
4
|
this.step = step;
|
|
@@ -88,7 +88,6 @@ export function collab(config = {}) {
|
|
|
88
88
|
return collab;
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
-
// @ts-expect-error
|
|
92
91
|
config: conf,
|
|
93
92
|
// This is used to notify the history plugin to not merge steps,
|
|
94
93
|
// so that the history can be rebased.
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import { Plugin, PluginKey, TextSelection } from 'prosemirror
|
|
3
|
+
import { Plugin, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
var Rebaseable = /*#__PURE__*/_createClass(function Rebaseable(step, inverted, origin) {
|
|
5
5
|
_classCallCheck(this, Rebaseable);
|
|
6
6
|
this.step = step;
|
|
@@ -89,7 +89,6 @@ export function collab() {
|
|
|
89
89
|
return collab;
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
|
-
// @ts-expect-error
|
|
93
92
|
config: conf,
|
|
94
93
|
// This is used to notify the history plugin to not merge steps,
|
|
95
94
|
// so that the history can be rebased.
|
package/dist/esm/version.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EditorState, Plugin, type Transaction } from 'prosemirror
|
|
2
|
-
import type { Step as ProseMirrorStep, Transform as ProseMirrorTransform } from 'prosemirror
|
|
1
|
+
import { type EditorState, Plugin, type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { Step as ProseMirrorStep, Transform as ProseMirrorTransform } from '@atlaskit/editor-prosemirror/transform';
|
|
3
3
|
declare class Rebaseable {
|
|
4
4
|
readonly step: ProseMirrorStep;
|
|
5
5
|
readonly inverted: ProseMirrorStep;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EditorState, Plugin, type Transaction } from 'prosemirror
|
|
2
|
-
import type { Step as ProseMirrorStep, Transform as ProseMirrorTransform } from 'prosemirror
|
|
1
|
+
import { type EditorState, Plugin, type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { Step as ProseMirrorStep, Transform as ProseMirrorTransform } from '@atlaskit/editor-prosemirror/transform';
|
|
3
3
|
declare class Rebaseable {
|
|
4
4
|
readonly step: ProseMirrorStep;
|
|
5
5
|
readonly inverted: ProseMirrorStep;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/prosemirror-collab",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Collaborative editing for ProseMirror - Atlassian Fork",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,16 +32,13 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@
|
|
36
|
-
"
|
|
35
|
+
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
36
|
+
"@babel/runtime": "^7.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@atlaskit/adf-schema": "^
|
|
40
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
41
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0"
|
|
42
|
-
"prosemirror-history": "^1.1.3",
|
|
43
|
-
"prosemirror-model": "1.16.0",
|
|
44
|
-
"prosemirror-transform": "1.3.2"
|
|
39
|
+
"@atlaskit/adf-schema": "^28.1.0",
|
|
40
|
+
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
41
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0"
|
|
45
42
|
},
|
|
46
43
|
"techstack": {
|
|
47
44
|
"@atlassian/frontend": {
|
package/report.api.md
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<!--SECTION START: Main Entry Types-->
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import { EditorState } from 'prosemirror
|
|
19
|
-
import { Plugin as Plugin_2 } from 'prosemirror
|
|
20
|
-
import type { Step } from 'prosemirror
|
|
21
|
-
import { Transaction } from 'prosemirror
|
|
22
|
-
import type { Transform } from 'prosemirror
|
|
18
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
19
|
+
import { Plugin as Plugin_2 } from '@atlaskit/editor-prosemirror/state';
|
|
20
|
+
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
21
|
+
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
22
|
+
import type { Transform } from '@atlaskit/editor-prosemirror/transform';
|
|
23
23
|
|
|
24
24
|
// @public (undocumented)
|
|
25
25
|
export function collab(config?: CollabConfig): Plugin_2;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
import { EditorState } from 'prosemirror
|
|
8
|
-
import { Plugin as Plugin_2 } from 'prosemirror
|
|
9
|
-
import type { Step } from 'prosemirror
|
|
10
|
-
import { Transaction } from 'prosemirror
|
|
11
|
-
import type { Transform } from 'prosemirror
|
|
7
|
+
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import { Plugin as Plugin_2 } from '@atlaskit/editor-prosemirror/state';
|
|
9
|
+
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
10
|
+
import { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
+
import type { Transform } from '@atlaskit/editor-prosemirror/transform';
|
|
12
12
|
|
|
13
13
|
// @public (undocumented)
|
|
14
14
|
export function collab(config?: CollabConfig): Plugin_2;
|