ant-design-x-vue 0.0.1 → 0.0.3

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 (30) hide show
  1. package/README.md +30 -29
  2. package/dist/index.mjs +2681 -1363
  3. package/dist/index.umd.js +66 -10
  4. package/dist/typings/_util/hooks/useMergedState.d.ts +7 -0
  5. package/dist/typings/conversations/Conversations.vue.d.ts +3 -0
  6. package/dist/typings/conversations/ConversationsItem.vue.d.ts +3 -0
  7. package/dist/typings/conversations/GroupTitle.vue.d.ts +19 -0
  8. package/dist/typings/conversations/context.d.ts +21 -0
  9. package/dist/typings/conversations/hooks/useGroupable.d.ts +12 -0
  10. package/dist/typings/conversations/index.d.ts +4 -0
  11. package/dist/typings/conversations/interface.d.ts +129 -0
  12. package/dist/typings/conversations/style/index.d.ts +8 -0
  13. package/dist/typings/index.d.ts +4 -0
  14. package/dist/typings/prompts/Prompts.vue.d.ts +3 -0
  15. package/dist/typings/prompts/index.d.ts +4 -0
  16. package/dist/typings/prompts/interface.d.ts +81 -0
  17. package/dist/typings/prompts/style/index.d.ts +8 -0
  18. package/dist/typings/suggestion/Suggestion.vue.d.ts +16 -0
  19. package/dist/typings/suggestion/index.d.ts +4 -0
  20. package/dist/typings/suggestion/interface.d.ts +26 -0
  21. package/dist/typings/suggestion/style/index.d.ts +6 -0
  22. package/dist/typings/suggestion/useActive.d.ts +7 -0
  23. package/dist/typings/theme/components.d.ts +8 -0
  24. package/dist/typings/theme/genStyleUtils.d.ts +3 -3
  25. package/dist/typings/welcome/Welcome.vue.d.ts +3 -0
  26. package/dist/typings/welcome/index.d.ts +4 -0
  27. package/dist/typings/welcome/interface.d.ts +15 -0
  28. package/dist/typings/welcome/style/index.d.ts +8 -0
  29. package/dist/typings/x-provider/context.d.ts +8 -0
  30. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ import type { ComputedRef } from "vue";
2
+ import type { GroupTitleContextProps } from './interface';
3
+ export declare const globalGroupTitleContextApi: import("vue").ShallowRef<GroupTitleContextProps, GroupTitleContextProps>;
4
+ export declare const useGroupTitleContextProvider: (value: ComputedRef<GroupTitleContextProps>) => void;
5
+ export declare const useGroupTitleContextInject: () => ComputedRef<GroupTitleContextProps>;
6
+ export declare const GroupTitleContextProvider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ value: {
8
+ type: import("vue").PropType<GroupTitleContextProps>;
9
+ default: GroupTitleContextProps;
10
+ };
11
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ [key: string]: any;
13
+ }>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
+ value: {
15
+ type: import("vue").PropType<GroupTitleContextProps>;
16
+ default: GroupTitleContextProps;
17
+ };
18
+ }>> & Readonly<{}>, {
19
+ value: GroupTitleContextProps;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
21
+ export default GroupTitleContextProvider;
@@ -0,0 +1,12 @@
1
+ import { MaybeRefOrGetter } from 'vue';
2
+ import type { Conversation, Groupable, ConversationsProps } from '../interface';
3
+ type GroupList = {
4
+ data: Conversation[];
5
+ name?: string;
6
+ title?: Groupable['title'];
7
+ }[];
8
+ declare const useGroupable: (groupable?: MaybeRefOrGetter<ConversationsProps["groupable"]>, items?: MaybeRefOrGetter<Conversation[]>) => import("vue").ComputedRef<{
9
+ groupList: GroupList;
10
+ enableGroup: boolean;
11
+ }>;
12
+ export default useGroupable;
@@ -0,0 +1,4 @@
1
+ import Conversations from './Conversations.vue';
2
+ export type { ConversationsProps } from './interface';
3
+ export default Conversations;
4
+ export { Conversations, };
@@ -0,0 +1,129 @@
1
+ import type { CSSProperties, HTMLAttributes, VNode } from 'vue';
2
+ import type { AnyObject } from '../_util/type';
3
+ import GroupTitle from './GroupTitle.vue';
4
+ import type { ConfigProviderProps, DirectionType } from 'ant-design-vue/es/config-provider';
5
+ import type { MenuProps } from 'ant-design-vue';
6
+ type GroupType = string;
7
+ /**
8
+ * @desc 会话数据
9
+ * @descEN Conversation data
10
+ */
11
+ export interface Conversation extends AnyObject {
12
+ /**
13
+ * @desc 唯一标识
14
+ * @descEN Unique identifier
15
+ */
16
+ key: string;
17
+ /**
18
+ * @desc 会话名称
19
+ * @descEN Conversation name
20
+ */
21
+ label?: VNode | string;
22
+ /**
23
+ * @desc 会话时间戳
24
+ * @descEN Conversation timestamp
25
+ */
26
+ timestamp?: number;
27
+ /**
28
+ * @desc 会话分组类型,与 {@link ConversationsProps.groupable} 联动
29
+ * @descEN Conversation type
30
+ */
31
+ group?: GroupType;
32
+ /**
33
+ * @desc 会话图标
34
+ * @descEN conversation icon
35
+ */
36
+ icon?: VNode;
37
+ /**
38
+ * @desc 是否禁用
39
+ * @descEN Whether to disable
40
+ */
41
+ disabled?: boolean;
42
+ }
43
+ /**
44
+ * @desc 会话列表组件参数
45
+ * @descEN Props for the conversation list component
46
+ */
47
+ export interface ConversationsProps extends HTMLAttributes {
48
+ /**
49
+ * @desc 会话列表数据源
50
+ * @descEN Data source for the conversation list
51
+ */
52
+ items?: Conversation[];
53
+ /**
54
+ * @desc 当前选中的值
55
+ * @descEN Currently selected value
56
+ */
57
+ activeKey?: Conversation['key'];
58
+ /**
59
+ * @desc 默认选中值
60
+ * @descEN Default selected value
61
+ */
62
+ defaultActiveKey?: Conversation['key'];
63
+ /**
64
+ * @desc 选中变更回调
65
+ * @descEN Callback for selection change
66
+ */
67
+ onActiveChange?: (value: string) => void;
68
+ /**
69
+ * @desc 会话操作菜单
70
+ * @descEN Operation menu for conversations
71
+ */
72
+ menu?: MenuProps | ((value: Conversation) => MenuProps);
73
+ /**
74
+ * @desc 是否支持分组, 开启后默认按 {@link Conversation.group} 字段分组
75
+ * @descEN If grouping is supported, it defaults to the {@link Conversation.group} field
76
+ */
77
+ groupable?: boolean | Groupable;
78
+ /**
79
+ * @desc 语义化结构 style
80
+ * @descEN Semantic structure styles
81
+ */
82
+ styles?: Partial<Record<'item', CSSProperties>>;
83
+ /**
84
+ * @desc 语义化结构 className
85
+ * @descEN Semantic structure class names
86
+ */
87
+ classNames?: Partial<Record<'item', string>>;
88
+ /**
89
+ * @desc 自定义前缀
90
+ * @descEN Prefix
91
+ */
92
+ prefixCls?: string;
93
+ /**
94
+ * @desc 自定义根类名
95
+ * @descEN Custom class name
96
+ */
97
+ rootClassName?: string;
98
+ }
99
+ export interface ConversationsItemProps extends Omit<HTMLAttributes, 'onClick'> {
100
+ info: Conversation;
101
+ prefixCls?: string;
102
+ direction?: DirectionType;
103
+ menu?: MenuProps;
104
+ active?: boolean;
105
+ onClick?: (info: Conversation) => void;
106
+ }
107
+ export type GroupSorter = Parameters<GroupType[]['sort']>[0];
108
+ export type GroupTitleRenderComponents = {
109
+ components: {
110
+ GroupTitle: typeof GroupTitle;
111
+ };
112
+ };
113
+ export type GroupTitleRender = ((group: GroupType, info: GroupTitleRenderComponents) => VNode) | undefined;
114
+ export interface Groupable {
115
+ /**
116
+ * @desc 分组排序函数
117
+ * @descEN Group sorter
118
+ */
119
+ sort?: GroupSorter;
120
+ /**
121
+ * @desc 自定义分组标签渲染
122
+ * @descEN Semantic custom rendering
123
+ */
124
+ title?: GroupTitleRender;
125
+ }
126
+ export interface GroupTitleContextProps {
127
+ prefixCls?: ConfigProviderProps['prefixCls'];
128
+ }
129
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { FullToken, GetDefaultToken } from '../../theme/cssinjs-utils';
2
+ export interface ComponentToken {
3
+ }
4
+ export interface ConversationsToken extends FullToken<'Conversations'> {
5
+ }
6
+ export declare const prepareComponentToken: GetDefaultToken<'Conversations'>;
7
+ declare const _default: (prefixCls: import("vue").MaybeRefOrGetter<string>, rootCls?: string) => readonly [(node: import("vue").VNode) => import("vue").VNode, string, string];
8
+ export default _default;
@@ -1,2 +1,6 @@
1
1
  export * from './x-provider';
2
2
  export * from './bubble';
3
+ export * from './conversations';
4
+ export * from './welcome';
5
+ export * from './prompts';
6
+ export * from './suggestion';
@@ -0,0 +1,3 @@
1
+ import type { PromptsProps } from './interface';
2
+ declare const _default: import("vue").DefineComponent<PromptsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PromptsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import Prompts from './Prompts.vue';
2
+ export type { PromptsProps } from './interface';
3
+ export default Prompts;
4
+ export { Prompts, };
@@ -0,0 +1,81 @@
1
+ import type { CSSProperties, HTMLAttributes, VNode } from "vue";
2
+ export interface BasePromptItem {
3
+ /**
4
+ * @desc 唯一标识用于区分每个提示项。
5
+ * @descEN Unique identifier used to distinguish each prompt item.
6
+ */
7
+ key: string;
8
+ /**
9
+ * @desc 提示图标显示在提示项的左侧。
10
+ * @descEN Prompt icon displayed on the left side of the prompt item.
11
+ */
12
+ icon?: VNode;
13
+ /**
14
+ * @desc 提示标签显示提示的主要内容。
15
+ * @descEN Prompt label displaying the main content of the prompt.
16
+ */
17
+ label?: VNode | string;
18
+ /**
19
+ * @desc 提示描述提供额外的信息。
20
+ * @descEN Prompt description providing additional information.
21
+ */
22
+ description?: VNode | string;
23
+ /**
24
+ * @desc 设置为 true 时禁用点击事件。
25
+ * @descEN When set to true, click events are disabled.
26
+ */
27
+ disabled?: boolean;
28
+ }
29
+ export interface PromptProps extends BasePromptItem {
30
+ children?: BasePromptItem[];
31
+ }
32
+ export type SemanticType = 'list' | 'item' | 'itemContent' | 'title' | 'subList' | 'subItem';
33
+ export interface PromptsProps extends Omit<HTMLAttributes, 'onClick' | 'title'> {
34
+ /**
35
+ * @desc 包含多个提示项的列表。
36
+ * @descEN List containing multiple prompt items.
37
+ */
38
+ items?: PromptProps[];
39
+ /**
40
+ * @desc 显示在提示列表顶部的标题。
41
+ * @descEN Title displayed at the top of the prompt list.
42
+ */
43
+ title?: VNode | string;
44
+ /**
45
+ * @desc Item 提示项被点击时的回调函数。
46
+ * @descEN Callback function when a prompt item is clicked.
47
+ */
48
+ onItemClick?: (info: {
49
+ data: PromptProps;
50
+ }) => void;
51
+ /**
52
+ * @desc 提示列表是否垂直排列。
53
+ * @descEN Whether the prompt list is arranged vertically.
54
+ */
55
+ vertical?: boolean;
56
+ /**
57
+ * @desc 提示列表是否换行。
58
+ * @descEN Whether the prompt list is wrapped.
59
+ */
60
+ wrap?: boolean;
61
+ /**
62
+ * @desc 自定义样式,用于各个提示项的不同部分。
63
+ * @descEN Custom styles for different parts of each prompt item.
64
+ */
65
+ styles?: Partial<Record<SemanticType, CSSProperties>>;
66
+ /**
67
+ * @desc 自定义样式类名,用于各个提示项的不同部分。
68
+ * @descEN Custom style class names for different parts of each prompt item.
69
+ */
70
+ classNames?: Partial<Record<SemanticType, string>>;
71
+ /**
72
+ * @desc 样式类名的前缀。
73
+ * @descEN Prefix for style class names.
74
+ */
75
+ prefixCls?: string;
76
+ /**
77
+ * @desc 根节点的样式类名。
78
+ * @descEN Style class name for the root node.
79
+ */
80
+ rootClassName?: string;
81
+ }
@@ -0,0 +1,8 @@
1
+ import type { FullToken, GetDefaultToken } from "../../theme/cssinjs-utils";
2
+ export interface ComponentToken {
3
+ }
4
+ export interface PromptsToken extends FullToken<'Prompts'> {
5
+ }
6
+ export declare const prepareComponentToken: GetDefaultToken<'Prompts'>;
7
+ declare const _default: (prefixCls: import("vue").MaybeRefOrGetter<string>, rootCls?: string) => readonly [(node: import("vue").VNode) => import("vue").VNode, string, string];
8
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import type { SuggestionProps } from './interface';
2
+ declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & SuggestionProps<T>> & import("vue").PublicProps;
4
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
5
+ attrs: any;
6
+ slots: {};
7
+ emit: {};
8
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
9
+ [key: string]: any;
10
+ }> & {
11
+ __ctx?: Awaited<typeof __VLS_setup>;
12
+ };
13
+ export default _default;
14
+ type __VLS_PrettifyLocal<T> = {
15
+ [K in keyof T]: T[K];
16
+ } & {};
@@ -0,0 +1,4 @@
1
+ import Suggestion from './Suggestion.vue';
2
+ export type { SuggestionProps } from './interface';
3
+ export default Suggestion;
4
+ export { Suggestion, };
@@ -0,0 +1,26 @@
1
+ import type { CSSProperties, VNode } from "vue";
2
+ export type SuggestionItem = {
3
+ label: VNode | string;
4
+ value: string;
5
+ icon?: VNode;
6
+ children?: SuggestionItem[];
7
+ extra?: VNode;
8
+ };
9
+ export interface RenderChildrenProps<T> {
10
+ onTrigger: (info?: T | false) => void;
11
+ onKeyDown: (e: KeyboardEvent) => void;
12
+ }
13
+ export interface SuggestionProps<T = any> {
14
+ prefixCls?: string;
15
+ className?: string;
16
+ rootClassName?: string;
17
+ style?: CSSProperties;
18
+ children?: (props: RenderChildrenProps<T>) => VNode;
19
+ open?: boolean;
20
+ onOpenChange?: (open: boolean) => void;
21
+ items: SuggestionItem[] | ((info?: T) => SuggestionItem[]);
22
+ onSelect?: (value: string) => void;
23
+ block?: boolean;
24
+ styles?: Partial<Record<string, CSSProperties>>;
25
+ classNames?: Partial<Record<string, string>>;
26
+ }
@@ -0,0 +1,6 @@
1
+ import type { GetDefaultToken } from '../../theme/cssinjs-utils';
2
+ export interface ComponentToken {
3
+ }
4
+ export declare const prepareComponentToken: GetDefaultToken<'Suggestion'>;
5
+ declare const _default: (prefixCls: import("vue").MaybeRefOrGetter<string>, rootCls?: string) => readonly [(node: import("vue").VNode) => import("vue").VNode, string, string];
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
2
+ import type { SuggestionItem } from './interface';
3
+ import type { KeyboardEventHandler } from 'ant-design-vue/es/_util/EventInterface';
4
+ /**
5
+ * Since Cascader not support ref active, we use `value` to mock the active item.
6
+ */
7
+ export default function useActive(items: MaybeRefOrGetter<SuggestionItem[]>, open: MaybeRefOrGetter<boolean>, rtl: MaybeRefOrGetter<boolean>, onSelect: (value: string[]) => void, onCancel: () => void): readonly [import("vue").Ref<string[], string[]>, KeyboardEventHandler];
@@ -1,4 +1,12 @@
1
1
  import type { ComponentToken as BubbleComponentToken } from '../bubble/style';
2
+ import type { ComponentToken as ConversationsComponentToken } from '../conversations/style';
3
+ import type { ComponentToken as PromptsComponentToken } from '../prompts/style';
4
+ import type { ComponentToken as SuggestionComponentToken } from '../suggestion/style';
5
+ import type { ComponentToken as WelcomeComponentToken } from '../welcome/style';
2
6
  export interface ComponentTokenMap {
3
7
  Bubble?: BubbleComponentToken;
8
+ Conversations?: ConversationsComponentToken;
9
+ Prompts?: PromptsComponentToken;
10
+ Suggestion?: SuggestionComponentToken;
11
+ Welcome?: WelcomeComponentToken;
4
12
  }
@@ -1,6 +1,6 @@
1
1
  import type { ComponentTokenMap } from './components';
2
2
  import type { AliasToken } from './cssinjs-utils';
3
- export declare const genStyleHooks: <C extends "Bubble">(component: C | [C, string], styleFn: import("../_util/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("../_util/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C>, options?: {
3
+ export declare const genStyleHooks: <C extends keyof ComponentTokenMap>(component: C | [C, string], styleFn: import("../_util/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("../_util/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C>, options?: {
4
4
  resetStyle?: boolean;
5
5
  resetFont?: boolean;
6
6
  deprecatedTokens?: [keyof Exclude<import("../_util/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>, keyof Exclude<import("../_util/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>][];
@@ -8,7 +8,7 @@ export declare const genStyleHooks: <C extends "Bubble">(component: C | [C, stri
8
8
  clientOnly?: boolean;
9
9
  order?: number;
10
10
  injectStyle?: boolean;
11
- }) => (prefixCls: import("vue").MaybeRefOrGetter<string>, rootCls?: string) => readonly [(node: import("vue").VNode) => import("vue").VNode, string, string], genComponentStyleHook: <C extends "Bubble">(componentName: C | [C, string], styleFn: import("../_util/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("../_util/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C>, options?: {
11
+ }) => (prefixCls: import("vue").MaybeRefOrGetter<string>, rootCls?: string) => readonly [(node: import("vue").VNode) => import("vue").VNode, string, string], genComponentStyleHook: <C extends keyof ComponentTokenMap>(componentName: C | [C, string], styleFn: import("../_util/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("../_util/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C>, options?: {
12
12
  resetStyle?: boolean;
13
13
  resetFont?: boolean;
14
14
  deprecatedTokens?: [keyof Exclude<import("../_util/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>, keyof Exclude<import("../_util/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>][];
@@ -16,7 +16,7 @@ export declare const genStyleHooks: <C extends "Bubble">(component: C | [C, stri
16
16
  order?: number;
17
17
  injectStyle?: boolean;
18
18
  unitless?: Partial<Record<keyof Exclude<import("../_util/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>, boolean>>;
19
- }) => (prefixCls: string, rootCls?: string) => import("../_util/cssinjs-utils/interface").UseComponentStyleResult, genSubStyleComponent: <C extends "Bubble">(componentName: C | [C, string], styleFn: import("../_util/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("../_util/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C>, options?: {
19
+ }) => (prefixCls: string, rootCls?: string) => import("../_util/cssinjs-utils/interface").UseComponentStyleResult, genSubStyleComponent: <C extends keyof ComponentTokenMap>(componentName: C | [C, string], styleFn: import("../_util/cssinjs-utils").GenStyleFn<ComponentTokenMap, AliasToken, C>, getDefaultToken?: import("../_util/cssinjs-utils").GetDefaultToken<ComponentTokenMap, AliasToken, C>, options?: {
20
20
  resetStyle?: boolean;
21
21
  resetFont?: boolean;
22
22
  deprecatedTokens?: [keyof Exclude<import("../_util/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>, keyof Exclude<import("../_util/cssinjs-utils").OverrideTokenMap<ComponentTokenMap, AliasToken>[C], undefined>][];
@@ -0,0 +1,3 @@
1
+ import type { WelcomeProps } from './interface';
2
+ declare const _default: import("vue").DefineComponent<WelcomeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WelcomeProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import Welcome from './Welcome.vue';
2
+ export type { WelcomeProps } from './interface';
3
+ export default Welcome;
4
+ export { Welcome };
@@ -0,0 +1,15 @@
1
+ import type { CSSProperties, VNode } from "vue";
2
+ export type SemanticType = 'title' | 'description' | 'icon' | 'extra';
3
+ export interface WelcomeProps {
4
+ prefixCls?: string;
5
+ rootClassName?: string;
6
+ className?: string;
7
+ style?: CSSProperties;
8
+ variant?: 'filled' | 'borderless';
9
+ classNames?: Partial<Record<SemanticType, string>>;
10
+ styles?: Partial<Record<SemanticType, CSSProperties>>;
11
+ icon?: VNode | string;
12
+ title?: VNode | string;
13
+ description?: VNode | string;
14
+ extra?: VNode;
15
+ }
@@ -0,0 +1,8 @@
1
+ import type { FullToken, GetDefaultToken } from '../../theme/cssinjs-utils';
2
+ export interface ComponentToken {
3
+ }
4
+ export interface WelcomeToken extends FullToken<'Welcome'> {
5
+ }
6
+ export declare const prepareComponentToken: GetDefaultToken<'Welcome'>;
7
+ declare const _default: (prefixCls: import("vue").MaybeRefOrGetter<string>, rootCls?: string) => readonly [(node: import("vue").VNode) => import("vue").VNode, string, string];
8
+ export default _default;
@@ -2,6 +2,10 @@ import { type AnyObject } from '../_util/type';
2
2
  import type { BubbleProps } from '../bubble';
3
3
  import { ComputedRef, CSSProperties } from 'vue';
4
4
  import type { ConfigProviderProps as AntdConfigProviderProps } from 'ant-design-vue/es/config-provider';
5
+ import type { ConversationsProps } from '../conversations';
6
+ import type { PromptsProps } from '../prompts';
7
+ import type { SuggestionProps } from '../suggestion';
8
+ import type { WelcomeProps } from '../welcome';
5
9
  export interface XComponentStyleConfig {
6
10
  classNames: Record<string, string>;
7
11
  styles: Record<string, CSSProperties>;
@@ -12,6 +16,10 @@ type DefaultPickType = keyof XComponentStyleConfig;
12
16
  type ComponentStyleConfig<CompProps extends AnyObject, PickType extends keyof CompProps = DefaultPickType> = Pick<CompProps, PickType | DefaultPickType>;
13
17
  export interface XProviderProps {
14
18
  bubble?: ComponentStyleConfig<BubbleProps>;
19
+ conversations?: ComponentStyleConfig<ConversationsProps>;
20
+ prompts?: ComponentStyleConfig<PromptsProps>;
21
+ suggestion?: ComponentStyleConfig<SuggestionProps>;
22
+ welcome?: ComponentStyleConfig<WelcomeProps>;
15
23
  antd?: AntdConfigProviderProps;
16
24
  }
17
25
  export type XComponentsConfig = Omit<XProviderProps, 'antd'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ant-design-x-vue",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "A vue library developed with dumi",
5
5
  "scripts": {
6
6
  "build": "vite build && vue-tsc --project ./tsconfig.build.json",