@naersen/tts-rich-text 0.8.3 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +39 -2
- package/dist/base.css +1 -1
- package/dist/components/tts-editor-root/index.vue.d.ts +44 -0
- package/dist/components/tts-rich-text/components/editor-context-menu.vue.d.ts +30 -0
- package/dist/components/tts-rich-text/components/editor-tool-button.vue.d.ts +11 -0
- package/dist/components/tts-rich-text/components/toolbar-popovers/lock-tip.vue.d.ts +9 -0
- package/dist/components/tts-rich-text/components/toolbar-popovers/stop-popover.vue.d.ts +1 -0
- package/dist/components/tts-rich-text/components/type/index.d.ts +2 -0
- package/dist/components/tts-rich-text/editor/index.d.ts +2 -0
- package/dist/components/tts-rich-text/editor/type.d.ts +37 -0
- package/dist/components/tts-rich-text/editor/useEditorToolbar.d.ts +1 -1
- package/dist/components/tts-rich-text/editor/useEditorToolkit.d.ts +115 -0
- package/dist/components/tts-rich-text/editor/useOverflowToolbar.d.ts +2 -0
- package/dist/components/tts-rich-text/editor/useRichTextEditor.d.ts +89 -0
- package/dist/components/tts-rich-text/index.d.ts +1 -0
- package/dist/components/tts-rich-text-editor/index.vue.d.ts +150 -2
- package/dist/core/config.d.ts +24 -0
- package/dist/core.js +189 -214
- package/dist/editor/index.d.ts +3 -0
- package/dist/index.js +4578 -4151
- package/package.json +89 -84
|
@@ -3,6 +3,7 @@ import { Editor, JSONContent } from '@tiptap/core';
|
|
|
3
3
|
import { NotificationType, TtsEditorFeatures, TtsRichTextServices } from '../../../type';
|
|
4
4
|
import { DriveModeEnum } from '../constants';
|
|
5
5
|
import { CustomTagType } from '../../../core';
|
|
6
|
+
import { ToolModalOpeners } from './type';
|
|
6
7
|
export interface UseRichTextEditorOptions {
|
|
7
8
|
content?: JSONContent;
|
|
8
9
|
textLimitLength?: number;
|
|
@@ -93,6 +94,50 @@ export declare function useRichTextEditor(options?: UseRichTextEditorOptions): {
|
|
|
93
94
|
replaceContentWithText: (text: string) => void;
|
|
94
95
|
textLength: import('vue').ComputedRef<number>;
|
|
95
96
|
voiceVersion: Ref<number, number>;
|
|
97
|
+
lockedTool: Ref<CustomTagType | null, CustomTagType | null>;
|
|
98
|
+
lockParams: Ref<{
|
|
99
|
+
replace?: Record<string, string | number> | undefined;
|
|
100
|
+
stop?: Record<string, string | number> | undefined;
|
|
101
|
+
ignore?: Record<string, string | number> | undefined;
|
|
102
|
+
customStop?: Record<string, string | number> | undefined;
|
|
103
|
+
continue?: Record<string, string | number> | undefined;
|
|
104
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
105
|
+
language?: Record<string, string | number> | undefined;
|
|
106
|
+
}, Partial<Record<CustomTagType, Record<string, string | number>>> | {
|
|
107
|
+
replace?: Record<string, string | number> | undefined;
|
|
108
|
+
stop?: Record<string, string | number> | undefined;
|
|
109
|
+
ignore?: Record<string, string | number> | undefined;
|
|
110
|
+
customStop?: Record<string, string | number> | undefined;
|
|
111
|
+
continue?: Record<string, string | number> | undefined;
|
|
112
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
113
|
+
language?: Record<string, string | number> | undefined;
|
|
114
|
+
}>;
|
|
115
|
+
toggleLockTool: (type: CustomTagType) => boolean;
|
|
116
|
+
unlockTool: () => void;
|
|
117
|
+
isToolLocked: (type: CustomTagType) => boolean;
|
|
118
|
+
rememberToolParams: (type: CustomTagType, payload: Record<string, string | number>) => void;
|
|
119
|
+
getLockedPayload: (type: CustomTagType) => Record<string, string | number>;
|
|
120
|
+
contextMenu: {
|
|
121
|
+
visible: boolean;
|
|
122
|
+
x: number;
|
|
123
|
+
y: number;
|
|
124
|
+
hasSelection: boolean;
|
|
125
|
+
};
|
|
126
|
+
closeContextMenu: () => void;
|
|
127
|
+
toolModalOpeners: Ref<{
|
|
128
|
+
pinyin: (text: string) => void;
|
|
129
|
+
replace: (text: string) => void;
|
|
130
|
+
formula: (text: string) => void;
|
|
131
|
+
aiRewrite: () => void;
|
|
132
|
+
upload: () => void;
|
|
133
|
+
} | null, ToolModalOpeners | {
|
|
134
|
+
pinyin: (text: string) => void;
|
|
135
|
+
replace: (text: string) => void;
|
|
136
|
+
formula: (text: string) => void;
|
|
137
|
+
aiRewrite: () => void;
|
|
138
|
+
upload: () => void;
|
|
139
|
+
} | null>;
|
|
140
|
+
registerToolModalOpeners: (openers: ToolModalOpeners) => void;
|
|
96
141
|
};
|
|
97
142
|
export type RichTextEditor = ReturnType<typeof useRichTextEditor>;
|
|
98
143
|
export declare const useEditorProvider: (context: RichTextEditor) => void;
|
|
@@ -152,4 +197,48 @@ export declare const useEditorContext: () => {
|
|
|
152
197
|
replaceContentWithText: (text: string) => void;
|
|
153
198
|
textLength: import('vue').ComputedRef<number>;
|
|
154
199
|
voiceVersion: Ref<number, number>;
|
|
200
|
+
lockedTool: Ref<CustomTagType | null, CustomTagType | null>;
|
|
201
|
+
lockParams: Ref<{
|
|
202
|
+
replace?: Record<string, string | number> | undefined;
|
|
203
|
+
stop?: Record<string, string | number> | undefined;
|
|
204
|
+
ignore?: Record<string, string | number> | undefined;
|
|
205
|
+
customStop?: Record<string, string | number> | undefined;
|
|
206
|
+
continue?: Record<string, string | number> | undefined;
|
|
207
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
208
|
+
language?: Record<string, string | number> | undefined;
|
|
209
|
+
}, Partial<Record<CustomTagType, Record<string, string | number>>> | {
|
|
210
|
+
replace?: Record<string, string | number> | undefined;
|
|
211
|
+
stop?: Record<string, string | number> | undefined;
|
|
212
|
+
ignore?: Record<string, string | number> | undefined;
|
|
213
|
+
customStop?: Record<string, string | number> | undefined;
|
|
214
|
+
continue?: Record<string, string | number> | undefined;
|
|
215
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
216
|
+
language?: Record<string, string | number> | undefined;
|
|
217
|
+
}>;
|
|
218
|
+
toggleLockTool: (type: CustomTagType) => boolean;
|
|
219
|
+
unlockTool: () => void;
|
|
220
|
+
isToolLocked: (type: CustomTagType) => boolean;
|
|
221
|
+
rememberToolParams: (type: CustomTagType, payload: Record<string, string | number>) => void;
|
|
222
|
+
getLockedPayload: (type: CustomTagType) => Record<string, string | number>;
|
|
223
|
+
contextMenu: {
|
|
224
|
+
visible: boolean;
|
|
225
|
+
x: number;
|
|
226
|
+
y: number;
|
|
227
|
+
hasSelection: boolean;
|
|
228
|
+
};
|
|
229
|
+
closeContextMenu: () => void;
|
|
230
|
+
toolModalOpeners: Ref<{
|
|
231
|
+
pinyin: (text: string) => void;
|
|
232
|
+
replace: (text: string) => void;
|
|
233
|
+
formula: (text: string) => void;
|
|
234
|
+
aiRewrite: () => void;
|
|
235
|
+
upload: () => void;
|
|
236
|
+
} | null, ToolModalOpeners | {
|
|
237
|
+
pinyin: (text: string) => void;
|
|
238
|
+
replace: (text: string) => void;
|
|
239
|
+
formula: (text: string) => void;
|
|
240
|
+
aiRewrite: () => void;
|
|
241
|
+
upload: () => void;
|
|
242
|
+
} | null>;
|
|
243
|
+
registerToolModalOpeners: (openers: ToolModalOpeners) => void;
|
|
155
244
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as TtsAiRewriteModal } from './components/ai-rewrite-modal.vue';
|
|
2
|
+
export { default as TtsEditorContextMenu } from './components/editor-context-menu.vue';
|
|
2
3
|
export { default as TtsEditorFooter } from './components/editor-footer.vue';
|
|
3
4
|
export { default as TtsEditorToolbar } from './components/editor-toolbar.vue';
|
|
4
5
|
export { default as TtsFormulaModal } from './components/formula-modal.vue';
|
|
@@ -104,6 +104,50 @@ declare function __VLS_template(): {
|
|
|
104
104
|
replaceContentWithText: (text: string) => void;
|
|
105
105
|
textLength: import('vue').ComputedRef<number>;
|
|
106
106
|
voiceVersion: import('vue').Ref<number, number>;
|
|
107
|
+
lockedTool: import('vue').Ref<import('../../core').CustomTagType | null, import('../../core').CustomTagType | null>;
|
|
108
|
+
lockParams: import('vue').Ref<{
|
|
109
|
+
replace?: Record<string, string | number> | undefined;
|
|
110
|
+
stop?: Record<string, string | number> | undefined;
|
|
111
|
+
ignore?: Record<string, string | number> | undefined;
|
|
112
|
+
customStop?: Record<string, string | number> | undefined;
|
|
113
|
+
continue?: Record<string, string | number> | undefined;
|
|
114
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
115
|
+
language?: Record<string, string | number> | undefined;
|
|
116
|
+
}, Partial<Record<import('../../core').CustomTagType, Record<string, string | number>>> | {
|
|
117
|
+
replace?: Record<string, string | number> | undefined;
|
|
118
|
+
stop?: Record<string, string | number> | undefined;
|
|
119
|
+
ignore?: Record<string, string | number> | undefined;
|
|
120
|
+
customStop?: Record<string, string | number> | undefined;
|
|
121
|
+
continue?: Record<string, string | number> | undefined;
|
|
122
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
123
|
+
language?: Record<string, string | number> | undefined;
|
|
124
|
+
}>;
|
|
125
|
+
toggleLockTool: (type: import('../../core').CustomTagType) => boolean;
|
|
126
|
+
unlockTool: () => void;
|
|
127
|
+
isToolLocked: (type: import('../../core').CustomTagType) => boolean;
|
|
128
|
+
rememberToolParams: (type: import('../../core').CustomTagType, payload: Record<string, string | number>) => void;
|
|
129
|
+
getLockedPayload: (type: import('../../core').CustomTagType) => Record<string, string | number>;
|
|
130
|
+
contextMenu: {
|
|
131
|
+
visible: boolean;
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
hasSelection: boolean;
|
|
135
|
+
};
|
|
136
|
+
closeContextMenu: () => void;
|
|
137
|
+
toolModalOpeners: import('vue').Ref<{
|
|
138
|
+
pinyin: (text: string) => void;
|
|
139
|
+
replace: (text: string) => void;
|
|
140
|
+
formula: (text: string) => void;
|
|
141
|
+
aiRewrite: () => void;
|
|
142
|
+
upload: () => void;
|
|
143
|
+
} | null, import('../..').ToolModalOpeners | {
|
|
144
|
+
pinyin: (text: string) => void;
|
|
145
|
+
replace: (text: string) => void;
|
|
146
|
+
formula: (text: string) => void;
|
|
147
|
+
aiRewrite: () => void;
|
|
148
|
+
upload: () => void;
|
|
149
|
+
} | null>;
|
|
150
|
+
registerToolModalOpeners: (openers: import('../..').ToolModalOpeners) => void;
|
|
107
151
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
108
152
|
change: () => any;
|
|
109
153
|
ready: (editor: Editor) => any;
|
|
@@ -148,7 +192,7 @@ declare function __VLS_template(): {
|
|
|
148
192
|
}> & Omit<Readonly<import('../../type').TtsEditorRootProps> & Readonly<{
|
|
149
193
|
onChange?: (() => any) | undefined;
|
|
150
194
|
onReady?: ((editor: Editor) => any) | undefined;
|
|
151
|
-
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "handleChangeVoice" | ("disabled" | "placeholder" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"
|
|
195
|
+
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "replaceText" | "toolModalOpeners" | "rememberToolParams" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "lockedTool" | "lockParams" | "toggleLockTool" | "unlockTool" | "isToolLocked" | "getLockedPayload" | "contextMenu" | "closeContextMenu" | "registerToolModalOpeners" | "handleChangeVoice" | ("disabled" | "placeholder" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"> & {
|
|
152
196
|
clear: () => void;
|
|
153
197
|
focus: () => void;
|
|
154
198
|
getJson: () => JSONContent;
|
|
@@ -198,6 +242,36 @@ declare function __VLS_template(): {
|
|
|
198
242
|
replaceContentWithText: (text: string) => void;
|
|
199
243
|
textLength: number;
|
|
200
244
|
voiceVersion: number;
|
|
245
|
+
lockedTool: import('../../core').CustomTagType | null;
|
|
246
|
+
lockParams: {
|
|
247
|
+
replace?: Record<string, string | number> | undefined;
|
|
248
|
+
stop?: Record<string, string | number> | undefined;
|
|
249
|
+
ignore?: Record<string, string | number> | undefined;
|
|
250
|
+
customStop?: Record<string, string | number> | undefined;
|
|
251
|
+
continue?: Record<string, string | number> | undefined;
|
|
252
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
253
|
+
language?: Record<string, string | number> | undefined;
|
|
254
|
+
};
|
|
255
|
+
toggleLockTool: (type: import('../../core').CustomTagType) => boolean;
|
|
256
|
+
unlockTool: () => void;
|
|
257
|
+
isToolLocked: (type: import('../../core').CustomTagType) => boolean;
|
|
258
|
+
rememberToolParams: (type: import('../../core').CustomTagType, payload: Record<string, string | number>) => void;
|
|
259
|
+
getLockedPayload: (type: import('../../core').CustomTagType) => Record<string, string | number>;
|
|
260
|
+
contextMenu: {
|
|
261
|
+
visible: boolean;
|
|
262
|
+
x: number;
|
|
263
|
+
y: number;
|
|
264
|
+
hasSelection: boolean;
|
|
265
|
+
};
|
|
266
|
+
closeContextMenu: () => void;
|
|
267
|
+
toolModalOpeners: {
|
|
268
|
+
pinyin: (text: string) => void;
|
|
269
|
+
replace: (text: string) => void;
|
|
270
|
+
formula: (text: string) => void;
|
|
271
|
+
aiRewrite: () => void;
|
|
272
|
+
upload: () => void;
|
|
273
|
+
} | null;
|
|
274
|
+
registerToolModalOpeners: (openers: import('../..').ToolModalOpeners) => void;
|
|
201
275
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
202
276
|
$slots: Readonly<{
|
|
203
277
|
default(): unknown;
|
|
@@ -317,6 +391,50 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
317
391
|
replaceContentWithText: (text: string) => void;
|
|
318
392
|
textLength: import('vue').ComputedRef<number>;
|
|
319
393
|
voiceVersion: import('vue').Ref<number, number>;
|
|
394
|
+
lockedTool: import('vue').Ref<import('../../core').CustomTagType | null, import('../../core').CustomTagType | null>;
|
|
395
|
+
lockParams: import('vue').Ref<{
|
|
396
|
+
replace?: Record<string, string | number> | undefined;
|
|
397
|
+
stop?: Record<string, string | number> | undefined;
|
|
398
|
+
ignore?: Record<string, string | number> | undefined;
|
|
399
|
+
customStop?: Record<string, string | number> | undefined;
|
|
400
|
+
continue?: Record<string, string | number> | undefined;
|
|
401
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
402
|
+
language?: Record<string, string | number> | undefined;
|
|
403
|
+
}, Partial<Record<import('../../core').CustomTagType, Record<string, string | number>>> | {
|
|
404
|
+
replace?: Record<string, string | number> | undefined;
|
|
405
|
+
stop?: Record<string, string | number> | undefined;
|
|
406
|
+
ignore?: Record<string, string | number> | undefined;
|
|
407
|
+
customStop?: Record<string, string | number> | undefined;
|
|
408
|
+
continue?: Record<string, string | number> | undefined;
|
|
409
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
410
|
+
language?: Record<string, string | number> | undefined;
|
|
411
|
+
}>;
|
|
412
|
+
toggleLockTool: (type: import('../../core').CustomTagType) => boolean;
|
|
413
|
+
unlockTool: () => void;
|
|
414
|
+
isToolLocked: (type: import('../../core').CustomTagType) => boolean;
|
|
415
|
+
rememberToolParams: (type: import('../../core').CustomTagType, payload: Record<string, string | number>) => void;
|
|
416
|
+
getLockedPayload: (type: import('../../core').CustomTagType) => Record<string, string | number>;
|
|
417
|
+
contextMenu: {
|
|
418
|
+
visible: boolean;
|
|
419
|
+
x: number;
|
|
420
|
+
y: number;
|
|
421
|
+
hasSelection: boolean;
|
|
422
|
+
};
|
|
423
|
+
closeContextMenu: () => void;
|
|
424
|
+
toolModalOpeners: import('vue').Ref<{
|
|
425
|
+
pinyin: (text: string) => void;
|
|
426
|
+
replace: (text: string) => void;
|
|
427
|
+
formula: (text: string) => void;
|
|
428
|
+
aiRewrite: () => void;
|
|
429
|
+
upload: () => void;
|
|
430
|
+
} | null, import('../..').ToolModalOpeners | {
|
|
431
|
+
pinyin: (text: string) => void;
|
|
432
|
+
replace: (text: string) => void;
|
|
433
|
+
formula: (text: string) => void;
|
|
434
|
+
aiRewrite: () => void;
|
|
435
|
+
upload: () => void;
|
|
436
|
+
} | null>;
|
|
437
|
+
registerToolModalOpeners: (openers: import('../..').ToolModalOpeners) => void;
|
|
320
438
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
321
439
|
change: () => any;
|
|
322
440
|
ready: (editor: Editor) => any;
|
|
@@ -361,7 +479,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
361
479
|
}> & Omit<Readonly<import('../../type').TtsEditorRootProps> & Readonly<{
|
|
362
480
|
onChange?: (() => any) | undefined;
|
|
363
481
|
onReady?: ((editor: Editor) => any) | undefined;
|
|
364
|
-
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "handleChangeVoice" | ("disabled" | "placeholder" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"
|
|
482
|
+
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "replaceText" | "toolModalOpeners" | "rememberToolParams" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "lockedTool" | "lockParams" | "toggleLockTool" | "unlockTool" | "isToolLocked" | "getLockedPayload" | "contextMenu" | "closeContextMenu" | "registerToolModalOpeners" | "handleChangeVoice" | ("disabled" | "placeholder" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"> & {
|
|
365
483
|
clear: () => void;
|
|
366
484
|
focus: () => void;
|
|
367
485
|
getJson: () => JSONContent;
|
|
@@ -411,6 +529,36 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
411
529
|
replaceContentWithText: (text: string) => void;
|
|
412
530
|
textLength: number;
|
|
413
531
|
voiceVersion: number;
|
|
532
|
+
lockedTool: import('../../core').CustomTagType | null;
|
|
533
|
+
lockParams: {
|
|
534
|
+
replace?: Record<string, string | number> | undefined;
|
|
535
|
+
stop?: Record<string, string | number> | undefined;
|
|
536
|
+
ignore?: Record<string, string | number> | undefined;
|
|
537
|
+
customStop?: Record<string, string | number> | undefined;
|
|
538
|
+
continue?: Record<string, string | number> | undefined;
|
|
539
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
540
|
+
language?: Record<string, string | number> | undefined;
|
|
541
|
+
};
|
|
542
|
+
toggleLockTool: (type: import('../../core').CustomTagType) => boolean;
|
|
543
|
+
unlockTool: () => void;
|
|
544
|
+
isToolLocked: (type: import('../../core').CustomTagType) => boolean;
|
|
545
|
+
rememberToolParams: (type: import('../../core').CustomTagType, payload: Record<string, string | number>) => void;
|
|
546
|
+
getLockedPayload: (type: import('../../core').CustomTagType) => Record<string, string | number>;
|
|
547
|
+
contextMenu: {
|
|
548
|
+
visible: boolean;
|
|
549
|
+
x: number;
|
|
550
|
+
y: number;
|
|
551
|
+
hasSelection: boolean;
|
|
552
|
+
};
|
|
553
|
+
closeContextMenu: () => void;
|
|
554
|
+
toolModalOpeners: {
|
|
555
|
+
pinyin: (text: string) => void;
|
|
556
|
+
replace: (text: string) => void;
|
|
557
|
+
formula: (text: string) => void;
|
|
558
|
+
aiRewrite: () => void;
|
|
559
|
+
upload: () => void;
|
|
560
|
+
} | null;
|
|
561
|
+
registerToolModalOpeners: (openers: import('../..').ToolModalOpeners) => void;
|
|
414
562
|
} & {} & import('vue').ComponentCustomProperties & {} & {
|
|
415
563
|
$slots: Readonly<{
|
|
416
564
|
default(): unknown;
|
package/dist/core/config.d.ts
CHANGED
|
@@ -78,6 +78,30 @@ export declare const StopOptions: readonly [{
|
|
|
78
78
|
readonly label: "停顿 1 秒";
|
|
79
79
|
readonly value: 1;
|
|
80
80
|
}];
|
|
81
|
+
/** 编辑器内部常量 */
|
|
82
|
+
export declare const EditorConst: {
|
|
83
|
+
readonly SENTENCE: "sentence";
|
|
84
|
+
readonly CUSTOM_TAG: "customTag";
|
|
85
|
+
/**
|
|
86
|
+
* 选中文本时浮出的气泡菜单插件 key。
|
|
87
|
+
* 工具栏与右键面板都要用它来主动收起气泡,避免两个浮层叠在一起。
|
|
88
|
+
*/
|
|
89
|
+
readonly BUBBLE_MENU_KEY: "ttsRichTextBubbleMenu";
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* 是否为「光标插入类」标签工具。
|
|
93
|
+
*
|
|
94
|
+
* 这类工具不包裹选中文本,而是在光标处插入一个独立标记(停顿 / 长停顿),
|
|
95
|
+
* 也是唯一支持长按锁定、锁定后在文本中点击即可重复插入的一类工具。
|
|
96
|
+
*/
|
|
97
|
+
export declare const isInsertTagType: (type: CustomTagType) => boolean;
|
|
98
|
+
/**
|
|
99
|
+
* 锁定后插入时使用的默认参数。
|
|
100
|
+
* 用户在弹层里选过一次会被记住(见 useRichTextEditor 的 rememberToolParams),这里只是兜底。
|
|
101
|
+
*/
|
|
102
|
+
export declare const getDefaultLockPayload: (type: CustomTagType) => Record<string, string | number>;
|
|
103
|
+
/** 锁定态按钮上展示的参数文案,例如「0.5 秒」 */
|
|
104
|
+
export declare const getLockPayloadLabel: (type: CustomTagType, payload: Record<string, string | number>) => string;
|
|
81
105
|
export declare const allToolTypes: TtsToolType[];
|
|
82
106
|
export declare const resolveTtsEditorFeatures: (voiceVersion: number, overrides?: TtsEditorFeatures) => ResolvedTtsEditorFeatures;
|
|
83
107
|
export declare const getInitContent: () => JSONContent;
|