@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.
Files changed (140) hide show
  1. package/app-preview/index.d.ts +8 -0
  2. package/app-preview/src/app-preview.component.d.ts +22 -0
  3. package/app-preview/src/app-preview.props.d.ts +14 -0
  4. package/app-preview/src/types.d.ts +37 -0
  5. package/attachment-preview/index.d.ts +8 -0
  6. package/attachment-preview/src/attachment-preview.component.d.ts +20 -0
  7. package/attachment-preview/src/attachment-preview.props.d.ts +13 -0
  8. package/attachment-preview/src/types.d.ts +27 -0
  9. package/bubble/index.d.ts +10 -0
  10. package/bubble/src/bubble.component.d.ts +119 -0
  11. package/bubble/src/bubble.props.d.ts +79 -0
  12. package/bubble/src/components/action/bubble-action.component.d.ts +11 -0
  13. package/bubble/src/components/action/bubble-action.props.d.ts +15 -0
  14. package/bubble/src/components/attachment/bubble-attachment.component.d.ts +16 -0
  15. package/bubble/src/components/attachment/bubble-attachment.props.d.ts +18 -0
  16. package/bubble/src/components/bubble-think/bubble-think.component.d.ts +10 -0
  17. package/bubble/src/components/bubble-think/bubble-think.props.d.ts +16 -0
  18. package/bubble/src/components/bubble-thought-chain/bubble-thought-chain.component.d.ts +6 -0
  19. package/bubble/src/components/bubble-thought-chain/bubble-thought-chain.props.d.ts +9 -0
  20. package/bubble/src/components/embedded-content/file/file-embedded-content.component.d.ts +16 -0
  21. package/bubble/src/components/embedded-content/file/file-embedded-content.props.d.ts +26 -0
  22. package/bubble/src/components/embedded-content/page/page-embedded-content.component.d.ts +13 -0
  23. package/bubble/src/components/embedded-content/page/page-embedded-content.props.d.ts +20 -0
  24. package/bubble/src/components/header/content-header.component.d.ts +6 -0
  25. package/bubble/src/components/header/sender-header.component.d.ts +6 -0
  26. package/bubble/src/components/text-content/text-content.component.d.ts +20 -0
  27. package/bubble/src/components/text-content/text-content.props.d.ts +32 -0
  28. package/bubble/src/composition/types.d.ts +153 -0
  29. package/bubble/src/composition/use-attachment.d.ts +5 -0
  30. package/bubble/src/composition/use-embedded-content.d.ts +12 -0
  31. package/bubble/src/composition/use-widget-content.d.ts +47 -0
  32. package/bubble/test/bubble.spec.d.ts +1 -0
  33. package/carousel/index.d.ts +10 -0
  34. package/carousel/src/carousel.component.d.ts +169 -0
  35. package/carousel/src/carousel.props.d.ts +94 -0
  36. package/carousel/src/components/carousel-item.component.d.ts +61 -0
  37. package/carousel/src/components/carousel-item.props.d.ts +35 -0
  38. package/carousel/src/composition/type.d.ts +27 -0
  39. package/carousel/src/composition/use-carousel.d.ts +23 -0
  40. package/carousel/test/carousel.spec.d.ts +1 -0
  41. package/chat-preview/index.d.ts +13 -0
  42. package/chat-preview/src/agent-workbench-sdk.d.ts +61 -0
  43. package/chat-preview/src/chat-preview.component.d.ts +34 -0
  44. package/chat-preview/src/chat-preview.props.d.ts +19 -0
  45. package/chat-preview/src/preview-bridge-protocol.d.ts +22 -0
  46. package/chat-preview/src/preview-chrome-sdk.d.ts +28 -0
  47. package/chat-preview/src/preview-iframe-sdk.d.ts +6 -0
  48. package/coding/index.d.ts +8 -0
  49. package/coding/src/coding.component.d.ts +12 -0
  50. package/coding/src/coding.props.d.ts +10 -0
  51. package/coding/src/types.d.ts +23 -0
  52. package/common/index.d.ts +7 -0
  53. package/common/src/runtime-attachment-download.d.ts +16 -0
  54. package/common/src/types.d.ts +2 -0
  55. package/common/src/use-appearance.d.ts +14 -0
  56. package/common/src/use-render.d.ts +15 -0
  57. package/common/src/use-sequential-streaming.d.ts +19 -0
  58. package/common/src/use-streaming-output.d.ts +18 -0
  59. package/common/src/use-timer.d.ts +7 -0
  60. package/components.d.ts +40 -0
  61. package/confirm-dialog/index.d.ts +7 -0
  62. package/confirm-dialog/src/confirm-dialog.component.d.ts +38 -0
  63. package/confirm-dialog/src/confirm-dialog.props.d.ts +33 -0
  64. package/dynamic-component/index.d.ts +7 -0
  65. package/dynamic-component/src/composition/dynamic-component-registry.d.ts +9 -0
  66. package/dynamic-component/src/composition/types.d.ts +18 -0
  67. package/dynamic-component/src/composition/use-dynamic-component-parser.d.ts +14 -0
  68. package/dynamic-component/src/dynamic-component.component.d.ts +15 -0
  69. package/enterprise-cloud/index.d.ts +16 -0
  70. package/enterprise-cloud/src/agent-thinking.component.d.ts +15 -0
  71. package/enterprise-cloud/src/attachment-file.component.d.ts +15 -0
  72. package/enterprise-cloud/src/error-reminder.component.d.ts +15 -0
  73. package/enterprise-cloud/src/hitl-question.component.d.ts +43 -0
  74. package/enterprise-cloud/src/input-recommend.component.d.ts +25 -0
  75. package/enterprise-cloud/src/link-card.component.d.ts +15 -0
  76. package/enterprise-cloud/src/reference-sources.component.d.ts +15 -0
  77. package/enterprise-cloud/src/types.d.ts +155 -0
  78. package/enterprise-cloud/src/unknown-enterprise.component.d.ts +15 -0
  79. package/enterprise-cloud/src/user-auth.component.d.ts +25 -0
  80. package/farris.x-ui.esm.js +13185 -0
  81. package/farris.x-ui.umd.cjs +108 -0
  82. package/file-operation/index.d.ts +8 -0
  83. package/file-operation/src/file-operation.component.d.ts +12 -0
  84. package/file-operation/src/file-operation.props.d.ts +10 -0
  85. package/file-operation/src/types.d.ts +30 -0
  86. package/generate-process/index.d.ts +7 -0
  87. package/generate-process/src/composition/type.d.ts +1 -0
  88. package/generate-process/src/generate-process.component.d.ts +41 -0
  89. package/generate-process/src/generate-process.props.d.ts +47 -0
  90. package/history/index.d.ts +7 -0
  91. package/history/src/composition/type.d.ts +8 -0
  92. package/history/src/history.component.d.ts +15 -0
  93. package/history/src/history.props.d.ts +14 -0
  94. package/index.css +1 -0
  95. package/index.d.ts +8 -0
  96. package/markdown/index.d.ts +8 -0
  97. package/markdown/src/markdown.component.d.ts +12 -0
  98. package/markdown/src/markdown.props.d.ts +10 -0
  99. package/markdown/src/types.d.ts +8 -0
  100. package/markdown-preview/index.d.ts +7 -0
  101. package/markdown-preview/src/markdown-preview.component.d.ts +9 -0
  102. package/markdown-preview/src/markdown-preview.props.d.ts +9 -0
  103. package/package.json +19 -0
  104. package/prompts/index.d.ts +9 -0
  105. package/prompts/src/components/prompt.component.d.ts +131 -0
  106. package/prompts/src/components/prompt.props.d.ts +79 -0
  107. package/prompts/src/composition/type.d.ts +34 -0
  108. package/prompts/src/prompts.component.d.ts +46 -0
  109. package/prompts/src/prompts.props.d.ts +61 -0
  110. package/started-todo/index.d.ts +8 -0
  111. package/started-todo/src/started-todo.component.d.ts +108 -0
  112. package/started-todo/src/started-todo.props.d.ts +54 -0
  113. package/started-todo/src/types.d.ts +9 -0
  114. package/suggestion/index.d.ts +7 -0
  115. package/suggestion/src/composition/type.d.ts +6 -0
  116. package/suggestion/src/suggestion.component.d.ts +37 -0
  117. package/suggestion/src/suggestion.props.d.ts +34 -0
  118. package/todo/index.d.ts +12 -0
  119. package/todo/src/components/todo-list-item-view.component.d.ts +112 -0
  120. package/todo/src/components/todo-list-item-view.props.d.ts +57 -0
  121. package/todo/src/components/todo-list-view.d.ts +17 -0
  122. package/todo/src/components/todo-list-view.props.d.ts +11 -0
  123. package/todo/src/composition/status-icon.d.ts +6 -0
  124. package/todo/src/composition/type.d.ts +32 -0
  125. package/todo/src/todo.component.d.ts +41 -0
  126. package/todo/src/todo.props.d.ts +24 -0
  127. package/tool-use/index.d.ts +6 -0
  128. package/tool-use/src/tool-use.component.d.ts +19 -0
  129. package/welcome/index.d.ts +7 -0
  130. package/welcome/src/composition/type.d.ts +1 -0
  131. package/welcome/src/welcome.component.d.ts +35 -0
  132. package/welcome/src/welcome.props.d.ts +30 -0
  133. package/welcome/test/welcome.spec.d.ts +1 -0
  134. package/widget-container/index.d.ts +8 -0
  135. package/widget-container/src/composition/class/stage.class.d.ts +10 -0
  136. package/widget-container/src/composition/types.d.ts +24 -0
  137. package/widget-container/src/composition/use-deep-equal.d.ts +3 -0
  138. package/widget-container/src/composition/use-load-widget.d.ts +5 -0
  139. package/widget-container/src/widget-container.component.d.ts +28 -0
  140. package/widget-container/src/widget-container.props.d.ts +35 -0
@@ -0,0 +1,61 @@
1
+ import { PreviewBridgeAssistantPayload } from './preview-bridge-protocol';
2
+
3
+ export type { PreviewChromeSdkHandlers } from './preview-chrome-sdk';
4
+ export { registerPreviewChromeSdk } from './preview-chrome-sdk';
5
+ export interface SendWorkbenchChatMessageOptions {
6
+ /**
7
+ * 接收 `message` 事件的窗口,默认 `window.top ?? window`(与 Workbench 挂载 `window.sendMessage` 时一致)。
8
+ */
9
+ target?: Window;
10
+ /** `postMessage` 第二参数,默认 `'*'` */
11
+ targetOrigin?: string;
12
+ }
13
+ /**
14
+ * 通过 Workbench 约定的 `postMessage` 向宿主注入一条「用户发送」文案(等价于控制台 `window.top.sendMessage(content)`)。
15
+ * 由 Workbench 内 `WorkbenchContent` 监听并转交 `handleSendMessage`;空串等行为与宿主实现一致。
16
+ */
17
+ export declare function sendChatMessageViaAgentWorkbenchSDK(content: string, options?: SendWorkbenchChatMessageOptions): boolean;
18
+ export interface AgentWorkbenchSDKSubscribeOptions {
19
+ /** 允许的父页面 origin;不传则只做结构校验,不校验 origin */
20
+ allowedParentOrigins?: string[];
21
+ /**
22
+ * 为 true(默认)时接受 `window.parent` 或 `window.top` 作为发送方。
23
+ * 嵌套 iframe 时顶层脚本常通过 top 持有子 iframe 引用并 postMessage,子页 `ev.source` 可能是 top。
24
+ */
25
+ allowTopAsSource?: boolean;
26
+ onAssistantMessage?: (payload: PreviewBridgeAssistantPayload) => void;
27
+ }
28
+ /**
29
+ * 父页 / 顶层壳:向预览 iframe 的 `contentWindow` 推送助手消息(与 {@link AgentWorkbenchSDK.subscribe} 协议一致)。
30
+ * @param targetWindow 一般为 `iframe.contentWindow`
31
+ * @param targetOrigin 须与 `postMessage` 规范一致,同源可传 `iframe.contentWindow.location.origin` 或从预览 URL 推导
32
+ * @returns 是否已成功调用 postMessage(不代表子页一定已监听)
33
+ */
34
+ export declare function postAssistantViaAgentWorkbenchSDK(targetWindow: Window, targetOrigin: string, payload: PreviewBridgeAssistantPayload): boolean;
35
+ /**
36
+ * 预览 iframe 内:订阅父页 / top 推送的助手消息。
37
+ * @returns 取消订阅函数
38
+ */
39
+ export declare function subscribeAssistantViaAgentWorkbenchSDK(options: AgentWorkbenchSDKSubscribeOptions): () => void;
40
+ /**
41
+ * Workbench 会话预览集成 SDK:postMessage 预览桥 + 分屏/双栏预览 imperative API(由 FXConversation `registerPreviewChromeSdk` 注入后 `showPreview` 等生效)。
42
+ */
43
+ export declare const AgentWorkbenchSDK: {
44
+ readonly subscribe: typeof subscribeAssistantViaAgentWorkbenchSDK;
45
+ readonly postAssistantMessage: typeof postAssistantViaAgentWorkbenchSDK;
46
+ /** 向 Workbench 宿主投递会话发送(postMessage invoke / sendMessage) */
47
+ readonly sendChatMessage: typeof sendChatMessageViaAgentWorkbenchSDK;
48
+ readonly showPreview: (config: import('../..').PreviewConfig) => void;
49
+ /** 双栏(左、右均为预览 iframe)时,将右侧换成新的 `previewConfig`;其它情况与 `showPreview` 一致。 */
50
+ readonly replaceRightPreview: (config: import('../..').PreviewConfig) => void;
51
+ readonly closePreviewPane: () => void;
52
+ readonly closeRightPreview: () => void;
53
+ readonly showFullScreenPreview: (config: import('../..').PreviewConfig) => void;
54
+ readonly closeFullScreenPreview: () => void;
55
+ readonly isPreviewLayoutActive: () => boolean;
56
+ };
57
+ /**
58
+ * 按方法名调用 {@link AgentWorkbenchSDK}(供网关 `InputRecommend` 等配置 `api` + `params`)。
59
+ * 未知方法或非函数成员会告警并返回 `undefined`。
60
+ */
61
+ export declare function invokeAgentWorkbenchSdkApi(api: string, params?: unknown[]): unknown;
@@ -0,0 +1,34 @@
1
+ import { PreviewConfig } from '../../app-preview';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ previewConfig: {
5
+ type: import('vue').PropType<PreviewConfig>;
6
+ default: () => {};
7
+ };
8
+ onClose: {
9
+ type: import('vue').PropType<() => void>;
10
+ default: () => void;
11
+ };
12
+ onIframeLoad: {
13
+ type: import('vue').PropType<() => void>;
14
+ default: () => void;
15
+ };
16
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
17
+ previewConfig: {
18
+ type: import('vue').PropType<PreviewConfig>;
19
+ default: () => {};
20
+ };
21
+ onClose: {
22
+ type: import('vue').PropType<() => void>;
23
+ default: () => void;
24
+ };
25
+ onIframeLoad: {
26
+ type: import('vue').PropType<() => void>;
27
+ default: () => void;
28
+ };
29
+ }>> & Readonly<{}>, {
30
+ onClose: () => void;
31
+ previewConfig: PreviewConfig;
32
+ onIframeLoad: () => void;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
34
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import { PreviewConfig } from '../../app-preview';
3
+
4
+ export declare const chatPreviewProps: {
5
+ previewConfig: {
6
+ type: PropType<PreviewConfig>;
7
+ default: () => {};
8
+ };
9
+ onClose: {
10
+ type: PropType<() => void>;
11
+ default: () => void;
12
+ };
13
+ /** iframe 文档 load 后回调(用于父页在子页监听器就绪后再 postMessage) */
14
+ onIframeLoad: {
15
+ type: PropType<() => void>;
16
+ default: () => void;
17
+ };
18
+ };
19
+ export type ChatPreviewProps = ExtractPropTypes<typeof chatPreviewProps>;
@@ -0,0 +1,22 @@
1
+ /** 父页 → iframe 的 postMessage 协议(与 iframe 侧 SDK 对齐) */
2
+ export declare const PREVIEW_BRIDGE_SOURCE: "farris-x-preview-bridge";
3
+ export declare const PREVIEW_BRIDGE_VERSION: 1;
4
+ export declare const PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT: "assistant.message";
5
+ export interface PreviewBridgeAssistantPayload {
6
+ messageId: string;
7
+ role: 'user' | 'assistant';
8
+ /** 助手消息的完整 content(与会话内结构一致,由 structured clone / 序列化承载) */
9
+ content: unknown;
10
+ }
11
+ export interface PreviewBridgeMessageEnvelope {
12
+ source: typeof PREVIEW_BRIDGE_SOURCE;
13
+ v: typeof PREVIEW_BRIDGE_VERSION;
14
+ type: typeof PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT;
15
+ payload: PreviewBridgeAssistantPayload;
16
+ }
17
+ /**
18
+ * postMessage 走 structured clone,Vue reactive/Proxy 可能无法克隆导致静默失败;
19
+ * 先 JSON 往返成纯对象再投递。
20
+ */
21
+ export declare function clonePreviewPayloadForPostMessage(payload: PreviewBridgeAssistantPayload): PreviewBridgeAssistantPayload;
22
+ export declare function isPreviewBridgeAssistantMessage(data: unknown): data is PreviewBridgeMessageEnvelope;
@@ -0,0 +1,28 @@
1
+ import { PreviewConfig } from '../../app-preview/src/types';
2
+
3
+ /** 由 FXConversation 注入,供 window 侧 imperative 调用(分屏 / 双栏预览) */
4
+ export interface PreviewChromeSdkHandlers {
5
+ showPreview?: (config: PreviewConfig) => void;
6
+ closePreviewPane?: () => void;
7
+ closeRightPreview?: () => void;
8
+ showFullScreenPreview?: (config: PreviewConfig) => void;
9
+ closeFullScreenPreview?: () => void;
10
+ }
11
+ /**
12
+ * 会话组件挂载时注册;卸载时执行返回函数。多实例时后进先出,避免前一个页面卸载清空后一个的句柄。
13
+ */
14
+ export declare function registerPreviewChromeSdk(handlers: PreviewChromeSdkHandlers): () => void;
15
+ /** 实现细节:对外由 `AgentWorkbenchSDK`(`agent-workbench-sdk.ts`)聚合暴露。 */
16
+ export declare const previewLayoutBridge: {
17
+ /**
18
+ * 打开或更新预览:右侧空 → 单栏右侧;仅右侧已有 → 双栏(旧右→左,新→右);**左右已有 → 只替换右侧 iframe**。
19
+ */
20
+ readonly showPreview: (config: PreviewConfig) => void;
21
+ /** 与 {@link previewLayoutBridge.showPreview} 相同,强调在双栏时只换右侧。 */
22
+ readonly replaceRightPreview: (config: PreviewConfig) => void;
23
+ readonly closePreviewPane: () => void;
24
+ readonly closeRightPreview: () => void;
25
+ readonly showFullScreenPreview: (config: PreviewConfig) => void;
26
+ readonly closeFullScreenPreview: () => void;
27
+ readonly isPreviewLayoutActive: () => boolean;
28
+ };
@@ -0,0 +1,6 @@
1
+ import { AgentWorkbenchSDKSubscribeOptions } from './agent-workbench-sdk';
2
+
3
+ export type CreatePreviewIframeSdkOptions = AgentWorkbenchSDKSubscribeOptions;
4
+ /** @deprecated 请使用 {@link AgentWorkbenchSDK.subscribe} */
5
+ export declare function createPreviewIframeSdk(options: CreatePreviewIframeSdkOptions): () => void;
6
+ export { postAssistantViaAgentWorkbenchSDK } from './agent-workbench-sdk';
@@ -0,0 +1,8 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as FXCoding } from './src/coding.component';
3
+
4
+ export * from './src/coding.props';
5
+ export * from './src/types';
6
+ export { FXCoding };
7
+ declare const _default: typeof FXCoding & Plugin;
8
+ export default _default;
@@ -0,0 +1,12 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ content: {
3
+ type: import('vue').PropType<import('./types').MessageContentCoding>;
4
+ required: boolean;
5
+ };
6
+ }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
+ content: {
8
+ type: import('vue').PropType<import('./types').MessageContentCoding>;
9
+ required: boolean;
10
+ };
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import { MessageContentCoding } from './types';
3
+
4
+ export declare const codingMessageProps: {
5
+ content: {
6
+ type: PropType<MessageContentCoding>;
7
+ required: boolean;
8
+ };
9
+ };
10
+ export type CodingMessageProps = ExtractPropTypes<typeof codingMessageProps>;
@@ -0,0 +1,23 @@
1
+ /** 代码内容:支持 Monaco Editor 与 diff 展示 */
2
+ export interface CodingCode {
3
+ /** 当前/修改后代码(Monaco modified model) */
4
+ value: string;
5
+ /** 原始代码(Monaco original model,存在时展示 diff) */
6
+ originalValue?: string;
7
+ /** 语言标识,如 typescript、javascript */
8
+ language?: string;
9
+ /** 新增行数,用于标题展示 */
10
+ addedLines: number;
11
+ /** 删除行数,用于标题展示 */
12
+ deletedLines: number;
13
+ }
14
+ /** 编码消息类型内容 */
15
+ export interface MessageContentCoding {
16
+ type: 'Coding';
17
+ /** 与网关 `body.type` 对账,演示用 `agent/code-change` */
18
+ standardType?: 'agent/code-change' | 'agent/coding' | string;
19
+ message: string;
20
+ fileIcon: string;
21
+ fileName: string;
22
+ code: CodingCode;
23
+ }
@@ -0,0 +1,7 @@
1
+ export * from './src/runtime-attachment-download';
2
+ export * from './src/use-appearance';
3
+ export * from './src/use-render';
4
+ export * from './src/use-streaming-output';
5
+ export * from './src/use-sequential-streaming';
6
+ export * from './src/use-timer';
7
+ export * from './src/types';
@@ -0,0 +1,16 @@
1
+ /** 与网关附件 REST 文档一致:`GET /api/runtime/attachment/{fileId}/download` */
2
+ /** 拼出完整下载 URL(含可选 `VITE_ATTACHMENT_API_BASE`) */
3
+ export declare function resolveRuntimeAttachmentDownloadUrl(fileId: string): string;
4
+ /** 从已是 runtime 形态的 download URL 中解析 fileId */
5
+ export declare function extractFileIdFromRuntimeDownloadUrl(url: string): string;
6
+ export interface RuntimeAttachmentLike {
7
+ fileId?: string;
8
+ url?: string;
9
+ }
10
+ /** 得到用于发起 GET 下载请求的 href(相对路径或绝对 URL) */
11
+ export declare function resolveHrefForAttachmentDownload(target: RuntimeAttachmentLike): string | undefined;
12
+ /**
13
+ * GET 二进制并触发浏览器下载;失败时降级为新开页。
14
+ * `fileName` 仅作锚点文件名提示,服务端 `Content-Disposition` 优先。
15
+ */
16
+ export declare function triggerAttachmentDownload(href: string, fileName: string): Promise<void>;
@@ -0,0 +1,2 @@
1
+ /** 输出模式:streaming-流式输出(打字机效果),full-完整输出 */
2
+ export type OutputMode = 'streaming' | 'full';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 根据传递过来已有的类对象和自定义类名,构造新的样式对象
3
+ * @param classObject
4
+ * @param customClass
5
+ * @returns
6
+ */
7
+ export declare function getCustomClass(classObject: Record<string, any>, customClass?: string | string[] | Record<string, boolean>): Record<string, any>;
8
+ /**
9
+ * 根据传递过来已有的style对象和自定义style,构造新的style对象
10
+ * @param styleObject
11
+ * @param customStyle
12
+ * @returns
13
+ */
14
+ export declare function getCustomStyle(styleObject: Record<string, any>, customStyle?: string | Record<string, any>): Record<string, any>;
@@ -0,0 +1,15 @@
1
+ import { VNode } from 'vue';
2
+
3
+ export declare function renderNode(node: string | VNode | undefined): string | VNode<import('vue').RendererNode, import('vue').RendererElement, {
4
+ [key: string]: any;
5
+ }> | null;
6
+ /**
7
+ * 判断是否为图片 URL
8
+ */
9
+ export declare function isImageUrl(url: string): boolean;
10
+ /**
11
+ * 专门用于渲染图标的函数(增强版)
12
+ */
13
+ export declare function renderIconNode(icon: string | VNode | undefined): string | VNode<import('vue').RendererNode, import('vue').RendererElement, {
14
+ [key: string]: any;
15
+ }> | null;
@@ -0,0 +1,19 @@
1
+ import { Ref, ComputedRef } from 'vue';
2
+
3
+ export interface PropertyState {
4
+ rawValue: string;
5
+ displayedLength: number;
6
+ isStreaming: boolean;
7
+ displayedValue: string;
8
+ }
9
+ export interface ISequentialStreaming {
10
+ propertyStates: Record<string, PropertyState>;
11
+ currentProperty: Ref<string | null>;
12
+ isAnyStreaming: boolean;
13
+ isAllDone: ComputedRef<boolean>;
14
+ startStreaming: () => void;
15
+ reset: () => void;
16
+ registerProperty: (key: string, value: string) => void;
17
+ updatePropertyValue: (key: string, value: string) => void;
18
+ }
19
+ export declare function useSequentialStreaming(): ISequentialStreaming;
@@ -0,0 +1,18 @@
1
+ import { ComputedRef } from 'vue';
2
+
3
+ interface StreamingOptions {
4
+ /** 每个字符的输出间隔(毫秒),默认 30 */
5
+ charInterval?: number;
6
+ }
7
+ /**
8
+ * 流式输出 hook - 实现打字机效果
9
+ * @param sourceContent 获取完整文本的响应式函数,格式为 Record<string, string>,key 对应输出内容的键名
10
+ * @param shouldDisplay 判断是否应该显示的响应式函数或计算属性
11
+ * @param streamingEnabled 是否启用流式输出(传入 ComputedRef 或函数)
12
+ * @param options 配置选项
13
+ * @returns 返回逐步显示的响应式文本对象,键名与 sourceContent 一致
14
+ */
15
+ export declare function useStreamingOutput(sourceContent: () => Record<string, string>, shouldDisplay: (() => boolean) | ComputedRef<boolean>, streamingEnabled: (() => boolean) | ComputedRef<boolean>, options?: StreamingOptions): {
16
+ displayContent: import('vue').Ref<Record<string, string>, Record<string, string>>;
17
+ };
18
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare function useTimer(): {
2
+ elapsedSeconds: import('vue').Ref<number, number>;
3
+ hasEverStarted: import('vue').Ref<boolean, boolean>;
4
+ start: () => void;
5
+ stop: () => void;
6
+ reset: () => void;
7
+ };
@@ -0,0 +1,40 @@
1
+ export { default as FXAppPreview } from './app-preview';
2
+ export * from './app-preview';
3
+ export { default as FXBubble, FXBubbleAction } from './bubble';
4
+ export * from './bubble';
5
+ export { default as FXCarousel, FXCarouselItem } from './carousel';
6
+ export * from './carousel';
7
+ export { default as FXChatPreview } from './chat-preview';
8
+ export * from './chat-preview';
9
+ export { default as FXConfirmDialog } from './confirm-dialog';
10
+ export * from './confirm-dialog';
11
+ export { default as FXCoding } from './coding';
12
+ export * from './coding';
13
+ export { FXAgentThinking, FXAttachmentFile, FXErrorReminder, FXHitlQuestion, FXInputRecommend, FXLinkCard, FXReferenceSources, FXToolUse, FXUnknownEnterprise, FXUserAuth } from './enterprise-cloud';
14
+ export * from './enterprise-cloud';
15
+ export { default as FXFileOperation } from './file-operation';
16
+ export * from './file-operation';
17
+ export { default as FXGenerateProcess } from './generate-process';
18
+ export * from './generate-process';
19
+ export { default as FXHistory } from './history';
20
+ export * from './history';
21
+ export { default as FXMarkdown } from './markdown';
22
+ export * from './markdown';
23
+ export { default as FXMarkdownPreview } from './markdown-preview';
24
+ export * from './markdown-preview';
25
+ export { default as FXPrompts, FXPrompt } from './prompts';
26
+ export * from './prompts';
27
+ export { default as FXStartedTodo } from './started-todo';
28
+ export * from './started-todo';
29
+ export { default as FXSuggestion } from './suggestion';
30
+ export * from './suggestion';
31
+ export { default as FXTodo, FXTodoListView, FXTodoListItemView } from './todo';
32
+ export * from './todo';
33
+ export { default as FXWelcome } from './welcome';
34
+ export * from './welcome';
35
+ export { default as FXAttachmentPreview } from './attachment-preview';
36
+ export * from './attachment-preview';
37
+ export { default as FXWidgetContainer } from './widget-container';
38
+ export * from './widget-container';
39
+ export { default as FXDynamicComponent } from './dynamic-component';
40
+ export * from './dynamic-component';
@@ -0,0 +1,7 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as FXConfirmDialog } from './src/confirm-dialog.component';
3
+
4
+ export * from './src/confirm-dialog.props';
5
+ export { FXConfirmDialog };
6
+ declare const _default: typeof FXConfirmDialog & Plugin;
7
+ export default _default;
@@ -0,0 +1,38 @@
1
+ declare const _default: import('vue').DefineComponent<{
2
+ title: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
3
+ [key: string]: any;
4
+ }>;
5
+ showDivider: boolean;
6
+ description: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
7
+ [key: string]: any;
8
+ }>;
9
+ modelValue: boolean;
10
+ cancelText: string;
11
+ confirmText: string;
12
+ closeOnMask: boolean;
13
+ }, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
14
+ title: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
15
+ [key: string]: any;
16
+ }>;
17
+ showDivider: boolean;
18
+ description: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
19
+ [key: string]: any;
20
+ }>;
21
+ modelValue: boolean;
22
+ cancelText: string;
23
+ confirmText: string;
24
+ closeOnMask: boolean;
25
+ }> & Readonly<{}>, {
26
+ title: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
27
+ [key: string]: any;
28
+ }>;
29
+ showDivider: boolean;
30
+ description: string | import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
31
+ [key: string]: any;
32
+ }>;
33
+ modelValue: boolean;
34
+ cancelText: string;
35
+ confirmText: string;
36
+ closeOnMask: boolean;
37
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
38
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import { ExtractPropTypes, PropType, VNode } from 'vue';
2
+
3
+ export declare const confirmDialogProps: {
4
+ modelValue: {
5
+ type: BooleanConstructor;
6
+ default: boolean;
7
+ };
8
+ title: {
9
+ type: PropType<string | VNode>;
10
+ default: string;
11
+ };
12
+ description: {
13
+ type: PropType<string | VNode>;
14
+ default: string;
15
+ };
16
+ cancelText: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ confirmText: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ closeOnMask: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ showDivider: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ };
32
+ };
33
+ export type ConfirmDialogProps = ExtractPropTypes<typeof confirmDialogProps>;
@@ -0,0 +1,7 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as FXDynamicComponent } from './src/dynamic-component.component';
3
+ export { default as FXDynamicComponent } from './src/dynamic-component.component';
4
+ export * from './src/composition/types';
5
+ export { loadDynamicComponent, unloadDynamicComponent } from './src/composition/dynamic-component-registry';
6
+ declare const _default: typeof FXDynamicComponent & Plugin;
7
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { DynamicComponentConfig, DynamicComponentAPI } from './types';
2
+
3
+ export declare function loadDynamicComponent(config: DynamicComponentConfig): Promise<DynamicComponentAPI>;
4
+ export declare function unloadDynamicComponent(id: string): void;
5
+ declare global {
6
+ interface Window {
7
+ __fluens_dynamic_component_register: (id: string, api: DynamicComponentAPI) => void;
8
+ }
9
+ }
@@ -0,0 +1,18 @@
1
+ export interface DynamicComponentConfig {
2
+ id: string;
3
+ jsUrl: string;
4
+ renderArea: 'inline' | 'preview';
5
+ title?: string;
6
+ width?: string;
7
+ height?: string;
8
+ }
9
+ export interface DynamicComponentAPI {
10
+ mount(container: HTMLElement, config: DynamicComponentConfig): void;
11
+ unmount(): void;
12
+ }
13
+ export interface DynamicComponentInstance {
14
+ config: DynamicComponentConfig;
15
+ container: HTMLElement;
16
+ api: DynamicComponentAPI;
17
+ scriptElement: HTMLScriptElement;
18
+ }
@@ -0,0 +1,14 @@
1
+ import { DynamicComponentConfig } from './types';
2
+
3
+ export declare function isDynamicComponentBlock(text: string): boolean;
4
+ export declare function parseDynamicComponentConfig(text: string): DynamicComponentConfig | null;
5
+ /**
6
+ * 尝试从不完整的 dynamic-component 代码块中解析 renderArea 字段。
7
+ * 用于流式进行中判断是否需要显示 loading 占位。
8
+ */
9
+ export declare function parsePartialDynamicComponentConfig(text: string): Pick<DynamicComponentConfig, 'renderArea'> | null;
10
+ /**
11
+ * 将文本按 ```dynamic-component ``` 代码块拆分为字符串数组。
12
+ * 不依赖全局正则 exec 循环,改用 indexOf 扫描,避免跨行/无换行时匹配异常。
13
+ */
14
+ export declare function splitDynamicComponentBlocks(text: string): string[];
@@ -0,0 +1,15 @@
1
+ import { PropType } from 'vue';
2
+ import { DynamicComponentConfig } from './composition/types';
3
+
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ config: {
6
+ type: PropType<DynamicComponentConfig>;
7
+ required: true;
8
+ };
9
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ config: {
11
+ type: PropType<DynamicComponentConfig>;
12
+ required: true;
13
+ };
14
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
15
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as FXAgentThinking } from './src/agent-thinking.component';
3
+ import { default as FXAttachmentFile } from './src/attachment-file.component';
4
+ import { default as FXErrorReminder } from './src/error-reminder.component';
5
+ import { default as FXInputRecommend } from './src/input-recommend.component';
6
+ import { default as FXLinkCard } from './src/link-card.component';
7
+ import { default as FXReferenceSources } from './src/reference-sources.component';
8
+ import { default as FXToolUse } from '../tool-use';
9
+ import { default as FXHitlQuestion } from './src/hitl-question.component';
10
+ import { default as FXUnknownEnterprise } from './src/unknown-enterprise.component';
11
+ import { default as FXUserAuth } from './src/user-auth.component';
12
+
13
+ export { FXAgentThinking, FXAttachmentFile, FXErrorReminder, FXHitlQuestion, FXInputRecommend, FXLinkCard, FXReferenceSources, FXToolUse, FXUnknownEnterprise, FXUserAuth };
14
+ export * from './src/types';
15
+ declare const _default: typeof FXAgentThinking & Plugin;
16
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { PropType } from 'vue';
2
+ import { MessageContentAgentThinking } from './types';
3
+
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ content: {
6
+ type: PropType<MessageContentAgentThinking>;
7
+ required: true;
8
+ };
9
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ content: {
11
+ type: PropType<MessageContentAgentThinking>;
12
+ required: true;
13
+ };
14
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
15
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { PropType } from 'vue';
2
+ import { MessageContentAttachmentFile } from './types';
3
+
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ content: {
6
+ type: PropType<MessageContentAttachmentFile>;
7
+ required: true;
8
+ };
9
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ content: {
11
+ type: PropType<MessageContentAttachmentFile>;
12
+ required: true;
13
+ };
14
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
15
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { PropType } from 'vue';
2
+ import { MessageContentErrorReminder } from './types';
3
+
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ content: {
6
+ type: PropType<MessageContentErrorReminder>;
7
+ required: true;
8
+ };
9
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ content: {
11
+ type: PropType<MessageContentErrorReminder>;
12
+ required: true;
13
+ };
14
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
15
+ export default _default;