bto-md-editor 0.1.8 → 0.1.11
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/md-editor.es.js +857 -869
- package/dist/md-editor.umd.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +19 -20
package/dist/md-editor.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(`.tooltip-wrapper[data-v-2e4633d5]{position:relative;display:inline-flex;align-items:center;line-height:0}.tooltip[data-v-2e4633d5]{position:fixed;transform:translate(-50%);background:#3c3c3cf2;color:#fff;border-radius:8px;padding:6px 8px;font-size:12px;line-height:1.2;box-shadow:0 6px 20px #0003;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .12s ease,visibility .12s ease;pointer-events:none;z-index:1000}.tooltip.visible[data-v-2e4633d5]{opacity:1;visibility:visible}.shortcut[data-v-2e4633d5]{display:inline-block;margin-top:4px;opacity:.9;z-index:1000}.icon[data-v-8ea77a66]{cursor:pointer;width:27px;height:27px;border-radius:4px;display:flex;align-items:center;font-size:12px;transition:all .2s ease-in-out;position:relative;padding:0 6px;min-width:50px;justify-content:space-between;background:#fff}.icon[data-v-8ea77a66]:hover{background:#0000000d}.font-size[data-v-8ea77a66]{position:relative;margin:0 4px;-webkit-user-select:none;user-select:none}.label[data-v-8ea77a66]{font-size:15px;color:#333}.dropdown[data-v-8ea77a66]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:160px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;z-index:10;-webkit-user-select:none;user-select:none;will-change:opacity,transform}.dropdown-slide-enter-from[data-v-8ea77a66],.dropdown-slide-leave-to[data-v-8ea77a66]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-8ea77a66],.dropdown-slide-leave-active[data-v-8ea77a66]{transition:opacity .18s ease,transform .18s ease}.dropdown-item[data-v-8ea77a66]{display:flex;align-items:center;gap:8px;padding:6px 12px;cursor:pointer;font-size:14px}.dropdown-item[data-v-8ea77a66]:hover{background:#0000000d}.text[data-v-8ea77a66]{flex:1}.icon[data-v-0f5572cb]{cursor:default;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;position:relative}.icon-dropdown[data-v-0f5572cb]{width:auto;justify-content:space-between;background:#fff}.icon-stack[data-v-0f5572cb]{display:flex;flex-direction:column;align-items:center;line-height:1;border-radius:6px;padding:2px;cursor:pointer}.arrow[data-v-0f5572cb]{display:flex;align-items:center;justify-content:center;width:16px;height:27px;border-radius:4px;cursor:pointer}.hoverable[data-v-0f5572cb]:hover{background:#0000000d}.underline[data-v-0f5572cb]{width:16px;height:2px;border-radius:2px;margin-top:2px;background:#000}.color-select[data-v-0f5572cb]{position:relative;margin:0 4px;-webkit-user-select:none;user-select:none}.dropdown[data-v-0f5572cb]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:280px;max-width:320px;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;padding:8px;z-index:20;will-change:opacity,transform}.dropdown-slide-enter-from[data-v-0f5572cb],.dropdown-slide-leave-to[data-v-0f5572cb]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-0f5572cb],.dropdown-slide-leave-active[data-v-0f5572cb]{transition:opacity .18s ease,transform .18s ease}.section[data-v-0f5572cb]{margin-bottom:8px}.section-title[data-v-0f5572cb]{font-size:12px;color:#666;margin-bottom:6px}.swatches[data-v-0f5572cb]{display:flex;flex-wrap:wrap;gap:6px}.swatches.grid[data-v-0f5572cb]{grid-template-columns:repeat(10,1fr)}.swatch[data-v-0f5572cb]{width:18px;height:18px;border-radius:4px;cursor:pointer;position:relative;border:1px solid rgba(0,0,0,.08);display:flex;align-items:center;font-size:12px;justify-content:center}.swatch .check[data-v-0f5572cb]{position:absolute;top:0;right:2px;font-size:12px;color:#000;text-shadow:0 1px 2px rgba(255,255,255,.8)}.inline-actions[data-v-0f5572cb]{display:flex;justify-content:space-between;gap:8px}.btn[data-v-0f5572cb]{padding:4px 8px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;font-size:12px}.advanced[data-v-0f5572cb]{display:grid;grid-template-columns:auto 1fr auto;gap:4px;align-items:center;margin-top:8px}.hex[data-v-0f5572cb]{border:1px solid #e5e7eb;border-radius:8px;padding:4px 6px;font-size:12px}.apply[data-v-0f5572cb]{justify-self:end;flex-shrink:1}.svg-icon[data-v-c83ef2e3]{display:inline-block;line-height:0;vertical-align:middle}.svg-icon svg[data-v-c83ef2e3]{width:1em;height:1em;display:block}.icon[data-v-620c7aa3]{cursor:default;width:19px;height:19px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;position:relative}.icon-dropdown[data-v-620c7aa3]{width:auto;padding:0 2px;min-width:20px;justify-content:space-between;background:#fff}.icon-stack[data-v-620c7aa3]{display:flex;flex-direction:column;align-items:center;line-height:1;border-radius:6px;padding:2px;cursor:pointer}.arrow[data-v-620c7aa3]{display:flex;align-items:center;justify-content:center;width:16px;height:27px;border-radius:4px;cursor:pointer}.hoverable[data-v-620c7aa3]:hover{background:#0000000d}.underline[data-v-620c7aa3]{width:16px;height:2px;border-radius:2px;margin-top:2px;background:#fff}.bg-color-select[data-v-620c7aa3]{position:relative;-webkit-user-select:none;user-select:none}.dropdown[data-v-620c7aa3]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:280px;max-width:320px;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;padding:8px;z-index:20;will-change:opacity,transform}.section[data-v-620c7aa3]{margin-bottom:8px}.section-title[data-v-620c7aa3]{font-size:12px;color:#666;margin-bottom:6px}.swatches[data-v-620c7aa3]{display:flex;flex-wrap:wrap;gap:6px}.swatches.grid[data-v-620c7aa3]{grid-template-columns:repeat(10,1fr)}.swatch[data-v-620c7aa3]{width:18px;height:18px;border-radius:4px;cursor:pointer;position:relative;border:1px solid rgba(0,0,0,.08);display:flex;align-items:center;font-size:12px;justify-content:center}.swatch .check[data-v-620c7aa3]{position:absolute;top:0;right:2px;font-size:12px;color:#000;text-shadow:0 1px 2px rgba(255,255,255,.8)}.inline-actions[data-v-620c7aa3]{display:flex;justify-content:space-between;gap:8px}.btn[data-v-620c7aa3]{padding:4px 8px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;font-size:12px}.advanced[data-v-620c7aa3]{display:grid;grid-template-columns:auto 1fr auto;gap:4px;align-items:center;margin-top:8px}.hex[data-v-620c7aa3]{border:1px solid #e5e7eb;border-radius:8px;padding:4px 6px;font-size:12px}.apply[data-v-620c7aa3]{justify-self:end;flex-shrink:1}.dropdown-slide-enter-from[data-v-620c7aa3],.dropdown-slide-leave-to[data-v-620c7aa3]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-620c7aa3],.dropdown-slide-leave-active[data-v-620c7aa3]{transition:opacity .18s ease,transform .18s ease}.image-icon[data-v-e1c5f3df]{position:relative}.image-input-panel[data-v-e1c5f3df]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.image-input[data-v-e1c5f3df]{width:100%;padding:8px 10px;box-sizing:border-box;max-width:100%;border:1px solid #e5e7eb;border-radius:8px;outline:none;font-size:14px}.image-actions[data-v-e1c5f3df]{margin-top:8px;display:flex;gap:8px;justify-content:flex-end}.btn[data-v-e1c5f3df]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.btn[data-v-e1c5f3df]:hover{background:#0000000d}.btn-primary[data-v-e1c5f3df]{border:none;background:#1677ff;color:#fff}.btn-primary[data-v-e1c5f3df]:hover{background:#1677ff;opacity:.92}.img-panel-enter-active[data-v-e1c5f3df],.img-panel-leave-active[data-v-e1c5f3df]{transition:opacity .18s ease,transform .18s ease}.img-panel-enter-from[data-v-e1c5f3df],.img-panel-leave-to[data-v-e1c5f3df]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.img-panel-enter-to[data-v-e1c5f3df],.img-panel-leave-from[data-v-e1c5f3df]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.video-icon[data-v-35a7027c]{position:relative}.video-input-panel[data-v-35a7027c]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.video-input[data-v-35a7027c]{width:100%;padding:8px 10px;box-sizing:border-box;max-width:100%;border:1px solid #e5e7eb;border-radius:8px;outline:none;font-size:14px}.video-actions[data-v-35a7027c]{margin-top:8px;display:flex;gap:8px;justify-content:flex-end}.btn[data-v-35a7027c]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.btn[data-v-35a7027c]:hover{background:#0000000d}.btn-primary[data-v-35a7027c]{border:none;background:#1677ff;color:#fff}.btn-primary[data-v-35a7027c]:hover{background:#1677ff;opacity:.92}.video-panel-enter-active[data-v-35a7027c],.video-panel-leave-active[data-v-35a7027c]{transition:opacity .18s ease,transform .18s ease}.video-panel-enter-from[data-v-35a7027c],.video-panel-leave-to[data-v-35a7027c]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.video-panel-enter-to[data-v-35a7027c],.video-panel-leave-from[data-v-35a7027c]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.find-icon[data-v-750ee9bb]{position:relative}.find-input-panel[data-v-750ee9bb]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.fr-header[data-v-750ee9bb]{display:flex;align-items:center;gap:6px;margin-bottom:6px}.fr-tab[data-v-750ee9bb]{border:none;background:transparent;padding:6px 8px;cursor:pointer;border-bottom:2px solid transparent}.fr-tab.active[data-v-750ee9bb]{border-color:#1a69f8;font-weight:600}.fr-label[data-v-750ee9bb]{display:block;font-size:12px;color:#666;margin:6px 0 4px}.fr-input-row[data-v-750ee9bb]{display:flex;align-items:center;gap:6px;width:100%}.fr-input[data-v-750ee9bb]{flex:1;padding:8px;border:1px solid #e5e7eb;border-radius:8px}.fr-count[data-v-750ee9bb]{font-size:12px;color:#999}.fr-actions[data-v-750ee9bb]{display:flex;gap:8px;margin-top:10px;justify-content:flex-end}.fr-btn[data-v-750ee9bb]{padding:6px 10px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer}.fr-btn.primary[data-v-750ee9bb]{color:#fff;background:#1a69f8;border-color:#1a69f8}.find-panel-enter-active[data-v-750ee9bb],.find-panel-leave-active[data-v-750ee9bb]{transition:opacity .18s ease,transform .18s ease}.find-panel-enter-from[data-v-750ee9bb],.find-panel-leave-to[data-v-750ee9bb]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.find-panel-enter-to[data-v-750ee9bb],.find-panel-leave-from[data-v-750ee9bb]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.link-icon[data-v-47847dc2]{position:relative}.link-input-panel[data-v-47847dc2]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.field[data-v-47847dc2]{margin-bottom:8px}.label[data-v-47847dc2]{font-size:12px;color:#666;margin-bottom:6px}.input[data-v-47847dc2]{width:100%;padding:8px 10px;box-sizing:border-box;max-width:100%;border:1px solid #e5e7eb;border-radius:8px;outline:none;font-size:14px}.actions[data-v-47847dc2]{display:flex;justify-content:flex-end;gap:8px}.btn[data-v-47847dc2]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.btn-primary[data-v-47847dc2]{border:none;background:#1677ff;color:#fff}.btn-primary[data-v-47847dc2]:hover{background:#1677ff;opacity:.92}.link-panel-enter-active[data-v-47847dc2],.link-panel-leave-active[data-v-47847dc2]{transition:opacity .18s ease,transform .18s ease}.link-panel-enter-from[data-v-47847dc2],.link-panel-leave-to[data-v-47847dc2]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.link-panel-enter-to[data-v-47847dc2],.link-panel-leave-from[data-v-47847dc2]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.table-icon[data-v-8a3a35f7]{position:relative}.table-panel[data-v-8a3a35f7]{position:absolute;top:32px;right:0;min-width:220px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20}.panel-title[data-v-8a3a35f7]{font-size:12px;color:#666;margin-bottom:6px}.grid[data-v-8a3a35f7]{display:flex;flex-direction:column;gap:4px;padding:8px;background:#f7f8fa;border-radius:8px}.row[data-v-8a3a35f7]{display:flex;gap:4px}.cell[data-v-8a3a35f7]{width:18px;height:18px;background:#fff;border:1px solid #e5e7eb;border-radius:3px;cursor:pointer}.cell.active[data-v-8a3a35f7]{background:#e8f1ff;border-color:#1677ff}.size[data-v-8a3a35f7]{margin-top:6px;font-size:12px;color:#333}.table-tools[data-v-bbf06816]{position:relative}.tools-panel[data-v-bbf06816]{position:absolute;top:32px;right:0;min-width:280px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20}.tools-grid[data-v-bbf06816]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.btn[data-v-bbf06816]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.icon[data-v-693f2c14]{cursor:default;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s ease-in-out;position:relative}.icon[data-v-693f2c14]:hover{background:#0000000d}.icon[data-v-587fb9a8]{cursor:pointer;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;color:#404040;position:relative}.icon[data-v-587fb9a8]:hover{background:#0000000d}.heading-select[data-v-aeb74f7c]{position:relative;margin:0 4px;-webkit-user-select:none;user-select:none;word-break:keep-all}.icon[data-v-aeb74f7c]{cursor:pointer;height:27px;border-radius:4px;display:flex;align-items:center;font-size:12px;transition:all .2s ease-in-out;position:relative;padding:0 6px;min-width:70px;justify-content:space-between;background:#fff}.icon[data-v-aeb74f7c]:hover{background:#0000000d}.label[data-v-aeb74f7c]{font-size:15px;color:#333}.dropdown[data-v-aeb74f7c]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:220px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;z-index:10;-webkit-user-select:none;user-select:none;will-change:opacity,transform}.dropdown-slide-enter-from[data-v-aeb74f7c],.dropdown-slide-leave-to[data-v-aeb74f7c]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-aeb74f7c],.dropdown-slide-leave-active[data-v-aeb74f7c]{transition:opacity .18s ease,transform .18s ease}.dropdown-item[data-v-aeb74f7c]{display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;font-size:14px}.dropdown-item[data-v-aeb74f7c]:hover{background:#0000000d}.item-label[data-v-aeb74f7c]{flex:1;color:#222}.item-label.paragraph[data-v-aeb74f7c]{font-size:15px}.item-label.level-1[data-v-aeb74f7c]{font-size:22px;font-weight:600}.item-label.level-2[data-v-aeb74f7c]{font-size:20px;font-weight:600}.item-label.level-3[data-v-aeb74f7c]{font-size:18px;font-weight:600}.item-label.level-4[data-v-aeb74f7c]{font-size:16px}.item-label.level-5[data-v-aeb74f7c]{font-size:15px}.item-label.level-6[data-v-aeb74f7c]{font-size:14px}.shortcut[data-v-aeb74f7c]{color:#999;font-size:12px}.align-select[data-v-f2f793f3]{position:relative;margin:0 2px;-webkit-user-select:none;user-select:none;word-break:keep-all}.icon_box[data-v-f2f793f3]{cursor:pointer;height:27px;border-radius:4px;display:flex;align-items:center;justify-content:space-between;transition:all .2s ease-in-out;padding:0 6px;background:#fff;gap:3px}.icon_box[data-v-f2f793f3]:hover{background:#0000000d}.dropdown[data-v-f2f793f3]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:160px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;z-index:10;-webkit-user-select:none;user-select:none;will-change:opacity,transform;padding:6px}.dropdown-slide-enter-from[data-v-f2f793f3],.dropdown-slide-leave-to[data-v-f2f793f3]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-f2f793f3],.dropdown-slide-leave-active[data-v-f2f793f3]{transition:opacity .18s ease,transform .18s ease}.options[data-v-f2f793f3]{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.option[data-v-f2f793f3]{cursor:pointer;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center}.option[data-v-f2f793f3]:hover{background:#0000000d}.option.active[data-v-f2f793f3]{background:#0000001a}.header_box[data-v-40d61df0]{display:flex;align-items:center;gap:3px;padding:8px;border-bottom:1px solid rgba(0,0,0,.1)}.header_box.disabled[data-v-40d61df0]{pointer-events:none;opacity:.5}.header_box .icon[data-v-40d61df0]{cursor:pointer;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;position:relative}.header_box .icon[data-v-40d61df0]:hover{background:#0000000d}.header_box .icon.active[data-v-40d61df0]{background:#0000001a}.header_box .icon[aria-disabled=true][data-v-40d61df0]{cursor:not-allowed;opacity:.5}.outline-wrapper[data-v-b5f802fc]{position:relative;-webkit-user-select:none;user-select:none}.outline[data-v-b5f802fc]{border-left:1px solid #e5e7eb;padding:8px;font-size:14px;position:sticky;top:0;align-self:start;max-height:100%;background:#fff;display:flex;flex-direction:column;width:0;opacity:0;overflow:hidden;transform:scaleX(0);transform-origin:right center;transition:width .2s ease,transform .2s ease,opacity .2s ease;border-left:none}.outline.isOpen[data-v-b5f802fc]{width:240px;opacity:1;transform:scaleX(1);border-left:1px solid #e5e7eb}.outline__listWrap[data-v-b5f802fc]{overflow-y:auto;overflow-x:hidden;flex:1 1 auto;min-height:0}.outline__listWrap[data-v-b5f802fc]::-webkit-scrollbar{width:6px;height:1px}.outline__listWrap[data-v-b5f802fc]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 5px #1118181a;background:#787878}.outline__listWrap[data-v-b5f802fc]::-webkit-scrollbar-track{border-radius:10px;background:transparent}.outline__header[data-v-b5f802fc]{display:flex;align-items:center;font-weight:600;margin-bottom:8px}.outline__header[data-v-b5f802fc]>*{display:inline-flex;gap:6px}.outline__list[data-v-b5f802fc]{list-style:none;padding:0;margin:0}.outline__item[data-v-b5f802fc]{cursor:pointer;padding:4px 0;color:#333}.outline__caret[data-v-b5f802fc]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:4px;color:#666;transition:transform .12s ease}.outline__caret.collapsed[data-v-b5f802fc]{transform:rotate(0)}.outline__caret.expanded[data-v-b5f802fc]{transform:rotate(90deg)}.outline__item[data-v-b5f802fc]:hover{color:#6366f1}.outline__item.lv-1[data-v-b5f802fc]{padding-left:0}.outline__item.lv-2[data-v-b5f802fc]{padding-left:8px}.outline__item.lv-3[data-v-b5f802fc]{padding-left:16px}.outline__item.lv-4[data-v-b5f802fc]{padding-left:24px}.outline__item.lv-5[data-v-b5f802fc]{padding-left:32px}.outline__item.lv-6[data-v-b5f802fc]{padding-left:40px}.outline__text[data-v-b5f802fc]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.outline__close[data-v-b5f802fc]{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;background:#fff;border-radius:50%;box-shadow:0 2px 10px #00000014;color:#666;cursor:pointer}.outline__close[data-v-b5f802fc]:hover{color:#6366f1}.outline__title[data-v-b5f802fc]{display:inline-flex;align-items:center;gap:6px}.outline__pinIcon[data-v-b5f802fc]{display:inline-flex;width:16px;height:16px;color:#666;cursor:pointer}.outline-drawer-mask[data-v-b5f802fc]{display:none}@media (max-width: 900px){.outline[data-v-b5f802fc]{position:absolute;right:0;top:0;bottom:0;width:0;max-width:85vw;box-shadow:-6px 0 24px #00000014;z-index:10}.outline.isOpen[data-v-b5f802fc]{width:min(85vw,280px)}.outline-drawer-mask[data-v-b5f802fc]{display:block;position:absolute;left:0;right:0;top:0;bottom:0;background:#00000029;z-index:10}}.outline-slide-enter-active[data-v-b5f802fc],.outline-slide-leave-active[data-v-b5f802fc]{transition:transform .18s ease,opacity .18s ease}.outline-slide-enter-from[data-v-b5f802fc],.outline-slide-leave-to[data-v-b5f802fc]{opacity:0;transform:translate(16px)}@media (max-width: 900px){.outline-slide-enter-from[data-v-b5f802fc],.outline-slide-leave-to[data-v-b5f802fc]{transform:translate(100%)}}.outline-mask-enter-active[data-v-b5f802fc],.outline-mask-leave-active[data-v-b5f802fc]{transition:opacity .18s ease}.outline-mask-enter-from[data-v-b5f802fc],.outline-mask-leave-to[data-v-b5f802fc]{opacity:0}.simple-editor[data-v-fa44c756]{height:var(--editor-height, auto);min-height:var(--editor-min-height, 100px);display:flex;flex-direction:column;border-radius:8px;background:#fff;box-sizing:border-box;border:1px solid #e5e7eb}.simple-editor.fullscreen[data-v-fa44c756]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;border-radius:0}.simple-editor.readonly[data-v-fa44c756] .tiptap-resize-handle{pointer-events:none;display:none}.simple-editor.readonly[data-v-fa44c756] img,.simple-editor.readonly[data-v-fa44c756] video{-webkit-user-drag:none}.simple-editor.readonly[data-v-fa44c756] .tiptap-resize-wrapper,.simple-editor.readonly[data-v-fa44c756] .tiptap-resize-container{outline:none!important;border:none!important}.editor_wrapper[data-v-fa44c756]{position:relative;overflow-y:auto;color:#333;align-items:stretch;flex:1 1 auto;min-height:0}.editor_wrapper[data-v-fa44c756]::-webkit-scrollbar{width:6px;height:1px}.editor_wrapper[data-v-fa44c756]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 5px #1118181a;background:#787878}.editor_wrapper[data-v-fa44c756]::-webkit-scrollbar-track{border-radius:10px;background:transparent}.editor_main[data-v-fa44c756]{display:grid;grid-template-columns:1fr auto;align-items:stretch;flex:1 1 auto;min-height:0;position:relative}.outline-toggle-row[data-v-fa44c756]{position:sticky;top:12px;z-index:3;display:flex;justify-content:flex-end;padding-right:12px}.outline-markers[data-v-fa44c756]{position:absolute;right:0;top:0;bottom:0;width:18px;z-index:4}.outline-pin[data-v-fa44c756]{position:absolute;right:3px;top:8px;width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;background:#fff;border-radius:50%;box-shadow:0 2px 10px #00000014;color:#666;cursor:pointer}.outline-marker[data-v-fa44c756]{position:absolute;right:3px;width:12px;height:2px;background:#d0d5dd;border-radius:2px}.outline-marker.active[data-v-fa44c756]{background:#22c55e}.content[data-v-fa44c756]{padding:12px 24px}.content[data-v-fa44c756] img{max-width:100%;height:auto;display:inline-block}.content[data-v-fa44c756] .ProseMirror{outline:none;caret-color:var(--editor-caret-color)}.content[data-v-fa44c756] .drag-hover-target{background:#eef5ff;border-radius:8px}.content[data-v-fa44c756] ul[data-type=taskList]{list-style:none;padding-left:0;margin:12px 0}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem]{display:flex;align-items:flex-start;gap:8px;margin:6px 0}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .todo-box{width:16px;height:16px;border-radius:4px;border:1px solid #e5e7eb;background:#fff;box-shadow:inset 0 1px 2px #0000000f;margin-top:2px;flex-shrink:0;cursor:pointer;position:relative;display:inline-flex;align-items:center;justify-content:center;transition:background-color .16s ease,border-color .16s ease}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .todo-box:after{content:"✓";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.3);opacity:0;color:#fff;font-size:12px;font-weight:700;transition:transform .18s ease,opacity .18s ease;animation:todo-check-out-fa44c756 .18s ease both}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem][data-checked=true] .todo-box{background:#22c55e;border-color:#22c55e}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem][data-checked=true] .todo-box:after{transform:translate(-50%,-50%) scale(1);opacity:1;animation:todo-check-in-fa44c756 .22s cubic-bezier(.2,.7,.3,1.2) both}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .todo-box:focus{outline:2px solid #1677ff44}@keyframes todo-check-in-fa44c756{0%{transform:translate(-50%,-50%) scale(.3);opacity:0}60%{transform:translate(-50%,-50%) scale(1.15);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:1}}@keyframes todo-check-out-fa44c756{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(.3);opacity:0}}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem]>label,.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .task-item__label{display:inline-flex;align-items:center;margin-right:6px}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] input[type=checkbox]{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto;position:static;opacity:1;pointer-events:auto;width:16px;height:16px;border-radius:4px;border:1px solid #e5e7eb;margin-top:2px}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem][data-checked=true] input[type=checkbox]{accent-color:#22c55e}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .task-content,.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .task-item__content{flex:1;min-width:1px}.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .task-content p,.content[data-v-fa44c756] ul[data-type=taskList] li[data-type=taskItem] .task-item__content p{margin:0}.content[data-v-fa44c756] img.ProseMirror-selectednode{outline:2px solid #6366f1;border-radius:4px}.content[data-v-fa44c756] [data-resize-wrapper]{display:inline-block}.content[data-v-fa44c756] .tiptap-resize-handle{width:10px;height:10px;background:#1677ffd9;border-radius:2px;box-shadow:0 0 0 1px #fff;cursor:nwse-resize;z-index:4;opacity:0;pointer-events:none;transition:opacity .12s ease}.content[data-v-fa44c756] .tiptap-resize-handle[data-resize-handle=top-left],.content[data-v-fa44c756] .tiptap-resize-handle[data-resize-handle=bottom-right]{cursor:nwse-resize}.content[data-v-fa44c756] .tiptap-resize-handle[data-resize-handle=top-right],.content[data-v-fa44c756] .tiptap-resize-handle[data-resize-handle=bottom-left]{cursor:nesw-resize}.content[data-v-fa44c756] .tiptap-resize-wrapper:hover .tiptap-resize-handle,.content[data-v-fa44c756] .tiptap-resize-container[data-resize-state=true] .tiptap-resize-handle{opacity:1;pointer-events:auto}.content[data-v-fa44c756] .tiptap-resize-wrapper:hover>img,.content[data-v-fa44c756] .tiptap-resize-wrapper:hover>video{outline:2px solid #6366f1;border-radius:4px}.content[data-v-fa44c756] .tiptap-resize-wrapper{position:relative}.content[data-v-fa44c756] .tiptap-resize-wrapper[data-uploading=true] .tiptap-upload-mask{pointer-events:auto}.content[data-v-fa44c756] .tiptap-upload-mask{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;display:flex;align-items:center;justify-content:center;color:#1677ff;font-size:12px;border-radius:4px;opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:2}.content[data-v-fa44c756] .tiptap-resize-wrapper[data-uploading=true] .tiptap-upload-mask{opacity:1}.content[data-v-fa44c756] .tiptap-upload-progress{width:66%;max-width:360px;height:6px;background:#0003;border-radius:4px;overflow:hidden;position:relative}.content[data-v-fa44c756] .tiptap-upload-progress:before{content:"";position:absolute;left:-40%;width:40%;height:100%;background:#1677ff;border-radius:4px;animation:tiptap-upload-indeterminate-fa44c756 1.1s ease-in-out infinite}@keyframes tiptap-upload-indeterminate-fa44c756{0%{left:-40%}50%{left:60%}to{left:100%}}.content[data-v-fa44c756] .tiptap-resize-container.is-resizing .tiptap-resize-handle{background:#1677ff}.content[data-v-fa44c756] .ProseMirror table{border-collapse:collapse;margin:12px 0;width:100%}.content[data-v-fa44c756] .ProseMirror table th,.content[data-v-fa44c756] .ProseMirror table td{border:1px solid #e5e7eb;padding:8px;text-align:left;position:relative}.content[data-v-fa44c756] .ProseMirror table thead th{background:#f7f9fc;font-weight:600}.content[data-v-fa44c756] .ProseMirror table .selectedCell{background:#1677ff0f;outline:2px solid #1677ff;outline-offset:-2px}.content[data-v-fa44c756] .ProseMirror table .column-resize-handle{position:absolute;right:-3px;top:0;bottom:0;width:8px;background:transparent;cursor:col-resize;z-index:3;-webkit-user-select:none;user-select:none;pointer-events:auto}.content[data-v-fa44c756] .ProseMirror table .column-resize-handle:hover{background:#1677ff40}.content[data-v-fa44c756] .ProseMirror p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:#999;pointer-events:none;float:left;height:0;white-space:pre-line}.content[data-v-fa44c756] code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:#f2f4f7;padding:2px 4px;border-radius:4px}.content[data-v-fa44c756] blockquote{border-left:3px solid #e5e7eb;margin:12px 0;padding:4px 12px;color:#6b7280}.content[data-v-fa44c756] pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:#f6f8fa;padding:12px;border-radius:6px;border:1px solid #e5e7eb;overflow:auto}.content[data-v-fa44c756] p{margin:12px 0}[data-v-fa44c756] .md-drag-handle{width:22px;height:22px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 2px 10px #00000014;background:#fff;border:1px solid #e5e7eb;cursor:grab;z-index:5}[data-v-fa44c756] .md-drag-handle:before{content:"···";letter-spacing:2px;color:#888;font-weight:700}@media (max-width: 900px){.editor_main[data-v-fa44c756]{grid-template-columns:1fr}.outline-markers[data-v-fa44c756]{display:none}}.link-modal-backdrop[data-v-fa44c756]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0003}.link-modal[data-v-fa44c756]{position:fixed;left:50%;top:20%;transform:translate(-50%);z-index:1000}.link-modal__content[data-v-fa44c756]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;min-width:360px;padding:12px;box-shadow:0 6px 24px #00000014}.link-modal__title[data-v-fa44c756]{font-weight:600;margin-bottom:8px}.link-modal__input[data-v-fa44c756]{width:100%;padding:8px;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:10px}.link-modal__actions[data-v-fa44c756]{display:flex;gap:8px;justify-content:flex-end}.link-modal__actions button[data-v-fa44c756]{padding:6px 10px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer}.tiptap-video[data-v-fa44c756]{display:block;width:640px;height:auto}[data-format-brush=true] .ProseMirror{cursor:url("data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1763569611105'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='87406'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='18'%20height='18'%3e%3cpath%20d='M840%20192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3%200-24%2010.7-24%2024v272c0%2013.3%2010.7%2024%2024%2024h592c13.3%200%2024-10.7%2024-24V256h32v200H465c-22.1%200-40%2017.9-40%2040v136h-44c-4.4%200-8%203.6-8%208v228c0%200.6%200.1%201.3%200.2%201.9-0.1%202-0.2%204.1-0.2%206.1%200%2046.4%2037.6%2084%2084%2084s84-37.6%2084-84c0-2.1-0.1-4.1-0.2-6.1%200.1-0.6%200.2-1.2%200.2-1.9V640c0-4.4-3.6-8-8-8h-44V520h351c22.1%200%2040-17.9%2040-40V232c0-22.1-17.9-40-40-40zM720%20352H208V160h512v192zM477%20876c0%2011-9%2020-20%2020s-20-9-20-20V696h40v180z'%20p-id='87407'%3e%3c/path%3e%3c/svg%3e") 0 16,crosshair}[data-format-brush=true] .ProseMirror *{cursor:inherit}`)),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
3
|
-
import { inject as oe, createVNode as
|
|
2
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`.tooltip-wrapper[data-v-2e4633d5]{position:relative;display:inline-flex;align-items:center;line-height:0}.tooltip[data-v-2e4633d5]{position:fixed;transform:translate(-50%);background:#3c3c3cf2;color:#fff;border-radius:8px;padding:6px 8px;font-size:12px;line-height:1.2;box-shadow:0 6px 20px #0003;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .12s ease,visibility .12s ease;pointer-events:none;z-index:1000}.tooltip.visible[data-v-2e4633d5]{opacity:1;visibility:visible}.shortcut[data-v-2e4633d5]{display:inline-block;margin-top:4px;opacity:.9;z-index:1000}.icon[data-v-8ea77a66]{cursor:pointer;width:27px;height:27px;border-radius:4px;display:flex;align-items:center;font-size:12px;transition:all .2s ease-in-out;position:relative;padding:0 6px;min-width:50px;justify-content:space-between;background:#fff}.icon[data-v-8ea77a66]:hover{background:#0000000d}.font-size[data-v-8ea77a66]{position:relative;margin:0 4px;-webkit-user-select:none;user-select:none}.label[data-v-8ea77a66]{font-size:15px;color:#333}.dropdown[data-v-8ea77a66]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:160px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;z-index:10;-webkit-user-select:none;user-select:none;will-change:opacity,transform}.dropdown-slide-enter-from[data-v-8ea77a66],.dropdown-slide-leave-to[data-v-8ea77a66]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-8ea77a66],.dropdown-slide-leave-active[data-v-8ea77a66]{transition:opacity .18s ease,transform .18s ease}.dropdown-item[data-v-8ea77a66]{display:flex;align-items:center;gap:8px;padding:6px 12px;cursor:pointer;font-size:14px}.dropdown-item[data-v-8ea77a66]:hover{background:#0000000d}.text[data-v-8ea77a66]{flex:1}.icon[data-v-0f5572cb]{cursor:default;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;position:relative}.icon-dropdown[data-v-0f5572cb]{width:auto;justify-content:space-between;background:#fff}.icon-stack[data-v-0f5572cb]{display:flex;flex-direction:column;align-items:center;line-height:1;border-radius:6px;padding:2px;cursor:pointer}.arrow[data-v-0f5572cb]{display:flex;align-items:center;justify-content:center;width:16px;height:27px;border-radius:4px;cursor:pointer}.hoverable[data-v-0f5572cb]:hover{background:#0000000d}.underline[data-v-0f5572cb]{width:16px;height:2px;border-radius:2px;margin-top:2px;background:#000}.color-select[data-v-0f5572cb]{position:relative;margin:0 4px;-webkit-user-select:none;user-select:none}.dropdown[data-v-0f5572cb]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:280px;max-width:320px;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;padding:8px;z-index:20;will-change:opacity,transform}.dropdown-slide-enter-from[data-v-0f5572cb],.dropdown-slide-leave-to[data-v-0f5572cb]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-0f5572cb],.dropdown-slide-leave-active[data-v-0f5572cb]{transition:opacity .18s ease,transform .18s ease}.section[data-v-0f5572cb]{margin-bottom:8px}.section-title[data-v-0f5572cb]{font-size:12px;color:#666;margin-bottom:6px}.swatches[data-v-0f5572cb]{display:flex;flex-wrap:wrap;gap:6px}.swatches.grid[data-v-0f5572cb]{grid-template-columns:repeat(10,1fr)}.swatch[data-v-0f5572cb]{width:18px;height:18px;border-radius:4px;cursor:pointer;position:relative;border:1px solid rgba(0,0,0,.08);display:flex;align-items:center;font-size:12px;justify-content:center}.swatch .check[data-v-0f5572cb]{position:absolute;top:0;right:2px;font-size:12px;color:#000;text-shadow:0 1px 2px rgba(255,255,255,.8)}.inline-actions[data-v-0f5572cb]{display:flex;justify-content:space-between;gap:8px}.btn[data-v-0f5572cb]{padding:4px 8px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;font-size:12px}.advanced[data-v-0f5572cb]{display:grid;grid-template-columns:auto 1fr auto;gap:4px;align-items:center;margin-top:8px}.hex[data-v-0f5572cb]{border:1px solid #e5e7eb;border-radius:8px;padding:4px 6px;font-size:12px}.apply[data-v-0f5572cb]{justify-self:end;flex-shrink:1}.svg-icon[data-v-c83ef2e3]{display:inline-block;line-height:0;vertical-align:middle}.svg-icon svg[data-v-c83ef2e3]{width:1em;height:1em;display:block}.icon[data-v-620c7aa3]{cursor:default;width:19px;height:19px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;position:relative}.icon-dropdown[data-v-620c7aa3]{width:auto;padding:0 2px;min-width:20px;justify-content:space-between;background:#fff}.icon-stack[data-v-620c7aa3]{display:flex;flex-direction:column;align-items:center;line-height:1;border-radius:6px;padding:2px;cursor:pointer}.arrow[data-v-620c7aa3]{display:flex;align-items:center;justify-content:center;width:16px;height:27px;border-radius:4px;cursor:pointer}.hoverable[data-v-620c7aa3]:hover{background:#0000000d}.underline[data-v-620c7aa3]{width:16px;height:2px;border-radius:2px;margin-top:2px;background:#fff}.bg-color-select[data-v-620c7aa3]{position:relative;-webkit-user-select:none;user-select:none}.dropdown[data-v-620c7aa3]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:280px;max-width:320px;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;padding:8px;z-index:20;will-change:opacity,transform}.section[data-v-620c7aa3]{margin-bottom:8px}.section-title[data-v-620c7aa3]{font-size:12px;color:#666;margin-bottom:6px}.swatches[data-v-620c7aa3]{display:flex;flex-wrap:wrap;gap:6px}.swatches.grid[data-v-620c7aa3]{grid-template-columns:repeat(10,1fr)}.swatch[data-v-620c7aa3]{width:18px;height:18px;border-radius:4px;cursor:pointer;position:relative;border:1px solid rgba(0,0,0,.08);display:flex;align-items:center;font-size:12px;justify-content:center}.swatch .check[data-v-620c7aa3]{position:absolute;top:0;right:2px;font-size:12px;color:#000;text-shadow:0 1px 2px rgba(255,255,255,.8)}.inline-actions[data-v-620c7aa3]{display:flex;justify-content:space-between;gap:8px}.btn[data-v-620c7aa3]{padding:4px 8px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer;font-size:12px}.advanced[data-v-620c7aa3]{display:grid;grid-template-columns:auto 1fr auto;gap:4px;align-items:center;margin-top:8px}.hex[data-v-620c7aa3]{border:1px solid #e5e7eb;border-radius:8px;padding:4px 6px;font-size:12px}.apply[data-v-620c7aa3]{justify-self:end;flex-shrink:1}.dropdown-slide-enter-from[data-v-620c7aa3],.dropdown-slide-leave-to[data-v-620c7aa3]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-620c7aa3],.dropdown-slide-leave-active[data-v-620c7aa3]{transition:opacity .18s ease,transform .18s ease}.image-icon[data-v-e1c5f3df]{position:relative}.image-input-panel[data-v-e1c5f3df]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.image-input[data-v-e1c5f3df]{width:100%;padding:8px 10px;box-sizing:border-box;max-width:100%;border:1px solid #e5e7eb;border-radius:8px;outline:none;font-size:14px}.image-actions[data-v-e1c5f3df]{margin-top:8px;display:flex;gap:8px;justify-content:flex-end}.btn[data-v-e1c5f3df]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.btn[data-v-e1c5f3df]:hover{background:#0000000d}.btn-primary[data-v-e1c5f3df]{border:none;background:#1677ff;color:#fff}.btn-primary[data-v-e1c5f3df]:hover{background:#1677ff;opacity:.92}.img-panel-enter-active[data-v-e1c5f3df],.img-panel-leave-active[data-v-e1c5f3df]{transition:opacity .18s ease,transform .18s ease}.img-panel-enter-from[data-v-e1c5f3df],.img-panel-leave-to[data-v-e1c5f3df]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.img-panel-enter-to[data-v-e1c5f3df],.img-panel-leave-from[data-v-e1c5f3df]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.video-icon[data-v-35a7027c]{position:relative}.video-input-panel[data-v-35a7027c]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.video-input[data-v-35a7027c]{width:100%;padding:8px 10px;box-sizing:border-box;max-width:100%;border:1px solid #e5e7eb;border-radius:8px;outline:none;font-size:14px}.video-actions[data-v-35a7027c]{margin-top:8px;display:flex;gap:8px;justify-content:flex-end}.btn[data-v-35a7027c]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.btn[data-v-35a7027c]:hover{background:#0000000d}.btn-primary[data-v-35a7027c]{border:none;background:#1677ff;color:#fff}.btn-primary[data-v-35a7027c]:hover{background:#1677ff;opacity:.92}.video-panel-enter-active[data-v-35a7027c],.video-panel-leave-active[data-v-35a7027c]{transition:opacity .18s ease,transform .18s ease}.video-panel-enter-from[data-v-35a7027c],.video-panel-leave-to[data-v-35a7027c]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.video-panel-enter-to[data-v-35a7027c],.video-panel-leave-from[data-v-35a7027c]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.find-icon[data-v-750ee9bb]{position:relative}.find-input-panel[data-v-750ee9bb]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.fr-header[data-v-750ee9bb]{display:flex;align-items:center;gap:6px;margin-bottom:6px}.fr-tab[data-v-750ee9bb]{border:none;background:transparent;padding:6px 8px;cursor:pointer;border-bottom:2px solid transparent}.fr-tab.active[data-v-750ee9bb]{border-color:#1a69f8;font-weight:600}.fr-label[data-v-750ee9bb]{display:block;font-size:12px;color:#666;margin:6px 0 4px}.fr-input-row[data-v-750ee9bb]{display:flex;align-items:center;gap:6px;width:100%}.fr-input[data-v-750ee9bb]{flex:1;padding:8px;border:1px solid #e5e7eb;border-radius:8px}.fr-count[data-v-750ee9bb]{font-size:12px;color:#999}.fr-actions[data-v-750ee9bb]{display:flex;gap:8px;margin-top:10px;justify-content:flex-end}.fr-btn[data-v-750ee9bb]{padding:6px 10px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer}.fr-btn.primary[data-v-750ee9bb]{color:#fff;background:#1a69f8;border-color:#1a69f8}.find-panel-enter-active[data-v-750ee9bb],.find-panel-leave-active[data-v-750ee9bb]{transition:opacity .18s ease,transform .18s ease}.find-panel-enter-from[data-v-750ee9bb],.find-panel-leave-to[data-v-750ee9bb]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.find-panel-enter-to[data-v-750ee9bb],.find-panel-leave-from[data-v-750ee9bb]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.link-icon[data-v-47847dc2]{position:relative}.link-input-panel[data-v-47847dc2]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:320px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20;will-change:opacity,transform}.field[data-v-47847dc2]{margin-bottom:8px}.label[data-v-47847dc2]{font-size:12px;color:#666;margin-bottom:6px}.input[data-v-47847dc2]{width:100%;padding:8px 10px;box-sizing:border-box;max-width:100%;border:1px solid #e5e7eb;border-radius:8px;outline:none;font-size:14px}.actions[data-v-47847dc2]{display:flex;justify-content:flex-end;gap:8px}.btn[data-v-47847dc2]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.btn-primary[data-v-47847dc2]{border:none;background:#1677ff;color:#fff}.btn-primary[data-v-47847dc2]:hover{background:#1677ff;opacity:.92}.link-panel-enter-active[data-v-47847dc2],.link-panel-leave-active[data-v-47847dc2]{transition:opacity .18s ease,transform .18s ease}.link-panel-enter-from[data-v-47847dc2],.link-panel-leave-to[data-v-47847dc2]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.link-panel-enter-to[data-v-47847dc2],.link-panel-leave-from[data-v-47847dc2]{opacity:1;transform:translate(-50%) translateY(0) scale(1)}.table-icon[data-v-8a3a35f7]{position:relative}.table-panel[data-v-8a3a35f7]{position:absolute;top:32px;right:0;min-width:220px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20}.panel-title[data-v-8a3a35f7]{font-size:12px;color:#666;margin-bottom:6px}.grid[data-v-8a3a35f7]{display:flex;flex-direction:column;gap:4px;padding:8px;background:#f7f8fa;border-radius:8px}.row[data-v-8a3a35f7]{display:flex;gap:4px}.cell[data-v-8a3a35f7]{width:18px;height:18px;background:#fff;border:1px solid #e5e7eb;border-radius:3px;cursor:pointer}.cell.active[data-v-8a3a35f7]{background:#e8f1ff;border-color:#1677ff}.size[data-v-8a3a35f7]{margin-top:6px;font-size:12px;color:#333}.table-tools[data-v-bbf06816]{position:relative}.tools-panel[data-v-bbf06816]{position:absolute;top:32px;right:0;min-width:280px;padding:10px;border:1px solid rgba(0,0,0,.1);background:#fff;border-radius:8px;box-shadow:0 6px 24px #0000001f;z-index:20}.tools-grid[data-v-bbf06816]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.btn[data-v-bbf06816]{padding:6px 10px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:13px}.icon[data-v-693f2c14]{cursor:default;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s ease-in-out;position:relative}.icon[data-v-693f2c14]:hover{background:#0000000d}.icon[data-v-587fb9a8]{cursor:pointer;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;color:#404040;position:relative}.icon[data-v-587fb9a8]:hover{background:#0000000d}.heading-select[data-v-aeb74f7c]{position:relative;margin:0 4px;-webkit-user-select:none;user-select:none;word-break:keep-all}.icon[data-v-aeb74f7c]{cursor:pointer;height:27px;border-radius:4px;display:flex;align-items:center;font-size:12px;transition:all .2s ease-in-out;position:relative;padding:0 6px;min-width:70px;justify-content:space-between;background:#fff}.icon[data-v-aeb74f7c]:hover{background:#0000000d}.label[data-v-aeb74f7c]{font-size:15px;color:#333}.dropdown[data-v-aeb74f7c]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:220px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;z-index:10;-webkit-user-select:none;user-select:none;will-change:opacity,transform}.dropdown-slide-enter-from[data-v-aeb74f7c],.dropdown-slide-leave-to[data-v-aeb74f7c]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-aeb74f7c],.dropdown-slide-leave-active[data-v-aeb74f7c]{transition:opacity .18s ease,transform .18s ease}.dropdown-item[data-v-aeb74f7c]{display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;font-size:14px}.dropdown-item[data-v-aeb74f7c]:hover{background:#0000000d}.item-label[data-v-aeb74f7c]{flex:1;color:#222}.item-label.paragraph[data-v-aeb74f7c]{font-size:15px}.item-label.level-1[data-v-aeb74f7c]{font-size:22px;font-weight:600}.item-label.level-2[data-v-aeb74f7c]{font-size:20px;font-weight:600}.item-label.level-3[data-v-aeb74f7c]{font-size:18px;font-weight:600}.item-label.level-4[data-v-aeb74f7c]{font-size:16px}.item-label.level-5[data-v-aeb74f7c]{font-size:15px}.item-label.level-6[data-v-aeb74f7c]{font-size:14px}.shortcut[data-v-aeb74f7c]{color:#999;font-size:12px}.align-select[data-v-f2f793f3]{position:relative;margin:0 2px;-webkit-user-select:none;user-select:none;word-break:keep-all}.icon_box[data-v-f2f793f3]{cursor:pointer;height:27px;border-radius:4px;display:flex;align-items:center;justify-content:space-between;transition:all .2s ease-in-out;padding:0 6px;background:#fff;gap:3px}.icon_box[data-v-f2f793f3]:hover{background:#0000000d}.dropdown[data-v-f2f793f3]{position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);min-width:160px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;box-shadow:0 6px 24px #00000014;z-index:10;-webkit-user-select:none;user-select:none;will-change:opacity,transform;padding:6px}.dropdown-slide-enter-from[data-v-f2f793f3],.dropdown-slide-leave-to[data-v-f2f793f3]{opacity:0;transform:translate(-50%) translateY(-6px) scale(.98)}.dropdown-slide-enter-active[data-v-f2f793f3],.dropdown-slide-leave-active[data-v-f2f793f3]{transition:opacity .18s ease,transform .18s ease}.options[data-v-f2f793f3]{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.option[data-v-f2f793f3]{cursor:pointer;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center}.option[data-v-f2f793f3]:hover{background:#0000000d}.option.active[data-v-f2f793f3]{background:#0000001a}.header_box[data-v-8f628937]{display:flex;align-items:center;gap:3px;padding:8px;border-bottom:1px solid rgba(0,0,0,.1)}.header_box.disabled[data-v-8f628937]{pointer-events:none;opacity:.5}.header_box .icon[data-v-8f628937]{cursor:pointer;width:27px;height:27px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:16px;transition:all .2s ease-in-out;position:relative}.header_box .icon[data-v-8f628937]:hover{background:#0000000d}.header_box .icon.active[data-v-8f628937]{background:#0000001a}.header_box .icon[aria-disabled=true][data-v-8f628937]{cursor:not-allowed;opacity:.5}.outline-wrapper[data-v-5d32336e]{position:relative;-webkit-user-select:none;user-select:none}.outline[data-v-5d32336e]{border-left:1px solid #e5e7eb;padding:8px;box-sizing:border-box;font-size:14px;position:sticky;top:0;align-self:start;height:100%;background:#fff;display:flex;flex-direction:column;width:0;opacity:0;overflow:hidden;transform:scaleX(0);transform-origin:right center;transition:width .2s ease,transform .2s ease,opacity .2s ease;border-left:none}.outline.isOpen[data-v-5d32336e]{width:240px;opacity:1;transform:scaleX(1);border-left:1px solid #e5e7eb}.outline__listWrap[data-v-5d32336e]{overflow-y:auto;overflow-x:hidden;flex:1 1 auto;min-height:0}.outline__listWrap[data-v-5d32336e]::-webkit-scrollbar{width:6px;height:1px}.outline__listWrap[data-v-5d32336e]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 5px #1118181a;background:#787878}.outline__listWrap[data-v-5d32336e]::-webkit-scrollbar-track{border-radius:10px;background:transparent}.outline__header[data-v-5d32336e]{display:flex;align-items:center;font-weight:600;margin-bottom:8px}.outline__header[data-v-5d32336e]>*{display:inline-flex;gap:6px}.outline__list[data-v-5d32336e]{list-style:none;padding:0;margin:0}.outline__item[data-v-5d32336e]{cursor:pointer;padding:4px 0;color:#333}.outline__caret[data-v-5d32336e]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:4px;color:#666;transition:transform .12s ease}.outline__caret.collapsed[data-v-5d32336e]{transform:rotate(0)}.outline__caret.expanded[data-v-5d32336e]{transform:rotate(90deg)}.outline__item[data-v-5d32336e]:hover{color:#6366f1}.outline__item.lv-1[data-v-5d32336e]{padding-left:0}.outline__item.lv-2[data-v-5d32336e]{padding-left:8px}.outline__item.lv-3[data-v-5d32336e]{padding-left:16px}.outline__item.lv-4[data-v-5d32336e]{padding-left:24px}.outline__item.lv-5[data-v-5d32336e]{padding-left:32px}.outline__item.lv-6[data-v-5d32336e]{padding-left:40px}.outline__text[data-v-5d32336e]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.outline__close[data-v-5d32336e]{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;background:#fff;border-radius:50%;box-shadow:0 2px 10px #00000014;color:#666;cursor:pointer}.outline__close[data-v-5d32336e]:hover{color:#6366f1}.outline__title[data-v-5d32336e]{display:inline-flex;align-items:center;gap:6px}.outline__pinIcon[data-v-5d32336e]{display:inline-flex;width:16px;height:16px;color:#666;cursor:pointer}.outline-drawer-mask[data-v-5d32336e]{display:none}@media (max-width: 900px){.outline[data-v-5d32336e]{position:absolute;right:0;top:0;bottom:0;width:0;max-width:85vw;box-shadow:-6px 0 24px #00000014;z-index:10}.outline.isOpen[data-v-5d32336e]{width:min(85vw,280px)}.outline-drawer-mask[data-v-5d32336e]{display:block;position:absolute;left:0;right:0;top:0;bottom:0;background:#00000029;z-index:10}}.outline-slide-enter-active[data-v-5d32336e],.outline-slide-leave-active[data-v-5d32336e]{transition:transform .18s ease,opacity .18s ease}.outline-slide-enter-from[data-v-5d32336e],.outline-slide-leave-to[data-v-5d32336e]{opacity:0;transform:translate(16px)}@media (max-width: 900px){.outline-slide-enter-from[data-v-5d32336e],.outline-slide-leave-to[data-v-5d32336e]{transform:translate(100%)}}.outline-mask-enter-active[data-v-5d32336e],.outline-mask-leave-active[data-v-5d32336e]{transition:opacity .18s ease}.outline-mask-enter-from[data-v-5d32336e],.outline-mask-leave-to[data-v-5d32336e]{opacity:0}.simple-editor[data-v-f468eecc]{height:var(--editor-height, auto);min-height:var(--editor-min-height, 100px);display:flex;flex-direction:column;border-radius:8px;background:#fff;box-sizing:border-box;border:1px solid #e5e7eb}.simple-editor.fullscreen[data-v-f468eecc]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;border-radius:0}.simple-editor.readonly[data-v-f468eecc] .tiptap-resize-handle{pointer-events:none;display:none}.simple-editor.readonly[data-v-f468eecc] img,.simple-editor.readonly[data-v-f468eecc] video{-webkit-user-drag:none}.simple-editor.readonly[data-v-f468eecc] .tiptap-resize-wrapper,.simple-editor.readonly[data-v-f468eecc] .tiptap-resize-container{outline:none!important;border:none!important;width:100%!important;max-width:100%!important}.simple-editor.readonly[data-v-f468eecc] .tiptap-video{width:100%!important;max-width:100%!important}.editor_wrapper[data-v-f468eecc]{position:relative;overflow-y:auto;overflow-x:hidden;color:#333;align-items:stretch;flex:1 1 auto;min-height:0}.editor_wrapper[data-v-f468eecc]::-webkit-scrollbar{width:6px;height:1px}.editor_wrapper[data-v-f468eecc]::-webkit-scrollbar-thumb{border-radius:10px;box-shadow:inset 0 0 5px #1118181a;background:#787878}.editor_wrapper[data-v-f468eecc]::-webkit-scrollbar-track{border-radius:10px;background:transparent}.editor_main[data-v-f468eecc]{display:grid;grid-template-columns:1fr auto;align-items:stretch;flex:1 1 auto;min-height:0;position:relative}.outline-toggle-row[data-v-f468eecc]{position:sticky;top:12px;z-index:3;display:flex;justify-content:flex-end;padding-right:12px}.outline-markers[data-v-f468eecc]{position:absolute;right:0;top:0;bottom:0;width:18px;z-index:4}.outline-pin[data-v-f468eecc]{position:absolute;right:3px;top:8px;width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;background:#fff;border-radius:50%;box-shadow:0 2px 10px #00000014;color:#666;cursor:pointer}.outline-marker[data-v-f468eecc]{position:absolute;right:3px;width:12px;height:2px;background:#d0d5dd;border-radius:2px}.outline-marker.active[data-v-f468eecc]{background:#22c55e}.content[data-v-f468eecc]{padding:12px 24px}.content[data-v-f468eecc] img{max-width:100%;height:auto;display:inline-block}.content[data-v-f468eecc] .ProseMirror{outline:none;caret-color:var(--editor-caret-color)}.content[data-v-f468eecc] .tiptap-resize-container,.content[data-v-f468eecc] .tiptap-resize-wrapper{max-width:100%!important;box-sizing:border-box}.content[data-v-f468eecc] .tiptap-video{max-width:100%!important;height:auto!important;display:block}.content[data-v-f468eecc] .drag-hover-target{background:#eef5ff;border-radius:8px}.content[data-v-f468eecc] ul[data-type=taskList]{list-style:none;padding-left:0;margin:12px 0}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem]{display:flex;align-items:flex-start;gap:8px;margin:6px 0}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .todo-box{width:16px;height:16px;border-radius:4px;border:1px solid #e5e7eb;background:#fff;box-shadow:inset 0 1px 2px #0000000f;margin-top:2px;flex-shrink:0;cursor:pointer;position:relative;display:inline-flex;align-items:center;justify-content:center;transition:background-color .16s ease,border-color .16s ease}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .todo-box:after{content:"✓";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.3);opacity:0;color:#fff;font-size:12px;font-weight:700;transition:transform .18s ease,opacity .18s ease;animation:todo-check-out-f468eecc .18s ease both}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem][data-checked=true] .todo-box{background:#22c55e;border-color:#22c55e}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem][data-checked=true] .todo-box:after{transform:translate(-50%,-50%) scale(1);opacity:1;animation:todo-check-in-f468eecc .22s cubic-bezier(.2,.7,.3,1.2) both}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .todo-box:focus{outline:2px solid #1677ff44}@keyframes todo-check-in-f468eecc{0%{transform:translate(-50%,-50%) scale(.3);opacity:0}60%{transform:translate(-50%,-50%) scale(1.15);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:1}}@keyframes todo-check-out-f468eecc{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(.3);opacity:0}}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem]>label,.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .task-item__label{display:inline-flex;align-items:center;margin-right:6px}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] input[type=checkbox]{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto;position:static;opacity:1;pointer-events:auto;width:16px;height:16px;border-radius:4px;border:1px solid #e5e7eb;margin-top:2px}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem][data-checked=true] input[type=checkbox]{accent-color:#22c55e}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .task-content,.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .task-item__content{flex:1;min-width:1px}.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .task-content p,.content[data-v-f468eecc] ul[data-type=taskList] li[data-type=taskItem] .task-item__content p{margin:0}.content[data-v-f468eecc] img.ProseMirror-selectednode{outline:2px solid #6366f1;border-radius:4px}.content[data-v-f468eecc] [data-resize-wrapper]{display:inline-block}.content[data-v-f468eecc] .tiptap-resize-handle{width:10px;height:10px;background:#1677ffd9;border-radius:2px;box-shadow:0 0 0 1px #fff;cursor:nwse-resize;z-index:4;opacity:0;pointer-events:none;transition:opacity .12s ease}.content[data-v-f468eecc] .tiptap-resize-handle[data-resize-handle=top-left],.content[data-v-f468eecc] .tiptap-resize-handle[data-resize-handle=bottom-right]{cursor:nwse-resize}.content[data-v-f468eecc] .tiptap-resize-handle[data-resize-handle=top-right],.content[data-v-f468eecc] .tiptap-resize-handle[data-resize-handle=bottom-left]{cursor:nesw-resize}.content[data-v-f468eecc] .tiptap-resize-wrapper:hover .tiptap-resize-handle,.content[data-v-f468eecc] .tiptap-resize-container[data-resize-state=true] .tiptap-resize-handle{opacity:1;pointer-events:auto}.content[data-v-f468eecc] .tiptap-resize-wrapper:hover>img,.content[data-v-f468eecc] .tiptap-resize-wrapper:hover>video{outline:2px solid #6366f1;border-radius:4px}.content[data-v-f468eecc] .tiptap-resize-wrapper{position:relative}.content[data-v-f468eecc] .tiptap-resize-wrapper[data-uploading=true] .tiptap-upload-mask{pointer-events:auto}.content[data-v-f468eecc] .tiptap-upload-mask{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;display:flex;align-items:center;justify-content:center;color:#1677ff;font-size:12px;border-radius:4px;opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:2}.content[data-v-f468eecc] .tiptap-resize-wrapper[data-uploading=true] .tiptap-upload-mask{opacity:1}.content[data-v-f468eecc] .tiptap-upload-progress{width:66%;max-width:360px;height:6px;background:#0003;border-radius:4px;overflow:hidden;position:relative}.content[data-v-f468eecc] .tiptap-upload-progress:before{content:"";position:absolute;left:-40%;width:40%;height:100%;background:#1677ff;border-radius:4px;animation:tiptap-upload-indeterminate-f468eecc 1.1s ease-in-out infinite}@keyframes tiptap-upload-indeterminate-f468eecc{0%{left:-40%}50%{left:60%}to{left:100%}}.content[data-v-f468eecc] .tiptap-resize-container.is-resizing .tiptap-resize-handle{background:#1677ff}.content[data-v-f468eecc] .ProseMirror table{border-collapse:collapse;margin:12px 0;width:100%}.content[data-v-f468eecc] .ProseMirror table th,.content[data-v-f468eecc] .ProseMirror table td{border:1px solid #e5e7eb;padding:8px;text-align:left;position:relative}.content[data-v-f468eecc] .ProseMirror table thead th{background:#f7f9fc;font-weight:600}.content[data-v-f468eecc] .ProseMirror table .selectedCell{background:#1677ff0f;outline:2px solid #1677ff;outline-offset:-2px}.content[data-v-f468eecc] .ProseMirror table .column-resize-handle{position:absolute;right:-3px;top:0;bottom:0;width:8px;background:transparent;cursor:col-resize;z-index:3;-webkit-user-select:none;user-select:none;pointer-events:auto}.content[data-v-f468eecc] .ProseMirror table .column-resize-handle:hover{background:#1677ff40}.content[data-v-f468eecc] .ProseMirror p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:#999;pointer-events:none;float:left;height:0;white-space:pre-line}.content[data-v-f468eecc] code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:#f2f4f7;padding:2px 4px;border-radius:4px}.content[data-v-f468eecc] blockquote{border-left:3px solid #e5e7eb;margin:12px 0;padding:4px 12px;color:#6b7280}.content[data-v-f468eecc] pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:#f6f8fa;padding:12px;border-radius:6px;border:1px solid #e5e7eb;overflow:auto}.content[data-v-f468eecc] p{margin:12px 0}[data-v-f468eecc] .md-drag-handle{width:22px;height:22px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 2px 10px #00000014;background:#fff;border:1px solid #e5e7eb;cursor:grab;z-index:5}[data-v-f468eecc] .md-drag-handle:before{content:"···";letter-spacing:2px;color:#888;font-weight:700}@media (max-width: 900px){.editor_main[data-v-f468eecc]{grid-template-columns:1fr}.outline-markers[data-v-f468eecc]{display:none}}.link-modal-backdrop[data-v-f468eecc]{position:fixed;top:0;right:0;bottom:0;left:0;background:#0003}.link-modal[data-v-f468eecc]{position:fixed;left:50%;top:20%;transform:translate(-50%);z-index:1000}.link-modal__content[data-v-f468eecc]{background:#fff;border:1px solid #e5e7eb;border-radius:8px;min-width:360px;padding:12px;box-shadow:0 6px 24px #00000014}.link-modal__title[data-v-f468eecc]{font-weight:600;margin-bottom:8px}.link-modal__input[data-v-f468eecc]{width:100%;padding:8px;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:10px}.link-modal__actions[data-v-f468eecc]{display:flex;gap:8px;justify-content:flex-end}.link-modal__actions button[data-v-f468eecc]{padding:6px 10px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;cursor:pointer}.tiptap-video[data-v-f468eecc]{display:block;max-width:100%;height:auto}[data-format-brush=true] .ProseMirror{cursor:url("data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1763569611105'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='87406'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='18'%20height='18'%3e%3cpath%20d='M840%20192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3%200-24%2010.7-24%2024v272c0%2013.3%2010.7%2024%2024%2024h592c13.3%200%2024-10.7%2024-24V256h32v200H465c-22.1%200-40%2017.9-40%2040v136h-44c-4.4%200-8%203.6-8%208v228c0%200.6%200.1%201.3%200.2%201.9-0.1%202-0.2%204.1-0.2%206.1%200%2046.4%2037.6%2084%2084%2084s84-37.6%2084-84c0-2.1-0.1-4.1-0.2-6.1%200.1-0.6%200.2-1.2%200.2-1.9V640c0-4.4-3.6-8-8-8h-44V520h351c22.1%200%2040-17.9%2040-40V232c0-22.1-17.9-40-40-40zM720%20352H208V160h512v192zM477%20876c0%2011-9%2020-20%2020s-20-9-20-20V696h40v180z'%20p-id='87407'%3e%3c/path%3e%3c/svg%3e") 0 16,crosshair}[data-format-brush=true] .ProseMirror *{cursor:inherit}`)),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
3
|
+
import { inject as oe, createVNode as v, defineComponent as nt, ref as F, onMounted as vt, onUnmounted as ne, watch as wt, nextTick as Ct, createElementBlock as V, openBlock as T, renderSlot as se, createBlock as _t, Teleport as ie, createElementVNode as c, normalizeStyle as dt, normalizeClass as J, createCommentVNode as K, toDisplayString as ft, computed as ut, onBeforeUnmount as ht, unref as z, withCtx as R, withModifiers as A, Transition as xt, Fragment as mt, renderList as kt, withDirectives as Lt, vModelText as Mt, useAttrs as le, resolveDynamicComponent as re } from "vue";
|
|
4
4
|
import { Editor as ae, EditorContent as ce } from "@tiptap/vue-3";
|
|
5
5
|
import { StarterKit as de } from "@tiptap/starter-kit";
|
|
6
6
|
import { Markdown as ue } from "@tiptap/markdown";
|
|
7
7
|
import { Image as ve } from "@tiptap/extension-image";
|
|
8
|
-
import * as
|
|
8
|
+
import * as Ot from "@tiptap/core";
|
|
9
9
|
import { ResizableNodeView as te } from "@tiptap/core";
|
|
10
|
-
import { Placeholder as
|
|
11
|
-
import { Link as
|
|
10
|
+
import { Placeholder as pe } from "@tiptap/extension-placeholder";
|
|
11
|
+
import { Link as fe } from "@tiptap/extension-link";
|
|
12
12
|
import { TextAlign as he } from "@tiptap/extension-text-align";
|
|
13
|
-
import { TextStyle as
|
|
13
|
+
import { TextStyle as jt } from "@tiptap/extension-text-style";
|
|
14
14
|
import { Color as ge } from "@tiptap/extension-color";
|
|
15
15
|
import { Underline as me } from "@tiptap/extension-underline";
|
|
16
16
|
import { TableCell as ke, TableKit as we } from "@tiptap/extension-table";
|
|
@@ -58,12 +58,12 @@ const xe = ve.extend({
|
|
|
58
58
|
},
|
|
59
59
|
onCommit: (C, $) => {
|
|
60
60
|
try {
|
|
61
|
-
const h = n,
|
|
62
|
-
if (
|
|
63
|
-
const { state: b } = h, y = b.schema.nodes.image, s = b.doc.nodeAt(
|
|
61
|
+
const h = n, M = d();
|
|
62
|
+
if (M !== void 0) {
|
|
63
|
+
const { state: b } = h, y = b.schema.nodes.image, s = b.doc.nodeAt(M);
|
|
64
64
|
if (y && s) {
|
|
65
|
-
const
|
|
66
|
-
h.view.dispatch(
|
|
65
|
+
const p = { ...s.attrs || {}, width: C, height: $ }, u = b.tr.setNodeMarkup(M, y, p, s.marks);
|
|
66
|
+
h.view.dispatch(u);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
} catch {
|
|
@@ -123,7 +123,7 @@ const xe = ve.extend({
|
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
var Qt;
|
|
126
|
-
const Le = ((Qt =
|
|
126
|
+
const Le = ((Qt = Ot == null ? void 0 : Ot.Node) == null ? void 0 : Qt.create) ?? ((t) => t), Me = Le({
|
|
127
127
|
name: "video",
|
|
128
128
|
inline: !0,
|
|
129
129
|
group: "inline",
|
|
@@ -194,7 +194,7 @@ const Le = ((Qt = jt == null ? void 0 : jt.Node) == null ? void 0 : Qt.create) ?
|
|
|
194
194
|
},
|
|
195
195
|
addNodeView() {
|
|
196
196
|
return ({ node: t, getPos: d, editor: n }) => {
|
|
197
|
-
var C, $, h,
|
|
197
|
+
var C, $, h, M, b;
|
|
198
198
|
const o = document.createElement("video"), r = t.attrs;
|
|
199
199
|
o.src = r.src || "", o.controls = r.controls !== !1, o.autoplay = !1, o.loop = !!r.loop, o.muted = !!r.muted, r.poster && (o.poster = r.poster), o.setAttribute("playsinline", "true"), r.class && (o.className = String(r.class)), typeof r.width == "number" && (o.style.width = `${r.width}px`), typeof r.height == "number" && (o.style.height = `${r.height}px`), o.style.display = "inline-block";
|
|
200
200
|
const i = new te({
|
|
@@ -206,12 +206,12 @@ const Le = ((Qt = jt == null ? void 0 : jt.Node) == null ? void 0 : Qt.create) ?
|
|
|
206
206
|
},
|
|
207
207
|
onCommit: (y, s) => {
|
|
208
208
|
try {
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
const { state: m } =
|
|
212
|
-
if (
|
|
213
|
-
const I = { ...S.attrs || {}, width: y, height: s }, w = m.tr.setNodeMarkup(
|
|
214
|
-
|
|
209
|
+
const p = n, u = d();
|
|
210
|
+
if (u !== void 0) {
|
|
211
|
+
const { state: m } = p, f = m.schema.nodes.video, S = m.doc.nodeAt(u);
|
|
212
|
+
if (f && S) {
|
|
213
|
+
const I = { ...S.attrs || {}, width: y, height: s }, w = m.tr.setNodeMarkup(u, f, I, S.marks);
|
|
214
|
+
p.view.dispatch(w);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
} catch {
|
|
@@ -251,7 +251,7 @@ const Le = ((Qt = jt == null ? void 0 : jt.Node) == null ? void 0 : Qt.create) ?
|
|
|
251
251
|
}
|
|
252
252
|
});
|
|
253
253
|
try {
|
|
254
|
-
o.setAttribute("draggable", "false"), ($ = (C = i == null ? void 0 : i.wrapper) == null ? void 0 : C.setAttribute) == null || $.call(C, "draggable", "false"), (
|
|
254
|
+
o.setAttribute("draggable", "false"), ($ = (C = i == null ? void 0 : i.wrapper) == null ? void 0 : C.setAttribute) == null || $.call(C, "draggable", "false"), (M = (h = i == null ? void 0 : i.container) == null ? void 0 : h.setAttribute) == null || M.call(h, "draggable", "false");
|
|
255
255
|
} catch {
|
|
256
256
|
}
|
|
257
257
|
try {
|
|
@@ -301,7 +301,7 @@ const Le = ((Qt = jt == null ? void 0 : jt.Node) == null ? void 0 : Qt.create) ?
|
|
|
301
301
|
var y;
|
|
302
302
|
const { pos: l, n: C } = i();
|
|
303
303
|
if (l == null || !C) return;
|
|
304
|
-
const $ = d.view.state, h = $.schema.nodes.taskItem,
|
|
304
|
+
const $ = d.view.state, h = $.schema.nodes.taskItem, M = !!((y = C.attrs) != null && y.checked), b = $.tr.setNodeMarkup(l, h, { ...C.attrs || {}, checked: !M });
|
|
305
305
|
d.view.dispatch(b);
|
|
306
306
|
}), r.addEventListener("keydown", (l) => {
|
|
307
307
|
var C;
|
|
@@ -309,7 +309,7 @@ const Le = ((Qt = jt == null ? void 0 : jt.Node) == null ? void 0 : Qt.create) ?
|
|
|
309
309
|
l.preventDefault();
|
|
310
310
|
const { pos: $, n: h } = i();
|
|
311
311
|
if ($ == null || !h) return;
|
|
312
|
-
const
|
|
312
|
+
const M = d.view.state, b = M.schema.nodes.taskItem, y = !!((C = h.attrs) != null && C.checked), s = M.tr.setNodeMarkup($, b, { ...h.attrs || {}, checked: !y });
|
|
313
313
|
d.view.dispatch(s);
|
|
314
314
|
}
|
|
315
315
|
});
|
|
@@ -382,276 +382,262 @@ function Ee(t, d, n) {
|
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
var De = Symbol("icon-context");
|
|
385
|
-
function
|
|
385
|
+
function gt(t, d, n) {
|
|
386
386
|
var o = {
|
|
387
387
|
name: "icon-" + t,
|
|
388
388
|
props: ["size", "strokeWidth", "strokeLinecap", "strokeLinejoin", "theme", "fill", "spin"],
|
|
389
389
|
setup: function(i) {
|
|
390
390
|
var D = Se(), l = oe(De, $e);
|
|
391
391
|
return function() {
|
|
392
|
-
var C = i.size, $ = i.strokeWidth, h = i.strokeLinecap,
|
|
392
|
+
var C = i.size, $ = i.strokeWidth, h = i.strokeLinecap, M = i.strokeLinejoin, b = i.theme, y = i.fill, s = i.spin, p = Ee(D, {
|
|
393
393
|
size: C,
|
|
394
394
|
strokeWidth: $,
|
|
395
395
|
strokeLinecap: h,
|
|
396
|
-
strokeLinejoin:
|
|
396
|
+
strokeLinejoin: M,
|
|
397
397
|
theme: b,
|
|
398
398
|
fill: y
|
|
399
|
-
}, l),
|
|
400
|
-
return
|
|
401
|
-
class:
|
|
402
|
-
}, [n(
|
|
399
|
+
}, l), u = [l.prefix + "-icon"];
|
|
400
|
+
return u.push(l.prefix + "-icon-" + t), d && l.rtl && u.push(l.prefix + "-icon-rtl"), s && u.push(l.prefix + "-icon-spin"), v("span", {
|
|
401
|
+
class: u.join(" ")
|
|
402
|
+
}, [n(p)]);
|
|
403
403
|
};
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
return o;
|
|
407
407
|
}
|
|
408
|
-
const Bt =
|
|
409
|
-
return
|
|
408
|
+
const Bt = gt("check", !0, function(t) {
|
|
409
|
+
return v("svg", {
|
|
410
410
|
width: t.size,
|
|
411
411
|
height: t.size,
|
|
412
412
|
viewBox: "0 0 48 48",
|
|
413
413
|
fill: "none"
|
|
414
|
-
}, [
|
|
414
|
+
}, [v("path", {
|
|
415
415
|
d: "M43 11L16.875 37L5 25.1818",
|
|
416
416
|
stroke: t.colors[0],
|
|
417
417
|
"stroke-width": t.strokeWidth,
|
|
418
418
|
"stroke-linecap": t.strokeLinecap,
|
|
419
419
|
"stroke-linejoin": t.strokeLinejoin
|
|
420
420
|
}, null)]);
|
|
421
|
-
}), Vt =
|
|
422
|
-
return
|
|
421
|
+
}), Vt = gt("down-one", !1, function(t) {
|
|
422
|
+
return v("svg", {
|
|
423
423
|
width: t.size,
|
|
424
424
|
height: t.size,
|
|
425
425
|
viewBox: "0 0 48 48",
|
|
426
426
|
fill: "none"
|
|
427
|
-
}, [
|
|
427
|
+
}, [v("path", {
|
|
428
428
|
d: "M36 19L24 31L12 19H36Z",
|
|
429
429
|
fill: t.colors[1],
|
|
430
430
|
stroke: t.colors[0],
|
|
431
431
|
"stroke-width": t.strokeWidth,
|
|
432
432
|
"stroke-linejoin": t.strokeLinejoin
|
|
433
433
|
}, null)]);
|
|
434
|
-
}), Te =
|
|
435
|
-
return
|
|
434
|
+
}), Te = gt("font-size-two", !0, function(t) {
|
|
435
|
+
return v("svg", {
|
|
436
436
|
width: t.size,
|
|
437
437
|
height: t.size,
|
|
438
438
|
viewBox: "0 0 48 48",
|
|
439
439
|
fill: "none"
|
|
440
|
-
}, [
|
|
440
|
+
}, [v("path", {
|
|
441
441
|
d: "M4 44L24 4L44 44",
|
|
442
442
|
stroke: t.colors[0],
|
|
443
443
|
"stroke-width": t.strokeWidth,
|
|
444
444
|
"stroke-linecap": t.strokeLinecap,
|
|
445
445
|
"stroke-linejoin": t.strokeLinejoin
|
|
446
|
-
}, null),
|
|
446
|
+
}, null), v("path", {
|
|
447
447
|
d: "M12 28H36",
|
|
448
448
|
stroke: t.colors[0],
|
|
449
449
|
"stroke-width": t.strokeWidth,
|
|
450
450
|
"stroke-linecap": t.strokeLinecap,
|
|
451
451
|
"stroke-linejoin": t.strokeLinejoin
|
|
452
452
|
}, null)]);
|
|
453
|
-
}), Fe =
|
|
454
|
-
return
|
|
453
|
+
}), Fe = gt("full-screen", !1, function(t) {
|
|
454
|
+
return v("svg", {
|
|
455
455
|
width: t.size,
|
|
456
456
|
height: t.size,
|
|
457
457
|
viewBox: "0 0 48 48",
|
|
458
458
|
fill: "none"
|
|
459
|
-
}, [
|
|
459
|
+
}, [v("path", {
|
|
460
460
|
d: "M33 6H42V15",
|
|
461
461
|
stroke: t.colors[0],
|
|
462
462
|
"stroke-width": t.strokeWidth,
|
|
463
463
|
"stroke-linecap": t.strokeLinecap,
|
|
464
464
|
"stroke-linejoin": t.strokeLinejoin
|
|
465
|
-
}, null),
|
|
465
|
+
}, null), v("path", {
|
|
466
466
|
d: "M42 33V42H33",
|
|
467
467
|
stroke: t.colors[0],
|
|
468
468
|
"stroke-width": t.strokeWidth,
|
|
469
469
|
"stroke-linecap": t.strokeLinecap,
|
|
470
470
|
"stroke-linejoin": t.strokeLinejoin
|
|
471
|
-
}, null),
|
|
471
|
+
}, null), v("path", {
|
|
472
472
|
d: "M15 42H6V33",
|
|
473
473
|
stroke: t.colors[0],
|
|
474
474
|
"stroke-width": t.strokeWidth,
|
|
475
475
|
"stroke-linecap": t.strokeLinecap,
|
|
476
476
|
"stroke-linejoin": t.strokeLinejoin
|
|
477
|
-
}, null),
|
|
477
|
+
}, null), v("path", {
|
|
478
478
|
d: "M6 15V6H15",
|
|
479
479
|
stroke: t.colors[0],
|
|
480
480
|
"stroke-width": t.strokeWidth,
|
|
481
481
|
"stroke-linecap": t.strokeLinecap,
|
|
482
482
|
"stroke-linejoin": t.strokeLinejoin
|
|
483
483
|
}, null)]);
|
|
484
|
-
}), Ae =
|
|
485
|
-
return
|
|
484
|
+
}), Ae = gt("go-on", !0, function(t) {
|
|
485
|
+
return v("svg", {
|
|
486
486
|
width: t.size,
|
|
487
487
|
height: t.size,
|
|
488
488
|
viewBox: "0 0 48 48",
|
|
489
489
|
fill: "none"
|
|
490
|
-
}, [
|
|
490
|
+
}, [v("path", {
|
|
491
491
|
d: "M36 7L43 13.4615L36 21",
|
|
492
492
|
stroke: t.colors[0],
|
|
493
493
|
"stroke-width": t.strokeWidth,
|
|
494
494
|
"stroke-linecap": t.strokeLinecap,
|
|
495
495
|
"stroke-linejoin": t.strokeLinejoin
|
|
496
|
-
}, null),
|
|
496
|
+
}, null), v("path", {
|
|
497
497
|
d: "M40 14H17.0062C10.1232 14 4.27787 19.6204 4.00964 26.5C3.72612 33.7696 9.73291 40 17.0062 40H34.0016",
|
|
498
498
|
stroke: t.colors[0],
|
|
499
499
|
"stroke-width": t.strokeWidth,
|
|
500
500
|
"stroke-linecap": t.strokeLinecap,
|
|
501
501
|
"stroke-linejoin": t.strokeLinejoin
|
|
502
502
|
}, null)]);
|
|
503
|
-
}), Be =
|
|
504
|
-
return
|
|
503
|
+
}), Be = gt("off-screen", !1, function(t) {
|
|
504
|
+
return v("svg", {
|
|
505
505
|
width: t.size,
|
|
506
506
|
height: t.size,
|
|
507
507
|
viewBox: "0 0 48 48",
|
|
508
508
|
fill: "none"
|
|
509
|
-
}, [
|
|
509
|
+
}, [v("path", {
|
|
510
510
|
d: "M33 6V15H42",
|
|
511
511
|
stroke: t.colors[0],
|
|
512
512
|
"stroke-width": t.strokeWidth,
|
|
513
513
|
"stroke-linecap": t.strokeLinecap,
|
|
514
514
|
"stroke-linejoin": t.strokeLinejoin
|
|
515
|
-
}, null),
|
|
515
|
+
}, null), v("path", {
|
|
516
516
|
d: "M15 6V15H6",
|
|
517
517
|
stroke: t.colors[0],
|
|
518
518
|
"stroke-width": t.strokeWidth,
|
|
519
519
|
"stroke-linecap": t.strokeLinecap,
|
|
520
520
|
"stroke-linejoin": t.strokeLinejoin
|
|
521
|
-
}, null),
|
|
521
|
+
}, null), v("path", {
|
|
522
522
|
d: "M15 42V33H6",
|
|
523
523
|
stroke: t.colors[0],
|
|
524
524
|
"stroke-width": t.strokeWidth,
|
|
525
525
|
"stroke-linecap": t.strokeLinecap,
|
|
526
526
|
"stroke-linejoin": t.strokeLinejoin
|
|
527
|
-
}, null),
|
|
527
|
+
}, null), v("path", {
|
|
528
528
|
d: "M33 42V33H41.8995",
|
|
529
529
|
stroke: t.colors[0],
|
|
530
530
|
"stroke-width": t.strokeWidth,
|
|
531
531
|
"stroke-linecap": t.strokeLinecap,
|
|
532
532
|
"stroke-linejoin": t.strokeLinejoin
|
|
533
533
|
}, null)]);
|
|
534
|
-
}), He =
|
|
535
|
-
return
|
|
534
|
+
}), He = gt("preview-close-one", !0, function(t) {
|
|
535
|
+
return v("svg", {
|
|
536
536
|
width: t.size,
|
|
537
537
|
height: t.size,
|
|
538
538
|
viewBox: "0 0 48 48",
|
|
539
539
|
fill: "none"
|
|
540
|
-
}, [
|
|
540
|
+
}, [v("path", {
|
|
541
541
|
d: "M9.85786 18C6.23858 21 4 24 4 24C4 24 12.9543 36 24 36C25.3699 36 26.7076 35.8154 28 35.4921M20.0318 12.5C21.3144 12.1816 22.6414 12 24 12C35.0457 12 44 24 44 24C44 24 41.7614 27 38.1421 30",
|
|
542
542
|
stroke: t.colors[0],
|
|
543
543
|
"stroke-width": t.strokeWidth,
|
|
544
544
|
"stroke-linecap": t.strokeLinecap,
|
|
545
545
|
"stroke-linejoin": t.strokeLinejoin
|
|
546
|
-
}, null),
|
|
546
|
+
}, null), v("path", {
|
|
547
547
|
d: "M20.3142 20.6211C19.4981 21.5109 19 22.6972 19 23.9998C19 26.7612 21.2386 28.9998 24 28.9998C25.3627 28.9998 26.5981 28.4546 27.5 27.5705",
|
|
548
548
|
stroke: t.colors[0],
|
|
549
549
|
"stroke-width": t.strokeWidth,
|
|
550
550
|
"stroke-linecap": t.strokeLinecap,
|
|
551
551
|
"stroke-linejoin": t.strokeLinejoin
|
|
552
|
-
}, null),
|
|
552
|
+
}, null), v("path", {
|
|
553
553
|
d: "M42 42L6 6",
|
|
554
554
|
stroke: t.colors[0],
|
|
555
555
|
"stroke-width": t.strokeWidth,
|
|
556
556
|
"stroke-linecap": t.strokeLinecap,
|
|
557
557
|
"stroke-linejoin": t.strokeLinejoin
|
|
558
558
|
}, null)]);
|
|
559
|
-
}), Ve =
|
|
560
|
-
return
|
|
559
|
+
}), Ve = gt("return", !0, function(t) {
|
|
560
|
+
return v("svg", {
|
|
561
561
|
width: t.size,
|
|
562
562
|
height: t.size,
|
|
563
563
|
viewBox: "0 0 48 48",
|
|
564
564
|
fill: "none"
|
|
565
|
-
}, [
|
|
566
|
-
d: "M32 4H16L20 7L16 20C16 20 10 24 10 28H20L24 44L28 28H38C38 24 34 21.1667 32 20L28 7L32 4Z",
|
|
567
|
-
fill: t.colors[1],
|
|
568
|
-
stroke: t.colors[0],
|
|
569
|
-
"stroke-width": t.strokeWidth,
|
|
570
|
-
"stroke-linecap": t.strokeLinecap,
|
|
571
|
-
"stroke-linejoin": t.strokeLinejoin
|
|
572
|
-
}, null)]);
|
|
573
|
-
}), Ue = ft("return", !0, function(t) {
|
|
574
|
-
return u("svg", {
|
|
575
|
-
width: t.size,
|
|
576
|
-
height: t.size,
|
|
577
|
-
viewBox: "0 0 48 48",
|
|
578
|
-
fill: "none"
|
|
579
|
-
}, [u("path", {
|
|
565
|
+
}, [v("path", {
|
|
580
566
|
d: "M12.9998 8L6 14L12.9998 21",
|
|
581
567
|
stroke: t.colors[0],
|
|
582
568
|
"stroke-width": t.strokeWidth,
|
|
583
569
|
"stroke-linecap": t.strokeLinecap,
|
|
584
570
|
"stroke-linejoin": t.strokeLinejoin
|
|
585
|
-
}, null),
|
|
571
|
+
}, null), v("path", {
|
|
586
572
|
d: "M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",
|
|
587
573
|
stroke: t.colors[0],
|
|
588
574
|
"stroke-width": t.strokeWidth,
|
|
589
575
|
"stroke-linecap": t.strokeLinecap,
|
|
590
576
|
"stroke-linejoin": t.strokeLinejoin
|
|
591
577
|
}, null)]);
|
|
592
|
-
}),
|
|
593
|
-
return
|
|
578
|
+
}), Ue = gt("search", !0, function(t) {
|
|
579
|
+
return v("svg", {
|
|
594
580
|
width: t.size,
|
|
595
581
|
height: t.size,
|
|
596
582
|
viewBox: "0 0 48 48",
|
|
597
583
|
fill: "none"
|
|
598
|
-
}, [
|
|
584
|
+
}, [v("path", {
|
|
599
585
|
d: "M21 38C30.3888 38 38 30.3888 38 21C38 11.6112 30.3888 4 21 4C11.6112 4 4 11.6112 4 21C4 30.3888 11.6112 38 21 38Z",
|
|
600
586
|
fill: t.colors[1],
|
|
601
587
|
stroke: t.colors[0],
|
|
602
588
|
"stroke-width": t.strokeWidth,
|
|
603
589
|
"stroke-linejoin": t.strokeLinejoin
|
|
604
|
-
}, null),
|
|
590
|
+
}, null), v("path", {
|
|
605
591
|
d: "M26.657 14.3431C25.2093 12.8954 23.2093 12 21.0001 12C18.791 12 16.791 12.8954 15.3433 14.3431",
|
|
606
592
|
stroke: t.colors[2],
|
|
607
593
|
"stroke-width": t.strokeWidth,
|
|
608
594
|
"stroke-linecap": t.strokeLinecap,
|
|
609
595
|
"stroke-linejoin": t.strokeLinejoin
|
|
610
|
-
}, null),
|
|
596
|
+
}, null), v("path", {
|
|
611
597
|
d: "M33.2216 33.2217L41.7069 41.707",
|
|
612
598
|
stroke: t.colors[0],
|
|
613
599
|
"stroke-width": t.strokeWidth,
|
|
614
600
|
"stroke-linecap": t.strokeLinecap,
|
|
615
601
|
"stroke-linejoin": t.strokeLinejoin
|
|
616
602
|
}, null)]);
|
|
617
|
-
}),
|
|
618
|
-
return
|
|
603
|
+
}), Ie = gt("strikethrough", !0, function(t) {
|
|
604
|
+
return v("svg", {
|
|
619
605
|
width: t.size,
|
|
620
606
|
height: t.size,
|
|
621
607
|
viewBox: "0 0 48 48",
|
|
622
608
|
fill: "none"
|
|
623
|
-
}, [
|
|
609
|
+
}, [v("path", {
|
|
624
610
|
d: "M5 24H43",
|
|
625
611
|
stroke: t.colors[0],
|
|
626
612
|
"stroke-width": t.strokeWidth,
|
|
627
613
|
"stroke-linecap": t.strokeLinecap,
|
|
628
614
|
"stroke-linejoin": t.strokeLinejoin
|
|
629
|
-
}, null),
|
|
615
|
+
}, null), v("path", {
|
|
630
616
|
d: "M24 24C40 30 34 44 24 44C13.9999 44 12 36 12 36",
|
|
631
617
|
stroke: t.colors[0],
|
|
632
618
|
"stroke-width": t.strokeWidth,
|
|
633
619
|
"stroke-linecap": t.strokeLinecap,
|
|
634
620
|
"stroke-linejoin": t.strokeLinejoin
|
|
635
|
-
}, null),
|
|
621
|
+
}, null), v("path", {
|
|
636
622
|
d: "M35.9999 12C35.9999 12 33 4 23.9999 4C14.9999 4 11.4359 11.5995 15.6096 18",
|
|
637
623
|
stroke: t.colors[0],
|
|
638
624
|
"stroke-width": t.strokeWidth,
|
|
639
625
|
"stroke-linecap": t.strokeLinecap,
|
|
640
626
|
"stroke-linejoin": t.strokeLinejoin
|
|
641
|
-
}, null),
|
|
627
|
+
}, null), v("path", {
|
|
642
628
|
d: "M12 36C12 36 15.9999 44 24 44C32 44 36.564 36.4005 32.3903 30",
|
|
643
629
|
stroke: t.colors[0],
|
|
644
630
|
"stroke-width": t.strokeWidth,
|
|
645
631
|
"stroke-linecap": t.strokeLinecap,
|
|
646
632
|
"stroke-linejoin": t.strokeLinejoin
|
|
647
633
|
}, null)]);
|
|
648
|
-
}), Oe =
|
|
649
|
-
return
|
|
634
|
+
}), Oe = gt("text-bold", !0, function(t) {
|
|
635
|
+
return v("svg", {
|
|
650
636
|
width: t.size,
|
|
651
637
|
height: t.size,
|
|
652
638
|
viewBox: "0 0 48 48",
|
|
653
639
|
fill: "none"
|
|
654
|
-
}, [
|
|
640
|
+
}, [v("path", {
|
|
655
641
|
"fill-rule": "evenodd",
|
|
656
642
|
"clip-rule": "evenodd",
|
|
657
643
|
d: "M24 24C29.5056 24 33.9688 19.5228 33.9688 14C33.9688 8.47715 29.5056 4 24 4H11V24H24Z",
|
|
@@ -659,7 +645,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
659
645
|
"stroke-width": t.strokeWidth,
|
|
660
646
|
"stroke-linecap": t.strokeLinecap,
|
|
661
647
|
"stroke-linejoin": t.strokeLinejoin
|
|
662
|
-
}, null),
|
|
648
|
+
}, null), v("path", {
|
|
663
649
|
"fill-rule": "evenodd",
|
|
664
650
|
"clip-rule": "evenodd",
|
|
665
651
|
d: "M28.0312 44C33.5368 44 38 39.5228 38 34C38 28.4772 33.5368 24 28.0312 24H11V44H28.0312Z",
|
|
@@ -668,53 +654,53 @@ const Bt = ft("check", !0, function(t) {
|
|
|
668
654
|
"stroke-linecap": t.strokeLinecap,
|
|
669
655
|
"stroke-linejoin": t.strokeLinejoin
|
|
670
656
|
}, null)]);
|
|
671
|
-
}),
|
|
672
|
-
return
|
|
657
|
+
}), je = gt("text-italic", !0, function(t) {
|
|
658
|
+
return v("svg", {
|
|
673
659
|
width: t.size,
|
|
674
660
|
height: t.size,
|
|
675
661
|
viewBox: "0 0 48 48",
|
|
676
662
|
fill: "none"
|
|
677
|
-
}, [
|
|
663
|
+
}, [v("path", {
|
|
678
664
|
d: "M20 6H36",
|
|
679
665
|
stroke: t.colors[0],
|
|
680
666
|
"stroke-width": t.strokeWidth,
|
|
681
667
|
"stroke-linecap": t.strokeLinecap,
|
|
682
668
|
"stroke-linejoin": t.strokeLinejoin
|
|
683
|
-
}, null),
|
|
669
|
+
}, null), v("path", {
|
|
684
670
|
d: "M12 42H28",
|
|
685
671
|
stroke: t.colors[0],
|
|
686
672
|
"stroke-width": t.strokeWidth,
|
|
687
673
|
"stroke-linecap": t.strokeLinecap,
|
|
688
674
|
"stroke-linejoin": t.strokeLinejoin
|
|
689
|
-
}, null),
|
|
675
|
+
}, null), v("path", {
|
|
690
676
|
d: "M29 5.95215L19 41.9998",
|
|
691
677
|
stroke: t.colors[0],
|
|
692
678
|
"stroke-width": t.strokeWidth,
|
|
693
679
|
"stroke-linecap": t.strokeLinecap,
|
|
694
680
|
"stroke-linejoin": t.strokeLinejoin
|
|
695
681
|
}, null)]);
|
|
696
|
-
}),
|
|
697
|
-
return
|
|
682
|
+
}), We = gt("text-underline", !0, function(t) {
|
|
683
|
+
return v("svg", {
|
|
698
684
|
width: t.size,
|
|
699
685
|
height: t.size,
|
|
700
686
|
viewBox: "0 0 48 48",
|
|
701
687
|
fill: "none"
|
|
702
|
-
}, [
|
|
688
|
+
}, [v("path", {
|
|
703
689
|
d: "M8 44H40",
|
|
704
690
|
stroke: t.colors[0],
|
|
705
691
|
"stroke-width": t.strokeWidth,
|
|
706
692
|
"stroke-linecap": t.strokeLinecap,
|
|
707
693
|
"stroke-linejoin": t.strokeLinejoin
|
|
708
|
-
}, null),
|
|
694
|
+
}, null), v("path", {
|
|
709
695
|
d: "M37 6.09717C37 12.7638 37 15.3335 37 22.0002C37 29.1799 31.1797 35.0002 24 35.0002C16.8203 35.0002 11 29.1799 11 22.0002C11 15.3335 11 12.7638 11 6.09717",
|
|
710
696
|
stroke: t.colors[0],
|
|
711
697
|
"stroke-width": t.strokeWidth,
|
|
712
698
|
"stroke-linecap": t.strokeLinecap
|
|
713
699
|
}, null)]);
|
|
714
|
-
}),
|
|
700
|
+
}), Re = { class: "label" }, Ne = {
|
|
715
701
|
key: 0,
|
|
716
702
|
class: "shortcut"
|
|
717
|
-
},
|
|
703
|
+
}, Pe = /* @__PURE__ */ nt({
|
|
718
704
|
__name: "Tooltip",
|
|
719
705
|
props: {
|
|
720
706
|
text: { type: String, required: !0 },
|
|
@@ -725,13 +711,13 @@ const Bt = ft("check", !0, function(t) {
|
|
|
725
711
|
setup(t) {
|
|
726
712
|
const d = t, n = F(null), o = F(null), r = F(!1), i = F(d.placement), D = F({ top: 0, left: 0 });
|
|
727
713
|
function l() {
|
|
728
|
-
const h = n.value,
|
|
729
|
-
if (!h || !
|
|
714
|
+
const h = n.value, M = o.value;
|
|
715
|
+
if (!h || !M) return;
|
|
730
716
|
let b = d.placement;
|
|
731
|
-
const y =
|
|
732
|
-
b === "bottom" ?
|
|
733
|
-
const m = y.left + y.width / 2,
|
|
734
|
-
D.value = { top:
|
|
717
|
+
const y = M.getBoundingClientRect(), s = y.top, p = window.innerHeight - y.bottom, u = h.offsetHeight + d.offset;
|
|
718
|
+
b === "bottom" ? p < u && s >= u && (b = "top") : s < u && p >= u && (b = "bottom"), i.value = b;
|
|
719
|
+
const m = y.left + y.width / 2, f = b === "bottom" ? y.bottom + d.offset : y.top - d.offset - h.offsetHeight;
|
|
720
|
+
D.value = { top: f, left: m };
|
|
735
721
|
}
|
|
736
722
|
function C() {
|
|
737
723
|
r.value = !0, Ct(l);
|
|
@@ -746,7 +732,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
746
732
|
}), wt(
|
|
747
733
|
() => d.text,
|
|
748
734
|
() => Ct(l)
|
|
749
|
-
), (h,
|
|
735
|
+
), (h, M) => (T(), V("div", {
|
|
750
736
|
ref_key: "wrapperRef",
|
|
751
737
|
ref: o,
|
|
752
738
|
class: "tooltip-wrapper",
|
|
@@ -757,14 +743,14 @@ const Bt = ft("check", !0, function(t) {
|
|
|
757
743
|
}, [
|
|
758
744
|
se(h.$slots, "default", {}, void 0, !0),
|
|
759
745
|
(T(), _t(ie, { to: "body" }, [
|
|
760
|
-
|
|
746
|
+
c("div", {
|
|
761
747
|
ref_key: "tipRef",
|
|
762
748
|
ref: n,
|
|
763
749
|
class: J(["tooltip", [i.value, { visible: r.value }]]),
|
|
764
750
|
style: dt({ top: D.value.top + "px", left: D.value.left + "px" })
|
|
765
751
|
}, [
|
|
766
|
-
|
|
767
|
-
t.shortcut ? (T(), V("div",
|
|
752
|
+
c("div", Re, ft(t.text), 1),
|
|
753
|
+
t.shortcut ? (T(), V("div", Ne, ft(t.shortcut), 1)) : K("", !0)
|
|
768
754
|
], 6)
|
|
769
755
|
]))
|
|
770
756
|
], 544));
|
|
@@ -774,11 +760,11 @@ const Bt = ft("check", !0, function(t) {
|
|
|
774
760
|
for (const [o, r] of d)
|
|
775
761
|
n[o] = r;
|
|
776
762
|
return n;
|
|
777
|
-
}, G = /* @__PURE__ */ st(
|
|
763
|
+
}, G = /* @__PURE__ */ st(Pe, [["__scopeId", "data-v-2e4633d5"]]), Ge = ["aria-expanded"], Ye = { class: "label" }, Ke = {
|
|
778
764
|
key: 0,
|
|
779
765
|
class: "dropdown",
|
|
780
766
|
role: "listbox"
|
|
781
|
-
},
|
|
767
|
+
}, qe = ["aria-selected", "onClick"], Je = { class: "text" }, Wt = "md-toolbar-dropdown-open", Kt = "font-size-select", Ze = /* @__PURE__ */ nt({
|
|
782
768
|
__name: "index",
|
|
783
769
|
props: {
|
|
784
770
|
editor: {}
|
|
@@ -799,8 +785,8 @@ const Bt = ft("check", !0, function(t) {
|
|
|
799
785
|
"48px"
|
|
800
786
|
], o = ut(() => {
|
|
801
787
|
var b, y;
|
|
802
|
-
const
|
|
803
|
-
return typeof
|
|
788
|
+
const M = (y = (b = d.editor) == null ? void 0 : b.getAttributes("textStyle")) == null ? void 0 : y.fontSize;
|
|
789
|
+
return typeof M == "string" && M ? M : "15px";
|
|
804
790
|
}), r = F(!1), i = F(null);
|
|
805
791
|
function D() {
|
|
806
792
|
r.value || window.dispatchEvent(new CustomEvent(Wt, { detail: { id: Kt } })), r.value = !r.value;
|
|
@@ -808,76 +794,76 @@ const Bt = ft("check", !0, function(t) {
|
|
|
808
794
|
function l() {
|
|
809
795
|
r.value = !1;
|
|
810
796
|
}
|
|
811
|
-
function C(
|
|
797
|
+
function C(M) {
|
|
812
798
|
var b;
|
|
813
|
-
(b = d.editor) == null || b.chain().focus().setMark("textStyle", { fontSize:
|
|
799
|
+
(b = d.editor) == null || b.chain().focus().setMark("textStyle", { fontSize: M }).run(), l();
|
|
814
800
|
}
|
|
815
|
-
function $(
|
|
816
|
-
const b =
|
|
801
|
+
function $(M) {
|
|
802
|
+
const b = M.target, y = i.value;
|
|
817
803
|
y && !y.contains(b) && l();
|
|
818
804
|
}
|
|
819
805
|
vt(() => {
|
|
820
806
|
document.addEventListener("click", $), window.addEventListener(Wt, h);
|
|
821
|
-
}),
|
|
807
|
+
}), ht(() => {
|
|
822
808
|
document.removeEventListener("click", $), window.removeEventListener(Wt, h);
|
|
823
809
|
});
|
|
824
|
-
function h(
|
|
810
|
+
function h(M) {
|
|
825
811
|
var y;
|
|
826
|
-
((y =
|
|
812
|
+
((y = M.detail) == null ? void 0 : y.id) !== Kt && (r.value = !1);
|
|
827
813
|
}
|
|
828
|
-
return (
|
|
814
|
+
return (M, b) => (T(), V("div", {
|
|
829
815
|
class: "font-size",
|
|
830
816
|
ref_key: "rootRef",
|
|
831
817
|
ref: i
|
|
832
818
|
}, [
|
|
833
|
-
|
|
819
|
+
v(z(G), {
|
|
834
820
|
text: "字体大小",
|
|
835
821
|
placement: "bottom"
|
|
836
822
|
}, {
|
|
837
823
|
default: R(() => [
|
|
838
|
-
|
|
824
|
+
c("div", {
|
|
839
825
|
class: "icon",
|
|
840
826
|
onClick: A(D, ["stop"]),
|
|
841
827
|
"aria-expanded": r.value
|
|
842
828
|
}, [
|
|
843
|
-
|
|
844
|
-
|
|
829
|
+
c("div", Ye, ft(o.value), 1),
|
|
830
|
+
v(z(Vt), {
|
|
845
831
|
theme: "filled",
|
|
846
832
|
strokeWidth: 3
|
|
847
833
|
})
|
|
848
|
-
], 8,
|
|
834
|
+
], 8, Ge)
|
|
849
835
|
]),
|
|
850
836
|
_: 1
|
|
851
837
|
}),
|
|
852
|
-
|
|
838
|
+
v(xt, { name: "dropdown-slide" }, {
|
|
853
839
|
default: R(() => [
|
|
854
|
-
r.value ? (T(), V("div",
|
|
855
|
-
(T(), V(mt, null, kt(n, (y) =>
|
|
840
|
+
r.value ? (T(), V("div", Ke, [
|
|
841
|
+
(T(), V(mt, null, kt(n, (y) => c("div", {
|
|
856
842
|
key: y,
|
|
857
843
|
class: "dropdown-item",
|
|
858
844
|
"aria-selected": y === o.value,
|
|
859
845
|
onClick: A((s) => C(y), ["stop"])
|
|
860
846
|
}, [
|
|
861
|
-
y === o.value ? (T(), _t(
|
|
847
|
+
y === o.value ? (T(), _t(z(Bt), {
|
|
862
848
|
key: 0,
|
|
863
849
|
theme: "filled",
|
|
864
850
|
strokeWidth: 3
|
|
865
851
|
})) : K("", !0),
|
|
866
|
-
|
|
867
|
-
], 8,
|
|
852
|
+
c("span", Je, ft(y), 1)
|
|
853
|
+
], 8, qe)), 64))
|
|
868
854
|
])) : K("", !0)
|
|
869
855
|
]),
|
|
870
856
|
_: 1
|
|
871
857
|
})
|
|
872
858
|
], 512));
|
|
873
859
|
}
|
|
874
|
-
}),
|
|
860
|
+
}), Xe = /* @__PURE__ */ st(Ze, [["__scopeId", "data-v-8ea77a66"]]), Qe = ["aria-expanded"], to = {
|
|
875
861
|
key: 0,
|
|
876
862
|
class: "dropdown"
|
|
877
|
-
},
|
|
863
|
+
}, eo = { class: "section" }, oo = { class: "swatches" }, no = ["onClick"], so = { class: "section" }, io = { class: "swatches grid" }, lo = ["onClick"], ro = {
|
|
878
864
|
key: 0,
|
|
879
865
|
class: "section"
|
|
880
|
-
},
|
|
866
|
+
}, ao = { class: "swatches" }, co = ["onClick"], uo = { class: "section inline-actions" }, vo = {
|
|
881
867
|
key: 1,
|
|
882
868
|
class: "advanced"
|
|
883
869
|
}, Rt = "md-toolbar-dropdown-open", qt = "color-select", po = /* @__PURE__ */ nt({
|
|
@@ -917,14 +903,14 @@ const Bt = ft("check", !0, function(t) {
|
|
|
917
903
|
"#85A5FF",
|
|
918
904
|
"#B37FEB",
|
|
919
905
|
"#F759AB"
|
|
920
|
-
], o = F(!1), r = F(!1), i = F(null), D = F(d.currentColor || "#000000"), l = F(
|
|
906
|
+
], o = F(!1), r = F(!1), i = F(null), D = F(d.currentColor || "#000000"), l = F(u()), C = F("#F5222D");
|
|
921
907
|
function $() {
|
|
922
908
|
o.value || window.dispatchEvent(new CustomEvent(Rt, { detail: { id: qt } })), o.value = !o.value;
|
|
923
909
|
}
|
|
924
910
|
function h() {
|
|
925
911
|
o.value = !1;
|
|
926
912
|
}
|
|
927
|
-
function
|
|
913
|
+
function M() {
|
|
928
914
|
r.value = !r.value;
|
|
929
915
|
}
|
|
930
916
|
function b(w) {
|
|
@@ -939,9 +925,9 @@ const Bt = ft("check", !0, function(t) {
|
|
|
939
925
|
const g = w.target, k = i.value;
|
|
940
926
|
k && !k.contains(g) && h();
|
|
941
927
|
}
|
|
942
|
-
function
|
|
928
|
+
function p() {
|
|
943
929
|
}
|
|
944
|
-
function
|
|
930
|
+
function u() {
|
|
945
931
|
try {
|
|
946
932
|
const w = localStorage.getItem("md_color_recent");
|
|
947
933
|
if (!w) return [];
|
|
@@ -959,31 +945,31 @@ const Bt = ft("check", !0, function(t) {
|
|
|
959
945
|
} catch {
|
|
960
946
|
}
|
|
961
947
|
}
|
|
962
|
-
let
|
|
948
|
+
let f = [];
|
|
963
949
|
function S() {
|
|
964
950
|
const w = d.editor;
|
|
965
|
-
w && (
|
|
966
|
-
{ event: "selectionUpdate", handler:
|
|
967
|
-
{ event: "transaction", handler:
|
|
968
|
-
{ event: "update", handler:
|
|
969
|
-
],
|
|
951
|
+
w && (f = [
|
|
952
|
+
{ event: "selectionUpdate", handler: p },
|
|
953
|
+
{ event: "transaction", handler: p },
|
|
954
|
+
{ event: "update", handler: p }
|
|
955
|
+
], f.forEach(({ event: g, handler: k }) => {
|
|
970
956
|
w.on(g, k);
|
|
971
957
|
}));
|
|
972
958
|
}
|
|
973
959
|
vt(() => {
|
|
974
960
|
document.addEventListener("click", s), window.addEventListener(Rt, I), S();
|
|
975
|
-
}),
|
|
961
|
+
}), ht(() => {
|
|
976
962
|
document.removeEventListener("click", s), window.removeEventListener(Rt, I);
|
|
977
963
|
const w = d.editor;
|
|
978
|
-
w &&
|
|
964
|
+
w && f.forEach(({ event: g, handler: k }) => {
|
|
979
965
|
w.off(g, k);
|
|
980
|
-
}),
|
|
966
|
+
}), f = [];
|
|
981
967
|
}), wt(
|
|
982
968
|
() => d.editor,
|
|
983
969
|
(w, g) => {
|
|
984
|
-
g &&
|
|
985
|
-
g.off(k,
|
|
986
|
-
}),
|
|
970
|
+
g && f.forEach(({ event: k, handler: j }) => {
|
|
971
|
+
g.off(k, j);
|
|
972
|
+
}), f = [], S();
|
|
987
973
|
}
|
|
988
974
|
);
|
|
989
975
|
function I(w) {
|
|
@@ -995,26 +981,26 @@ const Bt = ft("check", !0, function(t) {
|
|
|
995
981
|
ref_key: "rootRef",
|
|
996
982
|
ref: i
|
|
997
983
|
}, [
|
|
998
|
-
|
|
984
|
+
c("div", {
|
|
999
985
|
class: "icon icon-dropdown",
|
|
1000
986
|
"aria-expanded": o.value
|
|
1001
987
|
}, [
|
|
1002
|
-
|
|
988
|
+
v(z(G), {
|
|
1003
989
|
text: "文字颜色",
|
|
1004
990
|
placement: "bottom"
|
|
1005
991
|
}, {
|
|
1006
992
|
default: R(() => [
|
|
1007
|
-
|
|
993
|
+
c("div", {
|
|
1008
994
|
class: "icon-stack hoverable",
|
|
1009
995
|
onClick: g[0] || (g[0] = A((k) => b(C.value), ["stop"]))
|
|
1010
996
|
}, [
|
|
1011
|
-
|
|
997
|
+
v(z(Te), {
|
|
1012
998
|
theme: "filled",
|
|
1013
999
|
size: "14",
|
|
1014
1000
|
fill: "#000",
|
|
1015
1001
|
strokeWidth: 3
|
|
1016
1002
|
}),
|
|
1017
|
-
|
|
1003
|
+
c("div", {
|
|
1018
1004
|
class: "underline",
|
|
1019
1005
|
style: dt({ background: C.value })
|
|
1020
1006
|
}, null, 4)
|
|
@@ -1022,16 +1008,16 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1022
1008
|
]),
|
|
1023
1009
|
_: 1
|
|
1024
1010
|
}),
|
|
1025
|
-
|
|
1011
|
+
v(z(G), {
|
|
1026
1012
|
text: "更多颜色",
|
|
1027
1013
|
placement: "bottom"
|
|
1028
1014
|
}, {
|
|
1029
1015
|
default: R(() => [
|
|
1030
|
-
|
|
1016
|
+
c("div", {
|
|
1031
1017
|
class: "arrow hoverable",
|
|
1032
1018
|
onClick: A($, ["stop"])
|
|
1033
1019
|
}, [
|
|
1034
|
-
|
|
1020
|
+
v(z(Vt), {
|
|
1035
1021
|
theme: "filled",
|
|
1036
1022
|
strokeWidth: 3,
|
|
1037
1023
|
size: "12"
|
|
@@ -1040,79 +1026,79 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1040
1026
|
]),
|
|
1041
1027
|
_: 1
|
|
1042
1028
|
})
|
|
1043
|
-
], 8,
|
|
1044
|
-
|
|
1029
|
+
], 8, Qe),
|
|
1030
|
+
v(xt, { name: "dropdown-slide" }, {
|
|
1045
1031
|
default: R(() => [
|
|
1046
|
-
o.value ? (T(), V("div",
|
|
1047
|
-
|
|
1048
|
-
g[4] || (g[4] =
|
|
1049
|
-
|
|
1032
|
+
o.value ? (T(), V("div", to, [
|
|
1033
|
+
c("div", eo, [
|
|
1034
|
+
g[4] || (g[4] = c("div", { class: "section-title" }, "默认", -1)),
|
|
1035
|
+
c("div", oo, [
|
|
1050
1036
|
(T(!0), V(mt, null, kt(n.slice(0, 9), (k) => (T(), V("div", {
|
|
1051
1037
|
key: k,
|
|
1052
1038
|
class: "swatch",
|
|
1053
1039
|
style: dt({ background: k }),
|
|
1054
|
-
onClick: A((
|
|
1040
|
+
onClick: A((j) => b(k), ["stop"])
|
|
1055
1041
|
}, [
|
|
1056
|
-
k === C.value ? (T(), _t(
|
|
1042
|
+
k === C.value ? (T(), _t(z(Bt), {
|
|
1057
1043
|
key: 0,
|
|
1058
1044
|
theme: "filled",
|
|
1059
1045
|
strokeWidth: 3
|
|
1060
1046
|
})) : K("", !0)
|
|
1061
|
-
], 12,
|
|
1047
|
+
], 12, no))), 128))
|
|
1062
1048
|
])
|
|
1063
1049
|
]),
|
|
1064
|
-
|
|
1065
|
-
g[5] || (g[5] =
|
|
1066
|
-
|
|
1050
|
+
c("div", so, [
|
|
1051
|
+
g[5] || (g[5] = c("div", { class: "section-title" }, "常用颜色", -1)),
|
|
1052
|
+
c("div", io, [
|
|
1067
1053
|
(T(!0), V(mt, null, kt(n.slice(9), (k) => (T(), V("div", {
|
|
1068
1054
|
key: k,
|
|
1069
1055
|
class: "swatch",
|
|
1070
1056
|
style: dt({ background: k }),
|
|
1071
|
-
onClick: A((
|
|
1057
|
+
onClick: A((j) => b(k), ["stop"])
|
|
1072
1058
|
}, [
|
|
1073
|
-
k === C.value ? (T(), _t(
|
|
1059
|
+
k === C.value ? (T(), _t(z(Bt), {
|
|
1074
1060
|
key: 0,
|
|
1075
1061
|
theme: "filled",
|
|
1076
1062
|
strokeWidth: 3
|
|
1077
1063
|
})) : K("", !0)
|
|
1078
|
-
], 12,
|
|
1064
|
+
], 12, lo))), 128))
|
|
1079
1065
|
])
|
|
1080
1066
|
]),
|
|
1081
|
-
l.value.length ? (T(), V("div",
|
|
1082
|
-
g[6] || (g[6] =
|
|
1083
|
-
|
|
1067
|
+
l.value.length ? (T(), V("div", ro, [
|
|
1068
|
+
g[6] || (g[6] = c("div", { class: "section-title" }, "最近使用自定义颜色", -1)),
|
|
1069
|
+
c("div", ao, [
|
|
1084
1070
|
(T(!0), V(mt, null, kt(l.value, (k) => (T(), V("div", {
|
|
1085
1071
|
key: k,
|
|
1086
1072
|
class: "swatch",
|
|
1087
1073
|
style: dt({ background: k }),
|
|
1088
|
-
onClick: A((
|
|
1089
|
-
}, null, 12,
|
|
1074
|
+
onClick: A((j) => b(k), ["stop"])
|
|
1075
|
+
}, null, 12, co))), 128))
|
|
1090
1076
|
])
|
|
1091
1077
|
])) : K("", !0),
|
|
1092
|
-
|
|
1093
|
-
|
|
1078
|
+
c("div", uo, [
|
|
1079
|
+
c("button", {
|
|
1094
1080
|
class: "btn",
|
|
1095
1081
|
onClick: A(y, ["stop"])
|
|
1096
1082
|
}, "暂无"),
|
|
1097
|
-
|
|
1083
|
+
c("button", {
|
|
1098
1084
|
class: "btn",
|
|
1099
|
-
onClick: A(
|
|
1085
|
+
onClick: A(M, ["stop"])
|
|
1100
1086
|
}, "更多颜色")
|
|
1101
1087
|
]),
|
|
1102
|
-
r.value ? (T(), V("div",
|
|
1103
|
-
Lt(
|
|
1088
|
+
r.value ? (T(), V("div", vo, [
|
|
1089
|
+
Lt(c("input", {
|
|
1104
1090
|
type: "color",
|
|
1105
1091
|
"onUpdate:modelValue": g[1] || (g[1] = (k) => D.value = k)
|
|
1106
1092
|
}, null, 512), [
|
|
1107
1093
|
[Mt, D.value]
|
|
1108
1094
|
]),
|
|
1109
|
-
Lt(
|
|
1095
|
+
Lt(c("input", {
|
|
1110
1096
|
class: "hex",
|
|
1111
1097
|
"onUpdate:modelValue": g[2] || (g[2] = (k) => D.value = k)
|
|
1112
1098
|
}, null, 512), [
|
|
1113
1099
|
[Mt, D.value]
|
|
1114
1100
|
]),
|
|
1115
|
-
|
|
1101
|
+
c("button", {
|
|
1116
1102
|
class: "btn apply",
|
|
1117
1103
|
onClick: g[3] || (g[3] = A((k) => b(D.value), ["stop"]))
|
|
1118
1104
|
}, "应用")
|
|
@@ -1123,7 +1109,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1123
1109
|
})
|
|
1124
1110
|
], 512));
|
|
1125
1111
|
}
|
|
1126
|
-
}), ho = /* @__PURE__ */ st(po, [["__scopeId", "data-v-0f5572cb"]]), go = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565315763" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81778" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM224 352h576v96H224zM224 800h576v96H224z" p-id="81779"></path></svg>', mo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565310640" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81615" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM96 352h832v96H96zM96 800h832v96H96z" p-id="81616"></path></svg>', ko = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565296828" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81289" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM96 352h576v96H96zM96 800h576v96H96z" p-id="81290"></path></svg>', wo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565306218" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81452" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM352 352h576v96H352zM352 800h576v96H352z" p-id="81453"></path></svg>', bo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763562183158" class="icon" viewBox="0 0 1102 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="79129" xmlns:xlink="http://www.w3.org/1999/xlink" width="19.37109375" height="18"><path d="M93.105231 187.943385a78.769231 78.769231 0 1 1 0-157.538462 78.769231 78.769231 0 0 1 0 157.538462z m0 393.846153a78.769231 78.769231 0 1 1 0-157.538461 78.769231 78.769231 0 0 1 0 157.538461z m0 393.846154a78.769231 78.769231 0 1 1 0-157.538461 78.769231 78.769231 0 0 1 0 157.538461zM276.243692 161.792v-118.153846h787.692308v118.153846h-787.692308z m0.472616 397.233231v-118.153846h788.007384v118.153846H276.716308z m-3.308308 397.154461v-118.153846h789.267692v118.153846H273.329231z" fill="#333333" p-id="79130"></path></svg>', yo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763566846467" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="83576" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M477.098667 709.717333a46.805333 46.805333 0 0 0 69.802666 0l296.021334-340.736c24.32-28.032 3.328-70.314667-34.944-70.314666H216.021333c-38.272 0-59.306667 42.282667-34.944 70.314666l296.021334 340.736z" fill="#000000" p-id="83577"></path></svg>', Co = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763568214776" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="84748" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M682.666667 772.266667l332.8-247.466667-324.266667-435.2-409.6 307.2-256 192L260.266667 896h691.2v-85.333333h-324.266667l55.466667-38.4zM674.133333 213.333333l221.866667 294.4-260.266667 196.266667-38.4 25.6-230.4-285.866667L674.133333 213.333333zM145.066667 605.866667l149.333333-110.933334 230.4 285.866667-34.133333 29.866667H298.666667l-153.6-204.8z" fill="#333333" p-id="84749"></path></svg>', xo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763479929532" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="52528" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M621.568 208.299a38.101 38.101 0 0 0-73.941-18.518L386.773 833.28a38.101 38.101 0 0 0 73.899 18.475l160.853-643.456zM325.632 294.4a38.101 38.101 0 0 1 0 53.888L162.347 511.573 325.632 674.86a38.101 38.101 0 0 1-53.845 53.888L81.493 538.539a38.101 38.101 0 0 1 0-53.931L271.787 294.4a38.101 38.101 0 0 1 53.888 0z m372.736 0a38.101 38.101 0 0 0 0 53.888l163.285 163.285L698.368 674.86a38.101 38.101 0 0 0 53.888 53.888l190.25-190.208a38.101 38.101 0 0 0 0-53.931L752.257 294.4a38.101 38.101 0 0 0-53.888 0z" fill="#333333" p-id="52529"></path></svg>', _o = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480012496" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="54461" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M338.986667 59.413333h52.586666a21.333333 21.333333 0 0 1 21.333334 21.333334V115.84a21.333333 21.333333 0 0 1-21.333334 21.333333H356.266667c-36.48 0-53.76 20.16-53.76 62.4v188.16c0 59.52-27.84 99.84-82.56 120 54.72 23.04 82.56 62.4 82.56 120v189.12c0 40.32 17.28 61.44 53.76 61.44h35.306666a21.333333 21.333333 0 0 1 21.333334 21.333334v35.093333a21.333333 21.333333 0 0 1-21.333334 21.333333H338.986667c-42.24 0-74.88-14.4-97.92-41.28-21.12-24.96-31.68-59.52-31.68-101.76v-180.48c0-27.84-5.76-48-17.28-60.48-11.178667-12.778667-29.653333-20.245333-55.466667-23.488a18.901333 18.901333 0 0 1-16.533333-18.773333v-43.221333c0-10.005333 7.381333-18.474667 17.28-19.84 25.408-3.498667 43.648-11.456 54.72-23.317334 11.52-13.44 17.28-33.6 17.28-60.48V203.413333c0-43.2 10.56-77.76 31.68-102.72 23.04-27.84 55.68-41.28 97.92-41.28z m292.48 0h52.586666c42.24 0 74.88 13.44 97.92 41.28 21.12 24.96 31.68 59.52 31.68 102.72v179.52c0 26.88 5.76 48 18.24 61.44 10.24 11.029333 28.224 18.816 53.418667 22.314667 10.112 1.408 17.621333 10.026667 17.621333 20.245333v40.746667a21.333333 21.333333 0 0 1-18.88 21.184c-24.576 3.413333-42.282667 10.794667-53.12 23.189333-11.52 12.48-17.28 32.64-17.28 60.48v180.48c0 42.24-10.56 76.8-31.68 101.76-23.04 26.88-55.68 41.28-97.92 41.28H631.466667a21.333333 21.333333 0 0 1-21.333334-21.333333V899.626667a21.333333 21.333333 0 0 1 21.333334-21.333334h35.306666c35.52 0 53.76-21.12 53.76-61.44v-189.12c0-57.6 26.88-96.96 82.56-120-55.68-20.16-82.56-60.48-82.56-120v-188.16c0-42.24-18.24-62.4-53.76-62.4H631.466667a21.333333 21.333333 0 0 1-21.333334-21.333333V80.746667a21.333333 21.333333 0 0 1 21.333334-21.333334z" fill="#000000" p-id="54462"></path></svg>', Lo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763569611105" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="87406" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M840 192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h592c13.3 0 24-10.7 24-24V256h32v200H465c-22.1 0-40 17.9-40 40v136h-44c-4.4 0-8 3.6-8 8v228c0 0.6 0.1 1.3 0.2 1.9-0.1 2-0.2 4.1-0.2 6.1 0 46.4 37.6 84 84 84s84-37.6 84-84c0-2.1-0.1-4.1-0.2-6.1 0.1-0.6 0.2-1.2 0.2-1.9V640c0-4.4-3.6-8-8-8h-44V520h351c22.1 0 40-17.9 40-40V232c0-22.1-17.9-40-40-40zM720 352H208V160h512v192zM477 876c0 11-9 20-20 20s-20-9-20-20V696h40v180z" p-id="87407"></path></svg>', Mo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763473363174" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28322" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M957.610667 507.434667L603.221333 158.293333a7.893333 7.893333 0 0 0-11.221333 0L353.28 393.386667a8.021333 8.021333 0 0 0-0.085333 11.306666l0.085333 0.128 40.021333 39.381334-117.205333 115.285333a8.021333 8.021333 0 0 0-0.085333 11.306667l0.085333 0.128 39.509333 38.869333-189.098666 187.008H72.106667a8.106667 8.106667 0 0 0-8.106667 8.021333v55.168c0 4.394667 3.584 8.021333 8.021333 8.021334H416.853333c2.133333 0 4.096-0.810667 5.589334-2.304l76.117333-75.605334 40.405333 39.808a7.936 7.936 0 0 0 11.178667 0l117.12-115.626666 40.106667 39.509333a7.893333 7.893333 0 0 0 11.178666 0l238.72-235.178667a7.68 7.68 0 0 0 0.298667-11.221333z m-567.808 288.853333H229.546667l134.4-133.034667 80.128 78.933334-54.314667 54.058666z m154.794666-62.122667l-171.392-168.917333 68.608-67.584 171.392 168.874667-68.608 67.626666z m168.533334-76.117333l-262.826667-258.901333 147.285333-145.066667 262.826667 258.986667-147.328 144.981333z" fill="#999999" p-id="28323"></path></svg>', zo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480451042" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="58395" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M938.666667 553.92V768c0 64.8-52.533333 117.333333-117.333334 117.333333H202.666667c-64.8 0-117.333333-52.533333-117.333334-117.333333V256c0-64.8 52.533333-117.333333 117.333334-117.333333h618.666666c64.8 0 117.333333 52.533333 117.333334 117.333333v297.92z m-64-74.624V256a53.333333 53.333333 0 0 0-53.333334-53.333333H202.666667a53.333333 53.333333 0 0 0-53.333334 53.333333v344.48A290.090667 290.090667 0 0 1 192 597.333333a286.88 286.88 0 0 1 183.296 65.845334C427.029333 528.384 556.906667 437.333333 704 437.333333c65.706667 0 126.997333 16.778667 170.666667 41.962667z m0 82.24c-5.333333-8.32-21.130667-21.653333-43.648-32.917333C796.768 511.488 753.045333 501.333333 704 501.333333c-121.770667 0-229.130667 76.266667-270.432 188.693334-2.730667 7.445333-7.402667 20.32-13.994667 38.581333-7.68 21.301333-34.453333 28.106667-51.370666 13.056-16.437333-14.634667-28.554667-25.066667-36.138667-31.146667A222.890667 222.890667 0 0 0 192 661.333333c-14.464 0-28.725333 1.365333-42.666667 4.053334V768a53.333333 53.333333 0 0 0 53.333334 53.333333h618.666666a53.333333 53.333333 0 0 0 53.333334-53.333333V561.525333zM320 480a96 96 0 1 1 0-192 96 96 0 0 1 0 192z m0-64a32 32 0 1 0 0-64 32 32 0 0 0 0 64z" fill="#000000" p-id="58396"></path></svg>', $o = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480387136" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="57289" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M213.972 214.906l0.934-0.934c27.606-27.606 68.674-30.581 92.168-7.087l225.23 225.23c29.72-40.254 30.733-93.311-0.599-124.643L345.639 121.406c-35.132-35.132-97.076-30.148-138.356 11.132l-74.744 74.744c-41.28 41.28-46.264 103.224-11.132 138.356l186.065 186.065c31.332 31.332 84.389 30.319 124.643 0.599l-225.23-225.23c-23.494-23.492-20.519-64.56 7.087-92.166zM808.745 809.679l0.934-0.934c27.606-27.606 31.18-68.074 7.686-91.568l-225.23-225.23c40.254-29.72 93.311-30.733 124.643 0.599l186.065 186.065c35.132 35.132 29.548 96.477-11.732 137.757l-74.744 74.744c-41.28 41.28-102.625 46.863-137.757 11.732L492.546 716.779c-31.332-31.332-31.909-82.799-0.599-124.643l225.23 225.23c23.494 23.494 63.962 19.92 91.568-7.687z" fill="#666666" p-id="57290"></path><path d="M627.123 628.713c-12.296 12.296-32.232 12.296-44.528 0L394.938 441.057c-12.296-12.296-12.296-32.232 0-44.528s32.232-12.296 44.528 0l187.656 187.656c12.297 12.296 12.297 32.232 0.001 44.528z" fill="#666666" p-id="57291"></path></svg>', So = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763562537529" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="80294" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M107.5 736c28.6 0 52.2 7.1 70.2 21.4 18.5 15.1 27.9 36 27.9 61.7 0 22.9-8.4 41.3-24.7 54.1 16 12 29.6 32.8 29.6 57.3 0 27-9.7 49.7-28.8 67.2-19.6 17.5-45 26.3-75.6 26.3-29.2 0-53.4-7.8-71.7-23.3C14 983.6 2.4 958.4 0 926.1v-14.5h69.7V925c0.6 12.9 4.2 21.8 10.9 27.8 6.2 5.7 14.4 8.6 25.2 8.6 12.1 0 21.3-3.2 27.6-9.2 5.6-5.6 8.2-11.9 8.2-19.9 0-10-2.7-16.6-7.9-20.8-5.4-4.5-14.5-6.9-27.8-6.9H74.3v-58.9h31.5c11.6 0 19.8-2.2 24.5-6.1 4.1-3.5 6.3-9.2 6.3-17.4 0-8.3-2-13.9-5.3-17-4.6-3.9-12.3-6.1-23.5-6.1-11.5 0-19.3 2.5-24.8 7.4-5.5 4.8-8.9 12.8-10 23.7v13.4H5.1l-0.2-7v-8.2c2.4-29.1 13.4-52.1 32.7-68.2C55.8 744 79.3 736 107.5 736z m916.5 96v128H384V832h640zM106.9 368c28 0 51.7 8.4 70.5 25.1 18.8 17.1 28.2 39.1 28.2 65.8 0 25.4-9.7 48.8-28.8 70-10.4 11.1-27.9 24.8-55.3 43.2-10.1 6.6-18.5 12.9-25.2 18.7h109.3V656l-7.1 0.1-185.2-0.1c-4.5-0.6-7.5-1.6-9.8-3.8-2.4-2.4-3.2-5.6-3.5-10.4 0-29.7 9.6-55.5 28.8-77.1 10.3-11.8 30.6-28.1 61.1-49.1 14.4-10 25.7-19.2 32.4-26.3 8.9-10 13.2-20.3 13.2-30.8 0-9.8-2.3-16.6-6.4-20.4-4.5-4.1-12.2-6.3-23.6-6.3-11.3 0-18.8 3.4-24.1 10.6-5.7 7.3-9.2 19.8-9.9 37.7-0.5 3.9-1.6 6.8-3.8 9-2.1 2-4.8 3-10.4 4l-43-0.1c-4.2-0.8-7.1-1.9-9.2-4-2.2-2.3-3.2-5.3-3.7-10.3 0.4-32.1 9.9-58.3 28.6-78.2 19.6-21.6 45.5-32.5 76.9-32.5z m917.1 80v128H384V448h640zM146.6 0v288H75.1V94.2c-16.7 10.2-35.9 18.3-50.9 20.3l-8.2 1.6V46l4.8-2C39.3 37.3 52.5 31.7 60 27.6 71 20.9 82.1 11.7 96.3 0.1h50.3zM1024 64v128H384V64h640z" fill="#333333" p-id="80295"></path></svg>', Eo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480239307" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="56277" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M849.6 231v109.5c-46.4 14.9-84.6 41.5-114.4 81.3-29.9 36.5-44.8 76.3-43.1 116.1 8.3-5 21.6-6.6 41.5-6.6 34.8 0 64.7 11.6 91.2 36.5 23.2 24.9 36.5 56.4 36.5 94.5S848 732 821.5 756.8C795 780 761.8 793.3 722 793.3c-46.4 0-82.9-19.9-112.8-56.4s-43.1-84.6-43.1-141c0-89.6 24.9-165.8 76.3-230.5C692 299 761.7 254.2 849.6 231z m-403 0v109.5c-46.4 14.9-82.9 41.5-112.8 81.3-31.5 36.5-46.4 76.3-44.8 116.1 8.3-5 21.6-6.6 41.5-6.6 34.8 0 64.7 11.6 89.6 36.5 24.9 24.9 38.1 56.4 38.1 94.5s-13.3 69.7-38.1 94.5c-26.5 23.2-61.4 36.5-101.2 36.5-46.4 0-82.9-19.9-111.1-56.4-29.9-36.5-44.8-84.6-44.8-141 0-89.6 24.9-165.8 76.3-230.5C289 299 358.7 254.2 446.6 231z" p-id="56278"></path></svg>', Do = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480808376" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="61532" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M959.825 384.002V191.94c0-70.692-57.308-128-128-128H191.94c-70.692 0-128 57.308-128 128v639.885c0 70.692 57.308 128 128 128h639.885c70.692 0 128-57.308 128-128V384.002z m-813.16-237.337a63.738 63.738 0 0 1 45.336-18.785H832a63.962 63.962 0 0 1 63.886 64.121v128.061H127.88v-128.06a63.738 63.738 0 0 1 18.785-45.337z m269.127 461.308v-223.97h192.181v223.97H415.792z m192.181 63.94v223.972H415.792V671.914h192.181z m-256.121-63.94H127.88v-223.97h223.972v223.97zM146.665 877.21a63.467 63.467 0 0 1-18.785-45.21V671.914h223.972v223.97h-159.85a63.626 63.626 0 0 1-45.337-18.675z m749.22-45.21a63.763 63.763 0 0 1-63.886 63.886H671.914V671.914h223.97v160.085z m0-224.026H671.914v-223.97h223.97v223.97z" p-id="61533"></path></svg>', To = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480994147" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="73821" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M933.529779 1022.701142H87.673207c-48.357498 0-87.523075-39.165577-87.523075-87.523076V1.798419h729.259049c48.357498 0 87.523075 39.165577 87.523076 87.523076v320.818031h204.220509V935.178066c-0.099912 48.357498-39.265489 87.523075-87.622987 87.523076z m-175.046151-904.205289c0-32.171724-26.077081-58.348717-58.348717-58.348717H58.498849v845.856572c0 32.171724 26.077081 58.348717 58.348717 58.348717h583.387257c32.171724 0 58.348717-26.077081 58.348717-58.348717V118.495853zM962.704137 468.588155h-145.871792v495.864182h87.523075c32.171724 0 58.348717-26.077081 58.348717-58.348717V468.588155z m-729.25905 0h379.166748v58.348717H233.445087V468.588155z m0-233.394868h379.166748v58.348717H233.445087v-58.348717z m262.569227 525.03854H233.445087v-58.348716h262.469314v58.348716z m0 0" p-id="73822"></path></svg>', Fo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763477549677" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31202" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M828.6 75C889.572 75 939 124.428 939 185.4v676.2c0 60.972-49.428 110.4-110.4 110.4H152.4C91.428 972 42 922.572 42 861.6V185.4C42 124.428 91.428 75 152.4 75z m0 59.8H152.4c-27.946 0-50.6 22.654-50.6 50.6v676.2c0 27.946 22.654 50.6 50.6 50.6h676.2c27.946 0 50.6-22.654 50.6-50.6V185.4c0-27.946-22.654-50.6-50.6-50.6z m-20.56 167.48c11.48 11.504 11.641 30.022 0.502 41.725l-0.548 0.56L477.473 674.37c-11.251 11.227-29.274 11.663-41.05 1.123l-0.574-0.527L260.695 509.93c-12.018-11.325-12.581-30.248-1.257-42.266 11.145-11.828 29.65-12.56 41.69-1.788l0.577 0.53L455.756 611.56l310-309.325c11.689-11.664 30.62-11.644 42.284 0.045z" fill="#333333" p-id="31203"></path></svg>', Ao = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480631673" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="60480" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M960 192h-28.384c-16.8 0-32.928 6.624-44.928 18.432L800 295.936V256a96 96 0 0 0-96-96H96C43.072 160 0 203.04 0 256v512a96 96 0 0 0 96 96h608c52.992 0 96-43.008 96-96v-39.072l86.688 85.504c12 11.808 28.128 18.432 44.928 18.432H960a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64zM96 800c-17.664 0-32-14.368-32-32V256a32 32 0 0 1 32-32h608c17.632 0 32 14.336 32 32v512c0 17.632-14.368 32-32 32H96z m864-31.136h-32l-128-128V640l-32-32v-192l160-160h32v512.864z" fill="#333333" p-id="60481"></path></svg>', Bo = ["innerHTML"], Ho = /* @__PURE__ */ nt({
|
|
1112
|
+
}), fo = /* @__PURE__ */ st(po, [["__scopeId", "data-v-0f5572cb"]]), ho = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565315763" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81778" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM224 352h576v96H224zM224 800h576v96H224z" p-id="81779"></path></svg>', go = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565310640" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81615" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM96 352h832v96H96zM96 800h832v96H96z" p-id="81616"></path></svg>', mo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565296828" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81289" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM96 352h576v96H96zM96 800h576v96H96z" p-id="81290"></path></svg>', ko = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763565306218" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="81452" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M96 128h832v96H96zM96 576h832v96H96zM352 352h576v96H352zM352 800h576v96H352z" p-id="81453"></path></svg>', wo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763562183158" class="icon" viewBox="0 0 1102 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="79129" xmlns:xlink="http://www.w3.org/1999/xlink" width="19.37109375" height="18"><path d="M93.105231 187.943385a78.769231 78.769231 0 1 1 0-157.538462 78.769231 78.769231 0 0 1 0 157.538462z m0 393.846153a78.769231 78.769231 0 1 1 0-157.538461 78.769231 78.769231 0 0 1 0 157.538461z m0 393.846154a78.769231 78.769231 0 1 1 0-157.538461 78.769231 78.769231 0 0 1 0 157.538461zM276.243692 161.792v-118.153846h787.692308v118.153846h-787.692308z m0.472616 397.233231v-118.153846h788.007384v118.153846H276.716308z m-3.308308 397.154461v-118.153846h789.267692v118.153846H273.329231z" fill="#333333" p-id="79130"></path></svg>', bo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763566846467" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="83576" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M477.098667 709.717333a46.805333 46.805333 0 0 0 69.802666 0l296.021334-340.736c24.32-28.032 3.328-70.314667-34.944-70.314666H216.021333c-38.272 0-59.306667 42.282667-34.944 70.314666l296.021334 340.736z" fill="#000000" p-id="83577"></path></svg>', yo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763568214776" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="84748" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M682.666667 772.266667l332.8-247.466667-324.266667-435.2-409.6 307.2-256 192L260.266667 896h691.2v-85.333333h-324.266667l55.466667-38.4zM674.133333 213.333333l221.866667 294.4-260.266667 196.266667-38.4 25.6-230.4-285.866667L674.133333 213.333333zM145.066667 605.866667l149.333333-110.933334 230.4 285.866667-34.133333 29.866667H298.666667l-153.6-204.8z" fill="#333333" p-id="84749"></path></svg>', Co = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763479929532" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="52528" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M621.568 208.299a38.101 38.101 0 0 0-73.941-18.518L386.773 833.28a38.101 38.101 0 0 0 73.899 18.475l160.853-643.456zM325.632 294.4a38.101 38.101 0 0 1 0 53.888L162.347 511.573 325.632 674.86a38.101 38.101 0 0 1-53.845 53.888L81.493 538.539a38.101 38.101 0 0 1 0-53.931L271.787 294.4a38.101 38.101 0 0 1 53.888 0z m372.736 0a38.101 38.101 0 0 0 0 53.888l163.285 163.285L698.368 674.86a38.101 38.101 0 0 0 53.888 53.888l190.25-190.208a38.101 38.101 0 0 0 0-53.931L752.257 294.4a38.101 38.101 0 0 0-53.888 0z" fill="#333333" p-id="52529"></path></svg>', xo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480012496" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="54461" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M338.986667 59.413333h52.586666a21.333333 21.333333 0 0 1 21.333334 21.333334V115.84a21.333333 21.333333 0 0 1-21.333334 21.333333H356.266667c-36.48 0-53.76 20.16-53.76 62.4v188.16c0 59.52-27.84 99.84-82.56 120 54.72 23.04 82.56 62.4 82.56 120v189.12c0 40.32 17.28 61.44 53.76 61.44h35.306666a21.333333 21.333333 0 0 1 21.333334 21.333334v35.093333a21.333333 21.333333 0 0 1-21.333334 21.333333H338.986667c-42.24 0-74.88-14.4-97.92-41.28-21.12-24.96-31.68-59.52-31.68-101.76v-180.48c0-27.84-5.76-48-17.28-60.48-11.178667-12.778667-29.653333-20.245333-55.466667-23.488a18.901333 18.901333 0 0 1-16.533333-18.773333v-43.221333c0-10.005333 7.381333-18.474667 17.28-19.84 25.408-3.498667 43.648-11.456 54.72-23.317334 11.52-13.44 17.28-33.6 17.28-60.48V203.413333c0-43.2 10.56-77.76 31.68-102.72 23.04-27.84 55.68-41.28 97.92-41.28z m292.48 0h52.586666c42.24 0 74.88 13.44 97.92 41.28 21.12 24.96 31.68 59.52 31.68 102.72v179.52c0 26.88 5.76 48 18.24 61.44 10.24 11.029333 28.224 18.816 53.418667 22.314667 10.112 1.408 17.621333 10.026667 17.621333 20.245333v40.746667a21.333333 21.333333 0 0 1-18.88 21.184c-24.576 3.413333-42.282667 10.794667-53.12 23.189333-11.52 12.48-17.28 32.64-17.28 60.48v180.48c0 42.24-10.56 76.8-31.68 101.76-23.04 26.88-55.68 41.28-97.92 41.28H631.466667a21.333333 21.333333 0 0 1-21.333334-21.333333V899.626667a21.333333 21.333333 0 0 1 21.333334-21.333334h35.306666c35.52 0 53.76-21.12 53.76-61.44v-189.12c0-57.6 26.88-96.96 82.56-120-55.68-20.16-82.56-60.48-82.56-120v-188.16c0-42.24-18.24-62.4-53.76-62.4H631.466667a21.333333 21.333333 0 0 1-21.333334-21.333333V80.746667a21.333333 21.333333 0 0 1 21.333334-21.333334z" fill="#000000" p-id="54462"></path></svg>', _o = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1768469045840" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6989" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M393.846154 64.174932l117.454119 0.399843H512.499805l117.454119-0.399843-10.395939 10.395939c-18.89262 18.89262-28.488872 44.982429-26.28973 71.472081l20.292073 250.502148c2.998829 36.68567 18.092932 72.171808 42.483405 99.661069l34.186646 38.684889-122.252245-0.899648-55.478329-0.399844h-0.99961l-55.478329 0.399844-122.452167 0.799687 34.186646-38.684888c24.390472-27.589223 39.484576-62.9754 42.483405-99.66107l20.292074-250.402187c2.199141-26.589613-7.397111-52.679422-26.289731-71.472081l-10.395939-10.395939m281.889887-64.174932h-0.199922L512.399844 0.599766h-0.799688L348.36392 0h-0.199922c-20.891839 0-39.684498 13.494729-45.582194 33.58688-4.098399 13.994533-1.899258 30.887934 17.79305 47.581414l38.584927 38.584927c5.597813 5.597813 8.39672 13.294807 7.796955 21.091761L346.464662 391.247169c-1.899258 23.190941-11.195627 45.08239-26.589613 62.475596l-61.87583 69.872706c-8.696603 9.796173-13.894572 22.291292-14.394377 35.386177-0.299883 8.996486 1.599375 18.89262 8.596642 27.28934 6.897306 8.296759 17.293245 12.894963 27.989067 12.894963h0.299882l175.931277-1.199532 55.178446 422.834831 0.399844 3.098789 0.399844-3.098789 55.178446-422.834831 175.931277 1.199532h0.299882c10.795783 0 21.191722-4.598204 27.989067-12.894963 6.897306-8.39672 8.796564-18.292854 8.596642-27.28934-0.399844-13.094885-5.697774-25.590004-14.394377-35.386177l-61.87583-69.872706c-15.393987-17.393206-24.690355-39.284654-26.589613-62.475596l-20.292074-250.402187c-0.599766-7.796954 2.199141-15.593909 7.796955-21.091761l38.584927-38.584927c19.692308-16.693479 21.891449-33.58688 17.79305-47.581414-5.997657-19.992191-24.790316-33.58688-45.682155-33.58688z" p-id="6990"></path></svg>', Lo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763569611105" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="87406" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M840 192h-56v-72c0-13.3-10.7-24-24-24H168c-13.3 0-24 10.7-24 24v272c0 13.3 10.7 24 24 24h592c13.3 0 24-10.7 24-24V256h32v200H465c-22.1 0-40 17.9-40 40v136h-44c-4.4 0-8 3.6-8 8v228c0 0.6 0.1 1.3 0.2 1.9-0.1 2-0.2 4.1-0.2 6.1 0 46.4 37.6 84 84 84s84-37.6 84-84c0-2.1-0.1-4.1-0.2-6.1 0.1-0.6 0.2-1.2 0.2-1.9V640c0-4.4-3.6-8-8-8h-44V520h351c22.1 0 40-17.9 40-40V232c0-22.1-17.9-40-40-40zM720 352H208V160h512v192zM477 876c0 11-9 20-20 20s-20-9-20-20V696h40v180z" p-id="87407"></path></svg>', Mo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763473363174" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28322" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M957.610667 507.434667L603.221333 158.293333a7.893333 7.893333 0 0 0-11.221333 0L353.28 393.386667a8.021333 8.021333 0 0 0-0.085333 11.306666l0.085333 0.128 40.021333 39.381334-117.205333 115.285333a8.021333 8.021333 0 0 0-0.085333 11.306667l0.085333 0.128 39.509333 38.869333-189.098666 187.008H72.106667a8.106667 8.106667 0 0 0-8.106667 8.021333v55.168c0 4.394667 3.584 8.021333 8.021333 8.021334H416.853333c2.133333 0 4.096-0.810667 5.589334-2.304l76.117333-75.605334 40.405333 39.808a7.936 7.936 0 0 0 11.178667 0l117.12-115.626666 40.106667 39.509333a7.893333 7.893333 0 0 0 11.178666 0l238.72-235.178667a7.68 7.68 0 0 0 0.298667-11.221333z m-567.808 288.853333H229.546667l134.4-133.034667 80.128 78.933334-54.314667 54.058666z m154.794666-62.122667l-171.392-168.917333 68.608-67.584 171.392 168.874667-68.608 67.626666z m168.533334-76.117333l-262.826667-258.901333 147.285333-145.066667 262.826667 258.986667-147.328 144.981333z" fill="#999999" p-id="28323"></path></svg>', zo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480451042" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="58395" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M938.666667 553.92V768c0 64.8-52.533333 117.333333-117.333334 117.333333H202.666667c-64.8 0-117.333333-52.533333-117.333334-117.333333V256c0-64.8 52.533333-117.333333 117.333334-117.333333h618.666666c64.8 0 117.333333 52.533333 117.333334 117.333333v297.92z m-64-74.624V256a53.333333 53.333333 0 0 0-53.333334-53.333333H202.666667a53.333333 53.333333 0 0 0-53.333334 53.333333v344.48A290.090667 290.090667 0 0 1 192 597.333333a286.88 286.88 0 0 1 183.296 65.845334C427.029333 528.384 556.906667 437.333333 704 437.333333c65.706667 0 126.997333 16.778667 170.666667 41.962667z m0 82.24c-5.333333-8.32-21.130667-21.653333-43.648-32.917333C796.768 511.488 753.045333 501.333333 704 501.333333c-121.770667 0-229.130667 76.266667-270.432 188.693334-2.730667 7.445333-7.402667 20.32-13.994667 38.581333-7.68 21.301333-34.453333 28.106667-51.370666 13.056-16.437333-14.634667-28.554667-25.066667-36.138667-31.146667A222.890667 222.890667 0 0 0 192 661.333333c-14.464 0-28.725333 1.365333-42.666667 4.053334V768a53.333333 53.333333 0 0 0 53.333334 53.333333h618.666666a53.333333 53.333333 0 0 0 53.333334-53.333333V561.525333zM320 480a96 96 0 1 1 0-192 96 96 0 0 1 0 192z m0-64a32 32 0 1 0 0-64 32 32 0 0 0 0 64z" fill="#000000" p-id="58396"></path></svg>', $o = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480387136" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="57289" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M213.972 214.906l0.934-0.934c27.606-27.606 68.674-30.581 92.168-7.087l225.23 225.23c29.72-40.254 30.733-93.311-0.599-124.643L345.639 121.406c-35.132-35.132-97.076-30.148-138.356 11.132l-74.744 74.744c-41.28 41.28-46.264 103.224-11.132 138.356l186.065 186.065c31.332 31.332 84.389 30.319 124.643 0.599l-225.23-225.23c-23.494-23.492-20.519-64.56 7.087-92.166zM808.745 809.679l0.934-0.934c27.606-27.606 31.18-68.074 7.686-91.568l-225.23-225.23c40.254-29.72 93.311-30.733 124.643 0.599l186.065 186.065c35.132 35.132 29.548 96.477-11.732 137.757l-74.744 74.744c-41.28 41.28-102.625 46.863-137.757 11.732L492.546 716.779c-31.332-31.332-31.909-82.799-0.599-124.643l225.23 225.23c23.494 23.494 63.962 19.92 91.568-7.687z" fill="#666666" p-id="57290"></path><path d="M627.123 628.713c-12.296 12.296-32.232 12.296-44.528 0L394.938 441.057c-12.296-12.296-12.296-32.232 0-44.528s32.232-12.296 44.528 0l187.656 187.656c12.297 12.296 12.297 32.232 0.001 44.528z" fill="#666666" p-id="57291"></path></svg>', So = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763562537529" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="80294" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M107.5 736c28.6 0 52.2 7.1 70.2 21.4 18.5 15.1 27.9 36 27.9 61.7 0 22.9-8.4 41.3-24.7 54.1 16 12 29.6 32.8 29.6 57.3 0 27-9.7 49.7-28.8 67.2-19.6 17.5-45 26.3-75.6 26.3-29.2 0-53.4-7.8-71.7-23.3C14 983.6 2.4 958.4 0 926.1v-14.5h69.7V925c0.6 12.9 4.2 21.8 10.9 27.8 6.2 5.7 14.4 8.6 25.2 8.6 12.1 0 21.3-3.2 27.6-9.2 5.6-5.6 8.2-11.9 8.2-19.9 0-10-2.7-16.6-7.9-20.8-5.4-4.5-14.5-6.9-27.8-6.9H74.3v-58.9h31.5c11.6 0 19.8-2.2 24.5-6.1 4.1-3.5 6.3-9.2 6.3-17.4 0-8.3-2-13.9-5.3-17-4.6-3.9-12.3-6.1-23.5-6.1-11.5 0-19.3 2.5-24.8 7.4-5.5 4.8-8.9 12.8-10 23.7v13.4H5.1l-0.2-7v-8.2c2.4-29.1 13.4-52.1 32.7-68.2C55.8 744 79.3 736 107.5 736z m916.5 96v128H384V832h640zM106.9 368c28 0 51.7 8.4 70.5 25.1 18.8 17.1 28.2 39.1 28.2 65.8 0 25.4-9.7 48.8-28.8 70-10.4 11.1-27.9 24.8-55.3 43.2-10.1 6.6-18.5 12.9-25.2 18.7h109.3V656l-7.1 0.1-185.2-0.1c-4.5-0.6-7.5-1.6-9.8-3.8-2.4-2.4-3.2-5.6-3.5-10.4 0-29.7 9.6-55.5 28.8-77.1 10.3-11.8 30.6-28.1 61.1-49.1 14.4-10 25.7-19.2 32.4-26.3 8.9-10 13.2-20.3 13.2-30.8 0-9.8-2.3-16.6-6.4-20.4-4.5-4.1-12.2-6.3-23.6-6.3-11.3 0-18.8 3.4-24.1 10.6-5.7 7.3-9.2 19.8-9.9 37.7-0.5 3.9-1.6 6.8-3.8 9-2.1 2-4.8 3-10.4 4l-43-0.1c-4.2-0.8-7.1-1.9-9.2-4-2.2-2.3-3.2-5.3-3.7-10.3 0.4-32.1 9.9-58.3 28.6-78.2 19.6-21.6 45.5-32.5 76.9-32.5z m917.1 80v128H384V448h640zM146.6 0v288H75.1V94.2c-16.7 10.2-35.9 18.3-50.9 20.3l-8.2 1.6V46l4.8-2C39.3 37.3 52.5 31.7 60 27.6 71 20.9 82.1 11.7 96.3 0.1h50.3zM1024 64v128H384V64h640z" fill="#333333" p-id="80295"></path></svg>', Eo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480239307" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="56277" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M849.6 231v109.5c-46.4 14.9-84.6 41.5-114.4 81.3-29.9 36.5-44.8 76.3-43.1 116.1 8.3-5 21.6-6.6 41.5-6.6 34.8 0 64.7 11.6 91.2 36.5 23.2 24.9 36.5 56.4 36.5 94.5S848 732 821.5 756.8C795 780 761.8 793.3 722 793.3c-46.4 0-82.9-19.9-112.8-56.4s-43.1-84.6-43.1-141c0-89.6 24.9-165.8 76.3-230.5C692 299 761.7 254.2 849.6 231z m-403 0v109.5c-46.4 14.9-82.9 41.5-112.8 81.3-31.5 36.5-46.4 76.3-44.8 116.1 8.3-5 21.6-6.6 41.5-6.6 34.8 0 64.7 11.6 89.6 36.5 24.9 24.9 38.1 56.4 38.1 94.5s-13.3 69.7-38.1 94.5c-26.5 23.2-61.4 36.5-101.2 36.5-46.4 0-82.9-19.9-111.1-56.4-29.9-36.5-44.8-84.6-44.8-141 0-89.6 24.9-165.8 76.3-230.5C289 299 358.7 254.2 446.6 231z" p-id="56278"></path></svg>', Do = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480808376" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="61532" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M959.825 384.002V191.94c0-70.692-57.308-128-128-128H191.94c-70.692 0-128 57.308-128 128v639.885c0 70.692 57.308 128 128 128h639.885c70.692 0 128-57.308 128-128V384.002z m-813.16-237.337a63.738 63.738 0 0 1 45.336-18.785H832a63.962 63.962 0 0 1 63.886 64.121v128.061H127.88v-128.06a63.738 63.738 0 0 1 18.785-45.337z m269.127 461.308v-223.97h192.181v223.97H415.792z m192.181 63.94v223.972H415.792V671.914h192.181z m-256.121-63.94H127.88v-223.97h223.972v223.97zM146.665 877.21a63.467 63.467 0 0 1-18.785-45.21V671.914h223.972v223.97h-159.85a63.626 63.626 0 0 1-45.337-18.675z m749.22-45.21a63.763 63.763 0 0 1-63.886 63.886H671.914V671.914h223.97v160.085z m0-224.026H671.914v-223.97h223.97v223.97z" p-id="61533"></path></svg>', To = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480994147" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="73821" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M933.529779 1022.701142H87.673207c-48.357498 0-87.523075-39.165577-87.523075-87.523076V1.798419h729.259049c48.357498 0 87.523075 39.165577 87.523076 87.523076v320.818031h204.220509V935.178066c-0.099912 48.357498-39.265489 87.523075-87.622987 87.523076z m-175.046151-904.205289c0-32.171724-26.077081-58.348717-58.348717-58.348717H58.498849v845.856572c0 32.171724 26.077081 58.348717 58.348717 58.348717h583.387257c32.171724 0 58.348717-26.077081 58.348717-58.348717V118.495853zM962.704137 468.588155h-145.871792v495.864182h87.523075c32.171724 0 58.348717-26.077081 58.348717-58.348717V468.588155z m-729.25905 0h379.166748v58.348717H233.445087V468.588155z m0-233.394868h379.166748v58.348717H233.445087v-58.348717z m262.569227 525.03854H233.445087v-58.348716h262.469314v58.348716z m0 0" p-id="73822"></path></svg>', Fo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763477549677" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="31202" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M828.6 75C889.572 75 939 124.428 939 185.4v676.2c0 60.972-49.428 110.4-110.4 110.4H152.4C91.428 972 42 922.572 42 861.6V185.4C42 124.428 91.428 75 152.4 75z m0 59.8H152.4c-27.946 0-50.6 22.654-50.6 50.6v676.2c0 27.946 22.654 50.6 50.6 50.6h676.2c27.946 0 50.6-22.654 50.6-50.6V185.4c0-27.946-22.654-50.6-50.6-50.6z m-20.56 167.48c11.48 11.504 11.641 30.022 0.502 41.725l-0.548 0.56L477.473 674.37c-11.251 11.227-29.274 11.663-41.05 1.123l-0.574-0.527L260.695 509.93c-12.018-11.325-12.581-30.248-1.257-42.266 11.145-11.828 29.65-12.56 41.69-1.788l0.577 0.53L455.756 611.56l310-309.325c11.689-11.664 30.62-11.644 42.284 0.045z" fill="#333333" p-id="31203"></path></svg>', Ao = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1763480631673" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="60480" xmlns:xlink="http://www.w3.org/1999/xlink" width="18" height="18"><path d="M960 192h-28.384c-16.8 0-32.928 6.624-44.928 18.432L800 295.936V256a96 96 0 0 0-96-96H96C43.072 160 0 203.04 0 256v512a96 96 0 0 0 96 96h608c52.992 0 96-43.008 96-96v-39.072l86.688 85.504c12 11.808 28.128 18.432 44.928 18.432H960a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64zM96 800c-17.664 0-32-14.368-32-32V256a32 32 0 0 1 32-32h608c17.632 0 32 14.336 32 32v512c0 17.632-14.368 32-32 32H96z m864-31.136h-32l-128-128V640l-32-32v-192l160-160h32v512.864z" fill="#333333" p-id="60481"></path></svg>', Bo = ["innerHTML"], Ho = /* @__PURE__ */ nt({
|
|
1127
1113
|
__name: "SvgIcon",
|
|
1128
1114
|
props: {
|
|
1129
1115
|
name: {},
|
|
@@ -1132,15 +1118,16 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1132
1118
|
},
|
|
1133
1119
|
setup(t) {
|
|
1134
1120
|
const d = t, n = le(), o = /* @__PURE__ */ Object.assign({
|
|
1135
|
-
"/src/svg/alignCenter.svg":
|
|
1136
|
-
"/src/svg/alignJustify.svg":
|
|
1137
|
-
"/src/svg/alignLeft.svg":
|
|
1138
|
-
"/src/svg/alignRight.svg":
|
|
1139
|
-
"/src/svg/bulletList.svg":
|
|
1140
|
-
"/src/svg/caretDown.svg":
|
|
1141
|
-
"/src/svg/clearFormat.svg":
|
|
1142
|
-
"/src/svg/code.svg":
|
|
1143
|
-
"/src/svg/codeBlock.svg":
|
|
1121
|
+
"/src/svg/alignCenter.svg": ho,
|
|
1122
|
+
"/src/svg/alignJustify.svg": go,
|
|
1123
|
+
"/src/svg/alignLeft.svg": mo,
|
|
1124
|
+
"/src/svg/alignRight.svg": ko,
|
|
1125
|
+
"/src/svg/bulletList.svg": wo,
|
|
1126
|
+
"/src/svg/caretDown.svg": bo,
|
|
1127
|
+
"/src/svg/clearFormat.svg": yo,
|
|
1128
|
+
"/src/svg/code.svg": Co,
|
|
1129
|
+
"/src/svg/codeBlock.svg": xo,
|
|
1130
|
+
"/src/svg/fixed.svg": _o,
|
|
1144
1131
|
"/src/svg/formatBrush.svg": Lo,
|
|
1145
1132
|
"/src/svg/highBg.svg": Mo,
|
|
1146
1133
|
"/src/svg/img.svg": zo,
|
|
@@ -1153,11 +1140,11 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1153
1140
|
"/src/svg/video.svg": Ao
|
|
1154
1141
|
}), r = (() => {
|
|
1155
1142
|
const h = {};
|
|
1156
|
-
return Object.entries(o).forEach(([
|
|
1157
|
-
const s = (
|
|
1143
|
+
return Object.entries(o).forEach(([M, b]) => {
|
|
1144
|
+
const s = (M.split("/src/svg/")[1] || M).replace(/\.svg$/i, "");
|
|
1158
1145
|
h[s] = b;
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1146
|
+
const p = s.split("/").pop();
|
|
1147
|
+
p && (h[p] = b);
|
|
1161
1148
|
}), h;
|
|
1162
1149
|
})(), i = ut(() => {
|
|
1163
1150
|
const h = d.name.replace(/\.svg$/i, "");
|
|
@@ -1165,8 +1152,8 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1165
1152
|
});
|
|
1166
1153
|
function D(h) {
|
|
1167
1154
|
if (!h) return "";
|
|
1168
|
-
let
|
|
1169
|
-
return
|
|
1155
|
+
let M = h.replace(/<\?xml[\s\S]*?\?>/gi, "").replace(/<!DOCTYPE[\s\S]*?>/gi, "");
|
|
1156
|
+
return M = M.replace(/<svg([^>]*)>/i, (b, y) => `<svg${y.replace(/\s(width|height)="[^"]*"/gi, "").replace(/\s(fill|stroke)="[^"]*"/gi, "")} width="1em" height="1em" preserveAspectRatio="xMidYMid meet">`), M = M.replace(/fill="(?!none)[^"]*"/gi, 'fill="currentColor"'), M = M.replace(/stroke="(?!none)[^"]*"/gi, 'stroke="currentColor"'), M;
|
|
1170
1157
|
}
|
|
1171
1158
|
const l = ut(() => D(i.value));
|
|
1172
1159
|
function C(h) {
|
|
@@ -1174,21 +1161,21 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1174
1161
|
return typeof h == "number" ? `${h}px` : h;
|
|
1175
1162
|
}
|
|
1176
1163
|
const $ = ut(() => {
|
|
1177
|
-
const h = {},
|
|
1178
|
-
|
|
1164
|
+
const h = {}, M = C(d.size);
|
|
1165
|
+
M && (h.fontSize = M), d.color && (h.color = d.color);
|
|
1179
1166
|
const b = n.style ?? void 0;
|
|
1180
1167
|
return [h, b].filter(Boolean);
|
|
1181
1168
|
});
|
|
1182
|
-
return (h,
|
|
1183
|
-
class: J(["svg-icon",
|
|
1169
|
+
return (h, M) => (T(), V("span", {
|
|
1170
|
+
class: J(["svg-icon", z(n).class]),
|
|
1184
1171
|
style: dt($.value),
|
|
1185
1172
|
innerHTML: l.value
|
|
1186
1173
|
}, null, 14, Bo));
|
|
1187
1174
|
}
|
|
1188
|
-
}),
|
|
1175
|
+
}), et = /* @__PURE__ */ st(Ho, [["__scopeId", "data-v-c83ef2e3"]]), Vo = ["aria-expanded"], Uo = {
|
|
1189
1176
|
key: 0,
|
|
1190
1177
|
class: "dropdown"
|
|
1191
|
-
}, Io = { class: "section" },
|
|
1178
|
+
}, Io = { class: "section" }, Oo = { class: "swatches" }, jo = { class: "section" }, Wo = { class: "swatches" }, Ro = ["onClick"], No = {
|
|
1192
1179
|
key: 0,
|
|
1193
1180
|
class: "check"
|
|
1194
1181
|
}, Po = { class: "section" }, Go = { class: "swatches grid" }, Yo = ["onClick"], Ko = {
|
|
@@ -1234,14 +1221,14 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1234
1221
|
"#85A5FF",
|
|
1235
1222
|
"#B37FEB",
|
|
1236
1223
|
"#F759AB"
|
|
1237
|
-
], o = F(!1), r = F(!1), i = F(null), D = F(d.currentBg || "#ffffff"), l = F(
|
|
1224
|
+
], o = F(!1), r = F(!1), i = F(null), D = F(d.currentBg || "#ffffff"), l = F(u()), C = F("#FADB14");
|
|
1238
1225
|
function $() {
|
|
1239
1226
|
o.value || window.dispatchEvent(new CustomEvent(Nt, { detail: { id: Jt } })), o.value = !o.value;
|
|
1240
1227
|
}
|
|
1241
1228
|
function h() {
|
|
1242
1229
|
o.value = !1;
|
|
1243
1230
|
}
|
|
1244
|
-
function
|
|
1231
|
+
function M() {
|
|
1245
1232
|
r.value = !r.value;
|
|
1246
1233
|
}
|
|
1247
1234
|
function b(w) {
|
|
@@ -1256,9 +1243,9 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1256
1243
|
const g = w.target, k = i.value;
|
|
1257
1244
|
k && !k.contains(g) && h();
|
|
1258
1245
|
}
|
|
1259
|
-
function
|
|
1246
|
+
function p() {
|
|
1260
1247
|
}
|
|
1261
|
-
function
|
|
1248
|
+
function u() {
|
|
1262
1249
|
try {
|
|
1263
1250
|
const w = localStorage.getItem("md_bg_recent");
|
|
1264
1251
|
if (!w) return [];
|
|
@@ -1276,31 +1263,31 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1276
1263
|
} catch {
|
|
1277
1264
|
}
|
|
1278
1265
|
}
|
|
1279
|
-
let
|
|
1266
|
+
let f = [];
|
|
1280
1267
|
function S() {
|
|
1281
1268
|
const w = d.editor;
|
|
1282
|
-
w && (
|
|
1283
|
-
{ event: "selectionUpdate", handler:
|
|
1284
|
-
{ event: "transaction", handler:
|
|
1285
|
-
{ event: "update", handler:
|
|
1286
|
-
],
|
|
1269
|
+
w && (f = [
|
|
1270
|
+
{ event: "selectionUpdate", handler: p },
|
|
1271
|
+
{ event: "transaction", handler: p },
|
|
1272
|
+
{ event: "update", handler: p }
|
|
1273
|
+
], f.forEach(({ event: g, handler: k }) => {
|
|
1287
1274
|
w.on(g, k);
|
|
1288
1275
|
}));
|
|
1289
1276
|
}
|
|
1290
1277
|
vt(() => {
|
|
1291
1278
|
document.addEventListener("click", s), window.addEventListener(Nt, I), S();
|
|
1292
|
-
}),
|
|
1279
|
+
}), ht(() => {
|
|
1293
1280
|
document.removeEventListener("click", s), window.removeEventListener(Nt, I);
|
|
1294
1281
|
const w = d.editor;
|
|
1295
|
-
w &&
|
|
1282
|
+
w && f.forEach(({ event: g, handler: k }) => {
|
|
1296
1283
|
w.off(g, k);
|
|
1297
|
-
}),
|
|
1284
|
+
}), f = [];
|
|
1298
1285
|
}), wt(
|
|
1299
1286
|
() => d.editor,
|
|
1300
1287
|
(w, g) => {
|
|
1301
|
-
g &&
|
|
1302
|
-
g.off(k,
|
|
1303
|
-
}),
|
|
1288
|
+
g && f.forEach(({ event: k, handler: j }) => {
|
|
1289
|
+
g.off(k, j);
|
|
1290
|
+
}), f = [], S();
|
|
1304
1291
|
}
|
|
1305
1292
|
);
|
|
1306
1293
|
function I(w) {
|
|
@@ -1312,24 +1299,24 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1312
1299
|
ref_key: "rootRef",
|
|
1313
1300
|
ref: i
|
|
1314
1301
|
}, [
|
|
1315
|
-
|
|
1302
|
+
c("div", {
|
|
1316
1303
|
class: "icon icon-dropdown",
|
|
1317
1304
|
"aria-expanded": o.value
|
|
1318
1305
|
}, [
|
|
1319
|
-
|
|
1306
|
+
v(z(G), {
|
|
1320
1307
|
text: "背景色",
|
|
1321
1308
|
placement: "bottom"
|
|
1322
1309
|
}, {
|
|
1323
1310
|
default: R(() => [
|
|
1324
|
-
|
|
1311
|
+
c("div", {
|
|
1325
1312
|
class: "icon-stack hoverable",
|
|
1326
1313
|
onClick: g[0] || (g[0] = A((k) => b(C.value), ["stop"]))
|
|
1327
1314
|
}, [
|
|
1328
|
-
|
|
1315
|
+
v(et, {
|
|
1329
1316
|
name: "highBg",
|
|
1330
1317
|
size: 18
|
|
1331
1318
|
}),
|
|
1332
|
-
|
|
1319
|
+
c("div", {
|
|
1333
1320
|
class: "underline",
|
|
1334
1321
|
style: dt({ background: C.value })
|
|
1335
1322
|
}, null, 4)
|
|
@@ -1337,16 +1324,16 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1337
1324
|
]),
|
|
1338
1325
|
_: 1
|
|
1339
1326
|
}),
|
|
1340
|
-
|
|
1327
|
+
v(z(G), {
|
|
1341
1328
|
text: "更多背景色",
|
|
1342
1329
|
placement: "bottom"
|
|
1343
1330
|
}, {
|
|
1344
1331
|
default: R(() => [
|
|
1345
|
-
|
|
1332
|
+
c("div", {
|
|
1346
1333
|
class: "arrow hoverable",
|
|
1347
1334
|
onClick: A($, ["stop"])
|
|
1348
1335
|
}, [
|
|
1349
|
-
|
|
1336
|
+
v(z(Vt), {
|
|
1350
1337
|
theme: "filled",
|
|
1351
1338
|
strokeWidth: 3,
|
|
1352
1339
|
size: "12"
|
|
@@ -1356,13 +1343,13 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1356
1343
|
_: 1
|
|
1357
1344
|
})
|
|
1358
1345
|
], 8, Vo),
|
|
1359
|
-
|
|
1346
|
+
v(xt, { name: "dropdown-slide" }, {
|
|
1360
1347
|
default: R(() => [
|
|
1361
1348
|
o.value ? (T(), V("div", Uo, [
|
|
1362
|
-
|
|
1363
|
-
g[4] || (g[4] =
|
|
1364
|
-
|
|
1365
|
-
|
|
1349
|
+
c("div", Io, [
|
|
1350
|
+
g[4] || (g[4] = c("div", { class: "section-title" }, "无填充色", -1)),
|
|
1351
|
+
c("div", Oo, [
|
|
1352
|
+
c("div", {
|
|
1366
1353
|
class: "swatch",
|
|
1367
1354
|
style: { background: `linear-gradient(
|
|
1368
1355
|
45deg,
|
|
@@ -1375,29 +1362,29 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1375
1362
|
})
|
|
1376
1363
|
])
|
|
1377
1364
|
]),
|
|
1378
|
-
|
|
1379
|
-
g[5] || (g[5] =
|
|
1380
|
-
|
|
1365
|
+
c("div", jo, [
|
|
1366
|
+
g[5] || (g[5] = c("div", { class: "section-title" }, "默认", -1)),
|
|
1367
|
+
c("div", Wo, [
|
|
1381
1368
|
(T(!0), V(mt, null, kt(n.slice(0, 9), (k) => (T(), V("div", {
|
|
1382
1369
|
key: k,
|
|
1383
1370
|
class: "swatch",
|
|
1384
1371
|
style: dt({ background: k }),
|
|
1385
|
-
onClick: A((
|
|
1372
|
+
onClick: A((j) => b(k), ["stop"])
|
|
1386
1373
|
}, [
|
|
1387
1374
|
k === C.value ? (T(), V("span", No, "✓")) : K("", !0)
|
|
1388
1375
|
], 12, Ro))), 128))
|
|
1389
1376
|
])
|
|
1390
1377
|
]),
|
|
1391
|
-
|
|
1392
|
-
g[6] || (g[6] =
|
|
1393
|
-
|
|
1378
|
+
c("div", Po, [
|
|
1379
|
+
g[6] || (g[6] = c("div", { class: "section-title" }, "常用颜色", -1)),
|
|
1380
|
+
c("div", Go, [
|
|
1394
1381
|
(T(!0), V(mt, null, kt(n.slice(9), (k) => (T(), V("div", {
|
|
1395
1382
|
key: k,
|
|
1396
1383
|
class: "swatch",
|
|
1397
1384
|
style: dt({ background: k }),
|
|
1398
|
-
onClick: A((
|
|
1385
|
+
onClick: A((j) => b(k), ["stop"])
|
|
1399
1386
|
}, [
|
|
1400
|
-
k === C.value ? (T(), _t(
|
|
1387
|
+
k === C.value ? (T(), _t(z(Bt), {
|
|
1401
1388
|
key: 0,
|
|
1402
1389
|
theme: "filled",
|
|
1403
1390
|
strokeWidth: 3
|
|
@@ -1406,40 +1393,40 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1406
1393
|
])
|
|
1407
1394
|
]),
|
|
1408
1395
|
l.value.length ? (T(), V("div", Ko, [
|
|
1409
|
-
g[7] || (g[7] =
|
|
1410
|
-
|
|
1396
|
+
g[7] || (g[7] = c("div", { class: "section-title" }, "最近使用自定义颜色", -1)),
|
|
1397
|
+
c("div", qo, [
|
|
1411
1398
|
(T(!0), V(mt, null, kt(l.value, (k) => (T(), V("div", {
|
|
1412
1399
|
key: k,
|
|
1413
1400
|
class: "swatch",
|
|
1414
1401
|
style: dt({ background: k }),
|
|
1415
|
-
onClick: A((
|
|
1402
|
+
onClick: A((j) => b(k), ["stop"])
|
|
1416
1403
|
}, null, 12, Jo))), 128))
|
|
1417
1404
|
])
|
|
1418
1405
|
])) : K("", !0),
|
|
1419
|
-
|
|
1420
|
-
|
|
1406
|
+
c("div", Zo, [
|
|
1407
|
+
c("button", {
|
|
1421
1408
|
class: "btn",
|
|
1422
1409
|
onClick: A(y, ["stop"])
|
|
1423
1410
|
}, "暂无"),
|
|
1424
|
-
|
|
1411
|
+
c("button", {
|
|
1425
1412
|
class: "btn",
|
|
1426
|
-
onClick: A(
|
|
1413
|
+
onClick: A(M, ["stop"])
|
|
1427
1414
|
}, "更多颜色")
|
|
1428
1415
|
]),
|
|
1429
1416
|
r.value ? (T(), V("div", Xo, [
|
|
1430
|
-
Lt(
|
|
1417
|
+
Lt(c("input", {
|
|
1431
1418
|
type: "color",
|
|
1432
1419
|
"onUpdate:modelValue": g[1] || (g[1] = (k) => D.value = k)
|
|
1433
1420
|
}, null, 512), [
|
|
1434
1421
|
[Mt, D.value]
|
|
1435
1422
|
]),
|
|
1436
|
-
Lt(
|
|
1423
|
+
Lt(c("input", {
|
|
1437
1424
|
class: "hex",
|
|
1438
1425
|
"onUpdate:modelValue": g[2] || (g[2] = (k) => D.value = k)
|
|
1439
1426
|
}, null, 512), [
|
|
1440
1427
|
[Mt, D.value]
|
|
1441
1428
|
]),
|
|
1442
|
-
|
|
1429
|
+
c("button", {
|
|
1443
1430
|
class: "btn apply",
|
|
1444
1431
|
onClick: g[3] || (g[3] = A((k) => b(D.value), ["stop"]))
|
|
1445
1432
|
}, "应用")
|
|
@@ -1461,24 +1448,24 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1461
1448
|
const d = t, n = F(!1), o = F(""), r = F(!1), i = F(null), D = () => {
|
|
1462
1449
|
n.value = !n.value;
|
|
1463
1450
|
}, l = () => {
|
|
1464
|
-
var s,
|
|
1451
|
+
var s, p, u, m, f, S;
|
|
1465
1452
|
const y = o.value.trim();
|
|
1466
|
-
y && ((S = (
|
|
1453
|
+
y && ((S = (f = ((m = (p = (s = d.editor) == null ? void 0 : s.chain) == null ? void 0 : (u = p.call(s)).focus) == null ? void 0 : m.call(u)).setImage({ src: y })).run) == null || S.call(f), n.value = !1, o.value = "");
|
|
1467
1454
|
}, C = (y) => {
|
|
1468
1455
|
y.key === "Enter" && l(), y.key === "Escape" && (n.value = !1, o.value = "");
|
|
1469
1456
|
}, $ = () => {
|
|
1470
1457
|
var y;
|
|
1471
1458
|
d.imageUploader && ((y = i.value) == null || y.click());
|
|
1472
1459
|
}, h = async (y) => {
|
|
1473
|
-
var m,
|
|
1474
|
-
const s = y.target,
|
|
1475
|
-
if (s.value = "", !
|
|
1476
|
-
const
|
|
1477
|
-
if (typeof
|
|
1478
|
-
const P = Math.max(1,
|
|
1479
|
-
if (
|
|
1460
|
+
var m, f, S, I, w, g, k, j;
|
|
1461
|
+
const s = y.target, p = (m = s.files) == null ? void 0 : m[0];
|
|
1462
|
+
if (s.value = "", !p || !d.imageUploader) return;
|
|
1463
|
+
const u = (f = d.uploadSizeLimit) == null ? void 0 : f.image;
|
|
1464
|
+
if (typeof u == "number" && u > 0) {
|
|
1465
|
+
const P = Math.max(1, u) * 1024 * 1024;
|
|
1466
|
+
if (p.size > P) {
|
|
1480
1467
|
try {
|
|
1481
|
-
window.alert(`图片文件大小超限(${(
|
|
1468
|
+
window.alert(`图片文件大小超限(${(p.size / 1024 / 1024).toFixed(2)}MB > ${u}MB)`);
|
|
1482
1469
|
} catch {
|
|
1483
1470
|
}
|
|
1484
1471
|
return;
|
|
@@ -1487,9 +1474,9 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1487
1474
|
try {
|
|
1488
1475
|
r.value = !0;
|
|
1489
1476
|
let P = null;
|
|
1490
|
-
P = URL.createObjectURL(
|
|
1491
|
-
const
|
|
1492
|
-
if (typeof
|
|
1477
|
+
P = URL.createObjectURL(p), (j = (k = ((g = (I = (S = d.editor) == null ? void 0 : S.chain) == null ? void 0 : (w = I.call(S)).focus) == null ? void 0 : g.call(w)).setImage({ src: P, uploading: !0 })).run) == null || j.call(k);
|
|
1478
|
+
const O = await d.imageUploader(p);
|
|
1479
|
+
if (typeof O == "string" && O) {
|
|
1493
1480
|
const W = d.editor, { state: Y } = W, { doc: Z } = Y;
|
|
1494
1481
|
let tt = null;
|
|
1495
1482
|
if (Z.descendants((Q, lt) => {
|
|
@@ -1498,7 +1485,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1498
1485
|
}), tt != null) {
|
|
1499
1486
|
const Q = Z.nodeAt(tt), lt = Y.schema.nodes.image;
|
|
1500
1487
|
if (Q && lt) {
|
|
1501
|
-
const it = { ...Q.attrs || {}, src:
|
|
1488
|
+
const it = { ...Q.attrs || {}, src: O, uploading: null }, at = Y.tr.setNodeMarkup(tt, lt, it, Q.marks);
|
|
1502
1489
|
W.view.dispatch(at);
|
|
1503
1490
|
}
|
|
1504
1491
|
}
|
|
@@ -1511,35 +1498,35 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1511
1498
|
} catch {
|
|
1512
1499
|
}
|
|
1513
1500
|
}
|
|
1514
|
-
},
|
|
1501
|
+
}, M = F(null);
|
|
1515
1502
|
let b = null;
|
|
1516
1503
|
return vt(() => {
|
|
1517
1504
|
b = (y) => {
|
|
1518
1505
|
if (!n.value) return;
|
|
1519
|
-
const s =
|
|
1520
|
-
s &&
|
|
1506
|
+
const s = M.value, p = y.target;
|
|
1507
|
+
s && p && !s.contains(p) && (n.value = !1);
|
|
1521
1508
|
}, document.addEventListener("mousedown", b, !0);
|
|
1522
|
-
}),
|
|
1509
|
+
}), ht(() => {
|
|
1523
1510
|
b && (document.removeEventListener("mousedown", b, !0), b = null);
|
|
1524
1511
|
}), (y, s) => (T(), V("div", {
|
|
1525
1512
|
class: "icon image-icon",
|
|
1526
1513
|
onClick: D,
|
|
1527
1514
|
ref_key: "rootRef",
|
|
1528
|
-
ref:
|
|
1515
|
+
ref: M
|
|
1529
1516
|
}, [
|
|
1530
|
-
|
|
1517
|
+
v(z(G), {
|
|
1531
1518
|
text: "图片",
|
|
1532
1519
|
placement: "bottom"
|
|
1533
1520
|
}, {
|
|
1534
1521
|
default: R(() => [
|
|
1535
|
-
|
|
1522
|
+
v(et, {
|
|
1536
1523
|
name: "img",
|
|
1537
1524
|
size: 18
|
|
1538
1525
|
})
|
|
1539
1526
|
]),
|
|
1540
1527
|
_: 1
|
|
1541
1528
|
}),
|
|
1542
|
-
|
|
1529
|
+
v(xt, {
|
|
1543
1530
|
name: "img-panel",
|
|
1544
1531
|
appear: ""
|
|
1545
1532
|
}, {
|
|
@@ -1550,16 +1537,16 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1550
1537
|
onClick: s[1] || (s[1] = A(() => {
|
|
1551
1538
|
}, ["stop"]))
|
|
1552
1539
|
}, [
|
|
1553
|
-
Lt(
|
|
1540
|
+
Lt(c("input", {
|
|
1554
1541
|
class: "image-input",
|
|
1555
1542
|
type: "text",
|
|
1556
1543
|
placeholder: "粘贴图片链接(png/jpg/webp/svg 等)",
|
|
1557
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
1544
|
+
"onUpdate:modelValue": s[0] || (s[0] = (p) => o.value = p),
|
|
1558
1545
|
onKeydown: C
|
|
1559
1546
|
}, null, 544), [
|
|
1560
1547
|
[Mt, o.value]
|
|
1561
1548
|
]),
|
|
1562
|
-
|
|
1549
|
+
c("input", {
|
|
1563
1550
|
ref_key: "imageUploadInput",
|
|
1564
1551
|
ref: i,
|
|
1565
1552
|
type: "file",
|
|
@@ -1567,17 +1554,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1567
1554
|
style: { display: "none" },
|
|
1568
1555
|
onChange: h
|
|
1569
1556
|
}, null, 544),
|
|
1570
|
-
|
|
1571
|
-
|
|
1557
|
+
c("div", en, [
|
|
1558
|
+
c("button", {
|
|
1572
1559
|
class: "btn btn-primary",
|
|
1573
1560
|
onClick: A(l, ["stop"])
|
|
1574
1561
|
}, "插入"),
|
|
1575
|
-
|
|
1562
|
+
c("button", {
|
|
1576
1563
|
class: "btn",
|
|
1577
1564
|
"aria-disabled": !d.imageUploader || r.value,
|
|
1578
1565
|
disabled: !d.imageUploader || r.value,
|
|
1579
1566
|
onClick: A($, ["stop"])
|
|
1580
|
-
},
|
|
1567
|
+
}, ft(r.value ? "上传中…" : "上传文件"), 9, on)
|
|
1581
1568
|
])
|
|
1582
1569
|
])) : K("", !0)
|
|
1583
1570
|
]),
|
|
@@ -1598,26 +1585,26 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1598
1585
|
}, l = () => {
|
|
1599
1586
|
const s = o.value.trim();
|
|
1600
1587
|
if (!s) return;
|
|
1601
|
-
const
|
|
1588
|
+
const p = d.editor, u = p == null ? void 0 : p.commands;
|
|
1602
1589
|
if (/youtube\.com|youtu\.be|youtube-nocookie\.com/i.test(s)) {
|
|
1603
|
-
const
|
|
1590
|
+
const f = String(s).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1604
1591
|
try {
|
|
1605
|
-
|
|
1606
|
-
`<p><a href="${
|
|
1592
|
+
p.chain().focus().insertContent(
|
|
1593
|
+
`<p><a href="${f}" target="_blank" rel="noopener noreferrer">${f}</a></p>`
|
|
1607
1594
|
).run();
|
|
1608
1595
|
} catch {
|
|
1609
|
-
|
|
1596
|
+
p.chain().focus().insertContent(f).run();
|
|
1610
1597
|
}
|
|
1611
|
-
} else if (typeof (
|
|
1612
|
-
|
|
1598
|
+
} else if (typeof (u == null ? void 0 : u.setVideo) == "function")
|
|
1599
|
+
p.chain().focus().setVideo({ src: s, HTMLAttributes: { controls: !0, width: 640 } }).run();
|
|
1613
1600
|
else {
|
|
1614
|
-
const
|
|
1601
|
+
const f = String(s).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1615
1602
|
try {
|
|
1616
|
-
|
|
1617
|
-
`<p><a href="${
|
|
1603
|
+
p.chain().focus().insertContent(
|
|
1604
|
+
`<p><a href="${f}" target="_blank" rel="noopener noreferrer">${f}</a></p>`
|
|
1618
1605
|
).run();
|
|
1619
1606
|
} catch {
|
|
1620
|
-
|
|
1607
|
+
p.chain().focus().insertContent(f).run();
|
|
1621
1608
|
}
|
|
1622
1609
|
}
|
|
1623
1610
|
n.value = !1, o.value = "";
|
|
@@ -1628,65 +1615,65 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1628
1615
|
d.videoUploader && ((s = i.value) == null || s.click());
|
|
1629
1616
|
}, h = async (s) => {
|
|
1630
1617
|
var S, I;
|
|
1631
|
-
const
|
|
1632
|
-
if (
|
|
1618
|
+
const p = s.target, u = (S = p.files) == null ? void 0 : S[0];
|
|
1619
|
+
if (p.value = "", !u || !d.videoUploader) return;
|
|
1633
1620
|
const m = (I = d.uploadSizeLimit) == null ? void 0 : I.video;
|
|
1634
1621
|
if (typeof m == "number" && m > 0) {
|
|
1635
1622
|
const w = Math.max(1, m) * 1024 * 1024;
|
|
1636
|
-
if (
|
|
1623
|
+
if (u.size > w) {
|
|
1637
1624
|
try {
|
|
1638
|
-
window.alert(`视频文件大小超限(${(
|
|
1625
|
+
window.alert(`视频文件大小超限(${(u.size / 1024 / 1024).toFixed(2)}MB > ${m}MB)`);
|
|
1639
1626
|
} catch {
|
|
1640
1627
|
}
|
|
1641
1628
|
return;
|
|
1642
1629
|
}
|
|
1643
1630
|
}
|
|
1644
|
-
let
|
|
1631
|
+
let f = null;
|
|
1645
1632
|
try {
|
|
1646
1633
|
r.value = !0;
|
|
1647
1634
|
const w = d.editor, g = w == null ? void 0 : w.commands;
|
|
1648
|
-
|
|
1635
|
+
f = URL.createObjectURL(u);
|
|
1649
1636
|
try {
|
|
1650
1637
|
if (typeof (g == null ? void 0 : g.setVideo) == "function")
|
|
1651
1638
|
w.chain().focus().setVideo({
|
|
1652
|
-
src:
|
|
1639
|
+
src: f,
|
|
1653
1640
|
HTMLAttributes: { controls: !0, width: 640, uploading: !0 }
|
|
1654
1641
|
}).run();
|
|
1655
1642
|
else {
|
|
1656
|
-
const
|
|
1643
|
+
const j = String(f).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1657
1644
|
try {
|
|
1658
1645
|
w.chain().focus().insertContent(
|
|
1659
|
-
`<p><a href="${
|
|
1646
|
+
`<p><a href="${j}" target="_blank" rel="noopener noreferrer">${j}</a></p>`
|
|
1660
1647
|
).run();
|
|
1661
1648
|
} catch {
|
|
1662
|
-
w.chain().focus().insertContent(
|
|
1649
|
+
w.chain().focus().insertContent(j).run();
|
|
1663
1650
|
}
|
|
1664
1651
|
}
|
|
1665
1652
|
} catch {
|
|
1666
1653
|
}
|
|
1667
|
-
const k = await d.videoUploader(
|
|
1668
|
-
|
|
1654
|
+
const k = await d.videoUploader(u);
|
|
1655
|
+
f && M(f, k), n.value = !1, o.value = "";
|
|
1669
1656
|
} finally {
|
|
1670
1657
|
r.value = !1;
|
|
1671
1658
|
try {
|
|
1672
|
-
|
|
1659
|
+
f && URL.revokeObjectURL(f);
|
|
1673
1660
|
} catch {
|
|
1674
1661
|
}
|
|
1675
1662
|
}
|
|
1676
1663
|
};
|
|
1677
|
-
function
|
|
1678
|
-
const
|
|
1679
|
-
if (!
|
|
1680
|
-
const { state: m } =
|
|
1664
|
+
function M(s, p) {
|
|
1665
|
+
const u = d.editor;
|
|
1666
|
+
if (!u) return;
|
|
1667
|
+
const { state: m } = u, { doc: f } = m;
|
|
1681
1668
|
let S = null;
|
|
1682
|
-
if (
|
|
1669
|
+
if (f.descendants((I, w) => {
|
|
1683
1670
|
var g, k;
|
|
1684
1671
|
return ((g = I.type) == null ? void 0 : g.name) === "video" && ((k = I.attrs) == null ? void 0 : k.src) === s ? (S = w, !1) : !0;
|
|
1685
1672
|
}), S != null) {
|
|
1686
|
-
const I =
|
|
1673
|
+
const I = f.nodeAt(S), w = m.schema.nodes.video;
|
|
1687
1674
|
if (!I || !w) return;
|
|
1688
|
-
const g = { ...I.attrs || {}, src:
|
|
1689
|
-
|
|
1675
|
+
const g = { ...I.attrs || {}, src: p, uploading: null }, k = m.tr.setNodeMarkup(S, w, g, I.marks);
|
|
1676
|
+
u.view.dispatch(k);
|
|
1690
1677
|
}
|
|
1691
1678
|
}
|
|
1692
1679
|
const b = F(null);
|
|
@@ -1694,30 +1681,30 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1694
1681
|
return vt(() => {
|
|
1695
1682
|
y = (s) => {
|
|
1696
1683
|
if (!n.value) return;
|
|
1697
|
-
const
|
|
1698
|
-
|
|
1684
|
+
const p = b.value, u = s.target;
|
|
1685
|
+
p && u && !p.contains(u) && (n.value = !1);
|
|
1699
1686
|
}, document.addEventListener("mousedown", y, !0);
|
|
1700
|
-
}),
|
|
1687
|
+
}), ht(() => {
|
|
1701
1688
|
y && (document.removeEventListener("mousedown", y, !0), y = null);
|
|
1702
|
-
}), (s,
|
|
1689
|
+
}), (s, p) => (T(), V("div", {
|
|
1703
1690
|
class: "icon video-icon",
|
|
1704
1691
|
onClick: D,
|
|
1705
1692
|
ref_key: "rootRef",
|
|
1706
1693
|
ref: b
|
|
1707
1694
|
}, [
|
|
1708
|
-
|
|
1695
|
+
v(z(G), {
|
|
1709
1696
|
text: "视频",
|
|
1710
1697
|
placement: "bottom"
|
|
1711
1698
|
}, {
|
|
1712
1699
|
default: R(() => [
|
|
1713
|
-
|
|
1700
|
+
v(et, {
|
|
1714
1701
|
name: "video",
|
|
1715
1702
|
size: 16
|
|
1716
1703
|
})
|
|
1717
1704
|
]),
|
|
1718
1705
|
_: 1
|
|
1719
1706
|
}),
|
|
1720
|
-
|
|
1707
|
+
v(xt, {
|
|
1721
1708
|
name: "video-panel",
|
|
1722
1709
|
appear: ""
|
|
1723
1710
|
}, {
|
|
@@ -1725,19 +1712,19 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1725
1712
|
n.value ? (T(), V("div", {
|
|
1726
1713
|
key: 0,
|
|
1727
1714
|
class: "video-input-panel",
|
|
1728
|
-
onClick:
|
|
1715
|
+
onClick: p[1] || (p[1] = A(() => {
|
|
1729
1716
|
}, ["stop"]))
|
|
1730
1717
|
}, [
|
|
1731
|
-
Lt(
|
|
1718
|
+
Lt(c("input", {
|
|
1732
1719
|
class: "video-input",
|
|
1733
1720
|
type: "text",
|
|
1734
1721
|
placeholder: "粘贴视频链接(mp4/webm/m3u8等)",
|
|
1735
|
-
"onUpdate:modelValue":
|
|
1722
|
+
"onUpdate:modelValue": p[0] || (p[0] = (u) => o.value = u),
|
|
1736
1723
|
onKeydown: C
|
|
1737
1724
|
}, null, 544), [
|
|
1738
1725
|
[Mt, o.value]
|
|
1739
1726
|
]),
|
|
1740
|
-
|
|
1727
|
+
c("input", {
|
|
1741
1728
|
ref_key: "videoUploadInput",
|
|
1742
1729
|
ref: i,
|
|
1743
1730
|
type: "file",
|
|
@@ -1745,17 +1732,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1745
1732
|
style: { display: "none" },
|
|
1746
1733
|
onChange: h
|
|
1747
1734
|
}, null, 544),
|
|
1748
|
-
|
|
1749
|
-
|
|
1735
|
+
c("div", ln, [
|
|
1736
|
+
c("button", {
|
|
1750
1737
|
class: "btn btn-primary",
|
|
1751
1738
|
onClick: A(l, ["stop"])
|
|
1752
1739
|
}, "插入"),
|
|
1753
|
-
|
|
1740
|
+
c("button", {
|
|
1754
1741
|
class: "btn",
|
|
1755
1742
|
"aria-disabled": !d.videoUploader || r.value,
|
|
1756
1743
|
disabled: !d.videoUploader || r.value,
|
|
1757
1744
|
onClick: A($, ["stop"])
|
|
1758
|
-
},
|
|
1745
|
+
}, ft(r.value ? "上传中…" : "上传文件"), 9, rn)
|
|
1759
1746
|
])
|
|
1760
1747
|
])) : K("", !0)
|
|
1761
1748
|
]),
|
|
@@ -1766,7 +1753,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1766
1753
|
}), cn = /* @__PURE__ */ st(an, [["__scopeId", "data-v-35a7027c"]]), dn = { class: "fr-header" }, un = {
|
|
1767
1754
|
key: 0,
|
|
1768
1755
|
class: "fr-body"
|
|
1769
|
-
}, vn = { class: "fr-input-row" },
|
|
1756
|
+
}, vn = { class: "fr-input-row" }, pn = ["value"], fn = {
|
|
1770
1757
|
key: 0,
|
|
1771
1758
|
class: "fr-count"
|
|
1772
1759
|
}, hn = { class: "fr-actions" }, gn = {
|
|
@@ -1782,17 +1769,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1782
1769
|
},
|
|
1783
1770
|
setup(t, { expose: d }) {
|
|
1784
1771
|
const n = t, o = F(!1), r = F("find"), i = F(""), D = F(""), l = F([]), C = F(0), $ = ut(() => {
|
|
1785
|
-
const
|
|
1786
|
-
return !i.value || !
|
|
1787
|
-
}), h = typeof navigator < "u" && navigator.platform.includes("Mac"),
|
|
1772
|
+
const O = l.value.length;
|
|
1773
|
+
return !i.value || !O ? "0/0" : `${Math.min(Math.max(C.value + 1, 1), O)}/${O}`;
|
|
1774
|
+
}), h = typeof navigator < "u" && navigator.platform.includes("Mac"), M = ut(() => h ? "⌘ F / ⌥ ⌘ F" : "Ctrl F / Ctrl H"), b = () => o.value = !o.value, y = () => o.value = !1;
|
|
1788
1775
|
function s() {
|
|
1789
|
-
var
|
|
1790
|
-
return ((
|
|
1776
|
+
var O;
|
|
1777
|
+
return ((O = n.editor) == null ? void 0 : O.view) || null;
|
|
1791
1778
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const
|
|
1794
|
-
if (l.value = [], C.value = 0, !
|
|
1795
|
-
const Y =
|
|
1779
|
+
function p() {
|
|
1780
|
+
const O = s(), W = i.value;
|
|
1781
|
+
if (l.value = [], C.value = 0, !O || !W) return;
|
|
1782
|
+
const Y = O.dom, Z = document.createTreeWalker(Y, NodeFilter.SHOW_TEXT, null);
|
|
1796
1783
|
let tt;
|
|
1797
1784
|
for (; tt = Z.nextNode(); ) {
|
|
1798
1785
|
const Q = tt, lt = Q.data || "";
|
|
@@ -1800,79 +1787,79 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1800
1787
|
for (; ; ) {
|
|
1801
1788
|
const at = lt.indexOf(W, it);
|
|
1802
1789
|
if (at === -1) break;
|
|
1803
|
-
const bt =
|
|
1790
|
+
const bt = O.posAtDOM(Q, at), St = O.posAtDOM(Q, at + W.length);
|
|
1804
1791
|
typeof bt == "number" && typeof St == "number" && l.value.push({ from: bt, to: St }), it = at + W.length;
|
|
1805
1792
|
}
|
|
1806
1793
|
}
|
|
1807
1794
|
Ct(() => {
|
|
1808
|
-
l.value.length &&
|
|
1795
|
+
l.value.length && u(0);
|
|
1809
1796
|
});
|
|
1810
1797
|
}
|
|
1811
|
-
function
|
|
1798
|
+
function u(O) {
|
|
1812
1799
|
const W = n.editor, Y = s();
|
|
1813
1800
|
if (!W || !Y || !l.value.length) return;
|
|
1814
1801
|
const Z = l.value.length;
|
|
1815
|
-
C.value = (
|
|
1802
|
+
C.value = (O % Z + Z) % Z;
|
|
1816
1803
|
const tt = l.value[C.value];
|
|
1817
1804
|
W.chain().focus().setTextSelection({ from: tt.from, to: tt.to }).run();
|
|
1818
1805
|
}
|
|
1819
|
-
const m = () => l.value.length &&
|
|
1806
|
+
const m = () => l.value.length && u(C.value + 1), f = () => l.value.length && u(C.value - 1);
|
|
1820
1807
|
function S() {
|
|
1821
|
-
const
|
|
1822
|
-
if (!
|
|
1823
|
-
const W = l.value[C.value], Y =
|
|
1824
|
-
|
|
1808
|
+
const O = n.editor;
|
|
1809
|
+
if (!O || !l.value.length) return;
|
|
1810
|
+
const W = l.value[C.value], Y = O.state.tr.insertText(D.value, W.from, W.to);
|
|
1811
|
+
O.view.dispatch(Y), p();
|
|
1825
1812
|
}
|
|
1826
1813
|
function I() {
|
|
1827
|
-
const
|
|
1828
|
-
if (!
|
|
1829
|
-
const W = [...l.value], Y =
|
|
1814
|
+
const O = n.editor;
|
|
1815
|
+
if (!O || !l.value.length) return;
|
|
1816
|
+
const W = [...l.value], Y = O.state.tr;
|
|
1830
1817
|
for (let Z = W.length - 1; Z >= 0; Z--) {
|
|
1831
1818
|
const tt = W[Z];
|
|
1832
1819
|
Y.insertText(D.value, tt.from, tt.to);
|
|
1833
1820
|
}
|
|
1834
|
-
|
|
1821
|
+
O.view.dispatch(Y), p();
|
|
1835
1822
|
}
|
|
1836
|
-
function w(
|
|
1837
|
-
i.value =
|
|
1823
|
+
function w(O) {
|
|
1824
|
+
i.value = O.target.value, p();
|
|
1838
1825
|
}
|
|
1839
|
-
function g(
|
|
1840
|
-
|
|
1826
|
+
function g(O) {
|
|
1827
|
+
O.key === "Enter" && m(), O.key === "Escape" && y();
|
|
1841
1828
|
}
|
|
1842
1829
|
const k = F(null);
|
|
1843
|
-
let
|
|
1830
|
+
let j = null;
|
|
1844
1831
|
vt(() => {
|
|
1845
|
-
|
|
1832
|
+
j = (O) => {
|
|
1846
1833
|
if (!o.value) return;
|
|
1847
|
-
const W = k.value, Y =
|
|
1834
|
+
const W = k.value, Y = O.target;
|
|
1848
1835
|
W && Y && !W.contains(Y) && y();
|
|
1849
|
-
}, document.addEventListener("mousedown",
|
|
1850
|
-
}),
|
|
1851
|
-
|
|
1836
|
+
}, document.addEventListener("mousedown", j, !0);
|
|
1837
|
+
}), ht(() => {
|
|
1838
|
+
j && (document.removeEventListener("mousedown", j, !0), j = null);
|
|
1852
1839
|
});
|
|
1853
|
-
function P(
|
|
1854
|
-
|
|
1840
|
+
function P(O) {
|
|
1841
|
+
O && (r.value = O), o.value = !0, Ct(p);
|
|
1855
1842
|
}
|
|
1856
|
-
return d({ openPanel: P }), (
|
|
1843
|
+
return d({ openPanel: P }), (O, W) => (T(), V("div", {
|
|
1857
1844
|
class: "icon find-icon",
|
|
1858
1845
|
ref_key: "rootRef",
|
|
1859
1846
|
ref: k,
|
|
1860
1847
|
onClick: b
|
|
1861
1848
|
}, [
|
|
1862
|
-
|
|
1849
|
+
v(z(G), {
|
|
1863
1850
|
text: "查找替换",
|
|
1864
|
-
shortcut:
|
|
1851
|
+
shortcut: M.value,
|
|
1865
1852
|
placement: "bottom"
|
|
1866
1853
|
}, {
|
|
1867
1854
|
default: R(() => [
|
|
1868
|
-
|
|
1855
|
+
v(z(Ue), {
|
|
1869
1856
|
theme: "outline",
|
|
1870
1857
|
strokeWidth: 3
|
|
1871
1858
|
})
|
|
1872
1859
|
]),
|
|
1873
1860
|
_: 1
|
|
1874
1861
|
}, 8, ["shortcut"]),
|
|
1875
|
-
|
|
1862
|
+
v(xt, {
|
|
1876
1863
|
name: "find-panel",
|
|
1877
1864
|
appear: ""
|
|
1878
1865
|
}, {
|
|
@@ -1883,51 +1870,51 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1883
1870
|
onClick: W[3] || (W[3] = A(() => {
|
|
1884
1871
|
}, ["stop"]))
|
|
1885
1872
|
}, [
|
|
1886
|
-
|
|
1887
|
-
|
|
1873
|
+
c("div", dn, [
|
|
1874
|
+
c("button", {
|
|
1888
1875
|
class: J(["fr-tab", { active: r.value === "find" }]),
|
|
1889
1876
|
onClick: W[0] || (W[0] = A((Y) => r.value = "find", ["stop"]))
|
|
1890
1877
|
}, " 查找 ", 2),
|
|
1891
|
-
|
|
1878
|
+
c("button", {
|
|
1892
1879
|
class: J(["fr-tab", { active: r.value === "replace" }]),
|
|
1893
1880
|
onClick: W[1] || (W[1] = A((Y) => r.value = "replace", ["stop"]))
|
|
1894
1881
|
}, " 替换 ", 2)
|
|
1895
1882
|
]),
|
|
1896
1883
|
r.value === "find" ? (T(), V("div", un, [
|
|
1897
|
-
W[4] || (W[4] =
|
|
1898
|
-
|
|
1899
|
-
|
|
1884
|
+
W[4] || (W[4] = c("label", { class: "fr-label" }, "查找", -1)),
|
|
1885
|
+
c("div", vn, [
|
|
1886
|
+
c("input", {
|
|
1900
1887
|
class: "fr-input",
|
|
1901
1888
|
value: i.value,
|
|
1902
1889
|
placeholder: "输入关键字",
|
|
1903
1890
|
onInput: w,
|
|
1904
1891
|
onKeydown: g
|
|
1905
|
-
}, null, 40,
|
|
1906
|
-
i.value ? (T(), V("span",
|
|
1892
|
+
}, null, 40, pn),
|
|
1893
|
+
i.value ? (T(), V("span", fn, ft($.value), 1)) : K("", !0)
|
|
1907
1894
|
]),
|
|
1908
|
-
|
|
1909
|
-
|
|
1895
|
+
c("div", hn, [
|
|
1896
|
+
c("button", {
|
|
1910
1897
|
class: "fr-btn",
|
|
1911
|
-
onClick: A(
|
|
1898
|
+
onClick: A(f, ["stop"])
|
|
1912
1899
|
}, "上一个"),
|
|
1913
|
-
|
|
1900
|
+
c("button", {
|
|
1914
1901
|
class: "fr-btn primary",
|
|
1915
1902
|
onClick: A(m, ["stop"])
|
|
1916
1903
|
}, "下一个")
|
|
1917
1904
|
])
|
|
1918
1905
|
])) : (T(), V("div", gn, [
|
|
1919
|
-
W[5] || (W[5] =
|
|
1920
|
-
|
|
1921
|
-
|
|
1906
|
+
W[5] || (W[5] = c("label", { class: "fr-label" }, "查找", -1)),
|
|
1907
|
+
c("div", mn, [
|
|
1908
|
+
c("input", {
|
|
1922
1909
|
class: "fr-input",
|
|
1923
1910
|
value: i.value,
|
|
1924
1911
|
placeholder: "输入关键字",
|
|
1925
1912
|
onInput: w
|
|
1926
1913
|
}, null, 40, kn),
|
|
1927
|
-
i.value ? (T(), V("span", wn,
|
|
1914
|
+
i.value ? (T(), V("span", wn, ft($.value), 1)) : K("", !0)
|
|
1928
1915
|
]),
|
|
1929
|
-
W[6] || (W[6] =
|
|
1930
|
-
Lt(
|
|
1916
|
+
W[6] || (W[6] = c("label", { class: "fr-label" }, "替换为", -1)),
|
|
1917
|
+
Lt(c("input", {
|
|
1931
1918
|
class: "fr-input",
|
|
1932
1919
|
style: { width: "95%" },
|
|
1933
1920
|
"onUpdate:modelValue": W[2] || (W[2] = (Y) => D.value = Y),
|
|
@@ -1935,20 +1922,20 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1935
1922
|
}, null, 512), [
|
|
1936
1923
|
[Mt, D.value]
|
|
1937
1924
|
]),
|
|
1938
|
-
|
|
1939
|
-
|
|
1925
|
+
c("div", bn, [
|
|
1926
|
+
c("button", {
|
|
1940
1927
|
class: "fr-btn",
|
|
1941
1928
|
onClick: A(I, ["stop"])
|
|
1942
1929
|
}, "全部替换"),
|
|
1943
|
-
|
|
1930
|
+
c("button", {
|
|
1944
1931
|
class: "fr-btn",
|
|
1945
1932
|
onClick: A(S, ["stop"])
|
|
1946
1933
|
}, "替换"),
|
|
1947
|
-
|
|
1934
|
+
c("button", {
|
|
1948
1935
|
class: "fr-btn",
|
|
1949
|
-
onClick: A(
|
|
1936
|
+
onClick: A(f, ["stop"])
|
|
1950
1937
|
}, "上一个"),
|
|
1951
|
-
|
|
1938
|
+
c("button", {
|
|
1952
1939
|
class: "fr-btn primary",
|
|
1953
1940
|
onClick: A(m, ["stop"])
|
|
1954
1941
|
}, "下一个")
|
|
@@ -1973,16 +1960,16 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1973
1960
|
const s = d.editor;
|
|
1974
1961
|
if (!n.value && s)
|
|
1975
1962
|
try {
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1963
|
+
const p = s.state.selection, u = p.from;
|
|
1964
|
+
p.to > u ? C() : (o.value = "链接", s.chain().focus().insertContent("链接").setTextSelection({ from: u, to: u + 2 }).run());
|
|
1978
1965
|
} catch {
|
|
1979
1966
|
}
|
|
1980
1967
|
n.value = !n.value, n.value && l();
|
|
1981
1968
|
}
|
|
1982
1969
|
function l() {
|
|
1983
1970
|
setTimeout(() => {
|
|
1984
|
-
var
|
|
1985
|
-
const s = (
|
|
1971
|
+
var p;
|
|
1972
|
+
const s = (p = i.value) == null ? void 0 : p.querySelector('input[name="link-text"]');
|
|
1986
1973
|
s == null || s.focus(), s == null || s.select();
|
|
1987
1974
|
}, 0);
|
|
1988
1975
|
}
|
|
@@ -1990,7 +1977,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
1990
1977
|
const s = d.editor;
|
|
1991
1978
|
if (s)
|
|
1992
1979
|
try {
|
|
1993
|
-
const
|
|
1980
|
+
const p = s.state.selection, u = p.from, m = p.to, S = m > u ? s.state.doc.textBetween(u, m) : "";
|
|
1994
1981
|
o.value = S || "";
|
|
1995
1982
|
const I = s.getAttributes("link") || {};
|
|
1996
1983
|
r.value = typeof I.href == "string" ? I.href : "";
|
|
@@ -2000,18 +1987,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2000
1987
|
function $() {
|
|
2001
1988
|
const s = d.editor;
|
|
2002
1989
|
if (!s) return;
|
|
2003
|
-
const
|
|
2004
|
-
if (
|
|
1990
|
+
const p = o.value.trim(), u = r.value.trim();
|
|
1991
|
+
if (u)
|
|
2005
1992
|
try {
|
|
2006
|
-
const m = s.state.selection,
|
|
2007
|
-
if (S >
|
|
2008
|
-
const w = h(
|
|
1993
|
+
const m = s.state.selection, f = m.from, S = m.to;
|
|
1994
|
+
if (S > f) {
|
|
1995
|
+
const w = h(p || s.state.doc.textBetween(f, S)), g = h(u);
|
|
2009
1996
|
s.chain().focus().insertContent(
|
|
2010
1997
|
`<a href="${g}" target="_blank" rel="noopener noreferrer">${w}</a>`,
|
|
2011
|
-
{ from:
|
|
1998
|
+
{ from: f, to: S }
|
|
2012
1999
|
).run();
|
|
2013
2000
|
} else {
|
|
2014
|
-
const w = h(
|
|
2001
|
+
const w = h(u), g = h(p || u);
|
|
2015
2002
|
s.chain().focus().insertContent(
|
|
2016
2003
|
`<a href="${w}" target="_blank" rel="noopener noreferrer">${g}</a>`
|
|
2017
2004
|
).run();
|
|
@@ -2023,38 +2010,38 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2023
2010
|
function h(s) {
|
|
2024
2011
|
return String(s).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2025
2012
|
}
|
|
2026
|
-
function
|
|
2013
|
+
function M(s) {
|
|
2027
2014
|
s.key === "Enter" && $(), s.key === "Escape" && (n.value = !1);
|
|
2028
2015
|
}
|
|
2029
2016
|
let b = null;
|
|
2030
2017
|
vt(() => {
|
|
2031
2018
|
b = (s) => {
|
|
2032
2019
|
if (!n.value) return;
|
|
2033
|
-
const
|
|
2034
|
-
|
|
2020
|
+
const p = i.value, u = s.target;
|
|
2021
|
+
p && u && !p.contains(u) && (n.value = !1);
|
|
2035
2022
|
}, document.addEventListener("mousedown", b, !0);
|
|
2036
|
-
}),
|
|
2023
|
+
}), ht(() => {
|
|
2037
2024
|
b && (document.removeEventListener("mousedown", b, !0), b = null);
|
|
2038
2025
|
});
|
|
2039
2026
|
const y = F({});
|
|
2040
2027
|
return wt(n, async (s) => {
|
|
2041
|
-
var
|
|
2028
|
+
var u;
|
|
2042
2029
|
if (!s) return;
|
|
2043
|
-
const
|
|
2044
|
-
if (
|
|
2030
|
+
const p = d.editor;
|
|
2031
|
+
if (p) {
|
|
2045
2032
|
await Ct();
|
|
2046
2033
|
try {
|
|
2047
|
-
const m =
|
|
2048
|
-
if (!(S >
|
|
2034
|
+
const m = p.state.selection, f = m.from, S = m.to;
|
|
2035
|
+
if (!(S > f)) {
|
|
2049
2036
|
y.value = {};
|
|
2050
2037
|
return;
|
|
2051
2038
|
}
|
|
2052
|
-
const w =
|
|
2053
|
-
Z +
|
|
2054
|
-
Math.min(W - Z -
|
|
2055
|
-
), Q =
|
|
2039
|
+
const w = p.view.coordsAtPos(f), g = p.view.coordsAtPos(S), k = (w.left + g.right) / 2, j = Math.max(w.bottom, g.bottom) + 8, P = (u = i.value) == null ? void 0 : u.querySelector(".link-input-panel"), O = P ? P.getBoundingClientRect() : { width: 320, height: 120 }, W = window.innerWidth, Y = window.innerHeight, Z = 12, tt = Math.max(
|
|
2040
|
+
Z + O.width / 2,
|
|
2041
|
+
Math.min(W - Z - O.width / 2, k)
|
|
2042
|
+
), Q = j, lt = Math.min(w.top, g.top) - O.height - 8;
|
|
2056
2043
|
let it = Q;
|
|
2057
|
-
Q +
|
|
2044
|
+
Q + O.height + Z > Y && lt - Z >= 0 && (it = lt), it = Math.max(Z, Math.min(Y - Z - O.height, it)), y.value = {
|
|
2058
2045
|
position: "fixed",
|
|
2059
2046
|
left: Math.round(tt) + "px",
|
|
2060
2047
|
top: Math.round(it) + "px"
|
|
@@ -2062,25 +2049,25 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2062
2049
|
} catch {
|
|
2063
2050
|
}
|
|
2064
2051
|
}
|
|
2065
|
-
}), (s,
|
|
2052
|
+
}), (s, p) => (T(), V("div", {
|
|
2066
2053
|
class: "icon link-icon",
|
|
2067
2054
|
onClick: D,
|
|
2068
2055
|
ref_key: "rootRef",
|
|
2069
2056
|
ref: i
|
|
2070
2057
|
}, [
|
|
2071
|
-
|
|
2058
|
+
v(z(G), {
|
|
2072
2059
|
text: "链接",
|
|
2073
2060
|
placement: "bottom"
|
|
2074
2061
|
}, {
|
|
2075
2062
|
default: R(() => [
|
|
2076
|
-
|
|
2063
|
+
v(et, {
|
|
2077
2064
|
name: "link",
|
|
2078
2065
|
size: 16
|
|
2079
2066
|
})
|
|
2080
2067
|
]),
|
|
2081
2068
|
_: 1
|
|
2082
2069
|
}),
|
|
2083
|
-
|
|
2070
|
+
v(xt, {
|
|
2084
2071
|
name: "link-panel",
|
|
2085
2072
|
appear: ""
|
|
2086
2073
|
}, {
|
|
@@ -2089,36 +2076,36 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2089
2076
|
key: 0,
|
|
2090
2077
|
class: "link-input-panel",
|
|
2091
2078
|
style: dt(y.value),
|
|
2092
|
-
onClick:
|
|
2079
|
+
onClick: p[2] || (p[2] = A(() => {
|
|
2093
2080
|
}, ["stop"]))
|
|
2094
2081
|
}, [
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
Lt(
|
|
2082
|
+
c("div", xn, [
|
|
2083
|
+
p[3] || (p[3] = c("div", { class: "label" }, "文本", -1)),
|
|
2084
|
+
Lt(c("input", {
|
|
2098
2085
|
name: "link-text",
|
|
2099
2086
|
class: "input",
|
|
2100
2087
|
type: "text",
|
|
2101
|
-
"onUpdate:modelValue":
|
|
2102
|
-
onKeydown:
|
|
2088
|
+
"onUpdate:modelValue": p[0] || (p[0] = (u) => o.value = u),
|
|
2089
|
+
onKeydown: M
|
|
2103
2090
|
}, null, 544), [
|
|
2104
2091
|
[Mt, o.value]
|
|
2105
2092
|
])
|
|
2106
2093
|
]),
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
Lt(
|
|
2094
|
+
c("div", _n, [
|
|
2095
|
+
p[4] || (p[4] = c("div", { class: "label" }, "链接", -1)),
|
|
2096
|
+
Lt(c("input", {
|
|
2110
2097
|
name: "link-href",
|
|
2111
2098
|
class: "input",
|
|
2112
2099
|
type: "text",
|
|
2113
|
-
"onUpdate:modelValue":
|
|
2100
|
+
"onUpdate:modelValue": p[1] || (p[1] = (u) => r.value = u),
|
|
2114
2101
|
placeholder: "链接地址",
|
|
2115
|
-
onKeydown:
|
|
2102
|
+
onKeydown: M
|
|
2116
2103
|
}, null, 544), [
|
|
2117
2104
|
[Mt, r.value]
|
|
2118
2105
|
])
|
|
2119
2106
|
]),
|
|
2120
|
-
|
|
2121
|
-
|
|
2107
|
+
c("div", Ln, [
|
|
2108
|
+
c("button", {
|
|
2122
2109
|
class: "btn btn-primary",
|
|
2123
2110
|
onClick: A($, ["stop"])
|
|
2124
2111
|
}, "确 定")
|
|
@@ -2143,20 +2130,20 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2143
2130
|
}, l = ($, h) => {
|
|
2144
2131
|
o.value = $, r.value = h;
|
|
2145
2132
|
}, C = () => {
|
|
2146
|
-
var
|
|
2133
|
+
var M, b, y, s, p, u, m, f;
|
|
2147
2134
|
const $ = Math.max(o.value, 1), h = Math.max(r.value, 1);
|
|
2148
|
-
(
|
|
2135
|
+
(f = (u = (s = (b = (M = d.editor) == null ? void 0 : M.chain) == null ? void 0 : (y = b.call(M)).focus) == null ? void 0 : (p = s.call(y)).insertTable) == null ? void 0 : (m = u.call(p, { rows: $, cols: h, withHeaderRow: !0 })).run) == null || f.call(m), n.value = !1, o.value = 0, r.value = 0;
|
|
2149
2136
|
};
|
|
2150
2137
|
return ($, h) => (T(), V("div", {
|
|
2151
2138
|
class: "icon table-icon",
|
|
2152
2139
|
onClick: D
|
|
2153
2140
|
}, [
|
|
2154
|
-
|
|
2141
|
+
v(z(G), {
|
|
2155
2142
|
text: "表格",
|
|
2156
2143
|
placement: "bottom"
|
|
2157
2144
|
}, {
|
|
2158
2145
|
default: R(() => [
|
|
2159
|
-
|
|
2146
|
+
v(et, {
|
|
2160
2147
|
name: "table",
|
|
2161
2148
|
size: 16
|
|
2162
2149
|
})
|
|
@@ -2169,38 +2156,38 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2169
2156
|
onClick: h[0] || (h[0] = A(() => {
|
|
2170
2157
|
}, ["stop"]))
|
|
2171
2158
|
}, [
|
|
2172
|
-
h[1] || (h[1] =
|
|
2173
|
-
|
|
2174
|
-
(T(), V(mt, null, kt(Dn, (
|
|
2175
|
-
key: "r-" +
|
|
2159
|
+
h[1] || (h[1] = c("div", { class: "panel-title" }, "表格", -1)),
|
|
2160
|
+
c("div", $n, [
|
|
2161
|
+
(T(), V(mt, null, kt(Dn, (M) => c("div", {
|
|
2162
|
+
key: "r-" + M,
|
|
2176
2163
|
class: "row"
|
|
2177
2164
|
}, [
|
|
2178
|
-
(T(), V(mt, null, kt(Tn, (b) =>
|
|
2179
|
-
key: "c-" +
|
|
2180
|
-
class: J(["cell", { active:
|
|
2181
|
-
onMouseenter: (y) => l(
|
|
2165
|
+
(T(), V(mt, null, kt(Tn, (b) => c("span", {
|
|
2166
|
+
key: "c-" + M + "-" + b,
|
|
2167
|
+
class: J(["cell", { active: M <= o.value && b <= r.value }]),
|
|
2168
|
+
onMouseenter: (y) => l(M, b),
|
|
2182
2169
|
onClick: A(C, ["stop"])
|
|
2183
2170
|
}, null, 42, Sn)), 64))
|
|
2184
2171
|
])), 64))
|
|
2185
2172
|
]),
|
|
2186
|
-
|
|
2173
|
+
c("div", En, ft(i.value), 1)
|
|
2187
2174
|
])) : K("", !0)
|
|
2188
2175
|
]));
|
|
2189
2176
|
}
|
|
2190
|
-
}), An = /* @__PURE__ */ st(Fn, [["__scopeId", "data-v-8a3a35f7"]]), Bn = ["aria-disabled"], Hn = { class: "tools-grid" }, Vn = ["disabled"], Un = ["disabled"], In = ["disabled"],
|
|
2177
|
+
}), An = /* @__PURE__ */ st(Fn, [["__scopeId", "data-v-8a3a35f7"]]), Bn = ["aria-disabled"], Hn = { class: "tools-grid" }, Vn = ["disabled"], Un = ["disabled"], In = ["disabled"], On = ["disabled"], jn = ["disabled"], Wn = ["disabled"], Rn = ["disabled"], Nn = ["disabled"], Pn = ["disabled"], Gn = ["disabled"], Yn = ["disabled"], Kn = ["disabled"], qn = ["disabled"], Jn = ["disabled"], Zn = ["disabled"], Xn = ["disabled"], Qn = ["disabled"], ts = /* @__PURE__ */ nt({
|
|
2191
2178
|
__name: "index",
|
|
2192
2179
|
props: {
|
|
2193
2180
|
editor: {}
|
|
2194
2181
|
},
|
|
2195
2182
|
setup(t) {
|
|
2196
2183
|
const d = t, n = F(!1), o = () => n.value = !n.value, r = (D, ...l) => {
|
|
2197
|
-
var $, h,
|
|
2184
|
+
var $, h, M;
|
|
2198
2185
|
const C = d.editor;
|
|
2199
|
-
return !!((
|
|
2186
|
+
return !!((M = ($ = C == null ? void 0 : C.can) == null ? void 0 : (h = $.call(C))[D]) != null && M.call(h, ...l));
|
|
2200
2187
|
}, i = (D, ...l) => {
|
|
2201
|
-
var $, h,
|
|
2188
|
+
var $, h, M, b, y, s, p;
|
|
2202
2189
|
const C = d.editor;
|
|
2203
|
-
(
|
|
2190
|
+
(p = (s = (y = (b = (M = ($ = C == null ? void 0 : C.chain) == null ? void 0 : (h = $.call(C)).focus) == null ? void 0 : M.call(h))[D]) == null ? void 0 : y.call(b, ...l)) == null ? void 0 : s.run) == null || p.call(s), n.value = !1;
|
|
2204
2191
|
};
|
|
2205
2192
|
return (D, l) => {
|
|
2206
2193
|
var C, $;
|
|
@@ -2209,12 +2196,12 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2209
2196
|
onClick: o,
|
|
2210
2197
|
"aria-disabled": !(($ = (C = d.editor) == null ? void 0 : C.isActive) != null && $.call(C, "table"))
|
|
2211
2198
|
}, [
|
|
2212
|
-
|
|
2199
|
+
v(z(G), {
|
|
2213
2200
|
text: "表格工具",
|
|
2214
2201
|
placement: "bottom"
|
|
2215
2202
|
}, {
|
|
2216
2203
|
default: R(() => [
|
|
2217
|
-
|
|
2204
|
+
v(et, {
|
|
2218
2205
|
name: "tableTools",
|
|
2219
2206
|
size: 15
|
|
2220
2207
|
})
|
|
@@ -2227,88 +2214,88 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2227
2214
|
onClick: l[17] || (l[17] = A(() => {
|
|
2228
2215
|
}, ["stop"]))
|
|
2229
2216
|
}, [
|
|
2230
|
-
|
|
2231
|
-
|
|
2217
|
+
c("div", Hn, [
|
|
2218
|
+
c("button", {
|
|
2232
2219
|
class: "btn",
|
|
2233
2220
|
onClick: l[0] || (l[0] = A((h) => i("addColumnBefore"), ["stop"])),
|
|
2234
2221
|
disabled: !r("addColumnBefore")
|
|
2235
2222
|
}, " 前插列 ", 8, Vn),
|
|
2236
|
-
|
|
2223
|
+
c("button", {
|
|
2237
2224
|
class: "btn",
|
|
2238
2225
|
onClick: l[1] || (l[1] = A((h) => i("addColumnAfter"), ["stop"])),
|
|
2239
2226
|
disabled: !r("addColumnAfter")
|
|
2240
2227
|
}, " 后插列 ", 8, Un),
|
|
2241
|
-
|
|
2228
|
+
c("button", {
|
|
2242
2229
|
class: "btn",
|
|
2243
2230
|
onClick: l[2] || (l[2] = A((h) => i("deleteColumn"), ["stop"])),
|
|
2244
2231
|
disabled: !r("deleteColumn")
|
|
2245
2232
|
}, " 删除列 ", 8, In),
|
|
2246
|
-
|
|
2233
|
+
c("button", {
|
|
2247
2234
|
class: "btn",
|
|
2248
2235
|
onClick: l[3] || (l[3] = A((h) => i("addRowBefore"), ["stop"])),
|
|
2249
2236
|
disabled: !r("addRowBefore")
|
|
2250
|
-
}, " 前插行 ", 8,
|
|
2251
|
-
|
|
2237
|
+
}, " 前插行 ", 8, On),
|
|
2238
|
+
c("button", {
|
|
2252
2239
|
class: "btn",
|
|
2253
2240
|
onClick: l[4] || (l[4] = A((h) => i("addRowAfter"), ["stop"])),
|
|
2254
2241
|
disabled: !r("addRowAfter")
|
|
2255
|
-
}, " 后插行 ", 8,
|
|
2256
|
-
|
|
2242
|
+
}, " 后插行 ", 8, jn),
|
|
2243
|
+
c("button", {
|
|
2257
2244
|
class: "btn",
|
|
2258
2245
|
onClick: l[5] || (l[5] = A((h) => i("deleteRow"), ["stop"])),
|
|
2259
2246
|
disabled: !r("deleteRow")
|
|
2260
2247
|
}, " 删除行 ", 8, Wn),
|
|
2261
|
-
|
|
2248
|
+
c("button", {
|
|
2262
2249
|
class: "btn",
|
|
2263
2250
|
onClick: l[6] || (l[6] = A((h) => i("deleteTable"), ["stop"])),
|
|
2264
2251
|
disabled: !r("deleteTable")
|
|
2265
2252
|
}, " 删除表 ", 8, Rn),
|
|
2266
|
-
|
|
2253
|
+
c("button", {
|
|
2267
2254
|
class: "btn",
|
|
2268
2255
|
onClick: l[7] || (l[7] = A((h) => i("mergeCells"), ["stop"])),
|
|
2269
2256
|
disabled: !r("mergeCells")
|
|
2270
2257
|
}, " 合并单元格 ", 8, Nn),
|
|
2271
|
-
|
|
2258
|
+
c("button", {
|
|
2272
2259
|
class: "btn",
|
|
2273
2260
|
onClick: l[8] || (l[8] = A((h) => i("splitCell"), ["stop"])),
|
|
2274
2261
|
disabled: !r("splitCell")
|
|
2275
2262
|
}, " 拆分单元格 ", 8, Pn),
|
|
2276
|
-
|
|
2263
|
+
c("button", {
|
|
2277
2264
|
class: "btn",
|
|
2278
2265
|
onClick: l[9] || (l[9] = A((h) => i("mergeOrSplit"), ["stop"])),
|
|
2279
2266
|
disabled: !r("mergeOrSplit")
|
|
2280
2267
|
}, " 合并/拆分 ", 8, Gn),
|
|
2281
|
-
|
|
2268
|
+
c("button", {
|
|
2282
2269
|
class: "btn",
|
|
2283
2270
|
onClick: l[10] || (l[10] = A((h) => i("toggleHeaderRow"), ["stop"])),
|
|
2284
2271
|
disabled: !r("toggleHeaderRow")
|
|
2285
2272
|
}, " 切换表头行 ", 8, Yn),
|
|
2286
|
-
|
|
2273
|
+
c("button", {
|
|
2287
2274
|
class: "btn",
|
|
2288
2275
|
onClick: l[11] || (l[11] = A((h) => i("toggleHeaderColumn"), ["stop"])),
|
|
2289
2276
|
disabled: !r("toggleHeaderColumn")
|
|
2290
2277
|
}, " 切换表头列 ", 8, Kn),
|
|
2291
|
-
|
|
2278
|
+
c("button", {
|
|
2292
2279
|
class: "btn",
|
|
2293
2280
|
onClick: l[12] || (l[12] = A((h) => i("toggleHeaderCell"), ["stop"])),
|
|
2294
2281
|
disabled: !r("toggleHeaderCell")
|
|
2295
2282
|
}, " 切换表头单元 ", 8, qn),
|
|
2296
|
-
|
|
2283
|
+
c("button", {
|
|
2297
2284
|
class: "btn",
|
|
2298
2285
|
onClick: l[13] || (l[13] = A((h) => i("fixTables"), ["stop"])),
|
|
2299
2286
|
disabled: !r("fixTables")
|
|
2300
2287
|
}, " 修复表格 ", 8, Jn),
|
|
2301
|
-
|
|
2288
|
+
c("button", {
|
|
2302
2289
|
class: "btn",
|
|
2303
2290
|
onClick: l[14] || (l[14] = A((h) => i("goToNextCell"), ["stop"])),
|
|
2304
2291
|
disabled: !r("goToNextCell")
|
|
2305
2292
|
}, " 下个单元格 ", 8, Zn),
|
|
2306
|
-
|
|
2293
|
+
c("button", {
|
|
2307
2294
|
class: "btn",
|
|
2308
2295
|
onClick: l[15] || (l[15] = A((h) => i("goToPreviousCell"), ["stop"])),
|
|
2309
2296
|
disabled: !r("goToPreviousCell")
|
|
2310
2297
|
}, " 上个单元格 ", 8, Xn),
|
|
2311
|
-
|
|
2298
|
+
c("button", {
|
|
2312
2299
|
class: "btn",
|
|
2313
2300
|
onClick: l[16] || (l[16] = A((h) => i("setCellAttribute", "backgroundColor", "#FAF594"), ["stop"])),
|
|
2314
2301
|
disabled: !r("setCellAttribute", "backgroundColor", "#FAF594")
|
|
@@ -2336,8 +2323,8 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2336
2323
|
Math.max(0, l.from - 5),
|
|
2337
2324
|
Math.min(D.doc.content.size, l.to + 5),
|
|
2338
2325
|
($, h) => {
|
|
2339
|
-
var
|
|
2340
|
-
return ((
|
|
2326
|
+
var M;
|
|
2327
|
+
return ((M = $ == null ? void 0 : $.type) == null ? void 0 : M.name) === "taskItem" && C == null ? (C = h, !1) : !0;
|
|
2341
2328
|
}
|
|
2342
2329
|
), C != null && i.commands.setTextSelection(C + 1);
|
|
2343
2330
|
} catch {
|
|
@@ -2348,13 +2335,13 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2348
2335
|
class: "icon",
|
|
2349
2336
|
onClick: r
|
|
2350
2337
|
}, [
|
|
2351
|
-
|
|
2338
|
+
v(z(G), {
|
|
2352
2339
|
text: "任务列表",
|
|
2353
|
-
shortcut:
|
|
2340
|
+
shortcut: z(o),
|
|
2354
2341
|
placement: "bottom"
|
|
2355
2342
|
}, {
|
|
2356
2343
|
default: R(() => [
|
|
2357
|
-
|
|
2344
|
+
v(et, {
|
|
2358
2345
|
name: "task",
|
|
2359
2346
|
size: 17
|
|
2360
2347
|
})
|
|
@@ -2378,12 +2365,12 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2378
2365
|
class: "icon",
|
|
2379
2366
|
onClick: n
|
|
2380
2367
|
}, [
|
|
2381
|
-
|
|
2368
|
+
v(z(G), {
|
|
2382
2369
|
text: "引用",
|
|
2383
2370
|
placement: "bottom"
|
|
2384
2371
|
}, {
|
|
2385
2372
|
default: R(() => [
|
|
2386
|
-
|
|
2373
|
+
v(et, {
|
|
2387
2374
|
name: "quote",
|
|
2388
2375
|
size: 18
|
|
2389
2376
|
})
|
|
@@ -2419,12 +2406,12 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2419
2406
|
{ label: "标题5", level: 5, shortcut: o[5] },
|
|
2420
2407
|
{ label: "标题6", level: 6, shortcut: o[6] }
|
|
2421
2408
|
], i = ut(() => {
|
|
2422
|
-
var
|
|
2409
|
+
var p, u;
|
|
2423
2410
|
const s = d.editor;
|
|
2424
2411
|
if (!s) return null;
|
|
2425
2412
|
for (let m = 1; m <= 6; m++)
|
|
2426
|
-
if ((
|
|
2427
|
-
return (
|
|
2413
|
+
if ((p = s.isActive) != null && p.call(s, "heading", { level: m })) return m;
|
|
2414
|
+
return (u = s.isActive) != null && u.call(s, "paragraph"), null;
|
|
2428
2415
|
}), D = ut(() => {
|
|
2429
2416
|
const s = i.value;
|
|
2430
2417
|
return s ? `标题${s}` : "正文";
|
|
@@ -2435,40 +2422,40 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2435
2422
|
function h() {
|
|
2436
2423
|
l.value = !1;
|
|
2437
2424
|
}
|
|
2438
|
-
function
|
|
2439
|
-
var
|
|
2440
|
-
const
|
|
2441
|
-
|
|
2425
|
+
function M(s) {
|
|
2426
|
+
var u, m, f, S, I, w, g, k, j, P;
|
|
2427
|
+
const p = (S = (m = (u = d.editor) == null ? void 0 : u.chain) == null ? void 0 : (f = m.call(u)).focus) == null ? void 0 : S.call(f);
|
|
2428
|
+
p && (s.level === null ? (g = (I = p.setParagraph) == null ? void 0 : (w = I.call(p)).run) == null || g.call(w) : (P = (j = (k = p.toggleHeading) == null ? void 0 : k.call(p, { level: s.level })) == null ? void 0 : j.run) == null || P.call(j), h());
|
|
2442
2429
|
}
|
|
2443
2430
|
function b(s) {
|
|
2444
|
-
const
|
|
2445
|
-
|
|
2431
|
+
const p = s.target, u = C.value;
|
|
2432
|
+
u && !u.contains(p) && h();
|
|
2446
2433
|
}
|
|
2447
2434
|
function y(s) {
|
|
2448
|
-
var
|
|
2449
|
-
((
|
|
2435
|
+
var u;
|
|
2436
|
+
((u = s.detail) == null ? void 0 : u.id) !== Zt && (l.value = !1);
|
|
2450
2437
|
}
|
|
2451
2438
|
return vt(() => {
|
|
2452
2439
|
document.addEventListener("click", b), window.addEventListener(Pt, y);
|
|
2453
|
-
}),
|
|
2440
|
+
}), ht(() => {
|
|
2454
2441
|
document.removeEventListener("click", b), window.removeEventListener(Pt, y);
|
|
2455
|
-
}), (s,
|
|
2442
|
+
}), (s, p) => (T(), V("div", {
|
|
2456
2443
|
class: "heading-select",
|
|
2457
2444
|
ref_key: "rootRef",
|
|
2458
2445
|
ref: C
|
|
2459
2446
|
}, [
|
|
2460
|
-
|
|
2447
|
+
v(z(G), {
|
|
2461
2448
|
text: "标题级别",
|
|
2462
2449
|
placement: "bottom"
|
|
2463
2450
|
}, {
|
|
2464
2451
|
default: R(() => [
|
|
2465
|
-
|
|
2452
|
+
c("div", {
|
|
2466
2453
|
class: "icon",
|
|
2467
2454
|
onClick: A($, ["stop"]),
|
|
2468
2455
|
"aria-expanded": l.value
|
|
2469
2456
|
}, [
|
|
2470
|
-
|
|
2471
|
-
|
|
2457
|
+
c("div", rs, ft(D.value), 1),
|
|
2458
|
+
v(z(Vt), {
|
|
2472
2459
|
theme: "filled",
|
|
2473
2460
|
strokeWidth: 3
|
|
2474
2461
|
})
|
|
@@ -2476,32 +2463,32 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2476
2463
|
]),
|
|
2477
2464
|
_: 1
|
|
2478
2465
|
}),
|
|
2479
|
-
|
|
2466
|
+
v(xt, { name: "dropdown-slide" }, {
|
|
2480
2467
|
default: R(() => [
|
|
2481
2468
|
l.value ? (T(), V("div", as, [
|
|
2482
|
-
(T(), V(mt, null, kt(r, (
|
|
2483
|
-
key:
|
|
2469
|
+
(T(), V(mt, null, kt(r, (u) => c("div", {
|
|
2470
|
+
key: u.label,
|
|
2484
2471
|
class: "dropdown-item",
|
|
2485
|
-
"aria-selected":
|
|
2486
|
-
onClick: A((m) =>
|
|
2472
|
+
"aria-selected": u.level === i.value,
|
|
2473
|
+
onClick: A((m) => M(u), ["stop"])
|
|
2487
2474
|
}, [
|
|
2488
|
-
|
|
2475
|
+
u.level === i.value ? (T(), _t(z(Bt), {
|
|
2489
2476
|
key: 0,
|
|
2490
2477
|
theme: "filled",
|
|
2491
2478
|
strokeWidth: 3
|
|
2492
2479
|
})) : K("", !0),
|
|
2493
|
-
|
|
2480
|
+
c("span", {
|
|
2494
2481
|
class: J(["item-label", {
|
|
2495
|
-
paragraph:
|
|
2496
|
-
"level-1":
|
|
2497
|
-
"level-2":
|
|
2498
|
-
"level-3":
|
|
2499
|
-
"level-4":
|
|
2500
|
-
"level-5":
|
|
2501
|
-
"level-6":
|
|
2482
|
+
paragraph: u.level === null,
|
|
2483
|
+
"level-1": u.level === 1,
|
|
2484
|
+
"level-2": u.level === 2,
|
|
2485
|
+
"level-3": u.level === 3,
|
|
2486
|
+
"level-4": u.level === 4,
|
|
2487
|
+
"level-5": u.level === 5,
|
|
2488
|
+
"level-6": u.level === 6
|
|
2502
2489
|
}])
|
|
2503
|
-
},
|
|
2504
|
-
|
|
2490
|
+
}, ft(u.label), 3),
|
|
2491
|
+
c("span", ds, ft(u.shortcut), 1)
|
|
2505
2492
|
], 8, cs)), 64))
|
|
2506
2493
|
])) : K("", !0)
|
|
2507
2494
|
]),
|
|
@@ -2509,7 +2496,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2509
2496
|
})
|
|
2510
2497
|
], 512));
|
|
2511
2498
|
}
|
|
2512
|
-
}), vs = /* @__PURE__ */ st(us, [["__scopeId", "data-v-aeb74f7c"]]),
|
|
2499
|
+
}), vs = /* @__PURE__ */ st(us, [["__scopeId", "data-v-aeb74f7c"]]), ps = ["aria-expanded"], fs = {
|
|
2513
2500
|
key: 0,
|
|
2514
2501
|
class: "dropdown",
|
|
2515
2502
|
role: "menu"
|
|
@@ -2520,9 +2507,9 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2520
2507
|
},
|
|
2521
2508
|
setup(t) {
|
|
2522
2509
|
const d = t, n = ut(() => {
|
|
2523
|
-
var
|
|
2510
|
+
var f, S, I, w;
|
|
2524
2511
|
const m = d.editor;
|
|
2525
|
-
return !m || (
|
|
2512
|
+
return !m || (f = m.isActive) != null && f.call(m, { textAlign: "left" }) ? "left" : (S = m.isActive) != null && S.call(m, { textAlign: "center" }) ? "center" : (I = m.isActive) != null && I.call(m, { textAlign: "right" }) ? "right" : (w = m.isActive) != null && w.call(m, { textAlign: "justify" }) ? "justify" : "left";
|
|
2526
2513
|
}), o = ut(() => ({
|
|
2527
2514
|
left: "alignLeft",
|
|
2528
2515
|
center: "alignCenter",
|
|
@@ -2530,10 +2517,10 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2530
2517
|
justify: "alignJustify"
|
|
2531
2518
|
})[n.value]);
|
|
2532
2519
|
function r(m) {
|
|
2533
|
-
var
|
|
2534
|
-
(P = (k = (w = (S = (
|
|
2520
|
+
var f, S, I, w, g, k, j, P;
|
|
2521
|
+
(P = (k = (w = (S = (f = d.editor) == null ? void 0 : f.chain) == null ? void 0 : (I = S.call(f)).focus) == null ? void 0 : (g = w.call(I)).setTextAlign) == null ? void 0 : (j = k.call(g, m)).run) == null || P.call(j);
|
|
2535
2522
|
}
|
|
2536
|
-
const i = F(!1), D = F(null), l = typeof navigator < "u" && navigator.platform.includes("Mac"), C = l ? "⇧ ⌘ L" : "Ctrl Shift L", $ = l ? "⇧ ⌘ E" : "Ctrl Shift E", h = l ? "⇧ ⌘ R" : "Ctrl Shift R",
|
|
2523
|
+
const i = F(!1), D = F(null), l = typeof navigator < "u" && navigator.platform.includes("Mac"), C = l ? "⇧ ⌘ L" : "Ctrl Shift L", $ = l ? "⇧ ⌘ E" : "Ctrl Shift E", h = l ? "⇧ ⌘ R" : "Ctrl Shift R", M = l ? "⇧ ⌘ J" : "Ctrl Shift J";
|
|
2537
2524
|
function b() {
|
|
2538
2525
|
i.value || window.dispatchEvent(new CustomEvent(Gt, { detail: { id: Xt } })), i.value = !i.value;
|
|
2539
2526
|
}
|
|
@@ -2543,61 +2530,61 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2543
2530
|
function s(m) {
|
|
2544
2531
|
r(m), y();
|
|
2545
2532
|
}
|
|
2546
|
-
function
|
|
2547
|
-
const
|
|
2548
|
-
|
|
2533
|
+
function p(m) {
|
|
2534
|
+
const f = D.value, S = m.target;
|
|
2535
|
+
f && !f.contains(S) && y();
|
|
2549
2536
|
}
|
|
2550
|
-
function
|
|
2537
|
+
function u(m) {
|
|
2551
2538
|
var S;
|
|
2552
2539
|
((S = m.detail) == null ? void 0 : S.id) !== Xt && (i.value = !1);
|
|
2553
2540
|
}
|
|
2554
2541
|
return vt(() => {
|
|
2555
|
-
document.addEventListener("click",
|
|
2556
|
-
}),
|
|
2557
|
-
document.removeEventListener("click",
|
|
2558
|
-
}), (m,
|
|
2542
|
+
document.addEventListener("click", p), window.addEventListener(Gt, u);
|
|
2543
|
+
}), ht(() => {
|
|
2544
|
+
document.removeEventListener("click", p), window.removeEventListener(Gt, u);
|
|
2545
|
+
}), (m, f) => (T(), V("div", {
|
|
2559
2546
|
class: "align-select",
|
|
2560
2547
|
ref_key: "rootRef",
|
|
2561
2548
|
ref: D
|
|
2562
2549
|
}, [
|
|
2563
|
-
|
|
2550
|
+
v(z(G), {
|
|
2564
2551
|
text: "对齐方式",
|
|
2565
2552
|
placement: "bottom"
|
|
2566
2553
|
}, {
|
|
2567
2554
|
default: R(() => [
|
|
2568
|
-
|
|
2555
|
+
c("div", {
|
|
2569
2556
|
class: "icon_box",
|
|
2570
2557
|
onClick: A(b, ["stop"]),
|
|
2571
2558
|
"aria-expanded": i.value
|
|
2572
2559
|
}, [
|
|
2573
|
-
|
|
2560
|
+
v(et, {
|
|
2574
2561
|
name: o.value,
|
|
2575
2562
|
size: 18
|
|
2576
2563
|
}, null, 8, ["name"]),
|
|
2577
|
-
|
|
2564
|
+
v(et, {
|
|
2578
2565
|
name: "caretDown",
|
|
2579
2566
|
size: 12
|
|
2580
2567
|
})
|
|
2581
|
-
], 8,
|
|
2568
|
+
], 8, ps)
|
|
2582
2569
|
]),
|
|
2583
2570
|
_: 1
|
|
2584
2571
|
}),
|
|
2585
|
-
|
|
2572
|
+
v(xt, { name: "dropdown-slide" }, {
|
|
2586
2573
|
default: R(() => [
|
|
2587
|
-
i.value ? (T(), V("div",
|
|
2588
|
-
|
|
2589
|
-
|
|
2574
|
+
i.value ? (T(), V("div", fs, [
|
|
2575
|
+
c("div", hs, [
|
|
2576
|
+
c("div", {
|
|
2590
2577
|
class: J(["option", { active: n.value === "left" }]),
|
|
2591
2578
|
role: "menuitem",
|
|
2592
|
-
onClick:
|
|
2579
|
+
onClick: f[0] || (f[0] = A((S) => s("left"), ["stop"]))
|
|
2593
2580
|
}, [
|
|
2594
|
-
|
|
2581
|
+
v(z(G), {
|
|
2595
2582
|
text: "左对齐",
|
|
2596
|
-
shortcut:
|
|
2583
|
+
shortcut: z(C),
|
|
2597
2584
|
placement: "bottom"
|
|
2598
2585
|
}, {
|
|
2599
2586
|
default: R(() => [
|
|
2600
|
-
|
|
2587
|
+
v(et, {
|
|
2601
2588
|
name: "alignLeft",
|
|
2602
2589
|
size: 16
|
|
2603
2590
|
})
|
|
@@ -2605,18 +2592,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2605
2592
|
_: 1
|
|
2606
2593
|
}, 8, ["shortcut"])
|
|
2607
2594
|
], 2),
|
|
2608
|
-
|
|
2595
|
+
c("div", {
|
|
2609
2596
|
class: J(["option", { active: n.value === "center" }]),
|
|
2610
2597
|
role: "menuitem",
|
|
2611
|
-
onClick:
|
|
2598
|
+
onClick: f[1] || (f[1] = A((S) => s("center"), ["stop"]))
|
|
2612
2599
|
}, [
|
|
2613
|
-
|
|
2600
|
+
v(z(G), {
|
|
2614
2601
|
text: "居中对齐",
|
|
2615
|
-
shortcut:
|
|
2602
|
+
shortcut: z($),
|
|
2616
2603
|
placement: "bottom"
|
|
2617
2604
|
}, {
|
|
2618
2605
|
default: R(() => [
|
|
2619
|
-
|
|
2606
|
+
v(et, {
|
|
2620
2607
|
name: "alignCenter",
|
|
2621
2608
|
size: 16
|
|
2622
2609
|
})
|
|
@@ -2624,18 +2611,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2624
2611
|
_: 1
|
|
2625
2612
|
}, 8, ["shortcut"])
|
|
2626
2613
|
], 2),
|
|
2627
|
-
|
|
2614
|
+
c("div", {
|
|
2628
2615
|
class: J(["option", { active: n.value === "right" }]),
|
|
2629
2616
|
role: "menuitem",
|
|
2630
|
-
onClick:
|
|
2617
|
+
onClick: f[2] || (f[2] = A((S) => s("right"), ["stop"]))
|
|
2631
2618
|
}, [
|
|
2632
|
-
|
|
2619
|
+
v(z(G), {
|
|
2633
2620
|
text: "右对齐",
|
|
2634
|
-
shortcut:
|
|
2621
|
+
shortcut: z(h),
|
|
2635
2622
|
placement: "bottom"
|
|
2636
2623
|
}, {
|
|
2637
2624
|
default: R(() => [
|
|
2638
|
-
|
|
2625
|
+
v(et, {
|
|
2639
2626
|
name: "alignRight",
|
|
2640
2627
|
size: 16
|
|
2641
2628
|
})
|
|
@@ -2643,18 +2630,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2643
2630
|
_: 1
|
|
2644
2631
|
}, 8, ["shortcut"])
|
|
2645
2632
|
], 2),
|
|
2646
|
-
|
|
2633
|
+
c("div", {
|
|
2647
2634
|
class: J(["option", { active: n.value === "justify" }]),
|
|
2648
2635
|
role: "menuitem",
|
|
2649
|
-
onClick:
|
|
2636
|
+
onClick: f[3] || (f[3] = A((S) => s("justify"), ["stop"]))
|
|
2650
2637
|
}, [
|
|
2651
|
-
|
|
2638
|
+
v(z(G), {
|
|
2652
2639
|
text: "两端对齐",
|
|
2653
|
-
shortcut: M
|
|
2640
|
+
shortcut: z(M),
|
|
2654
2641
|
placement: "bottom"
|
|
2655
2642
|
}, {
|
|
2656
2643
|
default: R(() => [
|
|
2657
|
-
|
|
2644
|
+
v(et, {
|
|
2658
2645
|
name: "alignJustify",
|
|
2659
2646
|
size: 16
|
|
2660
2647
|
})
|
|
@@ -2683,25 +2670,25 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2683
2670
|
emits: ["openLinkModal", "toggleFullscreen"],
|
|
2684
2671
|
setup(t, { emit: d }) {
|
|
2685
2672
|
const n = t, o = d, r = (L, _) => {
|
|
2686
|
-
var e,
|
|
2687
|
-
return (
|
|
2673
|
+
var e, a;
|
|
2674
|
+
return (a = (e = n.editor) == null ? void 0 : e.isActive) == null ? void 0 : a.call(e, L, _);
|
|
2688
2675
|
}, i = (L, _) => {
|
|
2689
2676
|
var x, U, B, H, E, N;
|
|
2690
2677
|
const e = n.editor;
|
|
2691
2678
|
if (!e) return;
|
|
2692
|
-
const
|
|
2693
|
-
return (N = (E = (H =
|
|
2679
|
+
const a = (B = (x = e.chain) == null ? void 0 : (U = x.call(e)).focus) == null ? void 0 : B.call(U);
|
|
2680
|
+
return (N = (E = (H = a == null ? void 0 : a[L]) == null ? void 0 : H.call(a)) == null ? void 0 : E.run) == null ? void 0 : N.call(E);
|
|
2694
2681
|
}, D = () => {
|
|
2695
|
-
var L, _, e,
|
|
2682
|
+
var L, _, e, a;
|
|
2696
2683
|
try {
|
|
2697
|
-
return !!((
|
|
2684
|
+
return !!((a = (_ = (L = n.editor) == null ? void 0 : L.can) == null ? void 0 : (e = _.call(L)).undo) != null && a.call(e));
|
|
2698
2685
|
} catch {
|
|
2699
2686
|
return !1;
|
|
2700
2687
|
}
|
|
2701
2688
|
}, l = () => {
|
|
2702
|
-
var L, _, e,
|
|
2689
|
+
var L, _, e, a;
|
|
2703
2690
|
try {
|
|
2704
|
-
return !!((
|
|
2691
|
+
return !!((a = (_ = (L = n.editor) == null ? void 0 : L.can) == null ? void 0 : (e = _.call(L)).redo) != null && a.call(e));
|
|
2705
2692
|
} catch {
|
|
2706
2693
|
return !1;
|
|
2707
2694
|
}
|
|
@@ -2711,17 +2698,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2711
2698
|
}, $ = () => {
|
|
2712
2699
|
var L, _, e;
|
|
2713
2700
|
return (e = (_ = (L = n.editor) == null ? void 0 : L.commands) == null ? void 0 : _.redo) == null ? void 0 : e.call(_);
|
|
2714
|
-
}, h = typeof navigator < "u" && navigator.platform.includes("Mac") ? "⌘ Z" : "Ctrl Z",
|
|
2715
|
-
var _, e,
|
|
2701
|
+
}, h = typeof navigator < "u" && navigator.platform.includes("Mac") ? "⌘ Z" : "Ctrl Z", M = typeof navigator < "u" && navigator.platform.includes("Mac") ? "⇧ ⌘ Z" : "Ctrl Y", b = typeof navigator < "u" && navigator.platform.includes("Mac"), y = b ? "⌘ B" : "Ctrl B", s = b ? "⌘ I" : "Ctrl I", p = b ? "⌘ U" : "Ctrl U", u = b ? "⇧ ⌘ X" : "Ctrl Shift X", m = b ? "⌘ \\" : "Ctrl \\", f = b ? "⇧ ⌘ S" : "Ctrl Shift S", S = b ? "⇧ ⌘ 8" : "Ctrl Shift 8", I = b ? "⇧ ⌘ 7" : "Ctrl Shift 7", w = b ? "⇧ ⌘ C" : "Ctrl Shift C", g = F(null), k = () => {
|
|
2702
|
+
var _, e, a, x, U, B, H;
|
|
2716
2703
|
const L = n.editor;
|
|
2717
|
-
L && ((H = (B = (U = (x = (
|
|
2718
|
-
},
|
|
2719
|
-
var e,
|
|
2704
|
+
L && ((H = (B = (U = (x = (a = (e = (_ = L.chain()) == null ? void 0 : _.focus()) == null ? void 0 : e.unsetAllMarks) == null ? void 0 : a.call(e)) == null ? void 0 : x.removeEmptyTextStyle) == null ? void 0 : U.call(x)) == null ? void 0 : B.run) == null || H.call(B));
|
|
2705
|
+
}, j = F(!1), P = F(!1), O = F({}), W = F(null), Y = () => {
|
|
2706
|
+
var e, a, x, U, B, H;
|
|
2720
2707
|
const L = n.editor;
|
|
2721
2708
|
if (!L) return;
|
|
2722
2709
|
const _ = ((e = L.getAttributes) == null ? void 0 : e.call(L, "textStyle")) || {};
|
|
2723
|
-
|
|
2724
|
-
bold: !!((
|
|
2710
|
+
O.value = {
|
|
2711
|
+
bold: !!((a = L.isActive) != null && a.call(L, "bold")),
|
|
2725
2712
|
italic: !!((x = L.isActive) != null && x.call(L, "italic")),
|
|
2726
2713
|
strike: !!((U = L.isActive) != null && U.call(L, "strike")),
|
|
2727
2714
|
underline: !!((B = L.isActive) != null && B.call(L, "underline")),
|
|
@@ -2733,22 +2720,22 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2733
2720
|
}
|
|
2734
2721
|
};
|
|
2735
2722
|
}, Z = () => {
|
|
2736
|
-
var U, B, H, E, N, q, X, rt, pt, zt, Tt,
|
|
2723
|
+
var U, B, H, E, N, q, X, rt, pt, zt, Tt, ot;
|
|
2737
2724
|
const L = n.editor;
|
|
2738
2725
|
if (!L) return;
|
|
2739
|
-
const _ =
|
|
2726
|
+
const _ = O.value;
|
|
2740
2727
|
let e = (H = (U = L.chain) == null ? void 0 : (B = U.call(L)).focus) == null ? void 0 : H.call(B);
|
|
2741
|
-
const
|
|
2742
|
-
x && x.from === x.to || (e = ((N = e == null ? void 0 : e.unsetAllMarks) == null ? void 0 : N.call(e)) || e, Object.keys(
|
|
2728
|
+
const a = _.textStyle || {}, x = (E = L.state) == null ? void 0 : E.selection;
|
|
2729
|
+
x && x.from === x.to || (e = ((N = e == null ? void 0 : e.unsetAllMarks) == null ? void 0 : N.call(e)) || e, Object.keys(a).length && (e = ((q = e == null ? void 0 : e.setMark) == null ? void 0 : q.call(e, "textStyle", a)) || e), _.bold && (e = ((X = e == null ? void 0 : e.toggleBold) == null ? void 0 : X.call(e)) || e), _.italic && (e = ((rt = e == null ? void 0 : e.toggleItalic) == null ? void 0 : rt.call(e)) || e), _.strike && (e = ((pt = e == null ? void 0 : e.toggleStrike) == null ? void 0 : pt.call(e)) || e), _.underline && (e = ((zt = e == null ? void 0 : e.toggleUnderline) == null ? void 0 : zt.call(e)) || e), _.code && (e = ((Tt = e == null ? void 0 : e.toggleCode) == null ? void 0 : Tt.call(e)) || e), (ot = e == null ? void 0 : e.run) == null || ot.call(e));
|
|
2743
2730
|
}, tt = (L) => {
|
|
2744
|
-
var
|
|
2731
|
+
var a;
|
|
2745
2732
|
const _ = n.editor;
|
|
2746
2733
|
if (!_) return;
|
|
2747
|
-
Y(),
|
|
2748
|
-
const e = (
|
|
2734
|
+
Y(), j.value = !0, P.value = !!L;
|
|
2735
|
+
const e = (a = _.state) == null ? void 0 : a.selection;
|
|
2749
2736
|
W.value = e ? { from: e.from, to: e.to } : null;
|
|
2750
2737
|
}, Q = () => {
|
|
2751
|
-
|
|
2738
|
+
j.value = !1, P.value = !1;
|
|
2752
2739
|
}, lt = () => {
|
|
2753
2740
|
Et();
|
|
2754
2741
|
}, it = (L) => {
|
|
@@ -2761,8 +2748,8 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2761
2748
|
L.preventDefault(), i("toggleCodeBlock");
|
|
2762
2749
|
return;
|
|
2763
2750
|
}
|
|
2764
|
-
const
|
|
2765
|
-
if (_ &&
|
|
2751
|
+
const a = L.key === "f" || L.key === "F";
|
|
2752
|
+
if (_ && a) {
|
|
2766
2753
|
L.preventDefault();
|
|
2767
2754
|
try {
|
|
2768
2755
|
(E = (H = g.value) == null ? void 0 : H.openPanel) == null || E.call(H, "find");
|
|
@@ -2770,7 +2757,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2770
2757
|
}
|
|
2771
2758
|
return;
|
|
2772
2759
|
}
|
|
2773
|
-
const x = L.key === "h" || L.key === "H", U = L.metaKey && L.altKey &&
|
|
2760
|
+
const x = L.key === "h" || L.key === "H", U = L.metaKey && L.altKey && a, B = L.ctrlKey && x;
|
|
2774
2761
|
if (U || B) {
|
|
2775
2762
|
L.preventDefault();
|
|
2776
2763
|
try {
|
|
@@ -2792,7 +2779,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2792
2779
|
};
|
|
2793
2780
|
vt(() => {
|
|
2794
2781
|
St();
|
|
2795
|
-
}),
|
|
2782
|
+
}), ht(() => {
|
|
2796
2783
|
Ut();
|
|
2797
2784
|
}), wt(
|
|
2798
2785
|
() => n.editor,
|
|
@@ -2803,22 +2790,22 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2803
2790
|
);
|
|
2804
2791
|
const Et = () => {
|
|
2805
2792
|
try {
|
|
2806
|
-
|
|
2793
|
+
j.value ? document.body.setAttribute("data-format-brush", "true") : document.body.removeAttribute("data-format-brush");
|
|
2807
2794
|
} catch {
|
|
2808
2795
|
}
|
|
2809
2796
|
};
|
|
2810
|
-
wt(
|
|
2797
|
+
wt(j, Et), vt(Et), ht(() => {
|
|
2811
2798
|
try {
|
|
2812
2799
|
document.body.removeAttribute("data-format-brush");
|
|
2813
2800
|
} catch {
|
|
2814
2801
|
}
|
|
2815
2802
|
});
|
|
2816
2803
|
const Dt = () => {
|
|
2817
|
-
var
|
|
2818
|
-
if (n.disabled || !
|
|
2804
|
+
var a;
|
|
2805
|
+
if (n.disabled || !j.value) return;
|
|
2819
2806
|
const L = n.editor;
|
|
2820
2807
|
if (!L) return;
|
|
2821
|
-
const _ = (
|
|
2808
|
+
const _ = (a = L.state) == null ? void 0 : a.selection;
|
|
2822
2809
|
if (!_ || _.from === _.to) return;
|
|
2823
2810
|
const e = W.value;
|
|
2824
2811
|
e && e.from === _.from && e.to === _.to || (Z(), W.value = { from: _.from, to: _.to }, P.value || Q());
|
|
@@ -2826,18 +2813,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2826
2813
|
return (L, _) => (T(), V("div", {
|
|
2827
2814
|
class: J(["header_box", { disabled: !!n.disabled }])
|
|
2828
2815
|
}, [
|
|
2829
|
-
|
|
2816
|
+
c("div", {
|
|
2830
2817
|
class: "icon",
|
|
2831
2818
|
"aria-disabled": !D(),
|
|
2832
2819
|
onClick: C
|
|
2833
2820
|
}, [
|
|
2834
|
-
|
|
2821
|
+
v(z(G), {
|
|
2835
2822
|
text: "撤销",
|
|
2836
|
-
shortcut:
|
|
2823
|
+
shortcut: z(h),
|
|
2837
2824
|
placement: "bottom"
|
|
2838
2825
|
}, {
|
|
2839
2826
|
default: R(() => [
|
|
2840
|
-
|
|
2827
|
+
v(z(Ve), {
|
|
2841
2828
|
theme: "outline",
|
|
2842
2829
|
strokeWidth: 3
|
|
2843
2830
|
})
|
|
@@ -2845,18 +2832,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2845
2832
|
_: 1
|
|
2846
2833
|
}, 8, ["shortcut"])
|
|
2847
2834
|
], 8, ks),
|
|
2848
|
-
|
|
2835
|
+
c("div", {
|
|
2849
2836
|
class: "icon",
|
|
2850
2837
|
"aria-disabled": !l(),
|
|
2851
2838
|
onClick: $
|
|
2852
2839
|
}, [
|
|
2853
|
-
|
|
2840
|
+
v(z(G), {
|
|
2854
2841
|
text: "重做",
|
|
2855
|
-
shortcut: M
|
|
2842
|
+
shortcut: z(M),
|
|
2856
2843
|
placement: "bottom"
|
|
2857
2844
|
}, {
|
|
2858
2845
|
default: R(() => [
|
|
2859
|
-
|
|
2846
|
+
v(z(Ae), {
|
|
2860
2847
|
theme: "outline",
|
|
2861
2848
|
strokeWidth: 3
|
|
2862
2849
|
})
|
|
@@ -2864,18 +2851,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2864
2851
|
_: 1
|
|
2865
2852
|
}, 8, ["shortcut"])
|
|
2866
2853
|
], 8, ws),
|
|
2867
|
-
|
|
2868
|
-
class: J(["icon", { active:
|
|
2854
|
+
c("div", {
|
|
2855
|
+
class: J(["icon", { active: j.value }]),
|
|
2869
2856
|
onClick: _[0] || (_[0] = (e) => tt(!1)),
|
|
2870
2857
|
onDblclick: _[1] || (_[1] = (e) => tt(!0))
|
|
2871
2858
|
}, [
|
|
2872
|
-
|
|
2859
|
+
v(z(G), {
|
|
2873
2860
|
text: "格式刷",
|
|
2874
|
-
shortcut:
|
|
2861
|
+
shortcut: z(f),
|
|
2875
2862
|
placement: "bottom"
|
|
2876
2863
|
}, {
|
|
2877
2864
|
default: R(() => [
|
|
2878
|
-
|
|
2865
|
+
v(et, {
|
|
2879
2866
|
name: "formatBrush",
|
|
2880
2867
|
size: 18
|
|
2881
2868
|
})
|
|
@@ -2883,17 +2870,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2883
2870
|
_: 1
|
|
2884
2871
|
}, 8, ["shortcut"])
|
|
2885
2872
|
], 34),
|
|
2886
|
-
|
|
2873
|
+
c("div", {
|
|
2887
2874
|
class: "icon",
|
|
2888
2875
|
onClick: k
|
|
2889
2876
|
}, [
|
|
2890
|
-
|
|
2877
|
+
v(z(G), {
|
|
2891
2878
|
text: "清除格式",
|
|
2892
|
-
shortcut:
|
|
2879
|
+
shortcut: z(m),
|
|
2893
2880
|
placement: "bottom"
|
|
2894
2881
|
}, {
|
|
2895
2882
|
default: R(() => [
|
|
2896
|
-
|
|
2883
|
+
v(et, {
|
|
2897
2884
|
name: "clearFormat",
|
|
2898
2885
|
size: 18
|
|
2899
2886
|
})
|
|
@@ -2901,23 +2888,23 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2901
2888
|
_: 1
|
|
2902
2889
|
}, 8, ["shortcut"])
|
|
2903
2890
|
]),
|
|
2904
|
-
|
|
2891
|
+
v(z(vs), {
|
|
2905
2892
|
editor: n.editor
|
|
2906
2893
|
}, null, 8, ["editor"]),
|
|
2907
|
-
|
|
2894
|
+
v(z(Xe), {
|
|
2908
2895
|
editor: n.editor
|
|
2909
2896
|
}, null, 8, ["editor"]),
|
|
2910
|
-
|
|
2897
|
+
c("div", {
|
|
2911
2898
|
class: J(["icon", { active: r("bold") }]),
|
|
2912
2899
|
onClick: _[2] || (_[2] = (e) => i("toggleBold"))
|
|
2913
2900
|
}, [
|
|
2914
|
-
|
|
2901
|
+
v(z(G), {
|
|
2915
2902
|
text: "加粗",
|
|
2916
|
-
shortcut:
|
|
2903
|
+
shortcut: z(y),
|
|
2917
2904
|
placement: "bottom"
|
|
2918
2905
|
}, {
|
|
2919
2906
|
default: R(() => [
|
|
2920
|
-
|
|
2907
|
+
v(z(Oe), {
|
|
2921
2908
|
theme: "outline",
|
|
2922
2909
|
strokeWidth: 3
|
|
2923
2910
|
})
|
|
@@ -2925,17 +2912,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2925
2912
|
_: 1
|
|
2926
2913
|
}, 8, ["shortcut"])
|
|
2927
2914
|
], 2),
|
|
2928
|
-
|
|
2915
|
+
c("div", {
|
|
2929
2916
|
class: J(["icon", { active: r("italic") }]),
|
|
2930
2917
|
onClick: _[3] || (_[3] = (e) => i("toggleItalic"))
|
|
2931
2918
|
}, [
|
|
2932
|
-
|
|
2919
|
+
v(z(G), {
|
|
2933
2920
|
text: "斜体",
|
|
2934
|
-
shortcut:
|
|
2921
|
+
shortcut: z(s),
|
|
2935
2922
|
placement: "bottom"
|
|
2936
2923
|
}, {
|
|
2937
2924
|
default: R(() => [
|
|
2938
|
-
|
|
2925
|
+
v(z(je), {
|
|
2939
2926
|
theme: "outline",
|
|
2940
2927
|
strokeWidth: 3
|
|
2941
2928
|
})
|
|
@@ -2943,17 +2930,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2943
2930
|
_: 1
|
|
2944
2931
|
}, 8, ["shortcut"])
|
|
2945
2932
|
], 2),
|
|
2946
|
-
|
|
2933
|
+
c("div", {
|
|
2947
2934
|
class: J(["icon", { active: r("strike") }]),
|
|
2948
2935
|
onClick: _[4] || (_[4] = (e) => i("toggleStrike"))
|
|
2949
2936
|
}, [
|
|
2950
|
-
|
|
2937
|
+
v(z(G), {
|
|
2951
2938
|
text: "删除线",
|
|
2952
|
-
shortcut:
|
|
2939
|
+
shortcut: z(u),
|
|
2953
2940
|
placement: "bottom"
|
|
2954
2941
|
}, {
|
|
2955
2942
|
default: R(() => [
|
|
2956
|
-
|
|
2943
|
+
v(z(Ie), {
|
|
2957
2944
|
theme: "outline",
|
|
2958
2945
|
strokeWidth: 3
|
|
2959
2946
|
})
|
|
@@ -2961,17 +2948,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2961
2948
|
_: 1
|
|
2962
2949
|
}, 8, ["shortcut"])
|
|
2963
2950
|
], 2),
|
|
2964
|
-
|
|
2951
|
+
c("div", {
|
|
2965
2952
|
class: J(["icon", { active: r("underline") }]),
|
|
2966
2953
|
onClick: _[5] || (_[5] = (e) => i("toggleUnderline"))
|
|
2967
2954
|
}, [
|
|
2968
|
-
|
|
2955
|
+
v(z(G), {
|
|
2969
2956
|
text: "下划线",
|
|
2970
|
-
shortcut:
|
|
2957
|
+
shortcut: z(p),
|
|
2971
2958
|
placement: "bottom"
|
|
2972
2959
|
}, {
|
|
2973
2960
|
default: R(() => [
|
|
2974
|
-
|
|
2961
|
+
v(z(We), {
|
|
2975
2962
|
theme: "outline",
|
|
2976
2963
|
strokeWidth: 3
|
|
2977
2964
|
})
|
|
@@ -2979,28 +2966,28 @@ const Bt = ft("check", !0, function(t) {
|
|
|
2979
2966
|
_: 1
|
|
2980
2967
|
}, 8, ["shortcut"])
|
|
2981
2968
|
], 2),
|
|
2982
|
-
|
|
2969
|
+
v(z(fo), {
|
|
2983
2970
|
editor: n.editor,
|
|
2984
2971
|
currentColor: n.currentColor
|
|
2985
2972
|
}, null, 8, ["editor", "currentColor"]),
|
|
2986
|
-
|
|
2973
|
+
v(z(tn), {
|
|
2987
2974
|
editor: n.editor,
|
|
2988
2975
|
style: { "margin-left": "-6px" }
|
|
2989
2976
|
}, null, 8, ["editor"]),
|
|
2990
|
-
|
|
2977
|
+
v(z(ms), {
|
|
2991
2978
|
editor: n.editor
|
|
2992
2979
|
}, null, 8, ["editor"]),
|
|
2993
|
-
|
|
2980
|
+
c("div", {
|
|
2994
2981
|
class: J(["icon", { active: r("bulletList") }]),
|
|
2995
2982
|
onClick: _[6] || (_[6] = (e) => i("toggleBulletList"))
|
|
2996
2983
|
}, [
|
|
2997
|
-
|
|
2984
|
+
v(z(G), {
|
|
2998
2985
|
text: "无序列表",
|
|
2999
|
-
shortcut:
|
|
2986
|
+
shortcut: z(S),
|
|
3000
2987
|
placement: "bottom"
|
|
3001
2988
|
}, {
|
|
3002
2989
|
default: R(() => [
|
|
3003
|
-
|
|
2990
|
+
v(et, {
|
|
3004
2991
|
name: "bulletList",
|
|
3005
2992
|
size: 16
|
|
3006
2993
|
})
|
|
@@ -3008,17 +2995,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3008
2995
|
_: 1
|
|
3009
2996
|
}, 8, ["shortcut"])
|
|
3010
2997
|
], 2),
|
|
3011
|
-
|
|
2998
|
+
c("div", {
|
|
3012
2999
|
class: J(["icon", { active: r("orderedList") }]),
|
|
3013
3000
|
onClick: _[7] || (_[7] = (e) => i("toggleOrderedList"))
|
|
3014
3001
|
}, [
|
|
3015
|
-
|
|
3002
|
+
v(z(G), {
|
|
3016
3003
|
text: "有序列表",
|
|
3017
|
-
shortcut:
|
|
3004
|
+
shortcut: z(I),
|
|
3018
3005
|
placement: "bottom"
|
|
3019
3006
|
}, {
|
|
3020
3007
|
default: R(() => [
|
|
3021
|
-
|
|
3008
|
+
v(et, {
|
|
3022
3009
|
name: "orderedList",
|
|
3023
3010
|
size: 16
|
|
3024
3011
|
})
|
|
@@ -3026,19 +3013,19 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3026
3013
|
_: 1
|
|
3027
3014
|
}, 8, ["shortcut"])
|
|
3028
3015
|
], 2),
|
|
3029
|
-
|
|
3016
|
+
v(z(ns), {
|
|
3030
3017
|
editor: n.editor
|
|
3031
3018
|
}, null, 8, ["editor"]),
|
|
3032
|
-
|
|
3019
|
+
c("div", {
|
|
3033
3020
|
class: J(["icon", { active: r("code") }]),
|
|
3034
3021
|
onClick: _[8] || (_[8] = (e) => i("toggleCode"))
|
|
3035
3022
|
}, [
|
|
3036
|
-
|
|
3023
|
+
v(z(G), {
|
|
3037
3024
|
text: "行内代码",
|
|
3038
3025
|
placement: "bottom"
|
|
3039
3026
|
}, {
|
|
3040
3027
|
default: R(() => [
|
|
3041
|
-
|
|
3028
|
+
v(et, {
|
|
3042
3029
|
name: "code",
|
|
3043
3030
|
size: 18
|
|
3044
3031
|
})
|
|
@@ -3046,17 +3033,17 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3046
3033
|
_: 1
|
|
3047
3034
|
})
|
|
3048
3035
|
], 2),
|
|
3049
|
-
|
|
3036
|
+
c("div", {
|
|
3050
3037
|
class: J(["icon", { active: r("codeBlock") }]),
|
|
3051
3038
|
onClick: _[9] || (_[9] = (e) => i("toggleCodeBlock"))
|
|
3052
3039
|
}, [
|
|
3053
|
-
|
|
3040
|
+
v(z(G), {
|
|
3054
3041
|
text: "代码块",
|
|
3055
|
-
shortcut:
|
|
3042
|
+
shortcut: z(w),
|
|
3056
3043
|
placement: "bottom"
|
|
3057
3044
|
}, {
|
|
3058
3045
|
default: R(() => [
|
|
3059
|
-
|
|
3046
|
+
v(et, {
|
|
3060
3047
|
name: "codeBlock",
|
|
3061
3048
|
size: 16
|
|
3062
3049
|
})
|
|
@@ -3064,43 +3051,43 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3064
3051
|
_: 1
|
|
3065
3052
|
}, 8, ["shortcut"])
|
|
3066
3053
|
], 2),
|
|
3067
|
-
|
|
3054
|
+
v(z(is), {
|
|
3068
3055
|
editor: n.editor
|
|
3069
3056
|
}, null, 8, ["editor"]),
|
|
3070
|
-
|
|
3057
|
+
v(z(zn), {
|
|
3071
3058
|
editor: n.editor
|
|
3072
3059
|
}, null, 8, ["editor"]),
|
|
3073
|
-
|
|
3060
|
+
v(z(sn), {
|
|
3074
3061
|
editor: n.editor,
|
|
3075
3062
|
imageUploader: n.imageUploader,
|
|
3076
3063
|
uploadSizeLimit: n.uploadSizeLimit
|
|
3077
3064
|
}, null, 8, ["editor", "imageUploader", "uploadSizeLimit"]),
|
|
3078
|
-
|
|
3065
|
+
v(z(cn), {
|
|
3079
3066
|
editor: n.editor,
|
|
3080
3067
|
videoUploader: n.videoUploader,
|
|
3081
3068
|
uploadSizeLimit: n.uploadSizeLimit
|
|
3082
3069
|
}, null, 8, ["editor", "videoUploader", "uploadSizeLimit"]),
|
|
3083
|
-
|
|
3070
|
+
v(z(Cn), {
|
|
3084
3071
|
ref_key: "findRef",
|
|
3085
3072
|
ref: g,
|
|
3086
3073
|
editor: n.editor
|
|
3087
3074
|
}, null, 8, ["editor"]),
|
|
3088
|
-
|
|
3075
|
+
v(z(An), {
|
|
3089
3076
|
editor: n.editor
|
|
3090
3077
|
}, null, 8, ["editor"]),
|
|
3091
|
-
|
|
3078
|
+
v(z(es), {
|
|
3092
3079
|
editor: n.editor
|
|
3093
3080
|
}, null, 8, ["editor"]),
|
|
3094
|
-
|
|
3081
|
+
c("div", {
|
|
3095
3082
|
class: "icon",
|
|
3096
3083
|
onClick: _[10] || (_[10] = (e) => o("toggleFullscreen"))
|
|
3097
3084
|
}, [
|
|
3098
|
-
|
|
3085
|
+
v(z(G), {
|
|
3099
3086
|
text: n.fullscreen ? "退出全屏" : "全屏编辑",
|
|
3100
3087
|
placement: "bottom"
|
|
3101
3088
|
}, {
|
|
3102
3089
|
default: R(() => [
|
|
3103
|
-
(T(), _t(re(n.fullscreen ?
|
|
3090
|
+
(T(), _t(re(n.fullscreen ? z(Be) : z(Fe)), {
|
|
3104
3091
|
theme: "outline",
|
|
3105
3092
|
strokeWidth: 3
|
|
3106
3093
|
}))
|
|
@@ -3110,7 +3097,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3110
3097
|
])
|
|
3111
3098
|
], 2));
|
|
3112
3099
|
}
|
|
3113
|
-
}), ys = /* @__PURE__ */ st(bs, [["__scopeId", "data-v-
|
|
3100
|
+
}), ys = /* @__PURE__ */ st(bs, [["__scopeId", "data-v-8f628937"]]), Cs = { class: "outline__header" }, xs = { class: "outline__listWrap" }, _s = { class: "outline__list" }, Ls = ["onClick"], Ms = ["onClick"], zs = /* @__PURE__ */ nt({
|
|
3114
3101
|
__name: "index",
|
|
3115
3102
|
props: {
|
|
3116
3103
|
items: {},
|
|
@@ -3125,8 +3112,8 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3125
3112
|
emits: ["select", "update:open"],
|
|
3126
3113
|
setup(t, { emit: d }) {
|
|
3127
3114
|
const n = t, o = d;
|
|
3128
|
-
function r(
|
|
3129
|
-
y(
|
|
3115
|
+
function r(u) {
|
|
3116
|
+
y(u), o("select", u);
|
|
3130
3117
|
}
|
|
3131
3118
|
function i() {
|
|
3132
3119
|
o("update:open", !1), o("update:pinned", !1);
|
|
@@ -3134,125 +3121,123 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3134
3121
|
function D() {
|
|
3135
3122
|
n.pinned || i();
|
|
3136
3123
|
}
|
|
3137
|
-
function l(
|
|
3138
|
-
const m = [],
|
|
3139
|
-
for (const S of
|
|
3124
|
+
function l(u) {
|
|
3125
|
+
const m = [], f = [];
|
|
3126
|
+
for (const S of u) {
|
|
3140
3127
|
const I = { ...S, children: [] };
|
|
3141
|
-
for (;
|
|
3142
|
-
|
|
3128
|
+
for (; f.length && f[f.length - 1].level >= I.level; ) f.pop();
|
|
3129
|
+
f.length ? f[f.length - 1].children.push(I) : m.push(I), f.push(I);
|
|
3143
3130
|
}
|
|
3144
3131
|
return m;
|
|
3145
3132
|
}
|
|
3146
3133
|
const C = F(/* @__PURE__ */ new Set());
|
|
3147
|
-
function $(
|
|
3148
|
-
return C.value.has(
|
|
3134
|
+
function $(u) {
|
|
3135
|
+
return C.value.has(u.pos);
|
|
3149
3136
|
}
|
|
3150
|
-
function h(
|
|
3137
|
+
function h(u) {
|
|
3151
3138
|
const m = C.value;
|
|
3152
|
-
m.has(
|
|
3139
|
+
m.has(u.pos) ? m.delete(u.pos) : m.add(u.pos), C.value = new Set(m);
|
|
3153
3140
|
}
|
|
3154
|
-
const
|
|
3155
|
-
const
|
|
3156
|
-
for (const S of
|
|
3157
|
-
|
|
3141
|
+
const M = ut(() => l(n.items || [])), b = ut(() => {
|
|
3142
|
+
const u = [], m = (f) => {
|
|
3143
|
+
for (const S of f)
|
|
3144
|
+
u.push({ node: S, level: S.level, hasChildren: S.children.length > 0 }), C.value.has(S.pos) || m(S.children);
|
|
3158
3145
|
};
|
|
3159
|
-
return m(
|
|
3146
|
+
return m(M.value), u;
|
|
3160
3147
|
});
|
|
3161
|
-
function y(
|
|
3162
|
-
const m =
|
|
3148
|
+
function y(u) {
|
|
3149
|
+
const m = z(n.editor);
|
|
3163
3150
|
if (!m) return;
|
|
3164
|
-
const { doc:
|
|
3165
|
-
let w =
|
|
3166
|
-
S && S.type.name === "heading" && (w =
|
|
3167
|
-
const g =
|
|
3151
|
+
const { doc: f } = m.state, S = f.nodeAt(u.pos), I = Math.max(1, f.content.size - 1);
|
|
3152
|
+
let w = u.pos + 1;
|
|
3153
|
+
S && S.type.name === "heading" && (w = u.pos + S.nodeSize - 1), w = Math.min(Math.max(1, w), I), m.chain().focus().setTextSelection(w).run();
|
|
3154
|
+
const g = z(n.container) ?? null, k = m.view.coordsAtPos(w), j = n.offset ?? 8, P = n.duration ?? 700;
|
|
3168
3155
|
if (g) {
|
|
3169
|
-
const
|
|
3156
|
+
const O = g.getBoundingClientRect(), W = g.scrollTop + k.top - O.top - j;
|
|
3170
3157
|
s(g, W, P);
|
|
3171
3158
|
} else {
|
|
3172
|
-
const
|
|
3173
|
-
|
|
3159
|
+
const O = (window.scrollY || window.pageYOffset) + k.top - j;
|
|
3160
|
+
p(O, P);
|
|
3174
3161
|
}
|
|
3175
3162
|
}
|
|
3176
|
-
function s(
|
|
3177
|
-
const S =
|
|
3178
|
-
function k(
|
|
3179
|
-
const P =
|
|
3180
|
-
|
|
3163
|
+
function s(u, m, f = 600) {
|
|
3164
|
+
const S = u.scrollTop, I = m - S, w = performance.now(), g = (j) => j < 0.5 ? 4 * j * j * j : 1 - Math.pow(-2 * j + 2, 3) / 2;
|
|
3165
|
+
function k(j) {
|
|
3166
|
+
const P = j - w, O = Math.min(1, P / f);
|
|
3167
|
+
u.scrollTop = S + I * g(O), O < 1 && requestAnimationFrame(k);
|
|
3181
3168
|
}
|
|
3182
3169
|
requestAnimationFrame(k);
|
|
3183
3170
|
}
|
|
3184
|
-
function
|
|
3185
|
-
const
|
|
3171
|
+
function p(u, m = 600) {
|
|
3172
|
+
const f = window.scrollY || window.pageYOffset, S = u - f, I = performance.now(), w = (k) => k < 0.5 ? 4 * k * k * k : 1 - Math.pow(-2 * k + 2, 3) / 2;
|
|
3186
3173
|
function g(k) {
|
|
3187
|
-
const
|
|
3188
|
-
window.scrollTo(0,
|
|
3174
|
+
const j = k - I, P = Math.min(1, j / m), O = f + S * w(P);
|
|
3175
|
+
window.scrollTo(0, O), P < 1 && requestAnimationFrame(g);
|
|
3189
3176
|
}
|
|
3190
3177
|
requestAnimationFrame(g);
|
|
3191
3178
|
}
|
|
3192
|
-
return (
|
|
3179
|
+
return (u, m) => (T(), V("div", {
|
|
3193
3180
|
class: "outline-wrapper",
|
|
3194
3181
|
onClick: m[1] || (m[1] = A(() => {
|
|
3195
3182
|
}, ["stop"]))
|
|
3196
3183
|
}, [
|
|
3197
|
-
|
|
3184
|
+
c("aside", {
|
|
3198
3185
|
class: J(["outline", { isOpen: n.open }]),
|
|
3199
3186
|
style: dt({
|
|
3200
3187
|
maxHeight: typeof n.maxHeight == "number" ? n.maxHeight + "px" : n.maxHeight
|
|
3201
3188
|
}),
|
|
3202
3189
|
onMouseleave: D
|
|
3203
3190
|
}, [
|
|
3204
|
-
|
|
3205
|
-
m[2] || (m[2] =
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
})) : K("", !0)
|
|
3221
|
-
])
|
|
3191
|
+
c("div", Cs, [
|
|
3192
|
+
m[2] || (m[2] = c("div", { style: { "margin-right": "6px" } }, "大纲", -1)),
|
|
3193
|
+
n.open && !n.pinned ? (T(), _t(et, {
|
|
3194
|
+
key: 0,
|
|
3195
|
+
style: { "margin-top": "2px" },
|
|
3196
|
+
name: "fixed",
|
|
3197
|
+
size: 16,
|
|
3198
|
+
onClick: m[0] || (m[0] = (f) => u.$emit("update:pinned", !0))
|
|
3199
|
+
})) : K("", !0),
|
|
3200
|
+
n.pinned ? (T(), _t(z(He), {
|
|
3201
|
+
key: 1,
|
|
3202
|
+
onClick: i,
|
|
3203
|
+
theme: "outline",
|
|
3204
|
+
size: "16",
|
|
3205
|
+
strokeWidth: 3
|
|
3206
|
+
})) : K("", !0)
|
|
3222
3207
|
]),
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
(T(!0), V(mt, null, kt(b.value, (
|
|
3226
|
-
key:
|
|
3227
|
-
class: J(["outline__item", "lv-" +
|
|
3208
|
+
c("div", xs, [
|
|
3209
|
+
c("ul", _s, [
|
|
3210
|
+
(T(!0), V(mt, null, kt(b.value, (f, S) => (T(), V("li", {
|
|
3211
|
+
key: f.node.pos + "-" + S,
|
|
3212
|
+
class: J(["outline__item", "lv-" + f.level])
|
|
3228
3213
|
}, [
|
|
3229
|
-
|
|
3214
|
+
f.hasChildren ? (T(), V("span", {
|
|
3230
3215
|
key: 0,
|
|
3231
|
-
class: J(["outline__caret", { collapsed: $(
|
|
3232
|
-
onClick: A((I) => h(
|
|
3216
|
+
class: J(["outline__caret", { collapsed: $(f.node), expanded: !$(f.node) }]),
|
|
3217
|
+
onClick: A((I) => h(f.node), ["stop"]),
|
|
3233
3218
|
title: "展开/收起"
|
|
3234
3219
|
}, [...m[3] || (m[3] = [
|
|
3235
|
-
|
|
3220
|
+
c("svg", {
|
|
3236
3221
|
width: "12",
|
|
3237
3222
|
height: "12",
|
|
3238
3223
|
viewBox: "0 0 24 24",
|
|
3239
3224
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3240
3225
|
}, [
|
|
3241
|
-
|
|
3226
|
+
c("path", {
|
|
3242
3227
|
d: "M8 5l8 7-8 7V5z",
|
|
3243
3228
|
fill: "currentColor"
|
|
3244
3229
|
})
|
|
3245
3230
|
], -1)
|
|
3246
|
-
])], 10,
|
|
3247
|
-
|
|
3231
|
+
])], 10, Ls)) : K("", !0),
|
|
3232
|
+
c("span", {
|
|
3248
3233
|
class: "outline__text",
|
|
3249
|
-
onClick: (I) => r(
|
|
3250
|
-
},
|
|
3234
|
+
onClick: (I) => r(f.node)
|
|
3235
|
+
}, ft(f.node.text || "(无标题)"), 9, Ms)
|
|
3251
3236
|
], 2))), 128))
|
|
3252
3237
|
])
|
|
3253
3238
|
])
|
|
3254
3239
|
], 38),
|
|
3255
|
-
|
|
3240
|
+
v(xt, { name: "outline-mask" }, {
|
|
3256
3241
|
default: R(() => [
|
|
3257
3242
|
n.open ? (T(), V("div", {
|
|
3258
3243
|
key: 0,
|
|
@@ -3264,7 +3249,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3264
3249
|
})
|
|
3265
3250
|
]));
|
|
3266
3251
|
}
|
|
3267
|
-
}),
|
|
3252
|
+
}), $s = /* @__PURE__ */ st(zs, [["__scopeId", "data-v-5d32336e"]]), Ss = ["onClick"], Es = /* @__PURE__ */ nt({
|
|
3268
3253
|
__name: "index",
|
|
3269
3254
|
props: {
|
|
3270
3255
|
modelValue: {},
|
|
@@ -3281,16 +3266,16 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3281
3266
|
setup(t, { expose: d, emit: n }) {
|
|
3282
3267
|
const o = t, r = n, i = F(null);
|
|
3283
3268
|
let D = !1;
|
|
3284
|
-
const l = F(!1), C = F(!1), $ = F(""), h = F([]),
|
|
3285
|
-
var
|
|
3269
|
+
const l = F(!1), C = F(!1), $ = F(""), h = F([]), M = F("#000000"), b = F(!0), y = F(!0), s = F(null), p = F(void 0), u = F([]), m = F(null), f = (e) => {
|
|
3270
|
+
var a;
|
|
3286
3271
|
if (o.readonly)
|
|
3287
3272
|
try {
|
|
3288
|
-
e.preventDefault(), (
|
|
3273
|
+
e.preventDefault(), (a = e.stopPropagation) == null || a.call(e);
|
|
3289
3274
|
} catch {
|
|
3290
3275
|
}
|
|
3291
3276
|
}, S = () => {
|
|
3292
3277
|
const e = s.value;
|
|
3293
|
-
|
|
3278
|
+
p.value = e ? e.clientHeight : void 0;
|
|
3294
3279
|
};
|
|
3295
3280
|
let I = null;
|
|
3296
3281
|
vt(() => {
|
|
@@ -3298,7 +3283,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3298
3283
|
const e = s.value;
|
|
3299
3284
|
e && e.addEventListener("scroll", Dt, { passive: !0 });
|
|
3300
3285
|
});
|
|
3301
|
-
}),
|
|
3286
|
+
}), ht(() => {
|
|
3302
3287
|
I && (window.removeEventListener("resize", I), I = null);
|
|
3303
3288
|
const e = s.value;
|
|
3304
3289
|
e && e.removeEventListener("scroll", Dt);
|
|
@@ -3318,13 +3303,13 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3318
3303
|
e.key === "Escape" && l.value && (e.preventDefault(), l.value = !1);
|
|
3319
3304
|
}
|
|
3320
3305
|
const g = ut(() => {
|
|
3321
|
-
const e = (x) => x == null ? void 0 : typeof x == "number" ? `${x}px` : x,
|
|
3306
|
+
const e = (x) => x == null ? void 0 : typeof x == "number" ? `${x}px` : x, a = l.value ? "100vh" : e(o.height);
|
|
3322
3307
|
return {
|
|
3323
|
-
height:
|
|
3324
|
-
"--editor-height":
|
|
3308
|
+
height: a,
|
|
3309
|
+
"--editor-height": a,
|
|
3325
3310
|
"--editor-caret-color": o.caretColor || "#000"
|
|
3326
3311
|
};
|
|
3327
|
-
}), k =
|
|
3312
|
+
}), k = jt.extend({
|
|
3328
3313
|
addAttributes() {
|
|
3329
3314
|
return {
|
|
3330
3315
|
fontSize: {
|
|
@@ -3336,11 +3321,11 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3336
3321
|
},
|
|
3337
3322
|
addCommands() {
|
|
3338
3323
|
return {
|
|
3339
|
-
setFontSize: (e) => ({ chain:
|
|
3324
|
+
setFontSize: (e) => ({ chain: a }) => a().setMark("textStyle", { fontSize: e }).run(),
|
|
3340
3325
|
unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
|
|
3341
3326
|
};
|
|
3342
3327
|
}
|
|
3343
|
-
}),
|
|
3328
|
+
}), j = jt.extend({
|
|
3344
3329
|
addAttributes() {
|
|
3345
3330
|
return {
|
|
3346
3331
|
backgroundColor: {
|
|
@@ -3352,7 +3337,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3352
3337
|
},
|
|
3353
3338
|
addCommands() {
|
|
3354
3339
|
return {
|
|
3355
|
-
setBackgroundColor: (e) => ({ chain:
|
|
3340
|
+
setBackgroundColor: (e) => ({ chain: a }) => a().setMark("textStyle", { backgroundColor: e }).run(),
|
|
3356
3341
|
unsetBackgroundColor: () => ({ chain: e }) => e().setMark("textStyle", { backgroundColor: null }).removeEmptyTextStyle().run()
|
|
3357
3342
|
};
|
|
3358
3343
|
}
|
|
@@ -3375,15 +3360,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3375
3360
|
// 表格支持(v3 TableKit)
|
|
3376
3361
|
we.configure({
|
|
3377
3362
|
table: { resizable: !0 },
|
|
3378
|
-
tableCell:
|
|
3363
|
+
// tableCell: false,
|
|
3364
|
+
tableCell: {
|
|
3365
|
+
HTMLAttributes: { class: "list-item" }
|
|
3366
|
+
}
|
|
3379
3367
|
}),
|
|
3380
3368
|
_e,
|
|
3381
|
-
|
|
3369
|
+
jt,
|
|
3382
3370
|
k,
|
|
3383
|
-
|
|
3371
|
+
j,
|
|
3384
3372
|
ge,
|
|
3385
3373
|
me,
|
|
3386
|
-
|
|
3374
|
+
fe.configure({
|
|
3387
3375
|
autolink: !0,
|
|
3388
3376
|
linkOnPaste: !0,
|
|
3389
3377
|
openOnClick: !1,
|
|
@@ -3395,32 +3383,32 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3395
3383
|
he.configure({
|
|
3396
3384
|
types: ["heading", "paragraph"]
|
|
3397
3385
|
}),
|
|
3398
|
-
|
|
3386
|
+
pe.configure({ placeholder: o.placeholder ?? "输入 / 以插入块" })
|
|
3399
3387
|
],
|
|
3400
3388
|
// 直接在构造时设置初始内容,避免立即调用 setContent 导致部分插件(如 resizable)在尚未完成挂载时触发 selection 更新报错
|
|
3401
|
-
content: o.
|
|
3402
|
-
contentType: o.
|
|
3389
|
+
content: o.modelValue != null ? String(o.modelValue || "") : String(o.markdown || ""),
|
|
3390
|
+
contentType: o.modelValue != null && /<\s*(video|iframe)\b|data-youtube-video|<\w+/i.test(String(o.modelValue || "")) ? "html" : "markdown",
|
|
3403
3391
|
editable: !o.readonly,
|
|
3404
3392
|
autofocus: !o.readonly,
|
|
3405
3393
|
editorProps: {
|
|
3406
3394
|
// 任务列表等交互由扩展自身处理,无需额外事件
|
|
3407
|
-
handlePaste(e,
|
|
3395
|
+
handlePaste(e, a) {
|
|
3408
3396
|
var pt, zt, Tt;
|
|
3409
3397
|
if (o.readonly) {
|
|
3410
3398
|
try {
|
|
3411
|
-
|
|
3399
|
+
a.preventDefault();
|
|
3412
3400
|
} catch {
|
|
3413
3401
|
}
|
|
3414
3402
|
return !0;
|
|
3415
3403
|
}
|
|
3416
|
-
const x =
|
|
3404
|
+
const x = a.clipboardData;
|
|
3417
3405
|
if (!x) return !1;
|
|
3418
|
-
const U = x.files && x.files.length ? Array.from(x.files) : [], B = U.find((
|
|
3406
|
+
const U = x.files && x.files.length ? Array.from(x.files) : [], B = U.find((ot) => {
|
|
3419
3407
|
var ct;
|
|
3420
|
-
return (ct =
|
|
3408
|
+
return (ct = ot.type) == null ? void 0 : ct.startsWith("image/");
|
|
3421
3409
|
});
|
|
3422
3410
|
if (B) {
|
|
3423
|
-
if (
|
|
3411
|
+
if (a.preventDefault(), !o.imageUploader) {
|
|
3424
3412
|
try {
|
|
3425
3413
|
window.alert("未设置图片上传方法(image-uploader),无法上传图片文件");
|
|
3426
3414
|
} catch {
|
|
@@ -3429,15 +3417,15 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3429
3417
|
}
|
|
3430
3418
|
return Y(B), !0;
|
|
3431
3419
|
}
|
|
3432
|
-
const H = U.find((
|
|
3420
|
+
const H = U.find((ot) => {
|
|
3433
3421
|
var ct;
|
|
3434
|
-
return (ct =
|
|
3422
|
+
return (ct = ot.type) == null ? void 0 : ct.startsWith("video/");
|
|
3435
3423
|
});
|
|
3436
3424
|
if (H)
|
|
3437
|
-
return
|
|
3438
|
-
const N = (x.items ? Array.from(x.items) : []).find((
|
|
3425
|
+
return a.preventDefault(), bt(H), !0;
|
|
3426
|
+
const N = (x.items ? Array.from(x.items) : []).find((ot) => ot.kind === "file"), q = N ? N.getAsFile() : null;
|
|
3439
3427
|
if (q && q.type.startsWith("image/")) {
|
|
3440
|
-
if (
|
|
3428
|
+
if (a.preventDefault(), !o.imageUploader) {
|
|
3441
3429
|
try {
|
|
3442
3430
|
window.alert("未设置图片上传方法(image-uploader),无法上传图片文件");
|
|
3443
3431
|
} catch {
|
|
@@ -3447,12 +3435,12 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3447
3435
|
return Y(q), !0;
|
|
3448
3436
|
}
|
|
3449
3437
|
if (q && q.type.startsWith("video/"))
|
|
3450
|
-
return
|
|
3438
|
+
return a.preventDefault(), bt(q), !0;
|
|
3451
3439
|
const X = x.getData("text/html");
|
|
3452
3440
|
if (X) {
|
|
3453
|
-
const
|
|
3454
|
-
if (
|
|
3455
|
-
|
|
3441
|
+
const ot = X.match(/<img[^>]+src=["']([^"']+)["']/i), ct = X.replace(/\s+/g, "").match(/^<img[^>]+src=["']([^"']+)["'][^>]*>$/i);
|
|
3442
|
+
if (ot && ct && ct[1]) {
|
|
3443
|
+
a.preventDefault();
|
|
3456
3444
|
const At = ct[1];
|
|
3457
3445
|
if (o.imageUploader && /^data:image\//i.test(At)) {
|
|
3458
3446
|
const Ht = Q(At, "clipboard.png");
|
|
@@ -3479,14 +3467,14 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3479
3467
|
}
|
|
3480
3468
|
const $t = X.match(/<video[^>]+src=["']([^"']+)["']/i), yt = X.match(/<source[^>]+src=["']([^"']+)["']/i), Ft = X.replace(/\s+/g, "").match(/^<video[^>]*>.*<\/video>$/i), Yt = $t && $t[1] || yt && yt[1];
|
|
3481
3469
|
if (Yt && Ft)
|
|
3482
|
-
return
|
|
3470
|
+
return a.preventDefault(), W(Yt), !0;
|
|
3483
3471
|
}
|
|
3484
3472
|
const rt = x.getData("text/plain");
|
|
3485
3473
|
if (rt) {
|
|
3486
|
-
const
|
|
3487
|
-
if (lt(
|
|
3488
|
-
if (
|
|
3489
|
-
const $t = Q(
|
|
3474
|
+
const ot = rt.trim(), ct = at(ot);
|
|
3475
|
+
if (lt(ot) && ot === rt.trim()) {
|
|
3476
|
+
if (a.preventDefault(), /^data:image\//i.test(ot)) {
|
|
3477
|
+
const $t = Q(ot, "clipboard.png"), yt = (zt = o.uploadSizeLimit) == null ? void 0 : zt.image;
|
|
3490
3478
|
if (yt) {
|
|
3491
3479
|
const Ft = Math.max(1, yt) * 1024 * 1024;
|
|
3492
3480
|
if ($t.size > Ft) {
|
|
@@ -3500,10 +3488,10 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3500
3488
|
}
|
|
3501
3489
|
}
|
|
3502
3490
|
}
|
|
3503
|
-
return P(
|
|
3491
|
+
return P(ot), !0;
|
|
3504
3492
|
}
|
|
3505
3493
|
if (ct) {
|
|
3506
|
-
if (
|
|
3494
|
+
if (a.preventDefault(), /^data:image\//i.test(ct)) {
|
|
3507
3495
|
const $t = Q(ct, "clipboard.png"), yt = (Tt = o.uploadSizeLimit) == null ? void 0 : Tt.image;
|
|
3508
3496
|
if (yt) {
|
|
3509
3497
|
const Ft = Math.max(1, yt) * 1024 * 1024;
|
|
@@ -3520,27 +3508,27 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3520
3508
|
}
|
|
3521
3509
|
return P(ct), !0;
|
|
3522
3510
|
}
|
|
3523
|
-
if (it(
|
|
3524
|
-
return
|
|
3511
|
+
if (it(ot) && ot === rt.trim())
|
|
3512
|
+
return a.preventDefault(), W(ot), !0;
|
|
3525
3513
|
}
|
|
3526
3514
|
return !1;
|
|
3527
3515
|
},
|
|
3528
|
-
handleDrop(e,
|
|
3516
|
+
handleDrop(e, a) {
|
|
3529
3517
|
if (o.readonly) {
|
|
3530
3518
|
try {
|
|
3531
|
-
|
|
3519
|
+
a.preventDefault();
|
|
3532
3520
|
} catch {
|
|
3533
3521
|
}
|
|
3534
3522
|
return !0;
|
|
3535
3523
|
}
|
|
3536
|
-
const x =
|
|
3524
|
+
const x = a.dataTransfer;
|
|
3537
3525
|
if (!x) return !1;
|
|
3538
3526
|
const B = (x.files ? Array.from(x.files) : []).find((H) => {
|
|
3539
3527
|
var E;
|
|
3540
3528
|
return (E = H.type) == null ? void 0 : E.startsWith("image/");
|
|
3541
3529
|
});
|
|
3542
3530
|
if (B) {
|
|
3543
|
-
if (
|
|
3531
|
+
if (a.preventDefault(), !o.imageUploader) {
|
|
3544
3532
|
try {
|
|
3545
3533
|
window.alert("未设置图片上传方法(image-uploader),无法上传图片文件");
|
|
3546
3534
|
} catch {
|
|
@@ -3551,7 +3539,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3551
3539
|
}
|
|
3552
3540
|
return !1;
|
|
3553
3541
|
},
|
|
3554
|
-
handleClick(e,
|
|
3542
|
+
handleClick(e, a, x) {
|
|
3555
3543
|
const U = x, B = U.target, H = B ? B.closest("a[href]") : null;
|
|
3556
3544
|
if (H && (U.ctrlKey || U.metaKey)) {
|
|
3557
3545
|
const E = H.getAttribute("href") || "";
|
|
@@ -3568,30 +3556,30 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3568
3556
|
return !1;
|
|
3569
3557
|
},
|
|
3570
3558
|
handleDOMEvents: {
|
|
3571
|
-
dragstart(e,
|
|
3559
|
+
dragstart(e, a) {
|
|
3572
3560
|
if (o.readonly) {
|
|
3573
3561
|
try {
|
|
3574
|
-
|
|
3562
|
+
a.preventDefault();
|
|
3575
3563
|
} catch {
|
|
3576
3564
|
}
|
|
3577
3565
|
return !0;
|
|
3578
3566
|
}
|
|
3579
3567
|
return !1;
|
|
3580
3568
|
},
|
|
3581
|
-
dragover(e,
|
|
3569
|
+
dragover(e, a) {
|
|
3582
3570
|
if (o.readonly) {
|
|
3583
3571
|
try {
|
|
3584
|
-
|
|
3572
|
+
a.preventDefault();
|
|
3585
3573
|
} catch {
|
|
3586
3574
|
}
|
|
3587
3575
|
return !0;
|
|
3588
3576
|
}
|
|
3589
3577
|
return !1;
|
|
3590
3578
|
},
|
|
3591
|
-
drop(e,
|
|
3579
|
+
drop(e, a) {
|
|
3592
3580
|
if (o.readonly) {
|
|
3593
3581
|
try {
|
|
3594
|
-
|
|
3582
|
+
a.preventDefault();
|
|
3595
3583
|
} catch {
|
|
3596
3584
|
}
|
|
3597
3585
|
return !0;
|
|
@@ -3603,7 +3591,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3603
3591
|
onSelectionUpdate: (e) => {
|
|
3604
3592
|
var U;
|
|
3605
3593
|
const x = ((U = e.editor.getAttributes("textStyle")) == null ? void 0 : U.color) || "#000000";
|
|
3606
|
-
|
|
3594
|
+
M.value = typeof x == "string" ? x : "#000000";
|
|
3607
3595
|
},
|
|
3608
3596
|
onUpdate: () => {
|
|
3609
3597
|
const e = i.value;
|
|
@@ -3613,23 +3601,23 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3613
3601
|
Et();
|
|
3614
3602
|
}
|
|
3615
3603
|
}), Ct(() => {
|
|
3616
|
-
var e,
|
|
3604
|
+
var e, a, x, U, B, H;
|
|
3617
3605
|
Et();
|
|
3618
3606
|
try {
|
|
3619
3607
|
o.readonly || (e = i.value) == null || e.chain().focus().run();
|
|
3620
3608
|
} catch {
|
|
3621
3609
|
}
|
|
3622
3610
|
try {
|
|
3623
|
-
const E = ((x = (
|
|
3624
|
-
(U = E == null ? void 0 : E.addEventListener) == null || U.call(E, "dragstart",
|
|
3611
|
+
const E = ((x = (a = i.value) == null ? void 0 : a.view) == null ? void 0 : x.dom) || null;
|
|
3612
|
+
(U = E == null ? void 0 : E.addEventListener) == null || U.call(E, "dragstart", f, !0), (B = E == null ? void 0 : E.addEventListener) == null || B.call(E, "dragover", f, !0), (H = E == null ? void 0 : E.addEventListener) == null || H.call(E, "drop", f, !0);
|
|
3625
3613
|
} catch {
|
|
3626
3614
|
}
|
|
3627
3615
|
});
|
|
3628
|
-
}),
|
|
3629
|
-
var e,
|
|
3616
|
+
}), ht(() => {
|
|
3617
|
+
var e, a, x, U, B, H;
|
|
3630
3618
|
try {
|
|
3631
|
-
const E = ((
|
|
3632
|
-
(x = E == null ? void 0 : E.removeEventListener) == null || x.call(E, "dragstart",
|
|
3619
|
+
const E = ((a = (e = i.value) == null ? void 0 : e.view) == null ? void 0 : a.dom) || null;
|
|
3620
|
+
(x = E == null ? void 0 : E.removeEventListener) == null || x.call(E, "dragstart", f, !0), (U = E == null ? void 0 : E.removeEventListener) == null || U.call(E, "dragover", f, !0), (B = E == null ? void 0 : E.removeEventListener) == null || B.call(E, "drop", f, !0);
|
|
3633
3621
|
} catch {
|
|
3634
3622
|
}
|
|
3635
3623
|
(H = i.value) == null || H.destroy();
|
|
@@ -3642,8 +3630,8 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3642
3630
|
}
|
|
3643
3631
|
e != null && i.value && Ct(() => {
|
|
3644
3632
|
try {
|
|
3645
|
-
const
|
|
3646
|
-
if (!
|
|
3633
|
+
const a = /<\s*(video|iframe)\b|data-youtube-video/i.test(e), x = e.match(/\[video\]\(([^)]+)\)/i);
|
|
3634
|
+
if (!a && x) {
|
|
3647
3635
|
const U = x[1], B = e.replace(
|
|
3648
3636
|
/\[video\]\(([^)]+)\)/gi,
|
|
3649
3637
|
(H, E) => `<video data-tiptap-video src="${E}" controls></video>`
|
|
@@ -3651,19 +3639,19 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3651
3639
|
i.value.commands.setContent(B, { contentType: "html" });
|
|
3652
3640
|
} else
|
|
3653
3641
|
i.value.commands.setContent(e, {
|
|
3654
|
-
contentType:
|
|
3642
|
+
contentType: a ? "html" : "markdown"
|
|
3655
3643
|
});
|
|
3656
|
-
} catch (
|
|
3657
|
-
console.warn("setContent 失败,内容更新被忽略:",
|
|
3644
|
+
} catch (a) {
|
|
3645
|
+
console.warn("setContent 失败,内容更新被忽略:", a);
|
|
3658
3646
|
}
|
|
3659
3647
|
});
|
|
3660
3648
|
}
|
|
3661
3649
|
), wt(
|
|
3662
3650
|
() => o.readonly,
|
|
3663
3651
|
(e) => {
|
|
3664
|
-
var
|
|
3652
|
+
var a, x;
|
|
3665
3653
|
try {
|
|
3666
|
-
(x = (
|
|
3654
|
+
(x = (a = i.value) == null ? void 0 : a.setEditable) == null || x.call(a, !e);
|
|
3667
3655
|
} catch {
|
|
3668
3656
|
}
|
|
3669
3657
|
}
|
|
@@ -3674,46 +3662,46 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3674
3662
|
D = !1;
|
|
3675
3663
|
return;
|
|
3676
3664
|
}
|
|
3677
|
-
e != null && i.value && Ct(() => {
|
|
3665
|
+
o.modelValue == null && e != null && i.value && Ct(() => {
|
|
3678
3666
|
try {
|
|
3679
3667
|
i.value.commands.setContent(e, { contentType: "markdown" });
|
|
3680
|
-
} catch (
|
|
3681
|
-
console.warn("setContent 失败,内容更新被忽略:",
|
|
3668
|
+
} catch (a) {
|
|
3669
|
+
console.warn("setContent 失败,内容更新被忽略:", a);
|
|
3682
3670
|
}
|
|
3683
3671
|
});
|
|
3684
3672
|
}
|
|
3685
3673
|
);
|
|
3686
3674
|
function P(e) {
|
|
3687
|
-
var
|
|
3688
|
-
(
|
|
3675
|
+
var a;
|
|
3676
|
+
(a = i.value) == null || a.chain().focus().setImage({ src: e }).run();
|
|
3689
3677
|
}
|
|
3690
|
-
function
|
|
3678
|
+
function O(e) {
|
|
3691
3679
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3692
3680
|
}
|
|
3693
3681
|
function W(e) {
|
|
3694
|
-
const
|
|
3695
|
-
if (!
|
|
3696
|
-
if (typeof
|
|
3697
|
-
|
|
3682
|
+
const a = i.value;
|
|
3683
|
+
if (!a) return;
|
|
3684
|
+
if (typeof a.commands.setVideo == "function") {
|
|
3685
|
+
a.chain().focus().setVideo({ src: e, HTMLAttributes: { controls: !0, autoplay: !1, width: 640 } }).run();
|
|
3698
3686
|
return;
|
|
3699
3687
|
}
|
|
3700
|
-
const U =
|
|
3688
|
+
const U = O(e);
|
|
3701
3689
|
try {
|
|
3702
|
-
|
|
3690
|
+
a.chain().focus().insertContent(
|
|
3703
3691
|
`<p><a href="${U}" target="_blank" rel="noopener noreferrer">${U}</a></p>`
|
|
3704
3692
|
).run();
|
|
3705
3693
|
} catch {
|
|
3706
|
-
|
|
3694
|
+
a.chain().focus().insertContent(U).run();
|
|
3707
3695
|
}
|
|
3708
3696
|
}
|
|
3709
3697
|
async function Y(e) {
|
|
3710
3698
|
var x, U;
|
|
3711
|
-
const
|
|
3712
|
-
if (
|
|
3713
|
-
const B = Math.max(1,
|
|
3699
|
+
const a = (x = o.uploadSizeLimit) == null ? void 0 : x.image;
|
|
3700
|
+
if (a) {
|
|
3701
|
+
const B = Math.max(1, a) * 1024 * 1024;
|
|
3714
3702
|
if (e.size > B) {
|
|
3715
3703
|
try {
|
|
3716
|
-
window.alert(`图片文件大小超限(${(e.size / 1024 / 1024).toFixed(2)}MB > ${
|
|
3704
|
+
window.alert(`图片文件大小超限(${(e.size / 1024 / 1024).toFixed(2)}MB > ${a}MB)`);
|
|
3717
3705
|
} catch {
|
|
3718
3706
|
}
|
|
3719
3707
|
return;
|
|
@@ -3744,7 +3732,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3744
3732
|
} catch {
|
|
3745
3733
|
}
|
|
3746
3734
|
}
|
|
3747
|
-
function Z(e,
|
|
3735
|
+
function Z(e, a) {
|
|
3748
3736
|
var E, N;
|
|
3749
3737
|
const x = i.value;
|
|
3750
3738
|
if (!x) return;
|
|
@@ -3756,27 +3744,27 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3756
3744
|
}), H != null) {
|
|
3757
3745
|
const q = B.nodeAt(H), X = U.schema.nodes.image;
|
|
3758
3746
|
if (!q || !X) return;
|
|
3759
|
-
const rt = { ...q.attrs || {}, src:
|
|
3747
|
+
const rt = { ...q.attrs || {}, src: a, uploading: null }, pt = U.tr.setNodeMarkup(H, X, rt, q.marks);
|
|
3760
3748
|
x.view.dispatch(pt);
|
|
3761
3749
|
try {
|
|
3762
3750
|
(N = (E = x.options) == null ? void 0 : E.onUpdate) == null || N.call(E, { editor: x });
|
|
3763
3751
|
} catch {
|
|
3764
3752
|
}
|
|
3765
3753
|
} else
|
|
3766
|
-
P(
|
|
3754
|
+
P(a);
|
|
3767
3755
|
}
|
|
3768
|
-
function tt(e,
|
|
3756
|
+
function tt(e, a) {
|
|
3769
3757
|
const x = new FileReader();
|
|
3770
|
-
x.onload = () =>
|
|
3758
|
+
x.onload = () => a(String(x.result || "")), x.readAsDataURL(e);
|
|
3771
3759
|
}
|
|
3772
|
-
function Q(e,
|
|
3760
|
+
function Q(e, a = "image.png") {
|
|
3773
3761
|
var N;
|
|
3774
3762
|
const x = e.split(","), U = ((N = x[0].match(/:(.*?);/)) == null ? void 0 : N[1]) || "image/png", B = atob(x[1]);
|
|
3775
3763
|
let H = B.length;
|
|
3776
3764
|
const E = new Uint8Array(H);
|
|
3777
3765
|
for (; H--; )
|
|
3778
3766
|
E[H] = B.charCodeAt(H);
|
|
3779
|
-
return new File([E],
|
|
3767
|
+
return new File([E], a, { type: U });
|
|
3780
3768
|
}
|
|
3781
3769
|
function lt(e) {
|
|
3782
3770
|
return /^data:image\//i.test(e) || /^https?:\/\//i.test(e) && /\.(png|jpe?g|gif|webp|svg)(\?.*)?$/i.test(e);
|
|
@@ -3785,19 +3773,19 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3785
3773
|
return /^https?:\/\//i.test(e) && /\.(mp4|webm|m3u8|mov|ogv?)(\?.*)?$/i.test(e);
|
|
3786
3774
|
}
|
|
3787
3775
|
function at(e) {
|
|
3788
|
-
const
|
|
3789
|
-
if (!
|
|
3790
|
-
const x =
|
|
3776
|
+
const a = e.match(/^!\[[^\]]*\]\(([^)]+)\)\s*$/);
|
|
3777
|
+
if (!a) return null;
|
|
3778
|
+
const x = a[1].trim().replace(/^<|>$/g, "");
|
|
3791
3779
|
return lt(x) ? x : null;
|
|
3792
3780
|
}
|
|
3793
3781
|
async function bt(e) {
|
|
3794
3782
|
var U;
|
|
3795
|
-
const
|
|
3796
|
-
if (
|
|
3797
|
-
const B = Math.max(1,
|
|
3783
|
+
const a = (U = o.uploadSizeLimit) == null ? void 0 : U.video;
|
|
3784
|
+
if (a) {
|
|
3785
|
+
const B = Math.max(1, a) * 1024 * 1024;
|
|
3798
3786
|
if (e.size > B) {
|
|
3799
3787
|
try {
|
|
3800
|
-
window.alert(`视频文件大小超限(${(e.size / 1024 / 1024).toFixed(2)}MB > ${
|
|
3788
|
+
window.alert(`视频文件大小超限(${(e.size / 1024 / 1024).toFixed(2)}MB > ${a}MB)`);
|
|
3801
3789
|
} catch {
|
|
3802
3790
|
}
|
|
3803
3791
|
return;
|
|
@@ -3829,7 +3817,7 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3829
3817
|
const x = URL.createObjectURL(e);
|
|
3830
3818
|
W(x);
|
|
3831
3819
|
}
|
|
3832
|
-
function St(e,
|
|
3820
|
+
function St(e, a) {
|
|
3833
3821
|
const x = i.value;
|
|
3834
3822
|
if (!x) return;
|
|
3835
3823
|
const { state: U } = x, { doc: B } = U;
|
|
@@ -3840,98 +3828,98 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3840
3828
|
}), H != null) {
|
|
3841
3829
|
const E = B.nodeAt(H), N = U.schema.nodes.video;
|
|
3842
3830
|
if (!E || !N) return;
|
|
3843
|
-
const q = { ...E.attrs || {}, src:
|
|
3831
|
+
const q = { ...E.attrs || {}, src: a, uploading: null }, X = U.tr.setNodeMarkup(H, N, q, E.marks);
|
|
3844
3832
|
x.view.dispatch(X);
|
|
3845
3833
|
}
|
|
3846
3834
|
}
|
|
3847
3835
|
function Ut() {
|
|
3848
|
-
var e,
|
|
3849
|
-
$.value = ((
|
|
3836
|
+
var e, a;
|
|
3837
|
+
$.value = ((a = (e = i.value) == null ? void 0 : e.getAttributes("link")) == null ? void 0 : a.href) || "", C.value = !0;
|
|
3850
3838
|
}
|
|
3851
3839
|
function Et() {
|
|
3852
3840
|
const e = i.value;
|
|
3853
3841
|
if (!e) return;
|
|
3854
|
-
const
|
|
3842
|
+
const a = [];
|
|
3855
3843
|
e.state.doc.descendants((x, U) => {
|
|
3856
3844
|
if (x.type.name === "heading") {
|
|
3857
3845
|
const B = x.attrs.level || 1, H = x.textContent || "";
|
|
3858
|
-
|
|
3846
|
+
a.push({ text: H, level: B, pos: U });
|
|
3859
3847
|
}
|
|
3860
|
-
}), h.value =
|
|
3848
|
+
}), h.value = a, Dt();
|
|
3861
3849
|
}
|
|
3862
3850
|
function Dt() {
|
|
3863
|
-
const e = i.value,
|
|
3864
|
-
if (!e || !
|
|
3865
|
-
|
|
3851
|
+
const e = i.value, a = s.value, x = h.value;
|
|
3852
|
+
if (!e || !a || !x.length) {
|
|
3853
|
+
u.value = [], m.value = null;
|
|
3866
3854
|
return;
|
|
3867
3855
|
}
|
|
3868
|
-
const U =
|
|
3869
|
-
const pt = e.view.coordsAtPos(Math.min(X.pos + 1, e.state.doc.content.size)).top - U.top +
|
|
3856
|
+
const U = a.getBoundingClientRect(), B = a.scrollHeight || a.clientHeight, H = a.clientHeight || 1, E = x.map((X) => {
|
|
3857
|
+
const pt = e.view.coordsAtPos(Math.min(X.pos + 1, e.state.doc.content.size)).top - U.top + a.scrollTop, zt = B ? Math.max(0, Math.min(1, pt / B)) : 0;
|
|
3870
3858
|
return Math.round(zt * H);
|
|
3871
3859
|
});
|
|
3872
|
-
|
|
3873
|
-
const N =
|
|
3860
|
+
u.value = E;
|
|
3861
|
+
const N = a.scrollTop + 8;
|
|
3874
3862
|
let q = null;
|
|
3875
3863
|
for (let X = 0; X < x.length; X++) {
|
|
3876
3864
|
const rt = x[X];
|
|
3877
|
-
if (e.view.coordsAtPos(Math.min(rt.pos + 1, e.state.doc.content.size)).top - U.top +
|
|
3865
|
+
if (e.view.coordsAtPos(Math.min(rt.pos + 1, e.state.doc.content.size)).top - U.top + a.scrollTop <= N) q = rt.pos;
|
|
3878
3866
|
else break;
|
|
3879
3867
|
}
|
|
3880
3868
|
m.value = q;
|
|
3881
3869
|
}
|
|
3882
3870
|
function L(e) {
|
|
3883
|
-
const
|
|
3884
|
-
|
|
3871
|
+
const a = e.target;
|
|
3872
|
+
a.closest(".outline") || a.closest(".outline-toggle") || i.value && i.value.chain().focus().run();
|
|
3885
3873
|
}
|
|
3886
3874
|
function _() {
|
|
3887
3875
|
const e = i.value;
|
|
3888
3876
|
return e ? e.getMarkdown() : "";
|
|
3889
3877
|
}
|
|
3890
|
-
return d({ getMarkdown: _ }), (e,
|
|
3878
|
+
return d({ getMarkdown: _ }), (e, a) => (T(), V("div", {
|
|
3891
3879
|
class: J(["simple-editor", { fullscreen: l.value, readonly: !!o.readonly }]),
|
|
3892
3880
|
style: dt(g.value)
|
|
3893
3881
|
}, [
|
|
3894
|
-
|
|
3882
|
+
v(z(ys), {
|
|
3895
3883
|
editor: i.value,
|
|
3896
|
-
currentColor:
|
|
3884
|
+
currentColor: M.value,
|
|
3897
3885
|
imageUploader: t.imageUploader,
|
|
3898
3886
|
videoUploader: t.videoUploader,
|
|
3899
3887
|
"upload-size-limit": o.uploadSizeLimit,
|
|
3900
3888
|
fullscreen: l.value,
|
|
3901
3889
|
disabled: !!o.readonly,
|
|
3902
|
-
onToggleFullscreen:
|
|
3890
|
+
onToggleFullscreen: a[0] || (a[0] = (x) => l.value = !l.value),
|
|
3903
3891
|
onOpenLinkModal: Ut
|
|
3904
3892
|
}, null, 8, ["editor", "currentColor", "imageUploader", "videoUploader", "upload-size-limit", "fullscreen", "disabled"]),
|
|
3905
|
-
|
|
3893
|
+
c("div", {
|
|
3906
3894
|
class: J(["editor_main", { hasOutline: b.value }])
|
|
3907
3895
|
}, [
|
|
3908
|
-
|
|
3896
|
+
c("div", {
|
|
3909
3897
|
ref_key: "wrapperRef",
|
|
3910
3898
|
ref: s,
|
|
3911
3899
|
class: "editor_wrapper",
|
|
3912
3900
|
onClick: L
|
|
3913
3901
|
}, [
|
|
3914
|
-
|
|
3902
|
+
v(z(ce), {
|
|
3915
3903
|
editor: i.value,
|
|
3916
3904
|
class: "content"
|
|
3917
3905
|
}, null, 8, ["editor"])
|
|
3918
3906
|
], 512),
|
|
3919
|
-
|
|
3907
|
+
v(z($s), {
|
|
3920
3908
|
open: b.value,
|
|
3921
|
-
"onUpdate:open":
|
|
3909
|
+
"onUpdate:open": a[1] || (a[1] = (x) => b.value = x),
|
|
3922
3910
|
items: h.value,
|
|
3923
3911
|
editor: i.value,
|
|
3924
3912
|
container: s.value,
|
|
3925
|
-
maxHeight:
|
|
3913
|
+
maxHeight: p.value,
|
|
3926
3914
|
pinned: y.value,
|
|
3927
|
-
"onUpdate:pinned":
|
|
3915
|
+
"onUpdate:pinned": a[2] || (a[2] = (x) => y.value = x)
|
|
3928
3916
|
}, null, 8, ["open", "items", "editor", "container", "maxHeight", "pinned"]),
|
|
3929
3917
|
b.value ? K("", !0) : (T(), V("div", {
|
|
3930
3918
|
key: 0,
|
|
3931
3919
|
class: "outline-markers",
|
|
3932
|
-
onMouseenter:
|
|
3920
|
+
onMouseenter: a[3] || (a[3] = (x) => (b.value = !0, y.value = !1))
|
|
3933
3921
|
}, [
|
|
3934
|
-
(T(!0), V(mt, null, kt(
|
|
3922
|
+
(T(!0), V(mt, null, kt(u.value, (x, U) => {
|
|
3935
3923
|
var B;
|
|
3936
3924
|
return T(), V("span", {
|
|
3937
3925
|
key: U,
|
|
@@ -3941,18 +3929,18 @@ const Bt = ft("check", !0, function(t) {
|
|
|
3941
3929
|
var E, N;
|
|
3942
3930
|
return (N = i.value) == null ? void 0 : N.chain().focus().setTextSelection((((E = h.value[U]) == null ? void 0 : E.pos) || 1) + 1).run();
|
|
3943
3931
|
}, ["stop"])
|
|
3944
|
-
}, null, 14,
|
|
3932
|
+
}, null, 14, Ss);
|
|
3945
3933
|
}), 128))
|
|
3946
3934
|
], 32))
|
|
3947
3935
|
], 2)
|
|
3948
3936
|
], 6));
|
|
3949
3937
|
}
|
|
3950
|
-
}),
|
|
3938
|
+
}), Ds = /* @__PURE__ */ st(Es, [["__scopeId", "data-v-f468eecc"]]), Ys = {
|
|
3951
3939
|
install(t) {
|
|
3952
|
-
t.component("Editor",
|
|
3940
|
+
t.component("Editor", Ds);
|
|
3953
3941
|
}
|
|
3954
3942
|
};
|
|
3955
3943
|
export {
|
|
3956
|
-
|
|
3957
|
-
|
|
3944
|
+
Ds as Editor,
|
|
3945
|
+
Ys as default
|
|
3958
3946
|
};
|