@ibiz-template-plugin/ai-chat 0.0.116 → 0.0.117
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/dist/index.es.js +14650 -12316
- package/dist/index.legacy.js +2 -2
- package/dist/polyfills.legacy.js +1 -1
- package/dist/style.css +2 -2
- package/dist/types/components/chat-container/chat-container.d.ts +25 -24
- package/dist/types/components/chat-group-topics/components/selected-mode-topic/selected-mode-topic.d.ts +21 -0
- package/dist/types/components/chat-group-topics/components/show-hidden-setting/show-hidden-setting.d.ts +17 -0
- package/dist/types/components/chat-group-topics/components/topic-batch-action/topic-batch-action.d.ts +21 -0
- package/dist/types/constants/index.d.ts +4 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +12 -0
- package/dist/types/controller/ai-topic/ai-topic.controller.d.ts +83 -5
- package/dist/types/controller/index.d.ts +1 -0
- package/dist/types/controller/overlay/drawer-overlay.controller.d.ts +2 -0
- package/dist/types/controller/overlay/overlay.controller.d.ts +7 -1
- package/dist/types/controller/tiptap/config/file-node-config.d.ts +3 -0
- package/dist/types/controller/tiptap/tiptap.controller.d.ts +50 -0
- package/dist/types/entity/chart-topic/chart-topic.d.ts +1 -0
- package/dist/types/entity/chat-message/chat-message.d.ts +1 -0
- package/dist/types/icons/eye-svg.d.ts +1 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/icons/new-folder-svg.d.ts +1 -0
- package/dist/types/icons/system-file/archive.d.ts +1 -0
- package/dist/types/icons/system-file/audio.d.ts +1 -0
- package/dist/types/icons/system-file/excel.d.ts +4 -0
- package/dist/types/icons/system-file/image.d.ts +1 -0
- package/dist/types/icons/system-file/index.d.ts +10 -0
- package/dist/types/icons/system-file/other.d.ts +2 -0
- package/dist/types/icons/system-file/ppt.d.ts +5 -0
- package/dist/types/icons/system-file/program.d.ts +1 -0
- package/dist/types/icons/system-file/text.d.ts +17 -0
- package/dist/types/icons/system-file/video.d.ts +5 -0
- package/dist/types/icons/system-file/word.d.ts +1 -0
- package/dist/types/interface/i-chat-message/i-chat-message.d.ts +6 -0
- package/dist/types/interface/i-remote-resource/i-remote-resource.d.ts +6 -0
- package/dist/types/interface/i-tiptap/i-tiptap.d.ts +51 -0
- package/dist/types/interface/i-topic-options/i-topic-options.d.ts +50 -5
- package/dist/types/interface/index.d.ts +2 -1
- package/dist/types/locale/en/index.d.ts +7 -1
- package/dist/types/locale/zh-CN/index.d.ts +7 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/util/system-file.d.ts +10 -0
- package/dist/types/utils/util/util.d.ts +2 -1
- package/package.json +1 -1
- package/dist/types/components/chat-editor/node/mention-node.d.ts +0 -3
|
@@ -210,7 +210,6 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
|
|
|
210
210
|
fitPanelToViewport(panel: AiActionPanelController): void;
|
|
211
211
|
ns: Namespace;
|
|
212
212
|
containerRef: import('preact').RefObject<HTMLDivElement>;
|
|
213
|
-
dragHandle: import('preact').RefObject<HTMLDivElement>;
|
|
214
213
|
/**
|
|
215
214
|
* 输入区容器(用于高度分隔条)
|
|
216
215
|
*/
|
|
@@ -237,13 +236,6 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
|
|
|
237
236
|
minHeight: number;
|
|
238
237
|
showMode: string;
|
|
239
238
|
};
|
|
240
|
-
/**
|
|
241
|
-
* 是否禁止拖动
|
|
242
|
-
* - 拖拽边时应禁止拖动
|
|
243
|
-
* @type {boolean}
|
|
244
|
-
* @memberof ChatContainer
|
|
245
|
-
*/
|
|
246
|
-
disabled: boolean;
|
|
247
239
|
/**
|
|
248
240
|
* 最小化是否在拖拽中
|
|
249
241
|
* - 在拖拽时不应触发点击事件
|
|
@@ -255,13 +247,6 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
|
|
|
255
247
|
* 侧栏宽度拖动起始值(px)
|
|
256
248
|
*/
|
|
257
249
|
sidebarDragStartWidth: number;
|
|
258
|
-
/**
|
|
259
|
-
* 拖拽容器边框时的方向标记(左右=宽、上下=高)
|
|
260
|
-
*/
|
|
261
|
-
resizing: {
|
|
262
|
-
width: boolean;
|
|
263
|
-
height: boolean;
|
|
264
|
-
};
|
|
265
250
|
/**
|
|
266
251
|
* 输入区高度拖动起始值(px)
|
|
267
252
|
*/
|
|
@@ -333,18 +318,12 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
|
|
|
333
318
|
* @memberof ChatContainer
|
|
334
319
|
*/
|
|
335
320
|
snapToEdge(): void;
|
|
336
|
-
/**
|
|
337
|
-
* 注册对话框拖拽
|
|
338
|
-
*
|
|
339
|
-
* @memberof ChatContainer
|
|
340
|
-
*/
|
|
341
|
-
registerDragDialog(): void;
|
|
342
321
|
/**
|
|
343
322
|
* 注册对话框边界拖拽
|
|
344
323
|
*
|
|
345
324
|
* @memberof ChatContainer
|
|
346
325
|
*/
|
|
347
|
-
|
|
326
|
+
registerDrag(): void;
|
|
348
327
|
/**
|
|
349
328
|
* 处理全屏改变
|
|
350
329
|
*
|
|
@@ -401,6 +380,24 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
|
|
|
401
380
|
* 右侧聊天区宽度
|
|
402
381
|
*/
|
|
403
382
|
getRightWidth(): string;
|
|
383
|
+
/**
|
|
384
|
+
* @description 获取宽度
|
|
385
|
+
* @returns {*} {{
|
|
386
|
+
* centreMinWidth: number;
|
|
387
|
+
* leftWidth: number;
|
|
388
|
+
* rightWidth: number;
|
|
389
|
+
* leftMinWidth: number;
|
|
390
|
+
* rightMinWidth: number;
|
|
391
|
+
* }}
|
|
392
|
+
* @memberof ChatContainer
|
|
393
|
+
*/
|
|
394
|
+
getWidth(): {
|
|
395
|
+
centreMinWidth: number;
|
|
396
|
+
leftWidth: number;
|
|
397
|
+
rightWidth: number;
|
|
398
|
+
leftMinWidth: number;
|
|
399
|
+
rightMinWidth: number;
|
|
400
|
+
};
|
|
404
401
|
/**
|
|
405
402
|
* 侧栏宽度拖动开始
|
|
406
403
|
*/
|
|
@@ -418,9 +415,13 @@ export declare class ChatContainer extends Component<ChatContainerProps, ChatCon
|
|
|
418
415
|
*/
|
|
419
416
|
clampSidebarWidth(width: number): number;
|
|
420
417
|
/**
|
|
421
|
-
* 拖动容器左右边框时实时校正侧栏宽度
|
|
418
|
+
* @description 拖动容器左右边框时实时校正侧栏宽度
|
|
419
|
+
* - 中间宽度已到最小宽度时缩小对应边的侧边栏
|
|
420
|
+
* @param {('left' | 'right')} direction
|
|
421
|
+
* @param {number} width
|
|
422
|
+
* @memberof ChatContainer
|
|
422
423
|
*/
|
|
423
|
-
syncSidebarWidth: () => void;
|
|
424
|
+
syncSidebarWidth: (direction: "left" | "right", width: number) => void;
|
|
424
425
|
/**
|
|
425
426
|
* 拖动容器左右边框结束后提交侧栏宽度
|
|
426
427
|
*/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AiTopicController } from '../../../../controller';
|
|
2
|
+
|
|
3
|
+
export interface SelectedModeTopicProps {
|
|
4
|
+
/**
|
|
5
|
+
* 话题控制器
|
|
6
|
+
*
|
|
7
|
+
* @author tony001
|
|
8
|
+
* @date 2025-02-20 17:02:49
|
|
9
|
+
* @type {AiTopicController}
|
|
10
|
+
*/
|
|
11
|
+
controller: AiTopicController;
|
|
12
|
+
/**
|
|
13
|
+
* 进入多选模式时默认选中的话题id
|
|
14
|
+
*/
|
|
15
|
+
defaultSelectedTopicId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 抽屉关闭回调(由 Drawer 自动注入)
|
|
18
|
+
*/
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const SelectedModeTopic: (props: SelectedModeTopicProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AiTopicController } from '../../../../controller';
|
|
2
|
+
|
|
3
|
+
export interface ShowHiddenSettingProps {
|
|
4
|
+
/**
|
|
5
|
+
* 话题控制器
|
|
6
|
+
*
|
|
7
|
+
* @author tony001
|
|
8
|
+
* @date 2025-02-20 17:02:49
|
|
9
|
+
* @type {AiTopicController}
|
|
10
|
+
*/
|
|
11
|
+
controller: AiTopicController;
|
|
12
|
+
/**
|
|
13
|
+
* 抽屉关闭回调(由 Drawer 自动注入)
|
|
14
|
+
*/
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const ShowHiddenSetting: (props: ShowHiddenSettingProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AiTopicController } from '../../../../controller';
|
|
2
|
+
|
|
3
|
+
export interface TopicBatchActionProps {
|
|
4
|
+
/**
|
|
5
|
+
* 话题控制器
|
|
6
|
+
*
|
|
7
|
+
* @author tony001
|
|
8
|
+
* @date 2025-02-20 17:02:49
|
|
9
|
+
* @type {AiTopicController}
|
|
10
|
+
*/
|
|
11
|
+
controller: AiTopicController;
|
|
12
|
+
/**
|
|
13
|
+
* 进入批量管理时默认选中的目录key
|
|
14
|
+
*/
|
|
15
|
+
defaultSelectedScopeKey?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 抽屉关闭回调(由 Drawer 自动注入)
|
|
18
|
+
*/
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare const TopicBatchAction: (props: TopicBatchActionProps) => import("preact").JSX.Element;
|
|
@@ -399,6 +399,18 @@ export declare class AiChatController {
|
|
|
399
399
|
* @memberof AiChatController
|
|
400
400
|
*/
|
|
401
401
|
attachMessageAgentID(data: IChatMessage): void;
|
|
402
|
+
/**
|
|
403
|
+
* @description 新增等待回复消息(与后续流式推送共用同一消息标识,首条内容到达时原地更新该消息)
|
|
404
|
+
* @param {string} messageid 消息标识
|
|
405
|
+
* @memberof AiChatController
|
|
406
|
+
*/
|
|
407
|
+
addWaitingMessage(messageid: string): void;
|
|
408
|
+
/**
|
|
409
|
+
* @description 移除等待回复状态:未收到任何内容则删除占位消息(中断、超时、无推送场景);已有内容则仅清除等待标记
|
|
410
|
+
* @param {string} messageid 消息标识
|
|
411
|
+
* @memberof AiChatController
|
|
412
|
+
*/
|
|
413
|
+
removeWaitingMessage(messageid: string): void;
|
|
402
414
|
/**
|
|
403
415
|
* @description 新增聊天记录
|
|
404
416
|
* @param {IChatMessage} data
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signal } from '@preact/signals';
|
|
2
2
|
import { ChatTopic } from '../../entity';
|
|
3
|
-
import { ITopic, ITopicOptions, IResourceOptions, IChatController, IGroupItem, IScopeItem, ITopicGroupNode } from '../../interface';
|
|
3
|
+
import { ITopic, ITopicOptions, IResourceOptions, IChatController, IGroupItem, IScopeOption, IScopeItem, ITopicGroupNode } from '../../interface';
|
|
4
4
|
import { AiChatController } from '../ai-chat/ai-chat.controller';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -113,16 +113,22 @@ export declare class AiTopicController {
|
|
|
113
113
|
disableSelectScope: boolean;
|
|
114
114
|
/**
|
|
115
115
|
* @description 业务域列表(WORKSPACE 工作模式使用)
|
|
116
|
-
* @type {
|
|
116
|
+
* @type {IScopeOption[]}
|
|
117
117
|
* @memberof AiTopicController
|
|
118
118
|
*/
|
|
119
|
-
scopeList:
|
|
119
|
+
scopeList: IScopeOption[];
|
|
120
120
|
/**
|
|
121
121
|
* @description 用户自定义分组清单(WORKSPACE 工作模式使用)
|
|
122
122
|
* @type {Signal<IGroupItem[]>}
|
|
123
123
|
* @memberof AiTopicController
|
|
124
124
|
*/
|
|
125
125
|
readonly groups: Signal<IGroupItem[]>;
|
|
126
|
+
/**
|
|
127
|
+
* @description 业务域界面数据清单(WORKSPACE 工作模式,存储于 'aiscopes')
|
|
128
|
+
* @type {Signal<IScopeItem[]>}
|
|
129
|
+
* @memberof AiTopicController
|
|
130
|
+
*/
|
|
131
|
+
readonly scopes: Signal<IScopeItem[]>;
|
|
126
132
|
/**
|
|
127
133
|
* @description 分组存储服务实例('aigroups',与会话数据 'aitopics' 区分)
|
|
128
134
|
* @private
|
|
@@ -130,6 +136,13 @@ export declare class AiTopicController {
|
|
|
130
136
|
* @memberof AiTopicController
|
|
131
137
|
*/
|
|
132
138
|
private groupConfig;
|
|
139
|
+
/**
|
|
140
|
+
* @description 业务域存储服务实例('aiscopes',与会话数据 'aitopics' 区分)
|
|
141
|
+
* @private
|
|
142
|
+
* @type {(IConfigService | undefined)}
|
|
143
|
+
* @memberof AiTopicController
|
|
144
|
+
*/
|
|
145
|
+
private scopeConfig;
|
|
133
146
|
/**
|
|
134
147
|
* Creates an instance of AiTopicController.
|
|
135
148
|
* @author tony001
|
|
@@ -156,10 +169,10 @@ export declare class AiTopicController {
|
|
|
156
169
|
* @param {string} compWrapperId
|
|
157
170
|
* @param {('DEFAULT' | 'WORKSPACE')} workMode
|
|
158
171
|
* @param {boolean} [disableSelectScope]
|
|
159
|
-
* @param {
|
|
172
|
+
* @param {IScopeOption[]} [scopeList]
|
|
160
173
|
* @memberof AiTopicController
|
|
161
174
|
*/
|
|
162
|
-
injectBasicResources(compWrapperId: string, workMode: 'DEFAULT' | 'WORKSPACE', disableSelectScope?: boolean, scopeList?:
|
|
175
|
+
injectBasicResources(compWrapperId: string, workMode: 'DEFAULT' | 'WORKSPACE', disableSelectScope?: boolean, scopeList?: IScopeOption[]): void;
|
|
163
176
|
/**
|
|
164
177
|
* 注入资源选项
|
|
165
178
|
* @param resourceOptions
|
|
@@ -317,6 +330,12 @@ export declare class AiTopicController {
|
|
|
317
330
|
* @memberof AiTopicController
|
|
318
331
|
*/
|
|
319
332
|
updateTopicConfig(options: ITopicOptions): Promise<void>;
|
|
333
|
+
/**
|
|
334
|
+
* @description 获取侧边栏默认宽度
|
|
335
|
+
* @returns {*} {number}
|
|
336
|
+
* @memberof AiTopicController
|
|
337
|
+
*/
|
|
338
|
+
getDefaultWidth(): number;
|
|
320
339
|
/**
|
|
321
340
|
* 计算话题侧边栏宽度
|
|
322
341
|
*/
|
|
@@ -431,6 +450,35 @@ export declare class AiTopicController {
|
|
|
431
450
|
* @memberof AiTopicController
|
|
432
451
|
*/
|
|
433
452
|
private saveGroups;
|
|
453
|
+
/**
|
|
454
|
+
* @description 获取业务域存储服务实例('aiscopes',与会话数据 'aitopics' 区分)
|
|
455
|
+
* @private
|
|
456
|
+
* @param {ITopicOptions} options 话题配置
|
|
457
|
+
* @returns {*} {IConfigService}
|
|
458
|
+
* @memberof AiTopicController
|
|
459
|
+
*/
|
|
460
|
+
private getScopeConfig;
|
|
461
|
+
/**
|
|
462
|
+
* @description 加载业务域界面数据
|
|
463
|
+
* @param {ITopicOptions} options 话题配置
|
|
464
|
+
* @returns {*} {Promise<void>}
|
|
465
|
+
* @memberof AiTopicController
|
|
466
|
+
*/
|
|
467
|
+
fetchScopes(options: ITopicOptions): Promise<void>;
|
|
468
|
+
/**
|
|
469
|
+
* @description 保存业务域界面数据
|
|
470
|
+
* @returns {*} {Promise<void>}
|
|
471
|
+
* @memberof AiTopicController
|
|
472
|
+
*/
|
|
473
|
+
private saveScopes;
|
|
474
|
+
/**
|
|
475
|
+
* @description 获取业务域界面数据,无存储记录时返回默认值(显示、不置顶)
|
|
476
|
+
* @private
|
|
477
|
+
* @param {(string | number)} scopeid 业务域标识
|
|
478
|
+
* @returns {*} {IScopeItem}
|
|
479
|
+
* @memberof AiTopicController
|
|
480
|
+
*/
|
|
481
|
+
private getScopeItemConfig;
|
|
434
482
|
/**
|
|
435
483
|
* @description 计算分组树(WORKSPACE 工作模式):业务域第一层,自定义分组第二层,其后为话题
|
|
436
484
|
* @param {string} [query] 快速搜索关键词
|
|
@@ -468,6 +516,28 @@ export declare class AiTopicController {
|
|
|
468
516
|
* @memberof AiTopicController
|
|
469
517
|
*/
|
|
470
518
|
toggleGroupCollapse(groupid: string): Promise<void>;
|
|
519
|
+
/**
|
|
520
|
+
* @description 更新业务域界面数据(visible/istop)并持久化,scopeid不传表示无分类节点;
|
|
521
|
+
* 归一化后与默认值一致(visible为true且istop为false)时移除存储记录,默认值数据不落存储
|
|
522
|
+
* @param {(string | number)} [scopeid] 业务域标识
|
|
523
|
+
* @param {Partial<Pick<IScopeItem, 'visible' | 'istop'>>} partial 更新数据
|
|
524
|
+
* @returns {*} {Promise<IScopeItem | undefined>} 成功返回归一化后的数据,持久化失败返回undefined
|
|
525
|
+
* @memberof AiTopicController
|
|
526
|
+
*/
|
|
527
|
+
updateScopeItem(scopeid: string | number | undefined, partial: Partial<Pick<IScopeItem, 'visible' | 'istop'>>): Promise<IScopeItem | undefined>;
|
|
528
|
+
/**
|
|
529
|
+
* @description 批量更新业务域界面数据(visible/istop),内部合并处理scopes数据,最终一次持久化;
|
|
530
|
+
* scopeid不传表示无分类节点,未传字段保留原值(缺省visible视为true、istop视为false),
|
|
531
|
+
* 归一化后与默认值一致(visible为true且istop为false)时移除存储记录,默认值数据不落存储
|
|
532
|
+
* @param {Array<{ scopeid: string | number | undefined; visible?: boolean; istop?: boolean }>} updates 更新数据集合
|
|
533
|
+
* @returns {*} {Promise<boolean>} 是否全部更新成功
|
|
534
|
+
* @memberof AiTopicController
|
|
535
|
+
*/
|
|
536
|
+
batchUpdateScopeItems(updates: Array<{
|
|
537
|
+
scopeid: string | number | undefined;
|
|
538
|
+
visible?: boolean;
|
|
539
|
+
istop?: boolean;
|
|
540
|
+
}>): Promise<boolean>;
|
|
471
541
|
/**
|
|
472
542
|
* @description 删除业务域:真删该域下所有分组和会话数据;不传scopeid表示删除无分类域
|
|
473
543
|
* @param {(string | number)} [scopeid] 业务域标识
|
|
@@ -475,6 +545,14 @@ export declare class AiTopicController {
|
|
|
475
545
|
* @memberof AiTopicController
|
|
476
546
|
*/
|
|
477
547
|
removeScope(scopeid?: string | number): Promise<boolean>;
|
|
548
|
+
/**
|
|
549
|
+
* @description 批量删除业务域:一次性归集所有待删域的会话数据,统一走一次 beforeDelete
|
|
550
|
+
* 确认后真删(含域下分组和会话),域界面数据与分组数据各持久化一次;不传scopeid表示无分类域
|
|
551
|
+
* @param {Array<string | number | undefined>} scopeids 业务域标识集合
|
|
552
|
+
* @returns {*} {Promise<boolean>} 是否删除成功(确认取消或持久化失败返回false)
|
|
553
|
+
* @memberof AiTopicController
|
|
554
|
+
*/
|
|
555
|
+
batchRemoveScopes(scopeids: Array<string | number | undefined>): Promise<boolean>;
|
|
478
556
|
/**
|
|
479
557
|
* @description 删除用户自定义分组:真删该分组下所有会话数据
|
|
480
558
|
* @param {string} groupid 分组标识
|
|
@@ -6,3 +6,4 @@ export { ModalChatController, chat } from './chat/modal-chat.controller';
|
|
|
6
6
|
export { FlatChatController, createFlatChat, } from './chat/flat-chat.controller';
|
|
7
7
|
export { drawerController } from './overlay';
|
|
8
8
|
export { FileSystemController } from './file-system/file-system.controller';
|
|
9
|
+
export { tipTapController } from './tiptap/tiptap.controller';
|
|
@@ -28,8 +28,14 @@ export declare class OverlayController {
|
|
|
28
28
|
constructor(name?: string);
|
|
29
29
|
/**
|
|
30
30
|
* @description 解析容器
|
|
31
|
+
* @protected
|
|
32
|
+
* @param {(HTMLElement | string | null)} [container] 容器:DOM 元素或选择器,不传默认 body
|
|
33
|
+
* @param {(EventTarget | null)} [origin] 事件源,传入后会优先从事件源所在组件根内查找容器
|
|
34
|
+
* @param {string} [rootSelector='.ibiz-ai-chat'] 组件根选择器,从事件源向上定位作用域,默认 '.ibiz-ai-chat'
|
|
35
|
+
* @returns {*} {HTMLElement}
|
|
36
|
+
* @memberof OverlayController
|
|
31
37
|
*/
|
|
32
|
-
protected resolveContainer(container?: HTMLElement | string | null): HTMLElement;
|
|
38
|
+
protected resolveContainer(container?: HTMLElement | string | null, origin?: EventTarget | null, rootSelector?: string): HTMLElement;
|
|
33
39
|
/**
|
|
34
40
|
* @description 确保容器有定位上下文
|
|
35
41
|
*/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Editor, Node } from '@tiptap/core';
|
|
2
|
+
import { EditorView } from '@tiptap/pm/view';
|
|
3
|
+
import { TipTapNodeConfig } from '../../interface';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description tiptap控制器
|
|
7
|
+
* @export
|
|
8
|
+
* @class TipTapController
|
|
9
|
+
*/
|
|
10
|
+
declare class TipTapController {
|
|
11
|
+
/**
|
|
12
|
+
* @description 节点
|
|
13
|
+
* @private
|
|
14
|
+
* @type {{ [key: string]: Node }}
|
|
15
|
+
* @memberof TipTapController
|
|
16
|
+
*/
|
|
17
|
+
private nodes;
|
|
18
|
+
/**
|
|
19
|
+
* 获取所有已注册的节点,用于传给 Editor 的 extensions
|
|
20
|
+
*/
|
|
21
|
+
getExtensions(): Node[];
|
|
22
|
+
/**
|
|
23
|
+
* Creates an instance of TipTapController.
|
|
24
|
+
* @memberof TipTapController
|
|
25
|
+
*/
|
|
26
|
+
constructor();
|
|
27
|
+
/**
|
|
28
|
+
* @description 创建节点
|
|
29
|
+
* - 必须在AI组件初始化之前执行
|
|
30
|
+
* @param {TipTapNodeConfig} config 节点配置
|
|
31
|
+
* @memberof TipTapController
|
|
32
|
+
*/
|
|
33
|
+
createNode(config: TipTapNodeConfig): void;
|
|
34
|
+
/**
|
|
35
|
+
* @description 处理放置
|
|
36
|
+
* @param {EditorView} view 视图
|
|
37
|
+
* @param {DragEvent} event 事件源
|
|
38
|
+
* @memberof TipTapController
|
|
39
|
+
*/
|
|
40
|
+
handleDrop(editor: Editor, view: EditorView, event: DragEvent): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* @description 获取html字符串
|
|
43
|
+
* @param {Editor} editor
|
|
44
|
+
* @returns {*} {string}
|
|
45
|
+
* @memberof TipTapController
|
|
46
|
+
*/
|
|
47
|
+
getHTML(editor: Editor): string;
|
|
48
|
+
}
|
|
49
|
+
export declare const tipTapController: TipTapController;
|
|
50
|
+
export {};
|
|
@@ -50,6 +50,7 @@ export declare class ChatMessage implements IChatMessage {
|
|
|
50
50
|
get agent_tag(): IChatMessage['agent_tag'];
|
|
51
51
|
get create_time(): IChatMessage['create_time'];
|
|
52
52
|
set create_time(value: string);
|
|
53
|
+
get iswaiting(): IChatMessage['iswaiting'];
|
|
53
54
|
constructor(msg: IChatMessage);
|
|
54
55
|
/**
|
|
55
56
|
* 更新消息
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EyeSvg: () => import("preact").JSX.Element;
|
|
@@ -55,3 +55,5 @@ export { UnTopSvg } from './untop-svg';
|
|
|
55
55
|
export { PlusSvg } from './plus-svg';
|
|
56
56
|
export { ProjectSvg } from './project-svg';
|
|
57
57
|
export { WorlSpaceSvg } from './workspace-svg';
|
|
58
|
+
export { NewFolderSvg } from './new-folder-svg';
|
|
59
|
+
export { EyeSvg } from './eye-svg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NewFolderSvg: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const archive: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const audio: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const image: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './other';
|
|
2
|
+
export * from './text';
|
|
3
|
+
export * from './excel';
|
|
4
|
+
export * from './ppt';
|
|
5
|
+
export * from './video';
|
|
6
|
+
export * from './image';
|
|
7
|
+
export * from './word';
|
|
8
|
+
export * from './audio';
|
|
9
|
+
export * from './program';
|
|
10
|
+
export * from './archive';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ppt: () => import("preact").JSX.Element;
|
|
2
|
+
export declare const pptx: () => import("preact").JSX.Element;
|
|
3
|
+
export declare const pptm: () => import("preact").JSX.Element;
|
|
4
|
+
export declare const _ppt: () => import("preact").JSX.Element;
|
|
5
|
+
export declare const pdf: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const program: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const txt: () => import("preact").JSX.Element;
|
|
2
|
+
export declare const md: () => import("preact").JSX.Element;
|
|
3
|
+
export declare const log: () => import("preact").JSX.Element;
|
|
4
|
+
export declare const csv: () => import("preact").JSX.Element;
|
|
5
|
+
export declare const tsv: () => import("preact").JSX.Element;
|
|
6
|
+
export declare const xml: () => import("preact").JSX.Element;
|
|
7
|
+
export declare const json: () => import("preact").JSX.Element;
|
|
8
|
+
export declare const yaml: () => import("preact").JSX.Element;
|
|
9
|
+
export declare const yml: () => import("preact").JSX.Element;
|
|
10
|
+
export declare const ini: () => import("preact").JSX.Element;
|
|
11
|
+
export declare const cfg: () => import("preact").JSX.Element;
|
|
12
|
+
export declare const conf: () => import("preact").JSX.Element;
|
|
13
|
+
export declare const html: () => import("preact").JSX.Element;
|
|
14
|
+
export declare const css: () => import("preact").JSX.Element;
|
|
15
|
+
export declare const jsx: () => import("preact").JSX.Element;
|
|
16
|
+
export declare const tsx: () => import("preact").JSX.Element;
|
|
17
|
+
export declare const vue: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const video: () => import("preact").JSX.Element;
|
|
2
|
+
export declare const mp4: () => import("preact").JSX.Element;
|
|
3
|
+
export declare const m4v: () => import("preact").JSX.Element;
|
|
4
|
+
export declare const mkv: () => import("preact").JSX.Element;
|
|
5
|
+
export declare const avi: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const word: () => import("preact").JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { NodeConfig } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @description TipTap扩展节点类型
|
|
5
|
+
* @export
|
|
6
|
+
* @enum {number}
|
|
7
|
+
*/
|
|
8
|
+
export declare enum TipTapNodeType {
|
|
9
|
+
FILE = "file"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @description TipTap拖拽数据
|
|
13
|
+
* @export
|
|
14
|
+
* @interface ITipTapDropData
|
|
15
|
+
*/
|
|
16
|
+
export interface ITipTapDropData {
|
|
17
|
+
/**
|
|
18
|
+
* @description 拖拽类型
|
|
19
|
+
* @type {TipTapNodeType}
|
|
20
|
+
* @memberof ITipTapDropData
|
|
21
|
+
*/
|
|
22
|
+
type: TipTapNodeType;
|
|
23
|
+
/**
|
|
24
|
+
* @description 数据标识
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof ITipTapDropData
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* @description 数据标题
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof ITipTapDropData
|
|
33
|
+
*/
|
|
34
|
+
label: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 扩展的节点配置:在 Tiptap NodeConfig 基础上增加清洗相关配置
|
|
38
|
+
*/
|
|
39
|
+
export interface TipTapNodeConfig extends NodeConfig {
|
|
40
|
+
/**
|
|
41
|
+
* @description 节点在 getHTML() 输出中的表示
|
|
42
|
+
* @param el 该节点对应的 DOM 元素
|
|
43
|
+
* @returns 指定的html字符串
|
|
44
|
+
*/
|
|
45
|
+
getHTML?: (el: Element) => string;
|
|
46
|
+
/**
|
|
47
|
+
* @description 用于定位该节点 DOM 的选择器
|
|
48
|
+
* 不传时默认使用 [data-type="节点名"]
|
|
49
|
+
*/
|
|
50
|
+
htmlSelector?: string;
|
|
51
|
+
}
|