@mxmweb/rtext 1.0.9 → 1.0.30

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/lib_enter.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { default as UnifiedRichText } from './core/UnifiedRichText';
1
+ export type { CustomElement, CustomText, RichTextStyles, RichTextEvents, AdapterProps, MergedEventsEmit, MergedCustomizeComponents } from './core/types';
2
2
  export { DataType } from './core/UnifiedRichText';
3
3
  export type { DataSource, UnifiedRichTextProps } from './core/UnifiedRichText';
4
- export type { CustomElement, CustomText, RichTextStyles, RichTextEvents, AdapterProps, MergedEventsEmit, MergedCustomizeComponents } from './core/types';
4
+ export { default as UnifiedRichText } from './core/UnifiedRichText';
5
5
  export { serializeToMarkdown, serializeToHtml } from './core/converters/slateConverters';
6
6
  export { default as ChatMessageAdapter } from './adopters/ChatMessageAdapter';
7
7
  export { default as Markdownit } from './adopters/Markdownit';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,176 @@
1
+ export declare const mockServerData: {
2
+ data: {
3
+ label: string;
4
+ sessionId: string;
5
+ gmtCreate: string;
6
+ gmtModified: string;
7
+ createBy: string;
8
+ updateBy: string;
9
+ filePath: string;
10
+ configId: number;
11
+ kbId: null;
12
+ queryReplyPairList: ({
13
+ query: {
14
+ id: number;
15
+ gmtCreate: string;
16
+ content: string;
17
+ type: string;
18
+ queryId: string;
19
+ audioUrl: string;
20
+ filePaths: null;
21
+ currentFiles: null;
22
+ };
23
+ reply: {
24
+ id: number;
25
+ gmtCreate: string;
26
+ content: string;
27
+ type: string;
28
+ reference: string;
29
+ webReference: string;
30
+ queryId: string;
31
+ feedbackResult: null;
32
+ feedbackId: null;
33
+ parsedFilePaths: null;
34
+ recommendQuestion: string;
35
+ llmType: number;
36
+ resultType: number;
37
+ respTime: number;
38
+ tokens: number;
39
+ databaseReference?: undefined;
40
+ };
41
+ } | {
42
+ query: {
43
+ id: number;
44
+ gmtCreate: string;
45
+ content: string;
46
+ type: string;
47
+ queryId: string;
48
+ audioUrl: string;
49
+ filePaths: null;
50
+ currentFiles: null;
51
+ };
52
+ reply: {
53
+ id: number;
54
+ gmtCreate: string;
55
+ content: string;
56
+ type: string;
57
+ reference: string;
58
+ webReference: string;
59
+ queryId: string;
60
+ feedbackResult: null;
61
+ feedbackId: null;
62
+ parsedFilePaths: null;
63
+ recommendQuestion: null;
64
+ llmType: number;
65
+ resultType: number;
66
+ respTime: number;
67
+ tokens: number;
68
+ databaseReference?: undefined;
69
+ };
70
+ } | {
71
+ query: {
72
+ id: number;
73
+ gmtCreate: string;
74
+ content: string;
75
+ type: string;
76
+ queryId: string;
77
+ audioUrl: string;
78
+ filePaths: null;
79
+ currentFiles: null;
80
+ };
81
+ reply: {
82
+ id: number;
83
+ gmtCreate: string;
84
+ content: string;
85
+ type: string;
86
+ reference: string;
87
+ webReference: string;
88
+ queryId: string;
89
+ feedbackResult: number;
90
+ feedbackId: number;
91
+ parsedFilePaths: null;
92
+ recommendQuestion: string;
93
+ llmType: number;
94
+ resultType: number;
95
+ respTime: number;
96
+ tokens: number;
97
+ databaseReference?: undefined;
98
+ };
99
+ } | {
100
+ query: {
101
+ id: number;
102
+ gmtCreate: string;
103
+ content: string;
104
+ type: string;
105
+ queryId: string;
106
+ audioUrl: string;
107
+ filePaths: null;
108
+ currentFiles: null;
109
+ };
110
+ reply: {
111
+ id: number;
112
+ gmtCreate: string;
113
+ content: string;
114
+ type: string;
115
+ reference: string;
116
+ webReference: string;
117
+ databaseReference: string;
118
+ queryId: string;
119
+ feedbackResult: null;
120
+ feedbackId: null;
121
+ parsedFilePaths: null;
122
+ recommendQuestion: null;
123
+ llmType: number;
124
+ resultType: number;
125
+ respTime: number;
126
+ tokens: number;
127
+ };
128
+ } | {
129
+ query: {
130
+ id: number;
131
+ gmtCreate: string;
132
+ content: string;
133
+ type: string;
134
+ queryId: string;
135
+ audioUrl: string;
136
+ filePaths: null;
137
+ currentFiles: null;
138
+ };
139
+ reply: {
140
+ id: number;
141
+ gmtCreate: string;
142
+ content: string;
143
+ type: string;
144
+ reference: string;
145
+ webReference: string;
146
+ databaseReference: string;
147
+ queryId: string;
148
+ feedbackResult: null;
149
+ feedbackId: null;
150
+ parsedFilePaths: null;
151
+ recommendQuestion: string;
152
+ llmType: number;
153
+ resultType: number;
154
+ respTime: number;
155
+ tokens: number;
156
+ };
157
+ })[];
158
+ searchConfigDTO: {
159
+ id: number;
160
+ status: number;
161
+ isDefault: number;
162
+ configJson: string;
163
+ name: string;
164
+ des: null;
165
+ createBy: string;
166
+ gmtCreate: string;
167
+ permission: null;
168
+ sensitiveWordIds: string;
169
+ defaultAnswer: string;
170
+ model: boolean;
171
+ enabledFaq: number;
172
+ dependOnKb: number;
173
+ isDel: number;
174
+ };
175
+ };
176
+ };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "style": "assets/style.css",
6
6
  "types": "lib_enter.d.ts",
7
7
  "private": false,
8
- "version": "1.0.9",
8
+ "version": "1.0.30",
9
9
  "author": "hanfeng_Zhang",
10
10
  "type": "module",
11
11
  "scripts": {
@@ -1 +0,0 @@
1
- export default function Demo_ChatMessage(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { default as React } from 'react';
2
- declare const TestTemplateLeaf: React.FC;
3
- export default TestTemplateLeaf;
@@ -1,54 +0,0 @@
1
- import { default as React } from 'react';
2
- interface PromptTempDesignerLeafProps {
3
- /** 包含template标签的原始数据 */
4
- data: string;
5
- /** 模版内容变化回调 */
6
- onChange?: (template: string) => void;
7
- /** 主题样式 */
8
- theme?: {
9
- primaryColor?: string;
10
- secondaryColor?: string;
11
- backgroundColor?: string;
12
- textColor?: string;
13
- borderColor?: string;
14
- borderRadius?: string;
15
- padding?: string;
16
- margin?: string;
17
- };
18
- /** 样式配置 */
19
- styles?: {
20
- /** 字间距 */
21
- letterSpacing?: string;
22
- /** 行间距 */
23
- lineHeight?: string;
24
- /** 蓝框背景样式 */
25
- templateField?: {
26
- backgroundColor?: string;
27
- borderColor?: string;
28
- borderRadius?: string;
29
- padding?: string;
30
- margin?: string;
31
- fontSize?: string;
32
- fontWeight?: string;
33
- minWidth?: string;
34
- /** 文字颜色 */
35
- textColor?: string;
36
- };
37
- /** 文本样式 */
38
- text?: {
39
- fontSize?: string;
40
- lineHeight?: string;
41
- color?: string;
42
- };
43
- };
44
- /** 获取数据的回调函数 */
45
- onGetData?: (getData: (format: 'pure_string' | 'string' | 'markdown' | 'html') => string) => void;
46
- }
47
- /**
48
- * 模版设计器组件(Leaf方案)
49
- * 基于UnifiedRichText核心组件实现可编辑的模版字段
50
- * 支持解析包含<template>标签的字符串数据
51
- * 使用Leaf方案,更好的背景色和宽度控制
52
- */
53
- declare const PromptTempDesignerLeaf: React.FC<PromptTempDesignerLeafProps>;
54
- export default PromptTempDesignerLeaf;
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- interface TemplateLeaf {
3
- type: 'template';
4
- id: string;
5
- placeholder: string;
6
- value: string;
7
- style?: string;
8
- }
9
- declare const TemplateLeaf: React.ForwardRefExoticComponent<{
10
- leaf: TemplateLeaf;
11
- attributes: any;
12
- children: React.ReactNode;
13
- styles?: any;
14
- onTemplateChange?: (id: string, value: string) => void;
15
- } & React.RefAttributes<HTMLSpanElement>>;
16
- export default TemplateLeaf;