@apform-ui/core 1.10.7 → 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[]>;
@@ -22,6 +22,7 @@ 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
24
  export { StreamStatusBannerDoc } from '../components/Chat/StreamStatusBanner/doc';
25
+ export { MentionInputDoc } from '../components/Chat/MentionInput/doc';
25
26
  export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc';
26
27
  export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc';
27
28
  export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc';
package/dist/index.d.ts CHANGED
@@ -83,6 +83,8 @@ export { SessionSidebar } from './components/Chat/SessionSidebar';
83
83
  export { ProcessingDrawer } from './components/Chat/ProcessingDrawer';
84
84
  export { ConversationHeader } from './components/Chat/ConversationHeader';
85
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';
86
88
  export { AssistantPicker } from './components/Chat/AssistantPicker';
87
89
  export type { AssistantPickerItem } from './components/Chat/AssistantPicker';
88
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.7",
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
@@ -22,6 +22,7 @@ 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
24
  export { StreamStatusBannerDoc } from '../components/Chat/StreamStatusBanner/doc'
25
+ export { MentionInputDoc } from '../components/Chat/MentionInput/doc'
25
26
  export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
26
27
  export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
27
28
  export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
@@ -89,6 +90,7 @@ import { ProcessingDrawerDoc } from '../components/Chat/ProcessingDrawer/doc'
89
90
  import { RunStatusBarDoc } from '../components/Chat/RunStatusBar/doc'
90
91
  import { SessionSidebarDoc } from '../components/Chat/SessionSidebar/doc'
91
92
  import { StreamStatusBannerDoc } from '../components/Chat/StreamStatusBanner/doc'
93
+ import { MentionInputDoc } from '../components/Chat/MentionInput/doc'
92
94
  import { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
93
95
  import { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
94
96
  import { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
@@ -157,6 +159,7 @@ export const componentDocs: Record<string, ComponentDoc> = {
157
159
  RunStatusBar: RunStatusBarDoc,
158
160
  SessionSidebar: SessionSidebarDoc,
159
161
  StreamStatusBanner: StreamStatusBannerDoc,
162
+ MentionInput: MentionInputDoc,
160
163
  AttachmentPreviewModal: AttachmentPreviewModalDoc,
161
164
  DocumentSummaryList: DocumentSummaryListDoc,
162
165
  MessageAttachmentList: MessageAttachmentListDoc,