ai-word-editor 0.0.75 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-word-editor.css +1 -1
- package/dist/index.js +64 -64
- package/dist/types/components/CommentPanel.vue.d.ts.map +1 -1
- package/dist/types/components/ComplexCommentPanel.vue.d.ts.map +1 -1
- package/dist/{wordDocxExport-DFtBOlHa.js → wordDocxExport-DyFbvZqL.js} +113 -113
- package/dist/wordDocxExport.js +1 -1
- package/package.json +1 -1
package/dist/ai-word-editor.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ProseMirror span.comment-mark,.umo-editor span.comment-mark{border-bottom:2px solid #fbbf24;background-color:transparent;border-radius:0;cursor:text;transition:border-bottom-color .15s}.ProseMirror span.comment-mark:hover,.umo-editor span.comment-mark:hover{border-bottom-color:#facc15}.ProseMirror span.comment-mark--active,.umo-editor span.comment-mark--active{background-color:transparent;border-bottom-color:#f59e0b}.comment-panel[data-v-0f4b5fed]{box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:100%;border-left:1px solid #e5e7eb;background:#fafafa;display:flex;flex-direction:column;overflow:hidden}.comment-panel__header[data-v-0f4b5fed]{padding:14px 16px 10px;border-bottom:1px solid #e5e7eb;background:#fff}.comment-panel__title[data-v-0f4b5fed]{margin:0;font-size:14px;font-weight:600;color:#374151;display:flex;align-items:center;gap:6px}.comment-panel__badge[data-v-0f4b5fed]{background:#f59e0b;color:#fff;border-radius:10px;font-size:11px;padding:1px 6px;font-weight:500}.comment-panel__empty[data-v-0f4b5fed]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#9ca3af;gap:4px;padding:24px;text-align:center}.comment-panel__empty p[data-v-0f4b5fed]{margin:0;font-size:13px}.comment-panel__empty-icon[data-v-0f4b5fed]{font-size:32px;margin-bottom:8px;opacity:.5}.comment-panel__empty-hint[data-v-0f4b5fed]{font-size:12px!important;color:#d1d5db}.comment-panel__list[data-v-0f4b5fed]{list-style:none;margin:0;padding:8px;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:8px}.comment-item[data-v-0f4b5fed]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:10px 12px;cursor:pointer;transition:border-color .15s,box-shadow .15s}.comment-item[data-v-0f4b5fed]:hover{border-color:#fbbf24;box-shadow:0 1px 4px #fbbf2426}.comment-item--active[data-v-0f4b5fed]{border-color:#f59e0b;box-shadow:0 0 0 2px #f59e0b33}.comment-item--resolved[data-v-0f4b5fed]{opacity:.55}.comment-item--resolved .comment-item__note[data-v-0f4b5fed]{text-decoration:line-through;color:#9ca3af}.comment-item__quote[data-v-0f4b5fed]{font-size:12px;color:#6b7280;background:#fef9c3;border-left:3px solid #fbbf24;padding:4px 8px;border-radius:0 4px 4px 0;margin-bottom:6px;line-height:1.4}.comment-item__quote-icon[data-v-0f4b5fed]{color:#fbbf24;margin-right:2px}.comment-item--c0 .comment-item__quote[data-v-0f4b5fed]{background:#fef3c7cc;border-left-color:#f97316}.comment-item--c0 .comment-item__quote-icon[data-v-0f4b5fed]{color:#f97316}.comment-item--c1 .comment-item__quote[data-v-0f4b5fed]{background:#d1fae5d9;border-left-color:#22c55e}.comment-item--c1 .comment-item__quote-icon[data-v-0f4b5fed]{color:#22c55e}.comment-item--c2 .comment-item__quote[data-v-0f4b5fed]{background:#dbeafed9;border-left-color:#3b82f6}.comment-item--c2 .comment-item__quote-icon[data-v-0f4b5fed]{color:#3b82f6}.comment-item--c3 .comment-item__quote[data-v-0f4b5fed]{background:#ede9fee6;border-left-color:#a855f7}.comment-item--c3 .comment-item__quote-icon[data-v-0f4b5fed]{color:#a855f7}.comment-item--c4 .comment-item__quote[data-v-0f4b5fed]{background:#fce7f3e6;border-left-color:#ec4899}.comment-item--c4 .comment-item__quote-icon[data-v-0f4b5fed]{color:#ec4899}.comment-item--c5 .comment-item__quote[data-v-0f4b5fed]{background:#ccfbf1d9;border-left-color:#14b8a6}.comment-item--c5 .comment-item__quote-icon[data-v-0f4b5fed]{color:#14b8a6}.comment-item--c6 .comment-item__quote[data-v-0f4b5fed]{background:#fef9c3e6;border-left-color:#eab308}.comment-item--c6 .comment-item__quote-icon[data-v-0f4b5fed]{color:#eab308}.comment-item--c7 .comment-item__quote[data-v-0f4b5fed]{background:#ffe4e6e6;border-left-color:#f43f5e}.comment-item--c7 .comment-item__quote-icon[data-v-0f4b5fed]{color:#f43f5e}.comment-item--c8 .comment-item__quote[data-v-0f4b5fed]{background:#e0e7ffe6;border-left-color:#6366f1}.comment-item--c8 .comment-item__quote-icon[data-v-0f4b5fed]{color:#6366f1}.comment-item--c9 .comment-item__quote[data-v-0f4b5fed]{background:#ecfdc8e6;border-left-color:#84cc16}.comment-item--c9 .comment-item__quote-icon[data-v-0f4b5fed]{color:#84cc16}.comment-item--c10 .comment-item__quote[data-v-0f4b5fed]{background:#cffafee6;border-left-color:#06b6d4}.comment-item--c10 .comment-item__quote-icon[data-v-0f4b5fed]{color:#06b6d4}.comment-item--c11 .comment-item__quote[data-v-0f4b5fed]{background:#d1fae5d9;border-left-color:#10b981}.comment-item--c11 .comment-item__quote-icon[data-v-0f4b5fed]{color:#10b981}.comment-item--c12 .comment-item__quote[data-v-0f4b5fed]{background:#ede9fee6;border-left-color:#8b5cf6}.comment-item--c12 .comment-item__quote-icon[data-v-0f4b5fed]{color:#8b5cf6}.comment-item--c13 .comment-item__quote[data-v-0f4b5fed]{background:#faf0ffe6;border-left-color:#d946ef}.comment-item--c13 .comment-item__quote-icon[data-v-0f4b5fed]{color:#d946ef}.comment-item--c14 .comment-item__quote[data-v-0f4b5fed]{background:#e0f2fee6;border-left-color:#0ea5e9}.comment-item--c14 .comment-item__quote-icon[data-v-0f4b5fed]{color:#0ea5e9}.comment-item--c15 .comment-item__quote[data-v-0f4b5fed]{background:#ffedd5e6;border-left-color:#ea580c}.comment-item--c15 .comment-item__quote-icon[data-v-0f4b5fed]{color:#ea580c}.comment-item--c16 .comment-item__quote[data-v-0f4b5fed]{background:#fefce8e6;border-left-color:#ca8a04}.comment-item--c16 .comment-item__quote-icon[data-v-0f4b5fed]{color:#ca8a04}.comment-item--c17 .comment-item__quote[data-v-0f4b5fed]{background:#fee2e2e6;border-left-color:#dc2626}.comment-item--c17 .comment-item__quote-icon[data-v-0f4b5fed]{color:#dc2626}.comment-item--c18 .comment-item__quote[data-v-0f4b5fed]{background:#ccfbf1d9;border-left-color:#0d9488}.comment-item--c18 .comment-item__quote-icon[data-v-0f4b5fed]{color:#0d9488}.comment-item--c19 .comment-item__quote[data-v-0f4b5fed]{background:#f1f5f9e6;border-left-color:#64748b}.comment-item--c19 .comment-item__quote-icon[data-v-0f4b5fed]{color:#64748b}.comment-item__note[data-v-0f4b5fed]{font-size:13px;color:#374151;line-height:1.5;margin-bottom:6px;word-break:break-word}.comment-item__meta[data-v-0f4b5fed]{display:flex;justify-content:space-between;font-size:11px;color:#9ca3af;margin-bottom:8px}.comment-item__author[data-v-0f4b5fed]{font-weight:500}.comment-item__actions[data-v-0f4b5fed]{display:flex;gap:6px;justify-content:flex-end}.comment-btn[data-v-0f4b5fed]{border:none;border-radius:4px;padding:3px 8px;font-size:11px;cursor:pointer;transition:background .15s}.comment-btn--resolve[data-v-0f4b5fed]{background:#ecfdf5;color:#059669}.comment-btn--resolve[data-v-0f4b5fed]:hover{background:#d1fae5}.comment-btn--delete[data-v-0f4b5fed]{background:#fef2f2;color:#dc2626}.comment-btn--delete[data-v-0f4b5fed]:hover{background:#fee2e2}.dialog-backdrop[data-v-8cbc8293]{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:9999}.dialog[data-v-8cbc8293]{background:#fff;border-radius:10px;box-shadow:0 20px 60px #00000026,0 4px 12px #00000014;width:460px;max-width:calc(100vw - 32px);overflow:hidden}.dialog__header[data-v-8cbc8293]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #e5e7eb}.dialog__title[data-v-8cbc8293]{margin:0;font-size:15px;font-weight:600;color:#111827}.dialog__close[data-v-8cbc8293]{border:none;background:none;font-size:14px;color:#9ca3af;cursor:pointer;padding:4px 6px;border-radius:4px;line-height:1}.dialog__close[data-v-8cbc8293]:hover{background:#f3f4f6;color:#374151}.dialog__quote[data-v-8cbc8293]{padding:12px 20px 0}.dialog__quote-label[data-v-8cbc8293]{font-size:11px;font-weight:500;color:#9ca3af;text-transform:uppercase;letter-spacing:.05em}.dialog__quote-text[data-v-8cbc8293]{margin:4px 0 0;padding:8px 12px;background:#fef9c3;border-left:3px solid #fbbf24;border-radius:0 4px 4px 0;font-size:13px;color:#374151;line-height:1.5}.dialog__body[data-v-8cbc8293]{padding:16px 20px 0}.dialog__label[data-v-8cbc8293]{display:block;font-size:12px;font-weight:500;color:#374151;margin-bottom:6px}.dialog__textarea[data-v-8cbc8293]{width:100%;border:1px solid #d1d5db;border-radius:6px;padding:10px 12px;font-size:14px;font-family:inherit;resize:vertical;box-sizing:border-box;transition:border-color .15s,box-shadow .15s;outline:none;color:#111827;line-height:1.5}.dialog__textarea[data-v-8cbc8293]:focus{border-color:#f59e0b;box-shadow:0 0 0 3px #f59e0b26}.dialog__hint[data-v-8cbc8293]{margin:6px 0 0;font-size:11px;color:#9ca3af}.dialog__footer[data-v-8cbc8293]{display:flex;justify-content:flex-end;gap:8px;padding:16px 20px}.dialog__btn[data-v-8cbc8293]{border:none;border-radius:6px;padding:8px 16px;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s}.dialog__btn--cancel[data-v-8cbc8293]{background:#f3f4f6;color:#374151}.dialog__btn--cancel[data-v-8cbc8293]:hover{background:#e5e7eb}.dialog__btn--confirm[data-v-8cbc8293]{background:#f59e0b;color:#fff}.dialog__btn--confirm[data-v-8cbc8293]:hover:not(:disabled){background:#d97706}.dialog__btn--confirm[data-v-8cbc8293]:disabled{opacity:.45;cursor:not-allowed}.comment-gutter[data-v-ac6164bd]{position:absolute;top:12px;right:-300px;width:280px;pointer-events:none;display:flex;flex-direction:column}.gutter-item-wrapper[data-v-ac6164bd]{pointer-events:auto}.gutter-item[data-v-ac6164bd]{position:relative;width:100%;background:#fff;border:1px solid #e5e7eb;border-left-width:4px;border-radius:8px;padding:8px 10px;box-shadow:0 8px 18px #0000000f;cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;transition:transform .12s,box-shadow .12s,border-color .12s}.gutter-item[data-v-ac6164bd]:hover{transform:translateY(-1px);box-shadow:0 10px 22px #00000014}.gutter-item--active[data-v-ac6164bd]{border-color:#f59e0b;box-shadow:0 0 0 2px #f59e0b38,0 10px 22px #00000014}.gutter-item--resolved[data-v-ac6164bd]{opacity:.6}.gutter-item__quote[data-v-ac6164bd]{font-size:12px;color:#6b7280;margin-bottom:4px}.gutter-item__note[data-v-ac6164bd]{font-size:13px;color:#374151;line-height:1.35;margin-bottom:6px;word-break:break-word}.gutter-item__meta[data-v-ac6164bd]{display:flex;justify-content:space-between;font-size:11px;color:#9ca3af}.gutter-item--c0[data-v-ac6164bd]{border-left-color:#f97316}.gutter-item--c1[data-v-ac6164bd]{border-left-color:#22c55e}.gutter-item--c2[data-v-ac6164bd]{border-left-color:#3b82f6}.gutter-item--c3[data-v-ac6164bd]{border-left-color:#a855f7}.gutter-item--c4[data-v-ac6164bd]{border-left-color:#ec4899}.gutter-item--c5[data-v-ac6164bd]{border-left-color:#14b8a6}.gutter-item--c6[data-v-ac6164bd]{border-left-color:#eab308}.gutter-item--c7[data-v-ac6164bd]{border-left-color:#f43f5e}.gutter-item--c8[data-v-ac6164bd]{border-left-color:#6366f1}.gutter-item--c9[data-v-ac6164bd]{border-left-color:#84cc16}.gutter-item--c10[data-v-ac6164bd]{border-left-color:#06b6d4}.gutter-item--c11[data-v-ac6164bd]{border-left-color:#10b981}.gutter-item--c12[data-v-ac6164bd]{border-left-color:#8b5cf6}.gutter-item--c13[data-v-ac6164bd]{border-left-color:#d946ef}.gutter-item--c14[data-v-ac6164bd]{border-left-color:#0ea5e9}.gutter-item--c15[data-v-ac6164bd]{border-left-color:#ea580c}.gutter-item--c16[data-v-ac6164bd]{border-left-color:#ca8a04}.gutter-item--c17[data-v-ac6164bd]{border-left-color:#dc2626}.gutter-item--c18[data-v-ac6164bd]{border-left-color:#0d9488}.gutter-item--c19[data-v-ac6164bd]{border-left-color:#64748b}.umo-editor-content .tableWrapper{max-width:100%;box-sizing:border-box}.umo-editor-content table{width:100%!important;max-width:100%;box-sizing:border-box}.umo-editor-content table td,.umo-editor-content table th{box-sizing:border-box}.umo-editor-content table:has(colgroup[data-word-col-layout]) td,.umo-editor-content table:has(colgroup[data-word-col-layout]) th,.umo-editor-content table:has(colgroup[data-word-col-layout]){border:none!important;outline:none!important}.umo-editor-content table:has(colgroup col:nth-child(2)){table-layout:fixed}.umo-editor-content ul[type=disc] li>p:before,.umo-editor-content ul[type=circle] li>p:before,.umo-editor-content ul[type=square] li>p:before{content:none}.auth-page[data-v-9f2d36df]{min-height:100%;display:flex;align-items:center;justify-content:center;background:#f3f4f6}.auth-card[data-v-9f2d36df]{background:#fff;border-radius:12px;padding:40px 36px;width:340px;box-shadow:0 4px 24px #0000001a}.auth-title[data-v-9f2d36df]{font-size:20px;font-weight:700;color:#111827;text-align:center;margin:0 0 24px}.auth-tabs[data-v-9f2d36df]{display:flex;gap:0;border:1px solid #e5e7eb;border-radius:8px;overflow:hidden;margin-bottom:20px}.auth-tab[data-v-9f2d36df]{flex:1;padding:8px;border:none;background:transparent;cursor:pointer;font-size:14px;color:#6b7280;transition:background .15s,color .15s}.auth-tab--active[data-v-9f2d36df]{background:#3b82f6;color:#fff}.auth-form[data-v-9f2d36df]{display:flex;flex-direction:column;gap:12px}.auth-input[data-v-9f2d36df]{padding:10px 14px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;transition:border-color .15s}.auth-input[data-v-9f2d36df]:focus{border-color:#3b82f6}.auth-submit[data-v-9f2d36df]{padding:10px;border:none;border-radius:8px;background:#3b82f6;color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s}.auth-submit[data-v-9f2d36df]:hover:not(:disabled){background:#2563eb}.auth-submit[data-v-9f2d36df]:disabled{opacity:.6;cursor:not-allowed}.auth-error[data-v-9f2d36df]{color:#ef4444;font-size:13px;margin:0}.app-layout[data-v-9f2d36df]{display:flex;width:100%;height:100%;overflow:hidden}.editor-wrapper[data-v-9f2d36df]{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden}.app-layout__comment-aside[data-v-9f2d36df]{flex:0 1 clamp(280px,36vw,720px);min-width:0;max-width:100%;display:flex;flex-direction:column;overflow:hidden}.comment-toolbar[data-v-9f2d36df]{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border-bottom:1px solid #e5e7eb;z-index:10;flex-shrink:0}.toolbar-docname[data-v-9f2d36df]{flex:1;min-width:0}.toolbar-docname__input[data-v-9f2d36df]{width:100%;border:1px solid transparent;border-radius:4px;padding:3px 6px;font-size:14px;font-weight:600;color:#111827;background:transparent;outline:none;transition:border-color .15s,background .15s}.toolbar-docname__input[data-v-9f2d36df]:hover,.toolbar-docname__input[data-v-9f2d36df]:focus{border-color:#d1d5db;background:#f9fafb}.toolbar-docname--empty[data-v-9f2d36df]{font-size:13px;color:#9ca3af}.toolbar-actions[data-v-9f2d36df]{display:flex;gap:8px;flex-shrink:0}.toolbar-btn[data-v-9f2d36df]{display:inline-flex;align-items:center;gap:5px;border:none;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s,opacity .15s}.toolbar-btn[data-v-9f2d36df]:disabled{opacity:.5;cursor:not-allowed}.toolbar-btn__icon[data-v-9f2d36df]{font-size:15px}.toolbar-btn--save[data-v-9f2d36df]{background:#d1fae5;color:#065f46}.toolbar-btn--save[data-v-9f2d36df]:hover:not(:disabled){background:#a7f3d0}.toolbar-btn--primary[data-v-9f2d36df]{background:#fef3c7;color:#92400e}.toolbar-btn--primary[data-v-9f2d36df]:hover:not(:disabled){background:#fde68a}.toolbar-btn--ai[data-v-9f2d36df]{background:#ede9fe;color:#5b21b6}.toolbar-btn--ai[data-v-9f2d36df]:hover:not(:disabled){background:#ddd6fe}.umo-editor-instance[data-v-9f2d36df]{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}.umo-editor-stage[data-v-9f2d36df]{position:relative;flex:1;min-height:0;overflow:hidden}.umo-editor-stage.comment-hidden[data-v-9f2d36df] .comment-mark[data-comment-source=doc-origin]{background-color:transparent!important;border-bottom-color:transparent!important;border-bottom-width:0!important}.umo-editor-stage[data-v-9f2d36df]:fullscreen{width:100vw;height:100vh;background:#fff}.editor-placeholder[data-v-9f2d36df]{flex:1;display:flex;align-items:center;justify-content:center;color:#9ca3af;font-size:14px}.umo-custom-huge-btn[data-v-9f2d36df]{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;width:auto;height:56px;padding:0 5px;margin:0;border:none;border-radius:var(--umo-radius, 3px);background:transparent;cursor:pointer;transition:background .2s;white-space:nowrap}.umo-custom-huge-btn[data-v-9f2d36df]:hover:not(:disabled){background:var(--umo-button-hover-background, rgba(0, 0, 0, .06))}.umo-custom-huge-btn[data-v-9f2d36df]:disabled{opacity:.5;cursor:not-allowed}.umo-custom-huge-btn__icon[data-v-9f2d36df]{display:flex;align-items:center;justify-content:center;color:var(--umo-text-color, #3d3d3d);margin-top:3px}.umo-custom-huge-btn__icon svg[data-v-9f2d36df]{width:24px;height:24px}.umo-custom-huge-btn__text[data-v-9f2d36df]{display:block;font-size:12px;color:var(--umo-text-color, #3d3d3d);margin-top:2px;line-height:1.2}.html-dialog-mask[data-v-9f2d36df]{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:9999}.html-dialog[data-v-9f2d36df]{background:#1e1e2e;border-radius:10px;width:min(860px,92vw);max-height:80vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #0006}.html-dialog__header[data-v-9f2d36df]{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #313244;flex-shrink:0}.html-dialog__title[data-v-9f2d36df]{font-size:14px;font-weight:600;color:#cdd6f4}.html-dialog__close[data-v-9f2d36df]{background:none;border:none;color:#6c7086;font-size:16px;cursor:pointer;padding:2px 6px;border-radius:4px;line-height:1;transition:color .15s,background .15s}.html-dialog__close[data-v-9f2d36df]:hover{color:#cdd6f4;background:#313244}.html-dialog__toolbar[data-v-9f2d36df]{display:flex;justify-content:flex-end;padding:8px 16px;border-bottom:1px solid #313244;flex-shrink:0}.html-dialog__copy-btn[data-v-9f2d36df]{font-size:12px;padding:4px 14px;border-radius:5px;border:1px solid #45475a;background:#313244;color:#cdd6f4;cursor:pointer;transition:background .15s,border-color .15s}.html-dialog__copy-btn[data-v-9f2d36df]:hover{background:#45475a;border-color:#89b4fa;color:#89b4fa}.html-dialog__content[data-v-9f2d36df]{flex:1;overflow:auto;margin:0;padding:16px 20px;font-family:Fira Code,Consolas,Courier New,monospace;font-size:12.5px;line-height:1.7;color:#a6e3a1;white-space:pre-wrap;word-break:break-all}[data-v-9f2d36df] table:has(colgroup[data-word-col-layout]) td,[data-v-9f2d36df] table:has(colgroup[data-word-col-layout]) th,[data-v-9f2d36df] table:has(colgroup[data-word-col-layout]){border:none!important;outline:none!important}.complex-comment-panel[data-v-448ac300]{box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:100%;border-left:1px solid #e5e7eb;background:#f3f4f6;display:flex;flex-direction:column;overflow:hidden}.complex-comment-panel__header[data-v-448ac300]{padding:12px 14px 10px;background:#fff;border-bottom:1px solid #e5e7eb}.complex-comment-panel__title[data-v-448ac300]{margin:0 0 10px;font-size:16px;font-weight:600;color:#111827}.complex-comment-panel__title-row[data-v-448ac300]{display:flex;align-items:center;gap:10px}.review-streaming-banner[data-v-448ac300]{display:inline-flex;align-items:center;gap:8px;margin-bottom:10px;padding:6px 10px;border-radius:999px;border:1px solid rgba(22,119,255,.2);background:#1677ff14;color:#1677ff;font-size:12px;line-height:1;width:fit-content;box-shadow:inset 0 1px #ffffffbf,0 6px 18px #1677ff33}.review-streaming-dot[data-v-448ac300]{width:7px;height:7px;border-radius:50%;background:#1677ff;box-shadow:0 0 0 4px #1677ff29;animation:review-streaming-pulse-448ac300 1.1s ease-in-out infinite}@keyframes review-streaming-pulse-448ac300{0%,to{transform:scale(1)}50%{transform:scale(1.15)}}.complex-comment-panel__toolbar[data-v-448ac300]{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}.complex-comment-panel__download[data-v-448ac300]{border:none;border-radius:4px;padding:5px 14px;font-size:13px;font-weight:500;cursor:pointer;background:#2563eb;color:#fff}.complex-comment-panel__download[data-v-448ac300]:hover{background:#1d4ed8}.complex-comment-panel__risk-toggle[data-v-448ac300]{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#4b5563;cursor:pointer;-webkit-user-select:none;user-select:none}.complex-comment-panel__risk-toggle input[data-v-448ac300]{width:14px;height:14px;cursor:pointer}.complex-comment-panel__empty[data-v-448ac300]{flex:1;display:flex;align-items:center;justify-content:center;color:#9ca3af;font-size:14px}.complex-comment-panel__tabs[data-v-448ac300]{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px;background:#fff;border-bottom:1px solid #e5e7eb}.complex-comment-panel__tab[data-v-448ac300]{border:1px solid #e5e7eb;background:#fff;border-radius:4px;padding:4px 10px;font-size:12px;color:#6b7280;cursor:pointer}.complex-comment-panel__tab[data-v-448ac300]:hover{border-color:#93c5fd;color:#2563eb}.complex-comment-panel__tab--active[data-v-448ac300]{border-color:#2563eb;color:#2563eb;background:#eff6ff;font-weight:500}.complex-comment-panel__body[data-v-448ac300]{flex:1;overflow-y:auto;padding:10px 12px 16px;display:flex;flex-direction:column;gap:14px}.complex-comment-panel__section-head[data-v-448ac300]{margin-bottom:8px}.complex-comment-panel__section-title[data-v-448ac300]{font-size:14px;font-weight:600;color:#111827}.complex-comment-panel__cards[data-v-448ac300]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.audit-card[data-v-448ac300]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px 14px;cursor:pointer;transition:border-color .15s,box-shadow .15s}.audit-card[data-v-448ac300]:hover{border-color:#d1d5db;box-shadow:0 1px 3px #0000000f}.audit-card--active[data-v-448ac300],.audit-card--active[data-v-448ac300]:hover{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb33}.audit-card__head[data-v-448ac300]{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}.audit-card__point[data-v-448ac300]{font-size:14px;font-weight:600;color:#111827;line-height:1.4;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audit-card__badge[data-v-448ac300]{flex-shrink:0;font-size:12px;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap}.audit-card__badge--risk[data-v-448ac300]{background:#fee2e2;color:#dc2626}.audit-card__badge--ok[data-v-448ac300]{background:#22c55e;color:#fff}.audit-card__badge--muted[data-v-448ac300]{background:#f3f4f6;color:#6b7280}.audit-card__block[data-v-448ac300]{margin-bottom:4px}.audit-card__label[data-v-448ac300]{font-size:12px;color:#9ca3af;margin-bottom:6px}.audit-card__label--strong[data-v-448ac300]{color:#111827;font-weight:500}.audit-card__quote[data-v-448ac300]{font-size:13px;color:#6b7280;line-height:1.5;padding:8px 10px 8px 12px;border-left:3px solid #d1d5db;background:#f9fafb;border-radius:0 4px 4px 0;word-break:break-word}.audit-card__locate[data-v-448ac300]{margin-top:8px;border:none;background:none;padding:0;font-size:12px;color:#2563eb;cursor:pointer;display:inline-flex;align-items:center;gap:4px}.audit-card__locate[data-v-448ac300]:hover{text-decoration:underline}.audit-card__locate-icon[data-v-448ac300]{font-size:14px;line-height:1;opacity:.85}.audit-card__divider[data-v-448ac300]{height:1px;background:#e5e7eb;margin:12px 0}.audit-card__block--desc[data-v-448ac300]{margin-bottom:0}.audit-card__desc[data-v-448ac300]{margin:0;font-size:13px;color:#374151;line-height:1.55;word-break:break-word}
|
|
1
|
+
.ProseMirror span.comment-mark,.umo-editor span.comment-mark{border-bottom:2px solid #fbbf24;background-color:transparent;border-radius:0;cursor:text;transition:border-bottom-color .15s}.ProseMirror span.comment-mark:hover,.umo-editor span.comment-mark:hover{border-bottom-color:#facc15}.ProseMirror span.comment-mark--active,.umo-editor span.comment-mark--active{background-color:transparent;border-bottom-color:#f59e0b}.comment-panel[data-v-7d1d2127]{box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:100%;border-left:1px solid #e5e7eb;background:#fafafa;display:flex;flex-direction:column;overflow:hidden}.comment-panel__header[data-v-7d1d2127]{padding:14px 16px 10px;border-bottom:1px solid #e5e7eb;background:#fff}.comment-panel__title[data-v-7d1d2127]{margin:0;font-size:14px;font-weight:600;color:#374151;display:flex;align-items:center;gap:6px}.comment-panel__badge[data-v-7d1d2127]{background:#f59e0b;color:#fff;border-radius:10px;font-size:11px;padding:1px 6px;font-weight:500}.comment-panel__empty[data-v-7d1d2127]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#9ca3af;gap:4px;padding:24px;text-align:center}.comment-panel__empty p[data-v-7d1d2127]{margin:0;font-size:13px}.comment-panel__empty-icon[data-v-7d1d2127]{font-size:32px;margin-bottom:8px;opacity:.5}.comment-panel__empty-hint[data-v-7d1d2127]{font-size:12px!important;color:#d1d5db}.comment-panel__list[data-v-7d1d2127]{list-style:none;margin:0;padding:8px;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:8px}.comment-item[data-v-7d1d2127]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:10px 12px;cursor:pointer;transition:border-color .15s,box-shadow .15s}.comment-item[data-v-7d1d2127]:hover{border-color:#fbbf24;box-shadow:0 1px 4px #fbbf2426}.comment-item--active[data-v-7d1d2127]{border-color:#f59e0b;box-shadow:0 0 0 2px #f59e0b33}.comment-item--resolved[data-v-7d1d2127]{opacity:.55}.comment-item--resolved .comment-item__note[data-v-7d1d2127]{text-decoration:line-through;color:#9ca3af}.comment-item__quote[data-v-7d1d2127]{font-size:12px;color:#6b7280;background:#fef9c3;border-left:3px solid #fbbf24;padding:4px 8px;border-radius:0 4px 4px 0;margin-bottom:6px;line-height:1.4}.comment-item__quote-icon[data-v-7d1d2127]{color:#fbbf24;margin-right:2px}.comment-item--c0 .comment-item__quote[data-v-7d1d2127]{background:#fef3c7cc;border-left-color:#f97316}.comment-item--c0 .comment-item__quote-icon[data-v-7d1d2127]{color:#f97316}.comment-item--c1 .comment-item__quote[data-v-7d1d2127]{background:#d1fae5d9;border-left-color:#22c55e}.comment-item--c1 .comment-item__quote-icon[data-v-7d1d2127]{color:#22c55e}.comment-item--c2 .comment-item__quote[data-v-7d1d2127]{background:#dbeafed9;border-left-color:#3b82f6}.comment-item--c2 .comment-item__quote-icon[data-v-7d1d2127]{color:#3b82f6}.comment-item--c3 .comment-item__quote[data-v-7d1d2127]{background:#ede9fee6;border-left-color:#a855f7}.comment-item--c3 .comment-item__quote-icon[data-v-7d1d2127]{color:#a855f7}.comment-item--c4 .comment-item__quote[data-v-7d1d2127]{background:#fce7f3e6;border-left-color:#ec4899}.comment-item--c4 .comment-item__quote-icon[data-v-7d1d2127]{color:#ec4899}.comment-item--c5 .comment-item__quote[data-v-7d1d2127]{background:#ccfbf1d9;border-left-color:#14b8a6}.comment-item--c5 .comment-item__quote-icon[data-v-7d1d2127]{color:#14b8a6}.comment-item--c6 .comment-item__quote[data-v-7d1d2127]{background:#fef9c3e6;border-left-color:#eab308}.comment-item--c6 .comment-item__quote-icon[data-v-7d1d2127]{color:#eab308}.comment-item--c7 .comment-item__quote[data-v-7d1d2127]{background:#ffe4e6e6;border-left-color:#f43f5e}.comment-item--c7 .comment-item__quote-icon[data-v-7d1d2127]{color:#f43f5e}.comment-item--c8 .comment-item__quote[data-v-7d1d2127]{background:#e0e7ffe6;border-left-color:#6366f1}.comment-item--c8 .comment-item__quote-icon[data-v-7d1d2127]{color:#6366f1}.comment-item--c9 .comment-item__quote[data-v-7d1d2127]{background:#ecfdc8e6;border-left-color:#84cc16}.comment-item--c9 .comment-item__quote-icon[data-v-7d1d2127]{color:#84cc16}.comment-item--c10 .comment-item__quote[data-v-7d1d2127]{background:#cffafee6;border-left-color:#06b6d4}.comment-item--c10 .comment-item__quote-icon[data-v-7d1d2127]{color:#06b6d4}.comment-item--c11 .comment-item__quote[data-v-7d1d2127]{background:#d1fae5d9;border-left-color:#10b981}.comment-item--c11 .comment-item__quote-icon[data-v-7d1d2127]{color:#10b981}.comment-item--c12 .comment-item__quote[data-v-7d1d2127]{background:#ede9fee6;border-left-color:#8b5cf6}.comment-item--c12 .comment-item__quote-icon[data-v-7d1d2127]{color:#8b5cf6}.comment-item--c13 .comment-item__quote[data-v-7d1d2127]{background:#faf0ffe6;border-left-color:#d946ef}.comment-item--c13 .comment-item__quote-icon[data-v-7d1d2127]{color:#d946ef}.comment-item--c14 .comment-item__quote[data-v-7d1d2127]{background:#e0f2fee6;border-left-color:#0ea5e9}.comment-item--c14 .comment-item__quote-icon[data-v-7d1d2127]{color:#0ea5e9}.comment-item--c15 .comment-item__quote[data-v-7d1d2127]{background:#ffedd5e6;border-left-color:#ea580c}.comment-item--c15 .comment-item__quote-icon[data-v-7d1d2127]{color:#ea580c}.comment-item--c16 .comment-item__quote[data-v-7d1d2127]{background:#fefce8e6;border-left-color:#ca8a04}.comment-item--c16 .comment-item__quote-icon[data-v-7d1d2127]{color:#ca8a04}.comment-item--c17 .comment-item__quote[data-v-7d1d2127]{background:#fee2e2e6;border-left-color:#dc2626}.comment-item--c17 .comment-item__quote-icon[data-v-7d1d2127]{color:#dc2626}.comment-item--c18 .comment-item__quote[data-v-7d1d2127]{background:#ccfbf1d9;border-left-color:#0d9488}.comment-item--c18 .comment-item__quote-icon[data-v-7d1d2127]{color:#0d9488}.comment-item--c19 .comment-item__quote[data-v-7d1d2127]{background:#f1f5f9e6;border-left-color:#64748b}.comment-item--c19 .comment-item__quote-icon[data-v-7d1d2127]{color:#64748b}.comment-item__note[data-v-7d1d2127]{font-size:13px;color:#374151;line-height:1.5;margin-bottom:6px;word-break:break-word}.comment-item__meta[data-v-7d1d2127]{display:flex;justify-content:space-between;font-size:11px;color:#9ca3af;margin-bottom:8px}.comment-item__author[data-v-7d1d2127]{font-weight:500}.comment-item__actions[data-v-7d1d2127]{display:flex;gap:6px;justify-content:flex-end}.comment-btn[data-v-7d1d2127]{border:none;border-radius:4px;padding:3px 8px;font-size:11px;cursor:pointer;transition:background .15s}.comment-btn--resolve[data-v-7d1d2127]{background:#ecfdf5;color:#059669}.comment-btn--resolve[data-v-7d1d2127]:hover{background:#d1fae5}.comment-btn--delete[data-v-7d1d2127]{background:#fef2f2;color:#dc2626}.comment-btn--delete[data-v-7d1d2127]:hover{background:#fee2e2}.dialog-backdrop[data-v-8cbc8293]{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:9999}.dialog[data-v-8cbc8293]{background:#fff;border-radius:10px;box-shadow:0 20px 60px #00000026,0 4px 12px #00000014;width:460px;max-width:calc(100vw - 32px);overflow:hidden}.dialog__header[data-v-8cbc8293]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid #e5e7eb}.dialog__title[data-v-8cbc8293]{margin:0;font-size:15px;font-weight:600;color:#111827}.dialog__close[data-v-8cbc8293]{border:none;background:none;font-size:14px;color:#9ca3af;cursor:pointer;padding:4px 6px;border-radius:4px;line-height:1}.dialog__close[data-v-8cbc8293]:hover{background:#f3f4f6;color:#374151}.dialog__quote[data-v-8cbc8293]{padding:12px 20px 0}.dialog__quote-label[data-v-8cbc8293]{font-size:11px;font-weight:500;color:#9ca3af;text-transform:uppercase;letter-spacing:.05em}.dialog__quote-text[data-v-8cbc8293]{margin:4px 0 0;padding:8px 12px;background:#fef9c3;border-left:3px solid #fbbf24;border-radius:0 4px 4px 0;font-size:13px;color:#374151;line-height:1.5}.dialog__body[data-v-8cbc8293]{padding:16px 20px 0}.dialog__label[data-v-8cbc8293]{display:block;font-size:12px;font-weight:500;color:#374151;margin-bottom:6px}.dialog__textarea[data-v-8cbc8293]{width:100%;border:1px solid #d1d5db;border-radius:6px;padding:10px 12px;font-size:14px;font-family:inherit;resize:vertical;box-sizing:border-box;transition:border-color .15s,box-shadow .15s;outline:none;color:#111827;line-height:1.5}.dialog__textarea[data-v-8cbc8293]:focus{border-color:#f59e0b;box-shadow:0 0 0 3px #f59e0b26}.dialog__hint[data-v-8cbc8293]{margin:6px 0 0;font-size:11px;color:#9ca3af}.dialog__footer[data-v-8cbc8293]{display:flex;justify-content:flex-end;gap:8px;padding:16px 20px}.dialog__btn[data-v-8cbc8293]{border:none;border-radius:6px;padding:8px 16px;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s}.dialog__btn--cancel[data-v-8cbc8293]{background:#f3f4f6;color:#374151}.dialog__btn--cancel[data-v-8cbc8293]:hover{background:#e5e7eb}.dialog__btn--confirm[data-v-8cbc8293]{background:#f59e0b;color:#fff}.dialog__btn--confirm[data-v-8cbc8293]:hover:not(:disabled){background:#d97706}.dialog__btn--confirm[data-v-8cbc8293]:disabled{opacity:.45;cursor:not-allowed}.comment-gutter[data-v-ac6164bd]{position:absolute;top:12px;right:-300px;width:280px;pointer-events:none;display:flex;flex-direction:column}.gutter-item-wrapper[data-v-ac6164bd]{pointer-events:auto}.gutter-item[data-v-ac6164bd]{position:relative;width:100%;background:#fff;border:1px solid #e5e7eb;border-left-width:4px;border-radius:8px;padding:8px 10px;box-shadow:0 8px 18px #0000000f;cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;transition:transform .12s,box-shadow .12s,border-color .12s}.gutter-item[data-v-ac6164bd]:hover{transform:translateY(-1px);box-shadow:0 10px 22px #00000014}.gutter-item--active[data-v-ac6164bd]{border-color:#f59e0b;box-shadow:0 0 0 2px #f59e0b38,0 10px 22px #00000014}.gutter-item--resolved[data-v-ac6164bd]{opacity:.6}.gutter-item__quote[data-v-ac6164bd]{font-size:12px;color:#6b7280;margin-bottom:4px}.gutter-item__note[data-v-ac6164bd]{font-size:13px;color:#374151;line-height:1.35;margin-bottom:6px;word-break:break-word}.gutter-item__meta[data-v-ac6164bd]{display:flex;justify-content:space-between;font-size:11px;color:#9ca3af}.gutter-item--c0[data-v-ac6164bd]{border-left-color:#f97316}.gutter-item--c1[data-v-ac6164bd]{border-left-color:#22c55e}.gutter-item--c2[data-v-ac6164bd]{border-left-color:#3b82f6}.gutter-item--c3[data-v-ac6164bd]{border-left-color:#a855f7}.gutter-item--c4[data-v-ac6164bd]{border-left-color:#ec4899}.gutter-item--c5[data-v-ac6164bd]{border-left-color:#14b8a6}.gutter-item--c6[data-v-ac6164bd]{border-left-color:#eab308}.gutter-item--c7[data-v-ac6164bd]{border-left-color:#f43f5e}.gutter-item--c8[data-v-ac6164bd]{border-left-color:#6366f1}.gutter-item--c9[data-v-ac6164bd]{border-left-color:#84cc16}.gutter-item--c10[data-v-ac6164bd]{border-left-color:#06b6d4}.gutter-item--c11[data-v-ac6164bd]{border-left-color:#10b981}.gutter-item--c12[data-v-ac6164bd]{border-left-color:#8b5cf6}.gutter-item--c13[data-v-ac6164bd]{border-left-color:#d946ef}.gutter-item--c14[data-v-ac6164bd]{border-left-color:#0ea5e9}.gutter-item--c15[data-v-ac6164bd]{border-left-color:#ea580c}.gutter-item--c16[data-v-ac6164bd]{border-left-color:#ca8a04}.gutter-item--c17[data-v-ac6164bd]{border-left-color:#dc2626}.gutter-item--c18[data-v-ac6164bd]{border-left-color:#0d9488}.gutter-item--c19[data-v-ac6164bd]{border-left-color:#64748b}.umo-editor-content .tableWrapper{max-width:100%;box-sizing:border-box}.umo-editor-content table{width:100%!important;max-width:100%;box-sizing:border-box}.umo-editor-content table td,.umo-editor-content table th{box-sizing:border-box}.umo-editor-content table:has(colgroup[data-word-col-layout]) td,.umo-editor-content table:has(colgroup[data-word-col-layout]) th,.umo-editor-content table:has(colgroup[data-word-col-layout]){border:none!important;outline:none!important}.umo-editor-content table:has(colgroup col:nth-child(2)){table-layout:fixed}.umo-editor-content ul[type=disc] li>p:before,.umo-editor-content ul[type=circle] li>p:before,.umo-editor-content ul[type=square] li>p:before{content:none}.auth-page[data-v-9f2d36df]{min-height:100%;display:flex;align-items:center;justify-content:center;background:#f3f4f6}.auth-card[data-v-9f2d36df]{background:#fff;border-radius:12px;padding:40px 36px;width:340px;box-shadow:0 4px 24px #0000001a}.auth-title[data-v-9f2d36df]{font-size:20px;font-weight:700;color:#111827;text-align:center;margin:0 0 24px}.auth-tabs[data-v-9f2d36df]{display:flex;gap:0;border:1px solid #e5e7eb;border-radius:8px;overflow:hidden;margin-bottom:20px}.auth-tab[data-v-9f2d36df]{flex:1;padding:8px;border:none;background:transparent;cursor:pointer;font-size:14px;color:#6b7280;transition:background .15s,color .15s}.auth-tab--active[data-v-9f2d36df]{background:#3b82f6;color:#fff}.auth-form[data-v-9f2d36df]{display:flex;flex-direction:column;gap:12px}.auth-input[data-v-9f2d36df]{padding:10px 14px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;outline:none;transition:border-color .15s}.auth-input[data-v-9f2d36df]:focus{border-color:#3b82f6}.auth-submit[data-v-9f2d36df]{padding:10px;border:none;border-radius:8px;background:#3b82f6;color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s}.auth-submit[data-v-9f2d36df]:hover:not(:disabled){background:#2563eb}.auth-submit[data-v-9f2d36df]:disabled{opacity:.6;cursor:not-allowed}.auth-error[data-v-9f2d36df]{color:#ef4444;font-size:13px;margin:0}.app-layout[data-v-9f2d36df]{display:flex;width:100%;height:100%;overflow:hidden}.editor-wrapper[data-v-9f2d36df]{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden}.app-layout__comment-aside[data-v-9f2d36df]{flex:0 1 clamp(280px,36vw,720px);min-width:0;max-width:100%;display:flex;flex-direction:column;overflow:hidden}.comment-toolbar[data-v-9f2d36df]{display:flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border-bottom:1px solid #e5e7eb;z-index:10;flex-shrink:0}.toolbar-docname[data-v-9f2d36df]{flex:1;min-width:0}.toolbar-docname__input[data-v-9f2d36df]{width:100%;border:1px solid transparent;border-radius:4px;padding:3px 6px;font-size:14px;font-weight:600;color:#111827;background:transparent;outline:none;transition:border-color .15s,background .15s}.toolbar-docname__input[data-v-9f2d36df]:hover,.toolbar-docname__input[data-v-9f2d36df]:focus{border-color:#d1d5db;background:#f9fafb}.toolbar-docname--empty[data-v-9f2d36df]{font-size:13px;color:#9ca3af}.toolbar-actions[data-v-9f2d36df]{display:flex;gap:8px;flex-shrink:0}.toolbar-btn[data-v-9f2d36df]{display:inline-flex;align-items:center;gap:5px;border:none;border-radius:6px;padding:6px 14px;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s,opacity .15s}.toolbar-btn[data-v-9f2d36df]:disabled{opacity:.5;cursor:not-allowed}.toolbar-btn__icon[data-v-9f2d36df]{font-size:15px}.toolbar-btn--save[data-v-9f2d36df]{background:#d1fae5;color:#065f46}.toolbar-btn--save[data-v-9f2d36df]:hover:not(:disabled){background:#a7f3d0}.toolbar-btn--primary[data-v-9f2d36df]{background:#fef3c7;color:#92400e}.toolbar-btn--primary[data-v-9f2d36df]:hover:not(:disabled){background:#fde68a}.toolbar-btn--ai[data-v-9f2d36df]{background:#ede9fe;color:#5b21b6}.toolbar-btn--ai[data-v-9f2d36df]:hover:not(:disabled){background:#ddd6fe}.umo-editor-instance[data-v-9f2d36df]{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}.umo-editor-stage[data-v-9f2d36df]{position:relative;flex:1;min-height:0;overflow:hidden}.umo-editor-stage.comment-hidden[data-v-9f2d36df] .comment-mark[data-comment-source=doc-origin]{background-color:transparent!important;border-bottom-color:transparent!important;border-bottom-width:0!important}.umo-editor-stage[data-v-9f2d36df]:fullscreen{width:100vw;height:100vh;background:#fff}.editor-placeholder[data-v-9f2d36df]{flex:1;display:flex;align-items:center;justify-content:center;color:#9ca3af;font-size:14px}.umo-custom-huge-btn[data-v-9f2d36df]{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;width:auto;height:56px;padding:0 5px;margin:0;border:none;border-radius:var(--umo-radius, 3px);background:transparent;cursor:pointer;transition:background .2s;white-space:nowrap}.umo-custom-huge-btn[data-v-9f2d36df]:hover:not(:disabled){background:var(--umo-button-hover-background, rgba(0, 0, 0, .06))}.umo-custom-huge-btn[data-v-9f2d36df]:disabled{opacity:.5;cursor:not-allowed}.umo-custom-huge-btn__icon[data-v-9f2d36df]{display:flex;align-items:center;justify-content:center;color:var(--umo-text-color, #3d3d3d);margin-top:3px}.umo-custom-huge-btn__icon svg[data-v-9f2d36df]{width:24px;height:24px}.umo-custom-huge-btn__text[data-v-9f2d36df]{display:block;font-size:12px;color:var(--umo-text-color, #3d3d3d);margin-top:2px;line-height:1.2}.html-dialog-mask[data-v-9f2d36df]{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:9999}.html-dialog[data-v-9f2d36df]{background:#1e1e2e;border-radius:10px;width:min(860px,92vw);max-height:80vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #0006}.html-dialog__header[data-v-9f2d36df]{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #313244;flex-shrink:0}.html-dialog__title[data-v-9f2d36df]{font-size:14px;font-weight:600;color:#cdd6f4}.html-dialog__close[data-v-9f2d36df]{background:none;border:none;color:#6c7086;font-size:16px;cursor:pointer;padding:2px 6px;border-radius:4px;line-height:1;transition:color .15s,background .15s}.html-dialog__close[data-v-9f2d36df]:hover{color:#cdd6f4;background:#313244}.html-dialog__toolbar[data-v-9f2d36df]{display:flex;justify-content:flex-end;padding:8px 16px;border-bottom:1px solid #313244;flex-shrink:0}.html-dialog__copy-btn[data-v-9f2d36df]{font-size:12px;padding:4px 14px;border-radius:5px;border:1px solid #45475a;background:#313244;color:#cdd6f4;cursor:pointer;transition:background .15s,border-color .15s}.html-dialog__copy-btn[data-v-9f2d36df]:hover{background:#45475a;border-color:#89b4fa;color:#89b4fa}.html-dialog__content[data-v-9f2d36df]{flex:1;overflow:auto;margin:0;padding:16px 20px;font-family:Fira Code,Consolas,Courier New,monospace;font-size:12.5px;line-height:1.7;color:#a6e3a1;white-space:pre-wrap;word-break:break-all}[data-v-9f2d36df] table:has(colgroup[data-word-col-layout]) td,[data-v-9f2d36df] table:has(colgroup[data-word-col-layout]) th,[data-v-9f2d36df] table:has(colgroup[data-word-col-layout]){border:none!important;outline:none!important}.complex-comment-panel[data-v-d1af65ab]{box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:100%;border-left:1px solid #e5e7eb;background:#f3f4f6;display:flex;flex-direction:column;overflow:hidden}.complex-comment-panel__header[data-v-d1af65ab]{padding:12px 14px 10px;background:#fff;border-bottom:1px solid #e5e7eb}.complex-comment-panel__title[data-v-d1af65ab]{margin:0 0 10px;font-size:16px;font-weight:600;color:#111827}.complex-comment-panel__title-row[data-v-d1af65ab]{display:flex;align-items:center;gap:10px}.review-streaming-banner[data-v-d1af65ab]{display:inline-flex;align-items:center;gap:8px;margin-bottom:10px;padding:6px 10px;border-radius:999px;border:1px solid rgba(22,119,255,.2);background:#1677ff14;color:#1677ff;font-size:12px;line-height:1;width:fit-content;box-shadow:inset 0 1px #ffffffbf,0 6px 18px #1677ff33}.review-streaming-dot[data-v-d1af65ab]{width:7px;height:7px;border-radius:50%;background:#1677ff;box-shadow:0 0 0 4px #1677ff29;animation:review-streaming-pulse-d1af65ab 1.1s ease-in-out infinite}@keyframes review-streaming-pulse-d1af65ab{0%,to{transform:scale(1)}50%{transform:scale(1.15)}}.complex-comment-panel__toolbar[data-v-d1af65ab]{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}.complex-comment-panel__download[data-v-d1af65ab]{border:none;border-radius:4px;padding:5px 14px;font-size:13px;font-weight:500;cursor:pointer;background:#2563eb;color:#fff}.complex-comment-panel__download[data-v-d1af65ab]:hover{background:#1d4ed8}.complex-comment-panel__risk-toggle[data-v-d1af65ab]{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#4b5563;cursor:pointer;-webkit-user-select:none;user-select:none}.complex-comment-panel__risk-toggle input[data-v-d1af65ab]{width:14px;height:14px;cursor:pointer}.complex-comment-panel__empty[data-v-d1af65ab]{flex:1;display:flex;align-items:center;justify-content:center;color:#9ca3af;font-size:14px}.complex-comment-panel__tabs[data-v-d1af65ab]{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px;background:#fff;border-bottom:1px solid #e5e7eb}.complex-comment-panel__tab[data-v-d1af65ab]{border:1px solid #e5e7eb;background:#fff;border-radius:4px;padding:4px 10px;font-size:12px;color:#6b7280;cursor:pointer}.complex-comment-panel__tab[data-v-d1af65ab]:hover{border-color:#93c5fd;color:#2563eb}.complex-comment-panel__tab--active[data-v-d1af65ab]{border-color:#2563eb;color:#2563eb;background:#eff6ff;font-weight:500}.complex-comment-panel__body[data-v-d1af65ab]{flex:1;overflow-y:auto;padding:10px 12px 16px;display:flex;flex-direction:column;gap:14px}.complex-comment-panel__section-head[data-v-d1af65ab]{margin-bottom:8px}.complex-comment-panel__section-title[data-v-d1af65ab]{font-size:14px;font-weight:600;color:#111827}.complex-comment-panel__cards[data-v-d1af65ab]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.audit-card[data-v-d1af65ab]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px 14px;cursor:pointer;transition:border-color .15s,box-shadow .15s}.audit-card[data-v-d1af65ab]:hover{border-color:#d1d5db;box-shadow:0 1px 3px #0000000f}.audit-card--active[data-v-d1af65ab],.audit-card--active[data-v-d1af65ab]:hover{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb33}.audit-card__head[data-v-d1af65ab]{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}.audit-card__point[data-v-d1af65ab]{font-size:14px;font-weight:600;color:#111827;line-height:1.4;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.audit-card__badge[data-v-d1af65ab]{flex-shrink:0;font-size:12px;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap}.audit-card__badge--risk[data-v-d1af65ab]{background:#fee2e2;color:#dc2626}.audit-card__badge--ok[data-v-d1af65ab]{background:#22c55e;color:#fff}.audit-card__badge--muted[data-v-d1af65ab]{background:#f3f4f6;color:#6b7280}.audit-card__block[data-v-d1af65ab]{margin-bottom:4px}.audit-card__label[data-v-d1af65ab]{font-size:12px;color:#9ca3af;margin-bottom:6px}.audit-card__label--strong[data-v-d1af65ab]{color:#111827;font-weight:500}.audit-card__quote[data-v-d1af65ab]{font-size:13px;color:#6b7280;line-height:1.5;padding:8px 10px 8px 12px;border-left:3px solid #d1d5db;background:#f9fafb;border-radius:0 4px 4px 0;word-break:break-word}.audit-card__locate[data-v-d1af65ab]{margin-top:8px;border:none;background:none;padding:0;font-size:12px;color:#2563eb;cursor:pointer;display:inline-flex;align-items:center;gap:4px}.audit-card__locate[data-v-d1af65ab]:hover{text-decoration:underline}.audit-card__locate-icon[data-v-d1af65ab]{font-size:14px;line-height:1;opacity:.85}.audit-card__divider[data-v-d1af65ab]{height:1px;background:#e5e7eb;margin:12px 0}.audit-card__block--desc[data-v-d1af65ab]{margin-bottom:0}.audit-card__desc[data-v-d1af65ab]{margin:0;font-size:13px;color:#374151;line-height:1.55;word-break:break-word}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useUmoEditor as Vn } from "@umoteam/editor";
|
|
2
2
|
import { computed as X, ref as I, watch as ct, nextTick as Ie, openBlock as T, createElementBlock as A, createElementVNode as l, createTextVNode as Ce, toDisplayString as N, createCommentVNode as ft, Fragment as St, renderList as Jt, normalizeClass as Tt, withModifiers as ht, onMounted as Se, createBlock as Rt, Teleport as Te, withDirectives as mn, withKeys as Ee, vModelText as Kn, normalizeStyle as jn, defineComponent as Yn, onUnmounted as Ke, useAttrs as Xn, resolveComponent as Qn, createVNode as Zn, mergeProps as to, withCtx as je, renderSlot as eo, unref as xt, createApp as no, h as oo, vModelCheckbox as ro } from "vue";
|
|
3
|
-
import { E as dn, p as fn, m as so, g as Ye, u as io, e as lo, a as Xe, b as ao, c as Qe, s as Ze, C as co, d as dt } from "./wordDocxExport-
|
|
3
|
+
import { E as dn, p as fn, m as so, g as Ye, u as io, e as lo, a as Xe, b as ao, c as Qe, s as Ze, C as co, d as dt } from "./wordDocxExport-DyFbvZqL.js";
|
|
4
4
|
import { parseDocxToJson as uo, parseDocxToHtml as mo, parseDocxComments as fo } from "./wordDocxImport.js";
|
|
5
5
|
const Pt = (s, t) => {
|
|
6
6
|
const e = s.__vccOpts || s;
|
|
@@ -41,7 +41,7 @@ const Pt = (s, t) => {
|
|
|
41
41
|
() => e.activeCommentId,
|
|
42
42
|
async (d) => {
|
|
43
43
|
if (!d) return;
|
|
44
|
-
await Ie();
|
|
44
|
+
await Ie(), await new Promise(($) => setTimeout($, 0));
|
|
45
45
|
const m = r.value;
|
|
46
46
|
if (!(m instanceof HTMLElement)) return;
|
|
47
47
|
const h = m.querySelector(`[data-comment-id="${d}"]`);
|
|
@@ -73,7 +73,7 @@ const Pt = (s, t) => {
|
|
|
73
73
|
}
|
|
74
74
|
]]),
|
|
75
75
|
"data-comment-id": h.id,
|
|
76
|
-
onClick: (
|
|
76
|
+
onClick: ($) => a(h.id)
|
|
77
77
|
}, [
|
|
78
78
|
l("div", ko, [
|
|
79
79
|
m[2] || (m[2] = l("span", { class: "comment-item__quote-icon" }, "❝", -1)),
|
|
@@ -88,19 +88,19 @@ const Pt = (s, t) => {
|
|
|
88
88
|
l("button", {
|
|
89
89
|
class: "comment-btn comment-btn--resolve",
|
|
90
90
|
type: "button",
|
|
91
|
-
onClick: ht((
|
|
91
|
+
onClick: ht(($) => n("resolve", h.id), ["stop"])
|
|
92
92
|
}, N(h.resolved ? "取消解决" : "已解决"), 9, To),
|
|
93
93
|
l("button", {
|
|
94
94
|
class: "comment-btn comment-btn--delete",
|
|
95
95
|
type: "button",
|
|
96
|
-
onClick: ht((
|
|
96
|
+
onClick: ht(($) => n("delete", h.id), ["stop"])
|
|
97
97
|
}, " 删除 ", 8, Eo)
|
|
98
98
|
])
|
|
99
99
|
], 10, wo))), 128))
|
|
100
100
|
]))
|
|
101
101
|
], 512));
|
|
102
102
|
}
|
|
103
|
-
}, Mo = /* @__PURE__ */ Pt(No, [["__scopeId", "data-v-
|
|
103
|
+
}, Mo = /* @__PURE__ */ Pt(No, [["__scopeId", "data-v-7d1d2127"]]), Io = { class: "dialog" }, Oo = { class: "dialog__header" }, Ao = {
|
|
104
104
|
key: 0,
|
|
105
105
|
class: "dialog__quote"
|
|
106
106
|
}, Do = { class: "dialog__quote-text" }, $o = { class: "dialog__body" }, zo = ["onKeydown"], Ro = { class: "dialog__footer" }, Jo = ["disabled"], Bo = {
|
|
@@ -233,9 +233,9 @@ const Pt = (s, t) => {
|
|
|
233
233
|
const a = [];
|
|
234
234
|
let d = 0;
|
|
235
235
|
const m = t.itemHeight, h = t.minGap;
|
|
236
|
-
for (const
|
|
237
|
-
const L =
|
|
238
|
-
a.push({
|
|
236
|
+
for (const $ of r.value) {
|
|
237
|
+
const L = $.anchorTop, P = L - d, _ = P > 0 ? P : 0;
|
|
238
|
+
a.push({ ...$, marginTop: _ }), d = L + m + h;
|
|
239
239
|
}
|
|
240
240
|
return a;
|
|
241
241
|
});
|
|
@@ -318,7 +318,7 @@ function pn(s, t, e, n) {
|
|
|
318
318
|
e -= d, n -= d;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
class
|
|
321
|
+
class R {
|
|
322
322
|
/**
|
|
323
323
|
@internal
|
|
324
324
|
*/
|
|
@@ -373,7 +373,7 @@ class z {
|
|
|
373
373
|
let e = this.lastChild, n = t.firstChild, o = this.content.slice(), r = 0;
|
|
374
374
|
for (e.isText && e.sameMarkup(n) && (o[o.length - 1] = e.withText(e.text + n.text), r = 1); r < t.content.length; r++)
|
|
375
375
|
o.push(t.content[r]);
|
|
376
|
-
return new
|
|
376
|
+
return new R(o, this.size + t.size);
|
|
377
377
|
}
|
|
378
378
|
/**
|
|
379
379
|
Cut out the sub-fragment between the two given positions.
|
|
@@ -387,13 +387,13 @@ class z {
|
|
|
387
387
|
let a = this.content[r], d = u + a.nodeSize;
|
|
388
388
|
d > t && ((u < t || d > e) && (a.isText ? a = a.cut(Math.max(0, t - u), Math.min(a.text.length, e - u)) : a = a.cut(Math.max(0, t - u - 1), Math.min(a.content.size, e - u - 1))), n.push(a), o += a.nodeSize), u = d;
|
|
389
389
|
}
|
|
390
|
-
return new
|
|
390
|
+
return new R(n, o);
|
|
391
391
|
}
|
|
392
392
|
/**
|
|
393
393
|
@internal
|
|
394
394
|
*/
|
|
395
395
|
cutByIndex(t, e) {
|
|
396
|
-
return t == e ?
|
|
396
|
+
return t == e ? R.empty : t == 0 && e == this.content.length ? this : new R(this.content.slice(t, e));
|
|
397
397
|
}
|
|
398
398
|
/**
|
|
399
399
|
Create a new fragment in which the node at the given index is
|
|
@@ -404,21 +404,21 @@ class z {
|
|
|
404
404
|
if (n == e)
|
|
405
405
|
return this;
|
|
406
406
|
let o = this.content.slice(), r = this.size + e.nodeSize - n.nodeSize;
|
|
407
|
-
return o[t] = e, new
|
|
407
|
+
return o[t] = e, new R(o, r);
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
410
410
|
Create a new fragment by prepending the given node to this
|
|
411
411
|
fragment.
|
|
412
412
|
*/
|
|
413
413
|
addToStart(t) {
|
|
414
|
-
return new
|
|
414
|
+
return new R([t].concat(this.content), this.size + t.nodeSize);
|
|
415
415
|
}
|
|
416
416
|
/**
|
|
417
417
|
Create a new fragment by appending the given node to this
|
|
418
418
|
fragment.
|
|
419
419
|
*/
|
|
420
420
|
addToEnd(t) {
|
|
421
|
-
return new
|
|
421
|
+
return new R(this.content.concat(t), this.size + t.nodeSize);
|
|
422
422
|
}
|
|
423
423
|
/**
|
|
424
424
|
Compare this fragment to another one.
|
|
@@ -533,10 +533,10 @@ class z {
|
|
|
533
533
|
*/
|
|
534
534
|
static fromJSON(t, e) {
|
|
535
535
|
if (!e)
|
|
536
|
-
return
|
|
536
|
+
return R.empty;
|
|
537
537
|
if (!Array.isArray(e))
|
|
538
538
|
throw new RangeError("Invalid input for Fragment.fromJSON");
|
|
539
|
-
return new
|
|
539
|
+
return new R(e.map(t.nodeFromJSON));
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
542
542
|
Build a fragment from an array of nodes. Ensures that adjacent
|
|
@@ -544,13 +544,13 @@ class z {
|
|
|
544
544
|
*/
|
|
545
545
|
static fromArray(t) {
|
|
546
546
|
if (!t.length)
|
|
547
|
-
return
|
|
547
|
+
return R.empty;
|
|
548
548
|
let e, n = 0;
|
|
549
549
|
for (let o = 0; o < t.length; o++) {
|
|
550
550
|
let r = t[o];
|
|
551
551
|
n += r.nodeSize, o && r.isText && t[o - 1].sameMarkup(r) ? (e || (e = t.slice(0, o)), e[e.length - 1] = r.withText(e[e.length - 1].text + r.text)) : e && e.push(r);
|
|
552
552
|
}
|
|
553
|
-
return new
|
|
553
|
+
return new R(e || t, n);
|
|
554
554
|
}
|
|
555
555
|
/**
|
|
556
556
|
Create a fragment from something that can be interpreted as a
|
|
@@ -560,17 +560,17 @@ class z {
|
|
|
560
560
|
*/
|
|
561
561
|
static from(t) {
|
|
562
562
|
if (!t)
|
|
563
|
-
return
|
|
564
|
-
if (t instanceof
|
|
563
|
+
return R.empty;
|
|
564
|
+
if (t instanceof R)
|
|
565
565
|
return t;
|
|
566
566
|
if (Array.isArray(t))
|
|
567
567
|
return this.fromArray(t);
|
|
568
568
|
if (t.attrs)
|
|
569
|
-
return new
|
|
569
|
+
return new R([t], t.nodeSize);
|
|
570
570
|
throw new RangeError("Can not convert " + t + " to a Fragment" + (t.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
|
|
573
|
+
R.empty = new R([], 0);
|
|
574
574
|
const we = { index: 0, offset: 0 };
|
|
575
575
|
function te(s, t) {
|
|
576
576
|
return we.index = s, we.offset = t, we;
|
|
@@ -642,7 +642,7 @@ class D {
|
|
|
642
642
|
let n = e.openStart || 0, o = e.openEnd || 0;
|
|
643
643
|
if (typeof n != "number" || typeof o != "number")
|
|
644
644
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
645
|
-
return new D(
|
|
645
|
+
return new D(R.fromJSON(t, e.content), n, o);
|
|
646
646
|
}
|
|
647
647
|
/**
|
|
648
648
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -657,7 +657,7 @@ class D {
|
|
|
657
657
|
return new D(t, n, o);
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
D.empty = new D(
|
|
660
|
+
D.empty = new D(R.empty, 0, 0);
|
|
661
661
|
function gn(s, t, e) {
|
|
662
662
|
let { index: n, offset: o } = s.findIndex(t), r = s.maybeChild(n), { index: u, offset: a } = s.findIndex(e);
|
|
663
663
|
if (o == t || r.isText) {
|
|
@@ -758,13 +758,13 @@ class Q {
|
|
|
758
758
|
let d = this.ranges[a] - (this.inverted ? o : 0);
|
|
759
759
|
if (d > t)
|
|
760
760
|
break;
|
|
761
|
-
let m = this.ranges[a + r], h = this.ranges[a + u],
|
|
762
|
-
if (t <=
|
|
763
|
-
let L = m ? t == d ? -1 : t ==
|
|
761
|
+
let m = this.ranges[a + r], h = this.ranges[a + u], $ = d + m;
|
|
762
|
+
if (t <= $) {
|
|
763
|
+
let L = m ? t == d ? -1 : t == $ ? 1 : e : e, P = d + o + (L < 0 ? 0 : h);
|
|
764
764
|
if (n)
|
|
765
765
|
return P;
|
|
766
|
-
let _ = t == (e < 0 ? d :
|
|
767
|
-
return (e < 0 ? t != d : t !=
|
|
766
|
+
let _ = t == (e < 0 ? d : $) ? null : Yo(a / 3, t - d), y = t == d ? _n : t == $ ? kn : ne;
|
|
767
|
+
return (e < 0 ? t != d : t != $) && (y |= xn), new en(P, y, _);
|
|
768
768
|
}
|
|
769
769
|
o += h - m;
|
|
770
770
|
}
|
|
@@ -902,7 +902,7 @@ function Oe(s, t, e) {
|
|
|
902
902
|
let r = s.child(o);
|
|
903
903
|
r.content.size && (r = r.copy(Oe(r.content, t, r))), r.isInline && (r = t(r, e, o)), n.push(r);
|
|
904
904
|
}
|
|
905
|
-
return
|
|
905
|
+
return R.fromArray(n);
|
|
906
906
|
}
|
|
907
907
|
class yt extends j {
|
|
908
908
|
/**
|
|
@@ -994,7 +994,7 @@ class kt extends j {
|
|
|
994
994
|
if (!e)
|
|
995
995
|
return H.fail("No node at mark step's position");
|
|
996
996
|
let n = e.type.create(e.attrs, null, this.mark.addToSet(e.marks));
|
|
997
|
-
return H.fromReplace(t, this.pos, this.pos + 1, new D(
|
|
997
|
+
return H.fromReplace(t, this.pos, this.pos + 1, new D(R.from(n), 0, e.isLeaf ? 0 : 1));
|
|
998
998
|
}
|
|
999
999
|
invert(t) {
|
|
1000
1000
|
let e = t.nodeAt(this.pos);
|
|
@@ -1038,7 +1038,7 @@ class Ft extends j {
|
|
|
1038
1038
|
if (!e)
|
|
1039
1039
|
return H.fail("No node at mark step's position");
|
|
1040
1040
|
let n = e.type.create(e.attrs, null, this.mark.removeFromSet(e.marks));
|
|
1041
|
-
return H.fromReplace(t, this.pos, this.pos + 1, new D(
|
|
1041
|
+
return H.fromReplace(t, this.pos, this.pos + 1, new D(R.from(n), 0, e.isLeaf ? 0 : 1));
|
|
1042
1042
|
}
|
|
1043
1043
|
invert(t) {
|
|
1044
1044
|
let e = t.nodeAt(this.pos);
|
|
@@ -1201,7 +1201,7 @@ class Bt extends j {
|
|
|
1201
1201
|
n[r] = e.attrs[r];
|
|
1202
1202
|
n[this.attr] = this.value;
|
|
1203
1203
|
let o = e.type.create(n, null, e.marks);
|
|
1204
|
-
return H.fromReplace(t, this.pos, this.pos + 1, new D(
|
|
1204
|
+
return H.fromReplace(t, this.pos, this.pos + 1, new D(R.from(o), 0, e.isLeaf ? 0 : 1));
|
|
1205
1205
|
}
|
|
1206
1206
|
getMap() {
|
|
1207
1207
|
return Q.empty;
|
|
@@ -1541,7 +1541,7 @@ class ot extends W {
|
|
|
1541
1541
|
return n ? W.near(r) : new ot(r);
|
|
1542
1542
|
}
|
|
1543
1543
|
content() {
|
|
1544
|
-
return new D(
|
|
1544
|
+
return new D(R.from(this.node), 0, 0);
|
|
1545
1545
|
}
|
|
1546
1546
|
eq(t) {
|
|
1547
1547
|
return t instanceof ot && t.anchor == this.anchor;
|
|
@@ -1773,7 +1773,7 @@ const nr = new er("commentGutter"), or = dn.create({
|
|
|
1773
1773
|
if (u) return u;
|
|
1774
1774
|
const h = o.dom;
|
|
1775
1775
|
if (!h) return null;
|
|
1776
|
-
const
|
|
1776
|
+
const $ = h.closest?.(".umo-zoomable-container") || h.parentElement, L = $?.querySelector?.(".umo-zoomable-content") || $;
|
|
1777
1777
|
if (!L) return null;
|
|
1778
1778
|
const P = L.querySelector?.(".umo-watermark.umo-page-content") || L.querySelector?.(".umo-page-content") || null, _ = document.createElement("div");
|
|
1779
1779
|
if (_.className = "my-comment-gutter-root", (P || L).appendChild(_), u = _, !a && typeof n == "function") {
|
|
@@ -1790,7 +1790,7 @@ const nr = new er("commentGutter"), or = dn.create({
|
|
|
1790
1790
|
d();
|
|
1791
1791
|
const h = o.dom;
|
|
1792
1792
|
if (!h) return;
|
|
1793
|
-
const
|
|
1793
|
+
const $ = s?.(), P = t?.() || $ || h, _ = P.getBoundingClientRect(), y = typeof P.scrollTop == "number" ? P.scrollTop : 0, M = h.querySelectorAll(".comment-mark") || [], x = /* @__PURE__ */ new Map();
|
|
1794
1794
|
M.forEach((q) => {
|
|
1795
1795
|
const Z = fn(q);
|
|
1796
1796
|
if (!Z.length) return;
|
|
@@ -1891,12 +1891,12 @@ function ar(s, t) {
|
|
|
1891
1891
|
let r = null, u = null, a = null;
|
|
1892
1892
|
return e.doc.descendants((d, m) => {
|
|
1893
1893
|
if (!d.isText || !d.marks.find((P) => P.type === o && so(P.attrs, n))) return;
|
|
1894
|
-
const
|
|
1894
|
+
const $ = m, L = m + d.nodeSize;
|
|
1895
1895
|
if (r == null) {
|
|
1896
|
-
r =
|
|
1896
|
+
r = $, u = L, a = L;
|
|
1897
1897
|
return;
|
|
1898
1898
|
}
|
|
1899
|
-
if (a != null &&
|
|
1899
|
+
if (a != null && $ <= a + 1) {
|
|
1900
1900
|
u = Math.max(u ?? L, L), a = L;
|
|
1901
1901
|
return;
|
|
1902
1902
|
}
|
|
@@ -1999,7 +1999,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
1999
1999
|
}), Ke(() => {
|
|
2000
2000
|
document.removeEventListener("fullscreenchange", r);
|
|
2001
2001
|
});
|
|
2002
|
-
const a = s, d = e, m = X(() => !!a.enableCommentPanel), h = X(() => !!a.enableCommentBubble),
|
|
2002
|
+
const a = s, d = e, m = X(() => !!a.enableCommentPanel), h = X(() => !!a.enableCommentBubble), $ = X(() => m.value || h.value), L = Xn();
|
|
2003
2003
|
function P() {
|
|
2004
2004
|
V()?.setEditable?.(!!a.editable);
|
|
2005
2005
|
}
|
|
@@ -2223,7 +2223,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2223
2223
|
if (!v) return null;
|
|
2224
2224
|
const { doc: C } = i.state, S = Ot(c);
|
|
2225
2225
|
if (!S) return null;
|
|
2226
|
-
const b = !!f.preferDel, w = Number.isFinite(Number(f.preferFrom)) ? Number(f.preferFrom) : 0, K = f.source === bt ? bt : $t, gt = (
|
|
2226
|
+
const b = !!f.preferDel, w = Number.isFinite(Number(f.preferFrom)) ? Number(f.preferFrom) : 0, K = f.source === bt ? bt : $t, gt = (z) => !z || !z.isText ? !1 : (z.marks || []).some((k) => {
|
|
2227
2227
|
if (!k || !k.type) return !1;
|
|
2228
2228
|
if (k.type.name === "strike") return !0;
|
|
2229
2229
|
if (k.type.name === "textStyle") {
|
|
@@ -2231,10 +2231,10 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2231
2231
|
return typeof O == "string" && /line-through/i.test(O);
|
|
2232
2232
|
}
|
|
2233
2233
|
return !1;
|
|
2234
|
-
}), _t = (
|
|
2234
|
+
}), _t = (z) => !z || z.length !== 1 ? null : z[0] || null, vt = (z) => {
|
|
2235
2235
|
const F = [];
|
|
2236
2236
|
return C.descendants((k, O) => {
|
|
2237
|
-
if (k.isText && !(
|
|
2237
|
+
if (k.isText && !(z && !gt(k))) {
|
|
2238
2238
|
if (k.text && k.text.includes(v)) {
|
|
2239
2239
|
let U = 0;
|
|
2240
2240
|
for (; ; ) {
|
|
@@ -2258,7 +2258,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2258
2258
|
}
|
|
2259
2259
|
}
|
|
2260
2260
|
}), F;
|
|
2261
|
-
}, rt = (
|
|
2261
|
+
}, rt = (z, F) => {
|
|
2262
2262
|
const k = [];
|
|
2263
2263
|
if (C.descendants((B, nt) => {
|
|
2264
2264
|
if (B.isBlock && k.length > 0 && k.push({ char: " ", pos: null }), B.type.name === "hardBreak" && k.push({ char: " ", pos: null }), B.isText) {
|
|
@@ -2273,7 +2273,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2273
2273
|
const nt = Fe(k[B].char);
|
|
2274
2274
|
nt === " " ? J || (U += " ", O.push(B), J = !0) : (U += nt, O.push(B), J = !1);
|
|
2275
2275
|
}
|
|
2276
|
-
const G = Ot(
|
|
2276
|
+
const G = Ot(z);
|
|
2277
2277
|
if (!G) return [];
|
|
2278
2278
|
const st = [];
|
|
2279
2279
|
let tt = 0;
|
|
@@ -2297,7 +2297,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2297
2297
|
return st;
|
|
2298
2298
|
}, Qt = Be(p);
|
|
2299
2299
|
if (Qt) {
|
|
2300
|
-
const
|
|
2300
|
+
const z = (J) => (J || []).filter((G) => typeof G?.from == "number" && G.from >= w), F = vt(!1), k = rt(S, !1);
|
|
2301
2301
|
let O = !1, U = !1;
|
|
2302
2302
|
try {
|
|
2303
2303
|
const J = C.textBetween(0, C.content.size, `
|
|
@@ -2310,12 +2310,12 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2310
2310
|
textHead: v.slice(0, 80),
|
|
2311
2311
|
inDocRaw: O,
|
|
2312
2312
|
inDocNorm: U,
|
|
2313
|
-
node: { n: F.length, afterPrefer:
|
|
2314
|
-
across: { n: k.length, afterPrefer:
|
|
2313
|
+
node: { n: F.length, afterPrefer: z(F).length },
|
|
2314
|
+
across: { n: k.length, afterPrefer: z(k).length }
|
|
2315
2315
|
});
|
|
2316
2316
|
}
|
|
2317
2317
|
if (b) {
|
|
2318
|
-
const
|
|
2318
|
+
const z = vt(!0), F = Gt(i.state, z, w);
|
|
2319
2319
|
if (F)
|
|
2320
2320
|
return i.chain().setTextSelection(F).addComment(p, g, K).run(), F;
|
|
2321
2321
|
}
|
|
@@ -2323,7 +2323,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2323
2323
|
if (ge)
|
|
2324
2324
|
return i.chain().setTextSelection(ge).addComment(p, g, K).run(), ge;
|
|
2325
2325
|
if (b) {
|
|
2326
|
-
const
|
|
2326
|
+
const z = rt(S, !0), F = Gt(i.state, z, w);
|
|
2327
2327
|
if (F)
|
|
2328
2328
|
return i.chain().setTextSelection(F).addComment(p, g, K).run(), F;
|
|
2329
2329
|
}
|
|
@@ -2334,20 +2334,20 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2334
2334
|
if (f?.disablePrefixFallback) return null;
|
|
2335
2335
|
const Ve = Math.min(30, Math.max(8, Math.floor(S.length * 0.6)));
|
|
2336
2336
|
if (Ve < S.length) {
|
|
2337
|
-
const
|
|
2337
|
+
const z = S.slice(0, Ve);
|
|
2338
2338
|
if (b) {
|
|
2339
|
-
const O = rt(
|
|
2339
|
+
const O = rt(z, !0), U = O.filter((G) => typeof G?.from == "number" && G.from >= w), J = _t(U) ?? _t(O);
|
|
2340
2340
|
if (J)
|
|
2341
|
-
return Qt && console.log("[comment-match] ✅ 策略三(strike前缀)", p.slice(0, 8), { prefix:
|
|
2341
|
+
return Qt && console.log("[comment-match] ✅ 策略三(strike前缀)", p.slice(0, 8), { prefix: z, unique: J }), i.chain().setTextSelection(J).addComment(p, g, K).run(), J;
|
|
2342
2342
|
}
|
|
2343
|
-
Zt = rt(
|
|
2343
|
+
Zt = rt(z, !1);
|
|
2344
2344
|
const F = Zt.filter((O) => typeof O?.from == "number" && O.from >= w), k = _t(F) ?? _t(Zt);
|
|
2345
2345
|
if (k)
|
|
2346
|
-
return Qt && console.log("[comment-match] ✅ 策略三(前缀)", p.slice(0, 8), { prefix:
|
|
2346
|
+
return Qt && console.log("[comment-match] ✅ 策略三(前缀)", p.slice(0, 8), { prefix: z, unique: k }), i.chain().setTextSelection(k).addComment(p, g, K).run(), k;
|
|
2347
2347
|
}
|
|
2348
2348
|
try {
|
|
2349
|
-
const
|
|
2350
|
-
`, " "), F = Ot(
|
|
2349
|
+
const z = i.state.doc.textBetween(0, i.state.doc.content.size, `
|
|
2350
|
+
`, " "), F = Ot(z), k = F.includes(S), O = S.slice(0, Math.min(30, S.length)), U = F.includes(O), J = {
|
|
2351
2351
|
commentId: p,
|
|
2352
2352
|
preferFrom: w,
|
|
2353
2353
|
searchPreview: String(c).slice(0, 80),
|
|
@@ -2622,7 +2622,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
2622
2622
|
l("div", {
|
|
2623
2623
|
ref_key: "editorStageRef",
|
|
2624
2624
|
ref: pt,
|
|
2625
|
-
class: Tt(["umo-editor-stage", { "comment-hidden":
|
|
2625
|
+
class: Tt(["umo-editor-stage", { "comment-hidden": !$.value }])
|
|
2626
2626
|
}, [
|
|
2627
2627
|
Zn(p, to({
|
|
2628
2628
|
ref_key: "editorRef",
|
|
@@ -3028,7 +3028,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
3028
3028
|
category: x,
|
|
3029
3029
|
rows: M.get(x)
|
|
3030
3030
|
}));
|
|
3031
|
-
}),
|
|
3031
|
+
}), $ = (_) => {
|
|
3032
3032
|
const y = String(_ ?? "");
|
|
3033
3033
|
return y === "risk" ? "有风险" : y === "compliance" ? "合规" : y || "—";
|
|
3034
3034
|
}, L = (_) => {
|
|
@@ -3041,7 +3041,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
3041
3041
|
() => e.activeCommentId,
|
|
3042
3042
|
async (_) => {
|
|
3043
3043
|
if (!_) return;
|
|
3044
|
-
await Ie(), await new Promise((x) => requestAnimationFrame(x)), await new Promise((x) => requestAnimationFrame(x)), await new Promise((x) => setTimeout(x,
|
|
3044
|
+
await Ie(), await new Promise((x) => requestAnimationFrame(x)), await new Promise((x) => requestAnimationFrame(x)), await new Promise((x) => setTimeout(x, 10));
|
|
3045
3045
|
const y = u.value;
|
|
3046
3046
|
if (!(y instanceof HTMLElement)) return;
|
|
3047
3047
|
const M = y.querySelector(`[data-comment-id="${_}"]`);
|
|
@@ -3111,7 +3111,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
3111
3111
|
}, N(x.reviewPoint || "(无审查点)"), 9, Qr),
|
|
3112
3112
|
l("span", {
|
|
3113
3113
|
class: Tt(["audit-card__badge", L(x.reviewStatus)])
|
|
3114
|
-
}, N(
|
|
3114
|
+
}, N($(x.reviewStatus)), 3)
|
|
3115
3115
|
]),
|
|
3116
3116
|
l("div", Zr, [
|
|
3117
3117
|
y[6] || (y[6] = l("div", { class: "audit-card__label" }, "原文内容", -1)),
|
|
@@ -3140,7 +3140,7 @@ const ur = { class: "app-layout" }, mr = { class: "editor-wrapper" }, dr = { cla
|
|
|
3140
3140
|
], 64))
|
|
3141
3141
|
], 512));
|
|
3142
3142
|
}
|
|
3143
|
-
}, ds = /* @__PURE__ */ Pt(rs, [["__scopeId", "data-v-
|
|
3143
|
+
}, ds = /* @__PURE__ */ Pt(rs, [["__scopeId", "data-v-d1af65ab"]]);
|
|
3144
3144
|
function fs() {
|
|
3145
3145
|
}
|
|
3146
3146
|
const hs = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommentPanel.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommentPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommentPanel.vue"],"names":[],"mappings":"wBAipBqB,OAAO,YAAY;;AAjBxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAgBG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComplexCommentPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ComplexCommentPanel.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComplexCommentPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ComplexCommentPanel.vue"],"names":[],"mappings":"wBAu8BqB,OAAO,YAAY;;AAzBxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAwBG"}
|
|
@@ -410,7 +410,7 @@ const ce = { index: 0, offset: 0 };
|
|
|
410
410
|
function Ft(r, t) {
|
|
411
411
|
return ce.index = r, ce.offset = t, ce;
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Ht(r, t) {
|
|
414
414
|
if (r === t)
|
|
415
415
|
return !0;
|
|
416
416
|
if (!(r && typeof r == "object") || !(t && typeof t == "object"))
|
|
@@ -422,11 +422,11 @@ function Vt(r, t) {
|
|
|
422
422
|
if (r.length != t.length)
|
|
423
423
|
return !1;
|
|
424
424
|
for (let n = 0; n < r.length; n++)
|
|
425
|
-
if (!
|
|
425
|
+
if (!Ht(r[n], t[n]))
|
|
426
426
|
return !1;
|
|
427
427
|
} else {
|
|
428
428
|
for (let n in r)
|
|
429
|
-
if (!(n in t) || !
|
|
429
|
+
if (!(n in t) || !Ht(r[n], t[n]))
|
|
430
430
|
return !1;
|
|
431
431
|
for (let n in t)
|
|
432
432
|
if (!(n in r))
|
|
@@ -488,7 +488,7 @@ let O = class ye {
|
|
|
488
488
|
another mark.
|
|
489
489
|
*/
|
|
490
490
|
eq(t) {
|
|
491
|
-
return this == t || this.type == t.type &&
|
|
491
|
+
return this == t || this.type == t.type && Ht(this.attrs, t.attrs);
|
|
492
492
|
}
|
|
493
493
|
/**
|
|
494
494
|
Convert this mark to a JSON-serializeable representation.
|
|
@@ -891,7 +891,7 @@ class Ot {
|
|
|
891
891
|
return t.blockRange(this);
|
|
892
892
|
for (let n = this.depth - (this.parent.inlineContent || this.pos == t.pos ? 1 : 0); n >= 0; n--)
|
|
893
893
|
if (t.pos <= this.end(n) && (!e || e(this.node(n))))
|
|
894
|
-
return new
|
|
894
|
+
return new Xt(this, t, n);
|
|
895
895
|
return null;
|
|
896
896
|
}
|
|
897
897
|
/**
|
|
@@ -940,7 +940,7 @@ class Ot {
|
|
|
940
940
|
@internal
|
|
941
941
|
*/
|
|
942
942
|
static resolveCached(t, e) {
|
|
943
|
-
let n =
|
|
943
|
+
let n = _e.get(t);
|
|
944
944
|
if (n)
|
|
945
945
|
for (let i = 0; i < n.elts.length; i++) {
|
|
946
946
|
let s = n.elts[i];
|
|
@@ -948,7 +948,7 @@ class Ot {
|
|
|
948
948
|
return s;
|
|
949
949
|
}
|
|
950
950
|
else
|
|
951
|
-
|
|
951
|
+
_e.set(t, n = new Br());
|
|
952
952
|
let o = n.elts[n.i] = Ot.resolve(t, e);
|
|
953
953
|
return n.i = (n.i + 1) % Dr, o;
|
|
954
954
|
}
|
|
@@ -958,8 +958,8 @@ class Br {
|
|
|
958
958
|
this.elts = [], this.i = 0;
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
const Dr = 12,
|
|
962
|
-
class
|
|
961
|
+
const Dr = 12, _e = /* @__PURE__ */ new WeakMap();
|
|
962
|
+
class Xt {
|
|
963
963
|
/**
|
|
964
964
|
Construct a node range. `$from` and `$to` should point into the
|
|
965
965
|
same node until at least the given `depth`, since a node range
|
|
@@ -1118,7 +1118,7 @@ class K {
|
|
|
1118
1118
|
attributes, and marks.
|
|
1119
1119
|
*/
|
|
1120
1120
|
hasMarkup(t, e, n) {
|
|
1121
|
-
return this.type == t &&
|
|
1121
|
+
return this.type == t && Ht(this.attrs, e || t.defaultAttrs || Lr) && O.sameSet(this.marks, n || O.none);
|
|
1122
1122
|
}
|
|
1123
1123
|
/**
|
|
1124
1124
|
Create a new node with the same markup as this node, containing
|
|
@@ -1370,7 +1370,7 @@ class K {
|
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
1372
|
K.prototype.text = void 0;
|
|
1373
|
-
class
|
|
1373
|
+
class _t extends K {
|
|
1374
1374
|
/**
|
|
1375
1375
|
@internal
|
|
1376
1376
|
*/
|
|
@@ -1392,10 +1392,10 @@ class Xt extends K {
|
|
|
1392
1392
|
return this.text.length;
|
|
1393
1393
|
}
|
|
1394
1394
|
mark(t) {
|
|
1395
|
-
return t == this.marks ? this : new
|
|
1395
|
+
return t == this.marks ? this : new _t(this.type, this.attrs, this.text, t);
|
|
1396
1396
|
}
|
|
1397
1397
|
withText(t) {
|
|
1398
|
-
return t == this.text ? this : new
|
|
1398
|
+
return t == this.text ? this : new _t(this.type, this.attrs, t, this.marks);
|
|
1399
1399
|
}
|
|
1400
1400
|
cut(t = 0, e = this.text.length) {
|
|
1401
1401
|
return t == 0 && e == this.text.length ? this : this.withText(this.text.slice(t, e));
|
|
@@ -1430,7 +1430,7 @@ class pt {
|
|
|
1430
1430
|
let o = Pn(n);
|
|
1431
1431
|
n.next && n.err("Unexpected trailing text");
|
|
1432
1432
|
let i = Gr(Ur(o));
|
|
1433
|
-
return
|
|
1433
|
+
return Xr(i, n), i;
|
|
1434
1434
|
}
|
|
1435
1435
|
/**
|
|
1436
1436
|
Match a node type, returning a match after that node if
|
|
@@ -1605,7 +1605,7 @@ function Jr(r) {
|
|
|
1605
1605
|
return t.length == 1 ? t[0] : { type: "seq", exprs: t };
|
|
1606
1606
|
}
|
|
1607
1607
|
function Wr(r) {
|
|
1608
|
-
let t =
|
|
1608
|
+
let t = Hr(r);
|
|
1609
1609
|
for (; ; )
|
|
1610
1610
|
if (r.eat("+"))
|
|
1611
1611
|
t = { type: "plus", expr: t };
|
|
@@ -1628,7 +1628,7 @@ function qr(r, t) {
|
|
|
1628
1628
|
let e = Ke(r), n = e;
|
|
1629
1629
|
return r.eat(",") && (r.next != "}" ? n = Ke(r) : n = -1), r.eat("}") || r.err("Unclosed braced range"), { type: "range", min: e, max: n, expr: t };
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function Vr(r, t) {
|
|
1632
1632
|
let e = r.nodeTypes, n = e[t];
|
|
1633
1633
|
if (n)
|
|
1634
1634
|
return [n];
|
|
@@ -1639,14 +1639,14 @@ function Hr(r, t) {
|
|
|
1639
1639
|
}
|
|
1640
1640
|
return o.length == 0 && r.err("No node type or group '" + t + "' found"), o;
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function Hr(r) {
|
|
1643
1643
|
if (r.eat("(")) {
|
|
1644
1644
|
let t = Pn(r);
|
|
1645
1645
|
return r.eat(")") || r.err("Missing closing paren"), t;
|
|
1646
1646
|
} else if (/\W/.test(r.next))
|
|
1647
1647
|
r.err("Unexpected token '" + r.next + "'");
|
|
1648
1648
|
else {
|
|
1649
|
-
let t =
|
|
1649
|
+
let t = Vr(r, r.next).map((e) => (r.inline == null ? r.inline = e.isInline : r.inline != e.isInline && r.err("Mixing inline and block content"), { type: "name", value: e }));
|
|
1650
1650
|
return r.pos++, t.length == 1 ? t[0] : { type: "choice", exprs: t };
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
@@ -1746,7 +1746,7 @@ function Gr(r) {
|
|
|
1746
1746
|
return i;
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
|
-
function
|
|
1749
|
+
function Xr(r, t) {
|
|
1750
1750
|
for (let e = 0, n = [r]; e < n.length; e++) {
|
|
1751
1751
|
let o = n[e], i = !o.validEnd, s = [];
|
|
1752
1752
|
for (let l = 0; l < o.next.length; l++) {
|
|
@@ -1976,7 +1976,7 @@ class Kt {
|
|
|
1976
1976
|
return n;
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function _r(r, t, e) {
|
|
1980
1980
|
let n = e.split("|");
|
|
1981
1981
|
return (o) => {
|
|
1982
1982
|
let i = o === null ? "null" : typeof o;
|
|
@@ -1986,7 +1986,7 @@ function Xr(r, t, e) {
|
|
|
1986
1986
|
}
|
|
1987
1987
|
class Kr {
|
|
1988
1988
|
constructor(t, e, n) {
|
|
1989
|
-
this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ?
|
|
1989
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? _r(t, e, n.validate) : n.validate;
|
|
1990
1990
|
}
|
|
1991
1991
|
get isRequired() {
|
|
1992
1992
|
return !this.hasDefault;
|
|
@@ -2098,7 +2098,7 @@ class Zr {
|
|
|
2098
2098
|
*/
|
|
2099
2099
|
text(t, e) {
|
|
2100
2100
|
let n = this.nodes.text;
|
|
2101
|
-
return new
|
|
2101
|
+
return new _t(n, n.defaultAttrs, t, O.setFrom(e));
|
|
2102
2102
|
}
|
|
2103
2103
|
/**
|
|
2104
2104
|
Create a mark with the given type and attributes.
|
|
@@ -2655,7 +2655,7 @@ function rn(r) {
|
|
|
2655
2655
|
function oo(r) {
|
|
2656
2656
|
return (r - (r & jn)) / Jn;
|
|
2657
2657
|
}
|
|
2658
|
-
const Wn = 1, qn = 2, qt = 4,
|
|
2658
|
+
const Wn = 1, qn = 2, qt = 4, Vn = 8;
|
|
2659
2659
|
class on {
|
|
2660
2660
|
/**
|
|
2661
2661
|
@internal
|
|
@@ -2669,7 +2669,7 @@ class on {
|
|
|
2669
2669
|
argument from the document.
|
|
2670
2670
|
*/
|
|
2671
2671
|
get deleted() {
|
|
2672
|
-
return (this.delInfo &
|
|
2672
|
+
return (this.delInfo & Vn) > 0;
|
|
2673
2673
|
}
|
|
2674
2674
|
/**
|
|
2675
2675
|
Tells you whether the token before the mapped position was deleted.
|
|
@@ -2733,7 +2733,7 @@ class W {
|
|
|
2733
2733
|
if (n)
|
|
2734
2734
|
return h;
|
|
2735
2735
|
let m = t == (e < 0 ? a : u) ? null : ro(l / 3, t - a), d = t == a ? qn : t == u ? Wn : qt;
|
|
2736
|
-
return (e < 0 ? t != a : t != u) && (d |=
|
|
2736
|
+
return (e < 0 ? t != a : t != u) && (d |= Vn), new on(h, d, m);
|
|
2737
2737
|
}
|
|
2738
2738
|
o += f - c;
|
|
2739
2739
|
}
|
|
@@ -3169,7 +3169,7 @@ function St(r) {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
return null;
|
|
3171
3171
|
}
|
|
3172
|
-
function
|
|
3172
|
+
function Hn(r, t, e = null, n = r) {
|
|
3173
3173
|
let o = so(r, t), i = o && lo(n, t);
|
|
3174
3174
|
return i ? o.map(sn).concat({ type: t, attrs: e }).concat(i.map(sn)) : null;
|
|
3175
3175
|
}
|
|
@@ -3936,10 +3936,10 @@ new Dt("doc", {
|
|
|
3936
3936
|
return r.scrolledIntoView ? t + 1 : t;
|
|
3937
3937
|
}
|
|
3938
3938
|
});
|
|
3939
|
-
function
|
|
3939
|
+
function Xn(r, t, e) {
|
|
3940
3940
|
for (let n in r) {
|
|
3941
3941
|
let o = r[n];
|
|
3942
|
-
o instanceof Function ? o = o.bind(t) : n == "handleDOMEvents" && (o =
|
|
3942
|
+
o instanceof Function ? o = o.bind(t) : n == "handleDOMEvents" && (o = Xn(o, t, {})), e[n] = o;
|
|
3943
3943
|
}
|
|
3944
3944
|
return e;
|
|
3945
3945
|
}
|
|
@@ -3948,7 +3948,7 @@ class wt {
|
|
|
3948
3948
|
Create a plugin.
|
|
3949
3949
|
*/
|
|
3950
3950
|
constructor(t) {
|
|
3951
|
-
this.spec = t, this.props = {}, t.props &&
|
|
3951
|
+
this.spec = t, this.props = {}, t.props && Xn(t.props, this, this.props), this.key = t.key ? t.key.key : _n("plugin");
|
|
3952
3952
|
}
|
|
3953
3953
|
/**
|
|
3954
3954
|
Extract the plugin's state field from an editor state.
|
|
@@ -3958,7 +3958,7 @@ class wt {
|
|
|
3958
3958
|
}
|
|
3959
3959
|
}
|
|
3960
3960
|
const me = /* @__PURE__ */ Object.create(null);
|
|
3961
|
-
function
|
|
3961
|
+
function _n(r) {
|
|
3962
3962
|
return r in me ? r + "$" + ++me[r] : (me[r] = 0, r + "$");
|
|
3963
3963
|
}
|
|
3964
3964
|
class gt {
|
|
@@ -3966,7 +3966,7 @@ class gt {
|
|
|
3966
3966
|
Create a plugin key.
|
|
3967
3967
|
*/
|
|
3968
3968
|
constructor(t = "key") {
|
|
3969
|
-
this.key =
|
|
3969
|
+
this.key = _n(t);
|
|
3970
3970
|
}
|
|
3971
3971
|
/**
|
|
3972
3972
|
Get the active plugin with this key, if any, from an editor
|
|
@@ -4297,7 +4297,7 @@ function lr(r) {
|
|
|
4297
4297
|
const Ao = lr(-1), To = lr(1);
|
|
4298
4298
|
function No(r, t = null) {
|
|
4299
4299
|
return function(e, n) {
|
|
4300
|
-
let { $from: o, $to: i } = e.selection, s = o.blockRange(i), l = s &&
|
|
4300
|
+
let { $from: o, $to: i } = e.selection, s = o.blockRange(i), l = s && Hn(s, r, t);
|
|
4301
4301
|
return l ? (n && n(e.tr.wrap(s, l).scrollIntoView()), !0) : !1;
|
|
4302
4302
|
};
|
|
4303
4303
|
}
|
|
@@ -4358,9 +4358,9 @@ function Eo(r, t, e, n = null) {
|
|
|
4358
4358
|
if (t.$from.index(t.depth - 1) == 0)
|
|
4359
4359
|
return !1;
|
|
4360
4360
|
let a = s.resolve(t.start - 2);
|
|
4361
|
-
i = new
|
|
4361
|
+
i = new Xt(a, a, t.depth), t.endIndex < t.parent.childCount && (t = new Xt(t.$from, s.resolve(t.$to.end(t.depth)), t.depth)), o = !0;
|
|
4362
4362
|
}
|
|
4363
|
-
let l =
|
|
4363
|
+
let l = Hn(i, e, n, t);
|
|
4364
4364
|
return l ? (r && Oo(r, t, l, o, e), !0) : !1;
|
|
4365
4365
|
}
|
|
4366
4366
|
function Oo(r, t, e, n, o) {
|
|
@@ -4384,7 +4384,7 @@ function Io(r) {
|
|
|
4384
4384
|
}
|
|
4385
4385
|
function Po(r, t, e, n) {
|
|
4386
4386
|
let o = r.tr, i = n.end, s = n.$to.end(n.depth);
|
|
4387
|
-
i < s && (o.step(new j(i - 1, s, i, s, new C(y.from(e.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new
|
|
4387
|
+
i < s && (o.step(new j(i - 1, s, i, s, new C(y.from(e.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new Xt(o.doc.resolve(n.$from.pos), o.doc.resolve(s), n.depth));
|
|
4388
4388
|
const l = St(n);
|
|
4389
4389
|
if (l == null)
|
|
4390
4390
|
return !1;
|
|
@@ -4508,10 +4508,10 @@ class Ro {
|
|
|
4508
4508
|
return l;
|
|
4509
4509
|
}
|
|
4510
4510
|
}
|
|
4511
|
-
function
|
|
4512
|
-
return r.config[t] === void 0 && r.parent ?
|
|
4511
|
+
function H(r, t, e) {
|
|
4512
|
+
return r.config[t] === void 0 && r.parent ? H(r.parent, t, e) : typeof r.config[t] == "function" ? r.config[t].bind({
|
|
4513
4513
|
...e,
|
|
4514
|
-
parent: r.parent ?
|
|
4514
|
+
parent: r.parent ? H(r.parent, t, e) : null
|
|
4515
4515
|
}) : r.config[t];
|
|
4516
4516
|
}
|
|
4517
4517
|
function Fo(r) {
|
|
@@ -4559,9 +4559,9 @@ class Yt {
|
|
|
4559
4559
|
}, this.config = {
|
|
4560
4560
|
...this.config,
|
|
4561
4561
|
...t
|
|
4562
|
-
}, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = et(
|
|
4562
|
+
}, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = et(H(this, "addOptions", {
|
|
4563
4563
|
name: this.name
|
|
4564
|
-
}))), this.storage = et(
|
|
4564
|
+
}))), this.storage = et(H(this, "addStorage", {
|
|
4565
4565
|
name: this.name,
|
|
4566
4566
|
options: this.options
|
|
4567
4567
|
})) || {};
|
|
@@ -4578,9 +4578,9 @@ class Yt {
|
|
|
4578
4578
|
}
|
|
4579
4579
|
extend(t = {}) {
|
|
4580
4580
|
const e = new Yt(t);
|
|
4581
|
-
return e.parent = this, this.child = e, e.name = t.name ? t.name : e.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`), e.options = et(
|
|
4581
|
+
return e.parent = this, this.child = e, e.name = t.name ? t.name : e.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`), e.options = et(H(e, "addOptions", {
|
|
4582
4582
|
name: e.name
|
|
4583
|
-
})), e.storage = et(
|
|
4583
|
+
})), e.storage = et(H(e, "addStorage", {
|
|
4584
4584
|
name: e.name,
|
|
4585
4585
|
options: e.options
|
|
4586
4586
|
})), e;
|
|
@@ -4605,9 +4605,9 @@ class G {
|
|
|
4605
4605
|
}, this.config = {
|
|
4606
4606
|
...this.config,
|
|
4607
4607
|
...t
|
|
4608
|
-
}, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = et(
|
|
4608
|
+
}, this.name = this.config.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = et(H(this, "addOptions", {
|
|
4609
4609
|
name: this.name
|
|
4610
|
-
}))), this.storage = et(
|
|
4610
|
+
}))), this.storage = et(H(this, "addStorage", {
|
|
4611
4611
|
name: this.name,
|
|
4612
4612
|
options: this.options
|
|
4613
4613
|
})) || {};
|
|
@@ -4624,9 +4624,9 @@ class G {
|
|
|
4624
4624
|
}
|
|
4625
4625
|
extend(t = {}) {
|
|
4626
4626
|
const e = new G({ ...this.config, ...t });
|
|
4627
|
-
return e.parent = this, this.child = e, e.name = t.name ? t.name : e.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`), e.options = et(
|
|
4627
|
+
return e.parent = this, this.child = e, e.name = t.name ? t.name : e.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`), e.options = et(H(e, "addOptions", {
|
|
4628
4628
|
name: e.name
|
|
4629
|
-
})), e.storage = et(
|
|
4629
|
+
})), e.storage = et(H(e, "addStorage", {
|
|
4630
4630
|
name: e.name,
|
|
4631
4631
|
options: e.options
|
|
4632
4632
|
})), e;
|
|
@@ -4682,7 +4682,7 @@ G.create({
|
|
|
4682
4682
|
const Wo = () => ({ editor: r, view: t }) => (requestAnimationFrame(() => {
|
|
4683
4683
|
var e;
|
|
4684
4684
|
r.isDestroyed || (t.dom.blur(), (e = window?.getSelection()) === null || e === void 0 || e.removeAllRanges());
|
|
4685
|
-
}), !0), qo = (r = !1) => ({ commands: t }) => t.setContent("", r),
|
|
4685
|
+
}), !0), qo = (r = !1) => ({ commands: t }) => t.setContent("", r), Vo = () => ({ state: r, tr: t, dispatch: e }) => {
|
|
4686
4686
|
const { selection: n } = t, { ranges: o } = n;
|
|
4687
4687
|
return e && o.forEach(({ $from: i, $to: s }) => {
|
|
4688
4688
|
r.doc.nodesBetween(i.pos, s.pos, (l, a) => {
|
|
@@ -4699,12 +4699,12 @@ const Wo = () => ({ editor: r, view: t }) => (requestAnimationFrame(() => {
|
|
|
4699
4699
|
(m || m === 0) && t.lift(h, m);
|
|
4700
4700
|
});
|
|
4701
4701
|
}), !0;
|
|
4702
|
-
},
|
|
4702
|
+
}, Ho = (r) => (t) => r(t), Uo = () => ({ state: r, dispatch: t }) => or(r, t), Go = (r, t) => ({ editor: e, tr: n }) => {
|
|
4703
4703
|
const { state: o } = e, i = o.doc.slice(r.from, r.to);
|
|
4704
4704
|
n.deleteRange(r.from, r.to);
|
|
4705
4705
|
const s = n.mapping.map(t);
|
|
4706
4706
|
return n.insert(s, i.content), n.setSelection(new E(n.doc.resolve(s - 1))), !0;
|
|
4707
|
-
},
|
|
4707
|
+
}, Xo = () => ({ tr: r, dispatch: t }) => {
|
|
4708
4708
|
const { selection: e } = r, n = e.$anchor.node();
|
|
4709
4709
|
if (n.content.size > 0)
|
|
4710
4710
|
return !1;
|
|
@@ -4718,7 +4718,7 @@ const Wo = () => ({ editor: r, view: t }) => (requestAnimationFrame(() => {
|
|
|
4718
4718
|
return !0;
|
|
4719
4719
|
}
|
|
4720
4720
|
return !1;
|
|
4721
|
-
},
|
|
4721
|
+
}, _o = (r) => ({ tr: t, state: e, dispatch: n }) => {
|
|
4722
4722
|
const o = B(r, e.schema), i = t.selection.$anchor;
|
|
4723
4723
|
for (let s = i.depth; s > 0; s -= 1)
|
|
4724
4724
|
if (i.node(s).type === o) {
|
|
@@ -5115,7 +5115,7 @@ function Fi(r, t) {
|
|
|
5115
5115
|
function Fe(r) {
|
|
5116
5116
|
return (t) => Fi(t.$from, r);
|
|
5117
5117
|
}
|
|
5118
|
-
function
|
|
5118
|
+
function Vt(r, t, e) {
|
|
5119
5119
|
return Object.fromEntries(Object.entries(e).filter(([n]) => {
|
|
5120
5120
|
const o = r.find((i) => i.type === t && i.name === n);
|
|
5121
5121
|
return o ? o.attribute.keepOnSplit : !1;
|
|
@@ -5152,7 +5152,7 @@ function pn(r, t) {
|
|
|
5152
5152
|
name: n.name,
|
|
5153
5153
|
options: n.options,
|
|
5154
5154
|
storage: n.storage
|
|
5155
|
-
}, i = et(
|
|
5155
|
+
}, i = et(H(n, "group", o));
|
|
5156
5156
|
return typeof i != "string" ? !1 : i.split(" ").includes("list");
|
|
5157
5157
|
}
|
|
5158
5158
|
function mr(r, { checkChildren: t = !0, ignoreWhitespace: e = !1 } = {}) {
|
|
@@ -5238,7 +5238,7 @@ const Li = (r, t = {}) => ({ tr: e, state: n, dispatch: o }) => {
|
|
|
5238
5238
|
t.setSelection(f);
|
|
5239
5239
|
}
|
|
5240
5240
|
return !0;
|
|
5241
|
-
},
|
|
5241
|
+
}, Vi = (r) => ({ state: t, dispatch: e }) => {
|
|
5242
5242
|
const n = B(r, t.schema);
|
|
5243
5243
|
return zo(n)(t, e);
|
|
5244
5244
|
};
|
|
@@ -5249,8 +5249,8 @@ function mn(r, t) {
|
|
|
5249
5249
|
r.tr.ensureMarks(n);
|
|
5250
5250
|
}
|
|
5251
5251
|
}
|
|
5252
|
-
const
|
|
5253
|
-
const { selection: i, doc: s } = t, { $from: l, $to: a } = i, c = o.extensionManager.attributes, f =
|
|
5252
|
+
const Hi = ({ keepMarks: r = !0 } = {}) => ({ tr: t, state: e, dispatch: n, editor: o }) => {
|
|
5253
|
+
const { selection: i, doc: s } = t, { $from: l, $to: a } = i, c = o.extensionManager.attributes, f = Vt(c, l.node().type.name, l.node().attrs);
|
|
5254
5254
|
if (i instanceof M && i.node.isBlock)
|
|
5255
5255
|
return !l.parentOffset || !rt(s, l.pos) ? !1 : (n && (r && mn(e, o.extensionManager.splittableMarks), t.split(l.pos).scrollIntoView()), !0);
|
|
5256
5256
|
if (!l.parent.isBlock)
|
|
@@ -5293,7 +5293,7 @@ const Vi = ({ keepMarks: r = !0 } = {}) => ({ tr: t, state: e, dispatch: n, edit
|
|
|
5293
5293
|
for (let T = a.depth - v; T >= a.depth - 3; T -= 1)
|
|
5294
5294
|
g = y.from(a.node(T).copy(g));
|
|
5295
5295
|
const x = a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3, k = {
|
|
5296
|
-
...
|
|
5296
|
+
...Vt(p, a.node().type.name, a.node().attrs),
|
|
5297
5297
|
...t
|
|
5298
5298
|
}, S = ((s = l.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(k)) || void 0;
|
|
5299
5299
|
g = g.append(y.from(l.createAndFill(null, S) || void 0));
|
|
@@ -5309,10 +5309,10 @@ const Vi = ({ keepMarks: r = !0 } = {}) => ({ tr: t, state: e, dispatch: n, edit
|
|
|
5309
5309
|
return !0;
|
|
5310
5310
|
}
|
|
5311
5311
|
const h = c.pos === a.end() ? u.contentMatchAt(0).defaultType : null, m = {
|
|
5312
|
-
...
|
|
5312
|
+
...Vt(p, u.type.name, u.attrs),
|
|
5313
5313
|
...t
|
|
5314
5314
|
}, d = {
|
|
5315
|
-
...
|
|
5315
|
+
...Vt(p, a.node().type.name, a.node().attrs),
|
|
5316
5316
|
...t
|
|
5317
5317
|
};
|
|
5318
5318
|
e.delete(a.pos, c.pos);
|
|
@@ -5363,10 +5363,10 @@ const Vi = ({ keepMarks: r = !0 } = {}) => ({ tr: t, state: e, dispatch: n, edit
|
|
|
5363
5363
|
const b = f().wrapInList(h, n), A = k.filter((T) => p.includes(T.type.name));
|
|
5364
5364
|
return i.ensureMarks(A), b ? !0 : c.clearNodes();
|
|
5365
5365
|
}).wrapInList(h, n).command(() => we(i, h)).command(() => ge(i, h)).run();
|
|
5366
|
-
},
|
|
5366
|
+
}, Xi = (r, t = {}, e = {}) => ({ state: n, commands: o }) => {
|
|
5367
5367
|
const { extendEmptyMarkRange: i = !1 } = e, s = it(r, n.schema);
|
|
5368
5368
|
return Bi(n, s, t) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, t);
|
|
5369
|
-
},
|
|
5369
|
+
}, _i = (r, t, e = {}) => ({ state: n, commands: o }) => {
|
|
5370
5370
|
const i = B(r, n.schema), s = B(t, n.schema), l = Re(n, i, e);
|
|
5371
5371
|
let a;
|
|
5372
5372
|
return n.selection.$anchor.sameParent(n.selection.$head) && (a = n.selection.$anchor.parent.attrs), l ? o.setNode(s, a) : o.setNode(i, { ...a, ...e });
|
|
@@ -5454,12 +5454,12 @@ var rs = /* @__PURE__ */ Object.freeze({
|
|
|
5454
5454
|
__proto__: null,
|
|
5455
5455
|
blur: Wo,
|
|
5456
5456
|
clearContent: qo,
|
|
5457
|
-
clearNodes:
|
|
5458
|
-
command:
|
|
5457
|
+
clearNodes: Vo,
|
|
5458
|
+
command: Ho,
|
|
5459
5459
|
createParagraphNear: Uo,
|
|
5460
5460
|
cut: Go,
|
|
5461
|
-
deleteCurrentNode:
|
|
5462
|
-
deleteNode:
|
|
5461
|
+
deleteCurrentNode: Xo,
|
|
5462
|
+
deleteNode: _o,
|
|
5463
5463
|
deleteRange: Ko,
|
|
5464
5464
|
deleteSelection: Zo,
|
|
5465
5465
|
enter: Yo,
|
|
@@ -5497,12 +5497,12 @@ var rs = /* @__PURE__ */ Object.freeze({
|
|
|
5497
5497
|
setNode: Ji,
|
|
5498
5498
|
setNodeSelection: Wi,
|
|
5499
5499
|
setTextSelection: qi,
|
|
5500
|
-
sinkListItem:
|
|
5501
|
-
splitBlock:
|
|
5500
|
+
sinkListItem: Vi,
|
|
5501
|
+
splitBlock: Hi,
|
|
5502
5502
|
splitListItem: Ui,
|
|
5503
5503
|
toggleList: Gi,
|
|
5504
|
-
toggleMark:
|
|
5505
|
-
toggleNode:
|
|
5504
|
+
toggleMark: Xi,
|
|
5505
|
+
toggleNode: _i,
|
|
5506
5506
|
toggleWrap: Ki,
|
|
5507
5507
|
undoInputRule: Zi,
|
|
5508
5508
|
unsetAllMarks: Yi,
|
|
@@ -5688,55 +5688,55 @@ G.create({
|
|
|
5688
5688
|
];
|
|
5689
5689
|
}
|
|
5690
5690
|
});
|
|
5691
|
-
const ht = 20, Q = Sn([]), Jt = Sn(null),
|
|
5691
|
+
const ht = 20, Q = Sn([]), Jt = Sn(null), V = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Set();
|
|
5692
5692
|
function is(r, t) {
|
|
5693
5693
|
const e = Number.parseInt(r, 10);
|
|
5694
5694
|
return ((Number.isNaN(e) ? t : e) % ht + ht) % ht;
|
|
5695
5695
|
}
|
|
5696
5696
|
function ss(r) {
|
|
5697
|
-
if (
|
|
5697
|
+
if (_.delete(r.id), V.set(r.id, { ...r }), U.has(r.id)) {
|
|
5698
5698
|
const t = U.get(r.id);
|
|
5699
|
-
U.delete(r.id),
|
|
5699
|
+
U.delete(r.id), V.set(r.id, { ...V.get(r.id), ...t });
|
|
5700
5700
|
}
|
|
5701
5701
|
}
|
|
5702
5702
|
function ls(r, t) {
|
|
5703
|
-
if (
|
|
5704
|
-
if (
|
|
5705
|
-
|
|
5703
|
+
if (_.has(r)) return;
|
|
5704
|
+
if (V.has(r)) {
|
|
5705
|
+
V.set(r, { ...V.get(r), ...t });
|
|
5706
5706
|
return;
|
|
5707
5707
|
}
|
|
5708
5708
|
const e = U.get(r) || {};
|
|
5709
5709
|
U.set(r, { ...e, ...t });
|
|
5710
5710
|
}
|
|
5711
5711
|
function wn(r) {
|
|
5712
|
-
if (
|
|
5713
|
-
|
|
5712
|
+
if (V.has(r)) {
|
|
5713
|
+
V.delete(r), U.delete(r), _.delete(r);
|
|
5714
5714
|
return;
|
|
5715
5715
|
}
|
|
5716
|
-
U.delete(r),
|
|
5716
|
+
U.delete(r), _.add(r);
|
|
5717
5717
|
}
|
|
5718
5718
|
function as(r) {
|
|
5719
|
-
|
|
5719
|
+
_.delete(r);
|
|
5720
5720
|
}
|
|
5721
5721
|
function cs() {
|
|
5722
|
-
|
|
5722
|
+
V.clear(), U.clear(), _.clear();
|
|
5723
5723
|
}
|
|
5724
5724
|
async function fs() {
|
|
5725
|
-
if (
|
|
5726
|
-
const r = Array.from(
|
|
5725
|
+
if (V.size === 0 && U.size === 0 && _.size === 0) return null;
|
|
5726
|
+
const r = Array.from(V.values()).map((n) => ({
|
|
5727
5727
|
id: n.id,
|
|
5728
5728
|
selectedText: n.selectedText,
|
|
5729
5729
|
note: n.note,
|
|
5730
5730
|
author: n.author,
|
|
5731
5731
|
colorIndex: n.colorIndex,
|
|
5732
5732
|
resolved: n.resolved
|
|
5733
|
-
})), t = Array.from(U.entries()).filter(([n]) => !
|
|
5734
|
-
for (const n of r)
|
|
5733
|
+
})), t = Array.from(U.entries()).filter(([n]) => !_.has(n)).map(([n, o]) => ({ id: n, patch: o })), e = Array.from(_.values());
|
|
5734
|
+
for (const n of r) V.delete(n.id);
|
|
5735
5735
|
for (const { id: n } of t) U.delete(n);
|
|
5736
|
-
for (const n of e)
|
|
5736
|
+
for (const n of e) _.delete(n);
|
|
5737
5737
|
return { creates: r, updates: t, deletes: e };
|
|
5738
5738
|
}
|
|
5739
|
-
function
|
|
5739
|
+
function Vs() {
|
|
5740
5740
|
return {
|
|
5741
5741
|
comments: Q,
|
|
5742
5742
|
activeCommentId: Jt,
|
|
@@ -5875,7 +5875,7 @@ function Be(r) {
|
|
|
5875
5875
|
function yn(r, t) {
|
|
5876
5876
|
return t == null || t === "" ? !1 : dt(r).includes(String(t));
|
|
5877
5877
|
}
|
|
5878
|
-
const
|
|
5878
|
+
const Hs = Yt.create({
|
|
5879
5879
|
name: "comment",
|
|
5880
5880
|
addAttributes() {
|
|
5881
5881
|
return {
|
|
@@ -5993,10 +5993,6 @@ const Vs = Yt.create({
|
|
|
5993
5993
|
return n && n(t), !0;
|
|
5994
5994
|
},
|
|
5995
5995
|
focusComment: (r) => ({ state: t, view: e }) => {
|
|
5996
|
-
try {
|
|
5997
|
-
if (globalThis && globalThis.__UMO_DEBUG_COMMENT_BLINK__) debugger;
|
|
5998
|
-
} catch {
|
|
5999
|
-
}
|
|
6000
5996
|
if (r == null || String(r).trim() === "") return !1;
|
|
6001
5997
|
const n = String(r).trim();
|
|
6002
5998
|
let o = null;
|
|
@@ -6006,12 +6002,16 @@ const Vs = Yt.create({
|
|
|
6006
6002
|
(a) => a.type === t.schema.marks.comment && yn(a.attrs, n)
|
|
6007
6003
|
) && (o = s);
|
|
6008
6004
|
}), o !== null) {
|
|
6009
|
-
try {
|
|
6010
|
-
if (globalThis && globalThis.__UMO_DEBUG_COMMENT_BLINK__) debugger;
|
|
6011
|
-
} catch {
|
|
6012
|
-
}
|
|
6013
6005
|
const i = e.domAtPos(o);
|
|
6014
|
-
|
|
6006
|
+
if (i?.node) {
|
|
6007
|
+
const s = i.node.nodeType === 3 ? i.node.parentElement : i.node;
|
|
6008
|
+
s && typeof s.scrollIntoView == "function" && setTimeout(() => {
|
|
6009
|
+
try {
|
|
6010
|
+
s.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
6011
|
+
} catch {
|
|
6012
|
+
}
|
|
6013
|
+
}, 0);
|
|
6014
|
+
}
|
|
6015
6015
|
}
|
|
6016
6016
|
return !0;
|
|
6017
6017
|
}
|
|
@@ -6232,7 +6232,7 @@ async function xs(r, t, e = "文档") {
|
|
|
6232
6232
|
const a = yr(t || [], s), c = a.length > 0, f = Le(c);
|
|
6233
6233
|
await je(f, Sr(o.body));
|
|
6234
6234
|
const u = Er(o.body, i, f), p = new ve();
|
|
6235
|
-
p.file("[Content_Types].xml", We(c, f)), p.file("_rels/.rels", qe()), p.file("word/document.xml",
|
|
6235
|
+
p.file("[Content_Types].xml", We(c, f)), p.file("_rels/.rels", qe()), p.file("word/document.xml", He(u)), p.file("word/styles.xml", Ue()), p.file("word/_rels/document.xml.rels", Ve(c, f)), c && p.file("word/comments.xml", $r(a));
|
|
6236
6236
|
for (const [m, d] of f.mediaParts)
|
|
6237
6237
|
p.file(`word/${m}`, d);
|
|
6238
6238
|
const h = await p.generateAsync({
|
|
@@ -6249,7 +6249,7 @@ async function bs(r, t = [], e = "文档") {
|
|
|
6249
6249
|
const n = new Map((t || []).map((u) => [u.id, u])), { commentIndexMap: o, usedComments: i } = Os(r, n), s = yr(t || [], i), l = s.length > 0, a = Le(l);
|
|
6250
6250
|
await je(a, gs(r));
|
|
6251
6251
|
const c = Rs(r, o, a), f = new ve();
|
|
6252
|
-
f.file("[Content_Types].xml", We(l, a)), f.file("_rels/.rels", qe()), f.file("word/document.xml",
|
|
6252
|
+
f.file("[Content_Types].xml", We(l, a)), f.file("_rels/.rels", qe()), f.file("word/document.xml", He(c)), f.file("word/styles.xml", Ue()), f.file("word/_rels/document.xml.rels", Ve(l, a)), l && f.file("word/comments.xml", $r(s));
|
|
6253
6253
|
for (const [u, p] of a.mediaParts)
|
|
6254
6254
|
f.file(`word/${u}`, p);
|
|
6255
6255
|
return f.generateAsync({
|
|
@@ -6260,11 +6260,11 @@ async function bs(r, t = [], e = "文档") {
|
|
|
6260
6260
|
async function Gs(r, t = "文档") {
|
|
6261
6261
|
return xs(r, [], t);
|
|
6262
6262
|
}
|
|
6263
|
-
async function
|
|
6263
|
+
async function Xs(r, t = "文档") {
|
|
6264
6264
|
const n = new DOMParser().parseFromString(r, "text/html"), o = Le(!1);
|
|
6265
6265
|
await je(o, Sr(n.body));
|
|
6266
6266
|
const i = Er(n.body, /* @__PURE__ */ new Map(), o), s = new ve();
|
|
6267
|
-
s.file("[Content_Types].xml", We(!1, o)), s.file("_rels/.rels", qe()), s.file("word/document.xml",
|
|
6267
|
+
s.file("[Content_Types].xml", We(!1, o)), s.file("_rels/.rels", qe()), s.file("word/document.xml", He(i)), s.file("word/styles.xml", Ue()), s.file("word/_rels/document.xml.rels", Ve(!1, o));
|
|
6268
6268
|
for (const [l, a] of o.mediaParts)
|
|
6269
6269
|
s.file(`word/${l}`, a);
|
|
6270
6270
|
return s.generateAsync({
|
|
@@ -6437,7 +6437,7 @@ function oe(r, t, e, n, o = []) {
|
|
|
6437
6437
|
const i = r, s = i.tagName.toLowerCase();
|
|
6438
6438
|
if (Nr.has(s)) return "";
|
|
6439
6439
|
if (Tr.has(s)) {
|
|
6440
|
-
const a = Es(s, i), c =
|
|
6440
|
+
const a = Es(s, i), c = X(i, t, {}, e, n, o);
|
|
6441
6441
|
return s === "p" ? `<w:p>${a}${c || "<w:r><w:t></w:t></w:r>"}</w:p>` : c ? `<w:p>${a}${c}</w:p>` : "";
|
|
6442
6442
|
}
|
|
6443
6443
|
if (s === "table") {
|
|
@@ -6454,7 +6454,7 @@ function oe(r, t, e, n, o = []) {
|
|
|
6454
6454
|
const a = i.getAttribute("data-type") || "signle", f = (i.getAttribute("data-color") || "#000000").replace(/^#/, ""), u = ks[a] || { val: "single", sz: "6" };
|
|
6455
6455
|
return `<w:p><w:pPr><w:pBdr><w:bottom w:val="${u.val}" w:color="${f}" w:sz="${u.sz}" w:space="1"/></w:pBdr></w:pPr></w:p>`;
|
|
6456
6456
|
}
|
|
6457
|
-
const l =
|
|
6457
|
+
const l = X(i, t, {}, e, n, o);
|
|
6458
6458
|
return l ? `<w:p>${l}</w:p>` : "";
|
|
6459
6459
|
}
|
|
6460
6460
|
function As(r, t, e, n) {
|
|
@@ -6521,8 +6521,8 @@ function As(r, t, e, n) {
|
|
|
6521
6521
|
const { el: I, colspan: P, rowspan: z } = R, ot = P > 1, Z = z > 1, L = (I.getAttribute("style") || "").match(/vertical-align\s*:\s*(top|middle|bottom)/i), le = L ? L[1].toLowerCase() : "middle", Ge = { top: "top", middle: "center", bottom: "bottom" };
|
|
6522
6522
|
let ae = 0;
|
|
6523
6523
|
for (let Y = 0; Y < P; Y++) {
|
|
6524
|
-
const
|
|
6525
|
-
ae += Number.isFinite(
|
|
6524
|
+
const Xe = p[T + Y];
|
|
6525
|
+
ae += Number.isFinite(Xe) ? Xe : Math.round(f / c);
|
|
6526
6526
|
}
|
|
6527
6527
|
const vt = [];
|
|
6528
6528
|
if (ot && vt.push(`<w:gridSpan w:val="${P}"/>`), le && Ge[le] && vt.push(`<w:vAlign w:val="${Ge[le]}"/>`), Z) {
|
|
@@ -6583,7 +6583,7 @@ function Ts(r, t, e, n) {
|
|
|
6583
6583
|
<w:pgMar w:top="1800" w:right="1800" w:bottom="1800" w:left="1800" w:header="851" w:footer="992" w:gutter="0"/>
|
|
6584
6584
|
</w:sectPr></w:pPr></w:p>`, h;
|
|
6585
6585
|
}
|
|
6586
|
-
function
|
|
6586
|
+
function X(r, t, e, n, o, i = []) {
|
|
6587
6587
|
let s = "";
|
|
6588
6588
|
for (const l of r.childNodes)
|
|
6589
6589
|
s += Ns(l, t, e, n, o, i);
|
|
@@ -6602,15 +6602,15 @@ function Ns(r, t, e, n, o, i = []) {
|
|
|
6602
6602
|
);
|
|
6603
6603
|
if (a.length) {
|
|
6604
6604
|
const c = xr(i, a);
|
|
6605
|
-
return
|
|
6605
|
+
return X(s, t, e, n, o, c);
|
|
6606
6606
|
}
|
|
6607
|
-
return
|
|
6607
|
+
return X(s, t, e, n, o, i);
|
|
6608
6608
|
}
|
|
6609
6609
|
if (l === "span") {
|
|
6610
6610
|
const a = Ms(s, e);
|
|
6611
|
-
return
|
|
6611
|
+
return X(s, t, a, n, o, i);
|
|
6612
6612
|
}
|
|
6613
|
-
return l === "strong" || l === "b" ?
|
|
6613
|
+
return l === "strong" || l === "b" ? X(s, t, { ...e, bold: !0 }, n, o, i) : l === "em" || l === "i" ? X(s, t, { ...e, italic: !0 }, n, o, i) : l === "u" ? X(s, t, { ...e, underline: !0 }, n, o, i) : l === "s" || l === "del" || l === "strike" ? X(s, t, { ...e, strike: !0 }, n, o, i) : l === "br" ? "<w:r><w:br/></w:r>" : l === "inline-img" || l === "img" ? ys(s, n) : X(s, t, e, n, o, i);
|
|
6614
6614
|
}
|
|
6615
6615
|
function Ms(r, t) {
|
|
6616
6616
|
const e = r.getAttribute("style") || "", n = e.match(/font-family\s*:\s*([^;]+)/i), o = n ? n[1].trim().replace(/["']/g, "") : null, i = e.match(/font-size\s*:\s*([\d.]+)(px|pt)/i);
|
|
@@ -7072,7 +7072,7 @@ function qe() {
|
|
|
7072
7072
|
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
|
|
7073
7073
|
</Relationships>`;
|
|
7074
7074
|
}
|
|
7075
|
-
function
|
|
7075
|
+
function Ve(r, t) {
|
|
7076
7076
|
const e = [
|
|
7077
7077
|
'<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>'
|
|
7078
7078
|
];
|
|
@@ -7094,7 +7094,7 @@ function He(r, t) {
|
|
|
7094
7094
|
`)}
|
|
7095
7095
|
</Relationships>`;
|
|
7096
7096
|
}
|
|
7097
|
-
function
|
|
7097
|
+
function He(r) {
|
|
7098
7098
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
7099
7099
|
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"
|
|
7100
7100
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
@@ -7203,11 +7203,11 @@ function Ue() {
|
|
|
7203
7203
|
</w:styles>`;
|
|
7204
7204
|
}
|
|
7205
7205
|
export {
|
|
7206
|
-
|
|
7206
|
+
Hs as C,
|
|
7207
7207
|
G as E,
|
|
7208
7208
|
xs as a,
|
|
7209
7209
|
bs as b,
|
|
7210
|
-
|
|
7210
|
+
Xs as c,
|
|
7211
7211
|
ht as d,
|
|
7212
7212
|
Us as e,
|
|
7213
7213
|
Gs as f,
|
|
@@ -7215,5 +7215,5 @@ export {
|
|
|
7215
7215
|
yn as m,
|
|
7216
7216
|
Be as p,
|
|
7217
7217
|
vn as s,
|
|
7218
|
-
|
|
7218
|
+
Vs as u
|
|
7219
7219
|
};
|
package/dist/wordDocxExport.js
CHANGED