@baishuyun/chat-sdk 0.1.0 → 0.1.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.
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
4
+ variant?: "outline" | "default" | "destructive" | "secondary" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
7
  }
@@ -1,8 +1,8 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "entry" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "entry" | "icon" | "sm" | "lg" | null | undefined;
4
+ variant?: "outline" | "link" | "default" | "destructive" | "secondary" | "ghost" | "entry" | null | undefined;
5
+ size?: "icon" | "default" | "entry" | "sm" | "lg" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
@@ -14,7 +14,7 @@ export declare const useFakeGlobalLoadingMessage: () => {
14
14
  };
15
15
  /** @deprecated Use useChatStatus instead */
16
16
  export declare const useFrameMode: () => {
17
- mode: "dock" | "float";
17
+ mode: "float" | "dock";
18
18
  setMode: (mode: "dock" | "float") => void;
19
19
  };
20
20
  //# sourceMappingURL=use-frame-mode.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { CustomComponentType } from '@baishuyun/types';
2
- export declare const usePluginComponent: (compType: CustomComponentType) => import('react').ComponentType<import('@baishuyun/types').MsgPartCompProps> | import('react').ComponentType<{}> | import('react').ComponentType<import('@baishuyun/types').OpeningLinesProps> | import('react').ComponentType<import('@baishuyun/types').EntryButtonProps> | import('react').ComponentType<{
2
+ export declare const usePluginComponent: (compType: CustomComponentType) => import('react').ComponentType<{}> | import('react').ComponentType<import('@baishuyun/types').MsgPartCompProps> | import('react').ComponentType<import('@baishuyun/types').OpeningLinesProps> | import('react').ComponentType<import('@baishuyun/types').EntryButtonProps> | import('react').ComponentType<{
3
3
  variant?: "default" | "active";
4
4
  }> | null;
5
5
  //# sourceMappingURL=use-plugin-component.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baishuyun/chat-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "",
5
5
  "main": "src/index.jsx",
6
6
  "module": "dist/chat-sdk.js",
@@ -51,8 +51,8 @@
51
51
  "tailwindcss": "^4.1.17",
52
52
  "vite": "^5.1.4",
53
53
  "vite-plugin-dts": "^4.5.4",
54
- "@baishuyun/types": "1.1.0",
55
- "@baishuyun/typescript-config": "0.1.0"
54
+ "@baishuyun/typescript-config": "0.1.0",
55
+ "@baishuyun/types": "1.1.0"
56
56
  },
57
57
  "exports": {
58
58
  ".": {
@@ -108,7 +108,7 @@ function PureMultimodalInput({
108
108
 
109
109
  const placeholder = useChatPreference()?.placeholder || 'Send a message...';
110
110
  const maxCount = useChatPreference()?.acceptAttachmentMaxCount || 5;
111
- const maxSizeMb = useChatPreference()?.acceptAttachmentMaxSizeMb || 100;
111
+ const maxSizeMb = useChatPreference()?.acceptAttachmentMaxSizeMb || 50;
112
112
  const tooltip = `上传附件(仅识别文字),最多${maxCount}个,单个文件最大${maxSizeMb}MB`;
113
113
 
114
114
  const clearAttachmentsAndUploadQueue = useCallback(() => {
@@ -50,7 +50,7 @@ function FieldRow({
50
50
  return (
51
51
  <div className="flex items-center w-full">
52
52
  {/* 名称 */}
53
- <div className={cn(cellCls, 'w-20 shrink-0 min-h-[34px] whitespace-nowrap')}>
53
+ <div className={cn(cellCls, 'w-20 shrink-0 min-h-[34px]')}>
54
54
  {isSubFormChild && (
55
55
  <span className="inline-flex items-center justify-center shrink-0 w-5 h-5 opacity-0">
56
56
  <ChevronIcon />
@@ -59,11 +59,11 @@ function FieldRow({
59
59
  <span>{field.fieldName}</span>
60
60
  </div>
61
61
  {/* 类型 */}
62
- <div className={cn(cellCls, 'w-[72px] shrink-0 min-h-[34px] whitespace-nowrap')}>
62
+ <div className={cn(cellCls, 'w-[72px] shrink-0 min-h-[34px]')}>
63
63
  {field.type}
64
64
  </div>
65
65
  {/* 必填 */}
66
- <div className={cn(cellCls, 'w-9 shrink-0 min-h-[34px] whitespace-nowrap')}>
66
+ <div className={cn(cellCls, 'w-9 shrink-0 min-h-[34px]')}>
67
67
  {field.required ? '是' : '否'}
68
68
  </div>
69
69
  {/* 说明 */}
@@ -100,11 +100,11 @@ function SubFormGroup({
100
100
  <span>{parent.fieldName}</span>
101
101
  </div>
102
102
  {/* 类型 */}
103
- <div className={cn(cellCls, 'w-[72px] shrink-0 min-h-[34px] whitespace-nowrap')}>
103
+ <div className={cn(cellCls, 'w-[72px] shrink-0 min-h-[34px] ')}>
104
104
  {parent.type}
105
105
  </div>
106
106
  {/* 必填 */}
107
- <div className={cn(cellCls, 'w-9 shrink-0 min-h-[34px] whitespace-nowrap')}>
107
+ <div className={cn(cellCls, 'w-9 shrink-0 min-h-[34px]')}>
108
108
  {parent.required ? '是' : '否'}
109
109
  </div>
110
110
  {/* 说明 */}
@@ -126,21 +126,21 @@ export function FieldsDesignInfoTable({ fields }: FieldsDesignInfoTableProps) {
126
126
  <div className="flex flex-col items-start w-full bg-white rounded-[10px] overflow-hidden text-black my-[10px] border border-[#E0E0E0]">
127
127
  {/* 表头 */}
128
128
  <div className="flex items-center w-full shrink-0 bg-[#E5E6EB] rounded-t-[10px] border-b border-[#E0E0E0]">
129
- <div className={cn(cellCls, 'w-20 shrink-0 h-[34px] font-bold whitespace-nowrap')}>
129
+ <div className={cn(cellCls, 'w-20 shrink-0 h-[34px] font-bold')}>
130
130
  名称
131
131
  </div>
132
- <div className={cn(cellCls, 'w-[72px] shrink-0 h-[34px] font-bold whitespace-nowrap')}>
132
+ <div className={cn(cellCls, 'w-[72px] shrink-0 h-[34px] font-bold')}>
133
133
  类型
134
134
  </div>
135
135
  <div
136
136
  className={cn(
137
137
  cellCls,
138
- 'w-9 shrink-0 h-[34px] font-bold whitespace-nowrap justify-center'
138
+ 'w-9 shrink-0 h-[34px] font-bold justify-center'
139
139
  )}
140
140
  >
141
141
  必填
142
142
  </div>
143
- <div className={cn(cellCls, 'flex-1 min-w-0 h-[34px] font-bold whitespace-nowrap')}>
143
+ <div className={cn(cellCls, 'flex-1 min-w-0 h-[34px] font-bold')}>
144
144
  说明
145
145
  </div>
146
146
  </div>