react-terminal-viewer-cicd 3.0.0-beta.1 → 3.0.0-beta.3

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.
@@ -1,7 +1,7 @@
1
1
  function LogWorker() {
2
2
  var workerPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/worker';
3
3
  var worker = null;
4
- var version = "3.0.0-beta.1" || '0.0.0';
4
+ var version = "3.0.0-beta.3" || '0.0.0';
5
5
  var path = workerPath.includes('http') ? "".concat(workerPath, "/log.worker.js") : "".concat(window.location.origin).concat(workerPath, "/log.worker.js");
6
6
  var blob = new Blob(["importScripts(\"".concat(path, "?v=").concat(version, "\")")], {
7
7
  type: 'application/javascript'
@@ -263,7 +263,9 @@ var ReactVirtuoso = /*#__PURE__*/forwardRef(function (_ref, ref) {
263
263
  increaseViewportBy: 400 // 扩展约 20 行的高度
264
264
  // 其他性能优化
265
265
  ,
266
- useWindowScroll: false
266
+ useWindowScroll: false,
267
+ isScrolling: extraOptions === null || extraOptions === void 0 ? void 0 : extraOptions.isScrolling,
268
+ atBottomStateChange: extraOptions === null || extraOptions === void 0 ? void 0 : extraOptions.atBottomStateChange
267
269
  }), (logs === null || logs === void 0 ? void 0 : logs.length) === 0 && (empty || /*#__PURE__*/React.createElement("div", {
268
270
  className: "terminal-viewer-body-empty"
269
271
  }, "\u6682\u65E0\u6570\u636E")));
@@ -2,11 +2,21 @@ import { CanvasAddon } from '@xterm/addon-canvas';
2
2
  import { FitAddon } from '@xterm/addon-fit';
3
3
  import { WebLinksAddon } from '@xterm/addon-web-links';
4
4
  import { Terminal } from '@xterm/xterm';
5
+ import type { VirtuosoProps } from 'react-virtuoso';
5
6
  import { HighlightAddon } from './Addon/HighlightAddon';
6
7
  import { SearchAddon } from './Addon/SearchAddon';
7
8
  import type { SearcherRef } from './Addon/WorkerLog/types';
8
9
  export interface ExtraOptions {
9
10
  showLineNumber?: boolean;
11
+ /**
12
+ * Called when the list starts/stops scrolling.
13
+ */
14
+ isScrolling?: VirtuosoProps<unknown, unknown>['isScrolling'];
15
+ /**
16
+ * Called with true / false when the list has reached the bottom / gets scrolled up.
17
+ * Can be used to load newer items, like `tail -f`.
18
+ */
19
+ atBottomStateChange?: VirtuosoProps<unknown, unknown>['atBottomStateChange'];
10
20
  }
11
21
  export interface VirtualDomTerminal {
12
22
  scrollToTop: () => void;
@@ -2,11 +2,21 @@ import { CanvasAddon } from '@xterm/addon-canvas';
2
2
  import { FitAddon } from '@xterm/addon-fit';
3
3
  import { WebLinksAddon } from '@xterm/addon-web-links';
4
4
  import { Terminal } from '@xterm/xterm';
5
+ import type { VirtuosoProps } from 'react-virtuoso';
5
6
  import { HighlightAddon } from './Addon/HighlightAddon';
6
7
  import { SearchAddon } from './Addon/SearchAddon';
7
8
  import type { SearcherRef } from './Addon/WorkerLog/types';
8
9
  export interface ExtraOptions {
9
10
  showLineNumber?: boolean;
11
+ /**
12
+ * Called when the list starts/stops scrolling.
13
+ */
14
+ isScrolling?: VirtuosoProps<unknown, unknown>['isScrolling'];
15
+ /**
16
+ * Called with true / false when the list has reached the bottom / gets scrolled up.
17
+ * Can be used to load newer items, like `tail -f`.
18
+ */
19
+ atBottomStateChange?: VirtuosoProps<unknown, unknown>['atBottomStateChange'];
10
20
  }
11
21
  export interface VirtualDomTerminal {
12
22
  scrollToTop: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-terminal-viewer-cicd",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.3",
4
4
  "author": "https://gitee.com/gitee-frontend",
5
5
  "license": "MIT",
6
6
  "keywords": [