@seafile/sdoc-editor 2.0.87 → 2.0.88-test-0.0.2
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/dist/editor/sdoc-editor.js +1 -0
- package/dist/socket/helpers.js +1 -0
- package/dist/socket/socket-manager.js +2 -0
- package/package.json +3 -4
- package/LICENSE.txt +0 -13
|
@@ -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, location, cursorData, editor.cursors, 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.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
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": "1db85acfd8e8a86b9e563cfa187dc80c88115b24"
|
|
72
|
+
}
|
|
74
73
|
}
|
package/LICENSE.txt
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2025 Seafile Ltd.
|
|
2
|
-
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
you may not use this file except in compliance with the License.
|
|
5
|
-
You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
See the License for the specific language governing permissions and
|
|
13
|
-
limitations under the License.
|