@naersen/tts-rich-text 0.10.4 → 0.11.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 +13 -0
- package/README.md +20 -1
- package/dist/base.css +1 -1
- package/dist/components/tts-editor-root/index.vue.d.ts +2 -0
- package/dist/components/tts-rich-text/editor/useEditorToolkit.d.ts +1 -0
- package/dist/components/tts-rich-text/editor/useRichTextEditor.d.ts +4 -1
- package/dist/components/tts-rich-text-editor/index.vue.d.ts +12 -2
- package/dist/core/transform-data.d.ts +2 -1
- package/dist/core.js +69 -67
- package/dist/index.js +2114 -2101
- package/dist/type/index.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## 0.11.0 - 2026-11-16
|
|
6
|
+
|
|
7
|
+
### 新增
|
|
8
|
+
|
|
9
|
+
- `TtsRichTextEditor` 和 `TtsEditorRoot` 新增 `options.sentenceSplit` 配置,支持按编辑器实例设置最小段长度、超长段拆分阈值和尾段平衡比例,导出与选区试听共用当前配置。
|
|
10
|
+
- 导出 `TtsEditorOptions` 类型,`useRichTextEditor` 支持通过响应式 `editorOptions` 接收行为配置。
|
|
11
|
+
- `convertToTtsFormat(data, sentenceSplitOptions)` 支持通过第二个参数设置分句策略,独立转换与编辑器使用相同的核心分句能力。
|
|
12
|
+
|
|
13
|
+
### 升级提示
|
|
14
|
+
|
|
15
|
+
- 未传配置时继续使用默认值 `32 / 128 / 0.4`,既有调用保持兼容;配置更新在下一次导出或选区试听时生效,不修改编辑器正文。
|
|
16
|
+
- 长度仍按视觉单位计算,汉字通常计 2;`maxSegmentLength` 是拆分阈值,并非严格的输出上限。
|
|
17
|
+
|
|
5
18
|
## 0.10.4 - 2026-11-11
|
|
6
19
|
|
|
7
20
|
### 修复
|
package/README.md
CHANGED
|
@@ -203,7 +203,26 @@ const getPlaybackSpeed = () => selectedVoice.value.speed / 50
|
|
|
203
203
|
|
|
204
204
|
本组件使用普通段落,在导出 TTS 数据时执行分句。参考文档中的 96/144 阈值用于气泡创建和编辑重分,不作为本组件导出的触发条件;回车仍由编辑器创建段落。
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
项目需要自定义分句策略时,在 `TtsRichTextEditor` 或 `TtsEditorRoot` 上传入 `options.sentenceSplit`,例如将拆分阈值设为 64:
|
|
207
|
+
|
|
208
|
+
```vue
|
|
209
|
+
<tts-rich-text-editor
|
|
210
|
+
v-model="documentValue"
|
|
211
|
+
:options="{ sentenceSplit: { maxSegmentLength: 64 } }"
|
|
212
|
+
/>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
`options` 的公开类型为 `TtsEditorOptions`,按功能领域组织行为配置;`features` 继续控制工具能力,`services` 继续提供外部服务。未传字段沿用默认值。配置按编辑器实例独立生效,更新后用于下一次 `getTtsData()` 导出和选区试听,不改变编辑器正文。这里的 64 是视觉长度,约为 32 个汉字,仍是拆分阈值,并非严格的输出上限。
|
|
216
|
+
|
|
217
|
+
独立转换 TTS 数据时,也可以将同一配置作为第二个参数传入:
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import { convertToTtsFormat } from '@naersen/tts-rich-text/core'
|
|
221
|
+
|
|
222
|
+
const data = convertToTtsFormat(documentValue, { maxSegmentLength: 64 })
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
也可以直接从核心入口调用分句函数:
|
|
207
226
|
|
|
208
227
|
```ts
|
|
209
228
|
import { splitTextToSentences } from '@naersen/tts-rich-text/core'
|
package/dist/base.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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-e9476a1f]{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-e9476a1f]{display:inline-flex;align-items:center;height:20px}.icon-wrapper.tag-icon[data-v-e9476a1f]{margin-right:4px;vertical-align:-.2em}.icon-wrapper.delete-icon[data-v-e9476a1f]{margin-left:4px}.delete-btn[data-v-e9476a1f]{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:10px;color:#7d8ab2}.delete-btn[data-v-e9476a1f]: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-b988ac10]{z-index:2000;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-b988ac10]{display:flex;align-items:center;flex-wrap:wrap;gap:2px}.lsh-menu-box .lsh-menu-main .lsh-menu-item[data-v-b988ac10]{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-b988ac10]:hover{background:#f1f2f5}.lsh-menu-box .lsh-menu-main .lsh-menu-item.is-expanded[data-v-b988ac10]{background:#e6eeff;color:#0057ff}.lsh-menu-box .lsh-menu-main .lsh-menu-item .lsh-menu-caret[data-v-b988ac10]{flex-shrink:0;margin-left:2px;transition:transform .16s ease}.lsh-menu-box .lsh-menu-main .lsh-menu-item.is-expanded .lsh-menu-caret[data-v-b988ac10]{transform:rotate(180deg)}.lsh-menu-box .lsh-menu-main .lsh-menu-divider[data-v-b988ac10]{width:1px;height:16px;margin:0 4px;background:#e5e7eb}.lsh-menu-box .lsh-menu-options[data-v-b988ac10]{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-b988ac10]{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-b988ac10]: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-221758b9]{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-221758b9]{flex-shrink:0;padding:4px 8px 6px;color:#8a8f99;font-size:12px;line-height:18px}.lsh-context-menu .lsh-context-list[data-v-221758b9]{flex:1;min-height:0;overflow-y:auto}.lsh-context-menu .lsh-context-list .lsh-context-item[data-v-221758b9]{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-221758b9]:hover,.lsh-context-menu .lsh-context-list .lsh-context-item.is-expanded[data-v-221758b9]{background:#f1f2f5}.lsh-context-menu .lsh-context-list .lsh-context-item .lsh-context-label[data-v-221758b9]{flex:1;text-align:left}.lsh-context-menu .lsh-context-list .lsh-context-item .lsh-context-caret[data-v-221758b9]{flex-shrink:0;transition:transform .16s ease}.lsh-context-menu .lsh-context-list .lsh-context-item.is-expanded .lsh-context-caret[data-v-221758b9]{transform:rotate(180deg)}.lsh-context-menu .lsh-context-list .lsh-context-options[data-v-221758b9]{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-221758b9]{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-221758b9]: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-8f82963e]{color:#ea5b41}.lsh-text-btn[data-v-8f82963e]{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-8f82963e]{color:#ea5b41}.lsh-textarea[data-v-8f82963e]{resize:none;border:none;outline:none;width:100%;background:transparent}.lsh-content-box[data-v-8f82963e]{display:flex;gap:16px;height:444px}.lsh-content-box .lsh-form-box[data-v-8f82963e]{flex:1;display:flex;flex-direction:column;gap:8px}.lsh-content-box .lsh-form-box .lsh-form-top[data-v-8f82963e]{display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-top .lsh-title[data-v-8f82963e]{color:#101114;font-weight:600;line-height:22px}.lsh-content-box .lsh-form-box .lsh-form-bottom[data-v-8f82963e]{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-8f82963e]{background:#f1f2f5}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-tip[data-v-8f82963e]{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-8f82963e]{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-96ce9c5b]{width:calc(100% - 52px);display:flex;flex-direction:column;gap:4px}.lsh-header-content .lsh-title[data-v-96ce9c5b]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-header-content .lsh-tip[data-v-96ce9c5b]{color:#797b80;font-size:14px;font-weight:400;line-height:22px}.lsh-content-box[data-v-96ce9c5b]{display:flex;flex-direction:column;gap:24px;padding-bottom:44px}.lsh-content-box .lsh-form-item-label[data-v-96ce9c5b]{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-eae5983d]{display:flex;align-items:center;gap:8px;padding:12px;width:264px;flex-wrap:wrap}.lsh-language-list .el-button[data-v-eae5983d]{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-55519fd0]{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-55519fd0]{flex-shrink:0}.lsh-stop-box[data-v-94112f2f]{display:flex;flex-direction:column}.lsh-stop-list[data-v-94112f2f]{display:flex;align-items:center;gap:8px;padding:12px}.lsh-stop-list .lsh-stop-custom .lsh-stop-value[data-v-94112f2f]{width:42px;margin:0 4px;text-align:center;display:inline-block}.lsh-stop-list .lsh-stop-custom .lsh-stop-value.is-empty[data-v-94112f2f]{color:#797b80}.lsh-stop-list .lsh-stop-custom .lsh-stop-input[data-v-94112f2f]{outline:none;height:22px;width:42px;margin:0 4px;padding:0;border:none;border-bottom:1px solid #101114;background:transparent;line-height:22px;color:#101114;text-align:center}.lsh-stop-list .lsh-stop-custom .lsh-stop-input[data-v-94112f2f]:focus{border-color:#0057ff}.lsh-stop-list .lsh-stop-custom .lsh-stop-icon[data-v-94112f2f]{cursor:pointer;flex-shrink:0;margin-left:2px;padding:3px;opacity:0;color:#797b80;display:inline-flex;align-items:center}.lsh-stop-list .lsh-stop-custom .lsh-stop-icon.is-set[data-v-94112f2f]{opacity:.5}.lsh-stop-list .lsh-stop-custom .lsh-stop-icon.is-editing[data-v-94112f2f]{opacity:1;color:#0057ff}.lsh-stop-list .lsh-stop-custom:hover .lsh-stop-icon[data-v-94112f2f]{opacity:1}.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-0f82847d]{position:relative;flex:1;min-width:0;display:flex;align-items:center;gap:8px;overflow:hidden}.lsh-toolbar-box .lsh-tool-btn[data-v-0f82847d]{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-0f82847d],.lsh-toolbar-box .lsh-tool-btn.is-locked[data-v-0f82847d]:hover,.lsh-toolbar-box .lsh-tool-btn.is-locked[data-v-0f82847d]:focus{background:#e6eeff;color:#0057ff;box-shadow:inset 0 0 0 1px #0057ff}.lsh-toolbar-box .lsh-tool-btn.is-pressing[data-v-0f82847d]:not(.is-locked){background:#f1f2f5}.lsh-toolbar-measure[data-v-0f82847d]{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-0f82847d]{display:flex;min-width:140px;padding:4px;flex-direction:column;gap:2px}.lsh-more-list .lsh-more-item[data-v-0f82847d]{width:100%;justify-content:flex-start;padding:8px 10px;border:none;border-radius:6px}.lsh-more-list .lsh-more-item.is-locked[data-v-0f82847d]{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}}
|
|
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-e9476a1f]{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-e9476a1f]{display:inline-flex;align-items:center;height:20px}.icon-wrapper.tag-icon[data-v-e9476a1f]{margin-right:4px;vertical-align:-.2em}.icon-wrapper.delete-icon[data-v-e9476a1f]{margin-left:4px}.delete-btn[data-v-e9476a1f]{cursor:pointer;-webkit-user-select:none;user-select:none;font-size:10px;color:#7d8ab2}.delete-btn[data-v-e9476a1f]: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-17e26b0a]{z-index:2000;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-17e26b0a]{display:flex;align-items:center;flex-wrap:wrap;gap:2px}.lsh-menu-box .lsh-menu-main .lsh-menu-item[data-v-17e26b0a]{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-17e26b0a]:hover{background:#f1f2f5}.lsh-menu-box .lsh-menu-main .lsh-menu-item.is-expanded[data-v-17e26b0a]{background:#e6eeff;color:#0057ff}.lsh-menu-box .lsh-menu-main .lsh-menu-item .lsh-menu-caret[data-v-17e26b0a]{flex-shrink:0;margin-left:2px;transition:transform .16s ease}.lsh-menu-box .lsh-menu-main .lsh-menu-item.is-expanded .lsh-menu-caret[data-v-17e26b0a]{transform:rotate(180deg)}.lsh-menu-box .lsh-menu-main .lsh-menu-divider[data-v-17e26b0a]{width:1px;height:16px;margin:0 4px;background:#e5e7eb}.lsh-menu-box .lsh-menu-options[data-v-17e26b0a]{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-17e26b0a]{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-17e26b0a]: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-221758b9]{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-221758b9]{flex-shrink:0;padding:4px 8px 6px;color:#8a8f99;font-size:12px;line-height:18px}.lsh-context-menu .lsh-context-list[data-v-221758b9]{flex:1;min-height:0;overflow-y:auto}.lsh-context-menu .lsh-context-list .lsh-context-item[data-v-221758b9]{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-221758b9]:hover,.lsh-context-menu .lsh-context-list .lsh-context-item.is-expanded[data-v-221758b9]{background:#f1f2f5}.lsh-context-menu .lsh-context-list .lsh-context-item .lsh-context-label[data-v-221758b9]{flex:1;text-align:left}.lsh-context-menu .lsh-context-list .lsh-context-item .lsh-context-caret[data-v-221758b9]{flex-shrink:0;transition:transform .16s ease}.lsh-context-menu .lsh-context-list .lsh-context-item.is-expanded .lsh-context-caret[data-v-221758b9]{transform:rotate(180deg)}.lsh-context-menu .lsh-context-list .lsh-context-options[data-v-221758b9]{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-221758b9]{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-221758b9]: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-8f82963e]{color:#ea5b41}.lsh-text-btn[data-v-8f82963e]{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-8f82963e]{color:#ea5b41}.lsh-textarea[data-v-8f82963e]{resize:none;border:none;outline:none;width:100%;background:transparent}.lsh-content-box[data-v-8f82963e]{display:flex;gap:16px;height:444px}.lsh-content-box .lsh-form-box[data-v-8f82963e]{flex:1;display:flex;flex-direction:column;gap:8px}.lsh-content-box .lsh-form-box .lsh-form-top[data-v-8f82963e]{display:flex;align-items:center;justify-content:space-between}.lsh-content-box .lsh-form-box .lsh-form-top .lsh-title[data-v-8f82963e]{color:#101114;font-weight:600;line-height:22px}.lsh-content-box .lsh-form-box .lsh-form-bottom[data-v-8f82963e]{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-8f82963e]{background:#f1f2f5}.lsh-content-box .lsh-form-box .lsh-form-bottom .lsh-tip[data-v-8f82963e]{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-8f82963e]{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-96ce9c5b]{width:calc(100% - 52px);display:flex;flex-direction:column;gap:4px}.lsh-header-content .lsh-title[data-v-96ce9c5b]{color:#101114;font-size:16px;font-weight:600;line-height:24px}.lsh-header-content .lsh-tip[data-v-96ce9c5b]{color:#797b80;font-size:14px;font-weight:400;line-height:22px}.lsh-content-box[data-v-96ce9c5b]{display:flex;flex-direction:column;gap:24px;padding-bottom:44px}.lsh-content-box .lsh-form-item-label[data-v-96ce9c5b]{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-eae5983d]{display:flex;align-items:center;gap:8px;padding:12px;width:264px;flex-wrap:wrap}.lsh-language-list .el-button[data-v-eae5983d]{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-55519fd0]{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-55519fd0]{flex-shrink:0}.lsh-stop-box[data-v-94112f2f]{display:flex;flex-direction:column}.lsh-stop-list[data-v-94112f2f]{display:flex;align-items:center;gap:8px;padding:12px}.lsh-stop-list .lsh-stop-custom .lsh-stop-value[data-v-94112f2f]{width:42px;margin:0 4px;text-align:center;display:inline-block}.lsh-stop-list .lsh-stop-custom .lsh-stop-value.is-empty[data-v-94112f2f]{color:#797b80}.lsh-stop-list .lsh-stop-custom .lsh-stop-input[data-v-94112f2f]{outline:none;height:22px;width:42px;margin:0 4px;padding:0;border:none;border-bottom:1px solid #101114;background:transparent;line-height:22px;color:#101114;text-align:center}.lsh-stop-list .lsh-stop-custom .lsh-stop-input[data-v-94112f2f]:focus{border-color:#0057ff}.lsh-stop-list .lsh-stop-custom .lsh-stop-icon[data-v-94112f2f]{cursor:pointer;flex-shrink:0;margin-left:2px;padding:3px;opacity:0;color:#797b80;display:inline-flex;align-items:center}.lsh-stop-list .lsh-stop-custom .lsh-stop-icon.is-set[data-v-94112f2f]{opacity:.5}.lsh-stop-list .lsh-stop-custom .lsh-stop-icon.is-editing[data-v-94112f2f]{opacity:1;color:#0057ff}.lsh-stop-list .lsh-stop-custom:hover .lsh-stop-icon[data-v-94112f2f]{opacity:1}.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-0f82847d]{position:relative;flex:1;min-width:0;display:flex;align-items:center;gap:8px;overflow:hidden}.lsh-toolbar-box .lsh-tool-btn[data-v-0f82847d]{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-0f82847d],.lsh-toolbar-box .lsh-tool-btn.is-locked[data-v-0f82847d]:hover,.lsh-toolbar-box .lsh-tool-btn.is-locked[data-v-0f82847d]:focus{background:#e6eeff;color:#0057ff;box-shadow:inset 0 0 0 1px #0057ff}.lsh-toolbar-box .lsh-tool-btn.is-pressing[data-v-0f82847d]:not(.is-locked){background:#f1f2f5}.lsh-toolbar-measure[data-v-0f82847d]{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-0f82847d]{display:flex;min-width:140px;padding:4px;flex-direction:column;gap:2px}.lsh-more-list .lsh-more-item[data-v-0f82847d]{width:100%;justify-content:flex-start;padding:8px 10px;border:none;border-radius:6px}.lsh-more-list .lsh-more-item.is-locked[data-v-0f82847d]{background:#e6eeff;color:#0057ff}.el-popper.lsh-popper{width:fit-content!important;padding:0}.tts-rich-text-editor[data-v-c3cd5642]{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-c3cd5642]{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-c3cd5642]{background:#f7f8fa}.tts-rich-text-editor.is-disabled .lsh-top[data-v-c3cd5642],.tts-rich-text-editor.is-disabled .lsh-middle[data-v-c3cd5642],.tts-rich-text-editor.is-disabled .lsh-bottom[data-v-c3cd5642]{opacity:.7}.tts-rich-text-editor .lsh-editor-box[data-v-c3cd5642]{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-c3cd5642]:hover,.tts-rich-text-editor .lsh-editor-box[data-v-c3cd5642]:focus-within{border-color:#0057ff}.tts-rich-text-editor .lsh-editor-box[data-v-c3cd5642]:focus-within{box-shadow:0 8px 16px #0057ff33}.tts-rich-text-editor .lsh-top[data-v-c3cd5642]{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-c3cd5642]{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-c3cd5642]:hover{background:#f1f2f5}.tts-rich-text-editor .lsh-middle[data-v-c3cd5642]{flex:1;min-height:0;padding:12px 16px 0;overflow:hidden}.tts-rich-text-editor .lsh-middle .editor-shell[data-v-c3cd5642]{height:100%;overflow:auto}.tts-rich-text-editor .lsh-bottom[data-v-c3cd5642]{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-c3cd5642]{padding:0}.tts-rich-text-editor .lsh-editor-box[data-v-c3cd5642]{border-radius:12px}.tts-rich-text-editor .lsh-top[data-v-c3cd5642]{padding:8px}}
|
|
@@ -44,6 +44,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsEditorRootProps,
|
|
|
44
44
|
getPlaybackSpeed: () => number;
|
|
45
45
|
services: import('vue').Ref<TtsRichTextServices, TtsRichTextServices>;
|
|
46
46
|
features: import('vue').Ref<TtsEditorFeatures, TtsEditorFeatures>;
|
|
47
|
+
editorOptions: import('vue').Ref<import('../../type').TtsEditorOptions, import('../../type').TtsEditorOptions>;
|
|
47
48
|
notify: (type: import('../../type').NotificationType, message: string) => void;
|
|
48
49
|
getReferencedVirtualElement: () => {
|
|
49
50
|
getBoundingClientRect(): {
|
|
@@ -115,6 +116,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsEditorRootProps,
|
|
|
115
116
|
}>, {
|
|
116
117
|
disabled: boolean;
|
|
117
118
|
placeholder: string;
|
|
119
|
+
options: import('../../type').TtsEditorOptions;
|
|
118
120
|
textLimit: number;
|
|
119
121
|
voiceVersion: number;
|
|
120
122
|
features: TtsEditorFeatures;
|
|
@@ -36,6 +36,7 @@ export declare const useEditorToolkit: () => {
|
|
|
36
36
|
getPlaybackSpeed: () => number;
|
|
37
37
|
services: import('vue').Ref<import('../../../type').TtsRichTextServices, import('../../../type').TtsRichTextServices>;
|
|
38
38
|
features: import('vue').Ref<import('../../../type').TtsEditorFeatures, import('../../../type').TtsEditorFeatures>;
|
|
39
|
+
editorOptions: import('vue').Ref<import('../../../type').TtsEditorOptions, import('../../../type').TtsEditorOptions>;
|
|
39
40
|
notify: (type: import('../../../type').NotificationType, message: string) => void;
|
|
40
41
|
getReferencedVirtualElement: () => {
|
|
41
42
|
getBoundingClientRect(): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { Editor, JSONContent } from '@tiptap/core';
|
|
3
|
-
import { NotificationType, TtsEditorFeatures, TtsRichTextServices } from '../../../type';
|
|
3
|
+
import { NotificationType, TtsEditorFeatures, TtsEditorOptions, TtsRichTextServices } from '../../../type';
|
|
4
4
|
import { DriveModeEnum } from '../constants';
|
|
5
5
|
import { CustomTagType } from '../../../core';
|
|
6
6
|
import { ToolModalOpeners } from './type';
|
|
@@ -34,6 +34,7 @@ export interface UseRichTextEditorOptions {
|
|
|
34
34
|
editable?: Ref<boolean>;
|
|
35
35
|
services?: Ref<TtsRichTextServices>;
|
|
36
36
|
features?: Ref<TtsEditorFeatures>;
|
|
37
|
+
editorOptions?: Ref<TtsEditorOptions>;
|
|
37
38
|
onCreate?: (editor: Editor) => void;
|
|
38
39
|
onChange?: (editor: Editor) => void;
|
|
39
40
|
onUpdate?: (content: JSONContent, editor: Editor) => void;
|
|
@@ -78,6 +79,7 @@ export declare function useRichTextEditor(options?: UseRichTextEditorOptions): {
|
|
|
78
79
|
getPlaybackSpeed: () => number;
|
|
79
80
|
services: Ref<TtsRichTextServices, TtsRichTextServices>;
|
|
80
81
|
features: Ref<TtsEditorFeatures, TtsEditorFeatures>;
|
|
82
|
+
editorOptions: Ref<TtsEditorOptions, TtsEditorOptions>;
|
|
81
83
|
notify: (type: NotificationType, message: string) => void;
|
|
82
84
|
getReferencedVirtualElement: () => {
|
|
83
85
|
getBoundingClientRect(): {
|
|
@@ -183,6 +185,7 @@ export declare const useEditorContext: () => {
|
|
|
183
185
|
getPlaybackSpeed: () => number;
|
|
184
186
|
services: Ref<TtsRichTextServices, TtsRichTextServices>;
|
|
185
187
|
features: Ref<TtsEditorFeatures, TtsEditorFeatures>;
|
|
188
|
+
editorOptions: Ref<TtsEditorOptions, TtsEditorOptions>;
|
|
186
189
|
notify: (type: NotificationType, message: string) => void;
|
|
187
190
|
getReferencedVirtualElement: () => {
|
|
188
191
|
getBoundingClientRect(): {
|
|
@@ -28,6 +28,7 @@ declare function __VLS_template(): {
|
|
|
28
28
|
$props: {
|
|
29
29
|
readonly disabled?: boolean | undefined;
|
|
30
30
|
readonly placeholder?: string | undefined;
|
|
31
|
+
readonly options?: import('../../type').TtsEditorOptions | undefined;
|
|
31
32
|
readonly textLimit?: number | undefined;
|
|
32
33
|
readonly voiceVersion?: number | undefined;
|
|
33
34
|
readonly features?: import('../../type').TtsEditorFeatures | undefined;
|
|
@@ -88,6 +89,7 @@ declare function __VLS_template(): {
|
|
|
88
89
|
getPlaybackSpeed: () => number;
|
|
89
90
|
services: import('vue').Ref<import('../../type').TtsRichTextServices, import('../../type').TtsRichTextServices>;
|
|
90
91
|
features: import('vue').Ref<import('../../type').TtsEditorFeatures, import('../../type').TtsEditorFeatures>;
|
|
92
|
+
editorOptions: import('vue').Ref<import('../../type').TtsEditorOptions, import('../../type').TtsEditorOptions>;
|
|
91
93
|
notify: (type: import('../../type').NotificationType, message: string) => void;
|
|
92
94
|
getReferencedVirtualElement: () => {
|
|
93
95
|
getBoundingClientRect(): {
|
|
@@ -156,6 +158,7 @@ declare function __VLS_template(): {
|
|
|
156
158
|
}, string, {
|
|
157
159
|
disabled: boolean;
|
|
158
160
|
placeholder: string;
|
|
161
|
+
options: import('../../type').TtsEditorOptions;
|
|
159
162
|
textLimit: number;
|
|
160
163
|
voiceVersion: number;
|
|
161
164
|
features: import('../../type').TtsEditorFeatures;
|
|
@@ -185,6 +188,7 @@ declare function __VLS_template(): {
|
|
|
185
188
|
} & Readonly<{
|
|
186
189
|
disabled: boolean;
|
|
187
190
|
placeholder: string;
|
|
191
|
+
options: import('../../type').TtsEditorOptions;
|
|
188
192
|
textLimit: number;
|
|
189
193
|
voiceVersion: number;
|
|
190
194
|
features: import('../../type').TtsEditorFeatures;
|
|
@@ -194,7 +198,7 @@ declare function __VLS_template(): {
|
|
|
194
198
|
}> & Omit<Readonly<import('../../type').TtsEditorRootProps> & Readonly<{
|
|
195
199
|
onChange?: (() => any) | undefined;
|
|
196
200
|
onReady?: ((editor: Editor) => any) | undefined;
|
|
197
|
-
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "replaceText" | "toolModalOpeners" | "rememberToolParams" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "lockedTool" | "lockParams" | "toggleLockTool" | "unlockTool" | "isToolLocked" | "getLockedPayload" | "contextMenu" | "closeContextMenu" | "registerToolModalOpeners" | "handleChangeVoice" | ("disabled" | "placeholder" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"> & {
|
|
201
|
+
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "editorOptions" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "replaceText" | "toolModalOpeners" | "rememberToolParams" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "lockedTool" | "lockParams" | "toggleLockTool" | "unlockTool" | "isToolLocked" | "getLockedPayload" | "contextMenu" | "closeContextMenu" | "registerToolModalOpeners" | "handleChangeVoice" | ("disabled" | "placeholder" | "options" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"> & {
|
|
198
202
|
clear: () => void;
|
|
199
203
|
focus: () => void;
|
|
200
204
|
getJson: () => JSONContent;
|
|
@@ -228,6 +232,7 @@ declare function __VLS_template(): {
|
|
|
228
232
|
getPlaybackSpeed: () => number;
|
|
229
233
|
services: import('../../type').TtsRichTextServices;
|
|
230
234
|
features: import('../../type').TtsEditorFeatures;
|
|
235
|
+
editorOptions: import('../../type').TtsEditorOptions;
|
|
231
236
|
notify: (type: import('../../type').NotificationType, message: string) => void;
|
|
232
237
|
getReferencedVirtualElement: () => {
|
|
233
238
|
getBoundingClientRect(): {
|
|
@@ -318,6 +323,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
318
323
|
$props: {
|
|
319
324
|
readonly disabled?: boolean | undefined;
|
|
320
325
|
readonly placeholder?: string | undefined;
|
|
326
|
+
readonly options?: import('../../type').TtsEditorOptions | undefined;
|
|
321
327
|
readonly textLimit?: number | undefined;
|
|
322
328
|
readonly voiceVersion?: number | undefined;
|
|
323
329
|
readonly features?: import('../../type').TtsEditorFeatures | undefined;
|
|
@@ -378,6 +384,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
378
384
|
getPlaybackSpeed: () => number;
|
|
379
385
|
services: import('vue').Ref<import('../../type').TtsRichTextServices, import('../../type').TtsRichTextServices>;
|
|
380
386
|
features: import('vue').Ref<import('../../type').TtsEditorFeatures, import('../../type').TtsEditorFeatures>;
|
|
387
|
+
editorOptions: import('vue').Ref<import('../../type').TtsEditorOptions, import('../../type').TtsEditorOptions>;
|
|
381
388
|
notify: (type: import('../../type').NotificationType, message: string) => void;
|
|
382
389
|
getReferencedVirtualElement: () => {
|
|
383
390
|
getBoundingClientRect(): {
|
|
@@ -446,6 +453,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
446
453
|
}, string, {
|
|
447
454
|
disabled: boolean;
|
|
448
455
|
placeholder: string;
|
|
456
|
+
options: import('../../type').TtsEditorOptions;
|
|
449
457
|
textLimit: number;
|
|
450
458
|
voiceVersion: number;
|
|
451
459
|
features: import('../../type').TtsEditorFeatures;
|
|
@@ -475,6 +483,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
475
483
|
} & Readonly<{
|
|
476
484
|
disabled: boolean;
|
|
477
485
|
placeholder: string;
|
|
486
|
+
options: import('../../type').TtsEditorOptions;
|
|
478
487
|
textLimit: number;
|
|
479
488
|
voiceVersion: number;
|
|
480
489
|
features: import('../../type').TtsEditorFeatures;
|
|
@@ -484,7 +493,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
484
493
|
}> & Omit<Readonly<import('../../type').TtsEditorRootProps> & Readonly<{
|
|
485
494
|
onChange?: (() => any) | undefined;
|
|
486
495
|
onReady?: ((editor: Editor) => any) | undefined;
|
|
487
|
-
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "replaceText" | "toolModalOpeners" | "rememberToolParams" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "lockedTool" | "lockParams" | "toggleLockTool" | "unlockTool" | "isToolLocked" | "getLockedPayload" | "contextMenu" | "closeContextMenu" | "registerToolModalOpeners" | "handleChangeVoice" | ("disabled" | "placeholder" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"> & {
|
|
496
|
+
}>, "clear" | "getPlaybackSpeed" | "editor" | "focus" | "textLimitLength" | "notify" | "editorOptions" | "getGenerateAudioParams" | "clearContent" | "setContent" | "insertToken" | "insertWrappedToken" | "getSelectedText" | "getSelectedJson" | "selectedText" | "hasSelectedText" | "isSelectedPureNumber" | "replaceText" | "toolModalOpeners" | "rememberToolParams" | "driveMode" | "getReferencedVirtualElement" | "replaceContentWithText" | "textLength" | "lockedTool" | "lockParams" | "toggleLockTool" | "unlockTool" | "isToolLocked" | "getLockedPayload" | "contextMenu" | "closeContextMenu" | "registerToolModalOpeners" | "handleChangeVoice" | ("disabled" | "placeholder" | "options" | "textLimit" | "voiceVersion" | "features" | "services" | "showSelectionMenu" | "initialContent") | "getJson" | "getTtsData"> & {
|
|
488
497
|
clear: () => void;
|
|
489
498
|
focus: () => void;
|
|
490
499
|
getJson: () => JSONContent;
|
|
@@ -518,6 +527,7 @@ declare const __VLS_component: import('vue').DefineComponent<TtsRichTextEditorPr
|
|
|
518
527
|
getPlaybackSpeed: () => number;
|
|
519
528
|
services: import('../../type').TtsRichTextServices;
|
|
520
529
|
features: import('../../type').TtsEditorFeatures;
|
|
530
|
+
editorOptions: import('../../type').TtsEditorOptions;
|
|
521
531
|
notify: (type: import('../../type').NotificationType, message: string) => void;
|
|
522
532
|
getReferencedVirtualElement: () => {
|
|
523
533
|
getBoundingClientRect(): {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSONContent } from '@tiptap/core';
|
|
2
2
|
import { TtsInputData, TtsPlayment } from '../type';
|
|
3
|
+
import { SentenceSplitOptions } from './split-sentence';
|
|
3
4
|
interface SentenceResult {
|
|
4
5
|
text: string;
|
|
5
6
|
protectedRanges?: Array<{
|
|
@@ -9,5 +10,5 @@ interface SentenceResult {
|
|
|
9
10
|
playments: TtsPlayment[];
|
|
10
11
|
}
|
|
11
12
|
export declare const transformParagraph: (paragraphNode: JSONContent) => SentenceResult;
|
|
12
|
-
export declare const convertToTtsFormat: (data: JSONContent) => TtsInputData;
|
|
13
|
+
export declare const convertToTtsFormat: (data: JSONContent, sentenceSplitOptions?: SentenceSplitOptions) => TtsInputData;
|
|
13
14
|
export {};
|
package/dist/core.js
CHANGED
|
@@ -284,23 +284,23 @@ const Le = [
|
|
|
284
284
|
return t;
|
|
285
285
|
}, m = (e) => e.split(I).join(",").split(O).join("."), te = (e, t, n, o, s) => {
|
|
286
286
|
let a = -1, r = Number.POSITIVE_INFINITY;
|
|
287
|
-
const l = Math.max(1, n),
|
|
288
|
-
for (let
|
|
289
|
-
if (!s.test(e[
|
|
287
|
+
const l = Math.max(1, n), i = Math.min(e.length, o);
|
|
288
|
+
for (let c = l; c <= i; c += 1) {
|
|
289
|
+
if (!s.test(e[c - 1]))
|
|
290
290
|
continue;
|
|
291
|
-
const u = Math.abs(
|
|
292
|
-
if (u < r && (r = u, a =
|
|
291
|
+
const u = Math.abs(c - t);
|
|
292
|
+
if (u < r && (r = u, a = c), c > t && a >= 0)
|
|
293
293
|
break;
|
|
294
294
|
}
|
|
295
295
|
return a;
|
|
296
296
|
}, ne = (e, t, n, o) => {
|
|
297
297
|
let s = -1, a = Number.POSITIVE_INFINITY;
|
|
298
298
|
const r = Math.max(1, n), l = Math.min(e.length, o);
|
|
299
|
-
for (let
|
|
300
|
-
if (e[
|
|
299
|
+
for (let i = r; i <= l; i += 1) {
|
|
300
|
+
if (e[i - 1] !== " ")
|
|
301
301
|
continue;
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
302
|
+
const c = Math.abs(i - t);
|
|
303
|
+
if (c < a && (a = c, s = i), i > t && s >= 0)
|
|
304
304
|
break;
|
|
305
305
|
}
|
|
306
306
|
return s;
|
|
@@ -322,15 +322,15 @@ const Le = [
|
|
|
322
322
|
let o = e;
|
|
323
323
|
for (; o && h(o) > t; ) {
|
|
324
324
|
const s = h(o), a = Math.floor(s / 2);
|
|
325
|
-
let r = 0, l = 0,
|
|
325
|
+
let r = 0, l = 0, i = 0;
|
|
326
326
|
for (let p = 0; p < o.length; p += 1)
|
|
327
|
-
if (
|
|
327
|
+
if (i += R.test(o[p]) ? 2 : 1, !r && i >= a && (r = p + 1), i >= t) {
|
|
328
328
|
l = p + 1;
|
|
329
329
|
break;
|
|
330
330
|
}
|
|
331
331
|
l || (l = o.length), r || (r = Math.floor(o.length / 2));
|
|
332
|
-
const
|
|
333
|
-
let u = C(o, r,
|
|
332
|
+
const c = Math.max(1, Math.floor(r / 3));
|
|
333
|
+
let u = C(o, r, c, l, [
|
|
334
334
|
Y,
|
|
335
335
|
J
|
|
336
336
|
]);
|
|
@@ -343,13 +343,13 @@ const Le = [
|
|
|
343
343
|
const n = e[e.length - 1], o = e.reduce((p, T) => p + T.length, 0) / e.length, s = Math.floor(o * t);
|
|
344
344
|
if (n.length >= s)
|
|
345
345
|
return e;
|
|
346
|
-
const r = `${e[e.length - 2]}${n}`, l = Math.floor(r.length / 2),
|
|
346
|
+
const r = `${e[e.length - 2]}${n}`, l = Math.floor(r.length / 2), i = Math.max(1, Math.floor(l / 3)), c = C(r, l, i, r.length, [
|
|
347
347
|
Z
|
|
348
348
|
]);
|
|
349
|
-
if (
|
|
349
|
+
if (c <= 0 || c >= r.length)
|
|
350
350
|
return e;
|
|
351
351
|
const u = [...e];
|
|
352
|
-
return u[u.length - 2] = r.slice(0,
|
|
352
|
+
return u[u.length - 2] = r.slice(0, c), u[u.length - 1] = r.slice(c), u.filter(Boolean);
|
|
353
353
|
}, se = (e, t = {}) => {
|
|
354
354
|
const n = {
|
|
355
355
|
...W,
|
|
@@ -362,16 +362,16 @@ const Le = [
|
|
|
362
362
|
return [m(s)];
|
|
363
363
|
const a = [], r = s.split(new RegExp("(?<=[。!?!?\\.])"));
|
|
364
364
|
let l = "";
|
|
365
|
-
for (const
|
|
366
|
-
if (!
|
|
365
|
+
for (const c of r) {
|
|
366
|
+
if (!c)
|
|
367
367
|
continue;
|
|
368
|
-
l +=
|
|
368
|
+
l += c;
|
|
369
369
|
const u = l[l.length - 1] ?? "";
|
|
370
370
|
h(l) >= n.minSegmentLength && K.test(u) && (a.push(l), l = "");
|
|
371
371
|
}
|
|
372
372
|
l && (a.length > 0 && h(l) < n.minSegmentLength ? a[a.length - 1] += l : a.push(l));
|
|
373
|
-
const
|
|
374
|
-
return re(
|
|
373
|
+
const i = a.flatMap((c) => h(c) <= n.maxSegmentLength ? [c] : oe(c, n.maxSegmentLength));
|
|
374
|
+
return re(i, n.rebalanceRatio).map(
|
|
375
375
|
m
|
|
376
376
|
);
|
|
377
377
|
}, A = (e) => e.type === "text" ? e.text || "" : (e.content || []).map(A).join(""), le = (e) => {
|
|
@@ -388,76 +388,76 @@ const Le = [
|
|
|
388
388
|
actionCode: l
|
|
389
389
|
});
|
|
390
390
|
},
|
|
391
|
-
[g.customStop.type]: ({ payload: r, position: l, actionCode:
|
|
391
|
+
[g.customStop.type]: ({ payload: r, position: l, actionCode: i }) => {
|
|
392
392
|
o.push({
|
|
393
393
|
action: "insert",
|
|
394
394
|
model: "control",
|
|
395
395
|
payload: `[stop:${r == null ? void 0 : r.time}]`,
|
|
396
396
|
position: l,
|
|
397
397
|
text: "",
|
|
398
|
-
actionCode:
|
|
398
|
+
actionCode: i
|
|
399
399
|
});
|
|
400
400
|
},
|
|
401
|
-
[g.continue.type]: ({ position: r, text: l, actionCode:
|
|
401
|
+
[g.continue.type]: ({ position: r, text: l, actionCode: i }) => {
|
|
402
402
|
o.push({
|
|
403
403
|
action: "replace",
|
|
404
404
|
model: "replace",
|
|
405
405
|
payload: `《${l}》`,
|
|
406
406
|
position: r,
|
|
407
407
|
text: l,
|
|
408
|
-
actionCode:
|
|
408
|
+
actionCode: i
|
|
409
409
|
});
|
|
410
410
|
},
|
|
411
|
-
[g.replace.type]: ({ payload: r, position: l, text:
|
|
411
|
+
[g.replace.type]: ({ payload: r, position: l, text: i, actionCode: c }) => {
|
|
412
412
|
o.push({
|
|
413
413
|
action: "replace",
|
|
414
414
|
model: "replace",
|
|
415
415
|
payload: `${r == null ? void 0 : r.text}`,
|
|
416
416
|
position: l,
|
|
417
|
-
text:
|
|
418
|
-
actionCode:
|
|
417
|
+
text: i,
|
|
418
|
+
actionCode: c
|
|
419
419
|
});
|
|
420
420
|
},
|
|
421
|
-
[g.pinyin.type]: ({ payload: r, position: l, text:
|
|
421
|
+
[g.pinyin.type]: ({ payload: r, position: l, text: i, actionCode: c }) => {
|
|
422
422
|
o.push({
|
|
423
423
|
action: "replace",
|
|
424
424
|
model: "pinyin",
|
|
425
425
|
payload: `${r == null ? void 0 : r.text}`,
|
|
426
426
|
position: l,
|
|
427
|
-
text:
|
|
428
|
-
actionCode:
|
|
427
|
+
text: i,
|
|
428
|
+
actionCode: c
|
|
429
429
|
});
|
|
430
430
|
},
|
|
431
|
-
[g.language.type]: ({ payload: r, position: l, text:
|
|
431
|
+
[g.language.type]: ({ payload: r, position: l, text: i, actionCode: c }) => {
|
|
432
432
|
o.push({
|
|
433
433
|
action: "language",
|
|
434
434
|
model: "language",
|
|
435
435
|
payload: `${r == null ? void 0 : r.code}`,
|
|
436
436
|
position: l,
|
|
437
|
-
text:
|
|
438
|
-
actionCode:
|
|
437
|
+
text: i,
|
|
438
|
+
actionCode: c
|
|
439
439
|
});
|
|
440
440
|
},
|
|
441
|
-
[g.tone.type]: ({ payload: r, position: l, actionCode:
|
|
441
|
+
[g.tone.type]: ({ payload: r, position: l, actionCode: i }) => {
|
|
442
442
|
var u;
|
|
443
|
-
const
|
|
444
|
-
|
|
443
|
+
const c = (u = P.find((p) => p.value === (r == null ? void 0 : r.code))) == null ? void 0 : u.tag;
|
|
444
|
+
c && o.push({
|
|
445
445
|
action: "insert",
|
|
446
446
|
model: "control",
|
|
447
|
-
payload:
|
|
447
|
+
payload: c,
|
|
448
448
|
position: l,
|
|
449
449
|
text: "",
|
|
450
|
-
actionCode:
|
|
450
|
+
actionCode: i
|
|
451
451
|
});
|
|
452
452
|
},
|
|
453
|
-
[g.ignore.type]: ({ position: r, text: l, actionCode:
|
|
453
|
+
[g.ignore.type]: ({ position: r, text: l, actionCode: i }) => {
|
|
454
454
|
o.push({
|
|
455
455
|
action: "replace",
|
|
456
456
|
model: "replace",
|
|
457
457
|
payload: " ",
|
|
458
458
|
position: r,
|
|
459
459
|
text: l,
|
|
460
|
-
actionCode:
|
|
460
|
+
actionCode: i
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
};
|
|
@@ -468,13 +468,13 @@ const Le = [
|
|
|
468
468
|
return;
|
|
469
469
|
}
|
|
470
470
|
if (r.type !== "customTag") return;
|
|
471
|
-
const l = (T = r.attrs) == null ? void 0 : T.categ,
|
|
471
|
+
const l = (T = r.attrs) == null ? void 0 : T.categ, i = (d = r.attrs) == null ? void 0 : d.payload, c = n.length, u = A(r), p = a[l];
|
|
472
472
|
u && s.push({
|
|
473
|
-
start:
|
|
474
|
-
end:
|
|
473
|
+
start: c,
|
|
474
|
+
end: c + u.length
|
|
475
475
|
}), p && p({
|
|
476
|
-
payload:
|
|
477
|
-
position:
|
|
476
|
+
payload: i,
|
|
477
|
+
position: c,
|
|
478
478
|
text: u,
|
|
479
479
|
actionCode: l
|
|
480
480
|
}), n += u;
|
|
@@ -513,36 +513,38 @@ const Le = [
|
|
|
513
513
|
return a.text += o.text, a.end = o.end, n;
|
|
514
514
|
}
|
|
515
515
|
return n.push({ ...o }), n;
|
|
516
|
-
}, []), ue = (e, t, n, o) => e.position >= t && e.position < n ? !0 : !e.text && o && e.position === n, ge = (e) => {
|
|
517
|
-
const
|
|
518
|
-
if (
|
|
519
|
-
const
|
|
520
|
-
ie(e.text,
|
|
516
|
+
}, []), ue = (e, t, n, o) => e.position >= t && e.position < n ? !0 : !e.text && o && e.position === n, ge = (e, t) => {
|
|
517
|
+
const n = se(e.text, t);
|
|
518
|
+
if (n.length <= 1) return [e];
|
|
519
|
+
const o = ce(
|
|
520
|
+
ie(e.text, n),
|
|
521
521
|
e.protectedRanges || []
|
|
522
522
|
);
|
|
523
|
-
return
|
|
524
|
-
const
|
|
525
|
-
(
|
|
526
|
-
).map((
|
|
527
|
-
...
|
|
528
|
-
position:
|
|
523
|
+
return o.map((s, a) => {
|
|
524
|
+
const r = a === o.length - 1, l = e.playments.filter(
|
|
525
|
+
(i) => ue(i, s.start, s.end, r)
|
|
526
|
+
).map((i) => ({
|
|
527
|
+
...i,
|
|
528
|
+
position: i.position - s.start
|
|
529
529
|
}));
|
|
530
530
|
return {
|
|
531
|
-
text:
|
|
532
|
-
playments:
|
|
531
|
+
text: s.text,
|
|
532
|
+
playments: l
|
|
533
533
|
};
|
|
534
534
|
});
|
|
535
|
-
}, Re = (e) => {
|
|
536
|
-
const
|
|
535
|
+
}, Re = (e, t = {}) => {
|
|
536
|
+
const n = {
|
|
537
537
|
playments: [],
|
|
538
538
|
sentences: []
|
|
539
539
|
};
|
|
540
|
-
return ae(e).forEach((
|
|
541
|
-
const
|
|
542
|
-
!
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
540
|
+
return ae(e).forEach((s) => {
|
|
541
|
+
const a = le(s);
|
|
542
|
+
!a.text && !a.playments.length || ge(a, t).forEach(
|
|
543
|
+
({ text: r, playments: l }) => {
|
|
544
|
+
n.sentences.push(r), n.playments.push(l);
|
|
545
|
+
}
|
|
546
|
+
);
|
|
547
|
+
}), n;
|
|
546
548
|
};
|
|
547
549
|
export {
|
|
548
550
|
f as DeleteMode,
|