@seafile/sdoc-editor 3.0.97 → 3.0.99

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.
@@ -278,8 +278,23 @@
278
278
  position: relative;
279
279
  }
280
280
 
281
- .sdoc-code-block-pre.hidden {
282
- padding-bottom: 48px !important;
281
+ .sdoc-editor__article .sdoc-code-block-pre {
282
+ display: flex;
283
+ position: relative;
284
+ overflow: auto;
285
+ }
286
+
287
+ .sdoc-editor__article .sdoc-code-block-pre::after {
288
+ content: '';
289
+ position: sticky;
290
+ right: -16px;
291
+ top: 0;
292
+ bottom: 0;
293
+ width: 16px;
294
+ background: inherit;
295
+ pointer-events: none;
296
+ display: inline-block;
297
+ flex-shrink: 0;
283
298
  }
284
299
 
285
300
  .sdoc-code-block-pre .sdoc-code-no-wrap {
@@ -319,7 +334,6 @@
319
334
  .sdoc-code-block-code.hide-code {
320
335
  max-height: 580.2px;
321
336
  display: block;
322
- overflow: scroll;
323
337
  }
324
338
 
325
339
  .sdoc-code-block-code .sdoc-code-line {
@@ -152,7 +152,7 @@ var CodeBlock = function CodeBlock(_ref) {
152
152
  }, []);
153
153
  (0, _react.useEffect)(function () {
154
154
  if (!codeContentRef.current) return;
155
- if (codeContentRef.current.clientHeight > Number(HIDDEN_CODE_BLOCK_MAX_HEIGHT)) {
155
+ if (codeContentRef.current.offsetHeight > Number(HIDDEN_CODE_BLOCK_MAX_HEIGHT)) {
156
156
  setIsCodeBlockOverflow(true);
157
157
  } else {
158
158
  setIsCodeBlockOverflow(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "3.0.97",
3
+ "version": "3.0.99",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "742e8dd5e34f5ec5b6eda05b44d1f6e9153f3f50"
75
+ "gitHead": "ac123c0d9b4882e033c3dfc53a78d682ea511c65"
76
76
  }