@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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## 0.9.0 - 2026-09-24
|
|
6
|
+
|
|
7
|
+
### 新增
|
|
8
|
+
|
|
9
|
+
- 工具栏的「停顿」「长停顿」支持长按 0.5 秒锁定。锁定后不必每次回到工具栏,直接在文本区点击即可在落点连续插入标记;再次长按同一按钮或按 `Escape` 解锁。锁定态按钮显示锁图标,并标注当前使用的参数。
|
|
10
|
+
- 文本区右键唤起标记面板,按当前形态决定可用工具:光标处提供插入类标记,命中选区时提供包裹类标记,面板头部相应提示「在光标处插入」或「标注选中文本」。
|
|
11
|
+
- 选中文本的浮层菜单由单一的「试听」扩展为「试听 + 全部包裹类标记」,参数型标记(如语种、数字读法)支持展开第二行选择。
|
|
12
|
+
|
|
13
|
+
### 变更
|
|
14
|
+
|
|
15
|
+
- 新增 `useEditorToolkit`,统一工具栏、选区浮层和右键面板三处的工具清单与执行入口,业务方只需维护一份清单。
|
|
16
|
+
- 锁定态按钮宽度变化后,由 `useOverflowToolbar()` 的 `refresh()` 重新分配可见与收起,避免窄屏下工具被错误收纳。
|
|
17
|
+
- 文本区右键不再弹出浏览器原生菜单,改为唤起标记面板。
|
|
18
|
+
- 公开导出补充 `EditorConst`、`isInsertTagType`、`getDefaultLockPayload`、`getLockPayloadLabel`、`TtsEditorContextMenu`、`useEditorToolkit` 与 `useEditorToolbar`。
|
|
19
|
+
- 项目引入 Prettier 统一代码风格,新增 `pnpm format` 与 `pnpm format:check` 脚本。
|
|
20
|
+
|
|
21
|
+
### 升级提示
|
|
22
|
+
|
|
23
|
+
- 长按锁定与右键面板均为增量能力,未触发长按、未使用右键时,工具栏行为与 0.8.x 一致。
|
|
24
|
+
- 若业务项目依赖文本区右键的浏览器原生菜单(如自定义粘贴或检查元素),需要在自己的容器上拦截并阻止冒泡。
|
|
25
|
+
|
|
5
26
|
## 0.8.3 - 2026-09-01
|
|
6
27
|
|
|
7
28
|
### 修复
|
package/README.md
CHANGED
|
@@ -18,11 +18,12 @@ pnpm dev
|
|
|
18
18
|
开发预览默认运行在 Vite 输出的本地地址。提交前执行:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
+
pnpm format:check
|
|
21
22
|
pnpm build
|
|
22
23
|
pnpm test:e2e
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
`build` 会依次完成类型检查、单元测试和组件库构建。`test:e2e` 使用本机 Chrome
|
|
26
|
+
`format:check` 按仓库根目录的 `.prettierrc` 校验代码风格,不一致时用 `pnpm format` 自动修复。`build` 会依次完成类型检查、单元测试和组件库构建。`test:e2e` 使用本机 Chrome 验证拼音标注、停顿插入、长按锁定、文本区右键面板、选区浮层标记、原主题样式和窄屏工具栏收纳。
|
|
26
27
|
|
|
27
28
|
## 安装
|
|
28
29
|
|
|
@@ -119,6 +120,35 @@ const getPlaybackSpeed = () => selectedVoice.value.speed / 50
|
|
|
119
120
|
|
|
120
121
|
上例中的 `api`、`messageService` 和 `selectedVoice` 由业务项目提供,组件包不会读取业务项目的环境变量、请求实例或状态管理。
|
|
121
122
|
|
|
123
|
+
## 编辑器交互
|
|
124
|
+
|
|
125
|
+
编辑器内置三种标记入口,业务项目不需要额外接入。
|
|
126
|
+
|
|
127
|
+
### 长按锁定
|
|
128
|
+
|
|
129
|
+
工具栏中属于「光标插入类」的工具(默认为「停顿」「长停顿」)支持长按 `0.5` 秒锁定:
|
|
130
|
+
|
|
131
|
+
- 锁定后在文本区任意位置点击,即在落点插入一个标记,可连续插入任意次,不用每次回到工具栏。
|
|
132
|
+
- 锁定态按钮显示锁图标与当前参数(如「0.5 秒」),并在弹层底部提示如何解锁。
|
|
133
|
+
- 再次长按同一按钮,或按 `Escape`,即可解锁。
|
|
134
|
+
|
|
135
|
+
可被锁定的范围由 `isInsertTagType()` 判定,它以 `deleteMode === DELETE_NODE` 为准,只包含停顿、长停顿这类不包裹选中文本的标签。
|
|
136
|
+
|
|
137
|
+
锁定使用的参数优先取业务方在弹层里选过的值(由 `rememberToolParams` 记住),从未选过时回落到 `getDefaultLockPayload()`,长停顿默认 `0.5` 秒。
|
|
138
|
+
|
|
139
|
+
### 文本区右键面板
|
|
140
|
+
|
|
141
|
+
在文本区右键会唤起标记面板,头部按当前形态提示:
|
|
142
|
+
|
|
143
|
+
- 光标处于文本中时提示「在光标处插入」,提供插入类标记。
|
|
144
|
+
- 右键落在已有选区上时提示「标注选中文本」,提供包裹类标记。
|
|
145
|
+
|
|
146
|
+
面板打开时会自动收起选区浮层,避免两个浮层叠放。
|
|
147
|
+
|
|
148
|
+
### 选区浮层
|
|
149
|
+
|
|
150
|
+
选中文本后浮出的菜单包含试听与全部包裹类标记,参数型标记(如语种、数字读法)会在第二行展开可选值。未接入 `synthesizePreview` 时试听按钮不渲染,其余标记照常可用。
|
|
151
|
+
|
|
122
152
|
## 差异扩展
|
|
123
153
|
|
|
124
154
|
### 功能配置
|
|
@@ -264,6 +294,7 @@ import '@naersen/tts-rich-text/theme-default.css'
|
|
|
264
294
|
对编辑器外壳差异较大的项目,可以直接组合包内原始组件:
|
|
265
295
|
|
|
266
296
|
- `TtsEditorToolbar`
|
|
297
|
+
- `TtsEditorContextMenu`
|
|
267
298
|
- `TtsEditorRoot`
|
|
268
299
|
- `TtsEditorContent`
|
|
269
300
|
- `TtsEditorFooter`
|
|
@@ -275,7 +306,9 @@ import '@naersen/tts-rich-text/theme-default.css'
|
|
|
275
306
|
- `TtsReplaceTextModal`
|
|
276
307
|
- `TtsUploadModal`
|
|
277
308
|
|
|
278
|
-
这些组件共享 `TtsEditorRoot` 提供的编辑器上下文,不能脱离 Root
|
|
309
|
+
这些组件共享 `TtsEditorRoot` 提供的编辑器上下文,不能脱离 Root 单独使用。`TtsEditorContextMenu` 是例外:它由 `visible`、`x`、`y`、`hasSelection`、`items` 驱动,通过 `select`(载荷为 `{ key, value }`)和 `close` 事件对外通信,可以脱离 Root 独立使用。
|
|
310
|
+
|
|
311
|
+
布局接近原项目时使用完整的 `TtsRichTextEditor`;页面结构差异较大时再组合原子组件,业务接口仍统一通过 `services` 注入。
|
|
279
312
|
|
|
280
313
|
### 组合式 API
|
|
281
314
|
|
|
@@ -283,6 +316,8 @@ import '@naersen/tts-rich-text/theme-default.css'
|
|
|
283
316
|
|
|
284
317
|
```ts
|
|
285
318
|
import {
|
|
319
|
+
useEditorToolbar,
|
|
320
|
+
useEditorToolkit,
|
|
286
321
|
useGlobalAudioControl,
|
|
287
322
|
useSSETool,
|
|
288
323
|
useSynthesizeAudioTool,
|
|
@@ -293,6 +328,8 @@ import {
|
|
|
293
328
|
|
|
294
329
|
`useSynthesizeAudioTool` 和 `useTestAudioTool` 会读取编辑器 services,需要在 `TtsEditorRoot` 的后代组件中调用。`useGlobalAudioControl` 和 `useSSETool` 可以独立使用。
|
|
295
330
|
|
|
331
|
+
`useEditorToolkit` 提供工具栏、选区浮层和右键面板共用的工具清单(`insertItems`、`selectionItems`)与统一执行入口 `runTool(key, value)`,自定义外层工具栏时用它可以让三处行为保持一致;`useEditorToolbar` 是底层实现,单独使用时需要自行维护清单。
|
|
332
|
+
|
|
296
333
|
## 对外方法
|
|
297
334
|
|
|
298
335
|
通过组件 ref 可以调用:
|
package/dist/base.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.svg-icon[data-v-65f4bcb9]{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;font-size:inherit;width:var(--v6cd858ea);height:var(--v4f17a402);color:var(--v6f0655b0);line-height:1}.svg-icon[data-v-65f4bcb9] svg{display:block;width:100%;height:100%}.cx-button-loading[data-v-5ca09421]{animation:loading-5ca09421 1s linear infinite}@keyframes loading-5ca09421{to{transform:rotate(1turn)}}.el-button.is-plain.cx-button-link[data-v-5ca09421]{height:30px;padding:4px 8px;border-radius:6px;border:none}.el-button.is-plain.cx-button-link.is-disabled[data-v-5ca09421]{border:none;background-color:transparent}.cx-empty[data-v-56b17ee0]{display:flex;flex-direction:column;align-items:center;justify-content:center}.cx-empty .cx-empty-icon[data-v-56b17ee0]{display:flex;justify-content:center;align-items:center}.cx-empty .cx-empty-icon img[data-v-56b17ee0]{height:100%;width:100%;object-fit:contain}.cx-empty .cx-empty-desc[data-v-56b17ee0]{color:#797b80;font-size:14px;line-height:22px}.cx-radio-group[data-v-f56b6fd8]{position:relative;height:36px;padding:3px;border-radius:6px;border:1px solid #d9d9d9;display:flex;align-items:center;gap:3px}.cx-radio-group .cx-radio-slider[data-v-f56b6fd8]{position:absolute;left:0;height:calc(100% - 6px);border-radius:6px;transition:transform .2s cubic-bezier(.34,.69,.1,1)}.cx-radio-group .cx-radio[data-v-f56b6fd8]{-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;z-index:1;flex:1;flex-shrink:0;height:100%;font-size:14px;line-height:22px;border-radius:6px;display:flex;justify-content:center;align-items:center;gap:4px}.cx-radio-group .cx-radio .cx-radio-icon[data-v-f56b6fd8]{display:flex;justify-content:center;align-items:center}.cx-radio-group .cx-radio.cx-radio-selected[data-v-f56b6fd8]{font-weight:600}.cx-radio-group[data-v-f56b6fd8]{background:var(--v74036a63)}.cx-radio-group .cx-radio-slider[data-v-f56b6fd8]{background:var(--v41a8ae01)}.cx-radio-group .cx-radio[data-v-f56b6fd8]{color:var(--c15225e4)}.cx-radio-group .cx-radio[data-v-f56b6fd8]:not(.cx-radio-selected):hover{background-color:var(--v9294f916);color:var(--v5c0c1e88)}.cx-radio-group .cx-radio.cx-radio-selected[data-v-f56b6fd8]{color:var(--v69c0c568)}.cx-spin[data-v-c91521a4]{position:relative;height:100%;width:100%}.cx-spin .cx-spin-mask[data-v-c91521a4]{z-index:9999;position:absolute;left:0;top:0;height:100%;width:100%;background-color:#fffc;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;justify-content:center;align-items:center}.cx-spin .cx-spin-mask .cx-spin-icon[data-v-c91521a4]{display:flex;flex-direction:column;align-items:center;gap:16px}.cx-spin .cx-spin-mask .cx-spin-icon .cx-spin-tip[data-v-c91521a4]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.cx-upload-wrapper[data-v-a9f6b4ff]{height:212px;background-color:#fff;border-radius:16px;border:1px dashed #d9d9d9;transition:border-color .2s}.cx-upload-wrapper[data-v-a9f6b4ff]:hover,.cx-upload-wrapper.cx-upload-dragging[data-v-a9f6b4ff],.cx-upload-wrapper.cx-upload-has-value[data-v-a9f6b4ff]{border:2px dashed #0d1839}.cx-upload-wrapper:hover.cx-upload-has-value[data-v-a9f6b4ff],.cx-upload-wrapper.cx-upload-dragging.cx-upload-has-value[data-v-a9f6b4ff],.cx-upload-wrapper.cx-upload-has-value.cx-upload-has-value[data-v-a9f6b4ff]{border-style:solid}.cx-upload-wrapper .cx-upload[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result[data-v-a9f6b4ff]{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.cx-upload-wrapper .cx-upload .cx-upload-title[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-title[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload .cx-upload-file-name[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-file-name[data-v-a9f6b4ff]{margin-top:10px;color:#101114;font-size:14px;font-weight:600;line-height:24px}.cx-upload-wrapper .cx-upload .cx-upload-title.cx-upload-file-name[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-title.cx-upload-file-name[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload .cx-upload-file-name.cx-upload-file-name[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-file-name.cx-upload-file-name[data-v-a9f6b4ff]{max-width:100%;padding:0 12px}.cx-upload-wrapper .cx-upload .cx-upload-icon[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-icon[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload .cx-upload-result-icon[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-result-icon[data-v-a9f6b4ff]{position:relative;width:56px;height:56px;display:flex;justify-content:center;align-items:center}.cx-upload-wrapper .cx-upload .cx-upload-icon .cx-upload-clear-icon[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-icon .cx-upload-clear-icon[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload .cx-upload-result-icon .cx-upload-clear-icon[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-result-icon .cx-upload-clear-icon[data-v-a9f6b4ff]{cursor:pointer;position:absolute;right:-8px;top:-8px}.cx-upload-wrapper .cx-upload .cx-upload-icon[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-icon[data-v-a9f6b4ff]{background-color:#f1f2f5;border-radius:50%}.cx-upload-wrapper .cx-upload .cx-upload-icon[data-v-a9f6b4ff]:hover,.cx-upload-wrapper .cx-upload-result .cx-upload-icon[data-v-a9f6b4ff]:hover{background-color:#d9d9d9}.cx-upload-wrapper .cx-upload .cx-upload-tip[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-tip[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload .cx-upload-file-operate[data-v-a9f6b4ff],.cx-upload-wrapper .cx-upload-result .cx-upload-file-operate[data-v-a9f6b4ff]{margin-top:4px;color:#797b80;line-height:22px}.cx-upload-wrapper .cx-upload[data-v-a9f6b4ff] .cx-upload-file-operate,.cx-upload-wrapper .cx-upload-result[data-v-a9f6b4ff] .cx-upload-file-operate{color:#0057ff;display:flex;justify-content:center;align-items:center}.cx-upload-wrapper .cx-upload[data-v-a9f6b4ff] .cx-upload-file-operate>span,.cx-upload-wrapper .cx-upload-result[data-v-a9f6b4ff] .cx-upload-file-operate>span{cursor:pointer;text-decoration-line:underline}.cx-upload-wrapper .cx-upload[data-v-a9f6b4ff]{cursor:pointer}.cx-upload-wrapper.cx-upload-disabled[data-v-a9f6b4ff]{cursor:not-allowed;background-color:#f7f8fa;opacity:.7}.tag-node[data-v-2c169e02]{display:inline;box-sizing:border-box;margin:0 3px;padding:2px 8px;font-size:12px;line-height:20px;min-height:22px;font-weight:400;background:#e5eeff;color:#3d4766;border-radius:4px;-webkit-user-select:none;user-select:none;box-decoration-break:clone;-webkit-box-decoration-break:clone}.icon-wrapper[data-v-2c169e02]{display:inline-flex;align-items:center;height:20px}.icon-wrapper.tag-icon[data-v-2c169e02]{margin-right:4px;vertical-align:-.2em}.icon-wrapper.delete-icon[data-v-2c169e02]{margin-left:4px}.delete-btn[data-v-2c169e02]{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:10px;color:#7d8ab2}.delete-btn[data-v-2c169e02]:hover{color:#ea5b41}[data-v-d764ae22] .tiptap-editor{font-size:14px;line-height:28px;word-break:break-word;outline:none}[data-v-d764ae22] .tiptap-editor p{counter-reset:sentence;margin:0}[data-v-d764ae22] .tiptap-editor p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;height:0;color:#797b80;pointer-events:none}.lsh-menu-box[data-v-fc73c1bc]{z-index:1;width:120px;padding:4px;border-radius:10px;border:1px solid #d9d9d9;background:#fff;box-shadow:0 6px 24px #1f23291a}.lsh-menu-box .lsh-menu-item[data-v-fc73c1bc]{display:flex;align-items:center;justify-content:flex-start;width:100%;height:32px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#101114;font-size:14px;line-height:22px;cursor:pointer}.lsh-menu-box .lsh-menu-item[data-v-fc73c1bc]:hover{background:#f1f2f5}.red-text[data-v-259be8b7]{color:#ea5b41}.lsh-text-btn[data-v-259be8b7]{display:flex;justify-content:center;align-items:center;gap:4px;padding:1px 6px!important;cursor:pointer;color:#101114;line-height:22px;background:transparent!important;height:22px}.lsh-text-btn.is-disabled[data-v-259be8b7]{opacity:.4}.lsh-text-btn.blue[data-v-259be8b7]{color:#0057ff}.lsh-text-btn.red[data-v-259be8b7]{color:#ea5b41}.lsh-textarea[data-v-259be8b7]{resize:none;border:none;outline:none;width:100%;background:transparent}.lsh-content-box[data-v-259be8b7]{display:flex;gap:16px;height:444px}.lsh-content-box .lsh-form-box[data-v-259be8b7]{flex:1;display:flex;flex-direction:column;gap:8px}.lsh-content-box .lsh-form-box .lsh-form-top[data-v-259be8b7]{display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-top .lsh-title[data-v-259be8b7]{color:#101114;font-weight:600;line-height:22px}.lsh-content-box .lsh-form-box .lsh-form-bottom[data-v-259be8b7]{flex:1;border-radius:10px;border:1px solid #d9d9d9;padding:12px 16px;color:#101114;line-height:22px;background:#fff;display:flex;flex-direction:column;overflow:hidden}.lsh-content-box .lsh-form-box .lsh-form-bottom.gray[data-v-259be8b7]{background:#f1f2f5}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-tip[data-v-259be8b7]{color:#797b80;font-size:12px;line-height:20px;font-weight:400;display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-259be8b7]{flex:1;overflow:auto}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-259be8b7] .cx-spin-mask{background:transparent;opacity:.4}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-259be8b7] .cx-spin-mask .cx-spin-tip{font-size:14px;font-weight:400}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-form-item[data-v-259be8b7]{display:flex;flex-direction:column;gap:4px}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-form-item[data-v-259be8b7]:nth-child(n+2){border-top:1px solid #eaecf2;padding-top:8px;margin-top:8px}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-form-item .lsh-form-item-top[data-v-259be8b7]{color:#101114;font-weight:600;line-height:22px;display:flex;align-items:center;justify-content:space-between}.lsh-footer-box[data-v-b83e8b96]{height:46px;padding:8px;display:flex;align-items:center;justify-content:flex-end}.lsh-footer-box .lsh-option-item[data-v-b83e8b96]{height:100%;padding:4px 8px;display:flex;align-items:center;gap:4px;color:#101114;font-size:14px;font-weight:400;line-height:22px}.lsh-footer-box .lsh-option-item[data-v-b83e8b96] .svg-icon{font-size:18px}.lsh-footer-box .lsh-option-item.btn[data-v-b83e8b96]{cursor:pointer;-webkit-user-select:none;user-select:none}.lsh-footer-box .lsh-option-item.btn.disabled[data-v-b83e8b96]{opacity:.4}.lsh-footer-box .lsh-option-item.btn[data-v-b83e8b96]:not(.disabled):hover{border-radius:6px;background:#f1f2f5}.lsh-footer-box .lsh-option-item.gray[data-v-b83e8b96]{color:#797b80}.lsh-footer-box .lsh-divider[data-v-b83e8b96]{width:1px;height:20px;background:#eaecf2;margin:0 8px}.red-text[data-v-e743e5e3]{color:#ea5b41}.lsh-text-btn[data-v-e743e5e3]{display:flex;justify-content:center;align-items:center;gap:4px;padding:4px 8px;cursor:pointer;color:#101114;line-height:22px;height:22px}.lsh-text-btn.stop[data-v-e743e5e3]{color:#ea5b41}.lsh-textarea[data-v-e743e5e3]{resize:none;border:none;outline:none;width:100%;background:transparent}.lsh-content-box[data-v-e743e5e3]{display:flex;gap:16px;height:444px}.lsh-content-box .lsh-form-box[data-v-e743e5e3]{flex:1;display:flex;flex-direction:column;gap:8px}.lsh-content-box .lsh-form-box .lsh-form-top[data-v-e743e5e3]{display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-top .lsh-title[data-v-e743e5e3]{color:#101114;font-weight:600;line-height:22px}.lsh-content-box .lsh-form-box .lsh-form-bottom[data-v-e743e5e3]{flex:1;border-radius:10px;border:1px solid #d9d9d9;padding:12px;color:#101114;line-height:22px;background:#fff;display:flex;flex-direction:column;overflow:hidden}.lsh-content-box .lsh-form-box .lsh-form-bottom.gray[data-v-e743e5e3]{background:#f1f2f5}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-tip[data-v-e743e5e3]{color:#797b80;font-size:12px;line-height:20px;display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-e743e5e3]{flex:1;overflow:auto}.lsh-ai-modal{position:relative;overflow:hidden}.lsh-ai-modal:before{position:absolute;top:0;left:0;width:100%;height:120px;content:"";z-index:0;pointer-events:none;background:radial-gradient(53.22% 165.47% at 52.17% -65.47%,#0038ff14,#0038ff00),radial-gradient(51.16% 163.6% at 85.6% -63.59%,#ff642214,#ff642200),radial-gradient(102.93% 140.61% at 7.43% -30.94%,#00d09e14,#00d09e00),linear-gradient(180deg,#fafbfc 47.89%,#fafbfccc,#fafbfc00)}.lsh-ai-modal .el-dialog__header,.lsh-ai-modal .el-dialog__body,.lsh-ai-modal .el-dialog__footer{position:relative;z-index:1}.lsh-ai-modal .el-dialog__header .el-dialog__headerbtn{right:-2px!important}.rect-btn[data-v-084a669a]{display:flex;width:40px;height:36px;padding:0 12px;justify-content:center;align-items:center;flex-shrink:0;border-radius:10px;background:#f1f2f5;border:1px solid #f1f2f5;cursor:pointer;-webkit-user-select:none;user-select:none}.rect-btn.active[data-v-084a669a],.rect-btn[data-v-084a669a]:hover{border-color:#0d1839}.lsh-header-content[data-v-084a669a]{position:relative}.lsh-header-content .lsh-title[data-v-084a669a]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-header-content .lsh-radio-group[data-v-084a669a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:185px}.lsh-content-box[data-v-084a669a]{height:444px;display:flex;flex-direction:column}.lsh-content-box .lsh-label[data-v-084a669a]{color:#101114;font-size:14px;font-weight:600;line-height:22px;margin-bottom:8px}.lsh-content-box .lsh-text-box[data-v-084a669a]{height:44px;padding:5px 12px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:16px;border:1px solid #d9d9d9;background:#f1f2f5;color:#101114;font-size:18px;font-weight:600;line-height:26px;width:100%;text-align:center}.lsh-content-box .lsh-polyphonic-box[data-v-084a669a]{margin-top:16px;flex:1}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-list[data-v-084a669a]{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow:auto}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-item[data-v-084a669a]{display:flex;align-items:flex-start;gap:8px}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-char[data-v-084a669a]{display:flex;align-items:center;justify-content:center;width:36px;height:32px;flex-shrink:0;border-radius:10px;background:#f1f2f5;color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-options[data-v-084a669a]{display:flex;flex-wrap:wrap;gap:8px}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-option[data-v-084a669a]{height:32px;padding:4px 12px;border-radius:10px;border:1px solid #d9d9d9;background:#fff;color:#101114;font-size:14px;line-height:22px;cursor:pointer;-webkit-user-select:none;user-select:none}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-option.active[data-v-084a669a],.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-option[data-v-084a669a]:hover{border-color:#0d1839}.lsh-content-box .lsh-options-box[data-v-084a669a]{margin-top:16px;display:flex;gap:16px}.lsh-content-box .lsh-options-box .lsh-options[data-v-084a669a]{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:16px;border:1px solid #d9d9d9;background:#fff}.lsh-content-box .lsh-options-box .lsh-initials[data-v-084a669a]{display:flex;flex-wrap:wrap;gap:4px}.lsh-content-box .lsh-options-box .lsh-initials .lsh-initial-btn[data-v-084a669a]{display:flex;width:40px;height:36px;padding:0 12px;justify-content:center;align-items:center;flex-shrink:0;border-radius:10px;background:#f1f2f5;border:1px solid #f1f2f5;cursor:pointer;-webkit-user-select:none;user-select:none}.lsh-content-box .lsh-options-box .lsh-initials .lsh-initial-btn.active[data-v-084a669a],.lsh-content-box .lsh-options-box .lsh-initials .lsh-initial-btn[data-v-084a669a]:hover{border-color:#0d1839}.lsh-content-box .lsh-options-box .lsh-radio-group-white[data-v-084a669a]{border-radius:14px;padding:4px;gap:4px;height:44px}.lsh-content-box .lsh-options-box .lsh-radio-group-white[data-v-084a669a] .cx-radio{border-radius:10px}.lsh-content-box .lsh-options-box .lsh-radio-group-white[data-v-084a669a] .cx-radio.cx-radio-selected{font-weight:400}.lsh-content-box .lsh-options-box .lsh-final-box[data-v-084a669a]{display:flex;flex-direction:column;gap:8px;padding:8px;border-radius:14px;background:#f1f2f5}.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list[data-v-084a669a]{display:flex;flex-wrap:wrap;gap:4px}.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list .lsh-final-item[data-v-084a669a]{display:flex;width:40px;height:36px;padding:0 12px;justify-content:center;align-items:center;flex-shrink:0;border-radius:10px;background:#f1f2f5;border:1px solid #f1f2f5;cursor:pointer;-webkit-user-select:none;user-select:none;background:#fff;box-shadow:0 1px 4px #0000001a}.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list .lsh-final-item.active[data-v-084a669a],.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list .lsh-final-item[data-v-084a669a]:hover{border-color:#0d1839}.lsh-content-box .lsh-manual-text-box[data-v-084a669a]{margin-top:16px}.lsh-content-box .lsh-manual-text-box .lsh-manual-text-list[data-v-084a669a]{display:flex;gap:8px}.lsh-content-box .lsh-manual-text-box .lsh-manual-text-item[data-v-084a669a]{display:flex;min-width:64px;height:52px;padding:4px 12px;flex-direction:column;align-items:center;justify-content:center;border-radius:10px;border:1px solid #d9d9d9;background:#fff;font-size:16px;cursor:pointer}.lsh-content-box .lsh-manual-text-box .lsh-manual-text-item.active[data-v-084a669a],.lsh-content-box .lsh-manual-text-box .lsh-manual-text-item[data-v-084a669a]:hover{border-color:#0d1839}.lsh-content-box .lsh-manual-text-box .lsh-manual-pinyin[data-v-084a669a]{color:#666;font-size:12px;line-height:18px}.lsh-header-content[data-v-7c709cca]{width:calc(100% - 52px);display:flex;flex-direction:column;gap:4px}.lsh-header-content .lsh-title[data-v-7c709cca]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-header-content .lsh-tip[data-v-7c709cca]{color:#797b80;font-size:14px;font-weight:400;line-height:22px}.lsh-content-box[data-v-7c709cca]{display:flex;flex-direction:column;gap:24px;padding-bottom:44px}.lsh-content-box .lsh-form-item-label[data-v-7c709cca]{color:#101114;font-size:14px;font-weight:600;line-height:22px;margin-bottom:8px}.lsh-modal-header{height:fit-content!important}.lsh-language-list[data-v-931bb88d]{display:flex;align-items:center;gap:8px;padding:12px;width:264px;flex-wrap:wrap}.lsh-language-list .el-button[data-v-931bb88d]{width:116px}.lsh-number-list[data-v-9fa42093]{display:flex;gap:8px;padding:12px;width:272px;flex-direction:column;align-items:start;overflow:hidden}.lsh-number-list .el-button[data-v-9fa42093]{width:100%;justify-content:flex-start}.lsh-number-label[data-v-9fa42093]{flex-shrink:0}.lsh-stop-list[data-v-a92cb91d]{display:flex;align-items:center;gap:8px;padding:12px}.lsh-stop-input[data-v-a92cb91d]{outline:none;border:none;color:#101114;line-height:22px;border-bottom:1px solid #101114;background:transparent;width:42px;height:22px;margin:0 4px}.lsh-stop-input[data-v-a92cb91d]::placeholder{color:#797b80}.lsh-stop-input[data-v-a92cb91d]:focus{border-color:#0057ff}.lsh-stop-input[data-v-a92cb91d] .el-input .el-input__wrapper{box-shadow:none;padding:0;background:transparent}.lsh-content-box[data-v-cdac4822]{display:flex;flex-direction:column;gap:24px;padding-bottom:44px}.lsh-content-box .lsh-title[data-v-cdac4822]{color:#101114;font-size:14px;font-weight:600;line-height:22px;margin-bottom:4px}.lsh-content-box .lsh-tip-text[data-v-cdac4822]{color:#797b80;font-size:14px;font-weight:400;line-height:175%}.word-upload-modal .el-overlay-dialog .el-dialog{overflow:hidden;height:600px;display:flex;flex-direction:column}.word-upload-modal .el-overlay-dialog .el-dialog .el-dialog__body{flex:1}.lsh-toolbar-box[data-v-c900d867]{position:relative;flex:1;min-width:0;display:flex;align-items:center;gap:8px;overflow:hidden}.lsh-toolbar-box .lsh-tool-btn[data-v-c900d867]{height:30px;flex-shrink:0;display:flex;align-items:center;padding:4px 8px;border-radius:6px;border:none;white-space:nowrap}.lsh-toolbar-measure[data-v-c900d867]{position:absolute;top:0;left:0;z-index:-1;display:flex;gap:8px;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.lsh-more-list[data-v-c900d867]{display:flex;min-width:140px;padding:4px;flex-direction:column;gap:2px}.lsh-more-list .lsh-more-item[data-v-c900d867]{width:100%;justify-content:flex-start;padding:8px 10px;border:none;border-radius:6px}.el-popper.lsh-popper{width:fit-content!important;padding:0}.tts-rich-text-editor[data-v-3ed36f16]{box-sizing:border-box;display:flex;width:100%;max-width:100%;min-width:0;height:266px;min-height:220px;padding:0 8px 8px;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;color:#101114;font-family:PingFang SC,Microsoft YaHei,Arial,sans-serif}.tts-rich-text-editor.is-fullscreen[data-v-3ed36f16]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;height:100vh;padding:16px;background:#f5f6f8}.tts-rich-text-editor.is-disabled .lsh-editor-box[data-v-3ed36f16]{background:#f7f8fa}.tts-rich-text-editor.is-disabled .lsh-top[data-v-3ed36f16],.tts-rich-text-editor.is-disabled .lsh-middle[data-v-3ed36f16],.tts-rich-text-editor.is-disabled .lsh-bottom[data-v-3ed36f16]{opacity:.7}.tts-rich-text-editor .lsh-editor-box[data-v-3ed36f16]{position:relative;display:flex;width:100%;min-width:0;height:100%;flex-direction:column;overflow:hidden;border:1px solid #d9d9d9;border-radius:24px;background:#fff;transition:box-shadow .3s}.tts-rich-text-editor .lsh-editor-box[data-v-3ed36f16]:hover,.tts-rich-text-editor .lsh-editor-box[data-v-3ed36f16]:focus-within{border-color:#0057ff}.tts-rich-text-editor .lsh-editor-box[data-v-3ed36f16]:focus-within{box-shadow:0 8px 16px #0057ff33}.tts-rich-text-editor .lsh-top[data-v-3ed36f16]{display:flex;height:46px;padding:8px 16px;align-items:center;gap:8px;flex-shrink:0;border-bottom:1px solid #eaecf2}.tts-rich-text-editor .lsh-fullscreen-btn[data-v-3ed36f16]{display:flex;width:30px;height:30px;padding:0;align-items:center;justify-content:center;flex-shrink:0;border:0;border-radius:6px;background:transparent;color:#101114;cursor:pointer}.tts-rich-text-editor .lsh-fullscreen-btn[data-v-3ed36f16]:hover{background:#f1f2f5}.tts-rich-text-editor .lsh-middle[data-v-3ed36f16]{flex:1;min-height:0;padding:12px 16px 0;overflow:hidden}.tts-rich-text-editor .lsh-middle .editor-shell[data-v-3ed36f16]{height:100%;overflow:auto}.tts-rich-text-editor .lsh-bottom[data-v-3ed36f16]{display:flex;min-height:46px;min-width:0;align-items:center;justify-content:flex-end;flex-shrink:0}@media (max-width: 640px){.tts-rich-text-editor[data-v-3ed36f16]{padding:0}.tts-rich-text-editor .lsh-editor-box[data-v-3ed36f16]{border-radius:12px}.tts-rich-text-editor .lsh-top[data-v-3ed36f16]{padding:8px}}
|
|
1
|
+
.svg-icon[data-v-f9dec5ab]{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;font-size:inherit;width:var(--v340fb7c9);height:var(--v34184784);color:var(--v32f8b966);line-height:1}.svg-icon[data-v-f9dec5ab] svg{display:block;width:100%;height:100%}.cx-button-loading[data-v-40189ef7]{animation:loading-40189ef7 1s linear infinite}@keyframes loading-40189ef7{to{transform:rotate(1turn)}}.el-button.is-plain.cx-button-link[data-v-40189ef7]{height:30px;padding:4px 8px;border-radius:6px;border:none}.el-button.is-plain.cx-button-link.is-disabled[data-v-40189ef7]{border:none;background-color:transparent}.cx-empty[data-v-12ca5136]{display:flex;flex-direction:column;align-items:center;justify-content:center}.cx-empty .cx-empty-icon[data-v-12ca5136]{display:flex;justify-content:center;align-items:center}.cx-empty .cx-empty-icon img[data-v-12ca5136]{height:100%;width:100%;object-fit:contain}.cx-empty .cx-empty-desc[data-v-12ca5136]{color:#797b80;font-size:14px;line-height:22px}.cx-radio-group[data-v-5610643a]{position:relative;height:36px;padding:3px;border-radius:6px;border:1px solid #d9d9d9;display:flex;align-items:center;gap:3px}.cx-radio-group .cx-radio-slider[data-v-5610643a]{position:absolute;left:0;height:calc(100% - 6px);border-radius:6px;transition:transform .2s cubic-bezier(.34,.69,.1,1)}.cx-radio-group .cx-radio[data-v-5610643a]{-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;z-index:1;flex:1;flex-shrink:0;height:100%;font-size:14px;line-height:22px;border-radius:6px;display:flex;justify-content:center;align-items:center;gap:4px}.cx-radio-group .cx-radio .cx-radio-icon[data-v-5610643a]{display:flex;justify-content:center;align-items:center}.cx-radio-group .cx-radio.cx-radio-selected[data-v-5610643a]{font-weight:600}.cx-radio-group[data-v-5610643a]{background:var(--v0bd4c220)}.cx-radio-group .cx-radio-slider[data-v-5610643a]{background:var(--v63724994)}.cx-radio-group .cx-radio[data-v-5610643a]{color:var(--v3d0f5461)}.cx-radio-group .cx-radio[data-v-5610643a]:not(.cx-radio-selected):hover{background-color:var(--v4f01c1f0);color:var(--v580c2549)}.cx-radio-group .cx-radio.cx-radio-selected[data-v-5610643a]{color:var(--b415bb0a)}.cx-spin[data-v-2b183816]{position:relative;height:100%;width:100%}.cx-spin .cx-spin-mask[data-v-2b183816]{z-index:9999;position:absolute;left:0;top:0;height:100%;width:100%;background-color:#fffc;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;justify-content:center;align-items:center}.cx-spin .cx-spin-mask .cx-spin-icon[data-v-2b183816]{display:flex;flex-direction:column;align-items:center;gap:16px}.cx-spin .cx-spin-mask .cx-spin-icon .cx-spin-tip[data-v-2b183816]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.cx-upload-wrapper[data-v-7216b30e]{height:212px;background-color:#fff;border-radius:16px;border:1px dashed #d9d9d9;transition:border-color .2s}.cx-upload-wrapper[data-v-7216b30e]:hover,.cx-upload-wrapper.cx-upload-dragging[data-v-7216b30e],.cx-upload-wrapper.cx-upload-has-value[data-v-7216b30e]{border:2px dashed #0d1839}.cx-upload-wrapper:hover.cx-upload-has-value[data-v-7216b30e],.cx-upload-wrapper.cx-upload-dragging.cx-upload-has-value[data-v-7216b30e],.cx-upload-wrapper.cx-upload-has-value.cx-upload-has-value[data-v-7216b30e]{border-style:solid}.cx-upload-wrapper .cx-upload[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result[data-v-7216b30e]{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.cx-upload-wrapper .cx-upload .cx-upload-title[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-title[data-v-7216b30e],.cx-upload-wrapper .cx-upload .cx-upload-file-name[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-file-name[data-v-7216b30e]{margin-top:10px;color:#101114;font-size:14px;font-weight:600;line-height:24px}.cx-upload-wrapper .cx-upload .cx-upload-title.cx-upload-file-name[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-title.cx-upload-file-name[data-v-7216b30e],.cx-upload-wrapper .cx-upload .cx-upload-file-name.cx-upload-file-name[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-file-name.cx-upload-file-name[data-v-7216b30e]{max-width:100%;padding:0 12px}.cx-upload-wrapper .cx-upload .cx-upload-icon[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-icon[data-v-7216b30e],.cx-upload-wrapper .cx-upload .cx-upload-result-icon[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-result-icon[data-v-7216b30e]{position:relative;width:56px;height:56px;display:flex;justify-content:center;align-items:center}.cx-upload-wrapper .cx-upload .cx-upload-icon .cx-upload-clear-icon[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-icon .cx-upload-clear-icon[data-v-7216b30e],.cx-upload-wrapper .cx-upload .cx-upload-result-icon .cx-upload-clear-icon[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-result-icon .cx-upload-clear-icon[data-v-7216b30e]{cursor:pointer;position:absolute;right:-8px;top:-8px}.cx-upload-wrapper .cx-upload .cx-upload-icon[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-icon[data-v-7216b30e]{background-color:#f1f2f5;border-radius:50%}.cx-upload-wrapper .cx-upload .cx-upload-icon[data-v-7216b30e]:hover,.cx-upload-wrapper .cx-upload-result .cx-upload-icon[data-v-7216b30e]:hover{background-color:#d9d9d9}.cx-upload-wrapper .cx-upload .cx-upload-tip[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-tip[data-v-7216b30e],.cx-upload-wrapper .cx-upload .cx-upload-file-operate[data-v-7216b30e],.cx-upload-wrapper .cx-upload-result .cx-upload-file-operate[data-v-7216b30e]{margin-top:4px;color:#797b80;line-height:22px}.cx-upload-wrapper .cx-upload[data-v-7216b30e] .cx-upload-file-operate,.cx-upload-wrapper .cx-upload-result[data-v-7216b30e] .cx-upload-file-operate{color:#0057ff;display:flex;justify-content:center;align-items:center}.cx-upload-wrapper .cx-upload[data-v-7216b30e] .cx-upload-file-operate>span,.cx-upload-wrapper .cx-upload-result[data-v-7216b30e] .cx-upload-file-operate>span{cursor:pointer;text-decoration-line:underline}.cx-upload-wrapper .cx-upload[data-v-7216b30e]{cursor:pointer}.cx-upload-wrapper.cx-upload-disabled[data-v-7216b30e]{cursor:not-allowed;background-color:#f7f8fa;opacity:.7}.tag-node[data-v-64546350]{display:inline;box-sizing:border-box;margin:0 3px;padding:2px 8px;font-size:12px;line-height:20px;min-height:22px;font-weight:400;background:#e5eeff;color:#3d4766;border-radius:4px;-webkit-user-select:none;user-select:none;box-decoration-break:clone;-webkit-box-decoration-break:clone}.icon-wrapper[data-v-64546350]{display:inline-flex;align-items:center;height:20px}.icon-wrapper.tag-icon[data-v-64546350]{margin-right:4px;vertical-align:-.2em}.icon-wrapper.delete-icon[data-v-64546350]{margin-left:4px}.delete-btn[data-v-64546350]{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:10px;color:#7d8ab2}.delete-btn[data-v-64546350]:hover{color:#ea5b41}[data-v-d764ae22] .tiptap-editor{font-size:14px;line-height:28px;word-break:break-word;outline:none}[data-v-d764ae22] .tiptap-editor p{counter-reset:sentence;margin:0}[data-v-d764ae22] .tiptap-editor p.is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;height:0;color:#797b80;pointer-events:none}.lsh-menu-box[data-v-d125f43a]{z-index:1;display:flex;flex-direction:column;gap:4px;max-width:520px;padding:6px 8px;border-radius:10px;border:1px solid #d9d9d9;background:#fff;box-shadow:0 6px 24px #1f23291a}.lsh-menu-box .lsh-menu-main[data-v-d125f43a]{display:flex;align-items:center;flex-wrap:wrap;gap:2px}.lsh-menu-box .lsh-menu-main .lsh-menu-item[data-v-d125f43a]{display:flex;align-items:center;gap:2px;height:28px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:#101114;font-size:13px;line-height:20px;white-space:nowrap;cursor:pointer}.lsh-menu-box .lsh-menu-main .lsh-menu-item[data-v-d125f43a]:hover{background:#f1f2f5}.lsh-menu-box .lsh-menu-main .lsh-menu-item.is-expanded[data-v-d125f43a]{background:#e6eeff;color:#0057ff}.lsh-menu-box .lsh-menu-main .lsh-menu-item .lsh-menu-caret[data-v-d125f43a]{color:#8a8f99;font-size:10px}.lsh-menu-box .lsh-menu-main .lsh-menu-divider[data-v-d125f43a]{width:1px;height:16px;margin:0 4px;background:#e5e7eb}.lsh-menu-box .lsh-menu-options[data-v-d125f43a]{display:flex;flex-wrap:wrap;gap:6px;padding-top:6px;border-top:1px solid #f1f2f5}.lsh-menu-box .lsh-menu-options .lsh-menu-option[data-v-d125f43a]{padding:2px 10px;border:1px solid #e5e7eb;border-radius:999px;background:#fafbfc;color:#3d4766;font-size:12px;line-height:20px;cursor:pointer}.lsh-menu-box .lsh-menu-options .lsh-menu-option[data-v-d125f43a]:hover{border-color:#0057ff;background:#e6eeff;color:#0057ff}.red-text[data-v-a40d0499]{color:#ea5b41}.lsh-text-btn[data-v-a40d0499]{display:flex;justify-content:center;align-items:center;gap:4px;padding:1px 6px!important;cursor:pointer;color:#101114;line-height:22px;background:transparent!important;height:22px}.lsh-text-btn.is-disabled[data-v-a40d0499]{opacity:.4}.lsh-text-btn.blue[data-v-a40d0499]{color:#0057ff}.lsh-text-btn.red[data-v-a40d0499]{color:#ea5b41}.lsh-textarea[data-v-a40d0499]{resize:none;border:none;outline:none;width:100%;background:transparent}.lsh-content-box[data-v-a40d0499]{display:flex;gap:16px;height:444px}.lsh-content-box .lsh-form-box[data-v-a40d0499]{flex:1;display:flex;flex-direction:column;gap:8px}.lsh-content-box .lsh-form-box .lsh-form-top[data-v-a40d0499]{display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-top .lsh-title[data-v-a40d0499]{color:#101114;font-weight:600;line-height:22px}.lsh-content-box .lsh-form-box .lsh-form-bottom[data-v-a40d0499]{flex:1;border-radius:10px;border:1px solid #d9d9d9;padding:12px 16px;color:#101114;line-height:22px;background:#fff;display:flex;flex-direction:column;overflow:hidden}.lsh-content-box .lsh-form-box .lsh-form-bottom.gray[data-v-a40d0499]{background:#f1f2f5}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-tip[data-v-a40d0499]{color:#797b80;font-size:12px;line-height:20px;font-weight:400;display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-a40d0499]{flex:1;overflow:auto}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-a40d0499] .cx-spin-mask{background:transparent;opacity:.4}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-a40d0499] .cx-spin-mask .cx-spin-tip{font-size:14px;font-weight:400}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-form-item[data-v-a40d0499]{display:flex;flex-direction:column;gap:4px}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-form-item[data-v-a40d0499]:nth-child(n+2){border-top:1px solid #eaecf2;padding-top:8px;margin-top:8px}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-form-item .lsh-form-item-top[data-v-a40d0499]{color:#101114;font-weight:600;line-height:22px;display:flex;align-items:center;justify-content:space-between}.lsh-context-menu[data-v-06aa51fd]{position:fixed;z-index:3000;min-width:208px;max-width:268px;max-height:68vh;display:flex;flex-direction:column;padding:6px;border-radius:10px;border:1px solid #e5e7eb;background:#fff;box-shadow:0 8px 28px #1f232924;overflow:hidden}.lsh-context-menu .lsh-context-header[data-v-06aa51fd]{flex-shrink:0;padding:4px 8px 6px;color:#8a8f99;font-size:12px;line-height:18px}.lsh-context-menu .lsh-context-list[data-v-06aa51fd]{flex:1;min-height:0;overflow-y:auto}.lsh-context-menu .lsh-context-list .lsh-context-item[data-v-06aa51fd]{display:flex;align-items:center;gap:8px;width:100%;height:32px;padding:0 8px;border:0;border-radius:6px;background:transparent;color:#101114;font-size:14px;line-height:22px;cursor:pointer}.lsh-context-menu .lsh-context-list .lsh-context-item[data-v-06aa51fd]:hover,.lsh-context-menu .lsh-context-list .lsh-context-item.is-expanded[data-v-06aa51fd]{background:#f1f2f5}.lsh-context-menu .lsh-context-list .lsh-context-item .lsh-context-label[data-v-06aa51fd]{flex:1;text-align:left}.lsh-context-menu .lsh-context-list .lsh-context-item .lsh-context-caret[data-v-06aa51fd]{color:#8a8f99;font-size:10px}.lsh-context-menu .lsh-context-list .lsh-context-options[data-v-06aa51fd]{display:flex;flex-wrap:wrap;gap:6px;padding:4px 8px 8px}.lsh-context-menu .lsh-context-list .lsh-context-options .lsh-context-option[data-v-06aa51fd]{padding:3px 10px;border:1px solid #e5e7eb;border-radius:999px;background:#fafbfc;color:#3d4766;font-size:12px;line-height:20px;cursor:pointer}.lsh-context-menu .lsh-context-list .lsh-context-options .lsh-context-option[data-v-06aa51fd]:hover{border-color:#0057ff;background:#e6eeff;color:#0057ff}.lsh-footer-box[data-v-7ff45129]{height:46px;padding:8px;display:flex;align-items:center;justify-content:flex-end}.lsh-footer-box .lsh-option-item[data-v-7ff45129]{height:100%;padding:4px 8px;display:flex;align-items:center;gap:4px;color:#101114;font-size:14px;font-weight:400;line-height:22px}.lsh-footer-box .lsh-option-item[data-v-7ff45129] .svg-icon{font-size:18px}.lsh-footer-box .lsh-option-item.btn[data-v-7ff45129]{cursor:pointer;-webkit-user-select:none;user-select:none}.lsh-footer-box .lsh-option-item.btn.disabled[data-v-7ff45129]{opacity:.4}.lsh-footer-box .lsh-option-item.btn[data-v-7ff45129]:not(.disabled):hover{border-radius:6px;background:#f1f2f5}.lsh-footer-box .lsh-option-item.gray[data-v-7ff45129]{color:#797b80}.lsh-footer-box .lsh-divider[data-v-7ff45129]{width:1px;height:20px;background:#eaecf2;margin:0 8px}.lsh-lock-icon[data-v-9c465e3c]{margin-left:2px;flex-shrink:0}.red-text[data-v-4e58c0be]{color:#ea5b41}.lsh-text-btn[data-v-4e58c0be]{display:flex;justify-content:center;align-items:center;gap:4px;padding:4px 8px;cursor:pointer;color:#101114;line-height:22px;height:22px}.lsh-text-btn.stop[data-v-4e58c0be]{color:#ea5b41}.lsh-textarea[data-v-4e58c0be]{resize:none;border:none;outline:none;width:100%;background:transparent}.lsh-content-box[data-v-4e58c0be]{display:flex;gap:16px;height:444px}.lsh-content-box .lsh-form-box[data-v-4e58c0be]{flex:1;display:flex;flex-direction:column;gap:8px}.lsh-content-box .lsh-form-box .lsh-form-top[data-v-4e58c0be]{display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-top .lsh-title[data-v-4e58c0be]{color:#101114;font-weight:600;line-height:22px}.lsh-content-box .lsh-form-box .lsh-form-bottom[data-v-4e58c0be]{flex:1;border-radius:10px;border:1px solid #d9d9d9;padding:12px;color:#101114;line-height:22px;background:#fff;display:flex;flex-direction:column;overflow:hidden}.lsh-content-box .lsh-form-box .lsh-form-bottom.gray[data-v-4e58c0be]{background:#f1f2f5}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-tip[data-v-4e58c0be]{color:#797b80;font-size:12px;line-height:20px;display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-result-box[data-v-4e58c0be]{flex:1;overflow:auto}.lsh-ai-modal{position:relative;overflow:hidden}.lsh-ai-modal:before{position:absolute;top:0;left:0;width:100%;height:120px;content:"";z-index:0;pointer-events:none;background:radial-gradient(53.22% 165.47% at 52.17% -65.47%,#0038ff14,#0038ff00),radial-gradient(51.16% 163.6% at 85.6% -63.59%,#ff642214,#ff642200),radial-gradient(102.93% 140.61% at 7.43% -30.94%,#00d09e14,#00d09e00),linear-gradient(180deg,#fafbfc 47.89%,#fafbfccc,#fafbfc00)}.lsh-ai-modal .el-dialog__header,.lsh-ai-modal .el-dialog__body,.lsh-ai-modal .el-dialog__footer{position:relative;z-index:1}.lsh-ai-modal .el-dialog__header .el-dialog__headerbtn{right:-2px!important}.rect-btn[data-v-eb6e2e70]{display:flex;width:40px;height:36px;padding:0 12px;justify-content:center;align-items:center;flex-shrink:0;border-radius:10px;background:#f1f2f5;border:1px solid #f1f2f5;cursor:pointer;-webkit-user-select:none;user-select:none}.rect-btn.active[data-v-eb6e2e70],.rect-btn[data-v-eb6e2e70]:hover{border-color:#0d1839}.lsh-header-content[data-v-eb6e2e70]{position:relative}.lsh-header-content .lsh-title[data-v-eb6e2e70]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-header-content .lsh-radio-group[data-v-eb6e2e70]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:185px}.lsh-content-box[data-v-eb6e2e70]{height:444px;display:flex;flex-direction:column}.lsh-content-box .lsh-label[data-v-eb6e2e70]{color:#101114;font-size:14px;font-weight:600;line-height:22px;margin-bottom:8px}.lsh-content-box .lsh-text-box[data-v-eb6e2e70]{height:44px;padding:5px 12px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:16px;border:1px solid #d9d9d9;background:#f1f2f5;color:#101114;font-size:18px;font-weight:600;line-height:26px;width:100%;text-align:center}.lsh-content-box .lsh-polyphonic-box[data-v-eb6e2e70]{margin-top:16px;flex:1}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-list[data-v-eb6e2e70]{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow:auto}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-item[data-v-eb6e2e70]{display:flex;align-items:flex-start;gap:8px}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-char[data-v-eb6e2e70]{display:flex;align-items:center;justify-content:center;width:36px;height:32px;flex-shrink:0;border-radius:10px;background:#f1f2f5;color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-options[data-v-eb6e2e70]{display:flex;flex-wrap:wrap;gap:8px}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-option[data-v-eb6e2e70]{height:32px;padding:4px 12px;border-radius:10px;border:1px solid #d9d9d9;background:#fff;color:#101114;font-size:14px;line-height:22px;cursor:pointer;-webkit-user-select:none;user-select:none}.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-option.active[data-v-eb6e2e70],.lsh-content-box .lsh-polyphonic-box .lsh-polyphonic-option[data-v-eb6e2e70]:hover{border-color:#0d1839}.lsh-content-box .lsh-options-box[data-v-eb6e2e70]{margin-top:16px;display:flex;gap:16px}.lsh-content-box .lsh-options-box .lsh-options[data-v-eb6e2e70]{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:16px;border:1px solid #d9d9d9;background:#fff}.lsh-content-box .lsh-options-box .lsh-initials[data-v-eb6e2e70]{display:flex;flex-wrap:wrap;gap:4px}.lsh-content-box .lsh-options-box .lsh-initials .lsh-initial-btn[data-v-eb6e2e70]{display:flex;width:40px;height:36px;padding:0 12px;justify-content:center;align-items:center;flex-shrink:0;border-radius:10px;background:#f1f2f5;border:1px solid #f1f2f5;cursor:pointer;-webkit-user-select:none;user-select:none}.lsh-content-box .lsh-options-box .lsh-initials .lsh-initial-btn.active[data-v-eb6e2e70],.lsh-content-box .lsh-options-box .lsh-initials .lsh-initial-btn[data-v-eb6e2e70]:hover{border-color:#0d1839}.lsh-content-box .lsh-options-box .lsh-radio-group-white[data-v-eb6e2e70]{border-radius:14px;padding:4px;gap:4px;height:44px}.lsh-content-box .lsh-options-box .lsh-radio-group-white[data-v-eb6e2e70] .cx-radio{border-radius:10px}.lsh-content-box .lsh-options-box .lsh-radio-group-white[data-v-eb6e2e70] .cx-radio.cx-radio-selected{font-weight:400}.lsh-content-box .lsh-options-box .lsh-final-box[data-v-eb6e2e70]{display:flex;flex-direction:column;gap:8px;padding:8px;border-radius:14px;background:#f1f2f5}.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list[data-v-eb6e2e70]{display:flex;flex-wrap:wrap;gap:4px}.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list .lsh-final-item[data-v-eb6e2e70]{display:flex;width:40px;height:36px;padding:0 12px;justify-content:center;align-items:center;flex-shrink:0;border-radius:10px;background:#f1f2f5;border:1px solid #f1f2f5;cursor:pointer;-webkit-user-select:none;user-select:none;background:#fff;box-shadow:0 1px 4px #0000001a}.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list .lsh-final-item.active[data-v-eb6e2e70],.lsh-content-box .lsh-options-box .lsh-final-box .lsh-final-list .lsh-final-item[data-v-eb6e2e70]:hover{border-color:#0d1839}.lsh-content-box .lsh-manual-text-box[data-v-eb6e2e70]{margin-top:16px}.lsh-content-box .lsh-manual-text-box .lsh-manual-text-list[data-v-eb6e2e70]{display:flex;gap:8px}.lsh-content-box .lsh-manual-text-box .lsh-manual-text-item[data-v-eb6e2e70]{display:flex;min-width:64px;height:52px;padding:4px 12px;flex-direction:column;align-items:center;justify-content:center;border-radius:10px;border:1px solid #d9d9d9;background:#fff;font-size:16px;cursor:pointer}.lsh-content-box .lsh-manual-text-box .lsh-manual-text-item.active[data-v-eb6e2e70],.lsh-content-box .lsh-manual-text-box .lsh-manual-text-item[data-v-eb6e2e70]:hover{border-color:#0d1839}.lsh-content-box .lsh-manual-text-box .lsh-manual-pinyin[data-v-eb6e2e70]{color:#666;font-size:12px;line-height:18px}.lsh-header-content[data-v-a2a3927f]{width:calc(100% - 52px);display:flex;flex-direction:column;gap:4px}.lsh-header-content .lsh-title[data-v-a2a3927f]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-header-content .lsh-tip[data-v-a2a3927f]{color:#797b80;font-size:14px;font-weight:400;line-height:22px}.lsh-content-box[data-v-a2a3927f]{display:flex;flex-direction:column;gap:24px;padding-bottom:44px}.lsh-content-box .lsh-form-item-label[data-v-a2a3927f]{color:#101114;font-size:14px;font-weight:600;line-height:22px;margin-bottom:8px}.lsh-modal-header{height:fit-content!important}.lsh-language-list[data-v-931bb88d]{display:flex;align-items:center;gap:8px;padding:12px;width:264px;flex-wrap:wrap}.lsh-language-list .el-button[data-v-931bb88d]{width:116px}.lsh-number-list[data-v-9fa42093]{display:flex;gap:8px;padding:12px;width:272px;flex-direction:column;align-items:start;overflow:hidden}.lsh-number-list .el-button[data-v-9fa42093]{width:100%;justify-content:flex-start}.lsh-number-label[data-v-9fa42093]{flex-shrink:0}.lsh-lock-tip[data-v-f4de8d78]{display:flex;align-items:center;gap:4px;padding:8px 12px;border-top:1px solid #f1f2f5;color:#8a8f99;font-size:12px;line-height:18px}.lsh-lock-tip .lsh-lock-tip-icon[data-v-f4de8d78]{flex-shrink:0}.lsh-stop-box[data-v-8411a495]{display:flex;flex-direction:column}.lsh-stop-list[data-v-8411a495]{display:flex;align-items:center;gap:8px;padding:12px}.lsh-stop-input[data-v-8411a495]{outline:none;border:none;color:#101114;line-height:22px;border-bottom:1px solid #101114;background:transparent;width:42px;height:22px;margin:0 4px}.lsh-stop-input[data-v-8411a495]::placeholder{color:#797b80}.lsh-stop-input[data-v-8411a495]:focus{border-color:#0057ff}.lsh-stop-input[data-v-8411a495] .el-input .el-input__wrapper{box-shadow:none;padding:0;background:transparent}.lsh-content-box[data-v-0b25e8fe]{display:flex;flex-direction:column;gap:24px;padding-bottom:44px}.lsh-content-box .lsh-title[data-v-0b25e8fe]{color:#101114;font-size:14px;font-weight:600;line-height:22px;margin-bottom:4px}.lsh-content-box .lsh-tip-text[data-v-0b25e8fe]{color:#797b80;font-size:14px;font-weight:400;line-height:175%}.word-upload-modal .el-overlay-dialog .el-dialog{overflow:hidden;height:600px;display:flex;flex-direction:column}.word-upload-modal .el-overlay-dialog .el-dialog .el-dialog__body{flex:1}.lsh-toolbar-box[data-v-f852e530]{position:relative;flex:1;min-width:0;display:flex;align-items:center;gap:8px;overflow:hidden}.lsh-toolbar-box .lsh-tool-btn[data-v-f852e530]{height:30px;flex-shrink:0;display:flex;align-items:center;padding:4px 8px;border-radius:6px;border:none;white-space:nowrap}.lsh-toolbar-box .lsh-tool-btn.is-locked[data-v-f852e530],.lsh-toolbar-box .lsh-tool-btn.is-locked[data-v-f852e530]:hover,.lsh-toolbar-box .lsh-tool-btn.is-locked[data-v-f852e530]:focus{background:#e6eeff;color:#0057ff;box-shadow:inset 0 0 0 1px #0057ff}.lsh-toolbar-box .lsh-tool-btn.is-pressing[data-v-f852e530]:not(.is-locked){background:#f1f2f5}.lsh-toolbar-measure[data-v-f852e530]{position:absolute;top:0;left:0;z-index:-1;display:flex;gap:8px;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.lsh-more-list[data-v-f852e530]{display:flex;min-width:140px;padding:4px;flex-direction:column;gap:2px}.lsh-more-list .lsh-more-item[data-v-f852e530]{width:100%;justify-content:flex-start;padding:8px 10px;border:none;border-radius:6px}.lsh-more-list .lsh-more-item.is-locked[data-v-f852e530]{background:#e6eeff;color:#0057ff}.el-popper.lsh-popper{width:fit-content!important;padding:0}.tts-rich-text-editor[data-v-387eca76]{box-sizing:border-box;display:flex;width:100%;max-width:100%;min-width:0;height:266px;min-height:220px;padding:0 8px 8px;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;color:#101114;font-family:PingFang SC,Microsoft YaHei,Arial,sans-serif}.tts-rich-text-editor.is-fullscreen[data-v-387eca76]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;height:100vh;padding:16px;background:#f5f6f8}.tts-rich-text-editor.is-disabled .lsh-editor-box[data-v-387eca76]{background:#f7f8fa}.tts-rich-text-editor.is-disabled .lsh-top[data-v-387eca76],.tts-rich-text-editor.is-disabled .lsh-middle[data-v-387eca76],.tts-rich-text-editor.is-disabled .lsh-bottom[data-v-387eca76]{opacity:.7}.tts-rich-text-editor .lsh-editor-box[data-v-387eca76]{position:relative;display:flex;width:100%;min-width:0;height:100%;flex-direction:column;overflow:hidden;border:1px solid #d9d9d9;border-radius:24px;background:#fff;transition:box-shadow .3s}.tts-rich-text-editor .lsh-editor-box[data-v-387eca76]:hover,.tts-rich-text-editor .lsh-editor-box[data-v-387eca76]:focus-within{border-color:#0057ff}.tts-rich-text-editor .lsh-editor-box[data-v-387eca76]:focus-within{box-shadow:0 8px 16px #0057ff33}.tts-rich-text-editor .lsh-top[data-v-387eca76]{display:flex;height:46px;padding:8px 16px;align-items:center;gap:8px;flex-shrink:0;border-bottom:1px solid #eaecf2}.tts-rich-text-editor .lsh-fullscreen-btn[data-v-387eca76]{display:flex;width:30px;height:30px;padding:0;align-items:center;justify-content:center;flex-shrink:0;border:0;border-radius:6px;background:transparent;color:#101114;cursor:pointer}.tts-rich-text-editor .lsh-fullscreen-btn[data-v-387eca76]:hover{background:#f1f2f5}.tts-rich-text-editor .lsh-middle[data-v-387eca76]{flex:1;min-height:0;padding:12px 16px 0;overflow:hidden}.tts-rich-text-editor .lsh-middle .editor-shell[data-v-387eca76]{height:100%;overflow:auto}.tts-rich-text-editor .lsh-bottom[data-v-387eca76]{display:flex;min-height:46px;min-width:0;align-items:center;justify-content:flex-end;flex-shrink:0}@media (max-width: 640px){.tts-rich-text-editor[data-v-387eca76]{padding:0}.tts-rich-text-editor .lsh-editor-box[data-v-387eca76]{border-radius:12px}.tts-rich-text-editor .lsh-top[data-v-387eca76]{padding:8px}}
|
|
@@ -60,6 +60,50 @@ declare const __VLS_component: import('vue').DefineComponent<TtsEditorRootProps,
|
|
|
60
60
|
replaceContentWithText: (text: string) => void;
|
|
61
61
|
textLength: import('vue').ComputedRef<number>;
|
|
62
62
|
voiceVersion: import('vue').Ref<number, number>;
|
|
63
|
+
lockedTool: import('vue').Ref<import('../../core').CustomTagType | null, import('../../core').CustomTagType | null>;
|
|
64
|
+
lockParams: import('vue').Ref<{
|
|
65
|
+
replace?: Record<string, string | number> | undefined;
|
|
66
|
+
stop?: Record<string, string | number> | undefined;
|
|
67
|
+
ignore?: Record<string, string | number> | undefined;
|
|
68
|
+
customStop?: Record<string, string | number> | undefined;
|
|
69
|
+
continue?: Record<string, string | number> | undefined;
|
|
70
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
71
|
+
language?: Record<string, string | number> | undefined;
|
|
72
|
+
}, Partial<Record<import('../../core').CustomTagType, Record<string, string | number>>> | {
|
|
73
|
+
replace?: Record<string, string | number> | undefined;
|
|
74
|
+
stop?: Record<string, string | number> | undefined;
|
|
75
|
+
ignore?: Record<string, string | number> | undefined;
|
|
76
|
+
customStop?: Record<string, string | number> | undefined;
|
|
77
|
+
continue?: Record<string, string | number> | undefined;
|
|
78
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
79
|
+
language?: Record<string, string | number> | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
toggleLockTool: (type: import('../../core').CustomTagType) => boolean;
|
|
82
|
+
unlockTool: () => void;
|
|
83
|
+
isToolLocked: (type: import('../../core').CustomTagType) => boolean;
|
|
84
|
+
rememberToolParams: (type: import('../../core').CustomTagType, payload: Record<string, string | number>) => void;
|
|
85
|
+
getLockedPayload: (type: import('../../core').CustomTagType) => Record<string, string | number>;
|
|
86
|
+
contextMenu: {
|
|
87
|
+
visible: boolean;
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
hasSelection: boolean;
|
|
91
|
+
};
|
|
92
|
+
closeContextMenu: () => void;
|
|
93
|
+
toolModalOpeners: import('vue').Ref<{
|
|
94
|
+
pinyin: (text: string) => void;
|
|
95
|
+
replace: (text: string) => void;
|
|
96
|
+
formula: (text: string) => void;
|
|
97
|
+
aiRewrite: () => void;
|
|
98
|
+
upload: () => void;
|
|
99
|
+
} | null, import('../../editor').ToolModalOpeners | {
|
|
100
|
+
pinyin: (text: string) => void;
|
|
101
|
+
replace: (text: string) => void;
|
|
102
|
+
formula: (text: string) => void;
|
|
103
|
+
aiRewrite: () => void;
|
|
104
|
+
upload: () => void;
|
|
105
|
+
} | null>;
|
|
106
|
+
registerToolModalOpeners: (openers: import('../../editor').ToolModalOpeners) => void;
|
|
63
107
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
64
108
|
change: () => any;
|
|
65
109
|
ready: (editor: import('@tiptap/core').Editor) => any;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ToolMenuItem } from '../editor';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
visible?: boolean;
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
hasSelection?: boolean;
|
|
7
|
+
items?: ToolMenuItem[];
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
|
+
select: (payload: {
|
|
11
|
+
key: string;
|
|
12
|
+
value?: string | number;
|
|
13
|
+
}) => any;
|
|
14
|
+
close: () => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onSelect?: ((payload: {
|
|
17
|
+
key: string;
|
|
18
|
+
value?: string | number;
|
|
19
|
+
}) => any) | undefined;
|
|
20
|
+
onClose?: (() => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
visible: boolean;
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
hasSelection: boolean;
|
|
26
|
+
items: ToolMenuItem[];
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
28
|
+
panelRef: HTMLDivElement;
|
|
29
|
+
}, any>;
|
|
30
|
+
export default _default;
|
|
@@ -3,16 +3,27 @@ type __VLS_Props = {
|
|
|
3
3
|
item: ToolButtonItem;
|
|
4
4
|
plain?: boolean;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
+
/** 该按钮是否支持长按锁定(光标插入类标签) */
|
|
7
|
+
lockable?: boolean;
|
|
8
|
+
/** 是否处于锁定态 */
|
|
9
|
+
locked?: boolean;
|
|
10
|
+
/** 锁定后展示的参数文案,例如「0.5 秒」「挥手致意」 */
|
|
11
|
+
lockLabel?: string;
|
|
6
12
|
};
|
|
7
13
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
8
14
|
getVirtualRef: () => HTMLElement | undefined;
|
|
9
15
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
10
16
|
click: () => any;
|
|
17
|
+
longpress: () => any;
|
|
11
18
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
19
|
onClick?: (() => any) | undefined;
|
|
20
|
+
onLongpress?: (() => any) | undefined;
|
|
13
21
|
}>, {
|
|
14
22
|
disabled: boolean;
|
|
15
23
|
plain: boolean;
|
|
24
|
+
lockable: boolean;
|
|
25
|
+
locked: boolean;
|
|
26
|
+
lockLabel: string;
|
|
16
27
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
28
|
buttonRef: ({
|
|
18
29
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** 弹层里的锁定用法提示,仅在可长按锁定的标签弹层中使用 */
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
label: string;
|
|
4
|
+
locked?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
locked: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
9
|
+
export default _default;
|
|
@@ -6,3 +6,40 @@ export interface Playment {
|
|
|
6
6
|
position?: number;
|
|
7
7
|
text?: string;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* 选中文本浮层 / 右键面板里的一项标记工具。
|
|
11
|
+
* 三处入口(工具栏弹层、选中浮层、右键面板)共用同一份数据结构。
|
|
12
|
+
*/
|
|
13
|
+
export interface ToolMenuItem {
|
|
14
|
+
/** 对应 ToolConfig 的 type */
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
/** 需要二次选择的参数项,例如停顿时长、语气类型 */
|
|
19
|
+
options?: {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string | number;
|
|
22
|
+
}[];
|
|
23
|
+
/** 当前能力矩阵下不开放时,入口直接不渲染 */
|
|
24
|
+
hidden?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 参数型标签的弹窗入口。
|
|
28
|
+
* 弹窗组件本身由工具栏渲染,其余入口(选中浮层 / 右键面板)通过它把「打开」这个动作转发过来,
|
|
29
|
+
* 保证同一时刻只有一份弹窗实例。
|
|
30
|
+
*/
|
|
31
|
+
export interface ToolModalOpeners {
|
|
32
|
+
pinyin: (text: string) => void;
|
|
33
|
+
replace: (text: string) => void;
|
|
34
|
+
formula: (text: string) => void;
|
|
35
|
+
aiRewrite: () => void;
|
|
36
|
+
upload: () => void;
|
|
37
|
+
}
|
|
38
|
+
/** 右键常用标记面板的位置与形态 */
|
|
39
|
+
export interface EditorContextMenuState {
|
|
40
|
+
visible: boolean;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
/** 右键落点在已有选区内时为 true,此时面板给「包裹类」标记 */
|
|
44
|
+
hasSelection: boolean;
|
|
45
|
+
}
|
|
@@ -17,7 +17,7 @@ type UseEditorToolbarOptions = {
|
|
|
17
17
|
upload: () => void;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
export declare const useEditorToolbar: ({ editorContext, openModal
|
|
20
|
+
export declare const useEditorToolbar: ({ editorContext, openModal }: UseEditorToolbarOptions) => {
|
|
21
21
|
toolList: ComputedRef<ToolbarItem[]>;
|
|
22
22
|
languageOptions: ComputedRef<readonly import('../../../type').LanguageOption[]>;
|
|
23
23
|
numberToTextList: ComputedRef<{
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { TtsToolType } from '../../../type';
|
|
2
|
+
import { CustomTagType } from '../../../core';
|
|
3
|
+
import { ToolMenuItem } from './type';
|
|
4
|
+
/**
|
|
5
|
+
* 标签工具的共享入口。
|
|
6
|
+
*
|
|
7
|
+
* 工具栏弹层、选中文本浮层、右键面板三处都从这里取清单、走同一个 `runTool` 执行,
|
|
8
|
+
* 保证同一份工具清单、同一套校验(能力矩阵 + 服务可用性)和同一个执行结果。
|
|
9
|
+
*/
|
|
10
|
+
export declare const useEditorToolkit: () => {
|
|
11
|
+
editorContext: {
|
|
12
|
+
editor: import('vue').ShallowRef<import('@tiptap/vue-3').Editor | undefined, import('@tiptap/vue-3').Editor | undefined>;
|
|
13
|
+
driveMode: import('vue').Ref<import('../constants').DriveModeEnum, import('../constants').DriveModeEnum>;
|
|
14
|
+
insertToken: (data: {
|
|
15
|
+
categ: CustomTagType;
|
|
16
|
+
payload: Record<string, any>;
|
|
17
|
+
}) => void;
|
|
18
|
+
insertWrappedToken: (data: {
|
|
19
|
+
categ: CustomTagType;
|
|
20
|
+
payload: Record<string, any>;
|
|
21
|
+
}) => void;
|
|
22
|
+
clearContent: () => void;
|
|
23
|
+
setContent: (content: import('@tiptap/core').JSONContent) => void;
|
|
24
|
+
getSelectedText: () => string;
|
|
25
|
+
getSelectedJson: () => import('@tiptap/core').JSONContent | null;
|
|
26
|
+
selectedText: import('vue').Ref<string, string>;
|
|
27
|
+
hasSelectedText: import('vue').ComputedRef<boolean>;
|
|
28
|
+
isSelectedPureNumber: import('vue').ComputedRef<boolean>;
|
|
29
|
+
textLimitLength: number;
|
|
30
|
+
getGenerateAudioParams: () => {
|
|
31
|
+
pitch?: number;
|
|
32
|
+
speed?: number;
|
|
33
|
+
timberId?: string;
|
|
34
|
+
volume?: number;
|
|
35
|
+
};
|
|
36
|
+
getPlaybackSpeed: () => number;
|
|
37
|
+
services: import('vue').Ref<import('../../../type').TtsRichTextServices, import('../../../type').TtsRichTextServices>;
|
|
38
|
+
features: import('vue').Ref<import('../../../type').TtsEditorFeatures, import('../../../type').TtsEditorFeatures>;
|
|
39
|
+
notify: (type: import('../../../type').NotificationType, message: string) => void;
|
|
40
|
+
getReferencedVirtualElement: () => {
|
|
41
|
+
getBoundingClientRect(): {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
left: number;
|
|
45
|
+
top: number;
|
|
46
|
+
right: number;
|
|
47
|
+
bottom: number;
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
};
|
|
51
|
+
} | null;
|
|
52
|
+
replaceContentWithText: (text: string) => void;
|
|
53
|
+
textLength: import('vue').ComputedRef<number>;
|
|
54
|
+
voiceVersion: import('vue').Ref<number, number>;
|
|
55
|
+
lockedTool: import('vue').Ref<CustomTagType | null, CustomTagType | null>;
|
|
56
|
+
lockParams: import('vue').Ref<{
|
|
57
|
+
replace?: Record<string, string | number> | undefined;
|
|
58
|
+
stop?: Record<string, string | number> | undefined;
|
|
59
|
+
ignore?: Record<string, string | number> | undefined;
|
|
60
|
+
customStop?: Record<string, string | number> | undefined;
|
|
61
|
+
continue?: Record<string, string | number> | undefined;
|
|
62
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
63
|
+
language?: Record<string, string | number> | undefined;
|
|
64
|
+
}, Partial<Record<CustomTagType, Record<string, string | number>>> | {
|
|
65
|
+
replace?: Record<string, string | number> | undefined;
|
|
66
|
+
stop?: Record<string, string | number> | undefined;
|
|
67
|
+
ignore?: Record<string, string | number> | undefined;
|
|
68
|
+
customStop?: Record<string, string | number> | undefined;
|
|
69
|
+
continue?: Record<string, string | number> | undefined;
|
|
70
|
+
pinyin?: Record<string, string | number> | undefined;
|
|
71
|
+
language?: Record<string, string | number> | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
toggleLockTool: (type: CustomTagType) => boolean;
|
|
74
|
+
unlockTool: () => void;
|
|
75
|
+
isToolLocked: (type: CustomTagType) => boolean;
|
|
76
|
+
rememberToolParams: (type: CustomTagType, payload: Record<string, string | number>) => void;
|
|
77
|
+
getLockedPayload: (type: CustomTagType) => Record<string, string | number>;
|
|
78
|
+
contextMenu: {
|
|
79
|
+
visible: boolean;
|
|
80
|
+
x: number;
|
|
81
|
+
y: number;
|
|
82
|
+
hasSelection: boolean;
|
|
83
|
+
};
|
|
84
|
+
closeContextMenu: () => void;
|
|
85
|
+
toolModalOpeners: import('vue').Ref<{
|
|
86
|
+
pinyin: (text: string) => void;
|
|
87
|
+
replace: (text: string) => void;
|
|
88
|
+
formula: (text: string) => void;
|
|
89
|
+
aiRewrite: () => void;
|
|
90
|
+
upload: () => void;
|
|
91
|
+
} | null, import('./type').ToolModalOpeners | {
|
|
92
|
+
pinyin: (text: string) => void;
|
|
93
|
+
replace: (text: string) => void;
|
|
94
|
+
formula: (text: string) => void;
|
|
95
|
+
aiRewrite: () => void;
|
|
96
|
+
upload: () => void;
|
|
97
|
+
} | null>;
|
|
98
|
+
registerToolModalOpeners: (openers: import('./type').ToolModalOpeners) => void;
|
|
99
|
+
};
|
|
100
|
+
toolList: import('vue').ComputedRef<import('./useEditorToolbar').ToolbarItem[]>;
|
|
101
|
+
languageOptions: import('vue').ComputedRef<readonly import('../../../type').LanguageOption[]>;
|
|
102
|
+
numberToTextList: import('vue').ComputedRef<{
|
|
103
|
+
label: string;
|
|
104
|
+
value: string;
|
|
105
|
+
}[]>;
|
|
106
|
+
isToolDisabled: (toolItem: import('./useEditorToolbar').ToolbarItem) => boolean;
|
|
107
|
+
insertItems: import('vue').ComputedRef<ToolMenuItem[]>;
|
|
108
|
+
selectionItems: import('vue').ComputedRef<ToolMenuItem[]>;
|
|
109
|
+
runTool: (key: string, value?: string | number) => boolean;
|
|
110
|
+
replaceText: (text: string) => void;
|
|
111
|
+
markPinyin: (text: string) => void;
|
|
112
|
+
};
|
|
113
|
+
/** 供上层做工具类型收敛 */
|
|
114
|
+
export type EditorToolkit = ReturnType<typeof useEditorToolkit>;
|
|
115
|
+
export type { TtsToolType };
|
|
@@ -9,5 +9,7 @@ type UseOverflowToolbarOptions<T> = {
|
|
|
9
9
|
export declare const useOverflowToolbar: <T>({ list, toolbarRef, measureRef, itemSelector, gap }: UseOverflowToolbarOptions<T>) => {
|
|
10
10
|
visibleList: import('vue').ComputedRef<T[]>;
|
|
11
11
|
hiddenList: import('vue').ComputedRef<T[]>;
|
|
12
|
+
/** 按钮宽度发生变化(如进入锁定态多出一个锁图标)时手动触发重新测量 */
|
|
13
|
+
refresh: () => void;
|
|
12
14
|
};
|
|
13
15
|
export {};
|