node-karin 1.3.12 → 1.3.14

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.3.14](https://github.com/KarinJS/Karin/compare/core-v1.3.13...core-v1.3.14) (2025-02-18)
4
+
5
+
6
+ ### 🐛 Bug Fixes
7
+
8
+ * connectTime ([b6ec69e](https://github.com/KarinJS/Karin/commit/b6ec69e04acbf043ccd1724e583de7e4c19b4d24))
9
+ * redis.setEx ([f6f69ed](https://github.com/KarinJS/Karin/commit/f6f69ed1a4b35826011954a2df229514456a9958))
10
+ * 手风琴适配输入框组 ([1e33a72](https://github.com/KarinJS/Karin/commit/1e33a72157fd1c4420f3c97a45bce0412bc31cb0))
11
+ * 新增组件输入框组 ([834a2bd](https://github.com/KarinJS/Karin/commit/834a2bd558670ebff54ef948c1f3fd15d026077b))
12
+
13
+ ## [1.3.13](https://github.com/KarinJS/Karin/compare/core-v1.3.12...core-v1.3.13) (2025-02-16)
14
+
15
+
16
+ ### 🐛 Bug Fixes
17
+
18
+ * console adapter基本接口 ([42c421d](https://github.com/KarinJS/Karin/commit/42c421d295c6666c14f75e2f4a2113fdd1f66fd7))
19
+ * console adapter基本接口 ([041031d](https://github.com/KarinJS/Karin/commit/041031d2a8093a5ab33aadd5e5aba918f294342f))
20
+
3
21
  ## [1.3.12](https://github.com/KarinJS/Karin/compare/core-v1.3.11...core-v1.3.12) (2025-02-15)
4
22
 
5
23
 
package/dist/index.d.ts CHANGED
@@ -9975,142 +9975,6 @@ declare const render: RenderCache;
9975
9975
  */
9976
9976
  declare const Renderer: RenderCache;
9977
9977
 
9978
- type Option = {
9979
- label: string;
9980
- value: string | number;
9981
- disabled?: boolean;
9982
- };
9983
- /** 组件类型 */
9984
- type FieldType = 'text' | 'number' | 'switch' | 'select' | 'object' | 'divider' | 'array' | 'objectArray' | 'colorPicker' | 'radio' | 'checkbox' | 'section' | 'title';
9985
- /** 值类型 */
9986
- type ValueType = 'string' | 'number' | 'boolean' | 'object';
9987
- interface BaseField {
9988
- /** 组件类型 */
9989
- type: FieldType;
9990
- /** 字段 */
9991
- key: string;
9992
- /** 显示文本 */
9993
- label?: string;
9994
- /** 是否必填 */
9995
- required?: boolean;
9996
- /** 描述 */
9997
- description?: string;
9998
- }
9999
- /** 文本组件 */
10000
- interface TextField extends BaseField {
10001
- type: 'text';
10002
- /** 默认值 */
10003
- defaultValue?: string;
10004
- }
10005
- /** 数字输入框 */
10006
- interface NumberField extends BaseField {
10007
- type: 'number';
10008
- /** 默认值 */
10009
- defaultValue?: number;
10010
- }
10011
- /** 开关 */
10012
- interface SwitchField extends BaseField {
10013
- type: 'switch';
10014
- /** 默认值 */
10015
- defaultValue?: boolean;
10016
- }
10017
- /** 下拉框选择器 */
10018
- interface SelectField extends BaseField {
10019
- type: 'select';
10020
- /** 是否多选 */
10021
- multiple?: boolean;
10022
- /** 选项 */
10023
- options?: Option[];
10024
- /** 默认值 */
10025
- defaultValue?: string | number;
10026
- }
10027
- /** 分隔符 */
10028
- interface DividerField extends BaseField {
10029
- type: 'divider';
10030
- }
10031
- /** 单选框 */
10032
- interface RadioField extends BaseField {
10033
- type: 'radio';
10034
- /** 选项 */
10035
- options: Option[];
10036
- /** 默认值 */
10037
- defaultValue?: string | number;
10038
- }
10039
- /** 多选框 */
10040
- interface CheckboxField extends BaseField {
10041
- type: 'checkbox';
10042
- /** 选项 */
10043
- options: Option[];
10044
- /** 默认值 */
10045
- defaultValue?: string[] | number[];
10046
- }
10047
- /** 数组 */
10048
- interface ArrayField extends BaseField {
10049
- type: 'array';
10050
- /** 值类型 */
10051
- elementType: 'text' | 'number';
10052
- /** 默认值 */
10053
- defaultValue?: string | number;
10054
- }
10055
- /** 对象 */
10056
- interface ObjectField extends BaseField {
10057
- type: 'object';
10058
- /** 子组件配置 */
10059
- fields: FormField[];
10060
- }
10061
- /** 对象数组 */
10062
- interface ObjectArrayField extends BaseField {
10063
- type: 'objectArray';
10064
- /** 子组件配置 */
10065
- fields: FormField[];
10066
- }
10067
- /** 分组 */
10068
- interface SectionField extends BaseField {
10069
- type: 'section';
10070
- /** 子组件 */
10071
- children: FormField[];
10072
- }
10073
- /** 标题 */
10074
- interface TitleField extends BaseField {
10075
- type: 'title';
10076
- /** 显示文本 */
10077
- text: string;
10078
- }
10079
- /** 组件 */
10080
- type FormField = TextField | NumberField | SwitchField | SelectField | RadioField | CheckboxField | ArrayField | ObjectField | ObjectArrayField | SectionField | TitleField | DividerField;
10081
- /**
10082
- * 输入框返回类型
10083
- */
10084
- type InputResult = Record<string, string | undefined>;
10085
- /**
10086
- * 开关返回类型
10087
- */
10088
- type SwitchResult = Record<string, boolean>;
10089
- /**
10090
- * 单选框返回类型
10091
- */
10092
- type RadioResult = Record<string, string | undefined>;
10093
- /**
10094
- * 多选框返回类型
10095
- */
10096
- type CheckboxResult = Record<string, Record<string, boolean>>;
10097
- /**
10098
- * 手风琴kv类型
10099
- */
10100
- type AccordionKV = string | boolean | Record<string, boolean>;
10101
- /**
10102
- * 手风琴返回类型
10103
- */
10104
- type AccordionResult = Record<string, AccordionKV[]>;
10105
- /**
10106
- * 手风琴pro返回类型
10107
- */
10108
- type AccordionProResult = AccordionResult;
10109
- /**
10110
- * save 方法返回的类型
10111
- */
10112
- type SaveResult = InputResult | SwitchResult | RadioResult | CheckboxResult | AccordionResult | AccordionProResult;
10113
-
10114
9978
  /**
10115
9979
  * 组件类型
10116
9980
  * - input: 输入框
@@ -10124,7 +9988,7 @@ type SaveResult = InputResult | SwitchResult | RadioResult | CheckboxResult | Ac
10124
9988
  * - radio: 单选框
10125
9989
  * - radio-group: 单选框组
10126
9990
  */
10127
- type ComponentType = 'input' | 'switch' | 'divider' | 'accordion' | 'accordion-item' | 'accordion-pro' | 'checkbox' | 'checkbox-group' | 'radio' | 'radio-group';
9991
+ type ComponentType = 'input' | 'switch' | 'divider' | 'accordion' | 'accordion-item' | 'accordion-pro' | 'checkbox' | 'checkbox-group' | 'radio' | 'radio-group' | 'input-group';
10128
9992
  /** 组件通用属性 */
10129
9993
  interface ComponentProps {
10130
9994
  /** 唯一标识符 */
@@ -10137,6 +10001,19 @@ interface ComponentProps {
10137
10001
  className?: string;
10138
10002
  }
10139
10003
 
10004
+ /**
10005
+ * 分隔线
10006
+ */
10007
+ interface DividerProps extends ComponentProps {
10008
+ componentType: 'divider';
10009
+ /** 是否透明 */
10010
+ transparent?: boolean;
10011
+ /** 方向 */
10012
+ orientation?: 'horizontal' | 'vertical';
10013
+ /** 描述文本位置 0-100的数字 */
10014
+ descPosition?: number;
10015
+ }
10016
+
10140
10017
  /**
10141
10018
  * 输入类型枚举
10142
10019
  */
@@ -10269,18 +10146,23 @@ interface InputProps extends ComponentProps {
10269
10146
  /** 自定义字段 输入框高度 */
10270
10147
  height?: string;
10271
10148
  }
10272
-
10273
10149
  /**
10274
- * 分隔线
10150
+ * 输入框组类型
10275
10151
  */
10276
- interface DividerProps extends ComponentProps {
10277
- componentType: 'divider';
10278
- /** 是否透明 */
10279
- transparent?: boolean;
10280
- /** 方向 */
10281
- orientation?: 'horizontal' | 'vertical';
10282
- /** 描述文本位置 0-100的数字 */
10283
- descPosition?: number;
10152
+ interface InputGroupProps extends ComponentProps {
10153
+ componentType: 'input-group';
10154
+ /** 标签 */
10155
+ label?: string;
10156
+ /** 输入框模板 */
10157
+ template: InputProps;
10158
+ /** 输入框一行最多显示多少个 默认3个 */
10159
+ itemsPerRow?: number;
10160
+ /** 输入框最大显示多少行 超出后滚动 默认3行 */
10161
+ maxRows?: number;
10162
+ /** 输入框最大输入框数量 默认100 0不限制 */
10163
+ maxInputs?: number;
10164
+ /** 数据 */
10165
+ data: string[];
10284
10166
  }
10285
10167
 
10286
10168
  /**
@@ -10455,7 +10337,143 @@ interface Radio extends ComponentProps {
10455
10337
  disableAnimation?: boolean;
10456
10338
  }
10457
10339
 
10458
- type Children = InputProps | SwitchProps | DividerProps | CheckboxProps | CheckboxGroupProps | RadioGroupProps;
10340
+ type Children = InputProps | SwitchProps | DividerProps | CheckboxProps | CheckboxGroupProps | RadioGroupProps | InputGroupProps;
10341
+
10342
+ type Option = {
10343
+ label: string;
10344
+ value: string | number;
10345
+ disabled?: boolean;
10346
+ };
10347
+ /** 组件类型 */
10348
+ type FieldType = 'text' | 'number' | 'switch' | 'select' | 'object' | 'divider' | 'array' | 'objectArray' | 'colorPicker' | 'radio' | 'checkbox' | 'section' | 'title';
10349
+ /** 值类型 */
10350
+ type ValueType = 'string' | 'number' | 'boolean' | 'object';
10351
+ interface BaseField {
10352
+ /** 组件类型 */
10353
+ type: FieldType;
10354
+ /** 字段 */
10355
+ key: string;
10356
+ /** 显示文本 */
10357
+ label?: string;
10358
+ /** 是否必填 */
10359
+ required?: boolean;
10360
+ /** 描述 */
10361
+ description?: string;
10362
+ }
10363
+ /** 文本组件 */
10364
+ interface TextField extends BaseField {
10365
+ type: 'text';
10366
+ /** 默认值 */
10367
+ defaultValue?: string;
10368
+ }
10369
+ /** 数字输入框 */
10370
+ interface NumberField extends BaseField {
10371
+ type: 'number';
10372
+ /** 默认值 */
10373
+ defaultValue?: number;
10374
+ }
10375
+ /** 开关 */
10376
+ interface SwitchField extends BaseField {
10377
+ type: 'switch';
10378
+ /** 默认值 */
10379
+ defaultValue?: boolean;
10380
+ }
10381
+ /** 下拉框选择器 */
10382
+ interface SelectField extends BaseField {
10383
+ type: 'select';
10384
+ /** 是否多选 */
10385
+ multiple?: boolean;
10386
+ /** 选项 */
10387
+ options?: Option[];
10388
+ /** 默认值 */
10389
+ defaultValue?: string | number;
10390
+ }
10391
+ /** 分隔符 */
10392
+ interface DividerField extends BaseField {
10393
+ type: 'divider';
10394
+ }
10395
+ /** 单选框 */
10396
+ interface RadioField extends BaseField {
10397
+ type: 'radio';
10398
+ /** 选项 */
10399
+ options: Option[];
10400
+ /** 默认值 */
10401
+ defaultValue?: string | number;
10402
+ }
10403
+ /** 多选框 */
10404
+ interface CheckboxField extends BaseField {
10405
+ type: 'checkbox';
10406
+ /** 选项 */
10407
+ options: Option[];
10408
+ /** 默认值 */
10409
+ defaultValue?: string[] | number[];
10410
+ }
10411
+ /** 数组 */
10412
+ interface ArrayField extends BaseField {
10413
+ type: 'array';
10414
+ /** 值类型 */
10415
+ elementType: 'text' | 'number';
10416
+ /** 默认值 */
10417
+ defaultValue?: string | number;
10418
+ }
10419
+ /** 对象 */
10420
+ interface ObjectField extends BaseField {
10421
+ type: 'object';
10422
+ /** 子组件配置 */
10423
+ fields: FormField[];
10424
+ }
10425
+ /** 对象数组 */
10426
+ interface ObjectArrayField extends BaseField {
10427
+ type: 'objectArray';
10428
+ /** 子组件配置 */
10429
+ fields: FormField[];
10430
+ }
10431
+ /** 分组 */
10432
+ interface SectionField extends BaseField {
10433
+ type: 'section';
10434
+ /** 子组件 */
10435
+ children: FormField[];
10436
+ }
10437
+ /** 标题 */
10438
+ interface TitleField extends BaseField {
10439
+ type: 'title';
10440
+ /** 显示文本 */
10441
+ text: string;
10442
+ }
10443
+ /** 组件 */
10444
+ type FormField = TextField | NumberField | SwitchField | SelectField | RadioField | CheckboxField | ArrayField | ObjectField | ObjectArrayField | SectionField | TitleField | DividerField;
10445
+ /**
10446
+ * 输入框返回类型
10447
+ */
10448
+ type InputResult = Record<string, string | undefined>;
10449
+ /**
10450
+ * 开关返回类型
10451
+ */
10452
+ type SwitchResult = Record<string, boolean>;
10453
+ /**
10454
+ * 单选框返回类型
10455
+ */
10456
+ type RadioResult = Record<string, string | undefined>;
10457
+ /**
10458
+ * 多选框返回类型
10459
+ */
10460
+ type CheckboxResult = Record<string, Record<string, boolean>>;
10461
+ /**
10462
+ * 手风琴kv类型
10463
+ */
10464
+ type AccordionKV = string | boolean | Record<string, boolean>;
10465
+ /**
10466
+ * 手风琴返回类型
10467
+ */
10468
+ type AccordionResult = Record<string, AccordionKV[]>;
10469
+ /**
10470
+ * 手风琴pro返回类型
10471
+ */
10472
+ type AccordionProResult = AccordionResult;
10473
+ /**
10474
+ * save 方法返回的类型
10475
+ */
10476
+ type SaveResult = InputResult | SwitchResult | RadioResult | CheckboxResult | AccordionResult | AccordionProResult;
10459
10477
 
10460
10478
  /**
10461
10479
  * 手风琴(折叠面板) 类型
@@ -10620,6 +10638,12 @@ declare const input: {
10620
10638
  * @param options 输入框配置
10621
10639
  */
10622
10640
  create: (key: string, options: Omit<InputProps, "key" | "componentType">) => InputProps;
10641
+ /**
10642
+ * 创建输入框组
10643
+ * @param key 唯一标识符
10644
+ * @param options 输入框组配置
10645
+ */
10646
+ group: (key: string, options: Omit<InputGroupProps, "key" | "componentType">) => InputGroupProps;
10623
10647
  /**
10624
10648
  * 字符串输入框
10625
10649
  * @param key 唯一标识符
@@ -11131,4 +11155,4 @@ declare let level: ReturnType<typeof createLevelDB>;
11131
11155
  */
11132
11156
  declare const start: () => Promise<void>;
11133
11157
 
11134
- export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileOptions, type DownloadFileResponse, EVENT_COUNT, type ElementTypes, type Elements, type Env, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type GetAtAllCountResponse, type GetBot, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginReturn, type GetPluginType, type GiftElement, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type ImageElement, type ImageSegment, InputDataType, type InputProps, type InputResult, type JsonElement, type JsonSegment, type KarinButton, type KeyboardElement, type LocationElement, type LocationSegment, type Log, type Logger, type LoggerExpand, type LoggerLevel, type LoggerOptions, type LongMsgElement, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NodeElement, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type OnlinePluginInfo, type Option, type Options, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginLists, type PluginOptions, type PluginRule, type PluginUpdateInfo, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type Render, type RenderResult, Renderer, type Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SEND_MSG, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type SrcReply, type SwitchField, type SwitchProps, type SwitchResult, type Task, type TextElement, type TextField, type TextSegment, type TitleField, type UnregisterBot, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createInnerLogger, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, debug, karin as default, divider, downFile, errorToString, exec, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getBot, getBotCount, getCommit, getFiles, getHash, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, importModule, initOneBot, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPlugin, isRoot, isStatic, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, level, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, requireFile, requireFileSync, restart, restartDirect, rmSync, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
11158
+ export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileOptions, type DownloadFileResponse, EVENT_COUNT, type ElementTypes, type Elements, type Env, type Event, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, type GetAtAllCountResponse, type GetBot, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginReturn, type GetPluginType, type GiftElement, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type ImageElement, type ImageSegment, InputDataType, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JsonSegment, type KarinButton, type KeyboardElement, type LocationElement, type LocationSegment, type Log, type Logger, type LoggerExpand, type LoggerLevel, type LoggerOptions, type LongMsgElement, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NodeElement, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type OnlinePluginInfo, type Option, type Options, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginLists, type PluginOptions, type PluginRule, type PluginUpdateInfo, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type Render, type RenderResult, Renderer, type Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SEND_MSG, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type SrcReply, type SwitchField, type SwitchProps, type SwitchResult, type Task, type TextElement, type TextField, type TextSegment, type TitleField, type UnregisterBot, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createInnerLogger, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, debug, karin as default, divider, downFile, errorToString, exec, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getBot, getBotCount, getCommit, getFiles, getHash, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, importModule, initOneBot, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPlugin, isRoot, isStatic, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, level, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, requireFile, requireFileSync, restart, restartDirect, rmSync, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
package/dist/index.js CHANGED
@@ -5753,7 +5753,7 @@ var init_base = __esm({
5753
5753
  communication: "other",
5754
5754
  address: "",
5755
5755
  secret: null,
5756
- connectTime: -1
5756
+ connectTime: Date.now()
5757
5757
  };
5758
5758
  }
5759
5759
  get selfId() {
@@ -10173,7 +10173,7 @@ var init_cache2 = __esm({
10173
10173
  };
10174
10174
  setPluginListCache = async (plugins) => {
10175
10175
  try {
10176
- await redis2.setEx(CACHE_KEY, CACHE_EXPIRE, JSON.stringify(plugins));
10176
+ await redis2.set(CACHE_KEY, JSON.stringify(plugins), { EX: CACHE_EXPIRE });
10177
10177
  } catch (error) {
10178
10178
  logger.error("\u8BBE\u7F6E\u63D2\u4EF6\u5217\u8868\u7F13\u5B58\u5931\u8D25:", error);
10179
10179
  }
@@ -16781,7 +16781,7 @@ var init_accordion = __esm({
16781
16781
  });
16782
16782
 
16783
16783
  // src/components/input.ts
16784
- var createInput, input;
16784
+ var createInput, createInputGroup, input;
16785
16785
  var init_input = __esm({
16786
16786
  "src/components/input.ts"() {
16787
16787
  "use strict";
@@ -16802,6 +16802,18 @@ var init_input = __esm({
16802
16802
  }
16803
16803
  return data;
16804
16804
  };
16805
+ createInputGroup = (key, options) => {
16806
+ return {
16807
+ ...options,
16808
+ key,
16809
+ componentType: "input-group",
16810
+ template: createInput("input-group-template", options.template),
16811
+ data: Array.isArray(options == null ? void 0 : options.data) ? options.data : [],
16812
+ itemsPerRow: options.itemsPerRow ?? 3,
16813
+ maxRows: options.maxRows ?? 3,
16814
+ maxInputs: options.maxInputs ?? 100
16815
+ };
16816
+ };
16805
16817
  input = {
16806
16818
  /**
16807
16819
  * 创建基础输入框
@@ -16809,6 +16821,12 @@ var init_input = __esm({
16809
16821
  * @param options 输入框配置
16810
16822
  */
16811
16823
  create: (key, options) => createInput(key, options),
16824
+ /**
16825
+ * 创建输入框组
16826
+ * @param key 唯一标识符
16827
+ * @param options 输入框组配置
16828
+ */
16829
+ group: (key, options) => createInputGroup(key, options),
16812
16830
  /**
16813
16831
  * 字符串输入框
16814
16832
  * @param key 唯一标识符
@@ -17552,6 +17570,91 @@ var init_input2 = __esm({
17552
17570
  }
17553
17571
  return `http://127.0.0.1:${process.env.HTTP_PORT}/api/v1/console/${name}${ext}?token=${cfg.console.token}`;
17554
17572
  }
17573
+ async getAvatarUrl(userId, size) {
17574
+ if (userId === botID) {
17575
+ return process.env.ADAPTER_CONSOLE_AVATAR || "https://p.qlogo.cn/gh/967068507/967068507/0";
17576
+ }
17577
+ return "";
17578
+ }
17579
+ async getGroupAvatarUrl(groupId, size, history) {
17580
+ return "https://p.qlogo.cn/gh/967068507/967068507/0";
17581
+ }
17582
+ async recallMsg(contact3, messageId) {
17583
+ logger.info(`[recallMsg] ${messageId}`);
17584
+ return true;
17585
+ }
17586
+ async sendLike(targetId, count3) {
17587
+ logger.info(`[sendLike] ${targetId} ${count3}`);
17588
+ return true;
17589
+ }
17590
+ async groupKickMember(groupId, targetId, rejectAddRequest, kickReason) {
17591
+ logger.info(`[groupKickMember] ${groupId} ${targetId} ${rejectAddRequest} ${kickReason}`);
17592
+ return true;
17593
+ }
17594
+ async setGroupMute(groupId, targetId, duration) {
17595
+ logger.info(`[setGroupMute] ${groupId} ${targetId} ${duration}`);
17596
+ return true;
17597
+ }
17598
+ async setGroupAllMute(groupId, isBan) {
17599
+ logger.info(`[setGroupAllMute] ${groupId} ${isBan}`);
17600
+ return true;
17601
+ }
17602
+ async setGroupAdmin(groupId, targetId, isAdmin) {
17603
+ logger.info(`[setGroupAdmin] ${groupId} ${targetId} ${isAdmin}`);
17604
+ return true;
17605
+ }
17606
+ async setGroupMemberCard(groupId, targetId, card) {
17607
+ logger.info(`[setGroupMemberCard] ${groupId} ${targetId} ${card}`);
17608
+ return true;
17609
+ }
17610
+ async setGroupName(groupId, groupName) {
17611
+ logger.info(`[setGroupName] ${groupId} ${groupName}`);
17612
+ return true;
17613
+ }
17614
+ async setGroupQuit(groupId, isDismiss) {
17615
+ logger.info(`[setGroupQuit] ${groupId} ${isDismiss}`);
17616
+ return true;
17617
+ }
17618
+ async setGroupMemberTitle(groupId, targetId, title) {
17619
+ logger.info(`[setGroupMemberTitle] ${groupId} ${targetId} ${title}`);
17620
+ return true;
17621
+ }
17622
+ async getFriendList(refresh) {
17623
+ logger.info(`[getFriendList] ${refresh}`);
17624
+ return [];
17625
+ }
17626
+ async getGroupList(refresh) {
17627
+ logger.info(`[getGroupList] ${refresh}`);
17628
+ return [];
17629
+ }
17630
+ async getGroupMemberList(groupId, refresh) {
17631
+ logger.info(`[getGroupMemberList] ${groupId} ${refresh}`);
17632
+ return [];
17633
+ }
17634
+ async getGroupHonor(groupId) {
17635
+ logger.info(`[getGroupHonor] ${groupId}`);
17636
+ return [];
17637
+ }
17638
+ async setFriendApplyResult(requestId, isApprove, remark) {
17639
+ logger.info(`[setFriendApplyResult] ${requestId} ${isApprove} ${remark}`);
17640
+ return true;
17641
+ }
17642
+ async setGroupApplyResult(requestId, isApprove, denyReason) {
17643
+ logger.info(`[setGroupApplyResult] ${requestId} ${isApprove} ${denyReason}`);
17644
+ return true;
17645
+ }
17646
+ async setInvitedJoinGroupResult(requestId, isApprove) {
17647
+ logger.info(`[setInvitedJoinGroupResult] ${requestId} ${isApprove}`);
17648
+ return true;
17649
+ }
17650
+ async setMsgReaction(contact3, messageId, faceId, isSet) {
17651
+ logger.info(`[setMsgReaction] ${contact3} ${messageId} ${faceId} ${isSet}`);
17652
+ return true;
17653
+ }
17654
+ async uploadFile(contact3, file, name, folder) {
17655
+ logger.info(`[uploadFile] ${contact3} ${file} ${name} ${folder}`);
17656
+ return true;
17657
+ }
17555
17658
  };
17556
17659
  adapter3 = new AdapterConsole();
17557
17660
  registerBot("other", adapter3);