@linker-design-plus/tiny-peony 1.4.19 → 1.4.20
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 +0 -5
- package/dist/index.d.ts +21 -83
- package/dist/index.js +34 -42
- package/dist/index.mjs +3062 -4580
- package/dist/intersection/components/editor/context.d.ts +2 -128
- package/dist/intersection/components/editor/editor.d.ts +10 -54
- package/dist/intersection/components/editor/index.d.ts +21 -83
- package/dist/intersection/hooks/use-editor.d.ts +3 -5
- package/dist/plugins/AnchorTagPlugin/plugin.d.ts +0 -4
- 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 +0 -8
- package/dist/typings/intersection/editor.d.ts +1 -10
- package/dist/utils/dom.d.ts +1 -19
- package/dist/utils/shared.d.ts +0 -11
- package/package.json +6 -6
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/intersection/components/modals/Refine/RefineContent.d.ts +0 -20
- package/dist/intersection/components/modals/Refine/RefineGenerator.d.ts +0 -19
- package/dist/intersection/components/modals/Refine/RefineInput.d.ts +0 -18
- package/dist/intersection/components/modals/Refine/RefineShortcut.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/RefineToolbar.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/context.d.ts +0 -128
- package/dist/intersection/components/modals/Refine/icons/abort.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/copy.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/delete.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/expand.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/inexpand.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/insert.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/moreShortcut.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/optimism.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/prefix.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/refresh.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/replace.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/icons/send.vue.d.ts +0 -2
- package/dist/intersection/components/modals/Refine/index.d.ts +0 -3
- package/dist/intersection/components/modals/Refine/use-modal-pos.d.ts +0 -10
- package/dist/intersection/components/modals/Refine/use-range-highlight.d.ts +0 -6
- package/dist/intersection/hooks/use-copy.d.ts +0 -4
- package/dist/intersection/hooks/use-state.d.ts +0 -4
|
@@ -14,10 +14,6 @@ export interface ContentOptions {
|
|
|
14
14
|
* * 是否返回带有文本审核高亮样式标记
|
|
15
15
|
*/
|
|
16
16
|
withAuditHighlight?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 是否返回带有调优高亮样式标记
|
|
19
|
-
*/
|
|
20
|
-
withRefineHighlight?: boolean;
|
|
21
17
|
}
|
|
22
18
|
export declare const defaultContentOptions: ContentOptions;
|
|
23
19
|
export interface EditorContext {
|
|
@@ -34,138 +30,16 @@ export interface EditorContext {
|
|
|
34
30
|
isCaret: () => boolean;
|
|
35
31
|
isRange: () => boolean;
|
|
36
32
|
isSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
37
|
-
getAnchorTtsMark: (
|
|
38
|
-
getAnchorTtsEmotionAndRole: (
|
|
33
|
+
getAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
34
|
+
getAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
|
|
39
35
|
isAllMarkedByAnchor: () => boolean;
|
|
40
36
|
addExtraAnchors: (data: IAnchor[]) => void;
|
|
41
37
|
clearContent: () => void;
|
|
42
38
|
renderHighlight: (matchingContent: string) => void;
|
|
43
39
|
unrenderHighlight: () => void;
|
|
44
|
-
refineContext?: RefineContext;
|
|
45
40
|
}
|
|
46
41
|
export declare const EditorInjectionKey: InjectionKey<EditorContext>;
|
|
47
42
|
declare const HIGHLIGHT_CLS = "highlight";
|
|
48
43
|
declare const auditHighlightBem: import("@linker-design/utils").Bem;
|
|
49
44
|
declare const AUDIT_HIGHLIGHT_CLS: string;
|
|
50
45
|
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
|
|
3
|
+
import { ContentOptions } 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: NumberConstructor;
|
|
20
|
+
default: number;
|
|
21
21
|
};
|
|
22
22
|
listenMode: {
|
|
23
23
|
type: PropType<ListenModeEnum>;
|
|
@@ -51,23 +51,6 @@ 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
|
-
};
|
|
71
54
|
showPreTime: {
|
|
72
55
|
type: BooleanConstructor;
|
|
73
56
|
default: boolean;
|
|
@@ -86,14 +69,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
86
69
|
innerIsRange: () => boolean;
|
|
87
70
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
88
71
|
innerIsSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
innerGetAnchorTtsEmotionAndRole: (anchor: IAnchor) => [string, string | undefined];
|
|
72
|
+
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
73
|
+
innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
|
|
92
74
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
93
75
|
innerAddExtraAnchors: (data: IAnchor[]) => void;
|
|
94
|
-
innerUpdateAnchor: (newAnchor: IAnchor) => void;
|
|
95
76
|
innerClearContent: () => void;
|
|
96
|
-
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
97
77
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
98
78
|
innerUnrenderHightlight: () => void;
|
|
99
79
|
}, {}, {}, {
|
|
@@ -110,14 +90,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
110
90
|
isRange(): boolean;
|
|
111
91
|
isSelectionInDifferentParas(): boolean;
|
|
112
92
|
isSelectionContainsTag(type: PluginFlag): boolean;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
getAnchorTtsEmotionAndRole(anchor: IAnchor): [string, string | undefined];
|
|
93
|
+
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
94
|
+
getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
|
|
116
95
|
isAllMarkedByAnchor(): boolean;
|
|
117
96
|
addExtraAnchors(data: IAnchor[]): void;
|
|
118
|
-
updateAnchor(anchor: IAnchor): void;
|
|
119
97
|
clearContent(): void;
|
|
120
|
-
insertContentAtCursor(_content: string | string[]): void;
|
|
121
98
|
clear(): Promise<void>;
|
|
122
99
|
renderHighlight(matchingContent: string): void;
|
|
123
100
|
unrenderHighlight(): void;
|
|
@@ -127,7 +104,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
127
104
|
anchorListen: (value: IAnchor, text: string) => true;
|
|
128
105
|
anchorListenStop: (value: IAnchor) => true;
|
|
129
106
|
anchorRemove: (value: IAnchor) => true;
|
|
130
|
-
clear: () => true;
|
|
131
107
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
132
108
|
preTime: {
|
|
133
109
|
type: StringConstructor;
|
|
@@ -142,8 +118,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
142
118
|
default: undefined;
|
|
143
119
|
};
|
|
144
120
|
listenAnchorId: {
|
|
145
|
-
type:
|
|
146
|
-
default:
|
|
121
|
+
type: NumberConstructor;
|
|
122
|
+
default: number;
|
|
147
123
|
};
|
|
148
124
|
listenMode: {
|
|
149
125
|
type: PropType<ListenModeEnum>;
|
|
@@ -177,30 +153,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
177
153
|
type: PropType<CSSProperties>;
|
|
178
154
|
default: () => {};
|
|
179
155
|
};
|
|
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
|
-
};
|
|
197
156
|
showPreTime: {
|
|
198
157
|
type: BooleanConstructor;
|
|
199
158
|
default: boolean;
|
|
200
159
|
};
|
|
201
160
|
}>> & Readonly<{
|
|
202
161
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
203
|
-
onClear?: (() => any) | undefined;
|
|
204
162
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
205
163
|
onAnchorListen?: ((value: IAnchor, text: string) => any) | undefined;
|
|
206
164
|
onAnchorRemove?: ((value: IAnchor) => any) | undefined;
|
|
@@ -215,11 +173,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
215
173
|
simple: boolean;
|
|
216
174
|
preTime: string;
|
|
217
175
|
textCount: number;
|
|
218
|
-
listenAnchorId:
|
|
176
|
+
listenAnchorId: number;
|
|
219
177
|
listenMode: ListenModeEnum;
|
|
220
178
|
contentStyle: CSSProperties;
|
|
221
|
-
refinable: boolean;
|
|
222
|
-
editorHeight: string | number;
|
|
223
179
|
showPreTime: boolean;
|
|
224
180
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
225
181
|
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: NumberConstructor;
|
|
20
|
+
default: number;
|
|
21
21
|
};
|
|
22
22
|
listenMode: {
|
|
23
23
|
type: import("vue").PropType<import("../../..").ListenModeEnum>;
|
|
@@ -51,24 +51,12 @@ 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
|
-
};
|
|
65
54
|
showPreTime: {
|
|
66
55
|
type: BooleanConstructor;
|
|
67
56
|
default: boolean;
|
|
68
57
|
};
|
|
69
58
|
}>> & Readonly<{
|
|
70
59
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
71
|
-
onClear?: (() => any) | undefined;
|
|
72
60
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
73
61
|
onAnchorListen?: ((value: import("../../..").IAnchor, text: string) => any) | undefined;
|
|
74
62
|
onAnchorRemove?: ((value: import("../../..").IAnchor) => any) | undefined;
|
|
@@ -87,14 +75,11 @@ declare const EditorContainer: {
|
|
|
87
75
|
innerIsRange: () => boolean;
|
|
88
76
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
89
77
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
78
|
+
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
79
|
+
innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
|
|
93
80
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
94
81
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
95
|
-
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
96
82
|
innerClearContent: () => void;
|
|
97
|
-
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
98
83
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
99
84
|
innerUnrenderHightlight: () => void;
|
|
100
85
|
}, {}, {}, {
|
|
@@ -111,14 +96,11 @@ declare const EditorContainer: {
|
|
|
111
96
|
isRange(): boolean;
|
|
112
97
|
isSelectionInDifferentParas(): boolean;
|
|
113
98
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
99
|
+
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
100
|
+
getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
|
|
117
101
|
isAllMarkedByAnchor(): boolean;
|
|
118
102
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
119
|
-
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
120
103
|
clearContent(): void;
|
|
121
|
-
insertContentAtCursor(_content: string | string[]): void;
|
|
122
104
|
clear(): Promise<void>;
|
|
123
105
|
renderHighlight(matchingContent: string): void;
|
|
124
106
|
unrenderHighlight(): void;
|
|
@@ -128,7 +110,6 @@ declare const EditorContainer: {
|
|
|
128
110
|
anchorListen: (value: import("../../..").IAnchor, text: string) => true;
|
|
129
111
|
anchorListenStop: (value: import("../../..").IAnchor) => true;
|
|
130
112
|
anchorRemove: (value: import("../../..").IAnchor) => true;
|
|
131
|
-
clear: () => true;
|
|
132
113
|
}, import("vue").PublicProps, {
|
|
133
114
|
highlight: boolean;
|
|
134
115
|
class: string | unknown[];
|
|
@@ -139,11 +120,9 @@ declare const EditorContainer: {
|
|
|
139
120
|
simple: boolean;
|
|
140
121
|
preTime: string;
|
|
141
122
|
textCount: number;
|
|
142
|
-
listenAnchorId:
|
|
123
|
+
listenAnchorId: number;
|
|
143
124
|
listenMode: import("../../..").ListenModeEnum;
|
|
144
125
|
contentStyle: import("vue").CSSProperties;
|
|
145
|
-
refinable: boolean;
|
|
146
|
-
editorHeight: string | number;
|
|
147
126
|
showPreTime: boolean;
|
|
148
127
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
149
128
|
P: {};
|
|
@@ -166,8 +145,8 @@ declare const EditorContainer: {
|
|
|
166
145
|
default: undefined;
|
|
167
146
|
};
|
|
168
147
|
listenAnchorId: {
|
|
169
|
-
type:
|
|
170
|
-
default:
|
|
148
|
+
type: NumberConstructor;
|
|
149
|
+
default: number;
|
|
171
150
|
};
|
|
172
151
|
listenMode: {
|
|
173
152
|
type: import("vue").PropType<import("../../..").ListenModeEnum>;
|
|
@@ -201,24 +180,12 @@ declare const EditorContainer: {
|
|
|
201
180
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
202
181
|
default: () => {};
|
|
203
182
|
};
|
|
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
|
-
};
|
|
215
183
|
showPreTime: {
|
|
216
184
|
type: BooleanConstructor;
|
|
217
185
|
default: boolean;
|
|
218
186
|
};
|
|
219
187
|
}>> & Readonly<{
|
|
220
188
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
221
|
-
onClear?: (() => any) | undefined;
|
|
222
189
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
223
190
|
onAnchorListen?: ((value: import("../../..").IAnchor, text: string) => any) | undefined;
|
|
224
191
|
onAnchorRemove?: ((value: import("../../..").IAnchor) => any) | undefined;
|
|
@@ -237,14 +204,11 @@ declare const EditorContainer: {
|
|
|
237
204
|
innerIsRange: () => boolean;
|
|
238
205
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
239
206
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
207
|
+
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
208
|
+
innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
|
|
243
209
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
244
210
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
245
|
-
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
246
211
|
innerClearContent: () => void;
|
|
247
|
-
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
248
212
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
249
213
|
innerUnrenderHightlight: () => void;
|
|
250
214
|
}, {}, {}, {
|
|
@@ -261,14 +225,11 @@ declare const EditorContainer: {
|
|
|
261
225
|
isRange(): boolean;
|
|
262
226
|
isSelectionInDifferentParas(): boolean;
|
|
263
227
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
228
|
+
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
229
|
+
getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
|
|
267
230
|
isAllMarkedByAnchor(): boolean;
|
|
268
231
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
269
|
-
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
270
232
|
clearContent(): void;
|
|
271
|
-
insertContentAtCursor(_content: string | string[]): void;
|
|
272
233
|
clear(): Promise<void>;
|
|
273
234
|
renderHighlight(matchingContent: string): void;
|
|
274
235
|
unrenderHighlight(): void;
|
|
@@ -282,11 +243,9 @@ declare const EditorContainer: {
|
|
|
282
243
|
simple: boolean;
|
|
283
244
|
preTime: string;
|
|
284
245
|
textCount: number;
|
|
285
|
-
listenAnchorId:
|
|
246
|
+
listenAnchorId: number;
|
|
286
247
|
listenMode: import("../../..").ListenModeEnum;
|
|
287
248
|
contentStyle: import("vue").CSSProperties;
|
|
288
|
-
refinable: boolean;
|
|
289
|
-
editorHeight: string | number;
|
|
290
249
|
showPreTime: boolean;
|
|
291
250
|
}>;
|
|
292
251
|
__isFragment?: never;
|
|
@@ -306,8 +265,8 @@ declare const EditorContainer: {
|
|
|
306
265
|
default: undefined;
|
|
307
266
|
};
|
|
308
267
|
listenAnchorId: {
|
|
309
|
-
type:
|
|
310
|
-
default:
|
|
268
|
+
type: NumberConstructor;
|
|
269
|
+
default: number;
|
|
311
270
|
};
|
|
312
271
|
listenMode: {
|
|
313
272
|
type: import("vue").PropType<import("../../..").ListenModeEnum>;
|
|
@@ -341,24 +300,12 @@ declare const EditorContainer: {
|
|
|
341
300
|
type: import("vue").PropType<import("vue").CSSProperties>;
|
|
342
301
|
default: () => {};
|
|
343
302
|
};
|
|
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
|
-
};
|
|
355
303
|
showPreTime: {
|
|
356
304
|
type: BooleanConstructor;
|
|
357
305
|
default: boolean;
|
|
358
306
|
};
|
|
359
307
|
}>> & Readonly<{
|
|
360
308
|
onChange?: ((contentLength: number) => any) | undefined;
|
|
361
|
-
onClear?: (() => any) | undefined;
|
|
362
309
|
"onUpdate:textCount"?: ((value: number) => any) | undefined;
|
|
363
310
|
onAnchorListen?: ((value: import("../../..").IAnchor, text: string) => any) | undefined;
|
|
364
311
|
onAnchorRemove?: ((value: import("../../..").IAnchor) => any) | undefined;
|
|
@@ -377,14 +324,11 @@ declare const EditorContainer: {
|
|
|
377
324
|
innerIsRange: () => boolean;
|
|
378
325
|
innerIsSelectionInDifferentParas: () => boolean;
|
|
379
326
|
innerIsSelectionContainsTag: (type: import("../../..").PluginFlag) => boolean;
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
innerGetAnchorTtsEmotionAndRole: (anchor: import("../../..").IAnchor) => [string, string | undefined];
|
|
327
|
+
innerGetAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
328
|
+
innerGetAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
|
|
383
329
|
innerIsAllMarkedByAnchor: () => boolean;
|
|
384
330
|
innerAddExtraAnchors: (data: import("../../..").IAnchor[]) => void;
|
|
385
|
-
innerUpdateAnchor: (newAnchor: import("../../..").IAnchor) => void;
|
|
386
331
|
innerClearContent: () => void;
|
|
387
|
-
innerInsertContentAtCursor: (_content: string | string[]) => void;
|
|
388
332
|
innerRenderHightlight: (matchingContent: string) => void;
|
|
389
333
|
innerUnrenderHightlight: () => void;
|
|
390
334
|
}, {}, {}, {
|
|
@@ -401,14 +345,11 @@ declare const EditorContainer: {
|
|
|
401
345
|
isRange(): boolean;
|
|
402
346
|
isSelectionInDifferentParas(): boolean;
|
|
403
347
|
isSelectionContainsTag(type: import("../../..").PluginFlag): boolean;
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
getAnchorTtsEmotionAndRole(anchor: import("../../..").IAnchor): [string, string | undefined];
|
|
348
|
+
getAnchorTtsMark(id: number, startFromCursor?: boolean): string;
|
|
349
|
+
getAnchorTtsEmotionAndRole(id: number): [string, string | undefined];
|
|
407
350
|
isAllMarkedByAnchor(): boolean;
|
|
408
351
|
addExtraAnchors(data: import("../../..").IAnchor[]): void;
|
|
409
|
-
updateAnchor(anchor: import("../../..").IAnchor): void;
|
|
410
352
|
clearContent(): void;
|
|
411
|
-
insertContentAtCursor(_content: string | string[]): void;
|
|
412
353
|
clear(): Promise<void>;
|
|
413
354
|
renderHighlight(matchingContent: string): void;
|
|
414
355
|
unrenderHighlight(): void;
|
|
@@ -418,7 +359,6 @@ declare const EditorContainer: {
|
|
|
418
359
|
anchorListen: (value: import("../../..").IAnchor, text: string) => true;
|
|
419
360
|
anchorListenStop: (value: import("../../..").IAnchor) => true;
|
|
420
361
|
anchorRemove: (value: import("../../..").IAnchor) => true;
|
|
421
|
-
clear: () => true;
|
|
422
362
|
}, string, {
|
|
423
363
|
highlight: boolean;
|
|
424
364
|
class: string | unknown[];
|
|
@@ -429,11 +369,9 @@ declare const EditorContainer: {
|
|
|
429
369
|
simple: boolean;
|
|
430
370
|
preTime: string;
|
|
431
371
|
textCount: number;
|
|
432
|
-
listenAnchorId:
|
|
372
|
+
listenAnchorId: number;
|
|
433
373
|
listenMode: import("../../..").ListenModeEnum;
|
|
434
374
|
contentStyle: import("vue").CSSProperties;
|
|
435
|
-
refinable: boolean;
|
|
436
|
-
editorHeight: string | number;
|
|
437
375
|
showPreTime: boolean;
|
|
438
376
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
439
377
|
install: (app: App, options?: Record<string, any>) => void;
|
|
@@ -28,7 +28,7 @@ export interface AnchorData {
|
|
|
28
28
|
id: number;
|
|
29
29
|
}
|
|
30
30
|
export type AnchorMap = Record<string, AnchorData[]>;
|
|
31
|
-
export declare const useEditor: (editor: Ref<HTMLDivElement | undefined>, props: EditorComponentProps, emit: ((event: "change", contentLength: number) => void) & ((event: "update:textCount", value: number) => void) & ((event: "anchorListen", value: IAnchor, text: string) => void) & ((event: "anchorRemove", value: IAnchor) => void)
|
|
31
|
+
export declare const useEditor: (editor: Ref<HTMLDivElement | undefined>, props: EditorComponentProps, emit: ((event: "change", contentLength: number) => void) & ((event: "update:textCount", value: number) => void) & ((event: "anchorListen", value: IAnchor, text: string) => void) & ((event: "anchorRemove", value: IAnchor) => void)) => {
|
|
32
32
|
editorCore: Ref<EditorCore<[]> | undefined, EditorCore<[]> | undefined>;
|
|
33
33
|
editorAction: Ref<EditorAction | undefined, EditorAction | undefined>;
|
|
34
34
|
count: Ref<number, number>;
|
|
@@ -44,13 +44,11 @@ export declare const useEditor: (editor: Ref<HTMLDivElement | undefined>, props:
|
|
|
44
44
|
isRange: () => boolean;
|
|
45
45
|
isSelectionInDifferentParas: () => boolean;
|
|
46
46
|
isSelectionContainsTag: (type: PluginFlag) => boolean;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
getAnchorTtsEmotionAndRole: (anchor: IAnchor) => [string, string | undefined];
|
|
47
|
+
getAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
|
|
48
|
+
getAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
|
|
50
49
|
isAllMarkedByAnchor: () => boolean;
|
|
51
50
|
addExtraAnchors: (data: IAnchor[]) => void;
|
|
52
51
|
clearContent: () => void;
|
|
53
|
-
insertContentAtCursor: (_content: string | string[]) => void;
|
|
54
52
|
renderHighlight: (matchingContent: string) => void;
|
|
55
53
|
unrenderHighlight: () => void;
|
|
56
54
|
};
|
|
@@ -15,15 +15,11 @@ export declare class AnchorTagPlugin<T extends Record<string, any> = {
|
|
|
15
15
|
constructor(editor: IEditorCore);
|
|
16
16
|
add(options: T): void;
|
|
17
17
|
remove(target: HTMLSpanElement): void;
|
|
18
|
-
private _insertOverlapAnchor;
|
|
19
18
|
private _recordAnchor;
|
|
20
19
|
private get _newAnchorId();
|
|
21
20
|
private _insertAnchorTag;
|
|
22
21
|
private _isIntersectOtherAnchors;
|
|
23
22
|
private _calcTopValue;
|
|
24
|
-
private _fixedAnchorSelection;
|
|
25
|
-
private _fixedAnchorOrder;
|
|
26
|
-
private _fixedAnchorHighlightContent;
|
|
27
23
|
/**
|
|
28
24
|
* MutationObserver 监听编辑器内容变化,当内容变化时重新计算 anchor 的 top 值。
|
|
29
25
|
*
|
|
@@ -4,10 +4,10 @@ type __VLS_Props = {
|
|
|
4
4
|
data: string[];
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
ok: (e: Event, text: string) => any;
|
|
8
7
|
cancel: (e: Event) => any;
|
|
8
|
+
ok: (e: Event, text: string) => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onOk?: ((e: Event, text: string) => any) | undefined;
|
|
11
10
|
onCancel?: ((e: Event) => any) | undefined;
|
|
11
|
+
onOk?: ((e: Event, text: string) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLUListElement>;
|
|
13
13
|
export default _default;
|
|
@@ -4,10 +4,10 @@ type __VLS_Props = {
|
|
|
4
4
|
modelValue: string;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
ok: (e: Event, text: string, oldText: string) => any;
|
|
8
7
|
cancel: (e: Event) => any;
|
|
8
|
+
ok: (e: Event, text: string, oldText: string) => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onOk?: ((e: Event, text: string, oldText: string) => any) | undefined;
|
|
11
10
|
onCancel?: ((e: Event) => any) | undefined;
|
|
11
|
+
onOk?: ((e: Event, text: string, oldText: string) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
export default _default;
|