@jenkin-a/jeditor 1.0.4 → 1.0.5

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/jeditor.css CHANGED
@@ -1,2 +1,2 @@
1
- :root{--je-blue:#0052d9;--je-blue-active:#e6f0ff;--je-divider:#e0e0e0;--je-hover:#eee;--je-radius:4px}.je-container{-webkit-font-smoothing:antialiased;background:#fff;border:1px solid #e6e6e6;border-radius:4px;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,sans-serif;display:flex;overflow:visible}.je-toolbar-row{z-index:40;flex-shrink:0;align-items:center;gap:1px;padding:0 12px;display:flex;position:sticky}.je-toolbar-row--primary{background:#fff;height:44px;top:0}.je-toolbar-row--secondary{background:#f3f4f6;border-radius:6px;height:42px;margin:0 8px 4px;position:sticky;top:44px}.je-toolbar-row--secondary:after{content:"";pointer-events:none;opacity:0;background:#eef0f2;height:1px;transition:opacity .12s;position:absolute;bottom:-5px;left:-8px;right:-8px}.je-container.is-scrolled .je-toolbar-row--secondary:after{opacity:1}.je-spacer{flex:1}.v-divider{background-color:var(--je-divider);flex-shrink:0;width:1px;height:16px;margin:0 6px}.tool-btn,.tool-btn-text,.tool-btn-arrow-down{border-radius:var(--je-radius);color:#444;cursor:pointer;background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;gap:2px;line-height:1;transition:background-color .1s;display:inline-flex}.tool-btn{width:28px;height:28px;padding:0;font-size:13px}.tool-btn:hover{background-color:var(--je-hover)}.tool-btn.is-muted,.tool-btn-text.is-muted,.je-color-group.is-muted{color:#9ca3af;opacity:1;pointer-events:none}.tool-btn-text{white-space:nowrap;height:28px;padding:0 6px;font-size:13px}.tool-btn-text:hover{background-color:var(--je-hover)}.tool-btn-text--icon{gap:4px}.tool-btn-arrow-down{color:#999;width:16px;height:28px;padding:0}.tool-btn-arrow-down:hover{background-color:var(--je-hover)}.tool-btn svg,.tool-btn-text svg,.tool-btn-arrow-down svg{flex-shrink:0;width:20px;height:20px}.tool-btn-text svg,.tool-btn-arrow-down svg{width:14px;height:14px}.je-color-group{flex-shrink:0;align-items:center;display:inline-flex}.je-color-inner{justify-content:center;align-items:center;line-height:1;display:flex}.je-color-chip{background:0 0;border-radius:6px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;display:inline-flex}.je-color-char{color:currentColor;font-size:14px;font-weight:600}.tool-btn.is-active,.tool-btn-text.is-active,.je-color-group.is-active{background-color:var(--je-blue-active);color:var(--je-blue)}.tool-btn.is-disabled,.tool-btn-text.is-disabled,.je-color-group.is-disabled{opacity:.35;pointer-events:none;cursor:default}.je-container.is-source-mode .je-toolbar-row .is-disabled{opacity:.35}.tool-btn.is-muted:hover,.tool-btn-text.is-muted:hover{background:0 0}.is-overflow-hidden{display:none!important}.je-editor-area,.je-editor-visual{flex-direction:column;flex:1;display:flex}.je-document-preview{background:#fff;border:none;width:100%;min-height:700px;display:none}.je-document-preview.is-active{display:block}.je-source-pane{box-sizing:border-box;background:linear-gradient(#f8fafc 0%,#fff 100%);flex:1;grid-template-columns:minmax(320px,1fr) minmax(320px,1fr);gap:16px;min-height:700px;padding:20px 24px 24px;display:none}.je-source-pane.is-active{display:grid}.je-source-textarea{color:#0f172a;resize:none;box-sizing:border-box;white-space:pre;background:#fff;border:1px solid #e5e7eb;border-radius:14px;outline:none;width:100%;min-height:100%;padding:18px 20px;font:13px/1.7 JetBrains Mono,SFMono-Regular,Consolas,monospace}.je-source-textarea:focus{border-color:#bfdbfe;box-shadow:0 0 0 4px #bfdbfe59}.je-source-preview{box-sizing:border-box;background:#fff;border:1px solid #e5e7eb;border-radius:14px;width:100%;min-height:100%}.je-editor-area .tiptap{cursor:text;color:#333;overflow-wrap:anywhere;word-break:break-word;outline:none;flex:1;max-width:100%;min-height:700px;padding:32px 60px;font-size:14px;line-height:1.7}.je-editor-area .tiptap h1{margin-bottom:.5em;font-size:2em;font-weight:700}.je-editor-area .tiptap h2{margin-bottom:.5em;font-size:1.5em;font-weight:700}.je-editor-area .tiptap h3{margin-bottom:.5em;font-size:1.25em;font-weight:700}.je-editor-area .tiptap p{margin-bottom:.8em;line-height:1.7}.je-editor-area .tiptap blockquote{color:#111827;background:#f3f4f6;border-left:3px solid #374151;margin:.8em 0;padding:8px 16px 8px 18px}.je-editor-area .tiptap ul{margin-bottom:.8em;padding-left:1.7em;list-style-type:disc}.je-editor-area .tiptap ul li::marker{color:#1c81d9}.je-editor-area .tiptap ol{counter-reset:je-ol;margin-bottom:.8em;padding-left:3.2em;list-style-type:none}.je-editor-area .tiptap ol>li{counter-increment:je-ol;position:relative}.je-editor-area .tiptap ol>li:before{content:counter(je-ol) ".";color:#1c81d9;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;width:2.6em;position:absolute;left:-3.2em}.je-editor-area .tiptap ol ol{counter-reset:je-sub-ol;padding-left:3.8em}.je-editor-area .tiptap ol ol>li{counter-increment:je-sub-ol}.je-editor-area .tiptap ol ol>li:before{content:counter(je-ol) "." counter(je-sub-ol);width:3.2em;left:-3.8em}.je-editor-area .tiptap ol ol ol{counter-reset:je-sub-sub-ol;padding-left:4.8em}.je-editor-area .tiptap ol ol ol>li{counter-increment:je-sub-sub-ol}.je-editor-area .tiptap ol ol ol>li:before{content:counter(je-ol) "." counter(je-sub-ol) "." counter(je-sub-sub-ol);width:4.2em;left:-4.8em}.je-editor-area .tiptap li>p{margin-bottom:.35em}.je-editor-area .tiptap h1,.je-editor-area .tiptap h2,.je-editor-area .tiptap h3,.je-editor-area .tiptap h4,.je-editor-area .tiptap h5,.je-editor-area .tiptap h6,.je-editor-area .tiptap p,.je-editor-area .tiptap li,.je-editor-area .tiptap blockquote{overflow-wrap:anywhere;word-break:break-word;max-width:100%}.je-editor-area .tiptap hr{background:#e5e7eb;border:none;height:1px;margin:1.1em 0}.je-editor-area .tiptap code{color:#c2410c;background:#f7f9fc;border:1px solid #e8edf3;border-radius:6px;padding:.14em .42em;font-family:JetBrains Mono,SFMono-Regular,Consolas,monospace;font-size:.92em;font-weight:700}.je-editor-area .tiptap a{color:#2563eb;text-underline-offset:2px;text-decoration:underline;text-decoration-thickness:1px}.je-editor-area .tiptap .tableWrapper{width:fit-content;max-width:100%;margin:1em 0;position:relative}.je-editor-area .tiptap table{border-collapse:collapse;table-layout:fixed;background:#fff;width:auto;margin:1em 0}.je-editor-area .tiptap th,.je-editor-area .tiptap td{vertical-align:top;border:1px solid #e5e7eb;width:8px;min-width:8px;height:4px;padding:4px 8px}.je-editor-area .tiptap th{color:#374151;background:#f8fafc;font-weight:600}.je-modal-overlay{z-index:1400;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0f172a2e;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.je-modal{background:#fff;border:1px solid #e8edf3;border-radius:14px;width:min(430px,100vw - 32px);padding:22px 24px 20px;box-shadow:0 24px 60px #0f172a29}.je-modal-title{color:#111827;margin-bottom:18px;font-size:18px;font-weight:700}.je-modal-field{grid-template-columns:44px 1fr;align-items:center;gap:10px;margin-bottom:14px;display:grid}.je-modal-label{color:#374151;font-size:14px}.je-modal-input{color:#111827;background:#f9fbfd;border:1px solid #dbe3ec;border-radius:8px;outline:none;height:36px;padding:0 12px;font-size:14px}.je-modal-input::placeholder{color:#9ca3af}.je-modal-input:focus{background:#fff;border-color:#9ec5fe;box-shadow:0 0 0 3px #93c5fd2e}.je-modal-actions{justify-content:flex-end;gap:10px;margin-top:24px;display:flex}.je-modal-btn{color:#374151;cursor:pointer;background:#fff;border:1px solid #e3e8ef;border-radius:8px;min-width:70px;height:34px;padding:0 14px;font-size:14px;transition:background-color .12s,border-color .12s,color .12s}.je-modal-btn:hover{background:#f8fafc;border-color:#d4dde8}.je-modal-btn.is-primary{color:#3b82f6;background:#ddebff;border-color:#cfe1f8}.je-modal-btn.is-primary:hover{background:#d3e6ff;border-color:#bfd6f6}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background:#ddd;border-radius:10px}.image-node-wrapper{cursor:default;-webkit-user-select:none;user-select:none;line-height:0;display:inline-block;position:relative}.image-node-wrapper img{border:2px solid #0000;border-radius:2px;max-width:100%;transition:border-color .15s;display:block}.image-node-wrapper.is-selected img{border-color:var(--je-blue)}.image-resize-handle{background:var(--je-blue);z-index:10;border-radius:50%;width:10px;height:10px;display:none;position:absolute}.image-node-wrapper.is-selected .image-resize-handle{display:block}.image-resize-handle[data-corner=tl]{cursor:nwse-resize;top:-5px;left:-5px}.image-resize-handle[data-corner=tr]{cursor:nesw-resize;top:-5px;right:-5px}.image-resize-handle[data-corner=bl]{cursor:nesw-resize;bottom:-5px;left:-5px}.image-resize-handle[data-corner=br]{cursor:nwse-resize;bottom:-5px;right:-5px}.je-code-button{color:#1d4ed8;font-family:Courier New,monospace;font-weight:700}.je-popover{z-index:1000;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fffffff5;border:1px solid #e5e7eb;border-radius:14px;min-width:180px;padding:10px;position:absolute;box-shadow:0 10px 28px #0f172a1a}.je-popover-list{flex-direction:column;gap:4px;display:flex}.je-popover-list--scroll{max-height:260px;overflow-y:auto}.je-popover-list--font-family{max-height:312px}.je-popover--font-family{min-width:144px;max-width:180px}.je-popover--font-size{min-width:126px;max-width:150px}.je-popover-item{color:#374151;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:10px;align-items:center;gap:8px;width:100%;padding:8px 10px;font-size:13px;display:flex}.je-popover-item svg{flex-shrink:0;width:16px;height:16px}.je-popover-item:hover{background:#f3f4f6}.je-popover-color{width:fit-content;min-width:unset;max-width:calc(100vw - 32px)}.je-color-section+.je-color-section{margin-top:10px}.je-color-section-title{color:#9ca3af;margin-bottom:8px;font-size:12px;font-weight:500}.je-color-grid{grid-template-columns:repeat(6,30px);justify-content:start;gap:6px;display:grid}.je-color-grid--recent{grid-template-columns:repeat(6,30px)}.je-color-swatch{cursor:pointer;color:#6b7280;background:#fff;border:1px solid #d1d5db;border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;transition:transform .12s,border-color .12s,box-shadow .12s;display:inline-flex}.je-color-swatch:hover{border-color:#93c5fd;transform:translateY(-1px);box-shadow:0 0 0 3px #3b82f624}.je-color-swatch.is-empty{opacity:.28;cursor:default}.je-color-swatch--filled{border-color:#d1d5db}.je-color-swatch--text{background:#fff;padding:0}.je-color-swatch--custom,.je-color-swatch--clear,.je-color-swatch--combo{background:#fff}.je-color-swatch--custom{position:relative;overflow:hidden}.je-style-preview{background:0 0;border-radius:5px;justify-content:center;align-items:center;width:18px;height:18px;font-size:15px;font-weight:700;display:inline-flex}.je-style-preview.is-empty{opacity:.45;box-shadow:inset 0 0 0 1px #d1d5dbe6}.je-style-preview.is-clear{color:#9ca3af}.je-color-custom-panel{background:#fafbfc;border:1px solid #eef2f7;border-radius:10px;flex-direction:column;gap:8px;margin-top:10px;padding:10px;display:flex}.je-color-custom-panel.is-hidden{display:none}.je-color-custom-title{color:#9ca3af;font-size:12px;font-weight:500}.je-color-picker{cursor:pointer;background:#fff;border:1px solid #edf2f7;border-radius:8px;width:100%;height:34px;padding:2px}.je-color-actions{gap:6px;display:flex}.je-action-btn{color:#667085;cursor:pointer;background:#fff;border:1px solid #e8edf3;border-radius:8px;flex:1;height:30px;padding:0 10px;font-size:12px;transition:background-color .12s,border-color .12s,color .12s}.je-action-btn:hover{background:#f8fafc;border-color:#dde5ee}.je-action-btn.is-primary{color:#4b5563;background:#eef3f8;border-color:#dbe5f0}.je-action-btn.is-primary:hover{background:#e4ebf3;border-color:#ced8e4}.je-callout-item{color:#374151;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:10px;grid-template-columns:30px 1fr;align-items:center;gap:10px;width:100%;padding:8px 10px;display:grid}.je-callout-item:hover{background:#f3f4f6}.je-callout-badge{border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;font-size:14px;font-weight:700;display:inline-flex}.je-callout-content{flex-direction:column;gap:2px;display:flex}.je-callout-label{color:#111827;font-size:13px;font-weight:600}.je-callout-short{color:#9ca3af;font-size:12px}.je-editor-area .tiptap .je-callout-wrapper{box-sizing:border-box;width:auto;margin:12px 0;position:relative}.je-editor-area .tiptap .je-callout{background:var(--je-callout-bg,#faf8ff);width:auto;color:var(--je-callout-color,#9333ea);box-sizing:border-box;border:1px solid #0000;border-radius:14px;margin:0;padding:14px 16px;position:relative}.je-editor-area .tiptap .je-callout-header{-webkit-user-select:none;user-select:none;align-items:center;gap:10px;margin-bottom:10px;display:flex}.je-editor-area .tiptap .je-callout-drag-handle{width:24px;height:24px;color:inherit;cursor:grab;opacity:0;pointer-events:none;background:0 0;border:none;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .18s,background-color .12s;display:inline-flex}.je-editor-area .tiptap .je-callout-wrapper:hover .je-callout-drag-handle,.je-editor-area .tiptap .je-callout-wrapper.is-handle-visible .je-callout-drag-handle,.je-editor-area .tiptap .je-callout-wrapper.ProseMirror-selectednode .je-callout-drag-handle,.je-editor-area .tiptap .je-callout-drag-handle:focus-visible{opacity:1;pointer-events:auto}.je-editor-area .tiptap .je-callout-drag-handle:hover,.je-editor-area .tiptap .je-callout-drag-handle:focus-visible{background:#ffffff80;outline:none}.je-editor-area .tiptap .je-callout-drag-handle svg{width:14px;height:14px}.je-editor-area .tiptap .je-callout-wrapper.ProseMirror-selectednode .je-callout{border-color:var(--je-callout-color,#9333ea);box-shadow:0 0 0 2px color-mix(in srgb, var(--je-callout-color,#9333ea) 12%, transparent)}.je-editor-area .tiptap .je-callout-title-btn{color:inherit;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;padding:0;font-size:14px;font-weight:700;display:inline-flex}.je-editor-area .tiptap .je-callout-title-btn svg,.je-editor-area .tiptap .je-callout-icon svg{width:18px;height:18px}.je-editor-area .tiptap .je-callout-body>:last-child{margin-bottom:0}.je-editor-area .tiptap .je-callout-body{color:inherit;min-height:24px}.je-callout-type-popover{z-index:1001;min-width:220px;position:absolute}.je-insert-popover{min-width:160px;padding:8px}.je-insert-item{color:#374151;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:10px;justify-content:space-between;align-items:center;width:100%;min-height:34px;padding:0 10px;display:flex}.je-insert-item:hover{background:#f3f6fa}.je-insert-item-main{align-items:center;gap:8px;display:inline-flex}.je-insert-item-icon,.je-insert-item-arrow{color:#6b7280;justify-content:center;align-items:center;display:inline-flex}.je-insert-item-icon svg{width:16px;height:16px}.je-insert-table-panel{flex-direction:column;align-items:center;width:fit-content;min-width:216px;padding:10px;display:flex}.je-insert-table-title{color:#6b7280;width:196px;margin-bottom:10px;font-size:13px}.je-insert-table-grid{grid-template-columns:repeat(10,16px);gap:4px;width:196px;display:grid}.je-insert-table-cell{cursor:pointer;background:#f8fafc;border:1px solid #dbe3ec;width:16px;height:16px}.je-insert-table-cell.is-active{background:#dbeafe;border-color:#93c5fd}.je-insert-table-info{color:#6b7280;width:196px;margin-top:10px;font-size:13px}.je-insert-table-custom{border-top:1px solid #eef2f7;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px;gap:6px;width:196px;margin-top:12px;padding-top:10px;display:grid}.je-insert-table-custom-field{color:#6b7280;flex-direction:column;gap:4px;font-size:12px;display:flex}.je-insert-table-number{box-sizing:border-box;background:#fff;border:1px solid #dbe3ec;border-radius:8px;outline:none;width:100%;height:30px;padding:0 8px}.je-insert-table-confirm{color:#4b5563;cursor:pointer;box-sizing:border-box;background:#eef3f8;border:1px solid #dbe5f0;border-radius:8px;align-self:end;width:100%;height:30px;padding:0}.je-table-wrap{width:fit-content;max-width:100%;position:relative}.je-table-move-handle,.je-table-resize-handle{z-index:3;opacity:0;transition:opacity .12s,background-color .12s;position:absolute}.je-table-wrap:hover .je-table-move-handle,.je-table-wrap:hover .je-table-resize-handle,.je-table-wrap.ProseMirror-selectednode .je-table-move-handle,.je-table-wrap.ProseMirror-selectednode .je-table-resize-handle{opacity:1}.je-table-move-handle{color:#6b7280;cursor:grab;background:#fff;border:1px solid #dbe3ec;border-radius:6px;justify-content:center;align-items:center;width:20px;height:20px;display:inline-flex;top:-10px;left:-10px}.je-table-move-handle svg{width:12px;height:12px}.je-table-resize-handle{cursor:nwse-resize;background:#cbd5e1;border-radius:4px;width:14px;height:14px;bottom:-8px;right:-8px}.je-code-block-wrap{background:#fff;border:1px solid #d0d7de;border-radius:12px;width:100%;margin:1em 0;position:relative;overflow:hidden}.je-code-block-header{background:#f6f8fa;align-items:center;gap:8px;min-height:34px;padding:0 12px;display:flex}.je-code-block-select{color:#6b7280;appearance:none;background:0 0;border:none;border-radius:0;outline:none;height:24px;padding:0 18px 0 0;font-size:12px}.je-code-block-select option{color:#111827}.je-code-block-header:after{content:"";pointer-events:none;border-bottom:1.5px solid #9ca3af;border-right:1.5px solid #9ca3af;width:10px;height:10px;margin-left:-12px;transform:rotate(45deg)scale(.6)}.je-code-block-spacer{flex:1}.je-code-block-copy{color:#6b7280;opacity:0;pointer-events:none;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;transition:opacity .12s,background-color .12s,color .12s;display:inline-flex}.je-code-block-copy:hover{color:#374151;background:#eaeef2}.je-code-block-copy.is-copied{color:#1d4ed8}.je-code-block-copy svg{width:14px;height:14px}.je-code-block-wrap:hover .je-code-block-copy,.je-code-block-wrap:focus-within .je-code-block-copy{opacity:1;pointer-events:auto}.je-code-block-wrap pre{background:0 0;margin:0;padding:12px 16px 16px;overflow-x:auto}.je-code-block-wrap pre code{color:#24292e;box-shadow:none;background:0 0;border:none;padding:0;font-size:13px;font-weight:400;display:block}.je-code-block-wrap pre code.je-code-block{box-shadow:none;background:0 0;border:none}.je-code-block-wrap .hljs-comment,.je-code-block-wrap .hljs-quote{color:#6a737d;font-style:italic}.je-code-block-wrap .hljs-keyword,.je-code-block-wrap .hljs-doctag,.je-code-block-wrap .hljs-selector-tag,.je-code-block-wrap .hljs-literal,.je-code-block-wrap .hljs-type{color:#d73a49}.je-code-block-wrap .hljs-string,.je-code-block-wrap .hljs-attr,.je-code-block-wrap .hljs-template-tag{color:#032f62}.je-code-block-wrap .hljs-number,.je-code-block-wrap .hljs-built_in,.je-code-block-wrap .hljs-title.class_,.je-code-block-wrap .hljs-symbol{color:#005cc5}.je-code-block-wrap .hljs-function,.je-code-block-wrap .hljs-title.function_{color:#6f42c1}.je-link-popover{z-index:1100;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#fffffffa;border:1px solid #e5e7eb;border-radius:10px;grid-template-columns:1fr auto;align-items:center;width:268px;min-height:36px;padding:0 8px;display:grid;position:absolute;box-shadow:0 10px 28px #0f172a1f}.je-link-popover__main{color:#2563eb;white-space:nowrap;text-overflow:ellipsis;align-items:center;font-size:13px;text-decoration:none;display:inline-flex;overflow:hidden}.je-link-popover__actions{align-items:center;gap:4px;margin-left:8px;display:inline-flex}.je-link-popover__action{color:#6b7280;cursor:pointer;background:#fff;border:1px solid #e5e7eb;border-radius:8px;width:28px;height:28px}.je-link-popover__action:hover{color:#374151;background:#f8fafc}.raw-html-island{background:linear-gradient(#f8fafc 0%,#fff 100%);border:1px solid #e5e7eb;border-radius:14px;margin:12px 0;overflow:hidden}.raw-html-island__header{color:#475569;letter-spacing:.02em;text-transform:uppercase;border-bottom:1px solid #eef2f7;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;font-size:12px;font-weight:700;display:flex}.raw-html-island__actions{align-items:center;gap:6px;display:inline-flex}.raw-html-island__action{color:#64748b;cursor:pointer;background:#fff;border:1px solid #e6ebf1;border-radius:8px;height:28px;padding:0 10px;font-size:12px;transition:background-color .12s,border-color .12s,color .12s}.raw-html-island__action:hover{color:#475569;background:#f8fafc;border-color:#d6dee8}.raw-html-island__action.is-danger{color:#b91c1c}.raw-html-island__body{color:#0f172a;white-space:pre-wrap;word-break:break-word;margin:0;padding:14px;font:12px/1.7 JetBrains Mono,SFMono-Regular,Consolas,monospace}.raw-html-island.is-editing .raw-html-island__body{display:none}.raw-html-island__editor{background:#fff;border-top:1px solid #eef2f7;padding:14px}.raw-html-island__editor.is-hidden{display:none}.raw-html-island__textarea{color:#0f172a;resize:vertical;box-sizing:border-box;white-space:pre;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;outline:none;width:100%;min-height:220px;padding:12px 14px;font:12px/1.7 JetBrains Mono,SFMono-Regular,Consolas,monospace}.raw-html-island__textarea:focus{background:#fff;border-color:#bfdbfe;box-shadow:0 0 0 4px #bfdbfe47}.raw-html-island__editor-actions{justify-content:flex-end;gap:8px;margin-top:10px;display:flex}.raw-html-island__action.is-primary{color:#4b5563;background:#eef3f8;border-color:#dbe5f0}.raw-html-island__action.is-primary:hover{background:#e4ebf3;border-color:#ced8e4}@media (width<=980px){.je-source-pane.is-active{grid-template-columns:1fr;min-height:auto}.je-source-textarea,.je-source-preview{min-height:360px}}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
1
+ :root{--je-blue:#0052d9;--je-blue-active:#e6f0ff;--je-divider:#e0e0e0;--je-hover:#eee;--je-radius:4px}.je-container{-webkit-font-smoothing:antialiased;background:#fff;border:1px solid #e6e6e6;border-radius:4px;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,sans-serif;display:flex;overflow:visible}:is(.je-container:fullscreen,.je-container.je-is-fullscreen){border:none;border-radius:0;width:100vw;max-width:none;height:100vh;max-height:none;overflow:hidden auto}:is(.je-container:fullscreen .je-editor-area,.je-container.je-is-fullscreen .je-editor-area,.je-container:fullscreen .je-editor-visual,.je-container.je-is-fullscreen .je-editor-visual){flex:auto;min-height:0}:is(.je-container:fullscreen .je-document-preview,.je-container.je-is-fullscreen .je-document-preview,.je-container:fullscreen .je-source-pane,.je-container.je-is-fullscreen .je-source-pane){min-height:0}.je-toolbar-row{z-index:40;flex-shrink:0;align-items:center;gap:1px;padding:0 12px;display:flex;position:sticky}.je-toolbar-row--primary{background:#fff;height:44px;top:0}.je-toolbar-row--secondary{background:#f3f4f6;border-radius:6px;height:42px;margin:0 8px 4px;position:sticky;top:44px}.je-toolbar-row--secondary:after{content:"";pointer-events:none;opacity:0;background:#eef0f2;height:1px;transition:opacity .12s;position:absolute;bottom:-5px;left:-8px;right:-8px}.je-container.is-scrolled .je-toolbar-row--secondary:after{opacity:1}.je-spacer{flex:1}.v-divider{background-color:var(--je-divider);flex-shrink:0;width:1px;height:16px;margin:0 6px}.tool-btn,.tool-btn-text,.tool-btn-arrow-down{border-radius:var(--je-radius);color:#444;cursor:pointer;background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;gap:2px;line-height:1;transition:background-color .1s;display:inline-flex}.tool-btn{width:28px;height:28px;padding:0;font-size:13px}.tool-btn:hover{background-color:var(--je-hover)}.tool-btn.is-muted,.tool-btn-text.is-muted,.je-color-group.is-muted{color:#9ca3af;opacity:1;pointer-events:none}.tool-btn-text{white-space:nowrap;height:28px;padding:0 6px;font-size:13px}.tool-btn-text:hover{background-color:var(--je-hover)}.tool-btn-text--icon{gap:4px}.tool-btn-arrow-down{color:#999;width:16px;height:28px;padding:0}.tool-btn-arrow-down:hover{background-color:var(--je-hover)}.tool-btn svg,.tool-btn-text svg,.tool-btn-arrow-down svg{flex-shrink:0;width:20px;height:20px}.tool-btn-text svg,.tool-btn-arrow-down svg{width:14px;height:14px}.je-color-group{flex-shrink:0;align-items:center;display:inline-flex}.je-color-inner{justify-content:center;align-items:center;line-height:1;display:flex}.je-color-chip{background:0 0;border-radius:6px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;display:inline-flex}.je-color-char{color:currentColor;font-size:14px;font-weight:600}.tool-btn.is-active,.tool-btn-text.is-active,.je-color-group.is-active{background-color:var(--je-blue-active);color:var(--je-blue)}.tool-btn.is-disabled,.tool-btn-text.is-disabled,.je-color-group.is-disabled{opacity:.35;pointer-events:none;cursor:default}.je-container.is-source-mode .je-toolbar-row .is-disabled{opacity:.35}.tool-btn.is-muted:hover,.tool-btn-text.is-muted:hover{background:0 0}.is-overflow-hidden{display:none!important}.je-editor-area,.je-editor-visual{flex-direction:column;flex:1;display:flex}.je-document-preview{background:#fff;border:none;width:100%;min-height:700px;display:none}.je-document-preview.is-active{display:block}.je-source-pane{box-sizing:border-box;background:linear-gradient(#f8fafc 0%,#fff 100%);flex:1;grid-template-columns:minmax(320px,1fr) minmax(320px,1fr);gap:16px;min-height:700px;padding:20px 24px 24px;display:none}.je-source-pane.is-active{display:grid}.je-source-textarea{color:#0f172a;resize:none;box-sizing:border-box;white-space:pre;background:#fff;border:1px solid #e5e7eb;border-radius:14px;outline:none;width:100%;min-height:100%;padding:18px 20px;font:13px/1.7 JetBrains Mono,SFMono-Regular,Consolas,monospace}.je-source-textarea:focus{border-color:#bfdbfe;box-shadow:0 0 0 4px #bfdbfe59}.je-source-preview{box-sizing:border-box;background:#fff;border:1px solid #e5e7eb;border-radius:14px;width:100%;min-height:100%}.je-editor-area .tiptap{cursor:text;color:#333;overflow-wrap:anywhere;word-break:break-word;outline:none;flex:1;max-width:100%;min-height:700px;padding:32px 60px;font-size:14px;line-height:1.7}.je-editor-area .tiptap h1{margin-bottom:.5em;font-size:2em;font-weight:700}.je-editor-area .tiptap h2{margin-bottom:.5em;font-size:1.5em;font-weight:700}.je-editor-area .tiptap h3{margin-bottom:.5em;font-size:1.25em;font-weight:700}.je-editor-area .tiptap p{margin-bottom:.8em;line-height:1.7}.je-editor-area .tiptap blockquote{color:#111827;background:#f3f4f6;border-left:3px solid #374151;margin:.8em 0;padding:8px 16px 8px 18px}.je-editor-area .tiptap ul{margin-bottom:.8em;padding-left:1.7em;list-style-type:disc}.je-editor-area .tiptap ul li::marker{color:#1c81d9}.je-editor-area .tiptap ol{counter-reset:je-ol;margin-bottom:.8em;padding-left:3.2em;list-style-type:none}.je-editor-area .tiptap ol>li{counter-increment:je-ol;position:relative}.je-editor-area .tiptap ol>li:before{content:counter(je-ol) ".";color:#1c81d9;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;width:2.6em;position:absolute;left:-3.2em}.je-editor-area .tiptap ol ol{counter-reset:je-sub-ol;padding-left:3.8em}.je-editor-area .tiptap ol ol>li{counter-increment:je-sub-ol}.je-editor-area .tiptap ol ol>li:before{content:counter(je-ol) "." counter(je-sub-ol);width:3.2em;left:-3.8em}.je-editor-area .tiptap ol ol ol{counter-reset:je-sub-sub-ol;padding-left:4.8em}.je-editor-area .tiptap ol ol ol>li{counter-increment:je-sub-sub-ol}.je-editor-area .tiptap ol ol ol>li:before{content:counter(je-ol) "." counter(je-sub-ol) "." counter(je-sub-sub-ol);width:4.2em;left:-4.8em}.je-editor-area .tiptap li>p{margin-bottom:.35em}.je-editor-area .tiptap h1,.je-editor-area .tiptap h2,.je-editor-area .tiptap h3,.je-editor-area .tiptap h4,.je-editor-area .tiptap h5,.je-editor-area .tiptap h6,.je-editor-area .tiptap p,.je-editor-area .tiptap li,.je-editor-area .tiptap blockquote{overflow-wrap:anywhere;word-break:break-word;max-width:100%}.je-editor-area .tiptap hr{background:#e5e7eb;border:none;height:1px;margin:1.1em 0}.je-editor-area .tiptap code{color:#c2410c;background:#f7f9fc;border:1px solid #e8edf3;border-radius:6px;padding:.14em .42em;font-family:JetBrains Mono,SFMono-Regular,Consolas,monospace;font-size:.92em;font-weight:700}.je-editor-area .tiptap a{color:#2563eb;text-underline-offset:2px;text-decoration:underline;text-decoration-thickness:1px}.je-editor-area .tiptap .tableWrapper{width:fit-content;max-width:100%;margin:1em 0;position:relative}.je-editor-area .tiptap table{border-collapse:collapse;table-layout:fixed;background:#fff;width:auto;margin:1em 0}.je-editor-area .tiptap th,.je-editor-area .tiptap td{vertical-align:top;border:1px solid #e5e7eb;width:8px;min-width:8px;height:4px;padding:4px 8px}.je-editor-area .tiptap th{color:#374151;background:#f8fafc;font-weight:600}.je-modal-overlay{z-index:1400;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0f172a2e;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.je-modal{background:#fff;border:1px solid #e8edf3;border-radius:14px;width:min(430px,100vw - 32px);padding:22px 24px 20px;box-shadow:0 24px 60px #0f172a29}.je-modal-title{color:#111827;margin-bottom:18px;font-size:18px;font-weight:700}.je-modal-field{grid-template-columns:44px 1fr;align-items:center;gap:10px;margin-bottom:14px;display:grid}.je-modal-label{color:#374151;font-size:14px}.je-modal-input{color:#111827;background:#f9fbfd;border:1px solid #dbe3ec;border-radius:8px;outline:none;height:36px;padding:0 12px;font-size:14px}.je-modal-input::placeholder{color:#9ca3af}.je-modal-input:focus{background:#fff;border-color:#9ec5fe;box-shadow:0 0 0 3px #93c5fd2e}.je-modal-actions{justify-content:flex-end;gap:10px;margin-top:24px;display:flex}.je-modal-btn{color:#374151;cursor:pointer;background:#fff;border:1px solid #e3e8ef;border-radius:8px;min-width:70px;height:34px;padding:0 14px;font-size:14px;transition:background-color .12s,border-color .12s,color .12s}.je-modal-btn:hover{background:#f8fafc;border-color:#d4dde8}.je-modal-btn.is-primary{color:#3b82f6;background:#ddebff;border-color:#cfe1f8}.je-modal-btn.is-primary:hover{background:#d3e6ff;border-color:#bfd6f6}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background:#ddd;border-radius:10px}.image-node-wrapper{cursor:default;-webkit-user-select:none;user-select:none;line-height:0;display:inline-block;position:relative}.image-node-wrapper img{border:2px solid #0000;border-radius:2px;max-width:100%;transition:border-color .15s;display:block}.image-node-wrapper.is-selected img{border-color:var(--je-blue)}.image-resize-handle{background:var(--je-blue);z-index:10;border-radius:50%;width:10px;height:10px;display:none;position:absolute}.image-node-wrapper.is-selected .image-resize-handle{display:block}.image-resize-handle[data-corner=tl]{cursor:nwse-resize;top:-5px;left:-5px}.image-resize-handle[data-corner=tr]{cursor:nesw-resize;top:-5px;right:-5px}.image-resize-handle[data-corner=bl]{cursor:nesw-resize;bottom:-5px;left:-5px}.image-resize-handle[data-corner=br]{cursor:nwse-resize;bottom:-5px;right:-5px}.je-code-button{color:#1d4ed8;font-family:Courier New,monospace;font-weight:700}.je-popover{z-index:1000;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#fffffff5;border:1px solid #e5e7eb;border-radius:14px;min-width:180px;padding:10px;position:absolute;box-shadow:0 10px 28px #0f172a1a}.je-popover-list{flex-direction:column;gap:4px;display:flex}.je-popover-list--scroll{max-height:260px;overflow-y:auto}.je-popover-list--font-family{max-height:312px}.je-popover--font-family{min-width:144px;max-width:180px}.je-popover--font-size{min-width:126px;max-width:150px}.je-popover-item{color:#374151;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:10px;align-items:center;gap:8px;width:100%;padding:8px 10px;font-size:13px;display:flex}.je-popover-item svg{flex-shrink:0;width:16px;height:16px}.je-popover-item:hover{background:#f3f4f6}.je-popover-color{width:fit-content;min-width:unset;max-width:calc(100vw - 32px)}.je-color-section+.je-color-section{margin-top:10px}.je-color-section-title{color:#9ca3af;margin-bottom:8px;font-size:12px;font-weight:500}.je-color-grid{grid-template-columns:repeat(6,30px);justify-content:start;gap:6px;display:grid}.je-color-grid--recent{grid-template-columns:repeat(6,30px)}.je-color-swatch{cursor:pointer;color:#6b7280;background:#fff;border:1px solid #d1d5db;border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;transition:transform .12s,border-color .12s,box-shadow .12s;display:inline-flex}.je-color-swatch:hover{border-color:#93c5fd;transform:translateY(-1px);box-shadow:0 0 0 3px #3b82f624}.je-color-swatch.is-empty{opacity:.28;cursor:default}.je-color-swatch--filled{border-color:#d1d5db}.je-color-swatch--text{background:#fff;padding:0}.je-color-swatch--custom,.je-color-swatch--clear,.je-color-swatch--combo{background:#fff}.je-color-swatch--custom{position:relative;overflow:hidden}.je-style-preview{background:0 0;border-radius:5px;justify-content:center;align-items:center;width:18px;height:18px;font-size:15px;font-weight:700;display:inline-flex}.je-style-preview.is-empty{opacity:.45;box-shadow:inset 0 0 0 1px #d1d5dbe6}.je-style-preview.is-clear{color:#9ca3af}.je-color-custom-panel{background:#fafbfc;border:1px solid #eef2f7;border-radius:10px;flex-direction:column;gap:8px;margin-top:10px;padding:10px;display:flex}.je-color-custom-panel.is-hidden{display:none}.je-color-custom-title{color:#9ca3af;font-size:12px;font-weight:500}.je-color-picker{cursor:pointer;background:#fff;border:1px solid #edf2f7;border-radius:8px;width:100%;height:34px;padding:2px}.je-color-actions{gap:6px;display:flex}.je-action-btn{color:#667085;cursor:pointer;background:#fff;border:1px solid #e8edf3;border-radius:8px;flex:1;height:30px;padding:0 10px;font-size:12px;transition:background-color .12s,border-color .12s,color .12s}.je-action-btn:hover{background:#f8fafc;border-color:#dde5ee}.je-action-btn.is-primary{color:#4b5563;background:#eef3f8;border-color:#dbe5f0}.je-action-btn.is-primary:hover{background:#e4ebf3;border-color:#ced8e4}.je-callout-item{color:#374151;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:10px;grid-template-columns:30px 1fr;align-items:center;gap:10px;width:100%;padding:8px 10px;display:grid}.je-callout-item:hover{background:#f3f4f6}.je-callout-badge{border-radius:8px;justify-content:center;align-items:center;width:30px;height:30px;font-size:14px;font-weight:700;display:inline-flex}.je-callout-content{flex-direction:column;gap:2px;display:flex}.je-callout-label{color:#111827;font-size:13px;font-weight:600}.je-callout-short{color:#9ca3af;font-size:12px}.je-editor-area .tiptap .je-callout-wrapper{box-sizing:border-box;width:auto;margin:12px 0;position:relative}.je-editor-area .tiptap .je-callout{background:var(--je-callout-bg,#faf8ff);width:auto;color:var(--je-callout-color,#9333ea);box-sizing:border-box;border:1px solid #0000;border-radius:14px;margin:0;padding:14px 16px;position:relative}.je-editor-area .tiptap .je-callout-header{-webkit-user-select:none;user-select:none;align-items:center;gap:10px;margin-bottom:10px;display:flex}.je-editor-area .tiptap .je-callout-drag-handle{width:24px;height:24px;color:inherit;cursor:grab;opacity:0;pointer-events:none;background:0 0;border:none;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .18s,background-color .12s;display:inline-flex}.je-editor-area .tiptap .je-callout-wrapper:hover .je-callout-drag-handle,.je-editor-area .tiptap .je-callout-wrapper.is-handle-visible .je-callout-drag-handle,.je-editor-area .tiptap .je-callout-wrapper.ProseMirror-selectednode .je-callout-drag-handle,.je-editor-area .tiptap .je-callout-drag-handle:focus-visible{opacity:1;pointer-events:auto}.je-editor-area .tiptap .je-callout-drag-handle:hover,.je-editor-area .tiptap .je-callout-drag-handle:focus-visible{background:#ffffff80;outline:none}.je-editor-area .tiptap .je-callout-drag-handle svg{width:14px;height:14px}.je-editor-area .tiptap .je-callout-wrapper.ProseMirror-selectednode .je-callout{border-color:var(--je-callout-color,#9333ea);box-shadow:0 0 0 2px color-mix(in srgb, var(--je-callout-color,#9333ea) 12%, transparent)}.je-editor-area .tiptap .je-callout-title-btn{color:inherit;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;padding:0;font-size:14px;font-weight:700;display:inline-flex}.je-editor-area .tiptap .je-callout-title-btn svg,.je-editor-area .tiptap .je-callout-icon svg{width:18px;height:18px}.je-editor-area .tiptap .je-callout-body>:last-child{margin-bottom:0}.je-editor-area .tiptap .je-callout-body{color:inherit;min-height:24px}.je-callout-type-popover{z-index:1001;min-width:220px;position:absolute}.je-insert-popover{min-width:160px;padding:8px}.je-insert-item{color:#374151;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:10px;justify-content:space-between;align-items:center;width:100%;min-height:34px;padding:0 10px;display:flex}.je-insert-item:hover{background:#f3f6fa}.je-insert-item-main{align-items:center;gap:8px;display:inline-flex}.je-insert-item-icon,.je-insert-item-arrow{color:#6b7280;justify-content:center;align-items:center;display:inline-flex}.je-insert-item-icon svg{width:16px;height:16px}.je-insert-table-panel{flex-direction:column;align-items:center;width:fit-content;min-width:216px;padding:10px;display:flex}.je-insert-table-title{color:#6b7280;width:196px;margin-bottom:10px;font-size:13px}.je-insert-table-grid{grid-template-columns:repeat(10,16px);gap:4px;width:196px;display:grid}.je-insert-table-cell{cursor:pointer;background:#f8fafc;border:1px solid #dbe3ec;width:16px;height:16px}.je-insert-table-cell.is-active{background:#dbeafe;border-color:#93c5fd}.je-insert-table-info{color:#6b7280;width:196px;margin-top:10px;font-size:13px}.je-insert-table-custom{border-top:1px solid #eef2f7;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px;gap:6px;width:196px;margin-top:12px;padding-top:10px;display:grid}.je-insert-table-custom-field{color:#6b7280;flex-direction:column;gap:4px;font-size:12px;display:flex}.je-insert-table-number{box-sizing:border-box;background:#fff;border:1px solid #dbe3ec;border-radius:8px;outline:none;width:100%;height:30px;padding:0 8px}.je-insert-table-confirm{color:#4b5563;cursor:pointer;box-sizing:border-box;background:#eef3f8;border:1px solid #dbe5f0;border-radius:8px;align-self:end;width:100%;height:30px;padding:0}.je-table-wrap{width:fit-content;max-width:100%;position:relative}.je-table-move-handle,.je-table-resize-handle{z-index:3;opacity:0;transition:opacity .12s,background-color .12s;position:absolute}.je-table-wrap:hover .je-table-move-handle,.je-table-wrap:hover .je-table-resize-handle,.je-table-wrap.ProseMirror-selectednode .je-table-move-handle,.je-table-wrap.ProseMirror-selectednode .je-table-resize-handle{opacity:1}.je-table-move-handle{color:#6b7280;cursor:grab;background:#fff;border:1px solid #dbe3ec;border-radius:6px;justify-content:center;align-items:center;width:20px;height:20px;display:inline-flex;top:-10px;left:-10px}.je-table-move-handle svg{width:12px;height:12px}.je-table-resize-handle{cursor:nwse-resize;background:#cbd5e1;border-radius:4px;width:14px;height:14px;bottom:-8px;right:-8px}.je-code-block-wrap{background:#fff;border:1px solid #d0d7de;border-radius:12px;width:100%;margin:1em 0;position:relative;overflow:hidden}.je-code-block-header{background:#f6f8fa;align-items:center;gap:8px;min-height:34px;padding:0 12px;display:flex}.je-code-block-select{color:#6b7280;appearance:none;background:0 0;border:none;border-radius:0;outline:none;height:24px;padding:0 18px 0 0;font-size:12px}.je-code-block-select option{color:#111827}.je-code-block-header:after{content:"";pointer-events:none;border-bottom:1.5px solid #9ca3af;border-right:1.5px solid #9ca3af;width:10px;height:10px;margin-left:-12px;transform:rotate(45deg)scale(.6)}.je-code-block-spacer{flex:1}.je-code-block-copy{color:#6b7280;opacity:0;pointer-events:none;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;transition:opacity .12s,background-color .12s,color .12s;display:inline-flex}.je-code-block-copy:hover{color:#374151;background:#eaeef2}.je-code-block-copy.is-copied{color:#1d4ed8}.je-code-block-copy svg{width:14px;height:14px}.je-code-block-wrap:hover .je-code-block-copy,.je-code-block-wrap:focus-within .je-code-block-copy{opacity:1;pointer-events:auto}.je-code-block-wrap pre{background:0 0;margin:0;padding:12px 16px 16px;overflow-x:auto}.je-code-block-wrap pre code{color:#24292e;box-shadow:none;background:0 0;border:none;padding:0;font-size:13px;font-weight:400;display:block}.je-code-block-wrap pre code.je-code-block{box-shadow:none;background:0 0;border:none}.je-code-block-wrap .hljs-comment,.je-code-block-wrap .hljs-quote{color:#6a737d;font-style:italic}.je-code-block-wrap .hljs-keyword,.je-code-block-wrap .hljs-doctag,.je-code-block-wrap .hljs-selector-tag,.je-code-block-wrap .hljs-literal,.je-code-block-wrap .hljs-type{color:#d73a49}.je-code-block-wrap .hljs-string,.je-code-block-wrap .hljs-attr,.je-code-block-wrap .hljs-template-tag{color:#032f62}.je-code-block-wrap .hljs-number,.je-code-block-wrap .hljs-built_in,.je-code-block-wrap .hljs-title.class_,.je-code-block-wrap .hljs-symbol{color:#005cc5}.je-code-block-wrap .hljs-function,.je-code-block-wrap .hljs-title.function_{color:#6f42c1}.je-link-popover{z-index:1100;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#fffffffa;border:1px solid #e5e7eb;border-radius:10px;grid-template-columns:1fr auto;align-items:center;width:268px;min-height:36px;padding:0 8px;display:grid;position:absolute;box-shadow:0 10px 28px #0f172a1f}.je-link-popover__main{color:#2563eb;white-space:nowrap;text-overflow:ellipsis;align-items:center;font-size:13px;text-decoration:none;display:inline-flex;overflow:hidden}.je-link-popover__actions{align-items:center;gap:4px;margin-left:8px;display:inline-flex}.je-link-popover__action{color:#6b7280;cursor:pointer;background:#fff;border:1px solid #e5e7eb;border-radius:8px;width:28px;height:28px}.je-link-popover__action:hover{color:#374151;background:#f8fafc}.raw-html-island{background:linear-gradient(#f8fafc 0%,#fff 100%);border:1px solid #e5e7eb;border-radius:14px;margin:12px 0;overflow:hidden}.raw-html-island__header{color:#475569;letter-spacing:.02em;text-transform:uppercase;border-bottom:1px solid #eef2f7;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;font-size:12px;font-weight:700;display:flex}.raw-html-island__actions{align-items:center;gap:6px;display:inline-flex}.raw-html-island__action{color:#64748b;cursor:pointer;background:#fff;border:1px solid #e6ebf1;border-radius:8px;height:28px;padding:0 10px;font-size:12px;transition:background-color .12s,border-color .12s,color .12s}.raw-html-island__action:hover{color:#475569;background:#f8fafc;border-color:#d6dee8}.raw-html-island__action.is-danger{color:#b91c1c}.raw-html-island__body{color:#0f172a;white-space:pre-wrap;word-break:break-word;margin:0;padding:14px;font:12px/1.7 JetBrains Mono,SFMono-Regular,Consolas,monospace}.raw-html-island.is-editing .raw-html-island__body{display:none}.raw-html-island__editor{background:#fff;border-top:1px solid #eef2f7;padding:14px}.raw-html-island__editor.is-hidden{display:none}.raw-html-island__textarea{color:#0f172a;resize:vertical;box-sizing:border-box;white-space:pre;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;outline:none;width:100%;min-height:220px;padding:12px 14px;font:12px/1.7 JetBrains Mono,SFMono-Regular,Consolas,monospace}.raw-html-island__textarea:focus{background:#fff;border-color:#bfdbfe;box-shadow:0 0 0 4px #bfdbfe47}.raw-html-island__editor-actions{justify-content:flex-end;gap:8px;margin-top:10px;display:flex}.raw-html-island__action.is-primary{color:#4b5563;background:#eef3f8;border-color:#dbe5f0}.raw-html-island__action.is-primary:hover{background:#e4ebf3;border-color:#ced8e4}@media (width<=980px){.je-source-pane.is-active{grid-template-columns:1fr;min-height:auto}.je-source-textarea,.je-source-preview{min-height:360px}}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}
2
2
  /*$vite$:1*/
@@ -2459,8 +2459,8 @@ var qt = {
2459
2459
  function Jt(e) {
2460
2460
  return e.options.element?.closest(".je-container");
2461
2461
  }
2462
- function Yt(e) {
2463
- document.documentElement.classList.toggle("je-fullscreen-page", e), document.body.classList.toggle("je-fullscreen-page", e);
2462
+ function Yt(e, t) {
2463
+ e && e.classList.toggle("je-is-fullscreen", t);
2464
2464
  }
2465
2465
  var Xt = {
2466
2466
  name: "fullscreen",
@@ -2473,10 +2473,10 @@ var Xt = {
2473
2473
  let t = Jt(e);
2474
2474
  if (t) {
2475
2475
  if (document.fullscreenElement === t) {
2476
- await document.exitFullscreen(), Yt(!1);
2476
+ await document.exitFullscreen(), Yt(t, !1);
2477
2477
  return;
2478
2478
  }
2479
- await t.requestFullscreen?.(), Yt(!0);
2479
+ await t.requestFullscreen?.(), Yt(t, !0);
2480
2480
  }
2481
2481
  },
2482
2482
  isActive: (e) => document.fullscreenElement === Jt(e),
@@ -2488,13 +2488,15 @@ var Xt = {
2488
2488
  };
2489
2489
  },
2490
2490
  init(e, t = {}) {
2491
- let n = () => {
2492
- document.fullscreenElement !== Jt(e) && Yt(!1), t.controller?.sync?.();
2491
+ let n = Jt(e), r = () => {
2492
+ Yt(n, document.fullscreenElement === n), t.controller?.sync?.();
2493
2493
  };
2494
- this._onFsChange = n, document.addEventListener("fullscreenchange", n);
2494
+ this._onFsChange = r, document.addEventListener("fullscreenchange", r);
2495
2495
  },
2496
2496
  destroy() {
2497
- this._onFsChange &&= (document.removeEventListener("fullscreenchange", this._onFsChange), null);
2497
+ this._onFsChange &&= (document.removeEventListener("fullscreenchange", this._onFsChange), null), document.querySelectorAll(".je-container.je-is-fullscreen").forEach((e) => {
2498
+ e.classList.remove("je-is-fullscreen");
2499
+ });
2498
2500
  }
2499
2501
  }, Zt = /* @__PURE__ */ new WeakMap(), Qt = {
2500
2502
  name: "source",
@@ -124,7 +124,7 @@ ${n}`}}),s}function zd(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
124
124
  ${e.hasSubmenu?`<span class="je-insert-item-arrow">${Kg}</span>`:``}
125
125
  `,e.hasSubmenu?r.addEventListener(`mouseenter`,()=>e.onHover(r)):r.addEventListener(`click`,e.onClick),t.appendChild(r)}var Zg={name:`insert`,toolbar:{text:`插入`,title:`插入`,dropdown:!0},tiptapExtension:null,command:()=>{},isActive:()=>!1,renderPopover(e,t){let n=document.createElement(`div`);return n.className=`je-popover je-insert-popover`,[{label:`表格`,icon:qg,hasSubmenu:!0,onHover(n){t.openNestedPopover(Yg(e,t),n)}},{label:`链接`,icon:f.link,onClick(){t.closePopover(),zm(e)}},{label:`HTML Block`,icon:f.htmlBlock,onClick(){t.closePopover(),e.chain().focus().insertRawHtmlIsland(`<div>
126
126
  Raw HTML
127
- </div>`).run()}}].forEach(e=>Xg(e,n,t)),n}};function Qg(e){return e.options.element?.closest(`.je-container`)}function $g(e){document.documentElement.classList.toggle(`je-fullscreen-page`,e),document.body.classList.toggle(`je-fullscreen-page`,e)}var e_={name:`fullscreen`,toolbar:{icon:f.maximize,title:`全屏`},tiptapExtension:null,command:async e=>{let t=Qg(e);if(t){if(document.fullscreenElement===t){await document.exitFullscreen(),$g(!1);return}await t.requestFullscreen?.(),$g(!0)}},isActive:e=>document.fullscreenElement===Qg(e),getToolbarState(e){let t=document.fullscreenElement===Qg(e);return{icon:t?f.minimize:f.maximize,title:t?`退出全屏`:`全屏`}},init(e,t={}){let n=()=>{document.fullscreenElement!==Qg(e)&&$g(!1),t.controller?.sync?.()};this._onFsChange=n,document.addEventListener(`fullscreenchange`,n)},destroy(){this._onFsChange&&=(document.removeEventListener(`fullscreenchange`,this._onFsChange),null)}},t_=new WeakMap,n_={name:`source`,toolbar:{icon:f.source,text:`Source`,title:`Source HTML`},tiptapExtension:null,init(e,t={}){t_.set(e,t.controller||null)},command:e=>{t_.get(e)?.toggle()},isActive:e=>!!t_.get(e)?.isActive()},r_=K.create({name:`genericDiv`,group:`block`,content:`block*`,defining:!0,addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)},id:{default:null,parseHTML:e=>e.getAttribute(`id`)}}},parseHTML(){return[{tag:`div`,getAttrs:e=>e.hasAttribute(`data-callout`)?!1:null}]},renderHTML({HTMLAttributes:e}){return[`div`,W(e),0]}});function i_(e){return{default:null,parseHTML:t=>t.getAttribute(e),renderHTML:t=>t[e]?{[e]:t[e]}:{}}}var a_=G.create({name:`globalStyle`,addGlobalAttributes(){return[{types:[`paragraph`,`heading`,`blockquote`,`bulletList`,`orderedList`,`listItem`,`codeBlock`,`genericDiv`,`image`,`table`,`tableRow`,`tableCell`,`tableHeader`,`callout`,`rawHtmlIsland`],attributes:{class:i_(`class`),style:i_(`style`),id:i_(`id`)}},{types:[`link`,`bold`,`italic`,`underline`,`strike`,`fontFamily`,`textColor`,`highlightColor`],attributes:{class:i_(`class`),style:i_(`style`)}}]}});function o_(e=``){try{return decodeURIComponent(e)}catch{return e}}function s_(e=``){return e.replace(/\s+/g,` `).trim().slice(0,180)||`HTML preserved`}var c_={name:`htmlPreservation`,toolbar:{},tiptapExtension:[r_,a_,K.create({name:`rawHtmlIsland`,group:`block`,atom:!0,selectable:!0,draggable:!0,isolating:!0,addAttributes(){return{rawHTML:{default:``,parseHTML:e=>o_(e.getAttribute(`data-raw-html`)||``),renderHTML:e=>({"data-raw-html":encodeURIComponent(e.rawHTML||``)})},class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)}}},parseHTML(){return[{tag:`raw-html[data-raw-html]`}]},renderHTML({HTMLAttributes:e}){return[`raw-html`,W(e)]},addCommands(){return{insertRawHtmlIsland:(e=`<div>
127
+ </div>`).run()}}].forEach(e=>Xg(e,n,t)),n}};function Qg(e){return e.options.element?.closest(`.je-container`)}function $g(e,t){e&&e.classList.toggle(`je-is-fullscreen`,t)}var e_={name:`fullscreen`,toolbar:{icon:f.maximize,title:`全屏`},tiptapExtension:null,command:async e=>{let t=Qg(e);if(t){if(document.fullscreenElement===t){await document.exitFullscreen(),$g(t,!1);return}await t.requestFullscreen?.(),$g(t,!0)}},isActive:e=>document.fullscreenElement===Qg(e),getToolbarState(e){let t=document.fullscreenElement===Qg(e);return{icon:t?f.minimize:f.maximize,title:t?`退出全屏`:`全屏`}},init(e,t={}){let n=Qg(e),r=()=>{$g(n,document.fullscreenElement===n),t.controller?.sync?.()};this._onFsChange=r,document.addEventListener(`fullscreenchange`,r)},destroy(){this._onFsChange&&=(document.removeEventListener(`fullscreenchange`,this._onFsChange),null),document.querySelectorAll(`.je-container.je-is-fullscreen`).forEach(e=>{e.classList.remove(`je-is-fullscreen`)})}},t_=new WeakMap,n_={name:`source`,toolbar:{icon:f.source,text:`Source`,title:`Source HTML`},tiptapExtension:null,init(e,t={}){t_.set(e,t.controller||null)},command:e=>{t_.get(e)?.toggle()},isActive:e=>!!t_.get(e)?.isActive()},r_=K.create({name:`genericDiv`,group:`block`,content:`block*`,defining:!0,addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)},id:{default:null,parseHTML:e=>e.getAttribute(`id`)}}},parseHTML(){return[{tag:`div`,getAttrs:e=>e.hasAttribute(`data-callout`)?!1:null}]},renderHTML({HTMLAttributes:e}){return[`div`,W(e),0]}});function i_(e){return{default:null,parseHTML:t=>t.getAttribute(e),renderHTML:t=>t[e]?{[e]:t[e]}:{}}}var a_=G.create({name:`globalStyle`,addGlobalAttributes(){return[{types:[`paragraph`,`heading`,`blockquote`,`bulletList`,`orderedList`,`listItem`,`codeBlock`,`genericDiv`,`image`,`table`,`tableRow`,`tableCell`,`tableHeader`,`callout`,`rawHtmlIsland`],attributes:{class:i_(`class`),style:i_(`style`),id:i_(`id`)}},{types:[`link`,`bold`,`italic`,`underline`,`strike`,`fontFamily`,`textColor`,`highlightColor`],attributes:{class:i_(`class`),style:i_(`style`)}}]}});function o_(e=``){try{return decodeURIComponent(e)}catch{return e}}function s_(e=``){return e.replace(/\s+/g,` `).trim().slice(0,180)||`HTML preserved`}var c_={name:`htmlPreservation`,toolbar:{},tiptapExtension:[r_,a_,K.create({name:`rawHtmlIsland`,group:`block`,atom:!0,selectable:!0,draggable:!0,isolating:!0,addAttributes(){return{rawHTML:{default:``,parseHTML:e=>o_(e.getAttribute(`data-raw-html`)||``),renderHTML:e=>({"data-raw-html":encodeURIComponent(e.rawHTML||``)})},class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)}}},parseHTML(){return[{tag:`raw-html[data-raw-html]`}]},renderHTML({HTMLAttributes:e}){return[`raw-html`,W(e)]},addCommands(){return{insertRawHtmlIsland:(e=`<div>
128
128
  Raw HTML
129
129
  </div>`)=>({commands:t})=>t.insertContent({type:this.name,attrs:{rawHTML:e}}),updateRawHtmlIsland:(e,t)=>({state:n,dispatch:r})=>{let i=n.doc.nodeAt(e);return!i||i.type.name!==this.name?!1:(r&&r(n.tr.setNodeMarkup(e,void 0,{...i.attrs,rawHTML:t})),!0)}}},addNodeView(){return({node:e,editor:t,getPos:n})=>{let r=e,i=!1,a=document.createElement(`div`);a.className=`raw-html-island`;let o=document.createElement(`div`);o.className=`raw-html-island__header`,o.textContent=`Raw HTML Block`;let s=document.createElement(`div`);s.className=`raw-html-island__actions`;let c=document.createElement(`button`);c.type=`button`,c.className=`raw-html-island__action`,c.textContent=`Edit`;let l=document.createElement(`button`);l.type=`button`,l.className=`raw-html-island__action`,l.textContent=`Copy`;let u=document.createElement(`button`);u.type=`button`,u.className=`raw-html-island__action is-danger`,u.textContent=`Delete`,s.append(c,l,u),o.appendChild(s);let d=document.createElement(`pre`);d.className=`raw-html-island__body`;let f=document.createElement(`div`);f.className=`raw-html-island__editor is-hidden`;let p=document.createElement(`textarea`);p.className=`raw-html-island__textarea`,p.spellcheck=!1;let m=document.createElement(`div`);m.className=`raw-html-island__editor-actions`;let h=document.createElement(`button`);h.type=`button`,h.className=`raw-html-island__action is-primary`,h.textContent=`Save`;let g=document.createElement(`button`);g.type=`button`,g.className=`raw-html-island__action`,g.textContent=`Cancel`,m.append(h,g),f.append(p,m);let _=e=>{r=e,d.textContent=s_(e.attrs.rawHTML),i||(p.value=e.attrs.rawHTML||``)},v=()=>{i=!0,p.value=r.attrs.rawHTML||``,a.classList.add(`is-editing`),f.classList.remove(`is-hidden`),p.focus(),p.setSelectionRange(p.value.length,p.value.length)},y=(e=!1)=>{e&&(p.value=r.attrs.rawHTML||``),i=!1,a.classList.remove(`is-editing`),f.classList.add(`is-hidden`)},b=()=>{let e=n(),r=p.value;t.commands.updateRawHtmlIsland(e,r),y(!1)};return c.addEventListener(`click`,()=>{v()}),a.addEventListener(`dblclick`,e=>{e.target.closest(`.raw-html-island__actions`)||v()}),l.addEventListener(`click`,async()=>{try{await navigator.clipboard?.writeText(r.attrs.rawHTML||``)}catch{}}),u.addEventListener(`click`,()=>{let e=n(),i=t.state.tr.delete(e,e+r.nodeSize);t.view.dispatch(i),t.commands.focus()}),h.addEventListener(`click`,b),g.addEventListener(`click`,()=>y(!0)),p.addEventListener(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),b()),e.key===`Escape`&&(e.preventDefault(),y(!0))}),_(e),a.append(o,d,f),{dom:a,update(e){return e.type.name===`rawHtmlIsland`?(_(e),!0):!1},stopEvent(e){return a.contains(e.target)}}}}}).configure({onOpenSource:null})],init(e,t={}){e.storage.rawHtmlIsland&&(e.storage.rawHtmlIsland.onOpenSource=t.onOpenSource||null)}},l_={name:`rawHtmlBlock`,toolbar:{icon:f.htmlBlock,text:`HTML`,title:`HTML Block`},tiptapExtension:null,command:e=>{e.chain().focus().insertRawHtmlIsland(`<div>
130
130
  Raw HTML
@@ -124,7 +124,7 @@ ${n}`}}),s}function zd(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
124
124
  ${e.hasSubmenu?`<span class="je-insert-item-arrow">${Kg}</span>`:``}
125
125
  `,e.hasSubmenu?r.addEventListener(`mouseenter`,()=>e.onHover(r)):r.addEventListener(`click`,e.onClick),t.appendChild(r)}var Zg={name:`insert`,toolbar:{text:`插入`,title:`插入`,dropdown:!0},tiptapExtension:null,command:()=>{},isActive:()=>!1,renderPopover(e,t){let n=document.createElement(`div`);return n.className=`je-popover je-insert-popover`,[{label:`表格`,icon:qg,hasSubmenu:!0,onHover(n){t.openNestedPopover(Yg(e,t),n)}},{label:`链接`,icon:f.link,onClick(){t.closePopover(),zm(e)}},{label:`HTML Block`,icon:f.htmlBlock,onClick(){t.closePopover(),e.chain().focus().insertRawHtmlIsland(`<div>
126
126
  Raw HTML
127
- </div>`).run()}}].forEach(e=>Xg(e,n,t)),n}};function Qg(e){return e.options.element?.closest(`.je-container`)}function $g(e){document.documentElement.classList.toggle(`je-fullscreen-page`,e),document.body.classList.toggle(`je-fullscreen-page`,e)}var e_={name:`fullscreen`,toolbar:{icon:f.maximize,title:`全屏`},tiptapExtension:null,command:async e=>{let t=Qg(e);if(t){if(document.fullscreenElement===t){await document.exitFullscreen(),$g(!1);return}await t.requestFullscreen?.(),$g(!0)}},isActive:e=>document.fullscreenElement===Qg(e),getToolbarState(e){let t=document.fullscreenElement===Qg(e);return{icon:t?f.minimize:f.maximize,title:t?`退出全屏`:`全屏`}},init(e,t={}){let n=()=>{document.fullscreenElement!==Qg(e)&&$g(!1),t.controller?.sync?.()};this._onFsChange=n,document.addEventListener(`fullscreenchange`,n)},destroy(){this._onFsChange&&=(document.removeEventListener(`fullscreenchange`,this._onFsChange),null)}},t_=new WeakMap,n_={name:`source`,toolbar:{icon:f.source,text:`Source`,title:`Source HTML`},tiptapExtension:null,init(e,t={}){t_.set(e,t.controller||null)},command:e=>{t_.get(e)?.toggle()},isActive:e=>!!t_.get(e)?.isActive()},r_=K.create({name:`genericDiv`,group:`block`,content:`block*`,defining:!0,addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)},id:{default:null,parseHTML:e=>e.getAttribute(`id`)}}},parseHTML(){return[{tag:`div`,getAttrs:e=>e.hasAttribute(`data-callout`)?!1:null}]},renderHTML({HTMLAttributes:e}){return[`div`,W(e),0]}});function i_(e){return{default:null,parseHTML:t=>t.getAttribute(e),renderHTML:t=>t[e]?{[e]:t[e]}:{}}}var a_=G.create({name:`globalStyle`,addGlobalAttributes(){return[{types:[`paragraph`,`heading`,`blockquote`,`bulletList`,`orderedList`,`listItem`,`codeBlock`,`genericDiv`,`image`,`table`,`tableRow`,`tableCell`,`tableHeader`,`callout`,`rawHtmlIsland`],attributes:{class:i_(`class`),style:i_(`style`),id:i_(`id`)}},{types:[`link`,`bold`,`italic`,`underline`,`strike`,`fontFamily`,`textColor`,`highlightColor`],attributes:{class:i_(`class`),style:i_(`style`)}}]}});function o_(e=``){try{return decodeURIComponent(e)}catch{return e}}function s_(e=``){return e.replace(/\s+/g,` `).trim().slice(0,180)||`HTML preserved`}var c_={name:`htmlPreservation`,toolbar:{},tiptapExtension:[r_,a_,K.create({name:`rawHtmlIsland`,group:`block`,atom:!0,selectable:!0,draggable:!0,isolating:!0,addAttributes(){return{rawHTML:{default:``,parseHTML:e=>o_(e.getAttribute(`data-raw-html`)||``),renderHTML:e=>({"data-raw-html":encodeURIComponent(e.rawHTML||``)})},class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)}}},parseHTML(){return[{tag:`raw-html[data-raw-html]`}]},renderHTML({HTMLAttributes:e}){return[`raw-html`,W(e)]},addCommands(){return{insertRawHtmlIsland:(e=`<div>
127
+ </div>`).run()}}].forEach(e=>Xg(e,n,t)),n}};function Qg(e){return e.options.element?.closest(`.je-container`)}function $g(e,t){e&&e.classList.toggle(`je-is-fullscreen`,t)}var e_={name:`fullscreen`,toolbar:{icon:f.maximize,title:`全屏`},tiptapExtension:null,command:async e=>{let t=Qg(e);if(t){if(document.fullscreenElement===t){await document.exitFullscreen(),$g(t,!1);return}await t.requestFullscreen?.(),$g(t,!0)}},isActive:e=>document.fullscreenElement===Qg(e),getToolbarState(e){let t=document.fullscreenElement===Qg(e);return{icon:t?f.minimize:f.maximize,title:t?`退出全屏`:`全屏`}},init(e,t={}){let n=Qg(e),r=()=>{$g(n,document.fullscreenElement===n),t.controller?.sync?.()};this._onFsChange=r,document.addEventListener(`fullscreenchange`,r)},destroy(){this._onFsChange&&=(document.removeEventListener(`fullscreenchange`,this._onFsChange),null),document.querySelectorAll(`.je-container.je-is-fullscreen`).forEach(e=>{e.classList.remove(`je-is-fullscreen`)})}},t_=new WeakMap,n_={name:`source`,toolbar:{icon:f.source,text:`Source`,title:`Source HTML`},tiptapExtension:null,init(e,t={}){t_.set(e,t.controller||null)},command:e=>{t_.get(e)?.toggle()},isActive:e=>!!t_.get(e)?.isActive()},r_=K.create({name:`genericDiv`,group:`block`,content:`block*`,defining:!0,addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)},id:{default:null,parseHTML:e=>e.getAttribute(`id`)}}},parseHTML(){return[{tag:`div`,getAttrs:e=>e.hasAttribute(`data-callout`)?!1:null}]},renderHTML({HTMLAttributes:e}){return[`div`,W(e),0]}});function i_(e){return{default:null,parseHTML:t=>t.getAttribute(e),renderHTML:t=>t[e]?{[e]:t[e]}:{}}}var a_=G.create({name:`globalStyle`,addGlobalAttributes(){return[{types:[`paragraph`,`heading`,`blockquote`,`bulletList`,`orderedList`,`listItem`,`codeBlock`,`genericDiv`,`image`,`table`,`tableRow`,`tableCell`,`tableHeader`,`callout`,`rawHtmlIsland`],attributes:{class:i_(`class`),style:i_(`style`),id:i_(`id`)}},{types:[`link`,`bold`,`italic`,`underline`,`strike`,`fontFamily`,`textColor`,`highlightColor`],attributes:{class:i_(`class`),style:i_(`style`)}}]}});function o_(e=``){try{return decodeURIComponent(e)}catch{return e}}function s_(e=``){return e.replace(/\s+/g,` `).trim().slice(0,180)||`HTML preserved`}var c_={name:`htmlPreservation`,toolbar:{},tiptapExtension:[r_,a_,K.create({name:`rawHtmlIsland`,group:`block`,atom:!0,selectable:!0,draggable:!0,isolating:!0,addAttributes(){return{rawHTML:{default:``,parseHTML:e=>o_(e.getAttribute(`data-raw-html`)||``),renderHTML:e=>({"data-raw-html":encodeURIComponent(e.rawHTML||``)})},class:{default:null,parseHTML:e=>e.getAttribute(`class`)},style:{default:null,parseHTML:e=>e.getAttribute(`style`)}}},parseHTML(){return[{tag:`raw-html[data-raw-html]`}]},renderHTML({HTMLAttributes:e}){return[`raw-html`,W(e)]},addCommands(){return{insertRawHtmlIsland:(e=`<div>
128
128
  Raw HTML
129
129
  </div>`)=>({commands:t})=>t.insertContent({type:this.name,attrs:{rawHTML:e}}),updateRawHtmlIsland:(e,t)=>({state:n,dispatch:r})=>{let i=n.doc.nodeAt(e);return!i||i.type.name!==this.name?!1:(r&&r(n.tr.setNodeMarkup(e,void 0,{...i.attrs,rawHTML:t})),!0)}}},addNodeView(){return({node:e,editor:t,getPos:n})=>{let r=e,i=!1,a=document.createElement(`div`);a.className=`raw-html-island`;let o=document.createElement(`div`);o.className=`raw-html-island__header`,o.textContent=`Raw HTML Block`;let s=document.createElement(`div`);s.className=`raw-html-island__actions`;let c=document.createElement(`button`);c.type=`button`,c.className=`raw-html-island__action`,c.textContent=`Edit`;let l=document.createElement(`button`);l.type=`button`,l.className=`raw-html-island__action`,l.textContent=`Copy`;let u=document.createElement(`button`);u.type=`button`,u.className=`raw-html-island__action is-danger`,u.textContent=`Delete`,s.append(c,l,u),o.appendChild(s);let d=document.createElement(`pre`);d.className=`raw-html-island__body`;let f=document.createElement(`div`);f.className=`raw-html-island__editor is-hidden`;let p=document.createElement(`textarea`);p.className=`raw-html-island__textarea`,p.spellcheck=!1;let m=document.createElement(`div`);m.className=`raw-html-island__editor-actions`;let h=document.createElement(`button`);h.type=`button`,h.className=`raw-html-island__action is-primary`,h.textContent=`Save`;let g=document.createElement(`button`);g.type=`button`,g.className=`raw-html-island__action`,g.textContent=`Cancel`,m.append(h,g),f.append(p,m);let _=e=>{r=e,d.textContent=s_(e.attrs.rawHTML),i||(p.value=e.attrs.rawHTML||``)},v=()=>{i=!0,p.value=r.attrs.rawHTML||``,a.classList.add(`is-editing`),f.classList.remove(`is-hidden`),p.focus(),p.setSelectionRange(p.value.length,p.value.length)},y=(e=!1)=>{e&&(p.value=r.attrs.rawHTML||``),i=!1,a.classList.remove(`is-editing`),f.classList.add(`is-hidden`)},b=()=>{let e=n(),r=p.value;t.commands.updateRawHtmlIsland(e,r),y(!1)};return c.addEventListener(`click`,()=>{v()}),a.addEventListener(`dblclick`,e=>{e.target.closest(`.raw-html-island__actions`)||v()}),l.addEventListener(`click`,async()=>{try{await navigator.clipboard?.writeText(r.attrs.rawHTML||``)}catch{}}),u.addEventListener(`click`,()=>{let e=n(),i=t.state.tr.delete(e,e+r.nodeSize);t.view.dispatch(i),t.commands.focus()}),h.addEventListener(`click`,b),g.addEventListener(`click`,()=>y(!0)),p.addEventListener(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),b()),e.key===`Escape`&&(e.preventDefault(),y(!0))}),_(e),a.append(o,d,f),{dom:a,update(e){return e.type.name===`rawHtmlIsland`?(_(e),!0):!1},stopEvent(e){return a.contains(e.target)}}}}}).configure({onOpenSource:null})],init(e,t={}){e.storage.rawHtmlIsland&&(e.storage.rawHtmlIsland.onOpenSource=t.onOpenSource||null)}},l_={name:`rawHtmlBlock`,toolbar:{icon:f.htmlBlock,text:`HTML`,title:`HTML Block`},tiptapExtension:null,command:e=>{e.chain().focus().insertRawHtmlIsland(`<div>
130
130
  Raw HTML
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jenkin-a/jeditor",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "JEditor rich-text editor built on Tiptap.",
5
5
  "type": "module",
6
6
  "main": "dist/jeditor.umd.js",