@wzh-/ai-chat-example 1.0.3 → 1.0.5

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 (24) hide show
  1. package/dist/components/ai-elements/artifact/ArtifactAction.vue.d.ts +2 -2
  2. package/dist/components/ai-elements/artifact/ArtifactClose.vue.d.ts +2 -2
  3. package/dist/components/ai-elements/checkpoint/CheckpointTrigger.vue.d.ts +2 -2
  4. package/dist/components/ai-elements/conversation/Conversation.vue.d.ts +1 -1
  5. package/dist/components/ai-elements/message/MessageAction.vue.d.ts +2 -2
  6. package/dist/components/ai-elements/prompt-input/PromptInputButton.vue.d.ts +1 -1
  7. package/dist/components/ai-elements/prompt-input/PromptInputSubmit.vue.d.ts +1 -1
  8. package/dist/components/ai-elements/shimmer/Shimmer.vue.d.ts +1 -1
  9. package/dist/components/ai-elements/web-preview/WebPreviewNavigationButton.vue.d.ts +2 -2
  10. package/dist/components/ui/badge/index.d.ts +1 -1
  11. package/dist/components/ui/button/Button.vue.d.ts +1 -1
  12. package/dist/components/ui/button/index.d.ts +2 -2
  13. package/dist/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +1 -1
  14. package/dist/components/ui/button-group/ButtonGroupText.vue.d.ts +1 -1
  15. package/dist/components/ui/button-group/index.d.ts +1 -1
  16. package/dist/components/ui/carousel/CarouselNext.vue.d.ts +2 -2
  17. package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +2 -2
  18. package/dist/components/ui/input-group/InputGroupButton.vue.d.ts +1 -1
  19. package/dist/components/ui/select/Select.vue.d.ts +2 -2
  20. package/dist/components/ui/separator/Separator.vue.d.ts +1 -1
  21. package/dist/composables/useChat.d.ts +2 -2
  22. package/dist/types/css.d.ts +5 -0
  23. package/package.json +5 -6
  24. /package/dist/css/{style.css → index.css} +0 -0
@@ -20,8 +20,8 @@ declare function __VLS_template(): {
20
20
  };
21
21
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
22
  declare const __VLS_component: import('vue').DefineComponent<ArtifactActionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ArtifactActionProps> & Readonly<{}>, {
23
- size: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null;
24
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
23
+ size: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null;
24
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
25
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
27
  export default _default;
@@ -15,8 +15,8 @@ declare function __VLS_template(): {
15
15
  };
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<ArtifactCloseProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ArtifactCloseProps> & Readonly<{}>, {
18
- size: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null;
19
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
18
+ size: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null;
19
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
22
  export default _default;
@@ -15,8 +15,8 @@ declare function __VLS_template(): {
15
15
  };
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
18
- size: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null;
19
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
18
+ size: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null;
19
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
22
  export default _default;
@@ -27,6 +27,7 @@ declare function __VLS_template(): {
27
27
  };
28
28
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
29
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
30
+ anchor: "auto" | "none";
30
31
  ariaLabel: string;
31
32
  initial: boolean | "instant" | {
32
33
  damping?: number;
@@ -36,7 +37,6 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
36
37
  damping: number;
37
38
  stiffness: number;
38
39
  mass: number;
39
- anchor: "auto" | "none";
40
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
41
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
42
42
  export default _default;
@@ -16,8 +16,8 @@ declare function __VLS_template(): {
16
16
  };
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
18
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
- size: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null;
20
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
19
+ size: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null;
20
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
21
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
23
  export default _default;
@@ -9,7 +9,7 @@ interface Props extends /* @vue-ignore */ InputGroupButtonProps {
9
9
  declare function __VLS_template(): any;
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
12
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
12
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
13
13
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
15
  export default _default;
@@ -19,7 +19,7 @@ declare function __VLS_template(): {
19
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
20
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
21
21
  size: "sm" | "icon-sm" | "xs" | "icon-xs" | null;
22
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
22
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
23
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
25
  export default _default;
@@ -15,8 +15,8 @@ declare function __VLS_template(): {
15
15
  };
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<TextShimmerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TextShimmerProps> & Readonly<{}>, {
18
- duration: number;
19
18
  as: keyof HTMLElementTagNameMap;
19
+ duration: number;
20
20
  spread: number;
21
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -16,9 +16,9 @@ declare function __VLS_template(): {
16
16
  };
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
18
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
+ size: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null;
20
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
19
21
  disabled: boolean;
20
- size: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null;
21
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
22
22
  tooltip: string;
23
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  export { default as Badge } from './Badge.vue';
3
3
  export declare const badgeVariants: (props?: ({
4
- variant?: "default" | "outline" | "secondary" | "destructive" | null | undefined;
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  export type BadgeVariants = VariantProps<typeof badgeVariants>;
@@ -16,7 +16,7 @@ declare function __VLS_template(): {
16
16
  };
17
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
18
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
19
- as: import('reka-ui').AsTag | Component;
19
+ as: import('reka-ui').AsTag | import('vue').Component;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
21
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
22
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  export { default as Button } from './Button.vue';
3
3
  export declare const buttonVariants: (props?: ({
4
- variant?: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
5
- size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export type ButtonVariants = VariantProps<typeof buttonVariants>;
@@ -4,6 +4,6 @@ type __VLS_Props = SeparatorProps & {
4
4
  class?: HTMLAttributes["class"];
5
5
  };
6
6
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
- orientation: "horizontal" | "vertical";
7
+ orientation: "vertical" | "horizontal";
8
8
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
9
  export default _default;
@@ -15,7 +15,7 @@ declare function __VLS_template(): {
15
15
  };
16
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
18
- as: import('reka-ui').AsTag | Component;
18
+ as: import('reka-ui').AsTag | import('vue').Component;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
21
  export default _default;
@@ -3,6 +3,6 @@ export { default as ButtonGroup } from './ButtonGroup.vue';
3
3
  export { default as ButtonGroupSeparator } from './ButtonGroupSeparator.vue';
4
4
  export { default as ButtonGroupText } from './ButtonGroupText.vue';
5
5
  export declare const buttonGroupVariants: (props?: ({
6
- orientation?: "horizontal" | "vertical" | null | undefined;
6
+ orientation?: "vertical" | "horizontal" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  export type ButtonGroupVariants = VariantProps<typeof buttonGroupVariants>;
@@ -14,8 +14,8 @@ declare function __VLS_template(): {
14
14
  };
15
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
16
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
- size: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null;
18
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
17
+ size: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null;
18
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
21
  export default _default;
@@ -14,8 +14,8 @@ declare function __VLS_template(): {
14
14
  };
15
15
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
16
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
- size: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null;
18
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
17
+ size: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null;
18
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
21
  export default _default;
@@ -10,7 +10,7 @@ declare function __VLS_template(): {
10
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
11
  declare const __VLS_component: import('vue').DefineComponent<InputGroupButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<InputGroupButtonProps> & Readonly<{}>, {
12
12
  size: "sm" | "icon-sm" | "xs" | "icon-xs" | null;
13
- variant: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null;
13
+ variant: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null;
14
14
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
15
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
16
  export default _default;
@@ -13,11 +13,11 @@ declare function __VLS_template(): {
13
13
  };
14
14
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
15
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
- "update:open": (value: boolean) => any;
17
16
  "update:modelValue": (value: import('reka-ui').AcceptableValue) => any;
17
+ "update:open": (value: boolean) => any;
18
18
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
20
19
  "onUpdate:modelValue"?: ((value: import('reka-ui').AcceptableValue) => any) | undefined;
20
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
21
21
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
23
  export default _default;
@@ -4,7 +4,7 @@ type __VLS_Props = SeparatorProps & {
4
4
  class?: HTMLAttributes["class"];
5
5
  };
6
6
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
- orientation: "horizontal" | "vertical";
7
+ orientation: "vertical" | "horizontal";
8
8
  decorative: boolean;
9
9
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
10
  export default _default;
@@ -2,7 +2,7 @@ import { Chat } from '@ai-sdk/vue';
2
2
  import { PromptInputMessage } from '../components/ai-elements/prompt-input';
3
3
  export declare const useChat: (api: string, Authorization: string) => {
4
4
  chat: Chat<import('ai').UIMessage<unknown, import('ai').UIDataTypes, import('ai').UITools>>;
5
- messages: globalThis.ComputedRef<import('ai').UIMessage<unknown, import('ai').UIDataTypes, import('ai').UITools>[]>;
6
- status: globalThis.ComputedRef<import('ai').ChatStatus>;
5
+ messages: import('vue').ComputedRef<import('ai').UIMessage<unknown, import('ai').UIDataTypes, import('ai').UITools>[]>;
6
+ status: import('vue').ComputedRef<import('ai').ChatStatus>;
7
7
  handleSubmit: (message: PromptInputMessage) => void;
8
8
  };
@@ -0,0 +1,5 @@
1
+ // 声明包内的 CSS 文件导出类型
2
+ declare module '@wzh-/ai-chat-example/dist/css/style.css' {
3
+ const styles: string;
4
+ export default styles;
5
+ }
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@wzh-/ai-chat-example",
3
3
  "private": false,
4
- "version": "1.0.3",
4
+ "version": "1.0.5",
5
5
  "type": "module",
6
- "module": "./dist/js/index.js",
7
- "types": "./dist/index.d.ts",
8
- "style":"./dist/css/style.css",
6
+ "module": "./dist/js/index.js",
7
+ "types": "./dist/index.d.ts",
9
8
  "files": [
10
9
  "dist"
11
10
  ],
@@ -27,7 +26,6 @@
27
26
  "@vue-flow/node-toolbar": "^1.1.1",
28
27
  "@vueuse/core": "^14.1.0",
29
28
  "ai": "^6.0.1",
30
- "axios": "^1.6.5",
31
29
  "class-variance-authority": "^0.7.1",
32
30
  "clsx": "^2.1.1",
33
31
  "embla-carousel-vue": "^8.6.0",
@@ -55,7 +53,8 @@
55
53
  "vite": "npm:rolldown-vite@7.2.5",
56
54
  "vite-plugin-dts": "^4.5.4",
57
55
  "vite-tsconfig-paths": "^6.0.1",
58
- "vue-tsc": "^3.1.4"
56
+ "vue-tsc": "^3.1.4",
57
+ "axios": "^1.6.5"
59
58
  },
60
59
  "pnpm": {
61
60
  "overrides": {
File without changes