@seafile/sdoc-editor 2.0.51 → 2.0.53
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.
|
@@ -242,7 +242,7 @@ const MENUS_CONFIG_MAP = exports.MENUS_CONFIG_MAP = {
|
|
|
242
242
|
[_elementType.CHART]: {
|
|
243
243
|
id: `sdoc_${_elementType.CHART}`,
|
|
244
244
|
iconClass: 'sdocfont sdoc-chart',
|
|
245
|
-
text: '
|
|
245
|
+
text: 'chart'
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
248
|
|
|
@@ -368,7 +368,7 @@ const SIDE_INSERT_MENUS_CONFIG = exports.SIDE_INSERT_MENUS_CONFIG = {
|
|
|
368
368
|
id: `sdoc_${_elementType.CHART}`,
|
|
369
369
|
iconClass: 'sdocfont sdoc-chart',
|
|
370
370
|
type: _elementType.CHART,
|
|
371
|
-
text: '
|
|
371
|
+
text: 'chart'
|
|
372
372
|
},
|
|
373
373
|
[_elementType.CODE_BLOCK]: {
|
|
374
374
|
id: '',
|
|
@@ -458,7 +458,7 @@ const SIDE_INSERT_MENUS_SEARCH_MAP = exports.SIDE_INSERT_MENUS_SEARCH_MAP = {
|
|
|
458
458
|
[_elementType.THREE_COLUMN]: 'Three_column',
|
|
459
459
|
[_elementType.FOUR_COLUMN]: 'Four_column',
|
|
460
460
|
[_elementType.LINK]: 'Link',
|
|
461
|
-
[_elementType.CHART]: '
|
|
461
|
+
[_elementType.CHART]: 'chart',
|
|
462
462
|
[_elementType.CODE_BLOCK]: 'Code_block',
|
|
463
463
|
[_elementType.CALL_OUT]: 'Callout',
|
|
464
464
|
[_elementType.UNORDERED_LIST]: 'Unordered_list',
|
|
@@ -67,12 +67,21 @@ function AIModule(_ref) {
|
|
|
67
67
|
const articleDom = document.querySelector('.sdoc-editor__article');
|
|
68
68
|
articleDom.style.paddingBottom = needPaddingBottomHeight + 'px';
|
|
69
69
|
}
|
|
70
|
+
const isInView = rect.top + rect.height - window.innerHeight;
|
|
70
71
|
const heightDiff = rect.bottom + _constants.AI_MIN_HEIGHT - window.innerHeight;
|
|
71
72
|
if (heightDiff > 0) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
if (isInView < 0) {
|
|
74
|
+
scrollRef.current.scrollTo({
|
|
75
|
+
top: scrollTop + rect.top - 94,
|
|
76
|
+
behavior: 'smooth'
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
scrollRef.current.scrollTo({
|
|
80
|
+
top: scrollTop + (rect.bottom - 94) - 100,
|
|
81
|
+
// scroll top + the rect bottom with container top - shown content height
|
|
82
|
+
behavior: 'smooth'
|
|
83
|
+
});
|
|
84
|
+
}
|
|
76
85
|
}
|
|
77
86
|
setTimeout(() => {
|
|
78
87
|
var _rect, _inputRef$current;
|
|
@@ -18,3 +18,16 @@
|
|
|
18
18
|
width: 100%;
|
|
19
19
|
height: 600px;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
.sdoc-chart-edit-dialog .sdoc-chart-fullscreen-view .sea-chart-formatter {
|
|
23
|
+
padding: 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sdoc-chart-edit-dialog .sea-chart-editor .sea-chart-formatter {
|
|
27
|
+
background-color: #fff;
|
|
28
|
+
padding: 16px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sdoc-chart-edit-dialog .sea-chart-editor .sea-chart-settings {
|
|
32
|
+
border-top: 0px
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.53",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This is a sdoc editor",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"remark-parse": "11.0.0",
|
|
40
40
|
"remark-rehype": "11.0.0",
|
|
41
41
|
"remark-stringify": "11.0.0",
|
|
42
|
-
"sea-chart": "2.0.
|
|
42
|
+
"sea-chart": "2.0.10",
|
|
43
43
|
"slugid": "3.2.0",
|
|
44
44
|
"socket.io-client": "4.8.1",
|
|
45
45
|
"type-of": "2.0.1",
|