@blueking/chat-x 0.0.49-beta.2 → 0.0.49-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,18 +1,25 @@
1
1
  import { type ComputedRef, type MaybeRef } from 'vue';
2
2
  export declare const CONTAINER_SCROLL_TOKEN: unique symbol;
3
3
  export declare const SHOW_SCROLL_BOTTOM_BTN_DISTANCE = 100;
4
+ /**
5
+ * 距底部超过该距离时视为大跨度定位(首屏渲染、切换会话、异步内容撑高),
6
+ * 此时直接瞬时贴底;平滑滚动只用于流式输出过程中的小幅跟随。
7
+ */
8
+ export declare const INSTANT_SCROLL_DISTANCE = 600;
4
9
  export type ContainerScrollData = {
5
10
  autoScrollEnabled: boolean;
6
11
  isScrollBottom: boolean;
12
+ jumpToBottom: () => void;
7
13
  scrollBottomHeight: number;
8
- toScrollBottom: () => void;
14
+ toScrollBottom: (behavior?: ScrollBehavior) => void;
9
15
  toScrollTop: () => void;
10
16
  };
11
17
  export declare const useContainerScrollProvider: (containerRef: MaybeRef<HTMLElement | null>, bottomRef: MaybeRef<HTMLElement | null>) => {
12
18
  autoScrollEnabled: import("vue").ShallowRef<boolean, boolean>;
13
19
  isScrollBottom: import("vue").ShallowRef<boolean, boolean>;
14
20
  scrollBottomHeight: import("vue").ShallowRef<number, number>;
15
- toScrollBottom: () => void;
21
+ jumpToBottom: () => void;
22
+ toScrollBottom: (behavior?: ScrollBehavior) => void;
16
23
  toScrollTop: () => void;
17
24
  debouncedShowScrollBottomBtn: import("vue").Ref<boolean, boolean>;
18
25
  };