@farris/x-ui 0.5.7 → 0.5.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.
Files changed (119) hide show
  1. package/assets/css/icons.css +1 -0
  2. package/assets/css/variables.css +1 -0
  3. package/assets/icon/active-agent.svg +16 -0
  4. package/assets/icon/agent-data-ops.png +0 -0
  5. package/assets/icon/agent-finance.png +0 -0
  6. package/assets/icon/agent-hr.png +0 -0
  7. package/assets/icon/agent-procurement.png +0 -0
  8. package/assets/icon/agent-production.png +0 -0
  9. package/assets/icon/agent-project.png +0 -0
  10. package/assets/icon/agent-sales.png +0 -0
  11. package/assets/icon/agent-supply-chain.png +0 -0
  12. package/assets/icon/attach.svg +14 -0
  13. package/assets/icon/copy.svg +22 -0
  14. package/assets/icon/daily-brief.svg +16 -0
  15. package/assets/icon/deep-seek-logo.svg +13 -0
  16. package/assets/icon/down-vote.svg +17 -0
  17. package/assets/icon/haiyue-logo.svg +76 -0
  18. package/assets/icon/markdown-icon.png +0 -0
  19. package/assets/icon/question-and-answer.svg +28 -0
  20. package/assets/icon/qwen-logo.svg +18 -0
  21. package/assets/icon/react.png +0 -0
  22. package/assets/icon/refresh.svg +20 -0
  23. package/assets/icon/robot-avatar-mini.png +0 -0
  24. package/assets/icon/robot-avatar.png +0 -0
  25. package/assets/icon/send.svg +24 -0
  26. package/assets/icon/speech.svg +16 -0
  27. package/assets/icon/supervision-task.svg +14 -0
  28. package/assets/icon/translate.svg +20 -0
  29. package/assets/icon/up-vote.svg +17 -0
  30. package/assets/icon/voice.svg +18 -0
  31. package/assets/icon-preview.html +634 -0
  32. package/assets/imgs/ai-logo.svg +76 -0
  33. package/assets/imgs/attachment-type-any.png +0 -0
  34. package/assets/imgs/attachment-type-board.png +0 -0
  35. package/assets/imgs/attachment-type-doc.png +0 -0
  36. package/assets/imgs/attachment-type-form.png +0 -0
  37. package/assets/imgs/attachment-type-html.png +0 -0
  38. package/assets/imgs/attachment-type-json.png +0 -0
  39. package/assets/imgs/attachment-type-md.png +0 -0
  40. package/assets/imgs/attachment-type-pdf.png +0 -0
  41. package/assets/imgs/attachment-type-ppt.png +0 -0
  42. package/assets/imgs/attachment-type-report.png +0 -0
  43. package/assets/imgs/attachment-type-txt.png +0 -0
  44. package/assets/imgs/attachment-type-xls.png +0 -0
  45. package/assets/imgs/drag-file.png +0 -0
  46. package/assets/imgs/empty-state-default.svg +180 -0
  47. package/assets/imgs/empty-state-done.svg +147 -0
  48. package/assets/imgs/empty-state-initiated.svg +155 -0
  49. package/assets/imgs/empty-state-report.svg +110 -0
  50. package/assets/imgs/empty-state-schedule.svg +139 -0
  51. package/assets/imgs/empty-state-supervision.svg +269 -0
  52. package/assets/imgs/empty-state-todo.svg +14 -0
  53. package/assets/imgs/f-drag-icon-default.svg +14 -0
  54. package/assets/imgs/f-drag-icon-hover.svg +20 -0
  55. package/assets/imgs/f-icon-checkbox-checked.svg +16 -0
  56. package/assets/imgs/f-icon-checkbox-indeterminate.svg +16 -0
  57. package/assets/imgs/f-icon-radio-checked.svg +13 -0
  58. package/assets/imgs/f-tabs-border-bg.svg +13 -0
  59. package/assets/imgs/feature-card-bg.png +0 -0
  60. package/assets/imgs/like-button-entry-item-bg.png +0 -0
  61. package/assets/imgs/primary-feature-card-bg.png +0 -0
  62. package/assets/imgs/table-norecords.svg +62 -0
  63. package/bubble/index.d.ts +11 -1
  64. package/bubble/src/bubble.component.d.ts +0 -45
  65. package/bubble/src/bubble.props.d.ts +1 -6
  66. package/bubble/src/components/text-content/utils/block-renderer.d.ts +1 -1
  67. package/bubble/src/composition/types.d.ts +0 -12
  68. package/chat-preview/index.d.ts +1 -0
  69. package/chat-preview/src/chat-preview.component.d.ts +2 -2
  70. package/chat-preview/src/chat-preview.props.d.ts +1 -1
  71. package/chat-preview/src/preview-chrome-sdk.d.ts +1 -1
  72. package/{app-preview → chat-preview}/src/types.d.ts +2 -17
  73. package/components.d.ts +3 -16
  74. package/empty-state/index.d.ts +7 -0
  75. package/empty-state/src/composition/use-empty-state.d.ts +16 -0
  76. package/empty-state/src/empty-state.component.d.ts +17 -0
  77. package/empty-state/src/empty-state.props.d.ts +48 -0
  78. package/farris.x-ui.esm.js +23618 -17017
  79. package/farris.x-ui.umd.cjs +166 -164
  80. package/image-preview/src/image-preview.component.d.ts +1 -1
  81. package/index.css +1 -1
  82. package/list-view/src/components/list-view-item.component.d.ts +20 -9
  83. package/markdown/src/composition/code-block-renderer.d.ts +4 -0
  84. package/markdown/src/composition/code-highlight.d.ts +2 -0
  85. package/markdown/src/composition/markdown-block-toolbar.d.ts +4 -0
  86. package/markdown/src/composition/table-card-renderer.d.ts +1 -1
  87. package/markdown/src/composition/transform-markdown-prose.d.ts +2 -0
  88. package/markdown/src/composition/use-markdown-copy.d.ts +7 -0
  89. package/markdown/test/markdown-code-block.spec.d.ts +1 -0
  90. package/nav/src/composition/types.d.ts +6 -0
  91. package/nav/src/composition/use-nav-right-slot.d.ts +5 -0
  92. package/nav/test/nav.spec.d.ts +1 -0
  93. package/package.json +13 -2
  94. package/popover/src/popover.component.d.ts +6 -0
  95. package/popover/src/popover.props.d.ts +10 -0
  96. package/app-preview/index.d.ts +0 -8
  97. package/app-preview/src/app-preview.component.d.ts +0 -22
  98. package/app-preview/src/app-preview.props.d.ts +0 -14
  99. package/error-reminder/index.d.ts +0 -7
  100. package/error-reminder/src/error-reminder.component.d.ts +0 -15
  101. package/error-reminder/src/types.d.ts +0 -7
  102. package/link-card/index.d.ts +0 -7
  103. package/link-card/src/link-card.component.d.ts +0 -15
  104. package/link-card/src/types.d.ts +0 -14
  105. package/prompts/index.d.ts +0 -9
  106. package/prompts/src/components/prompt.component.d.ts +0 -131
  107. package/prompts/src/components/prompt.props.d.ts +0 -79
  108. package/prompts/src/composition/type.d.ts +0 -34
  109. package/prompts/src/prompts.component.d.ts +0 -46
  110. package/prompts/src/prompts.props.d.ts +0 -61
  111. package/reference-sources/index.d.ts +0 -7
  112. package/reference-sources/src/reference-sources.component.d.ts +0 -15
  113. package/reference-sources/src/types.d.ts +0 -9
  114. package/welcome/index.d.ts +0 -7
  115. package/welcome/src/composition/type.d.ts +0 -1
  116. package/welcome/src/welcome.component.d.ts +0 -35
  117. package/welcome/src/welcome.props.d.ts +0 -30
  118. /package/{attachment.css → assets/css/attachment.css} +0 -0
  119. /package/{welcome/test/welcome.spec.d.ts → empty-state/src/test/empty-state.spec.d.ts} +0 -0
@@ -15,7 +15,6 @@ declare const _default: import('../../../vue').DefineComponent<{
15
15
  role: "user" | "assistant";
16
16
  content?: import('../../../..').BubbleContent | undefined;
17
17
  onPreview?: ((config: import('../../../../..').PreviewConfig) => void) | undefined;
18
- onUserAuthConfirm?: ((optionId: string, name: string, message?: string) => void) | undefined;
19
18
  compositeTailRender?: (() => import('../../../vue').VNode | null | undefined) | undefined;
20
19
  onDynamicComponentsDetected?: ((configs: import('../../../../..').DynamicComponentConfig[]) => void) | undefined;
21
20
  onShowDynamicComponent?: ((config: import('../../../../..').DynamicComponentConfig) => void) | undefined;
@@ -34,7 +33,6 @@ declare const _default: import('../../../vue').DefineComponent<{
34
33
  role: "user" | "assistant";
35
34
  content?: import('../../../..').BubbleContent | undefined;
36
35
  onPreview?: ((config: import('../../../../..').PreviewConfig) => void) | undefined;
37
- onUserAuthConfirm?: ((optionId: string, name: string, message?: string) => void) | undefined;
38
36
  compositeTailRender?: (() => import('../../../vue').VNode | null | undefined) | undefined;
39
37
  onDynamicComponentsDetected?: ((configs: import('../../../../..').DynamicComponentConfig[]) => void) | undefined;
40
38
  onShowDynamicComponent?: ((config: import('../../../../..').DynamicComponentConfig) => void) | undefined;
@@ -49,7 +47,6 @@ declare const _default: import('../../../vue').DefineComponent<{
49
47
  styles: Record<import('../../../..').AppearanceType, import('../../../vue').CSSProperties>;
50
48
  attachments: Attachment[];
51
49
  onPreview: (config: import('../../../../..').PreviewConfig) => void;
52
- onUserAuthConfirm: (optionId: string, name: string, message?: string) => void;
53
50
  compositeTailRender: () => import('../../../vue').VNode | null | undefined;
54
51
  onDynamicComponentsDetected: (configs: import('../../../../..').DynamicComponentConfig[]) => void;
55
52
  onShowDynamicComponent: (config: import('../../../../..').DynamicComponentConfig) => void;
@@ -57,48 +54,6 @@ declare const _default: import('../../../vue').DefineComponent<{
57
54
  attachmentShowDownload: boolean;
58
55
  role: "user" | "assistant";
59
56
  }, {}, {
60
- 'fx-user-auth-inline': import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
61
- content: {
62
- type: import('../../../vue').PropType<import('../../../../..').MessageContentUserAuth>;
63
- required: true;
64
- };
65
- onConfirm: {
66
- type: import('../../../vue').PropType<(optionId: string, name: string, message?: string) => void>;
67
- default: undefined;
68
- };
69
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
70
- content: {
71
- type: import('../../../vue').PropType<import('../../../../..').MessageContentUserAuth>;
72
- required: true;
73
- };
74
- onConfirm: {
75
- type: import('../../../vue').PropType<(optionId: string, name: string, message?: string) => void>;
76
- default: undefined;
77
- };
78
- }>> & Readonly<{}>, {
79
- onConfirm: (optionId: string, name: string, message?: string) => void;
80
- }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
81
- 'fx-app-preview-inline': import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
82
- content: {
83
- type: import('../../../vue').PropType<import('../../../../..').MessageContentAppPreview>;
84
- required: boolean;
85
- };
86
- onOpen: {
87
- type: import('../../../vue').PropType<(config: import('../../../../..').PreviewConfig) => void>;
88
- default: undefined;
89
- };
90
- }>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
91
- content: {
92
- type: import('../../../vue').PropType<import('../../../../..').MessageContentAppPreview>;
93
- required: boolean;
94
- };
95
- onOpen: {
96
- type: import('../../../vue').PropType<(config: import('../../../../..').PreviewConfig) => void>;
97
- default: undefined;
98
- };
99
- }>> & Readonly<{}>, {
100
- onOpen: (config: import('../../../../..').PreviewConfig) => void;
101
- }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
102
57
  FXToolUse: {
103
58
  new (...args: any[]): import('../../../vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../../vue').ExtractPropTypes<{
104
59
  content: {
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, ExtractPropTypes, PropType, VNode } from '../../../vue';
2
2
  import { AppearanceType, BubbleContent, Attachment } from '../../../composition/types';
3
- import { PreviewConfig } from '../../../../../app-preview';
3
+ import { PreviewConfig } from '../../../../../chat-preview/src/types';
4
4
  import { OutputMode } from '../../../../../common';
5
5
  import { DynamicComponentConfig } from '../../../../../dynamic-component/src/composition/types';
6
6
 
@@ -60,11 +60,6 @@ export declare const bubbleProps: {
60
60
  type: PropType<(config: PreviewConfig) => void>;
61
61
  default: undefined;
62
62
  };
63
- /** 气泡内 agent/request-run 等按钮确认 */
64
- onUserAuthConfirm: {
65
- type: PropType<(optionId: string, name: string, message?: string) => void>;
66
- default: undefined;
67
- };
68
63
  /** 复合消息:在正文区尾部追加渲染(单气泡内多块) */
69
64
  compositeTailRender: {
70
65
  type: PropType<() => VNode | null | undefined>;
@@ -1,5 +1,5 @@
1
1
  import { VNode, SetupContext, ComputedRef } from '../../../../../../vue';
2
- import { DynamicComponentConfig } from '../../../../../../../../../../dynamic-component/src/composition/types';
2
+ import { DynamicComponentConfig } from '../../../../../../../../../../../dynamic-component/src/composition/types';
3
3
  import { ParsedBlock, BlockType } from '../../../../../../../composition/block-type';
4
4
  import { EmbeddedContentRenderContext } from '../../../../../../../../../composition/use-embedded-content';
5
5
  import { EmbeddedContent } from '../../../../../../../../../composition/types';
@@ -1,27 +1,15 @@
1
1
  import { VNode } from '../../../../vue';
2
2
  import { DetailViewMode, TodoItemStatus, TodoWorkItem } from '../../../../../../../todo';
3
- import { MessageContentUserAuth } from '../../../../../../../user-auth/src/types';
4
3
  import { MessageContentToolUse } from '../../../../../../../tool-use/src/types';
5
- import { MessageContentAppPreview } from '../../../../../../../app-preview/src/types';
6
4
 
7
5
  /** 气泡消息文本格式化类型 */
8
6
  export type BubbleTextFormatType = 'plain' | 'markdown';
9
- /** 复合气泡内、与正文同壳的按钮 /预览块(按网关块顺序追加) */
10
- export type BubbleCompositeInlineBlock = {
11
- kind: 'userAuth';
12
- content: MessageContentUserAuth;
13
- } | {
14
- kind: 'appPreview';
15
- content: MessageContentAppPreview;
16
- };
17
7
  /** 文本类型消息内容 */
18
8
  export interface BubbleContent {
19
9
  type?: 'text';
20
10
  /** 正文文本,或者预渲染好的 VNode */
21
11
  text: string | VNode;
22
12
  textFormat?: BubbleTextFormatType;
23
- /** 正文与 footer 之间按序渲染的网关块(如 request-run 按钮、app-preview) */
24
- compositeInlineBlocks?: BubbleCompositeInlineBlock[];
25
13
  avatar?: string;
26
14
  sender?: string;
27
15
  /** 一级标题 */
@@ -2,6 +2,7 @@ import { Plugin } from '../../vue';
2
2
  import { default as FXChatPreview } from '../../src/chat-preview.component';
3
3
 
4
4
  export * from '../../src/chat-preview.props';
5
+ export * from '../../src/types';
5
6
  export * from '../../src/preview-bridge-protocol';
6
7
  export { postAssistantToPreviewIframe, subscribeAssistantInPreviewIframe, type PreviewAssistantBridgeSubscribeOptions, } from '../../src/preview-bridge-host';
7
8
  /** 按方法名调用宿主 `window.AgentWorkbenchSDK`(由 `@farris/x-workbench` 注入) */
@@ -1,4 +1,4 @@
1
- import { PreviewConfig } from '../../../../../app-preview';
1
+ import { PreviewConfig } from '../../../types';
2
2
 
3
3
  declare const _default: import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
4
4
  previewConfig: {
@@ -27,8 +27,8 @@ declare const _default: import('../../../vue').DefineComponent<import('../../../
27
27
  default: () => void;
28
28
  };
29
29
  }>> & Readonly<{}>, {
30
- previewConfig: PreviewConfig;
31
30
  onClose: () => void;
31
+ previewConfig: PreviewConfig;
32
32
  onIframeLoad: () => void;
33
33
  }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
34
34
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { ExtractPropTypes, PropType } from '../../../vue';
2
- import { PreviewConfig } from '../../../../../app-preview';
2
+ import { PreviewConfig } from '../../../types';
3
3
 
4
4
  export declare const chatPreviewProps: {
5
5
  previewConfig: {
@@ -1,4 +1,4 @@
1
- import { PreviewConfig } from '../../../../../app-preview/src/types';
1
+ import { PreviewConfig } from '../../../types';
2
2
 
3
3
  /** 由 FXConversation 注入,供 window 侧 imperative 调用(分屏 / 双栏预览) */
4
4
  export interface PreviewChromeSdkHandlers {
@@ -1,7 +1,8 @@
1
1
  import { DynamicComponentConfig } from '../../../../../dynamic-component/src/composition/types';
2
2
 
3
- /** 预览配置 */
3
+ /** 预览模式 */
4
4
  export type PreviewMode = 'splitScreen' | 'fullScreen';
5
+ /** 预览配置 */
5
6
  export interface PreviewConfig {
6
7
  /** 直接预览 URL(优先级最高,设置后忽略其它拼接字段) */
7
8
  url?: string;
@@ -36,19 +37,3 @@ export interface PreviewConfig {
36
37
  */
37
38
  dynamicComponent?: DynamicComponentConfig;
38
39
  }
39
- export interface AppConfig {
40
- appPath: string;
41
- appObjectId: string;
42
- appBuilderUri?: string;
43
- ws?: string;
44
- }
45
- /** 应用预览消息类型内容 */
46
- export interface MessageContentAppPreview {
47
- type: 'AppPreview';
48
- message: string;
49
- appIcon: string;
50
- appName: string;
51
- appConfig: AppConfig;
52
- previewConfig: PreviewConfig;
53
- createdDatetime: string;
54
- }
package/components.d.ts CHANGED
@@ -1,17 +1,12 @@
1
1
  import { MessageContentAgentThinking } from '../agent-thinking';
2
2
  import { MessageContentAttachmentFile } from '../attachment-file';
3
- import { MessageContentErrorReminder } from '../error-reminder';
4
3
  import { MessageContentHitlQuestion } from '../hitl-question';
5
4
  import { MessageContentInputRecommend } from '../input-recommend';
6
- import { MessageContentLinkCard } from '../link-card';
7
- import { MessageContentReferenceSources } from '../reference-sources';
8
5
  import { MessageContentKnowledgeTrace } from '../knowledge-trace';
9
6
  import { MessageContentToolUse } from '../tool-use';
10
7
  import { MessageContentToolUseBatch } from '../tool-use-batch';
11
8
  import { MessageContentUnknownEnterprise } from '../unknown-enterprise';
12
9
  import { MessageContentUserAuth } from '../user-auth';
13
- export { default as FXAppPreview } from '../app-preview';
14
- export * from '../app-preview';
15
10
  export { default as FXBubble, FXBubbleAction } from '../bubble';
16
11
  export * from '../bubble';
17
12
  export { default as FXCarousel, FXCarouselItem } from '../carousel';
@@ -28,18 +23,12 @@ export { default as FXAgentThinking } from '../agent-thinking';
28
23
  export * from '../agent-thinking';
29
24
  export { default as FXAttachmentFile } from '../attachment-file';
30
25
  export * from '../attachment-file';
31
- export { default as FXErrorReminder } from '../error-reminder';
32
- export * from '../error-reminder';
33
26
  export { default as FXHitlQuestion } from '../hitl-question';
34
27
  export * from '../hitl-question';
35
28
  export { default as FXCredentialAuthDialog } from '../credential-auth-dialog';
36
29
  export * from '../credential-auth-dialog';
37
30
  export { default as FXInputRecommend } from '../input-recommend';
38
31
  export * from '../input-recommend';
39
- export { default as FXLinkCard } from '../link-card';
40
- export * from '../link-card';
41
- export { default as FXReferenceSources } from '../reference-sources';
42
- export * from '../reference-sources';
43
32
  export { default as FXKnowledgeTraceStrip, FXKnowledgeTracePanel } from '../knowledge-trace';
44
33
  export * from '../knowledge-trace';
45
34
  export { default as FXToolUse } from '../tool-use';
@@ -50,7 +39,7 @@ export { default as FXUnknownEnterprise } from '../unknown-enterprise';
50
39
  export * from '../unknown-enterprise';
51
40
  export { default as FXUserAuth } from '../user-auth';
52
41
  export * from '../user-auth';
53
- export type EnterpriseCloudMessageContent = MessageContentAgentThinking | MessageContentToolUse | MessageContentToolUseBatch | MessageContentReferenceSources | MessageContentKnowledgeTrace | MessageContentInputRecommend | MessageContentUserAuth | MessageContentErrorReminder | MessageContentLinkCard | MessageContentUnknownEnterprise | MessageContentAttachmentFile | MessageContentHitlQuestion;
42
+ export type EnterpriseCloudMessageContent = MessageContentAgentThinking | MessageContentToolUse | MessageContentToolUseBatch | MessageContentKnowledgeTrace | MessageContentInputRecommend | MessageContentUnknownEnterprise | MessageContentAttachmentFile | MessageContentHitlQuestion | MessageContentUserAuth;
54
43
  export { default as FXFileOperation } from '../file-operation';
55
44
  export * from '../file-operation';
56
45
  export { default as FXGenerateProcess } from '../generate-process';
@@ -61,16 +50,12 @@ export { default as FXMarkdown } from '../markdown';
61
50
  export * from '../markdown';
62
51
  export { default as FXMarkdownPreview } from '../markdown-preview';
63
52
  export * from '../markdown-preview';
64
- export { default as FXPrompts, FXPrompt } from '../prompts';
65
- export * from '../prompts';
66
53
  export { default as FXStartedTodo } from '../started-todo';
67
54
  export * from '../started-todo';
68
55
  export { default as FXSuggestion } from '../suggestion';
69
56
  export * from '../suggestion';
70
57
  export { default as FXTodo, FXTodoListView, FXTodoListItemView } from '../todo';
71
58
  export * from '../todo';
72
- export { default as FXWelcome } from '../welcome';
73
- export * from '../welcome';
74
59
  export { default as FXAttachmentPreview } from '../attachment-preview';
75
60
  export * from '../attachment-preview';
76
61
  export { default as FXWidgetContainer } from '../widget-container';
@@ -89,3 +74,5 @@ export { default as FXListView } from '../list-view';
89
74
  export * from '../list-view';
90
75
  export { default as FXImagePreview } from '../image-preview';
91
76
  export * from '../image-preview';
77
+ export { default as FXEmptyState } from '../empty-state';
78
+ export * from '../empty-state';
@@ -0,0 +1,7 @@
1
+ import { Plugin } from '../../vue';
2
+ import { default as FXEmptyState } from '../../src/empty-state.component';
3
+
4
+ export * from '../../src/empty-state.props';
5
+ export { FXEmptyState };
6
+ declare const _default: typeof FXEmptyState & Plugin;
7
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { ComputedRef } from '../../../../vue';
2
+ import { EmptyStateProps, EmptyStateType } from '../../../../../empty-state.props';
3
+
4
+ /**
5
+ * 空态组件的类名与文案派生逻辑
6
+ */
7
+ export declare function useEmptyState(props: EmptyStateProps): {
8
+ /** 归一化后的类型:未收录类型回退 default */
9
+ normalizedType: ComputedRef<EmptyStateType>;
10
+ /** 实际展示的空态文案:空字符串表示不渲染文字行 */
11
+ effectiveDescription: ComputedRef<string>;
12
+ /** 是否渲染文字行 */
13
+ shouldShowDescription: ComputedRef<boolean>;
14
+ /** 根节点类名 */
15
+ rootClass: ComputedRef<Record<string, boolean>>;
16
+ };
@@ -0,0 +1,17 @@
1
+ declare const _default: import('../../../vue').DefineComponent<{
2
+ type: import('../../../empty-state.props').EmptyStateType;
3
+ customClass: string;
4
+ size: import('../../../empty-state.props').EmptyStateSize;
5
+ description?: string | undefined;
6
+ }, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<{
7
+ type: import('../../../empty-state.props').EmptyStateType;
8
+ customClass: string;
9
+ size: import('../../../empty-state.props').EmptyStateSize;
10
+ description?: string | undefined;
11
+ }> & Readonly<{}>, {
12
+ type: import('../../../empty-state.props').EmptyStateType;
13
+ customClass: string;
14
+ size: import('../../../empty-state.props').EmptyStateSize;
15
+ description: string;
16
+ }, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
17
+ export default _default;
@@ -0,0 +1,48 @@
1
+ import { ExtractPropTypes, PropType } from '../../../vue';
2
+
3
+ /**
4
+ * 空态插图类型:
5
+ * - default 通用空列表 / 暂无数据
6
+ * - todo 暂无待办
7
+ * - done 暂无已办
8
+ * - initiated 暂无发起
9
+ * - supervision 暂无督办
10
+ * - schedule 暂无日程
11
+ * - report 暂无要情
12
+ */
13
+ export type EmptyStateType = 'default' | 'todo' | 'done' | 'initiated' | 'supervision' | 'schedule' | 'report';
14
+ /** 空态尺寸档位:default 标准插图,small 缩小插图与文字 */
15
+ export type EmptyStateSize = 'default' | 'small';
16
+ /** 各类型默认空态文案(description 未传时的兜底) */
17
+ export declare const EMPTY_STATE_DEFAULT_DESCRIPTIONS: Record<EmptyStateType, string>;
18
+ export declare const emptyStateProps: {
19
+ /**
20
+ * 空态类型,决定占位插图与默认文案;
21
+ * 传入未收录的类型时按 default 处理
22
+ */
23
+ type: {
24
+ type: PropType<EmptyStateType>;
25
+ default: string;
26
+ };
27
+ /**
28
+ * 空态文案:
29
+ * - 不传(undefined)时使用 type 对应的默认文案
30
+ * - 传空字符串 '' 时不渲染文字行
31
+ * - 传非空字符串时覆盖默认文案
32
+ */
33
+ description: {
34
+ type: PropType<string>;
35
+ default: undefined;
36
+ };
37
+ /** 尺寸档位:default 152px 插图 / small 缩小档插图与文字 */
38
+ size: {
39
+ type: PropType<EmptyStateSize>;
40
+ default: string;
41
+ };
42
+ /** 自定义样式类名,追加到根节点 */
43
+ customClass: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ };
48
+ export type EmptyStateProps = ExtractPropTypes<typeof emptyStateProps>;