@seafile/sdoc-editor 1.0.198-test0.8 → 1.0.198-test1.0

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.
@@ -81,7 +81,7 @@ const insertWhiteboard = (editor, filename, filePath) => {
81
81
  _slate.Transforms.insertNodes(editor, whiteboardNode, {
82
82
  at: [path[0] + 1]
83
83
  });
84
- (0, _core.focusEditor)(editor, [path[0] + 1, 2]);
84
+ // focusEditor(editor, [path[0] + 1, 2]);
85
85
  return;
86
86
  }
87
87
  };
@@ -18,12 +18,12 @@ const Whiteboard = (editor, element) => {
18
18
  title
19
19
  } = element;
20
20
  const whiteboardRef = (0, _react.useRef)();
21
- const [tldraw, setTldraw] = (0, _react.useState)(null);
21
+ const [TldrawComponent, setTldrawComponent] = (0, _react.useState)(null);
22
22
  console.log(33, repoID, filePath);
23
23
  const renderWhiteboardEditor = Tldraw => {
24
24
  console.log(4, Tldraw, repoID, filePath);
25
25
  if (Tldraw) {
26
- setTldraw(() => Tldraw);
26
+ setTldrawComponent(() => Tldraw);
27
27
  }
28
28
  };
29
29
  (0, _react.useEffect)(() => {
@@ -37,7 +37,7 @@ const Whiteboard = (editor, element) => {
37
37
  return /*#__PURE__*/_react.default.createElement("div", {
38
38
  id: "sdoc-whiteboard-container",
39
39
  ref: whiteboardRef
40
- }, tldraw && /*#__PURE__*/_react.default.createElement("tldraw", {
40
+ }, TldrawComponent && /*#__PURE__*/_react.default.createElement(TldrawComponent, {
41
41
  repoID: repoID,
42
42
  filePath: filePath
43
43
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.198-test0.8",
3
+ "version": "1.0.198-test1.0",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",