@easyv/biz-components 1.0.24 → 1.0.25

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,5 +1,5 @@
1
- var coWebWorker = { exports: {} };
1
+ var propTypes = { exports: {} };
2
2
  export {
3
- coWebWorker as __module
3
+ propTypes as __module
4
4
  };
5
5
  //# sourceMappingURL=index.es2.js.map
@@ -1,5 +1,5 @@
1
- var propTypes = { exports: {} };
1
+ var classnames = { exports: {} };
2
2
  export {
3
- propTypes as __module
3
+ classnames as __module
4
4
  };
5
5
  //# sourceMappingURL=index.es3.js.map
@@ -1,5 +1,5 @@
1
- var classnames = { exports: {} };
1
+ var coWebWorker = { exports: {} };
2
2
  export {
3
- classnames as __module
3
+ coWebWorker as __module
4
4
  };
5
5
  //# sourceMappingURL=index.es4.js.map
@@ -3,6 +3,10 @@ import { AiModel, AiModelServiceProvider } from './types';
3
3
  export interface AiModelSelectPanelProps {
4
4
  className?: string;
5
5
  modelServiceProviderList: AiModelServiceProvider[];
6
+ value?: {
7
+ modelProviderId: string;
8
+ modelId: string;
9
+ };
6
10
  onSelect?: (AiModelServiceProvider: AiModelServiceProvider, model: AiModel) => void;
7
11
  style?: React.CSSProperties;
8
12
  titleClassName?: string;
@@ -8,6 +8,7 @@ const AiModelSelectPanel = (props) => {
8
8
  const {
9
9
  className = "",
10
10
  modelServiceProviderList,
11
+ value,
11
12
  onSelect,
12
13
  style,
13
14
  titleClassName,
@@ -86,6 +87,7 @@ const AiModelSelectPanel = (props) => {
86
87
  setInputValue("");
87
88
  }
88
89
  };
90
+ const isSelected = (value == null ? void 0 : value.modelProviderId) === modelProvider.id && (value == null ? void 0 : value.modelId) === (model == null ? void 0 : model.id);
89
91
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
90
92
  "div",
91
93
  {
@@ -93,6 +95,7 @@ const AiModelSelectPanel = (props) => {
93
95
  "biz-px-3 biz-py-[3px] biz-flex biz-items-center biz-gap-2",
94
96
  "biz-text-text-2 biz-h-8 biz-w-full biz-box-border",
95
97
  "hover:biz-bg-bg-white biz-cursor-pointer biz-group",
98
+ isSelected && "biz-bg-bg-white",
96
99
  itemClassName
97
100
  ),
98
101
  onClick: () => {
@@ -102,7 +105,7 @@ const AiModelSelectPanel = (props) => {
102
105
  },
103
106
  children: showInputProviderId === modelProvider.id ? renderInput({
104
107
  value: inputValue,
105
- onChange: (value) => setInputValue(value),
108
+ onChange: (value2) => setInputValue(value2),
106
109
  onPressEnter: handlePressEnter,
107
110
  onBlur: handlePressEnter
108
111
  }) : normalContent
@@ -1 +1 @@
1
- {"version":3,"file":"ai-model-select-panel.es.js","sources":["../../../src/components/ai-model-select/ai-model-select-panel.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { EditOutlined, PlusOutlined } from '@easyv/react-icons';\nimport classNames from 'classnames';\nimport { produce } from 'immer';\nimport { IconBtn } from './iconBtn';\nimport { AiModel, AiModelServiceProvider } from './types';\n\nexport interface AiModelSelectPanelProps {\n className?: string;\n modelServiceProviderList: AiModelServiceProvider[];\n onSelect?: (AiModelServiceProvider: AiModelServiceProvider, model: AiModel) => void;\n style?: React.CSSProperties;\n titleClassName?: string;\n itemClassName?: string;\n renderInput: (props: {\n value: string;\n onChange: (value: string) => void;\n onPressEnter: () => void;\n onBlur: () => void;\n }) => React.ReactNode;\n}\n\nexport const AiModelSelectPanel = (props: AiModelSelectPanelProps) => {\n const {\n className = '',\n modelServiceProviderList,\n onSelect,\n style,\n titleClassName,\n itemClassName,\n renderInput,\n } = props;\n\n const [customModelServiceProviderList, setCustomModelServiceProviderList] = useState(\n modelServiceProviderList.filter((item) => item.isCustom),\n );\n const [showInputProviderId, setShowInputProviderId] = useState<string>('');\n const [inputValue, setInputValue] = useState<string>('');\n\n const otherModelServiceProviderList = modelServiceProviderList.filter((item) => !item.isCustom);\n\n const handleSelect = (modelProvider: AiModelServiceProvider, model: AiModel) => {\n onSelect?.(modelProvider, model);\n };\n\n const renderTitle = (modelProvider: AiModelServiceProvider) => {\n return (\n <div\n className={classNames(\n 'biz-h-6 biz-text-text-3 biz-px-3 biz-pt-1 biz-w-full',\n 'biz-flex biz-items-center biz-box-border biz-gap-2.5 biz-text-[14px]',\n titleClassName,\n )}\n title={modelProvider.name}\n >\n <div className='biz-w-0 biz-flex-1 biz-truncate'>{modelProvider.name}</div>\n {modelProvider.isCustom && modelProvider.modelList.length === 0 && (\n <IconBtn\n onClick={() => {\n setShowInputProviderId(modelProvider.id);\n }}\n icon={\n <PlusOutlined className='biz-w-3 biz-h-3 biz-text-text-2 hover:biz-text-text-1 biz-flex-center' />\n }\n />\n )}\n </div>\n );\n };\n\n const renderItem = (modelProvider: AiModelServiceProvider, model?: AiModel) => {\n if (modelProvider.isCustom) {\n if (modelProvider.id !== showInputProviderId && !modelProvider.modelList?.length) {\n return null;\n }\n }\n const normalContent = (\n <>\n <img src={modelProvider.iconSrc} className='biz-w-4 biz-h-4' />\n <div className='biz-truncate biz-w-0 biz-flex-1 biz-text-[14px]' title={model?.name}>\n {model?.name}\n </div>\n {modelProvider.isCustom && (\n <IconBtn\n onClick={(e) => {\n setShowInputProviderId(modelProvider.id);\n setInputValue(model?.name || '');\n e.stopPropagation();\n }}\n className='biz-hidden group-hover:!biz-flex'\n style={{ display: 'none' }}\n icon={\n <EditOutlined className='biz-w-3 biz-h-3 biz-text-text-2 hover:biz-text-text-1 biz-flex-center' />\n }\n />\n )}\n </>\n );\n\n const handlePressEnter = () => {\n if (inputValue) {\n setCustomModelServiceProviderList(\n produce(customModelServiceProviderList, (draft) => {\n const index = draft.findIndex((i) => i.id === modelProvider.id);\n if (index !== -1) {\n draft[index].modelList = [{ id: inputValue, name: inputValue }];\n }\n }),\n );\n setShowInputProviderId('');\n setInputValue('');\n }\n };\n\n return (\n <div\n key={model?.id}\n className={classNames(\n 'biz-px-3 biz-py-[3px] biz-flex biz-items-center biz-gap-2',\n 'biz-text-text-2 biz-h-8 biz-w-full biz-box-border',\n 'hover:biz-bg-bg-white biz-cursor-pointer biz-group',\n itemClassName,\n )}\n onClick={() => {\n if (model && !showInputProviderId) {\n handleSelect(modelProvider, model);\n }\n }}\n >\n {showInputProviderId === modelProvider.id\n ? renderInput({\n value: inputValue,\n onChange: (value) => setInputValue(value),\n onPressEnter: handlePressEnter,\n onBlur: handlePressEnter,\n })\n : normalContent}\n </div>\n );\n };\n\n return (\n <div\n style={style}\n className={classNames(\n 'biz-bg-[#181B22] biz-border-one biz-rounded-[4px] biz-py-1',\n 'biz-flex biz-flex-col gap-1 biz-w-[160px] biz-max-h-[450px] biz-overflow-auto',\n className,\n )}\n >\n {otherModelServiceProviderList.map((provider) => (\n <div\n key={provider.id}\n className='biz-flex biz-flex-col biz-gap-1 biz-w-full biz-box-border'\n >\n {renderTitle(provider)}\n <div className='biz-flex biz-flex-col gap-1 biz-w-full'>\n {provider.modelList.map((model) => renderItem(provider, model))}\n </div>\n </div>\n ))}\n {customModelServiceProviderList.map((provider) => (\n <div\n key={provider.id}\n className='biz-flex biz-flex-col biz-gap-1 biz-w-full biz-box-border'\n >\n {renderTitle(provider)}\n <div className='biz-flex biz-flex-col gap-1 biz-w-full'>\n {renderItem(provider, provider.modelList[0])}\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["jsxs","jsx","Fragment"],"mappings":";;;;;;AAsBa,MAAA,qBAAqB,CAAC,UAAmC;AAC9D,QAAA;AAAA,IACJ,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE;AAEE,QAAA,CAAC,gCAAgC,iCAAiC,IAAI;AAAA,IAC1E,yBAAyB,OAAO,CAAC,SAAS,KAAK,QAAQ;AAAA,EACzD;AACA,QAAM,CAAC,qBAAqB,sBAAsB,IAAI,SAAiB,EAAE;AACzE,QAAM,CAAC,YAAY,aAAa,IAAI,SAAiB,EAAE;AAEvD,QAAM,gCAAgC,yBAAyB,OAAO,CAAC,SAAS,CAAC,KAAK,QA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,IAAI,CAAC,UAAU,WAAW,UAAU,KAAK,CAAC,EAChE,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UANK,SAAS;AAAA,QAAA,CAQjB;AAAA,QACA,+BAA+B,IAAI,CAAC,aACnCD,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YAET,UAAA;AAAA,cAAA,YAAY,QAAQ;AAAA,cACrBC,kCAAAA,IAAC,OAAI,EAAA,WAAU,0CACZ,UAAA,WAAW,UAAU,SAAS,UAAU,CAAC,CAAC,EAC7C,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UANK,SAAS;AAAA,QAQjB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"ai-model-select-panel.es.js","sources":["../../../src/components/ai-model-select/ai-model-select-panel.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { EditOutlined, PlusOutlined } from '@easyv/react-icons';\nimport classNames from 'classnames';\nimport { produce } from 'immer';\nimport { IconBtn } from './iconBtn';\nimport { AiModel, AiModelServiceProvider } from './types';\n\nexport interface AiModelSelectPanelProps {\n className?: string;\n modelServiceProviderList: AiModelServiceProvider[];\n value?: {\n modelProviderId: string;\n modelId: string;\n };\n onSelect?: (AiModelServiceProvider: AiModelServiceProvider, model: AiModel) => void;\n style?: React.CSSProperties;\n titleClassName?: string;\n itemClassName?: string;\n renderInput: (props: {\n value: string;\n onChange: (value: string) => void;\n onPressEnter: () => void;\n onBlur: () => void;\n }) => React.ReactNode;\n}\n\nexport const AiModelSelectPanel = (props: AiModelSelectPanelProps) => {\n const {\n className = '',\n modelServiceProviderList,\n value,\n onSelect,\n style,\n titleClassName,\n itemClassName,\n renderInput,\n } = props;\n\n const [customModelServiceProviderList, setCustomModelServiceProviderList] = useState(\n modelServiceProviderList.filter((item) => item.isCustom),\n );\n const [showInputProviderId, setShowInputProviderId] = useState<string>('');\n const [inputValue, setInputValue] = useState<string>('');\n\n const otherModelServiceProviderList = modelServiceProviderList.filter((item) => !item.isCustom);\n\n const handleSelect = (modelProvider: AiModelServiceProvider, model: AiModel) => {\n onSelect?.(modelProvider, model);\n };\n\n const renderTitle = (modelProvider: AiModelServiceProvider) => {\n return (\n <div\n className={classNames(\n 'biz-h-6 biz-text-text-3 biz-px-3 biz-pt-1 biz-w-full',\n 'biz-flex biz-items-center biz-box-border biz-gap-2.5 biz-text-[14px]',\n titleClassName,\n )}\n title={modelProvider.name}\n >\n <div className='biz-w-0 biz-flex-1 biz-truncate'>{modelProvider.name}</div>\n {modelProvider.isCustom && modelProvider.modelList.length === 0 && (\n <IconBtn\n onClick={() => {\n setShowInputProviderId(modelProvider.id);\n }}\n icon={\n <PlusOutlined className='biz-w-3 biz-h-3 biz-text-text-2 hover:biz-text-text-1 biz-flex-center' />\n }\n />\n )}\n </div>\n );\n };\n\n const renderItem = (modelProvider: AiModelServiceProvider, model?: AiModel) => {\n if (modelProvider.isCustom) {\n if (modelProvider.id !== showInputProviderId && !modelProvider.modelList?.length) {\n return null;\n }\n }\n const normalContent = (\n <>\n <img src={modelProvider.iconSrc} className='biz-w-4 biz-h-4' />\n <div className='biz-truncate biz-w-0 biz-flex-1 biz-text-[14px]' title={model?.name}>\n {model?.name}\n </div>\n {modelProvider.isCustom && (\n <IconBtn\n onClick={(e) => {\n setShowInputProviderId(modelProvider.id);\n setInputValue(model?.name || '');\n e.stopPropagation();\n }}\n className='biz-hidden group-hover:!biz-flex'\n style={{ display: 'none' }}\n icon={\n <EditOutlined className='biz-w-3 biz-h-3 biz-text-text-2 hover:biz-text-text-1 biz-flex-center' />\n }\n />\n )}\n </>\n );\n\n const handlePressEnter = () => {\n if (inputValue) {\n setCustomModelServiceProviderList(\n produce(customModelServiceProviderList, (draft) => {\n const index = draft.findIndex((i) => i.id === modelProvider.id);\n if (index !== -1) {\n draft[index].modelList = [{ id: inputValue, name: inputValue }];\n }\n }),\n );\n setShowInputProviderId('');\n setInputValue('');\n }\n };\n\n const isSelected = value?.modelProviderId === modelProvider.id && value?.modelId === model?.id;\n return (\n <div\n key={model?.id}\n className={classNames(\n 'biz-px-3 biz-py-[3px] biz-flex biz-items-center biz-gap-2',\n 'biz-text-text-2 biz-h-8 biz-w-full biz-box-border',\n 'hover:biz-bg-bg-white biz-cursor-pointer biz-group',\n isSelected && 'biz-bg-bg-white',\n itemClassName,\n )}\n onClick={() => {\n if (model && !showInputProviderId) {\n handleSelect(modelProvider, model);\n }\n }}\n >\n {showInputProviderId === modelProvider.id\n ? renderInput({\n value: inputValue,\n onChange: (value) => setInputValue(value),\n onPressEnter: handlePressEnter,\n onBlur: handlePressEnter,\n })\n : normalContent}\n </div>\n );\n };\n\n return (\n <div\n style={style}\n className={classNames(\n 'biz-bg-[#181B22] biz-border-one biz-rounded-[4px] biz-py-1',\n 'biz-flex biz-flex-col gap-1 biz-w-[160px] biz-max-h-[450px] biz-overflow-auto',\n className,\n )}\n >\n {otherModelServiceProviderList.map((provider) => (\n <div\n key={provider.id}\n className='biz-flex biz-flex-col biz-gap-1 biz-w-full biz-box-border'\n >\n {renderTitle(provider)}\n <div className='biz-flex biz-flex-col gap-1 biz-w-full'>\n {provider.modelList.map((model) => renderItem(provider, model))}\n </div>\n </div>\n ))}\n {customModelServiceProviderList.map((provider) => (\n <div\n key={provider.id}\n className='biz-flex biz-flex-col biz-gap-1 biz-w-full biz-box-border'\n >\n {renderTitle(provider)}\n <div className='biz-flex biz-flex-col gap-1 biz-w-full'>\n {renderItem(provider, provider.modelList[0])}\n </div>\n </div>\n ))}\n </div>\n );\n};\n"],"names":["jsxs","jsx","Fragment","value"],"mappings":";;;;;;AA0Ba,MAAA,qBAAqB,CAAC,UAAmC;AAC9D,QAAA;AAAA,IACJ,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE;AAEE,QAAA,CAAC,gCAAgC,iCAAiC,IAAI;AAAA,IAC1E,yBAAyB,OA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;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC,UAAA;AAAA,QAA8B,8BAAA,IAAI,CAAC,aAClCA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YAET,UAAA;AAAA,cAAA,YAAY,QAAQ;AAAA,cACpBC,kCAAAA,IAAA,OAAA,EAAI,WAAU,0CACZ,UAAS,SAAA,UAAU,IAAI,CAAC,UAAU,WAAW,UAAU,KAAK,CAAC,EAChE,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UANK,SAAS;AAAA,QAAA,CAQjB;AAAA,QACA,+BAA+B,IAAI,CAAC,aACnCD,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YAET,UAAA;AAAA,cAAA,YAAY,QAAQ;AAAA,cACrBC,kCAAAA,IAAC,OAAI,EAAA,WAAU,0CACZ,UAAA,WAAW,UAAU,SAAS,UAAU,CAAC,CAAC,EAC7C,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UANK,SAAS;AAAA,QAQjB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
package/dist/index.es.js CHANGED
@@ -21,6 +21,7 @@ import { XFStreamVoiceManager } from "./utils/xun-fei-voice/XF-stream-voice-mana
21
21
  import { RecorderManager } from "./utils/xun-fei-voice/recorder-manager/RecorderManager.es.js";
22
22
  import { AudioManager, defaultSampleRate } from "./utils/vosk-browser-manager/audio-manager/audio-manager.es.js";
23
23
  import { VoskBrowserManager } from "./utils/vosk-browser-manager/vosk-browser-manager.es.js";
24
+ import { wait, waitSomeThingBeTrue } from "./utils/wait-something/index.es.js";
24
25
  import { EasyvInput } from "./ant-components/input/input.es.js";
25
26
  export {
26
27
  AiAgentMessageType,
@@ -60,6 +61,8 @@ export {
60
61
  useInitialized,
61
62
  useSocketEvents,
62
63
  useWatchValue,
63
- useXunFeiSteamVoiceManager
64
+ useXunFeiSteamVoiceManager,
65
+ wait,
66
+ waitSomeThingBeTrue
64
67
  };
65
68
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from "../../../../../_virtual/_commonjsHelpers.es.js";
2
- import { __module as classnames$1 } from "../../../../../_virtual/index.es4.js";
2
+ import { __module as classnames$1 } from "../../../../../_virtual/index.es3.js";
3
3
  /*!
4
4
  Copyright (c) 2018 Jed Watson.
5
5
  Licensed under the MIT License (MIT), see
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from "../../../../../_virtual/_commonjsHelpers.es.js";
2
- import { __module as coWebWorker } from "../../../../../_virtual/index.es2.js";
2
+ import { __module as coWebWorker } from "../../../../../_virtual/index.es4.js";
3
3
  class CrossOriginWorker extends Worker {
4
4
  constructor(scriptUrl) {
5
5
  const b = new Blob([`importScripts('${new URL(scriptUrl).toString()}')`], { type: "application/javascript" });
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from "../../../../../_virtual/_commonjsHelpers.es.js";
2
- import { __module as propTypes } from "../../../../../_virtual/index.es3.js";
2
+ import { __module as propTypes } from "../../../../../_virtual/index.es2.js";
3
3
  import { __require as requireReactIs } from "../../../react-is@16.13.1/node_modules/react-is/index.es.js";
4
4
  import { __require as requireFactoryWithTypeCheckers } from "./factoryWithTypeCheckers.es.js";
5
5
  import { __require as requireFactoryWithThrowingShims } from "./factoryWithThrowingShims.es.js";