@seafile/sdoc-editor 1.0.154 → 1.0.155

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.
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  .sdoc-dropdown-menu .sdoc-dropdown-menu-item-hidden {
52
- display: none;
52
+ display: none;
53
53
  }
54
54
 
55
55
  .sdoc-dropdown-menu .sdoc-dropdown-menu-item.disabled,
@@ -82,11 +82,12 @@
82
82
 
83
83
  .sdoc-dropdown-menu .sdoc-dropdown-item-content .sdoc-dropdown-item-content-icon {
84
84
  margin-right: 10px;
85
+ vertical-align: 1px;
85
86
  }
86
87
 
87
88
  .sdoc-dropdown-menu .sdoc-dropdown-item-right-icon {
88
89
  color: #999;
89
- transform: scale(.6);
90
+ transform: scale(.8);
90
91
  }
91
92
 
92
93
  .sdoc-dropdown-menu .sdoc-dropdown-item-with-left-icon {
@@ -95,8 +96,8 @@
95
96
  }
96
97
 
97
98
  .sdoc-dropdown-menu .sdoc-check-mark {
98
- transform: scale(.8);
99
99
  color: #798d99;
100
+ transform: scale(1);
100
101
  }
101
102
 
102
103
  /* sub menu */
@@ -25,7 +25,6 @@
25
25
  .sdoc-font-size-menu-popover .sdoc-dropdown-menu-item .sdoc-check-mark {
26
26
  position: absolute;
27
27
  left: 8px;
28
- transform: scale(.8);
29
28
  color: #798d99;
30
29
  }
31
30
 
@@ -75,6 +75,5 @@
75
75
  .header-menu .header-popover .sdoc-dropdown-menu-item .sdoc-check-mark {
76
76
  position: absolute;
77
77
  left: 8px;
78
- transform: scale(.8);
79
78
  color: #798d99;
80
79
  }
@@ -9,13 +9,16 @@
9
9
 
10
10
  .sdoc-table-alignment-menu .sdoc-dropdown-menu-item .sdoc-checked {
11
11
  margin-right: 6px;
12
- width: 16px;
13
- height: 16px;
12
+ height: 21px;
13
+ line-height: 21px;
14
+ width: 12px;
14
15
  }
16
+
15
17
  .sdoc-table-alignment-menu .sdoc-dropdown-menu-item .sdoc-check-mark {
16
18
  display: none;
17
- font-size: 16px !important;
19
+ font-size: 12px !important;
18
20
  }
21
+
19
22
  .sdoc-table-alignment-menu .sdoc-dropdown-menu-item .sdoc-check-mark.active {
20
23
  display: inline;
21
24
  }
@@ -63,3 +63,7 @@
63
63
  cursor: pointer;
64
64
  background: #f5f5f5;
65
65
  }
66
+
67
+ .sdoc-selected-table-size-popover .sdoc-selected-table-size-custom .sdocfont {
68
+ font-size: 12px;
69
+ }
@@ -1,6 +1,5 @@
1
1
  .sdoc-text-align-dropdown .sdocfont.sdoc-check-mark {
2
2
  position: absolute;
3
3
  left: 8px;
4
- transform: scale(.8);
5
4
  color: #798d99;
6
5
  }
@@ -49,6 +49,7 @@ function ArticleContainer(_ref) {
49
49
  // eslint-disable-next-line react-hooks/exhaustive-deps
50
50
  }, [editor.editorType, scrollRef]);
51
51
  (0, _react.useEffect)(() => {
52
+ if (editor.editorType === _constants.DOCUMENT_PLUGIN_EDITOR) return;
52
53
  const eventBus = _eventBus.default.getInstance();
53
54
  const unsubscribeOutline = eventBus.subscribe(_constants.INTERNAL_EVENT.OUTLINE_STATE_CHANGED, handleWindowResize);
54
55
  const unsubscribeResizeArticle = eventBus.subscribe(_constants.INTERNAL_EVENT.RESIZE_ARTICLE, handleWindowResize);
@@ -56,7 +57,7 @@ function ArticleContainer(_ref) {
56
57
  unsubscribeOutline();
57
58
  unsubscribeResizeArticle();
58
59
  };
59
- }, [handleWindowResize]);
60
+ }, [editor.editorType, handleWindowResize]);
60
61
  (0, _react.useEffect)(() => {
61
62
  if (editor.editorType === _constants.WIKI_EDITOR) return;
62
63
  if (editor.editorType === _constants.DOCUMENT_PLUGIN_EDITOR) return;
@@ -68,9 +69,12 @@ function ArticleContainer(_ref) {
68
69
  // eslint-disable-next-line react-hooks/exhaustive-deps
69
70
  }, []);
70
71
  const articleStyle = editor.getArticleStyle && editor.getArticleStyle();
72
+ const articleContainerStyle = editor.getArticleStyle ? {
73
+ width: articleStyle.width
74
+ } : containerStyle;
71
75
  return /*#__PURE__*/_react.default.createElement("div", {
72
76
  className: "sdoc-article-container",
73
- style: containerStyle
77
+ style: articleContainerStyle
74
78
  }, _react.default.Children.count(children) === 1 && /*#__PURE__*/_react.default.createElement("div", {
75
79
  className: "article sdoc-editor__article",
76
80
  style: articleStyle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.154",
3
+ "version": "1.0.155",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
@@ -14,6 +14,8 @@
14
14
  />
15
15
  <missing-glyph />
16
16
 
17
+ <glyph glyph-name="sdoc-check-mark" unicode="&#59005;" d="M44.8 371.2c-19.2 22.4-16 54.4 6.4 73.6s54.4 16 73.6-6.4l243.2-300.8L896 745.6c19.2 22.4 54.4 28.8 76.8 9.6 22.4-19.2 25.6-51.2 6.4-76.8-384-441.6-576-665.6-588.8-678.4-12.8-16-35.2-12.8-44.8 0-6.4 6.4-105.6 134.4-300.8 371.2z" horiz-adv-x="1024" />
18
+
17
19
  <glyph glyph-name="sdoc-play" unicode="&#59004;" d="M512 896C230.4 896 0 665.6 0 384s230.4-512 512-512 512 230.4 512 512c0 134.4-54.4 265.6-150.4 361.6S646.4 896 512 896z m0-944c-236.8 0-432 192-432 432S275.2 816 512 816s432-192 432-432c0-115.2-44.8-224-124.8-304s-192-128-307.2-128z m185.6 457.6l-134.4 76.8-140.8 83.2c-9.6 3.2-19.2 3.2-25.6-3.2-6.4-6.4-12.8-16-9.6-25.6v-320c0-9.6 3.2-19.2 9.6-25.6s16-6.4 25.6-3.2l140.8 83.2 134.4 76.8c9.6 6.4 12.8 16 12.8 25.6s-6.4 28.8-12.8 32z" horiz-adv-x="1024" />
18
20
 
19
21
  <glyph glyph-name="sdoc-video" unicode="&#59003;" d="M969.6 832c28.8 0 54.4-25.6 54.4-57.6v-784c0-32-25.6-57.6-54.4-57.6H54.4C25.6-64 0-38.4 0-6.4V774.4C0 806.4 25.6 832 54.4 832h915.2zM928 736H96v-704h832V736zM348.8 608l380.8-227.2-380.8-227.2V608z" horiz-adv-x="1024" />
@@ -142,8 +144,6 @@
142
144
 
143
145
  <glyph glyph-name="sdoc-align-center" unicode="&#58926;" d="M800 832v-96H224V832h576z m224-352v96H0v-96h1024z m0-544v96H0v-96h1024zM224 288v-96h576v96H224z" horiz-adv-x="1024" />
144
146
 
145
- <glyph glyph-name="sdoc-check-mark" unicode="&#58959;" d="M329.6 96l-284.8 275.2c-25.6 22.4-25.6 60.8-3.2 86.4 25.6 25.6 64 25.6 89.6 0l265.6-256L892.8 697.6c22.4 22.4 64 25.6 86.4 0 22.4-22.4 25.6-60.8 3.2-83.2L464 99.2c-35.2-38.4-96-38.4-134.4-3.2z" horiz-adv-x="1024" />
146
-
147
147
  <glyph glyph-name="sdoc-table" unicode="&#58947;" d="M992 864c19.2 0 32-12.8 32-32v-896c0-19.2-12.8-32-32-32H32c-19.2 0-32 12.8-32 32V832c0 19.2 12.8 32 32 32h960zM96 192v-192h256v192H96z m832 0H448v-192h480v192z m0 288H448v-192h480v192z m0 288H448v-192h480V768zM352 768H96v-192h256V768zM96 288h256v192H96v-192z" horiz-adv-x="1024" />
148
148
 
149
149
  <glyph glyph-name="sdoc-list-ol" unicode="&#58948;" d="M288 432v-96h736v96H288zM288 768v-96h736V768H288z m0-672v-96h736v96H288zM144 608c9.6 0 16 6.4 16 16v25.6c0 9.6-6.4 16-16 16h-25.6V816c0 9.6-6.4 16-16 16H64c-6.4 0-12.8-3.2-16-9.6l-12.8-25.6c-3.2-3.2-3.2-9.6 0-12.8 3.2-3.2 6.4-6.4 12.8-6.4H64v-112H32c-6.4-3.2-12.8-9.6-12.8-16v-28.8c0-6.4 6.4-12.8 12.8-12.8h112zM25.6 272h115.2c9.6 0 16 6.4 16 16v25.6c0 9.6-6.4 16-16 16h-64c6.4 19.2 83.2 32 83.2 99.2 0 51.2-44.8 67.2-76.8 67.2-35.2 0-60.8-19.2-67.2-32-9.6-12.8-6.4-22.4 3.2-28.8l12.8-12.8c9.6-9.6 19.2-3.2 25.6 3.2 3.2 3.2 9.6 6.4 16 6.4s16-3.2 16-16c0-22.4-89.6-38.4-89.6-118.4v-6.4c6.4-12.8 16-19.2 25.6-19.2z m80-198.4l28.8 35.2c6.4 6.4 9.6 16 9.6 22.4v6.4c0 12.8-6.4 22.4-22.4 22.4h-96c-9.6 0-16-6.4-16-16v-28.8c0-9.6 6.4-16 16-16H64c-6.4-6.4-12.8-16-19.2-22.4l-9.6-12.8c-3.2-6.4-6.4-16-3.2-22.4l3.2-3.2c6.4-9.6 12.8-12.8 22.4-12.8H64c19.2 0 25.6-3.2 25.6-16 0-9.6-6.4-16-22.4-16-9.6 0-19.2 3.2-25.6 6.4-12.8 6.4-22.4 6.4-25.6-6.4l-9.6-16c-6.4-12.8-6.4-22.4 6.4-25.6 9.6-9.6 32-19.2 60.8-19.2 60.8 0 83.2 38.4 83.2 76.8 0 28.8-19.2 54.4-51.2 64z" horiz-adv-x="1024" />
@@ -1,11 +1,14 @@
1
1
  @font-face {
2
- font-family: "sdocfont"; /* Project id 4097705 */
3
- src: url('./sdoc-editor-font/iconfont.eot?t=1732000106128'); /* IE9 */
4
- src: url('./sdoc-editor-font/iconfont.eot?t=1732000106128#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
- url('./sdoc-editor-font/iconfont.woff2?t=1732000106128') format('woff2'),
6
- url('./sdoc-editor-font/iconfont.woff?t=1732000106128') format('woff'),
7
- url('./sdoc-editor-font/iconfont.ttf?t=1732000106128') format('truetype'),
8
- url('./sdoc-editor-font/iconfont.svg?t=1732000106128#sdocfont') format('svg');
2
+ font-family: "sdocfont";
3
+ /* Project id 4097705 */
4
+ src: url('./sdoc-editor-font/iconfont.eot?t=1732777032005');
5
+ /* IE9 */
6
+ src: url('./sdoc-editor-font/iconfont.eot?t=1732777032005#iefix') format('embedded-opentype'),
7
+ /* IE6-IE8 */
8
+ url('./sdoc-editor-font/iconfont.woff2?t=1732777032005') format('woff2'),
9
+ url('./sdoc-editor-font/iconfont.woff?t=1732777032005') format('woff'),
10
+ url('./sdoc-editor-font/iconfont.ttf?t=1732777032005') format('truetype'),
11
+ url('./sdoc-editor-font/iconfont.svg?t=1732777032005#sdocfont') format('svg');
9
12
  }
10
13
 
11
14
  .sdocfont {
@@ -16,6 +19,10 @@
16
19
  -moz-osx-font-smoothing: grayscale;
17
20
  }
18
21
 
22
+ .sdoc-check-mark:before {
23
+ content: "\e67d";
24
+ }
25
+
19
26
  .sdoc-play:before {
20
27
  content: "\e67c";
21
28
  }
@@ -272,10 +279,6 @@
272
279
  content: "\e62e";
273
280
  }
274
281
 
275
- .sdoc-check-mark:before {
276
- content: "\e64f";
277
- }
278
-
279
282
  .sdoc-table:before {
280
283
  content: "\e643";
281
284
  }