ant-design-x-vue 0.1.0 → 0.1.2

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.
@@ -1,4 +1,5 @@
1
1
  import type { AvatarProps } from 'ant-design-vue';
2
+ import type { AvoidValidation } from '../type-utility';
2
3
  import type { CSSProperties, HTMLAttributes, VNode } from 'vue';
3
4
  export interface TypingOption {
4
5
  /**
@@ -27,7 +28,7 @@ export interface BubbleProps extends /* @vue-ignore */ Omit<HTMLAttributes, 'con
27
28
  avatar?: Partial<_AvatarProps> | VNode;
28
29
  placement?: 'start' | 'end';
29
30
  loading?: boolean;
30
- typing?: boolean | TypingOption;
31
+ typing?: AvoidValidation<TypingOption | boolean>;
31
32
  content?: VNode | object | string;
32
33
  messageRender?: (content: string) => VNode | string;
33
34
  loadingRender?: () => VNode;
@@ -63,5 +64,5 @@ export interface BubbleListProps extends /* @vue-ignore */ HTMLAttributes {
63
64
  rootClassName?: string;
64
65
  items?: BubbleDataType[];
65
66
  autoScroll?: boolean;
66
- roles?: RolesType;
67
+ roles?: AvoidValidation<RolesType>;
67
68
  }
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ prefixCls: string;
3
+ };
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: {
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: any;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
+ export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -1,9 +1,9 @@
1
1
  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<{
2
2
  props: {
3
+ htmlType?: import("ant-design-vue/es/button/buttonTypes.js").ButtonHTMLType;
3
4
  loading?: boolean | {
4
5
  delay?: number;
5
6
  };
6
- htmlType?: import("ant-design-vue/es/button/buttonTypes.js").ButtonHTMLType;
7
7
  size?: import("ant-design-vue/es/config-provider/context.js").SizeType;
8
8
  prefixCls?: string;
9
9
  type?: import("ant-design-vue/es/button/buttonTypes.js").ButtonType;
@@ -1,9 +1,9 @@
1
1
  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<{
2
2
  props: {
3
+ htmlType?: import("ant-design-vue/es/button/buttonTypes.js").ButtonHTMLType;
3
4
  loading?: boolean | {
4
5
  delay?: number;
5
6
  };
6
- htmlType?: import("ant-design-vue/es/button/buttonTypes.js").ButtonHTMLType;
7
7
  size?: import("ant-design-vue/es/config-provider/context.js").SizeType;
8
8
  prefixCls?: string;
9
9
  type?: import("ant-design-vue/es/button/buttonTypes.js").ButtonType;
@@ -1,9 +1,9 @@
1
1
  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<{
2
2
  props: {
3
+ htmlType?: import("ant-design-vue/es/button/buttonTypes.js").ButtonHTMLType;
3
4
  loading?: boolean | {
4
5
  delay?: number;
5
6
  };
6
- htmlType?: import("ant-design-vue/es/button/buttonTypes.js").ButtonHTMLType;
7
7
  size?: import("ant-design-vue/es/config-provider/context.js").SizeType;
8
8
  prefixCls?: string;
9
9
  type?: import("ant-design-vue/es/button/buttonTypes.js").ButtonType;
@@ -4,6 +4,7 @@ import type { ConfigProviderProps } from "ant-design-vue/es/config-provider/cont
4
4
  import type { CSSProperties, VNode } from "vue";
5
5
  import type { AllowSpeech } from "./useSpeech";
6
6
  import type { InputRef } from "ant-design-vue/es/vc-input/inputProps";
7
+ import type { AvoidValidation } from '../type-utility';
7
8
  import SendButton from "./components/SendButton.vue";
8
9
  import ClearButton from "./components/ClearButton.vue";
9
10
  import LoadingButton from "./components/LoadingButton.vue";
@@ -18,12 +19,13 @@ export type ActionsRender = (ori: VNode, info: {
18
19
  LoadingButton: typeof LoadingButton;
19
20
  };
20
21
  }) => VNode;
21
- export interface SenderProps extends Pick<TextAreaProps, 'placeholder'> {
22
+ export interface SenderProps {
22
23
  onKeyPress?: KeyboardEventHandler;
23
24
  prefixCls?: string;
24
25
  defaultValue?: string;
25
26
  value?: string;
26
27
  loading?: boolean;
28
+ placeholder?: TextAreaProps['placeholder'];
27
29
  readOnly?: boolean;
28
30
  submitType?: SubmitType;
29
31
  disabled?: boolean;
@@ -48,7 +50,7 @@ export interface SenderProps extends Pick<TextAreaProps, 'placeholder'> {
48
50
  style?: CSSProperties;
49
51
  className?: string;
50
52
  actions?: VNode | ActionsRender;
51
- allowSpeech?: AllowSpeech;
53
+ allowSpeech?: AvoidValidation<AllowSpeech>;
52
54
  prefix?: VNode;
53
55
  header?: VNode;
54
56
  }
@@ -1,4 +1,4 @@
1
- import type { GenerateStyle } from '../../theme/cssinjs-utils';
2
1
  import type { SenderToken } from '.';
2
+ import type { GenerateStyle } from '../../theme/cssinjs-utils';
3
3
  declare const genSenderHeaderStyle: GenerateStyle<SenderToken>;
4
4
  export default genSenderHeaderStyle;
@@ -1,4 +1,4 @@
1
- import { MaybeRefOrGetter } from 'vue';
1
+ import { type MaybeRefOrGetter } from 'vue';
2
2
  export type ControlledSpeechConfig = {
3
3
  recording?: boolean;
4
4
  onRecordingChange: (recording: boolean) => void;
@@ -0,0 +1 @@
1
+ export type AvoidValidation<T> = T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ant-design-x-vue",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A vue library developed with dumi",
5
5
  "scripts": {
6
6
  "build": "vite build && vue-tsc --project ./tsconfig.build.json",