@naersen/tts-rich-text 0.1.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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +166 -0
  3. package/dist/components/cx-button/index.d.ts +9 -0
  4. package/dist/components/cx-button/index.vue.d.ts +20 -0
  5. package/dist/components/cx-empty/index.d.ts +2 -0
  6. package/dist/components/cx-empty/index.vue.d.ts +26 -0
  7. package/dist/components/cx-radio-group/index.d.ts +3 -0
  8. package/dist/components/cx-radio-group/index.vue.d.ts +19 -0
  9. package/dist/components/cx-radio-group/type/index.d.ts +25 -0
  10. package/dist/components/cx-spin/index.d.ts +3 -0
  11. package/dist/components/cx-spin/index.vue.d.ts +26 -0
  12. package/dist/components/cx-upload/index.d.ts +3 -0
  13. package/dist/components/cx-upload/index.vue.d.ts +43 -0
  14. package/dist/components/cx-upload/type/index.d.ts +15 -0
  15. package/dist/components/index.d.ts +8 -0
  16. package/dist/components/svg-icon/index.d.ts +44 -0
  17. package/dist/components/svg-icon/index.vue.d.ts +12 -0
  18. package/dist/components/tts-rich-text/components/ai-rewrite-modal.vue.d.ts +10 -0
  19. package/dist/components/tts-rich-text/components/editor-footer.vue.d.ts +2 -0
  20. package/dist/components/tts-rich-text/components/editor-tool-button.vue.d.ts +67 -0
  21. package/dist/components/tts-rich-text/components/editor-toolbar.vue.d.ts +193 -0
  22. package/dist/components/tts-rich-text/components/formula-modal.vue.d.ts +10 -0
  23. package/dist/components/tts-rich-text/components/mark-pinyin-modal.vue.d.ts +8 -0
  24. package/dist/components/tts-rich-text/components/replace-text-modal.vue.d.ts +8 -0
  25. package/dist/components/tts-rich-text/components/selection-menu.vue.d.ts +4 -0
  26. package/dist/components/tts-rich-text/components/tag-node-view.vue.d.ts +92 -0
  27. package/dist/components/tts-rich-text/components/toolbar-popovers/language-popover.vue.d.ts +18 -0
  28. package/dist/components/tts-rich-text/components/toolbar-popovers/number-reading-popover.vue.d.ts +18 -0
  29. package/dist/components/tts-rich-text/components/toolbar-popovers/stop-popover.vue.d.ts +14 -0
  30. package/dist/components/tts-rich-text/components/type/index.d.ts +18 -0
  31. package/dist/components/tts-rich-text/components/upload-modal.vue.d.ts +101 -0
  32. package/dist/components/tts-rich-text/editor/config.d.ts +93 -0
  33. package/dist/components/tts-rich-text/editor/index.d.ts +5 -0
  34. package/dist/components/tts-rich-text/editor/nodes/tag-node.d.ts +13 -0
  35. package/dist/components/tts-rich-text/editor/plugins/tts-character-count.d.ts +17 -0
  36. package/dist/components/tts-rich-text/editor/type.d.ts +8 -0
  37. package/dist/components/tts-rich-text/editor/useEditorToolbar.d.ts +33 -0
  38. package/dist/components/tts-rich-text/editor/useOverflowToolbar.d.ts +13 -0
  39. package/dist/components/tts-rich-text/editor/useRichTextEditor.d.ts +91 -0
  40. package/dist/components/tts-rich-text/editor/useSSETool.d.ts +16 -0
  41. package/dist/components/tts-rich-text/editor/useTestAudioTool.d.ts +4 -0
  42. package/dist/components/tts-rich-text/editor/utils/index.d.ts +3 -0
  43. package/dist/components/tts-rich-text/editor/utils/number-to-text.d.ts +31 -0
  44. package/dist/components/tts-rich-text/editor/utils/sanitize-pasted-text.d.ts +2 -0
  45. package/dist/components/tts-rich-text/editor/utils/split-sentence.d.ts +7 -0
  46. package/dist/components/tts-rich-text/editor/utils/transform-data.d.ts +24 -0
  47. package/dist/components/tts-rich-text/hooks/useGlobalAudioControl.d.ts +4 -0
  48. package/dist/components/tts-rich-text/hooks/useSynthesizeAudioTool.d.ts +248 -0
  49. package/dist/components/tts-rich-text/hooks/useVoiceChangeConfirm.d.ts +6 -0
  50. package/dist/components/tts-rich-text/index.d.ts +9 -0
  51. package/dist/components/tts-rich-text-editor/index.d.ts +1 -0
  52. package/dist/components/tts-rich-text-editor/index.vue.d.ts +57 -0
  53. package/dist/core/config.d.ts +67 -0
  54. package/dist/core/index.d.ts +6 -0
  55. package/dist/core/number-to-text.d.ts +31 -0
  56. package/dist/core/sanitize-pasted-text.d.ts +2 -0
  57. package/dist/core/split-sentence.d.ts +7 -0
  58. package/dist/core/transform-data.d.ts +13 -0
  59. package/dist/core.d.ts +2 -0
  60. package/dist/core.js +509 -0
  61. package/dist/editor/index.d.ts +4 -0
  62. package/dist/hooks/index.d.ts +2 -0
  63. package/dist/hooks/useControlValue.d.ts +4 -0
  64. package/dist/hooks/useRenderSlots.d.ts +6 -0
  65. package/dist/index.d.ts +5 -0
  66. package/dist/index.js +31916 -0
  67. package/dist/services/index.d.ts +1 -0
  68. package/dist/style/index.d.ts +0 -0
  69. package/dist/style.css +1 -0
  70. package/dist/type/index.d.ts +102 -0
  71. package/dist/utils/index.d.ts +7 -0
  72. package/package.json +82 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 naersen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,166 @@
1
+ # @naersen/tts-rich-text
2
+
3
+ 面向 Vue 3 项目的 TTS 富文本编辑器。包内维护统一的 Tiptap 文档协议、TTS 标签、分句和数据转换;各业务项目通过 `features`、`services` 和 slots 注入差异,不再复制组件源码。
4
+
5
+ ## 环境要求
6
+
7
+ - Vue 3.4+
8
+ - Node.js 18+
9
+ - pnpm 9+
10
+
11
+ ## 本地开发
12
+
13
+ ```bash
14
+ pnpm install
15
+ pnpm dev
16
+ ```
17
+
18
+ 开发预览默认运行在 Vite 输出的本地地址。提交前执行:
19
+
20
+ ```bash
21
+ pnpm build
22
+ pnpm test:e2e
23
+ ```
24
+
25
+ `build` 会依次完成类型检查、单元测试和组件库构建。`test:e2e` 使用本机 Chrome 验证拼音标注、停顿插入、原主题样式和窄屏工具栏收纳。
26
+
27
+ ## 安装
28
+
29
+ 通过 npm 在业务项目中安装:
30
+
31
+ ```bash
32
+ pnpm add @naersen/tts-rich-text
33
+ ```
34
+
35
+ Vue、Tiptap 和 Element Plus 是 peer dependencies。业务项目没有安装时,需要同时添加 peer packages,并在应用入口加载 Element Plus 样式。
36
+
37
+ ## 基础使用
38
+
39
+ ```vue
40
+ <template>
41
+ <tts-rich-text-editor
42
+ v-model="documentValue"
43
+ :voice-version="voiceVersion"
44
+ :features="features"
45
+ :services="services"
46
+ :get-preview-params="getPreviewParams"
47
+ />
48
+ </template>
49
+
50
+ <script setup lang="ts">
51
+ import type { JSONContent } from '@tiptap/core'
52
+ import { ref } from 'vue'
53
+
54
+ import type {
55
+ TtsEditorFeatures,
56
+ TtsRichTextServices
57
+ } from '@naersen/tts-rich-text'
58
+ import {
59
+ TtsRichTextEditor,
60
+ getInitContent
61
+ } from '@naersen/tts-rich-text'
62
+ import '@naersen/tts-rich-text/styles.css'
63
+
64
+ const documentValue = ref<JSONContent>(getInitContent())
65
+ const voiceVersion = ref(2)
66
+
67
+ const features: TtsEditorFeatures = {
68
+ tools: ['stop', 'customStop', 'pinyin', 'replace', 'language'],
69
+ enablePreview: true
70
+ }
71
+
72
+ const services: TtsRichTextServices = {
73
+ parseDocument: async (file, signal) => {
74
+ return api.parseDocument(file, { signal })
75
+ },
76
+ readFormula: async (formula, { signal, onChunk }) => {
77
+ return api.readFormula(formula, { signal, onChunk })
78
+ },
79
+ synthesizePreview: async (request, signal) => {
80
+ return api.synthesizePreview(request, { signal })
81
+ },
82
+ notify: (type, message) => messageService[type](message)
83
+ }
84
+
85
+ const getPreviewParams = () => ({
86
+ timberId: selectedVoice.value.id,
87
+ speed: selectedVoice.value.speed
88
+ })
89
+ </script>
90
+ ```
91
+
92
+ `styles.css` 已包含原项目的 Element Plus 全局主题覆盖和配套图标;业务项目仍需先加载 `element-plus/dist/index.css`,再加载组件库样式。
93
+
94
+ 上例中的 `api`、`messageService` 和 `selectedVoice` 由业务项目提供,组件包不会读取业务项目的环境变量、请求实例或状态管理。
95
+
96
+ ## 差异扩展
97
+
98
+ ### 功能配置
99
+
100
+ `features` 可以覆盖工具列表、语言列表、拼音最大选区长度、数字最大长度和试听开关。包内提供 V1/V2 默认能力配置,项目配置拥有最高优先级。
101
+
102
+ ### 服务适配
103
+
104
+ 以下能力只有传入对应 service 时才可用;未提供时保留原工具位置并显示为禁用态:
105
+
106
+ - `parseDocument`:上传并解析 TXT/DOCX。
107
+ - `generateDraft`:AI 写稿,支持通过 `onChunk` 增量输出。
108
+ - `readFormula`:公式转读法,支持通过 `onChunk` 增量输出。
109
+ - `synthesizePreview`:选区试听,返回音频 URL 或 Blob。
110
+ - `synthesizePreviewStream`:保持原编辑器的流式分片试听,逐条调用 `onMessage` 传入后端音频消息。
111
+ - `confirmVoiceChange`:接管音色版本冲突确认框;未提供时使用 Element Plus。
112
+ - `notify`:接入项目自己的消息组件。
113
+
114
+ 所有耗时服务都会收到 `AbortSignal`,项目请求层必须将取消信号继续传给实际请求。
115
+
116
+ ### Slots
117
+
118
+ - `toolbar-before`
119
+ - `toolbar-after`
120
+ - `editor-after`,参数为 `{ editor }`
121
+ - `footer-before`,参数为 `{ editor, textLength }`
122
+ - `footer-after`,参数为 `{ editor, textLength }`
123
+
124
+ 项目专属工具应通过 slots 放在组件外层,不能修改包内工具栏源码。
125
+
126
+ ### 原子组件
127
+
128
+ 对编辑器外壳差异较大的项目,可以直接组合包内原始组件:
129
+
130
+ - `TtsEditorToolbar`
131
+ - `TtsEditorFooter`
132
+ - `TtsSelectionMenu`
133
+ - `TtsMarkPinyinModal`
134
+ - `TtsTagNodeView`
135
+ - `TtsAiRewriteModal`
136
+ - `TtsFormulaModal`
137
+ - `TtsReplaceTextModal`
138
+ - `TtsUploadModal`
139
+
140
+ 这些组件与 `useRichTextEditor`、`useEditorProvider` 使用同一个上下文。优先使用完整的 `TtsRichTextEditor`;只有页面布局确实不同的项目才自行组合原子组件,业务接口仍统一通过 `services` 注入。
141
+
142
+ ## 对外方法
143
+
144
+ 通过组件 ref 可以调用:
145
+
146
+ - `clear()`
147
+ - `focus()`
148
+ - `getJson()`
149
+ - `getTtsData()`
150
+ - `replaceText(text)`
151
+
152
+ 核心转换函数也可以独立导入:
153
+
154
+ ```ts
155
+ import { convertToTtsFormat } from '@naersen/tts-rich-text/core'
156
+ ```
157
+
158
+ ## 版本管理
159
+
160
+ 遵循 SemVer:
161
+
162
+ - 修复兼容问题:patch,例如 `0.1.1`。
163
+ - 增加向后兼容能力:minor,例如 `0.2.0`。
164
+ - 修改文档协议、TTS 输出或删除公开 API:major。
165
+
166
+ 项目应依赖明确版本,通过升级依赖完成同步,不要把 `src` 目录复制回业务项目。
@@ -0,0 +1,9 @@
1
+ import { ElButton } from 'element-plus';
2
+ import { default as CxButton } from './index.vue';
3
+ export type ButtonInstance = InstanceType<typeof CxButton>;
4
+ declare module 'vue' {
5
+ interface GlobalComponents {
6
+ CxButton: typeof ElButton;
7
+ }
8
+ }
9
+ export default CxButton;
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ link?: boolean;
3
+ };
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: Partial<Record<string, (_: any) => any>>;
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ link: boolean;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
+ export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,2 @@
1
+ import { default as CxEmpty } from './index.vue';
2
+ export default CxEmpty;
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ description?: string;
3
+ size?: number;
4
+ type?: 'normal' | 'search';
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ icon?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
+ type: "normal" | "search";
17
+ size: number;
18
+ description: string;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,3 @@
1
+ import { default as CxRadioGroup } from './index.vue';
2
+ export * from './type';
3
+ export default CxRadioGroup;
@@ -0,0 +1,19 @@
1
+ import { RadioProps, RadioValue } from './type';
2
+ declare const _default: import('vue').DefineComponent<RadioProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ "update:modelValue": (value: RadioValue) => any;
4
+ change: (value: RadioValue) => any;
5
+ }, string, import('vue').PublicProps, Readonly<RadioProps> & Readonly<{
6
+ "onUpdate:modelValue"?: ((value: RadioValue) => any) | undefined;
7
+ onChange?: ((value: RadioValue) => any) | undefined;
8
+ }>, {
9
+ color: string;
10
+ modelValue: RadioValue;
11
+ defaultValue: RadioValue;
12
+ options: import('./type').RadioOption[];
13
+ hoverColor: string;
14
+ activeColor: string;
15
+ background: string;
16
+ hoverBackground: string;
17
+ activeBackgound: string;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
19
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { CSSProperties } from 'vue';
2
+ export interface RadioProps {
3
+ modelValue?: RadioValue;
4
+ defaultValue?: RadioValue;
5
+ options?: RadioOption[];
6
+ color?: string;
7
+ hoverColor?: string;
8
+ activeColor?: string;
9
+ background?: string;
10
+ hoverBackground?: string;
11
+ activeBackgound?: string;
12
+ sliderStyle?: CSSProperties;
13
+ radioStyle?: CSSProperties;
14
+ }
15
+ export interface RadioEmits {
16
+ (e: 'update:modelValue', value: RadioValue): void;
17
+ (e: 'change', value: RadioValue): void;
18
+ }
19
+ export interface RadioOption {
20
+ label?: string;
21
+ value: RadioValue;
22
+ icon?: string;
23
+ iconSize?: number;
24
+ }
25
+ export type RadioValue = string | number;
@@ -0,0 +1,3 @@
1
+ import { default as CxSpin } from './index.vue';
2
+ export type SpinInstance = InstanceType<typeof CxSpin>;
3
+ export default CxSpin;
@@ -0,0 +1,26 @@
1
+ type __VLS_Props = {
2
+ loading?: boolean;
3
+ text?: string;
4
+ size?: number;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
+ size: number;
17
+ text: string;
18
+ loading: boolean;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,3 @@
1
+ import { default as CxUpload } from './index.vue';
2
+ export type UploadInstance = InstanceType<typeof CxUpload>;
3
+ export default CxUpload;
@@ -0,0 +1,43 @@
1
+ import { UploadProps } from './type';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ operate?(_: {}): any;
6
+ };
7
+ refs: {
8
+ uploadRef: HTMLDivElement;
9
+ };
10
+ rootEl: HTMLDivElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<UploadProps, {
14
+ open: () => void;
15
+ clear: () => void;
16
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ clear: () => any;
18
+ "update:modelValue": (value: File[]) => any;
19
+ change: (value: File[]) => any;
20
+ error: (type: "type" | "size", file: File) => any;
21
+ }, string, import('vue').PublicProps, Readonly<UploadProps> & Readonly<{
22
+ onClear?: (() => any) | undefined;
23
+ "onUpdate:modelValue"?: ((value: File[]) => any) | undefined;
24
+ onChange?: ((value: File[]) => any) | undefined;
25
+ onError?: ((type: "type" | "size", file: File) => any) | undefined;
26
+ }>, {
27
+ title: string;
28
+ disabled: boolean;
29
+ modelValue: File[];
30
+ defaultValue: File[];
31
+ accept: string[];
32
+ maxSize: number;
33
+ tip: string;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
35
+ uploadRef: HTMLDivElement;
36
+ }, HTMLDivElement>;
37
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
+ export default _default;
39
+ type __VLS_WithTemplateSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,15 @@
1
+ export interface UploadProps {
2
+ modelValue?: File[];
3
+ defaultValue?: File[];
4
+ accept?: string[];
5
+ maxSize?: number;
6
+ disabled?: boolean;
7
+ title?: string;
8
+ tip?: string;
9
+ }
10
+ export interface UploadEmits {
11
+ (e: 'update:modelValue', value: File[]): void;
12
+ (e: 'change', value: File[]): void;
13
+ (e: 'error', type: 'type' | 'size', file: File): void;
14
+ (e: 'clear'): void;
15
+ }
@@ -0,0 +1,8 @@
1
+ export { default as CxButton } from './cx-button';
2
+ export { default as CxEmpty } from './cx-empty';
3
+ export { default as CxRadioGroup } from './cx-radio-group';
4
+ export { default as CxSpin } from './cx-spin';
5
+ export { default as CxUpload } from './cx-upload';
6
+ export { default as SvgIcon } from './svg-icon';
7
+ export * from './tts-rich-text';
8
+ export { default as TtsRichTextEditor } from './tts-rich-text-editor';
@@ -0,0 +1,44 @@
1
+ import { App } from 'vue';
2
+ declare const SvgIcon: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
4
+ prefix?: string;
5
+ name: string;
6
+ size?: number | string | Array<number | string>;
7
+ color?: string;
8
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
9
+ prefix: string;
10
+ size: number | string | Array<number | string>;
11
+ color: string;
12
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLSpanElement, import('vue').ComponentProvideOptions, {
13
+ P: {};
14
+ B: {};
15
+ D: {};
16
+ C: {};
17
+ M: {};
18
+ Defaults: {};
19
+ }, Readonly<{
20
+ prefix?: string;
21
+ name: string;
22
+ size?: number | string | Array<number | string>;
23
+ color?: string;
24
+ }> & Readonly<{}>, {}, {}, {}, {}, {
25
+ prefix: string;
26
+ size: number | string | Array<number | string>;
27
+ color: string;
28
+ }>;
29
+ __isFragment?: never;
30
+ __isTeleport?: never;
31
+ __isSuspense?: never;
32
+ } & import('vue').ComponentOptionsBase<Readonly<{
33
+ prefix?: string;
34
+ name: string;
35
+ size?: number | string | Array<number | string>;
36
+ color?: string;
37
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
38
+ prefix: string;
39
+ size: number | string | Array<number | string>;
40
+ color: string;
41
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
42
+ install(app: App): void;
43
+ };
44
+ export default SvgIcon;
@@ -0,0 +1,12 @@
1
+ type __VLS_Props = {
2
+ prefix?: string;
3
+ name: string;
4
+ size?: number | string | Array<number | string>;
5
+ color?: string;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ prefix: string;
9
+ size: number | string | Array<number | string>;
10
+ color: string;
11
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
12
+ export default _default;
@@ -0,0 +1,10 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ open: () => void;
3
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ confirm: (text: string) => any;
5
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
6
+ onConfirm?: ((text: string) => any) | undefined;
7
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
8
+ textBoxRef: HTMLTextAreaElement;
9
+ }, any>;
10
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
2
+ export default _default;
@@ -0,0 +1,67 @@
1
+ import { ToolButtonItem } from './type';
2
+ type __VLS_Props = {
3
+ item: ToolButtonItem;
4
+ plain?: boolean;
5
+ disabled?: boolean;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {
8
+ getVirtualRef: () => HTMLElement | undefined;
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
10
+ click: () => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onClick?: (() => any) | undefined;
13
+ }>, {
14
+ disabled: boolean;
15
+ plain: boolean;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
17
+ buttonRef: ({
18
+ $: import('vue').ComponentInternalInstance;
19
+ $data: {};
20
+ $props: {
21
+ readonly link?: boolean | undefined;
22
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
23
+ $attrs: import('vue').Attrs;
24
+ $refs: {
25
+ [x: string]: unknown;
26
+ };
27
+ $slots: Readonly<{
28
+ [name: string]: import('vue').Slot<any> | undefined;
29
+ }>;
30
+ $root: import('vue').ComponentPublicInstance | null;
31
+ $parent: import('vue').ComponentPublicInstance | null;
32
+ $host: Element | null;
33
+ $emit: (event: string, ...args: any[]) => void;
34
+ $el: any;
35
+ $options: import('vue').ComponentOptionsBase<Readonly<{
36
+ link?: boolean;
37
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
38
+ link: boolean;
39
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
40
+ beforeCreate?: (() => void) | (() => void)[];
41
+ created?: (() => void) | (() => void)[];
42
+ beforeMount?: (() => void) | (() => void)[];
43
+ mounted?: (() => void) | (() => void)[];
44
+ beforeUpdate?: (() => void) | (() => void)[];
45
+ updated?: (() => void) | (() => void)[];
46
+ activated?: (() => void) | (() => void)[];
47
+ deactivated?: (() => void) | (() => void)[];
48
+ beforeDestroy?: (() => void) | (() => void)[];
49
+ beforeUnmount?: (() => void) | (() => void)[];
50
+ destroyed?: (() => void) | (() => void)[];
51
+ unmounted?: (() => void) | (() => void)[];
52
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
53
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
54
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
55
+ };
56
+ $forceUpdate: () => void;
57
+ $nextTick: typeof import('vue').nextTick;
58
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
59
+ } & Readonly<{
60
+ link: boolean;
61
+ }> & Omit<Readonly<{
62
+ link?: boolean;
63
+ }> & Readonly<{}>, "link"> & {} & import('vue').ComponentCustomProperties & {} & {
64
+ $slots: Partial<Record<string, (_: any) => any>>;
65
+ }) | null;
66
+ }, any>;
67
+ export default _default;