@apform-ui/core 1.10.6 → 1.10.8

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.
@@ -0,0 +1,30 @@
1
+ import { MentionChip, MentionSearchFn, MentionTab } from './types';
2
+ type __VLS_Props = {
3
+ disabled?: boolean;
4
+ loading?: boolean;
5
+ placeholder?: string;
6
+ tabs: MentionTab[];
7
+ /** 异步搜索(壳内 debounce) */
8
+ search: MentionSearchFn;
9
+ /** 结果类型角标;默认取 type 首字母大写 */
10
+ typeBadge?: (type: string) => string;
11
+ debounceMs?: number;
12
+ emptyText?: string;
13
+ searchPlaceholder?: string;
14
+ };
15
+ declare function focus(): void;
16
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {
17
+ focus: typeof focus;
18
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ input: (message: string) => any;
20
+ send: (message: string, mentions: MentionChip[]) => any;
21
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onInput?: ((message: string) => any) | undefined;
23
+ onSend?: ((message: string, mentions: MentionChip[]) => any) | undefined;
24
+ }>, {
25
+ placeholder: string;
26
+ emptyText: string;
27
+ debounceMs: number;
28
+ searchPlaceholder: string;
29
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../../../docs/types';
2
+ /** MentionInput 文档 */
3
+ export declare const MentionInputDoc: ComponentDoc;
@@ -0,0 +1,2 @@
1
+ export { default as MentionInput } from './MentionInput.vue';
2
+ export type { MentionTab, MentionResultItem, MentionChip, MentionSearchFn, } from './types';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * MentionInput 公开类型
3
+ */
4
+ /** 分类 Tab */
5
+ export interface MentionTab {
6
+ key: string;
7
+ label: string;
8
+ }
9
+ /** 搜索结果项 */
10
+ export interface MentionResultItem {
11
+ id: string;
12
+ type: string;
13
+ name: string;
14
+ description?: string;
15
+ }
16
+ /** 已选引用 chip */
17
+ export interface MentionChip {
18
+ id: string;
19
+ type: string;
20
+ label: string;
21
+ }
22
+ /**
23
+ * 业务注入的搜索函数
24
+ * @param query - @ 后关键字
25
+ * @param tab - 当前分类 key
26
+ */
27
+ export type MentionSearchFn = (query: string, tab: string) => Promise<MentionResultItem[]>;
@@ -7,7 +7,23 @@ type __VLS_Props = {
7
7
  /** 品牌标识组件(可选) */
8
8
  brandMark?: any;
9
9
  };
10
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
10
+ /**
11
+ * 滚动到底部(默认列表模式;#body 时可被业务忽略)
12
+ */
13
+ declare function scrollToBottom(): Promise<void>;
14
+ declare var __VLS_1: {}, __VLS_3: {
15
+ messages: Message[];
16
+ scrollToBottom: typeof scrollToBottom;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ empty?: (props: typeof __VLS_1) => any;
20
+ } & {
21
+ body?: (props: typeof __VLS_3) => any;
22
+ };
23
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
24
+ scrollToBottom: typeof scrollToBottom;
25
+ container: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
26
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
27
  cancel: () => any;
12
28
  retry: () => any;
13
29
  preview: (attachment: any) => any;
@@ -20,4 +36,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
20
36
  onResume?: ((action: string, payload?: string | undefined) => any) | undefined;
21
37
  "onOpen-process"?: ((message: Message) => any) | undefined;
22
38
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
39
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
23
40
  export default _default;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * StreamStatusBanner — 流式连接状态条(断线重试等)
3
+ */
4
+ type __VLS_Props = {
5
+ /** 连接 / 流状态 */
6
+ status: 'idle' | 'connecting' | 'reconnecting' | 'disconnected' | 'streaming';
7
+ /** 主文案 */
8
+ message?: string;
9
+ /** 重试按钮文案 */
10
+ retryLabel?: string;
11
+ /** 是否显示重试 */
12
+ showRetry?: boolean;
13
+ };
14
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ retry: () => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onRetry?: (() => any) | undefined;
18
+ }>, {
19
+ retryLabel: string;
20
+ showRetry: boolean;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../../../docs/types';
2
+ /** StreamStatusBanner 文档 */
3
+ export declare const StreamStatusBannerDoc: ComponentDoc;
@@ -0,0 +1 @@
1
+ export { default as StreamStatusBanner } from './StreamStatusBanner.vue';
@@ -21,6 +21,8 @@ export { ModelPickerDoc } from '../components/Chat/ModelPicker/doc';
21
21
  export { ProcessingDrawerDoc } from '../components/Chat/ProcessingDrawer/doc';
22
22
  export { RunStatusBarDoc } from '../components/Chat/RunStatusBar/doc';
23
23
  export { SessionSidebarDoc } from '../components/Chat/SessionSidebar/doc';
24
+ export { StreamStatusBannerDoc } from '../components/Chat/StreamStatusBanner/doc';
25
+ export { MentionInputDoc } from '../components/Chat/MentionInput/doc';
24
26
  export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc';
25
27
  export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc';
26
28
  export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc';
package/dist/index.d.ts CHANGED
@@ -76,12 +76,15 @@ export { MessageBubble } from './components/Chat/MessageBubble';
76
76
  export { MessageList } from './components/Chat/MessageList';
77
77
  export { Composer } from './components/Chat/Composer';
78
78
  export { RunStatusBar } from './components/Chat/RunStatusBar';
79
+ export { StreamStatusBanner } from './components/Chat/StreamStatusBanner';
79
80
  export { ApprovalCard } from './components/Chat/ApprovalCard';
80
81
  export { MessageParts, MessageAttachmentList, DocumentSummaryList, AttachmentPreviewModal, } from './components/Chat/message';
81
82
  export { SessionSidebar } from './components/Chat/SessionSidebar';
82
83
  export { ProcessingDrawer } from './components/Chat/ProcessingDrawer';
83
84
  export { ConversationHeader } from './components/Chat/ConversationHeader';
84
85
  export { PendingAttachmentChip } from './components/Chat/PendingAttachmentChip';
86
+ export { MentionInput } from './components/Chat/MentionInput';
87
+ export type { MentionTab, MentionResultItem, MentionChip, MentionSearchFn, } from './components/Chat/MentionInput';
85
88
  export { AssistantPicker } from './components/Chat/AssistantPicker';
86
89
  export type { AssistantPickerItem } from './components/Chat/AssistantPicker';
87
90
  export { ModelPicker } from './components/Chat/ModelPicker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apform-ui/core",
3
- "version": "1.10.6",
3
+ "version": "1.10.8",
4
4
  "type": "module",
5
5
  "author": "yangdongnan",
6
6
  "license": "MIT",
@@ -50,16 +50,6 @@
50
50
  "styles",
51
51
  "README.md"
52
52
  ],
53
- "scripts": {
54
- "dev": "vite",
55
- "build": "vite build",
56
- "build:check": "vue-tsc --noEmit && vite build",
57
- "preview": "vite preview",
58
- "test": "vitest run",
59
- "test:watch": "vitest",
60
- "clean": "rm -rf dist",
61
- "prepublishOnly": "pnpm run build"
62
- },
63
53
  "peerDependencies": {
64
54
  "echarts": ">=5.0.0",
65
55
  "element-plus": "2.14.2",
@@ -99,5 +89,14 @@
99
89
  "vitest": "^3.2.1",
100
90
  "vue": "^3.5.13",
101
91
  "vue-tsc": "^2.2.8"
92
+ },
93
+ "scripts": {
94
+ "dev": "vite",
95
+ "build": "vite build",
96
+ "build:check": "vue-tsc --noEmit && vite build",
97
+ "preview": "vite preview",
98
+ "test": "vitest run",
99
+ "test:watch": "vitest",
100
+ "clean": "rm -rf dist"
102
101
  }
103
- }
102
+ }
package/src/docs/index.ts CHANGED
@@ -21,6 +21,8 @@ export { ModelPickerDoc } from '../components/Chat/ModelPicker/doc'
21
21
  export { ProcessingDrawerDoc } from '../components/Chat/ProcessingDrawer/doc'
22
22
  export { RunStatusBarDoc } from '../components/Chat/RunStatusBar/doc'
23
23
  export { SessionSidebarDoc } from '../components/Chat/SessionSidebar/doc'
24
+ export { StreamStatusBannerDoc } from '../components/Chat/StreamStatusBanner/doc'
25
+ export { MentionInputDoc } from '../components/Chat/MentionInput/doc'
24
26
  export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
25
27
  export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
26
28
  export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
@@ -87,6 +89,8 @@ import { ModelPickerDoc } from '../components/Chat/ModelPicker/doc'
87
89
  import { ProcessingDrawerDoc } from '../components/Chat/ProcessingDrawer/doc'
88
90
  import { RunStatusBarDoc } from '../components/Chat/RunStatusBar/doc'
89
91
  import { SessionSidebarDoc } from '../components/Chat/SessionSidebar/doc'
92
+ import { StreamStatusBannerDoc } from '../components/Chat/StreamStatusBanner/doc'
93
+ import { MentionInputDoc } from '../components/Chat/MentionInput/doc'
90
94
  import { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
91
95
  import { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
92
96
  import { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
@@ -154,6 +158,8 @@ export const componentDocs: Record<string, ComponentDoc> = {
154
158
  ProcessingDrawer: ProcessingDrawerDoc,
155
159
  RunStatusBar: RunStatusBarDoc,
156
160
  SessionSidebar: SessionSidebarDoc,
161
+ StreamStatusBanner: StreamStatusBannerDoc,
162
+ MentionInput: MentionInputDoc,
157
163
  AttachmentPreviewModal: AttachmentPreviewModalDoc,
158
164
  DocumentSummaryList: DocumentSummaryListDoc,
159
165
  MessageAttachmentList: MessageAttachmentListDoc,