@farris/x-ui 0.0.1
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.
- package/app-preview/index.d.ts +8 -0
- package/app-preview/src/app-preview.component.d.ts +22 -0
- package/app-preview/src/app-preview.props.d.ts +14 -0
- package/app-preview/src/types.d.ts +37 -0
- package/attachment-preview/index.d.ts +8 -0
- package/attachment-preview/src/attachment-preview.component.d.ts +20 -0
- package/attachment-preview/src/attachment-preview.props.d.ts +13 -0
- package/attachment-preview/src/types.d.ts +27 -0
- package/bubble/index.d.ts +10 -0
- package/bubble/src/bubble.component.d.ts +119 -0
- package/bubble/src/bubble.props.d.ts +79 -0
- package/bubble/src/components/action/bubble-action.component.d.ts +11 -0
- package/bubble/src/components/action/bubble-action.props.d.ts +15 -0
- package/bubble/src/components/attachment/bubble-attachment.component.d.ts +16 -0
- package/bubble/src/components/attachment/bubble-attachment.props.d.ts +18 -0
- package/bubble/src/components/bubble-think/bubble-think.component.d.ts +10 -0
- package/bubble/src/components/bubble-think/bubble-think.props.d.ts +16 -0
- package/bubble/src/components/bubble-thought-chain/bubble-thought-chain.component.d.ts +6 -0
- package/bubble/src/components/bubble-thought-chain/bubble-thought-chain.props.d.ts +9 -0
- package/bubble/src/components/embedded-content/file/file-embedded-content.component.d.ts +16 -0
- package/bubble/src/components/embedded-content/file/file-embedded-content.props.d.ts +26 -0
- package/bubble/src/components/embedded-content/page/page-embedded-content.component.d.ts +13 -0
- package/bubble/src/components/embedded-content/page/page-embedded-content.props.d.ts +20 -0
- package/bubble/src/components/header/content-header.component.d.ts +6 -0
- package/bubble/src/components/header/sender-header.component.d.ts +6 -0
- package/bubble/src/components/text-content/text-content.component.d.ts +20 -0
- package/bubble/src/components/text-content/text-content.props.d.ts +32 -0
- package/bubble/src/composition/types.d.ts +153 -0
- package/bubble/src/composition/use-attachment.d.ts +5 -0
- package/bubble/src/composition/use-embedded-content.d.ts +12 -0
- package/bubble/src/composition/use-widget-content.d.ts +47 -0
- package/bubble/test/bubble.spec.d.ts +1 -0
- package/carousel/index.d.ts +10 -0
- package/carousel/src/carousel.component.d.ts +169 -0
- package/carousel/src/carousel.props.d.ts +94 -0
- package/carousel/src/components/carousel-item.component.d.ts +61 -0
- package/carousel/src/components/carousel-item.props.d.ts +35 -0
- package/carousel/src/composition/type.d.ts +27 -0
- package/carousel/src/composition/use-carousel.d.ts +23 -0
- package/carousel/test/carousel.spec.d.ts +1 -0
- package/chat-preview/index.d.ts +13 -0
- package/chat-preview/src/agent-workbench-sdk.d.ts +61 -0
- package/chat-preview/src/chat-preview.component.d.ts +34 -0
- package/chat-preview/src/chat-preview.props.d.ts +19 -0
- package/chat-preview/src/preview-bridge-protocol.d.ts +22 -0
- package/chat-preview/src/preview-chrome-sdk.d.ts +28 -0
- package/chat-preview/src/preview-iframe-sdk.d.ts +6 -0
- package/coding/index.d.ts +8 -0
- package/coding/src/coding.component.d.ts +12 -0
- package/coding/src/coding.props.d.ts +10 -0
- package/coding/src/types.d.ts +23 -0
- package/common/index.d.ts +7 -0
- package/common/src/runtime-attachment-download.d.ts +16 -0
- package/common/src/types.d.ts +2 -0
- package/common/src/use-appearance.d.ts +14 -0
- package/common/src/use-render.d.ts +15 -0
- package/common/src/use-sequential-streaming.d.ts +19 -0
- package/common/src/use-streaming-output.d.ts +18 -0
- package/common/src/use-timer.d.ts +7 -0
- package/components.d.ts +40 -0
- package/confirm-dialog/index.d.ts +7 -0
- package/confirm-dialog/src/confirm-dialog.component.d.ts +38 -0
- package/confirm-dialog/src/confirm-dialog.props.d.ts +33 -0
- package/dynamic-component/index.d.ts +7 -0
- package/dynamic-component/src/composition/dynamic-component-registry.d.ts +9 -0
- package/dynamic-component/src/composition/types.d.ts +18 -0
- package/dynamic-component/src/composition/use-dynamic-component-parser.d.ts +14 -0
- package/dynamic-component/src/dynamic-component.component.d.ts +15 -0
- package/enterprise-cloud/index.d.ts +16 -0
- package/enterprise-cloud/src/agent-thinking.component.d.ts +15 -0
- package/enterprise-cloud/src/attachment-file.component.d.ts +15 -0
- package/enterprise-cloud/src/error-reminder.component.d.ts +15 -0
- package/enterprise-cloud/src/hitl-question.component.d.ts +43 -0
- package/enterprise-cloud/src/input-recommend.component.d.ts +25 -0
- package/enterprise-cloud/src/link-card.component.d.ts +15 -0
- package/enterprise-cloud/src/reference-sources.component.d.ts +15 -0
- package/enterprise-cloud/src/types.d.ts +155 -0
- package/enterprise-cloud/src/unknown-enterprise.component.d.ts +15 -0
- package/enterprise-cloud/src/user-auth.component.d.ts +25 -0
- package/farris.x-ui.esm.js +13185 -0
- package/farris.x-ui.umd.cjs +108 -0
- package/file-operation/index.d.ts +8 -0
- package/file-operation/src/file-operation.component.d.ts +12 -0
- package/file-operation/src/file-operation.props.d.ts +10 -0
- package/file-operation/src/types.d.ts +30 -0
- package/generate-process/index.d.ts +7 -0
- package/generate-process/src/composition/type.d.ts +1 -0
- package/generate-process/src/generate-process.component.d.ts +41 -0
- package/generate-process/src/generate-process.props.d.ts +47 -0
- package/history/index.d.ts +7 -0
- package/history/src/composition/type.d.ts +8 -0
- package/history/src/history.component.d.ts +15 -0
- package/history/src/history.props.d.ts +14 -0
- package/index.css +1 -0
- package/index.d.ts +8 -0
- package/markdown/index.d.ts +8 -0
- package/markdown/src/markdown.component.d.ts +12 -0
- package/markdown/src/markdown.props.d.ts +10 -0
- package/markdown/src/types.d.ts +8 -0
- package/markdown-preview/index.d.ts +7 -0
- package/markdown-preview/src/markdown-preview.component.d.ts +9 -0
- package/markdown-preview/src/markdown-preview.props.d.ts +9 -0
- package/package.json +19 -0
- package/prompts/index.d.ts +9 -0
- package/prompts/src/components/prompt.component.d.ts +131 -0
- package/prompts/src/components/prompt.props.d.ts +79 -0
- package/prompts/src/composition/type.d.ts +34 -0
- package/prompts/src/prompts.component.d.ts +46 -0
- package/prompts/src/prompts.props.d.ts +61 -0
- package/started-todo/index.d.ts +8 -0
- package/started-todo/src/started-todo.component.d.ts +108 -0
- package/started-todo/src/started-todo.props.d.ts +54 -0
- package/started-todo/src/types.d.ts +9 -0
- package/suggestion/index.d.ts +7 -0
- package/suggestion/src/composition/type.d.ts +6 -0
- package/suggestion/src/suggestion.component.d.ts +37 -0
- package/suggestion/src/suggestion.props.d.ts +34 -0
- package/todo/index.d.ts +12 -0
- package/todo/src/components/todo-list-item-view.component.d.ts +112 -0
- package/todo/src/components/todo-list-item-view.props.d.ts +57 -0
- package/todo/src/components/todo-list-view.d.ts +17 -0
- package/todo/src/components/todo-list-view.props.d.ts +11 -0
- package/todo/src/composition/status-icon.d.ts +6 -0
- package/todo/src/composition/type.d.ts +32 -0
- package/todo/src/todo.component.d.ts +41 -0
- package/todo/src/todo.props.d.ts +24 -0
- package/tool-use/index.d.ts +6 -0
- package/tool-use/src/tool-use.component.d.ts +19 -0
- package/welcome/index.d.ts +7 -0
- package/welcome/src/composition/type.d.ts +1 -0
- package/welcome/src/welcome.component.d.ts +35 -0
- package/welcome/src/welcome.props.d.ts +30 -0
- package/welcome/test/welcome.spec.d.ts +1 -0
- package/widget-container/index.d.ts +8 -0
- package/widget-container/src/composition/class/stage.class.d.ts +10 -0
- package/widget-container/src/composition/types.d.ts +24 -0
- package/widget-container/src/composition/use-deep-equal.d.ts +3 -0
- package/widget-container/src/composition/use-load-widget.d.ts +5 -0
- package/widget-container/src/widget-container.component.d.ts +28 -0
- package/widget-container/src/widget-container.props.d.ts +35 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { DetailViewMode, TodoItemStatus, TodoWorkItem } from '../../../todo';
|
|
3
|
+
import { MessageContentUserAuth, MessageContentToolUse } from '../../../enterprise-cloud/src/types';
|
|
4
|
+
import { MessageContentAppPreview } from '../../../app-preview/src/types';
|
|
5
|
+
|
|
6
|
+
/** 气泡消息文本格式化类型 */
|
|
7
|
+
export type BubbleTextFormatType = 'plain' | 'markdown';
|
|
8
|
+
/** 复合气泡内、与正文同壳的按钮 /预览块(按网关块顺序追加) */
|
|
9
|
+
export type BubbleCompositeInlineBlock = {
|
|
10
|
+
kind: 'userAuth';
|
|
11
|
+
content: MessageContentUserAuth;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'appPreview';
|
|
14
|
+
content: MessageContentAppPreview;
|
|
15
|
+
};
|
|
16
|
+
/** 文本类型消息内容 */
|
|
17
|
+
export interface BubbleContent {
|
|
18
|
+
type?: 'text';
|
|
19
|
+
text: string;
|
|
20
|
+
textFormat?: BubbleTextFormatType;
|
|
21
|
+
/** 正文与 footer 之间按序渲染的网关块(如 request-run 按钮、app-preview) */
|
|
22
|
+
compositeInlineBlocks?: BubbleCompositeInlineBlock[];
|
|
23
|
+
avatar?: string;
|
|
24
|
+
sender?: string;
|
|
25
|
+
/** 一级标题 */
|
|
26
|
+
title?: string;
|
|
27
|
+
/** 二级标题 */
|
|
28
|
+
subtitle?: string;
|
|
29
|
+
/** 思维链 */
|
|
30
|
+
startedTodo?: ThoughtChainContent;
|
|
31
|
+
/** 思考过程 */
|
|
32
|
+
thinkingContent?: ThinkContent;
|
|
33
|
+
/**
|
|
34
|
+
* 与网关块顺序一致:在正文 markdown **之前** 渲染的工具调用卡片(`agent/tool-use`),
|
|
35
|
+
* 避免与 `compositeTailRender`(在正文之后)顺序错位。
|
|
36
|
+
*/
|
|
37
|
+
toolUseAboveText?: MessageContentToolUse[];
|
|
38
|
+
/**
|
|
39
|
+
* 当思考与工具交错出现时,替代 {@link thinkingContent} + {@link toolUseAboveText} 的「顶栏思考 + 工具组堆叠」,
|
|
40
|
+
* 按网关块顺序依次渲染正文 markdown **之前** 的块(思考/工具/思维链等)。
|
|
41
|
+
*/
|
|
42
|
+
compositeOrderedBeforeMarkdownRender?: () => VNode;
|
|
43
|
+
/** 结构化维度内容 */
|
|
44
|
+
structuredContent?: StructuredContent;
|
|
45
|
+
/** 底部内容 */
|
|
46
|
+
footerContent?: EmbeddedContent;
|
|
47
|
+
}
|
|
48
|
+
/** 消息嵌入式内容类型 */
|
|
49
|
+
export type EmbeddedContentType = 'page' | 'file' | 'template';
|
|
50
|
+
/** 消息嵌入式内容 */
|
|
51
|
+
export interface EmbeddedContent {
|
|
52
|
+
/** 内容类型 */
|
|
53
|
+
type: EmbeddedContentType;
|
|
54
|
+
/** 展示外挂页面 */
|
|
55
|
+
pageUrl?: string;
|
|
56
|
+
/** 展示附件 */
|
|
57
|
+
fileContent?: Attachment;
|
|
58
|
+
/** 展示自定义模板 */
|
|
59
|
+
template?: () => VNode | null;
|
|
60
|
+
/** 支持固定值(如 "200px")或百分比(如 "80%") */
|
|
61
|
+
width?: string;
|
|
62
|
+
height?: number;
|
|
63
|
+
}
|
|
64
|
+
/** 结构化维度内容 */
|
|
65
|
+
export interface StructuredContent {
|
|
66
|
+
/** 维度列表 */
|
|
67
|
+
sections: BubbleSection[];
|
|
68
|
+
/** 是否显示分割线 */
|
|
69
|
+
showDivider?: boolean;
|
|
70
|
+
/** 分割线下方区域的内容(VNode 模式) */
|
|
71
|
+
footerTemplate?: (show: boolean) => VNode;
|
|
72
|
+
/** 外部 HTML URL(iframe 模式),优先级高于 footerTemplate */
|
|
73
|
+
footerUrl?: string;
|
|
74
|
+
/** iframe 高度,仅 footerUrl 模式有效 */
|
|
75
|
+
footerHeight?: number;
|
|
76
|
+
/** Markdown 文件信息 */
|
|
77
|
+
footerFile?: Attachment;
|
|
78
|
+
/** Footer 区域宽度,支持固定值(如 "200px")或百分比(如 "80%") */
|
|
79
|
+
footerWidth?: string;
|
|
80
|
+
}
|
|
81
|
+
/** 维度(Section) */
|
|
82
|
+
export interface BubbleSection {
|
|
83
|
+
/** 维度标题 */
|
|
84
|
+
title?: string;
|
|
85
|
+
/** 标题左侧 icon 图片地址或类名 */
|
|
86
|
+
icon?: string;
|
|
87
|
+
/** icon 样式(内联样式) */
|
|
88
|
+
iconStyle?: string;
|
|
89
|
+
/** 次级项列表 */
|
|
90
|
+
items?: BubbleSectionItem[];
|
|
91
|
+
/** 是否显示上下分割线 */
|
|
92
|
+
showDivider?: boolean;
|
|
93
|
+
}
|
|
94
|
+
/** 维度次级项 */
|
|
95
|
+
export interface BubbleSectionItem {
|
|
96
|
+
/** 次级项标签,content为string时有效 */
|
|
97
|
+
label?: string;
|
|
98
|
+
/** 次级项内容(文本或单个嵌入式内容) */
|
|
99
|
+
content?: string | EmbeddedContent;
|
|
100
|
+
}
|
|
101
|
+
/** 思维链 */
|
|
102
|
+
export interface ThoughtChainContent {
|
|
103
|
+
status: TodoItemStatus;
|
|
104
|
+
message: string;
|
|
105
|
+
doneMessage?: string;
|
|
106
|
+
todoList: TodoWorkItem[];
|
|
107
|
+
detailViewMode: DetailViewMode;
|
|
108
|
+
/**
|
|
109
|
+
* 为 true 时保留 `todoList` 各项的 `status`(服务端快照),不强行改为 Working。
|
|
110
|
+
* 用于网关 `StartedToDo` 在 FXBubble 内展示。
|
|
111
|
+
*/
|
|
112
|
+
preserveStatuses?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* 为 false 时首行标题旁不展示状态圆点(`StatusIcon`)。
|
|
115
|
+
* 用于 `Todo` 规划标题:`message` 仅为文案,与 `taskList` 根任务状态无关,避免 `NotStart` 被画成「未完成任务」。
|
|
116
|
+
*/
|
|
117
|
+
showHeaderStatusIcon?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/** 思考过程 */
|
|
120
|
+
export interface ThinkContent {
|
|
121
|
+
/** 思考过程标题 */
|
|
122
|
+
title: string;
|
|
123
|
+
/** 思考过程内容 */
|
|
124
|
+
content: string;
|
|
125
|
+
/**
|
|
126
|
+
* 为 true 时初始即为完成态(如 `AgentThinking.streamStatus === 'end'`),用于网关快照在 FXBubble 内展示。
|
|
127
|
+
*/
|
|
128
|
+
completed?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export type ThinkState = 'pending' | 'completed';
|
|
131
|
+
/** 附件信息 */
|
|
132
|
+
export interface Attachment {
|
|
133
|
+
/** 附件类型,如 'pdf', 'doc', 'xls', 'ppt', 'txt', 'md' 等 */
|
|
134
|
+
type: string;
|
|
135
|
+
/** 附件名称 */
|
|
136
|
+
name: string;
|
|
137
|
+
/**
|
|
138
|
+
* 运行时附件的文件 ID(与 `POST /api/runtime/attachment` 返回一致),用于
|
|
139
|
+
* `GET /api/runtime/attachment/{fileId}/download`。
|
|
140
|
+
*/
|
|
141
|
+
fileId?: string;
|
|
142
|
+
/** 附件大小,单位字节 */
|
|
143
|
+
size?: number;
|
|
144
|
+
/** 预览附件,可外挂页面展示自定义内容 */
|
|
145
|
+
url?: string;
|
|
146
|
+
/** 是否全屏预览 */
|
|
147
|
+
fullScreenPreview?: boolean;
|
|
148
|
+
/** 附件为md文件时,支持预览 */
|
|
149
|
+
content?: string;
|
|
150
|
+
/** 是否显示预览按钮 */
|
|
151
|
+
showPreview?: boolean;
|
|
152
|
+
}
|
|
153
|
+
export type AppearanceType = "root" | "header" | "content" | "footer";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { Attachment, EmbeddedContent } from './types';
|
|
3
|
+
|
|
4
|
+
export interface EmbeddedContentRenderContext {
|
|
5
|
+
onPreviewFile?: (attachment: Attachment) => void;
|
|
6
|
+
onBatchPreviewFile?: (attachments: Attachment[]) => void;
|
|
7
|
+
onNavigate?: (url: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export default function useEmbeddedContent(): {
|
|
10
|
+
renderFileEmbeddedContent: (content: EmbeddedContent, context: EmbeddedContentRenderContext) => VNode;
|
|
11
|
+
renderPageEmbeddedContent: (content: EmbeddedContent, context: EmbeddedContentRenderContext) => VNode;
|
|
12
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* use-widget-content Hook
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* 用于解析和处理包含 assistant-widget 代码块的文本内容。
|
|
6
|
+
* 主要处理流式渲染场景下文本被截断的情况,支持识别完整和不完整的 widget 结构。
|
|
7
|
+
*
|
|
8
|
+
* @支持格式
|
|
9
|
+
* - 标准格式:``` assistant-widget {...} ```
|
|
10
|
+
* - 含换行格式:```\n\n assistant-widget {...} ``` (换行符会被自动规范化)
|
|
11
|
+
*
|
|
12
|
+
* @usage
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { formatDisplayText, parseAssistantWidget, getWidgetImplOptions, isWidgetBlock } from './use-widget-content';
|
|
15
|
+
*
|
|
16
|
+
* // 1. 分割含 widget 的文本为多个部分
|
|
17
|
+
* const parts = formatDisplayText('Hello ``` assistant-widget {...} ``` World');
|
|
18
|
+
*
|
|
19
|
+
* // 2. 判断文本是否为 widget 代码块
|
|
20
|
+
* const isWidget = isWidgetBlock('``` assistant-widget {...} ```'); // true
|
|
21
|
+
*
|
|
22
|
+
* // 3. 解析 widget JSON 数据
|
|
23
|
+
* const widgetData = parseAssistantWidget('``` assistant-widget\n{...}\n```');
|
|
24
|
+
*
|
|
25
|
+
* // 4. 获取 widget 实现选项
|
|
26
|
+
* const options = getWidgetImplOptions('``` assistant-widget\n{"renderer":{"widgetImplOptions":{...}}}\n```');
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
* - `formatDisplayText`: 将含 widget 的文本分割为数组
|
|
31
|
+
* - `isWidgetBlock`: 判断文本是否为完整/不完整的 widget 代码块
|
|
32
|
+
* - `parseAssistantWidget`: 解析 widget 代码块为 JSON 对象
|
|
33
|
+
* - `getWidgetImplOptions`: 从 widget 数据提取 renderer.widgetImplOptions
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* 判断文本是否为 widget 代码块
|
|
37
|
+
* 支持标准格式和不完整格式(流式渲染中途被截断的情况)
|
|
38
|
+
*/
|
|
39
|
+
export declare function isWidgetBlock(text: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 解析 displayText,将包含 assistant-widget 代码块的内容分割成多个部分
|
|
42
|
+
* 支持完整和不完整的 assistant-widget 结构
|
|
43
|
+
* 支持 ``` 后紧跟换行符 + 空格 + assistant-widget 的格式
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatDisplayText(displayText: string): string[];
|
|
46
|
+
export declare function parseAssistantWidget(input: string): any;
|
|
47
|
+
export declare function getWidgetImplOptions(input: string): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { default as FXCarousel } from './src/carousel.component';
|
|
3
|
+
import { default as FXCarouselItem } from './src/components/carousel-item.component';
|
|
4
|
+
|
|
5
|
+
export * from './src/carousel.props';
|
|
6
|
+
export * from './src/components/carousel-item.props';
|
|
7
|
+
export * from './src/composition/type';
|
|
8
|
+
export { FXCarousel, FXCarouselItem };
|
|
9
|
+
declare const _default: typeof FXCarousel & Plugin;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { CarouselItemType } from './composition/type';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
items: {
|
|
5
|
+
type: import('vue').PropType<CarouselItemType[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
direction: {
|
|
13
|
+
type: import('vue').PropType<import('..').CarouselDirection>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
autoplay: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
interval: {
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
loop: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
trigger: {
|
|
29
|
+
type: import('vue').PropType<import('..').CarouselTrigger>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
indicatorPosition: {
|
|
33
|
+
type: import('vue').PropType<import('..').CarouselIndicatorPosition>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
arrowVisibility: {
|
|
37
|
+
type: import('vue').PropType<import('..').CarouselArrowVisibility>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
showIndicator: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
showArrow: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
showInfo: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
height: {
|
|
53
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
styles: {
|
|
57
|
+
type: import('vue').PropType<Record<import('..').CarouselAppearanceType, import('vue').CSSProperties>>;
|
|
58
|
+
default: () => {};
|
|
59
|
+
};
|
|
60
|
+
classNames: {
|
|
61
|
+
type: import('vue').PropType<Record<import('..').CarouselAppearanceType, string | string[] | Record<string, boolean>>>;
|
|
62
|
+
default: () => {};
|
|
63
|
+
};
|
|
64
|
+
customClass: {
|
|
65
|
+
type: import('vue').PropType<string | string[] | Record<string, boolean>>;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
customStyle: {
|
|
69
|
+
type: import('vue').PropType<import('vue').CSSProperties | string>;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
buttonPosition: {
|
|
73
|
+
type: import('vue').PropType<"inner" | "outer">;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, "change" | "update:modelValue" | "item-click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
77
|
+
items: {
|
|
78
|
+
type: import('vue').PropType<CarouselItemType[]>;
|
|
79
|
+
default: () => never[];
|
|
80
|
+
};
|
|
81
|
+
modelValue: {
|
|
82
|
+
type: NumberConstructor;
|
|
83
|
+
default: number;
|
|
84
|
+
};
|
|
85
|
+
direction: {
|
|
86
|
+
type: import('vue').PropType<import('..').CarouselDirection>;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
autoplay: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
|
+
interval: {
|
|
94
|
+
type: NumberConstructor;
|
|
95
|
+
default: number;
|
|
96
|
+
};
|
|
97
|
+
loop: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
trigger: {
|
|
102
|
+
type: import('vue').PropType<import('..').CarouselTrigger>;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
indicatorPosition: {
|
|
106
|
+
type: import('vue').PropType<import('..').CarouselIndicatorPosition>;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
arrowVisibility: {
|
|
110
|
+
type: import('vue').PropType<import('..').CarouselArrowVisibility>;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
showIndicator: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: boolean;
|
|
116
|
+
};
|
|
117
|
+
showArrow: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
121
|
+
showInfo: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
height: {
|
|
126
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
127
|
+
default: string;
|
|
128
|
+
};
|
|
129
|
+
styles: {
|
|
130
|
+
type: import('vue').PropType<Record<import('..').CarouselAppearanceType, import('vue').CSSProperties>>;
|
|
131
|
+
default: () => {};
|
|
132
|
+
};
|
|
133
|
+
classNames: {
|
|
134
|
+
type: import('vue').PropType<Record<import('..').CarouselAppearanceType, string | string[] | Record<string, boolean>>>;
|
|
135
|
+
default: () => {};
|
|
136
|
+
};
|
|
137
|
+
customClass: {
|
|
138
|
+
type: import('vue').PropType<string | string[] | Record<string, boolean>>;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
customStyle: {
|
|
142
|
+
type: import('vue').PropType<import('vue').CSSProperties | string>;
|
|
143
|
+
default: string;
|
|
144
|
+
};
|
|
145
|
+
buttonPosition: {
|
|
146
|
+
type: import('vue').PropType<"inner" | "outer">;
|
|
147
|
+
default: string;
|
|
148
|
+
};
|
|
149
|
+
}>> & Readonly<{}>, {
|
|
150
|
+
items: CarouselItemType[];
|
|
151
|
+
customClass: string | string[] | Record<string, boolean>;
|
|
152
|
+
showArrow: boolean;
|
|
153
|
+
classNames: Record<import('..').CarouselAppearanceType, string | string[] | Record<string, boolean>>;
|
|
154
|
+
customStyle: string | import('vue').CSSProperties;
|
|
155
|
+
styles: Record<import('..').CarouselAppearanceType, import('vue').CSSProperties>;
|
|
156
|
+
height: string | number;
|
|
157
|
+
direction: import('..').CarouselDirection;
|
|
158
|
+
modelValue: number;
|
|
159
|
+
autoplay: boolean;
|
|
160
|
+
interval: number;
|
|
161
|
+
loop: boolean;
|
|
162
|
+
trigger: import('..').CarouselTrigger;
|
|
163
|
+
indicatorPosition: import('..').CarouselIndicatorPosition;
|
|
164
|
+
arrowVisibility: import('..').CarouselArrowVisibility;
|
|
165
|
+
showIndicator: boolean;
|
|
166
|
+
showInfo: boolean;
|
|
167
|
+
buttonPosition: "inner" | "outer";
|
|
168
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
169
|
+
export default _default;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
2
|
+
import { CarouselItemType, CarouselDirection, CarouselTrigger, CarouselIndicatorPosition, CarouselArrowVisibility, CarouselAppearanceType } from './composition/type';
|
|
3
|
+
|
|
4
|
+
export declare const carouselProps: {
|
|
5
|
+
/** 轮播项列表 */
|
|
6
|
+
items: {
|
|
7
|
+
type: PropType<CarouselItemType[]>;
|
|
8
|
+
default: () => never[];
|
|
9
|
+
};
|
|
10
|
+
/** 当前激活索引(受控) */
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
/** 轮播方向 */
|
|
16
|
+
direction: {
|
|
17
|
+
type: PropType<CarouselDirection>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
/** 是否自动播放 */
|
|
21
|
+
autoplay: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
/** 自动播放间隔(ms) */
|
|
26
|
+
interval: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
/** 是否循环 */
|
|
31
|
+
loop: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
/** 触发方式 */
|
|
36
|
+
trigger: {
|
|
37
|
+
type: PropType<CarouselTrigger>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
/** 指示器位置 */
|
|
41
|
+
indicatorPosition: {
|
|
42
|
+
type: PropType<CarouselIndicatorPosition>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
/** 箭头显示时机 */
|
|
46
|
+
arrowVisibility: {
|
|
47
|
+
type: PropType<CarouselArrowVisibility>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
/** 是否显示指示器 */
|
|
51
|
+
showIndicator: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
/** 是否显示箭头 */
|
|
56
|
+
showArrow: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
showInfo: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
/** 高度 */
|
|
65
|
+
height: {
|
|
66
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
/** 自定义样式 */
|
|
70
|
+
styles: {
|
|
71
|
+
type: PropType<Record<CarouselAppearanceType, CSSProperties>>;
|
|
72
|
+
default: () => {};
|
|
73
|
+
};
|
|
74
|
+
/** 自定义样式类名 */
|
|
75
|
+
classNames: {
|
|
76
|
+
type: PropType<Record<CarouselAppearanceType, string | string[] | Record<string, boolean>>>;
|
|
77
|
+
default: () => {};
|
|
78
|
+
};
|
|
79
|
+
/** 组件自定义样式类名 */
|
|
80
|
+
customClass: {
|
|
81
|
+
type: PropType<string | string[] | Record<string, boolean>>;
|
|
82
|
+
default: string;
|
|
83
|
+
};
|
|
84
|
+
/** 组件自定义样式 */
|
|
85
|
+
customStyle: {
|
|
86
|
+
type: PropType<CSSProperties | string>;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
buttonPosition: {
|
|
90
|
+
type: PropType<"inner" | "outer">;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export type CarouselProps = ExtractPropTypes<typeof carouselProps>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
item: {
|
|
3
|
+
type: import('vue').PropType<import('../..').CarouselItemType>;
|
|
4
|
+
default: () => {};
|
|
5
|
+
};
|
|
6
|
+
index: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
active: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
showInfo: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
styles: {
|
|
19
|
+
type: import('vue').PropType<Record<import('../..').CarouselAppearanceType, import('vue').CSSProperties>>;
|
|
20
|
+
default: () => {};
|
|
21
|
+
};
|
|
22
|
+
classNames: {
|
|
23
|
+
type: import('vue').PropType<Record<import('../..').CarouselAppearanceType, string | string[] | Record<string, boolean>>>;
|
|
24
|
+
default: () => {};
|
|
25
|
+
};
|
|
26
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
27
|
+
item: {
|
|
28
|
+
type: import('vue').PropType<import('../..').CarouselItemType>;
|
|
29
|
+
default: () => {};
|
|
30
|
+
};
|
|
31
|
+
index: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
active: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
showInfo: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
styles: {
|
|
44
|
+
type: import('vue').PropType<Record<import('../..').CarouselAppearanceType, import('vue').CSSProperties>>;
|
|
45
|
+
default: () => {};
|
|
46
|
+
};
|
|
47
|
+
classNames: {
|
|
48
|
+
type: import('vue').PropType<Record<import('../..').CarouselAppearanceType, string | string[] | Record<string, boolean>>>;
|
|
49
|
+
default: () => {};
|
|
50
|
+
};
|
|
51
|
+
}>> & Readonly<{
|
|
52
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
}>, {
|
|
54
|
+
classNames: Record<import('../..').CarouselAppearanceType, string | string[] | Record<string, boolean>>;
|
|
55
|
+
styles: Record<import('../..').CarouselAppearanceType, import('vue').CSSProperties>;
|
|
56
|
+
active: boolean;
|
|
57
|
+
item: import('../..').CarouselItemType;
|
|
58
|
+
showInfo: boolean;
|
|
59
|
+
index: number;
|
|
60
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
2
|
+
import { CarouselItemType, CarouselAppearanceType } from '../composition/type';
|
|
3
|
+
|
|
4
|
+
export declare const carouselItemProps: {
|
|
5
|
+
/** 轮播项数据 */
|
|
6
|
+
item: {
|
|
7
|
+
type: PropType<CarouselItemType>;
|
|
8
|
+
default: () => {};
|
|
9
|
+
};
|
|
10
|
+
/** 索引 */
|
|
11
|
+
index: {
|
|
12
|
+
type: NumberConstructor;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
/** 是否激活 */
|
|
16
|
+
active: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
showInfo: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
/** 自定义样式 */
|
|
25
|
+
styles: {
|
|
26
|
+
type: PropType<Record<CarouselAppearanceType, CSSProperties>>;
|
|
27
|
+
default: () => {};
|
|
28
|
+
};
|
|
29
|
+
/** 自定义样式类名 */
|
|
30
|
+
classNames: {
|
|
31
|
+
type: PropType<Record<CarouselAppearanceType, string | string[] | Record<string, boolean>>>;
|
|
32
|
+
default: () => {};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export type CarouselItemProps = ExtractPropTypes<typeof carouselItemProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface CarouselItemType {
|
|
4
|
+
/** 唯一标识 */
|
|
5
|
+
id?: string | number;
|
|
6
|
+
/** 图片 URL */
|
|
7
|
+
image?: string;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title?: string | VNode;
|
|
10
|
+
/** 描述 */
|
|
11
|
+
description?: string | VNode;
|
|
12
|
+
/** 自定义内容(slot) */
|
|
13
|
+
content?: VNode;
|
|
14
|
+
/** 链接地址 */
|
|
15
|
+
link?: string;
|
|
16
|
+
/** 是否禁用 */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type CarouselDirection = 'horizontal' | 'vertical';
|
|
20
|
+
export type CarouselTrigger = 'click' | 'hover';
|
|
21
|
+
export type CarouselIndicatorPosition = 'inside' | 'outside' | 'none';
|
|
22
|
+
export type CarouselArrowVisibility = 'always' | 'hover' | 'never';
|
|
23
|
+
export type CarouselAppearanceType = "root" | "container" | "track" | "item" | "arrow" | "arrowLeft" | "arrowRight" | "indicator" | "indicatorItem" | "indicatorItemActive" | "image" | "content" | "title" | "description";
|
|
24
|
+
export interface CarouselEvents {
|
|
25
|
+
"change": [index: number, prevIndex: number];
|
|
26
|
+
"item-click": [event: MouseEvent, item: CarouselItemType, index: number];
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CarouselItemType } from './type';
|
|
2
|
+
|
|
3
|
+
export interface UseCarouselOptions {
|
|
4
|
+
items: CarouselItemType[];
|
|
5
|
+
autoplay?: boolean;
|
|
6
|
+
interval?: number;
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
direction?: 'horizontal' | 'vertical';
|
|
9
|
+
}
|
|
10
|
+
export default function useCarousel(options: UseCarouselOptions): {
|
|
11
|
+
currentIndex: import('vue').Ref<number, number>;
|
|
12
|
+
totalItems: import('vue').ComputedRef<number>;
|
|
13
|
+
isSingleItem: import('vue').ComputedRef<boolean>;
|
|
14
|
+
trackStyle: import('vue').ComputedRef<{
|
|
15
|
+
transform: string;
|
|
16
|
+
transition: string;
|
|
17
|
+
}>;
|
|
18
|
+
goTo: (index: number) => void;
|
|
19
|
+
next: () => void;
|
|
20
|
+
prev: () => void;
|
|
21
|
+
handleMouseEnter: () => void;
|
|
22
|
+
handleMouseLeave: () => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Plugin } from 'vue';
|
|
2
|
+
import { default as FXChatPreview } from './src/chat-preview.component';
|
|
3
|
+
|
|
4
|
+
export * from './src/chat-preview.props';
|
|
5
|
+
export * from './src/preview-bridge-protocol';
|
|
6
|
+
export { AgentWorkbenchSDK, invokeAgentWorkbenchSdkApi, postAssistantViaAgentWorkbenchSDK, subscribeAssistantViaAgentWorkbenchSDK, sendChatMessageViaAgentWorkbenchSDK, type AgentWorkbenchSDKSubscribeOptions, type SendWorkbenchChatMessageOptions, registerPreviewChromeSdk, type PreviewChromeSdkHandlers, } from './src/agent-workbench-sdk';
|
|
7
|
+
/** @deprecated 请使用 {@link AgentWorkbenchSDK.subscribe} */
|
|
8
|
+
export { createPreviewIframeSdk } from './src/preview-iframe-sdk';
|
|
9
|
+
/** @deprecated */
|
|
10
|
+
export type { CreatePreviewIframeSdkOptions } from './src/preview-iframe-sdk';
|
|
11
|
+
export { FXChatPreview };
|
|
12
|
+
declare const _default: typeof FXChatPreview & Plugin;
|
|
13
|
+
export default _default;
|