@apform-ui/core 1.10.7 → 1.10.9

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[]>;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ content: string;
3
+ title?: string;
4
+ /** 副标题徽章(如「表单专家」) */
5
+ badge?: string;
6
+ defaultCollapsed?: boolean;
7
+ statusLabel?: string;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ title: string;
11
+ defaultCollapsed: boolean;
12
+ statusLabel: string;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { ComponentDoc } from '../../../docs/types';
2
+ /** ThinkingBlock 文档 */
3
+ export declare const ThinkingBlockDoc: ComponentDoc;
@@ -0,0 +1 @@
1
+ export { default as ThinkingBlock } from './ThinkingBlock.vue';
@@ -22,6 +22,8 @@ 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';
26
+ export { ThinkingBlockDoc } from '../components/Chat/ThinkingBlock/doc';
25
27
  export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc';
26
28
  export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc';
27
29
  export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc';
package/dist/index.d.ts CHANGED
@@ -83,6 +83,9 @@ 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';
88
+ export { ThinkingBlock } from './components/Chat/ThinkingBlock';
86
89
  export { AssistantPicker } from './components/Chat/AssistantPicker';
87
90
  export type { AssistantPickerItem } from './components/Chat/AssistantPicker';
88
91
  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.9",
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,8 @@ 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'
26
+ export { ThinkingBlockDoc } from '../components/Chat/ThinkingBlock/doc'
25
27
  export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
26
28
  export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
27
29
  export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
@@ -89,6 +91,8 @@ import { ProcessingDrawerDoc } from '../components/Chat/ProcessingDrawer/doc'
89
91
  import { RunStatusBarDoc } from '../components/Chat/RunStatusBar/doc'
90
92
  import { SessionSidebarDoc } from '../components/Chat/SessionSidebar/doc'
91
93
  import { StreamStatusBannerDoc } from '../components/Chat/StreamStatusBanner/doc'
94
+ import { MentionInputDoc } from '../components/Chat/MentionInput/doc'
95
+ import { ThinkingBlockDoc } from '../components/Chat/ThinkingBlock/doc'
92
96
  import { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
93
97
  import { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
94
98
  import { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
@@ -157,6 +161,8 @@ export const componentDocs: Record<string, ComponentDoc> = {
157
161
  RunStatusBar: RunStatusBarDoc,
158
162
  SessionSidebar: SessionSidebarDoc,
159
163
  StreamStatusBanner: StreamStatusBannerDoc,
164
+ MentionInput: MentionInputDoc,
165
+ ThinkingBlock: ThinkingBlockDoc,
160
166
  AttachmentPreviewModal: AttachmentPreviewModalDoc,
161
167
  DocumentSummaryList: DocumentSummaryListDoc,
162
168
  MessageAttachmentList: MessageAttachmentListDoc,