@linker-design-plus/tiny-peony 1.4.20 → 1.4.22
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/foundation/contentManager/contentManager.d.ts +5 -0
- package/dist/index.d.ts +83 -21
- package/dist/index.js +34 -35
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4579 -3046
- package/dist/index.mjs.map +1 -0
- package/dist/intersection/components/editor/context.d.ts +128 -2
- package/dist/intersection/components/editor/editor.d.ts +54 -10
- package/dist/intersection/components/editor/index.d.ts +83 -21
- package/dist/intersection/components/modals/Refine/RefineContent.d.ts +20 -0
- package/dist/intersection/components/modals/Refine/RefineGenerator.d.ts +19 -0
- package/dist/intersection/components/modals/Refine/RefineInput.d.ts +18 -0
- package/dist/intersection/components/modals/Refine/RefineShortcut.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/RefineToolbar.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/context.d.ts +128 -0
- package/dist/intersection/components/modals/Refine/icons/abort.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/copy.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/delete.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/expand.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/inexpand.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/insert.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/moreShortcut.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/optimism.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/prefix.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/refresh.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/replace.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/icons/send.vue.d.ts +2 -0
- package/dist/intersection/components/modals/Refine/index.d.ts +3 -0
- package/dist/intersection/components/modals/Refine/use-modal-pos.d.ts +10 -0
- package/dist/intersection/components/modals/Refine/use-range-highlight.d.ts +6 -0
- package/dist/intersection/hooks/use-copy.d.ts +4 -0
- package/dist/intersection/hooks/use-editor.d.ts +5 -3
- package/dist/intersection/hooks/use-state.d.ts +4 -0
- package/dist/plugins/AnchorTagPlugin/plugin.d.ts +4 -0
- package/dist/plugins/HomophonesTagPlugin/homophoner.vue.d.ts +2 -2
- package/dist/plugins/PronunciationTagPlugin/pronunciationor.vue.d.ts +2 -2
- package/dist/tiny-peony.css +1 -1
- package/dist/typings/actions/i-anchor.d.ts +8 -0
- package/dist/typings/intersection/editor.d.ts +10 -1
- package/dist/utils/dom.d.ts +19 -1
- package/dist/utils/shared.d.ts +11 -0
- package/package.json +6 -6
|
@@ -14,6 +14,10 @@ export interface ContentOptions {
|
|
|
14
14
|
* * 是否返回带有文本审核高亮样式标记
|
|
15
15
|
*/
|
|
16
16
|
withAuditHighlight?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 是否返回带有调优高亮样式标记
|
|
19
|
+
*/
|
|
20
|
+
withRefineHighlight?: boolean;
|
|
17
21
|
}
|
|
18
22
|
export declare const defaultContentOptions: ContentOptions;
|
|
19
23
|
export interface EditorContext {
|
|
@@ -30,16 +34,138 @@ export interface EditorContext {
|
|
|
30
34
|
isCaret: () => boolean;
|
|
31
35
|
isRange: () => boolean;
|
|
32
36
|
isSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
33
|
-
getAnchorTtsMark: (
|
|
34
|
-
getAnchorTtsEmotionAndRole: (
|
|
37
|
+
getAnchorTtsMark: (anchor: IAnchor, startFromCursor?: boolean) => string;
|
|
38
|
+
getAnchorTtsEmotionAndRole: (anchor: IAnchor) => [string, string | undefined];
|
|
35
39
|
isAllMarkedByAnchor: () => boolean;
|
|
36
40
|
addExtraAnchors: (data: IAnchor[]) => void;
|
|
37
41
|
clearContent: () => void;
|
|
38
42
|
renderHighlight: (matchingContent: string) => void;
|
|
39
43
|
unrenderHighlight: () => void;
|
|
44
|
+
refineContext?: RefineContext;
|
|
40
45
|
}
|
|
41
46
|
export declare const EditorInjectionKey: InjectionKey<EditorContext>;
|
|
42
47
|
declare const HIGHLIGHT_CLS = "highlight";
|
|
43
48
|
declare const auditHighlightBem: import("@linker-design/utils").Bem;
|
|
44
49
|
declare const AUDIT_HIGHLIGHT_CLS: string;
|
|
45
50
|
export { HIGHLIGHT_CLS, auditHighlightBem, AUDIT_HIGHLIGHT_CLS };
|
|
51
|
+
export interface RefineContext {
|
|
52
|
+
agentId: string;
|
|
53
|
+
createSession: (data: {
|
|
54
|
+
agentId: string;
|
|
55
|
+
sessionId: string;
|
|
56
|
+
}) => Promise<{
|
|
57
|
+
data: ChatInfoResp;
|
|
58
|
+
[key: string]: any;
|
|
59
|
+
}>;
|
|
60
|
+
sendSessionMessage: {
|
|
61
|
+
(data: ChatMessageReq, options: Recordable): Promise<void>;
|
|
62
|
+
abort: () => void | undefined;
|
|
63
|
+
};
|
|
64
|
+
abortSession: (data: {
|
|
65
|
+
conversationId?: string;
|
|
66
|
+
sessionId?: string;
|
|
67
|
+
}) => Promise<any>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* ChatMessageReq
|
|
71
|
+
*/
|
|
72
|
+
export interface ChatMessageReq {
|
|
73
|
+
/**
|
|
74
|
+
* 是否深度思考,0否 1是
|
|
75
|
+
*/
|
|
76
|
+
deepseek?: number;
|
|
77
|
+
/**
|
|
78
|
+
* 引用的网页,多个以逗号分隔
|
|
79
|
+
*/
|
|
80
|
+
htmlUrls?: string;
|
|
81
|
+
messageRequest?: MessageRequest;
|
|
82
|
+
/**
|
|
83
|
+
* 模型名称,Deepseek-R1、Gemini-2.5-flash、Claude-opus-4.1
|
|
84
|
+
*/
|
|
85
|
+
modelName?: string;
|
|
86
|
+
/**
|
|
87
|
+
* 参考文件信息json,前端展示回显用
|
|
88
|
+
*/
|
|
89
|
+
refFiles?: string;
|
|
90
|
+
/**
|
|
91
|
+
* 引用文档,多个以逗号分隔
|
|
92
|
+
*/
|
|
93
|
+
refUrls?: string;
|
|
94
|
+
/**
|
|
95
|
+
* 是否搜索,0否 1是
|
|
96
|
+
*/
|
|
97
|
+
search?: number;
|
|
98
|
+
/**
|
|
99
|
+
* 待优化的源内容
|
|
100
|
+
*/
|
|
101
|
+
sourceContent?: string;
|
|
102
|
+
/**
|
|
103
|
+
* 待优化的内容源链接地址
|
|
104
|
+
*/
|
|
105
|
+
sourceUrls?: string[];
|
|
106
|
+
/**
|
|
107
|
+
* 模板id
|
|
108
|
+
*/
|
|
109
|
+
templateId?: number;
|
|
110
|
+
tenantId?: string;
|
|
111
|
+
/**
|
|
112
|
+
* 会话类型,0写稿 1每日要闻
|
|
113
|
+
*/
|
|
114
|
+
type?: number;
|
|
115
|
+
userCode?: string;
|
|
116
|
+
[property: string]: any;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* MessageRequest
|
|
120
|
+
*/
|
|
121
|
+
export interface MessageRequest {
|
|
122
|
+
agent_id?: string;
|
|
123
|
+
extra_params?: {
|
|
124
|
+
[key: string]: {
|
|
125
|
+
[key: string]: any;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
message?: Message;
|
|
129
|
+
meta_data?: MetaData;
|
|
130
|
+
[property: string]: any;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Message
|
|
134
|
+
*/
|
|
135
|
+
export interface Message {
|
|
136
|
+
content?: string;
|
|
137
|
+
conversation_id?: string;
|
|
138
|
+
data?: {
|
|
139
|
+
[key: string]: any;
|
|
140
|
+
}[];
|
|
141
|
+
history?: {
|
|
142
|
+
[key: string]: any;
|
|
143
|
+
}[];
|
|
144
|
+
[property: string]: any;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* MetaData
|
|
148
|
+
*/
|
|
149
|
+
export interface MetaData {
|
|
150
|
+
ai_rewrite?: string;
|
|
151
|
+
data?: {
|
|
152
|
+
[key: string]: any;
|
|
153
|
+
}[];
|
|
154
|
+
is_search?: string;
|
|
155
|
+
model_name?: string;
|
|
156
|
+
rewrite_content?: string;
|
|
157
|
+
sessionId?: string;
|
|
158
|
+
url?: string[];
|
|
159
|
+
word_number?: string;
|
|
160
|
+
[property: string]: any;
|
|
161
|
+
}
|
|
162
|
+
export interface ChatInfoResp {
|
|
163
|
+
agentId?: string;
|
|
164
|
+
chatContext?: string;
|
|
165
|
+
content?: string;
|
|
166
|
+
conversionId?: string;
|
|
167
|
+
id?: number;
|
|
168
|
+
sessionId?: string;
|
|
169
|
+
welcome?: string;
|
|
170
|
+
[property: string]: any;
|
|
171
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, PropType } from 'vue';
|
|
2
2
|
import { JSX } from 'vue/jsx-runtime';
|
|
3
|
-
import { ContentOptions } from './context';
|
|
3
|
+
import { ContentOptions, RefineContext } from './context';
|
|
4
4
|
import { IAnchor, ListenModeEnum, PluginFlag } from '../../../typings';
|
|
5
5
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
preTime: {
|
|
@@ -16,8 +16,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
18
|
listenAnchorId: {
|
|
19
|
-
type:
|
|
20
|
-
default:
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
21
|
};
|
|
22
22
|
listenMode: {
|
|
23
23
|
type: PropType<ListenModeEnum>;
|
|
@@ -51,6 +51,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
51
51
|
type: PropType<CSSProperties>;
|
|
52
52
|
default: () => {};
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* 是否开启文本调优
|
|
56
|
+
*/
|
|
57
|
+
refinable: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* 文本调优上下文
|
|
63
|
+
*/
|
|
64
|
+
refineContext: {
|
|
65
|
+
type: PropType<RefineContext>;
|
|
66
|
+
};
|
|
67
|
+
editorHeight: {
|
|
68
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
54
71
|
showPreTime: {
|
|
55
72
|
type: BooleanConstructor;
|
|
56
73
|
default: boolean;
|
|
@@ -69,11 +86,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
69
86
|
innerIsRange: () => boolean;
|
|
70
87
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
71
88
|
innerIsSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
72
|
-
|
|
73
|
-
|
|
89
|
+
innerConvertToContent: (node: HTMLElement | Text) => string | undefined;
|
|
90
|
+
innerGetAnchorTtsMark: (anchor: IAnchor, startFromCursor?: boolean) => string;
|
|
91
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: IAnchor) => [string, string | undefined];
|
|
74
92
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
75
93
|
innerAddExtraAnchors: (data: IAnchor[]) => void;
|
|
94
|
+
innerUpdateAnchor: (newAnchor: IAnchor) => void;
|
|
76
95
|
innerClearContent: () => void;
|
|
96
|
+
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
77
97
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
78
98
|
innerUnrenderHightlight: () => void;
|
|
79
99
|
}, {}, {}, {
|
|
@@ -90,11 +110,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
90
110
|
isRange(): boolean;
|
|
91
111
|
isSelectionInDifferentParas(): boolean;
|
|
92
112
|
isSelectionContainsTag(type: PluginFlag): boolean;
|
|
93
|
-
|
|
94
|
-
|
|
113
|
+
convertToContent(node: HTMLElement | Text): string | undefined;
|
|
114
|
+
getAnchorTtsMark(anchor: IAnchor, startFromCursor?: boolean): string;
|
|
115
|
+
getAnchorTtsEmotionAndRole(anchor: IAnchor): [string, string | undefined];
|
|
95
116
|
isAllMarkedByAnchor(): boolean;
|
|
96
117
|
addExtraAnchors(data: IAnchor[]): void;
|
|
118
|
+
updateAnchor(anchor: IAnchor): void;
|
|
97
119
|
clearContent(): void;
|
|
120
|
+
insertContentAtCursor(_content: string | string[]): void;
|
|
98
121
|
clear(): Promise<void>;
|
|
99
122
|
renderHighlight(matchingContent: string): void;
|
|
100
123
|
unrenderHighlight(): void;
|
|
@@ -104,6 +127,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
104
127
|
anchorListen: (value: IAnchor, text: string) => true;
|
|
105
128
|
anchorListenStop: (value: IAnchor) => true;
|
|
106
129
|
anchorRemove: (value: IAnchor) => true;
|
|
130
|
+
clear: () => true;
|
|
107
131
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
108
132
|
preTime: {
|
|
109
133
|
type: StringConstructor;
|
|
@@ -118,8 +142,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
118
142
|
default: undefined;
|
|
119
143
|
};
|
|
120
144
|
listenAnchorId: {
|
|
121
|
-
type:
|
|
122
|
-
default:
|
|
145
|
+
type: StringConstructor;
|
|
146
|
+
default: string;
|
|
123
147
|
};
|
|
124
148
|
listenMode: {
|
|
125
149
|
type: PropType<ListenModeEnum>;
|
|
@@ -153,12 +177,30 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
153
177
|
type: PropType<CSSProperties>;
|
|
154
178
|
default: () => {};
|
|
155
179
|
};
|
|
180
|
+
/**
|
|
181
|
+
* 是否开启文本调优
|
|
182
|
+
*/
|
|
183
|
+
refinable: {
|
|
184
|
+
type: BooleanConstructor;
|
|
185
|
+
default: boolean;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* 文本调优上下文
|
|
189
|
+
*/
|
|
190
|
+
refineContext: {
|
|
191
|
+
type: PropType<RefineContext>;
|
|
192
|
+
};
|
|
193
|
+
editorHeight: {
|
|
194
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
195
|
+
default: string;
|
|
196
|
+
};
|
|
156
197
|
showPreTime: {
|
|
157
198
|
type: BooleanConstructor;
|
|
158
199
|
default: boolean;
|
|
159
200
|
};
|
|
160
201
|
}>> & Readonly<{
|
|
161
202
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
203
|
+
onClear?: (() => any) | undefined;
|
|
162
204
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
163
205
|
onAnchorListen?: ((value: IAnchor, text: string) => any) | undefined;
|
|
164
206
|
onAnchorRemove?: ((value: IAnchor) => any) | undefined;
|
|
@@ -173,9 +215,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
173
215
|
simple: boolean;
|
|
174
216
|
preTime: string;
|
|
175
217
|
textCount: number;
|
|
176
|
-
listenAnchorId:
|
|
218
|
+
listenAnchorId: string;
|
|
177
219
|
listenMode: ListenModeEnum;
|
|
178
220
|
contentStyle: CSSProperties;
|
|
221
|
+
refinable: boolean;
|
|
222
|
+
editorHeight: string | number;
|
|
179
223
|
showPreTime: boolean;
|
|
180
224
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
181
225
|
export default _default;
|
|
@@ -16,8 +16,8 @@ declare const EditorContainer: {
|
|
|
16
16
|
default: undefined;
|
|
17
17
|
};
|
|
18
18
|
listenAnchorId: {
|
|
19
|
-
type:
|
|
20
|
-
default:
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
21
|
};
|
|
22
22
|
listenMode: {
|
|
23
23
|
type: import("vue").PropType<import("../../..").ListenModeEnum>;
|
|
@@ -51,12 +51,24 @@ declare const EditorContainer: {
|
|
|
51
51
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
52
52
|
default: () => {};
|
|
53
53
|
};
|
|
54
|
+
refinable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: boolean;
|
|
57
|
+
};
|
|
58
|
+
refineContext: {
|
|
59
|
+
type: import("vue").PropType<import("./context").RefineContext>;
|
|
60
|
+
};
|
|
61
|
+
editorHeight: {
|
|
62
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
54
65
|
showPreTime: {
|
|
55
66
|
type: BooleanConstructor;
|
|
56
67
|
default: boolean;
|
|
57
68
|
};
|
|
58
69
|
}>> & Readonly<{
|
|
59
70
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
71
|
+
onClear?: (() => any) | undefined;
|
|
60
72
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
61
73
|
onAnchorListen?: ((value: import("../../..").IAnchor, text: string) => any) | undefined;
|
|
62
74
|
onAnchorRemove?: ((value: import("../../..").IAnchor) => any) | undefined;
|
|
@@ -75,11 +87,14 @@ declare const EditorContainer: {
|
|
|
75
87
|
innerIsRange: () => boolean;
|
|
76
88
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
77
89
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
innerConvertToContent: (node: HTMLElement | Text) => string | undefined;
|
|
91
|
+
innerGetAnchorTtsMark: (anchor: import("../../..").IAnchor, startFromCursor?: boolean) => string;
|
|
92
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
80
93
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
81
94
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
95
|
+
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
82
96
|
innerClearContent: () => void;
|
|
97
|
+
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
83
98
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
84
99
|
innerUnrenderHightlight: () => void;
|
|
85
100
|
}, {}, {}, {
|
|
@@ -96,11 +111,14 @@ declare const EditorContainer: {
|
|
|
96
111
|
isRange(): boolean;
|
|
97
112
|
isSelectionInDifferentParas(): boolean;
|
|
98
113
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
99
|
-
|
|
100
|
-
|
|
114
|
+
convertToContent(node: HTMLElement | Text): string | undefined;
|
|
115
|
+
getAnchorTtsMark(anchor: import("../../..").IAnchor, startFromCursor?: boolean): string;
|
|
116
|
+
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
101
117
|
isAllMarkedByAnchor(): boolean;
|
|
102
118
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
119
|
+
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
103
120
|
clearContent(): void;
|
|
121
|
+
insertContentAtCursor(_content: string | string[]): void;
|
|
104
122
|
clear(): Promise<void>;
|
|
105
123
|
renderHighlight(matchingContent: string): void;
|
|
106
124
|
unrenderHighlight(): void;
|
|
@@ -110,6 +128,7 @@ declare const EditorContainer: {
|
|
|
110
128
|
anchorListen: (value: import("../../..").IAnchor, text: string) => true;
|
|
111
129
|
anchorListenStop: (value: import("../../..").IAnchor) => true;
|
|
112
130
|
anchorRemove: (value: import("../../..").IAnchor) => true;
|
|
131
|
+
clear: () => true;
|
|
113
132
|
}, import("vue").PublicProps, {
|
|
114
133
|
highlight: boolean;
|
|
115
134
|
class: string | unknown[];
|
|
@@ -120,9 +139,11 @@ declare const EditorContainer: {
|
|
|
120
139
|
simple: boolean;
|
|
121
140
|
preTime: string;
|
|
122
141
|
textCount: number;
|
|
123
|
-
listenAnchorId:
|
|
142
|
+
listenAnchorId: string;
|
|
124
143
|
listenMode: import("../../..").ListenModeEnum;
|
|
125
144
|
contentStyle: import("vue").CSSProperties;
|
|
145
|
+
refinable: boolean;
|
|
146
|
+
editorHeight: string | number;
|
|
126
147
|
showPreTime: boolean;
|
|
127
148
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
128
149
|
P: {};
|
|
@@ -145,8 +166,8 @@ declare const EditorContainer: {
|
|
|
145
166
|
default: undefined;
|
|
146
167
|
};
|
|
147
168
|
listenAnchorId: {
|
|
148
|
-
type:
|
|
149
|
-
default:
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
default: string;
|
|
150
171
|
};
|
|
151
172
|
listenMode: {
|
|
152
173
|
type: import("vue").PropType<import("../../..").ListenModeEnum>;
|
|
@@ -180,12 +201,24 @@ declare const EditorContainer: {
|
|
|
180
201
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
181
202
|
default: () => {};
|
|
182
203
|
};
|
|
204
|
+
refinable: {
|
|
205
|
+
type: BooleanConstructor;
|
|
206
|
+
default: boolean;
|
|
207
|
+
};
|
|
208
|
+
refineContext: {
|
|
209
|
+
type: import("vue").PropType<import("./context").RefineContext>;
|
|
210
|
+
};
|
|
211
|
+
editorHeight: {
|
|
212
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
213
|
+
default: string;
|
|
214
|
+
};
|
|
183
215
|
showPreTime: {
|
|
184
216
|
type: BooleanConstructor;
|
|
185
217
|
default: boolean;
|
|
186
218
|
};
|
|
187
219
|
}>> & Readonly<{
|
|
188
220
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
221
|
+
onClear?: (() => any) | undefined;
|
|
189
222
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
190
223
|
onAnchorListen?: ((value: import("../../..").IAnchor, text: string) => any) | undefined;
|
|
191
224
|
onAnchorRemove?: ((value: import("../../..").IAnchor) => any) | undefined;
|
|
@@ -204,11 +237,14 @@ declare const EditorContainer: {
|
|
|
204
237
|
innerIsRange: () => boolean;
|
|
205
238
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
206
239
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
207
|
-
|
|
208
|
-
|
|
240
|
+
innerConvertToContent: (node: HTMLElement | Text) => string | undefined;
|
|
241
|
+
innerGetAnchorTtsMark: (anchor: import("../../..").IAnchor, startFromCursor?: boolean) => string;
|
|
242
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
209
243
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
210
244
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
245
|
+
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
211
246
|
innerClearContent: () => void;
|
|
247
|
+
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
212
248
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
213
249
|
innerUnrenderHightlight: () => void;
|
|
214
250
|
}, {}, {}, {
|
|
@@ -225,11 +261,14 @@ declare const EditorContainer: {
|
|
|
225
261
|
isRange(): boolean;
|
|
226
262
|
isSelectionInDifferentParas(): boolean;
|
|
227
263
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
228
|
-
|
|
229
|
-
|
|
264
|
+
convertToContent(node: HTMLElement | Text): string | undefined;
|
|
265
|
+
getAnchorTtsMark(anchor: import("../../..").IAnchor, startFromCursor?: boolean): string;
|
|
266
|
+
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
230
267
|
isAllMarkedByAnchor(): boolean;
|
|
231
268
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
269
|
+
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
232
270
|
clearContent(): void;
|
|
271
|
+
insertContentAtCursor(_content: string | string[]): void;
|
|
233
272
|
clear(): Promise<void>;
|
|
234
273
|
renderHighlight(matchingContent: string): void;
|
|
235
274
|
unrenderHighlight(): void;
|
|
@@ -243,9 +282,11 @@ declare const EditorContainer: {
|
|
|
243
282
|
simple: boolean;
|
|
244
283
|
preTime: string;
|
|
245
284
|
textCount: number;
|
|
246
|
-
listenAnchorId:
|
|
285
|
+
listenAnchorId: string;
|
|
247
286
|
listenMode: import("../../..").ListenModeEnum;
|
|
248
287
|
contentStyle: import("vue").CSSProperties;
|
|
288
|
+
refinable: boolean;
|
|
289
|
+
editorHeight: string | number;
|
|
249
290
|
showPreTime: boolean;
|
|
250
291
|
}>;
|
|
251
292
|
__isFragment?: never;
|
|
@@ -265,8 +306,8 @@ declare const EditorContainer: {
|
|
|
265
306
|
default: undefined;
|
|
266
307
|
};
|
|
267
308
|
listenAnchorId: {
|
|
268
|
-
type:
|
|
269
|
-
default:
|
|
309
|
+
type: StringConstructor;
|
|
310
|
+
default: string;
|
|
270
311
|
};
|
|
271
312
|
listenMode: {
|
|
272
313
|
type: import("vue").PropType<import("../../..").ListenModeEnum>;
|
|
@@ -300,12 +341,24 @@ declare const EditorContainer: {
|
|
|
300
341
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
301
342
|
default: () => {};
|
|
302
343
|
};
|
|
344
|
+
refinable: {
|
|
345
|
+
type: BooleanConstructor;
|
|
346
|
+
default: boolean;
|
|
347
|
+
};
|
|
348
|
+
refineContext: {
|
|
349
|
+
type: import("vue").PropType<import("./context").RefineContext>;
|
|
350
|
+
};
|
|
351
|
+
editorHeight: {
|
|
352
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
353
|
+
default: string;
|
|
354
|
+
};
|
|
303
355
|
showPreTime: {
|
|
304
356
|
type: BooleanConstructor;
|
|
305
357
|
default: boolean;
|
|
306
358
|
};
|
|
307
359
|
}>> & Readonly<{
|
|
308
360
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
361
|
+
onClear?: (() => any) | undefined;
|
|
309
362
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
310
363
|
onAnchorListen?: ((value: import("../../..").IAnchor, text: string) => any) | undefined;
|
|
311
364
|
onAnchorRemove?: ((value: import("../../..").IAnchor) => any) | undefined;
|
|
@@ -324,11 +377,14 @@ declare const EditorContainer: {
|
|
|
324
377
|
innerIsRange: () => boolean;
|
|
325
378
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
326
379
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
327
|
-
|
|
328
|
-
|
|
380
|
+
innerConvertToContent: (node: HTMLElement | Text) => string | undefined;
|
|
381
|
+
innerGetAnchorTtsMark: (anchor: import("../../..").IAnchor, startFromCursor?: boolean) => string;
|
|
382
|
+
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
329
383
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
330
384
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
385
|
+
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
331
386
|
innerClearContent: () => void;
|
|
387
|
+
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
332
388
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
333
389
|
innerUnrenderHightlight: () => void;
|
|
334
390
|
}, {}, {}, {
|
|
@@ -345,11 +401,14 @@ declare const EditorContainer: {
|
|
|
345
401
|
isRange(): boolean;
|
|
346
402
|
isSelectionInDifferentParas(): boolean;
|
|
347
403
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
348
|
-
|
|
349
|
-
|
|
404
|
+
convertToContent(node: HTMLElement | Text): string | undefined;
|
|
405
|
+
getAnchorTtsMark(anchor: import("../../..").IAnchor, startFromCursor?: boolean): string;
|
|
406
|
+
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
350
407
|
isAllMarkedByAnchor(): boolean;
|
|
351
408
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
409
|
+
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
352
410
|
clearContent(): void;
|
|
411
|
+
insertContentAtCursor(_content: string | string[]): void;
|
|
353
412
|
clear(): Promise<void>;
|
|
354
413
|
renderHighlight(matchingContent: string): void;
|
|
355
414
|
unrenderHighlight(): void;
|
|
@@ -359,6 +418,7 @@ declare const EditorContainer: {
|
|
|
359
418
|
anchorListen: (value: import("../../..").IAnchor, text: string) => true;
|
|
360
419
|
anchorListenStop: (value: import("../../..").IAnchor) => true;
|
|
361
420
|
anchorRemove: (value: import("../../..").IAnchor) => true;
|
|
421
|
+
clear: () => true;
|
|
362
422
|
}, string, {
|
|
363
423
|
highlight: boolean;
|
|
364
424
|
class: string | unknown[];
|
|
@@ -369,9 +429,11 @@ declare const EditorContainer: {
|
|
|
369
429
|
simple: boolean;
|
|
370
430
|
preTime: string;
|
|
371
431
|
textCount: number;
|
|
372
|
-
listenAnchorId:
|
|
432
|
+
listenAnchorId: string;
|
|
373
433
|
listenMode: import("../../..").ListenModeEnum;
|
|
374
434
|
contentStyle: import("vue").CSSProperties;
|
|
435
|
+
refinable: boolean;
|
|
436
|
+
editorHeight: string | number;
|
|
375
437
|
showPreTime: boolean;
|
|
376
438
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
377
439
|
install: (app: App, options?: Record<string, any>) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import { type RefineSingleContentContext } from './context';
|
|
3
|
+
declare const RefineContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: PropType<RefineSingleContentContext[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
'update:modelValue': (val: string) => true;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: PropType<RefineSingleContentContext[]>;
|
|
13
|
+
default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((val: string) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
modelValue: RefineSingleContentContext[];
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default RefineContent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const RefineGenerator: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
width: {
|
|
3
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
}>, {
|
|
7
|
+
innerRender: () => import("vue/jsx-runtime").JSX.Element;
|
|
8
|
+
innerSetVisible: import("../../../hooks/use-state").SetStateAction<boolean>;
|
|
9
|
+
}, {}, {}, {
|
|
10
|
+
setVisible(visible: boolean): void;
|
|
11
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
width: {
|
|
13
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>> & Readonly<{}>, {
|
|
17
|
+
width: string | number;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export default RefineGenerator;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const RefineInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: undefined;
|
|
5
|
+
};
|
|
6
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
'update:modelValue': (val: string | undefined) => true;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: undefined;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((val: string | undefined) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
modelValue: string;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default RefineInput;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const RefineShortcut: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default RefineShortcut;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const RefineToolbar: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default RefineToolbar;
|