@seafile/sdoc-editor 2.0.86 → 2.0.88-test-0.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.
|
@@ -53,6 +53,7 @@ var SdocEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
53
53
|
}));
|
|
54
54
|
var cursors = document.cursors;
|
|
55
55
|
newEditor.cursors = cursors || {};
|
|
56
|
+
console.log(1, newEditor.cursors, document);
|
|
56
57
|
newEditor.width = _constants.PAGE_EDIT_AREA_WIDTH; // default width
|
|
57
58
|
return newEditor;
|
|
58
59
|
|
package/dist/socket/helpers.js
CHANGED
|
@@ -275,6 +275,7 @@ var syncRemoteCursorLocation = exports.syncRemoteCursorLocation = function syncR
|
|
|
275
275
|
var currentUser = editor.user;
|
|
276
276
|
if (user && user.username !== currentUser.username) {
|
|
277
277
|
(0, _helper.setCursor)(editor, user, location, cursorData);
|
|
278
|
+
console.log(4, editor.cursors, cursorData, editor.onCursor);
|
|
278
279
|
|
|
279
280
|
// sync cursor position
|
|
280
281
|
editor.onCursor && editor.onCursor(editor.cursors);
|
|
@@ -305,6 +305,7 @@ var SocketManager = /*#__PURE__*/(0, _createClass2["default"])(function SocketMa
|
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
(0, _defineProperty2["default"])(this, "sendCursorLocation", function (location) {
|
|
308
|
+
console.log(1, location);
|
|
308
309
|
_this.socketClient.sendCursorLocation(location);
|
|
309
310
|
});
|
|
310
311
|
(0, _defineProperty2["default"])(this, "receiveCursorLocation", function (params) {
|
|
@@ -312,6 +313,7 @@ var SocketManager = /*#__PURE__*/(0, _createClass2["default"])(function SocketMa
|
|
|
312
313
|
var user = params.user,
|
|
313
314
|
location = params.location,
|
|
314
315
|
cursorData = params.cursor_data;
|
|
316
|
+
console.log(3, user, location, cursorData);
|
|
315
317
|
(0, _helpers.syncRemoteCursorLocation)(_this.editor, user, location, cursorData);
|
|
316
318
|
return;
|
|
317
319
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.88-test-0.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"url-parse": "1.5.10"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"i18next": "
|
|
59
|
-
"i18next-browser-languagedetector": "
|
|
60
|
-
"i18next-xhr-backend": "
|
|
58
|
+
"i18next": ">=17.0.13",
|
|
59
|
+
"i18next-browser-languagedetector": ">=3.0.3",
|
|
60
|
+
"i18next-xhr-backend": ">=3.1.2",
|
|
61
61
|
"react": "^18.3.0",
|
|
62
62
|
"react-dom": "^18.3.1",
|
|
63
|
-
"react-i18next": "
|
|
63
|
+
"react-i18next": ">=10.12.2",
|
|
64
64
|
"reactstrap": "^9.2.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
@@ -69,6 +69,5 @@
|
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
|
-
}
|
|
73
|
-
"gitHead": "c3a5835001665db45088a0137cf83e4a0e279a5f"
|
|
72
|
+
}
|
|
74
73
|
}
|