@seafile/sdoc-editor 0.1.97 → 0.1.98
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/basic-sdk/extension/commons/menu/menu-item.js +1 -2
- package/dist/basic-sdk/extension/plugins/font/menu/font-size/font-size-scale.js +3 -6
- package/dist/basic-sdk/extension/plugins/font/menu/font-size/index.css +11 -2
- package/dist/basic-sdk/extension/plugins/font/menu/font-size/index.js +7 -7
- package/package.json +1 -1
- package/public/media/sdoc-editor-font/iconfont.eot +0 -0
- package/public/media/sdoc-editor-font/iconfont.svg +2 -0
- package/public/media/sdoc-editor-font/iconfont.ttf +0 -0
- package/public/media/sdoc-editor-font/iconfont.woff +0 -0
- package/public/media/sdoc-editor-font/iconfont.woff2 +0 -0
- package/public/media/sdoc-editor-font.css +11 -6
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _this = this;
|
|
2
1
|
import React, { useCallback } from 'react';
|
|
3
2
|
import { useTranslation } from 'react-i18next';
|
|
4
3
|
import Tooltip from '../tooltip';
|
|
@@ -17,7 +16,7 @@ var MenuItem = function MenuItem(_ref) {
|
|
|
17
16
|
t = _useTranslation.t;
|
|
18
17
|
var onClick = useCallback(function (event) {
|
|
19
18
|
if (disabled) return;
|
|
20
|
-
onMouseDown(event,
|
|
19
|
+
onMouseDown(event, type);
|
|
21
20
|
|
|
22
21
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
22
|
}, [disabled, type]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { UncontrolledTooltip } from 'reactstrap';
|
|
3
2
|
import classnames from 'classnames';
|
|
3
|
+
import Tooltip from '../../../../commons/tooltip';
|
|
4
4
|
var FontSizeScale = function FontSizeScale(_ref) {
|
|
5
5
|
var children = _ref.children,
|
|
6
6
|
id = _ref.id,
|
|
@@ -22,11 +22,8 @@ var FontSizeScale = function FontSizeScale(_ref) {
|
|
|
22
22
|
disabled: disabled,
|
|
23
23
|
onClick: disabled ? function () {} : onClick,
|
|
24
24
|
id: id
|
|
25
|
-
}, children), tipMessage && /*#__PURE__*/React.createElement(
|
|
26
|
-
target: id
|
|
27
|
-
fade: false,
|
|
28
|
-
placement: "bottom",
|
|
29
|
-
delay: 0
|
|
25
|
+
}, children), tipMessage && /*#__PURE__*/React.createElement(Tooltip, {
|
|
26
|
+
target: id
|
|
30
27
|
}, tipMessage));
|
|
31
28
|
};
|
|
32
29
|
FontSizeScale.defaultProps = {
|
|
@@ -6,13 +6,18 @@
|
|
|
6
6
|
width: 34px !important;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.menu-group .sdoc-font-size-menu .sdoc-menu-with-dropdown-icon
|
|
9
|
+
.menu-group .sdoc-font-size-menu .sdoc-menu-with-dropdown-icon,
|
|
10
|
+
.menu-group .sdoc-font-size-menu .sdoc-menu-with-dropdown-icon div {
|
|
10
11
|
width: 34px;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
.menu-group .sdoc-font-size-menu .sdoc-menu-with-dropdown-icon div {
|
|
15
|
+
padding-left: 5px;
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
.sdoc-font-size-menu-popover .sdoc-dropdown-menu-item .sdoc-check-mark {
|
|
14
19
|
position: absolute;
|
|
15
|
-
left:
|
|
20
|
+
left: 8px;
|
|
16
21
|
transform: scale(.8);
|
|
17
22
|
color: #798d99;
|
|
18
23
|
}
|
|
@@ -23,3 +28,7 @@
|
|
|
23
28
|
overflow-y: scroll;
|
|
24
29
|
overflow-x: hidden;
|
|
25
30
|
}
|
|
31
|
+
|
|
32
|
+
.sdoc-font-size-menu-popover .sdoc-dropdown-menu-item {
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import React, { useState, useRef, useCallback } from 'react';
|
|
3
|
-
import { UncontrolledPopover
|
|
3
|
+
import { UncontrolledPopover } from 'reactstrap';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { Editor } from '@seafile/slate';
|
|
6
6
|
import classnames from 'classnames';
|
|
@@ -10,6 +10,7 @@ import { DEFAULT_COMMON_FONT_SIZE, FONT_SIZE, SPECIAL_FONT_SIZE_NAME } from '../
|
|
|
10
10
|
import context from '../../../../../../context';
|
|
11
11
|
import { eventStopPropagation } from '../../../../../utils/mouse-event';
|
|
12
12
|
import FontSizeScale from './font-size-scale';
|
|
13
|
+
import Tooltip from '../../../../commons/tooltip';
|
|
13
14
|
import './index.css';
|
|
14
15
|
var FontSize = function FontSize(_ref) {
|
|
15
16
|
var isRichEditor = _ref.isRichEditor,
|
|
@@ -89,15 +90,14 @@ var FontSize = function FontSize(_ref) {
|
|
|
89
90
|
ref: fontSizeRef
|
|
90
91
|
}, /*#__PURE__*/React.createElement("div", {
|
|
91
92
|
className: "sdoc-menu-with-dropdown-icon"
|
|
92
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
93
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "text-truncate"
|
|
95
|
+
}, selectedFontSize)), !disabled && /*#__PURE__*/React.createElement("div", {
|
|
93
96
|
className: "sdoc-menu-with-dropdown-triangle"
|
|
94
97
|
}, /*#__PURE__*/React.createElement("span", {
|
|
95
98
|
className: caretIconClass
|
|
96
|
-
}))), /*#__PURE__*/React.createElement(
|
|
97
|
-
target: fontSizeButtonId
|
|
98
|
-
fade: false,
|
|
99
|
-
placement: "bottom",
|
|
100
|
-
delay: 0
|
|
99
|
+
}))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
100
|
+
target: fontSizeButtonId
|
|
101
101
|
}, t('Font_size')), /*#__PURE__*/React.createElement(FontSizeScale, {
|
|
102
102
|
disabled: disabled,
|
|
103
103
|
onClick: increaseFontSize,
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
/>
|
|
15
15
|
<missing-glyph />
|
|
16
16
|
|
|
17
|
+
<glyph glyph-name="sdoc-close1" unicode="" d="M512 454.4L102.4 864 32 793.6 441.6 384 32-25.6 102.4-96 512 313.6 921.6-96l70.4 70.4L582.4 384 992 793.6 921.6 864z" horiz-adv-x="1024" />
|
|
18
|
+
|
|
17
19
|
<glyph glyph-name="sdoc-rename" unicode="" d="M796.8 873.6L928 742.4c32-32 32-83.2 0-112L336 32l-265.6-19.2 16 262.4L681.6 873.6c28.8 28.8 86.4 28.8 115.2 0z m-204.8-227.2L182.4 233.6l-6.4-115.2 118.4 9.6L704 537.6l-112 108.8z m147.2 147.2l-80-80L768 604.8l80 80-108.8 108.8zM976-128h-928C22.4-128 0-105.6 0-80S22.4-32 48-32h928c25.6 0 48-22.4 48-48s-22.4-48-48-48z" horiz-adv-x="1024" />
|
|
18
20
|
|
|
19
21
|
<glyph glyph-name="sdoc-align-center" unicode="" d="M800 832v-96H224V832h576z m224-352v96H0v-96h1024z m0-544v96H0v-96h1024zM224 288v-96h576v96H224z" horiz-adv-x="1024" />
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "sdocfont"; /* Project id 4097705 */
|
|
3
|
-
src: url('./sdoc-editor-font/iconfont.eot?t=
|
|
4
|
-
src: url('./sdoc-editor-font/iconfont.eot?t=
|
|
5
|
-
url('./sdoc-editor-font/iconfont.woff2?t=
|
|
6
|
-
url('./sdoc-editor-font/iconfont.woff?t=
|
|
7
|
-
url('./sdoc-editor-font/iconfont.ttf?t=
|
|
8
|
-
url('./sdoc-editor-font/iconfont.svg?t=
|
|
3
|
+
src: url('./sdoc-editor-font/iconfont.eot?t=1691058253511'); /* IE9 */
|
|
4
|
+
src: url('./sdoc-editor-font/iconfont.eot?t=1691058253511#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
|
5
|
+
url('./sdoc-editor-font/iconfont.woff2?t=1691058253511') format('woff2'),
|
|
6
|
+
url('./sdoc-editor-font/iconfont.woff?t=1691058253511') format('woff'),
|
|
7
|
+
url('./sdoc-editor-font/iconfont.ttf?t=1691058253511') format('truetype'),
|
|
8
|
+
url('./sdoc-editor-font/iconfont.svg?t=1691058253511#sdocfont') format('svg');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.sdocfont {
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
-moz-osx-font-smoothing: grayscale;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
.sdoc-close1:before {
|
|
20
|
+
content: "\e647";
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.sdoc-rename:before {
|
|
20
24
|
content: "\e620";
|
|
21
25
|
}
|
|
@@ -267,3 +271,4 @@
|
|
|
267
271
|
.sdoc-user:before {
|
|
268
272
|
content: "\e629";
|
|
269
273
|
}
|
|
274
|
+
|