@ebl-vue/editor-render 2.31.29 → 2.31.31

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/index.mjs CHANGED
@@ -1,148 +1,192 @@
1
- import { defineComponent as c, createElementBlock as s, openBlock as l, createElementVNode as o, Fragment as k, renderList as _, normalizeClass as y, normalizeStyle as f, createBlock as F, resolveDynamicComponent as K, useModel as u, isRef as P, shallowRef as q, ref as L, watchEffect as Z, computed as B, unref as I, toDisplayString as J, createStaticVNode as Q, createCommentVNode as H } from "vue";
2
- import { codeToHtml as U } from "shiki";
3
- const W = Symbol("INSTALLED_KEY"), X = (t, e) => (t.install = (a) => {
4
- for (const i of [t, ...Object.values({})]) a.component(i.name, i);
5
- }, t), ee = { class: "ebl-editor-render" }, te = ["data-id"], ae = c({ name: "EblEditorRender", inheritAttrs: !1, __name: "EditorRender", props: { data: { default: () => ({ blocks: [] }) } }, setup: (t) => (e, a) => (l(), s("div", ee, [(l(!0), s(k, null, _(e.data.blocks, (i) => (l(), s("div", { class: "ce-block", "data-id": i.id }, [o("div", { class: y(`ce-tune-alignment--${i.tunes.blockAlignment.alignment}`) }, [o("div", { style: f(`padding-left: ${48 * i.tunes.indent.indentLevel}px;`) }, [(l(), F(K("ebl" + i.type), { block: i }, null, 8, ["block"]))], 4)], 2)], 8, te))), 256)), a[0] || (a[0] = o("div", { class: "ebl-outline" }, [o("div", { style: { height: "5000px" } }, " dd ")], -1))])) }), le = ["innerHTML"], se = c({ name: "eblparagraph", inheritAttrs: !1, __name: "paragraph", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
6
- const e = u(t, "block");
7
- return (a, i) => (l(), s("div", { class: "ce-paragraph cdx-block", innerHTML: e.value.data.text }, null, 8, le));
8
- } }), ie = ["innerHTML"], ne = c({ name: "eblh1", inheritAttrs: !1, __name: "h1", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
9
- const e = u(t, "block");
10
- return (a, i) => (l(), s("h1", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, ie));
11
- } }), oe = ["innerHTML"], re = c({ name: "eblh2", inheritAttrs: !1, __name: "h2", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
12
- const e = u(t, "block");
13
- return (a, i) => (l(), s("h2", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, oe));
14
- } }), de = ["innerHTML"], ce = c({ name: "eblh3", inheritAttrs: !1, __name: "h3", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
15
- const e = u(t, "block");
16
- return (a, i) => (l(), s("h3", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, de));
17
- } }), ue = ["innerHTML"], pe = c({ name: "eblh4", inheritAttrs: !1, __name: "h4", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
18
- const e = u(t, "block");
19
- return (a, i) => (l(), s("h4", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, ue));
20
- } }), he = ["innerHTML"], me = c({ name: "eblh5", inheritAttrs: !1, __name: "h5", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
21
- const e = u(t, "block");
22
- return (a, i) => (l(), s("h5", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, he));
23
- } }), ve = ["innerHTML"], ke = c({ name: "eblh6", inheritAttrs: !1, __name: "h6", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
24
- const e = u(t, "block");
25
- return (a, i) => (l(), s("h6", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, ve));
26
- } }), be = ["innerHTML"], _e = c({ name: "eblalert", inheritAttrs: !1, __name: "alert", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
27
- const e = u(t, "block");
28
- return (a, i) => (l(), s("div", { class: y(`cdx-alert cdx-alert-${e.value.data.type} cdx-alert-align-${e.value.data.align}`) }, [o("div", { class: "cdx-alert__message", innerHTML: e.value.data.message }, null, 8, be)], 2));
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.cdx-alert{position:relative;padding:10px;border-radius:5px;margin-bottom:10px;margin-top:10px}.cdx-alert-primary{background-color:#ebf8ff;border:1px solid #4299e1;color:#2b6cb0}.cdx-alert-secondary{background-color:#f7fafc;border:1px solid #cbd5e0;color:#222731}.cdx-alert-info{background-color:#e6fdff;border:1px solid #4cd4ce;color:#00727c}.cdx-alert-success{background-color:#f0fff4;border:1px solid #68d391;color:#2f855a}.cdx-alert-warning{background-color:#fffaf0;border:1px solid #ed8936;color:#c05621}.cdx-alert-danger{background-color:#fff5f5;border:1px solid #fc8181;color:#c53030}.cdx-alert-light{background-color:#fff;border:1px solid #edf2f7;color:#1a202c}.cdx-alert-dark{background-color:#2d3748;border:1px solid #1a202c;color:#d3d3d3}.cdx-alert-align-left{text-align:left}.cdx-alert-align-center{text-align:center}.cdx-alert-align-right{text-align:right}.cdx-alert__message{outline:none}.cdx-alert [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-alert [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-alert [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #background{fill:#ebf8ff;stroke:#4299e1}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #content{fill:#2b6cb0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #background{fill:#f7fafc;stroke:#cbd5e0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #content{fill:#222731}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #background{fill:#e6fdff;stroke:#4cd4ce}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #content{fill:#00727c}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #background{fill:#f0fff4;stroke:#68d391}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #content{fill:#2f855a}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #background{fill:#fffaf0;stroke:#ed8936}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #content{fill:#c05621}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #background{fill:#fff5f5;stroke:#fc8181}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #content{fill:#c53030}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #background{fill:#fff;stroke:#edf2f7}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #content{fill:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #background{fill:#2d3748;stroke:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #content{fill:#d3d3d3}.cdx-alert_setting__icon_wrapper{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px}.cdx-alert_setting__icon_wrapper_align{margin-top:10px}.cdx-alert_setting__icon{display:inline-block;width:24px;height:24px;text-align:center;line-height:24px;cursor:pointer}.cdx-alert_setting__icon_active{opacity:.3}.ce-tune-alignment--right{text-align:right}.ce-tune-alignment--center{text-align:center}.ce-tune-alignment--left{text-align:left}.ce-editorjs-x-shiki{border-radius:10px;display:flex;flex-direction:column;margin:10px 0;border:2px solid transparent;position:relative}.ce-editorjs-x-shiki.editable:hover{border:2px solid #C0C0C0}.ce-editorjs-x-shiki__lang{display:flex;justify-content:space-between;padding:8px}.ce-editorjs-x-shiki__code{position:relative;float:left;min-width:100%;overflow:hidden;height:auto}.ce-editorjs-x-shiki__code__dragHandler{position:absolute;left:50%;transform:translate(-50%);bottom:-5px;cursor:ns-resize;user-select:none;height:8px;width:60px;background-color:silver;border-radius:5px;display:none}.ce-editorjs-x-shiki:hover .ce-editorjs-x-shiki__code__dragHandler{display:block}.ce-editorjs-x-shiki__selector{display:flex;gap:15px;justify-content:space-between;border-bottom-style:solid;border-color:#9ca3af0d;border-bottom-width:1px;padding:0 8px 8px}.ce-editorjs-x-shiki__selector-language,.ce-editorjs-x-shiki__selector-theme{font-size:13px;font-family:inherit}.ce-editorjs-x-shiki__selector-language{width:90px}.ce-editorjs-x-shiki__selector select{border:none;outline:none}.ce-editorjs-x-shiki__span{position:relative;z-index:0;padding:20px 20px 20px 55px;margin:0;white-space:pre;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__span code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea{all:unset;white-space:pre;background-color:transparent;position:absolute;padding:20px 20px 20px 55px;inset:0;color:transparent;z-index:0;font-size:13px;caret-color:#999;resize:none;border:none;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea::selection{background-color:#083ca9;color:#fff}.ce-editorjs-x-shiki__copy{width:24px;height:24px;cursor:pointer;position:relative;margin-right:0}.ce-editorjs-x-shiki__copy_tip{font-size:12px;width:60px;margin-left:-20px;background-color:#0c0c0c;color:#ececec;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;z-index:1;top:125%;transition:opacity .3s;visibility:hidden;opacity:0}.ce-editorjs-x-shiki__copy_tip:after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent #0c0c0c transparent}.ce-editorjs-x-shiki__copy_tip.visible{visibility:visible;opacity:1}.ce-editorjs-x-shiki__span.shiki .line:before{content:attr(data-line);width:40px;display:inline-block;text-align:right;color:#888;position:absolute;left:0}.ce-editorjs-x-shiki__code ::-webkit-scrollbar{width:8px;height:8px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-track{background:#22272e;border-radius:1px}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:2px solid #22272e}.ce-editorjs-x-shiki__code ::-webkit-scrollbar-thumb:hover{background:#555}.ce-delimiter__line__wrapper{height:24px;display:flex;align-items:center;justify-content:center}.ce-delimiter__line{flex:1;height:2px;background-color:#eff0f1}.ce-header{padding:15px 0 3px;margin:0;line-height:1.25;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb;display:inline-block}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px;padding-bottom:0;user-select:none;pointer-events:none}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:inline-block;user-select:none;pointer-events:none}.image-tool__image-preloader{width:150px;height:150px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;animation:image-preloader-spin 2s infinite linear;box-sizing:border-box}.image-tool__caption{visibility:hidden;position:absolute;bottom:0;left:0;margin-bottom:10px}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important;content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__image-preloader{display:none}.image-tool--empty .image-tool__caption,.image-tool--uploading .image-tool__caption{visibility:hidden!important}.image-tool .cdx-button{display:none;align-items:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--uploading{width:100%}.image-tool--uploading .resizable{display:none!important}.image-tool--uploading .image-tool__image{min-height:200px;display:flex;background-color:#fff}.image-tool--uploading .image-tool__image-picture,.image-tool--uploading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}.image-tool--caption .image-tool__caption{visibility:visible}.image-tool--caption{padding-bottom:50px}@keyframes image-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ce-popover-indent-item{cursor:default!important;display:flex;align-items:center;padding:3px}.ce-popover-indent-item[version^="2.26"]{gap:10px}.ce-popover-indent-item:hover{background-color:transparent!important}.ce-popover-indent-item .ce-popover-item__icon{width:26px;height:26px;cursor:pointer;will-change:background-color,color;transition:.3s background-color,.3s color;padding-block:0px;padding-inline:0px;border-width:0px;color:var(--color-text-primary, black);background-color:#fff;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;-webkit-transition:.3s background-color,.3s color;-moz-transition:.3s background-color,.3s color;-ms-transition:.3s background-color,.3s color;-o-transition:.3s background-color,.3s color}.ce-popover-indent-item .ce-popover-item--disabled{color:var(--color-text-secondary, #707684);opacity:.3;cursor:default}.ce-popover-indent-item .ce-popover-item__icon:focus{outline:none}.ce-popover-indent-item:is([version^="2.26"],[version^="2.27"],[version^="2.28"],[version^="2.29"]):hover .ce-popover-item__icon{box-shadow:0 0 0 1px var(--color-border-icon, rgba(201, 201, 204, .48))!important;-webkit-box-shadow:0 0 0 1px var(--color-border-icon, rgba(201, 201, 204, .48))!important}.ce-popover-indent-item:is([version^="2.26"],[version^="2.27"],[version^="2.28"],[version^="2.29"]) .ce-popover-item__icon{box-shadow:0 0 0 1px var(--color-border-icon, rgba(201, 201, 204, .48))!important;-webkit-box-shadow:0 0 0 1px var(--color-border-icon, rgba(201, 201, 204, .48))!important}.ce-popover-indent-item:is([version^="2.26"],[version^="2.27"],[version^="2.28"],[version^="2.29"]) .ce-popover-item__icon:hover{background-color:var(--color-background-item-hover, #eff2f5)}.ce-highlight-indent{display:inline-block;height:1.6em;top:50%;position:absolute;transform:translateY(-50%);-webkit-transform:translate(0px,-50%);-moz-transform:translate(0px,-50%);-ms-transform:translate(0px,-50%);-o-transform:translate(0px,-50%)}.ce-popover-indent-item[version^="2.3"] .ce-popover-item__title{margin-left:4px}.inline-code{background:#faeff0c7;color:#b44437;padding:3px 4px;border-radius:5px;margin:0 1px;font-family:inherit;font-size:.86em;font-weight:500;letter-spacing:.3px}.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list ol{padding-inline-start:0}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered{padding-inline-start:0}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;inset:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;transform:scale(1);transition:transform .4s ease-out,opacity .4s}.cdx-list__checkbox-check--disabled{pointer-events:none}.cdx-list-start-with-field{display:flex;flex-direction:row;overflow:hidden;align-items:center}.cdx-list-start-with-field--invalid{background:#ffeced;border:1px solid #E13F3F}.cdx-list-start-with-field:hover{background-color:#f8f8f8}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__startlabel{width:70px;font-size:14px}.cdx-list-start-with-field__input-wrapper{flex:1;overflow:hidden}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;line-height:22px;flex:1;border:1px solid rgba(226,226,229,1);border-radius:6px;padding:0 10px;width:50px;text-align:center}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}.cdx-marker{background:#f5eb6f4a;padding:3px 0}.ce-paragraph{line-height:2!important;outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}.cdx-quote{overflow:hidden;overflow-wrap:break-word;margin:0;box-sizing:border-box;word-wrap:break-word;word-break:break-all}.cdx-quote blockquote{margin:0}.cdx-block-quote{border:solid #acacac;border-width:0 0 0 3px;box-shadow:none;color:#666;line-height:1.6em;padding:1px 0 0 12px;text-align:left}.tc-wrap{--color-background: #f9f9fb;--color-text-secondary: #7b7e89;--color-border: #e8e8eb;--cell-size: 34px;--toolbox-icon-size: 18px;--toolbox-padding: 6px;--toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);--col-width: 100px 100px 100px;position:relative;height:100%;margin-top:var(--toolbox-icon-size);box-sizing:border-box;display:inline-grid;z-index:0}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);line-height:1.4;overflow-x:auto}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border);position:sticky;top:0;z-index:2;background:var(--color-background)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{display:grid;border-top:1px solid var(--color-border);grid-auto-rows:var(--cell-size);place-items:center}.tc-add-column svg{padding:5px;position:sticky;top:0;background-color:var(--color-background)}.tc-add-column--disabled{visibility:hidden}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);align-items:center;padding-left:4px;position:relative}.tc-add-row--disabled{display:none}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:var(--col-width);position:relative;border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding: 6px;--popover-margin: 30px;--toggler-click-zone-size: 30px;--toggler-dots-color: #7b7e89;--toggler-dots-color-hovered: #1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:flex;align-items:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border: #eaeaea;--color-background: #fff;--color-background-hover: rgba(232, 232, 235, .49);--color-background-confirm: #e24a4a;--color-background-confirm-hover: #d54040;--color-text-confirm: #fff;background:var(--color-background);border:1px solid var(--color-border);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:flex;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:flex;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:inline-flex;width:26px;height:26px;align-items:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{transition:transform .2s ease-in;transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@keyframes menuShowing{0%{opacity:0;transform:translateY(-8px) scale(.9)}70%{opacity:1;transform:translateY(2px)}to{transform:translateY(0)}}.cell-resizable{cursor:col-resize}.cdx-underline{text-decoration:underline}.ce-popover--inline .ce-popover--nested .ce-popover__container{width:min-content!important;min-width:unset!important}.ce-popover--inline .ce-popover--nested .ce-popover__items{width:max-content}.editorjs__color-selector-container{display:grid;gap:10px;padding:4px}.editorjs__color-selector__container-item{width:30px;height:30px;display:block;cursor:pointer;border-radius:100%;transition:transform .2s ease}.editorjs__color-selector__container-item:hover{transform:scale(1.1)}.ebl-er-doc{font-family:var(--font-family);font-size:16px;font-weight:400;box-sizing:border-box}.ebl-er-header{height:var(--ebl-er-header-height);box-sizing:border-box;position:sticky;top:0;z-index:10}.ebl-er-footer{height:var(--ebl-er-footer-height);box-sizing:border-box}.ebl-er-container{display:flex;flex-direction:row;min-height:calc(100vh - var(--ebl-er-header-height))}.ebl-er-doc-menu{width:var(--ebl-er-doc-menu-width);box-sizing:border-box;flex-shrink:0}.ebl-er-doc-menu-content{box-sizing:border-box;height:calc(100vh - var(--ebl-er-header-height));overflow:auto;position:sticky;top:var(--ebl-er-header-height)}.ebl-er-doc-content{box-sizing:border-box;display:flex;flex-direction:row;max-width:calc(100% - var(--ebl-er-doc-menu-width))}.ebl-er-doc-content-inner{box-sizing:border-box;flex:1;padding:50px;width:100%;overflow-x:hidden;white-space:normal;word-wrap:break-word}.ebl-er-doc-content-inner .ce-block{width:100%}.ebl-er-doc-outline{width:280px;box-sizing:border-box;height:calc(100vh - var(--ebl-er-header-height));position:sticky;top:var(--ebl-er-header-height);overflow:auto;padding:12px}@media (max-width:960px){.ebl-er-doc-outline{display:none}}.ebl-er-doc ::-webkit-scrollbar{width:6px;height:6px}.ebl-er-doc ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-er-doc ::-webkit-scrollbar-thumb{background:silver;border-radius:10px;border:1px solid #fff}.ebl-er-doc ::-webkit-scrollbar-thumb:hover{background:#555}.ce-editorjs-x-shiki__code[data-v-f867b955]{overflow:auto}.ce-editorjs-x-shiki__selector[data-v-f867b955]{padding:0 8px;align-items:center}.ce-editorjs-x-shiki__copy_tip[data-v-f867b955]{visibility:visible;opacity:.9;width:40px;padding:5px;margin-left:-15px}.tc-wrap--readonly[data-v-0627102b]{margin-bottom:var(--toolbox-icon-size)}.image-tool__image[data-v-7b6db628]{margin-top:15px}.ebl-er-doc-outline-item{padding:7px 24px;cursor:pointer;white-space:normal;word-wrap:break-word}.ebl-er-doc-outline-item:hover{background-color:#f6f6f6}.ebl-er-doc-outline-item.selected{background-color:#ebebeb}.ebl-outline .level_1{padding-left:24px}.ebl-outline .level_2{padding-left:42px}.ebl-outline .level_3{padding-left:60px}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { defineComponent as v, computed as A, resolveComponent as P, createElementBlock as s, openBlock as a, normalizeStyle as g, createCommentVNode as y, createElementVNode as i, renderSlot as q, Fragment as _, renderList as x, normalizeClass as L, createBlock as U, resolveDynamicComponent as Z, createVNode as J, useModel as m, isRef as Q, shallowRef as W, ref as H, watchEffect as X, unref as R, toDisplayString as F, createStaticVNode as ee, watch as te, onMounted as le, nextTick as ae, onUnmounted as oe } from "vue";
3
+ import { codeToHtml as se } from "shiki";
4
+ const D = Symbol("INSTALLED_KEY"), ne = (t, e) => (t.install = (l) => {
5
+ for (const o of [t, ...Object.values({})]) l.component(o.name, o);
6
+ }, t), ie = { key: 0, class: "ebl-er-header" }, ce = { class: "ebl-er-container" }, re = { key: 0, class: "ebl-er-doc-menu" }, de = { class: "ebl-er-doc-menu-content" }, ue = { class: "ebl-er-doc-content" }, pe = { class: "ebl-er-doc-content-inner" }, he = ["data-id", "data-type"], be = { class: "ebl-er-doc-outline" }, ve = { key: 1, class: "ebl-er-footer" }, me = v({ name: "EblEditorRender", inheritAttrs: !1, __name: "EditorRender", props: { data: { default: () => ({ blocks: [] }) }, showHeader: { type: Boolean, default: !0 }, showFooter: { type: Boolean, default: !0 }, showDocMenu: { type: Boolean, default: !0 }, headerHeight: { default: 84 }, docMenuWidth: { default: 280 }, footerHeight: { default: "auto" } }, setup(t) {
7
+ const e = t, l = A(() => ({ "--ebl-er-header-height": `${e.headerHeight}px`, "--ebl-er-doc-menu-width": `${e.docMenuWidth}px`, "--ebl-er-footer-height": `${e.footerHeight}px` }));
8
+ return (o, d) => {
9
+ const c = P("ebloutline");
10
+ return a(), s("div", { class: "ebl-er-doc", style: g(l.value) }, [o.showHeader ? (a(), s("div", ie, [q(o.$slots, "header")])) : y("", !0), i("div", ce, [o.showDocMenu ? (a(), s("div", re, [i("div", de, [q(o.$slots, "docMenu")])])) : y("", !0), i("div", ue, [i("article", pe, [(a(!0), s(_, null, x(o.data.blocks, (h) => (a(), s("section", { class: "ce-block", "data-id": h.id, "data-type": h.type }, [i("div", { class: L(`ce-tune-alignment--${h.tunes.blockAlignment.alignment}`) }, [i("div", { style: g(`padding-left: ${48 * h.tunes.indent.indentLevel}px;`) }, [(a(), U(Z("ebl" + h.type), { block: h }, null, 8, ["block"]))], 4)], 2)], 8, he))), 256))]), i("aside", be, [J(c, { blocks: o.data.blocks, headerHeight: o.headerHeight }, null, 8, ["blocks", "headerHeight"])])])]), o.showFooter ? (a(), s("div", ve, [q(o.$slots, "footer")])) : y("", !0)], 4);
11
+ };
12
+ } }), ke = ["innerHTML"], fe = v({ name: "eblparagraph", inheritAttrs: !1, __name: "paragraph", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
13
+ const e = m(t, "block");
14
+ return (l, o) => (a(), s("div", { class: "ce-paragraph cdx-block", innerHTML: e.value.data.text }, null, 8, ke));
15
+ } }), _e = ["innerHTML"], ye = v({ name: "eblh1", inheritAttrs: !1, __name: "h1", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
16
+ const e = m(t, "block");
17
+ return (l, o) => (a(), s("h1", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, _e));
18
+ } }), xe = ["innerHTML"], ge = v({ name: "eblh2", inheritAttrs: !1, __name: "h2", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
19
+ const e = m(t, "block");
20
+ return (l, o) => (a(), s("h2", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, xe));
21
+ } }), Me = ["innerHTML"], we = v({ name: "eblh3", inheritAttrs: !1, __name: "h3", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
22
+ const e = m(t, "block");
23
+ return (l, o) => (a(), s("h3", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, Me));
24
+ } }), Le = ["innerHTML"], He = v({ name: "eblh4", inheritAttrs: !1, __name: "h4", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
25
+ const e = m(t, "block");
26
+ return (l, o) => (a(), s("h4", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, Le));
27
+ } }), Te = ["innerHTML"], Ce = v({ name: "eblh5", inheritAttrs: !1, __name: "h5", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
28
+ const e = m(t, "block");
29
+ return (l, o) => (a(), s("h5", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, Te));
30
+ } }), Ee = ["innerHTML"], Ae = v({ name: "eblh6", inheritAttrs: !1, __name: "h6", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
31
+ const e = m(t, "block");
32
+ return (l, o) => (a(), s("h6", { class: "ce-header", innerHTML: e.value.data.text }, null, 8, Ee));
33
+ } }), Se = ["innerHTML"], $e = v({ name: "eblalert", inheritAttrs: !1, __name: "alert", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
34
+ const e = m(t, "block");
35
+ return (l, o) => (a(), s("div", { class: L(`cdx-alert cdx-alert-${e.value.data.type} cdx-alert-align-${e.value.data.align}`) }, [i("div", { class: "cdx-alert__message", innerHTML: e.value.data.message }, null, 8, Se)], 2));
29
36
  } });
30
- const fe = () => {
31
- }, xe = { class: "ce-editorjs-x-shiki__selector" }, ye = { class: "ce-editorjs-x-shiki__lang" }, ge = { key: 0, class: "ce-editorjs-x-shiki__copy_tip" }, Me = { key: 0, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, we = { key: 1, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, Le = ["innerHTML"], He = c({ name: "eblcode", inheritAttrs: !1, __name: "code", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
32
- const e = L(null), a = u(t, "block"), i = B(() => a.value.data.resizeSize ? { height: a.value.data.resizeSize + "px" } : {}), d = function(p, n, r) {
33
- let h;
34
- h = P(r) ? { evaluating: r } : {};
35
- const { lazy: g = !1, flush: M = "pre", evaluating: v, shallow: A = !0, onError: E = fe } = h, b = q(!g), S = A ? q(n) : L(n);
36
- let w = 0;
37
- return Z(async (G) => {
38
- if (!b.value) return;
39
- w++;
40
- const V = w;
41
- let $ = !1;
42
- v && Promise.resolve().then(() => {
43
- v.value = !0;
37
+ const je = () => {
38
+ }, ze = { class: "ce-editorjs-x-shiki__selector" }, qe = { class: "ce-editorjs-x-shiki__lang" }, Be = { key: 0, class: "ce-editorjs-x-shiki__copy_tip" }, Ie = { key: 0, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, Ve = { key: 1, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, We = ["innerHTML"], Re = v({ name: "eblcode", inheritAttrs: !1, __name: "code", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
39
+ const e = H(null), l = m(t, "block"), o = A(() => l.value.data.resizeSize ? { height: l.value.data.resizeSize + "px" } : {}), d = function(p, n, u) {
40
+ let b;
41
+ b = Q(u) ? { evaluating: u } : {};
42
+ const { lazy: T = !1, flush: C = "pre", evaluating: f, shallow: S = !0, onError: $ = je } = b, w = W(!T), j = S ? W(n) : H(n);
43
+ let E = 0;
44
+ return X(async (G) => {
45
+ if (!w.value) return;
46
+ E++;
47
+ const I = E;
48
+ let V = !1;
49
+ f && Promise.resolve().then(() => {
50
+ f.value = !0;
44
51
  });
45
52
  try {
46
- const j = await p((O) => {
53
+ const z = await p((K) => {
47
54
  G(() => {
48
- v && (v.value = !1), $ || O();
55
+ f && (f.value = !1), V || K();
49
56
  });
50
57
  });
51
- V === w && (S.value = j);
52
- } catch (j) {
53
- E(j);
58
+ I === E && (j.value = z);
59
+ } catch (z) {
60
+ $(z);
54
61
  } finally {
55
- v && V === w && (v.value = !1), $ = !0;
62
+ f && I === E && (f.value = !1), V = !0;
56
63
  }
57
- }, { flush: M }), g ? B(() => (b.value = !0, S.value)) : S;
64
+ }, { flush: C }), T ? A(() => (w.value = !0, j.value)) : j;
58
65
  }(async () => {
59
66
  let p = "";
60
- return { html: await U(a.value.data.code, { lang: a.value.data.lang, theme: a.value.data.theme || "github-dark-dimmed", transformers: [{ preprocess: (r) => `${r}
61
- `, pre(r) {
62
- var h;
63
- this.addClassToHast(r, "ce-editorjs-x-shiki__span"), p = ((h = r.properties) == null ? void 0 : h.style) || "";
64
- }, line(r, h) {
65
- r.properties = r.properties || {}, r.properties["data-line"] = h;
67
+ return { html: await se(l.value.data.code, { lang: l.value.data.lang, theme: l.value.data.theme || "github-dark-dimmed", transformers: [{ preprocess: (u) => `${u}
68
+ `, pre(u) {
69
+ var b;
70
+ this.addClassToHast(u, "ce-editorjs-x-shiki__span"), p = ((b = u.properties) == null ? void 0 : b.style) || "";
71
+ }, line(u, b) {
72
+ u.properties = u.properties || {}, u.properties["data-line"] = b;
66
73
  } }] }), preStyle: p };
67
74
  });
68
- function m(p) {
69
- e.value && function(n, r) {
70
- let h = r.clientY, g = parseInt(window.getComputedStyle(n).height, 10);
71
- const M = (A) => {
72
- const E = A.clientY - h;
73
- let b = g + E;
74
- b < 100 && (b = 100), n.style.height = b + "px";
75
- }, v = () => {
76
- document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", v);
75
+ function c(p) {
76
+ e.value && function(n, u) {
77
+ let b = u.clientY, T = parseInt(window.getComputedStyle(n).height, 10);
78
+ const C = (S) => {
79
+ const $ = S.clientY - b;
80
+ let w = T + $;
81
+ w < 100 && (w = 100), n.style.height = w + "px";
82
+ }, f = () => {
83
+ document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", f);
77
84
  };
78
- document.addEventListener("mousemove", M), document.addEventListener("mouseup", v);
85
+ document.addEventListener("mousemove", C), document.addEventListener("mouseup", f);
79
86
  }(e.value, p);
80
87
  }
81
- function T() {
82
- if (a.value.data.code) {
83
- const p = a.value.data.code;
88
+ function h() {
89
+ if (l.value.data.code) {
90
+ const p = l.value.data.code;
84
91
  if (navigator.clipboard && window.isSecureContext) try {
85
92
  navigator.clipboard.writeText(p).then(() => {
86
- x(!0);
93
+ k(!0);
87
94
  }).catch((n) => {
88
- x(!1);
95
+ k(!1);
89
96
  });
90
97
  } catch (n) {
91
- x(!1);
98
+ k(!1);
92
99
  }
93
100
  else {
94
101
  const n = document.createElement("textarea");
95
102
  n.value = p, n.style.top = "0", n.style.left = "0", n.style.position = "fixed", n.style.opacity = "0", n.style.pointerEvents = "none", n.style.zIndex = "-1000", document.body.appendChild(n), n.focus(), n.select();
96
103
  try {
97
- document.execCommand("copy"), document.body.removeChild(n), x(!0);
98
- } catch (r) {
99
- x(!1), document.body.removeChild(n);
104
+ document.execCommand("copy"), document.body.removeChild(n), k(!0);
105
+ } catch (u) {
106
+ k(!1), document.body.removeChild(n);
100
107
  }
101
108
  }
102
109
  }
103
110
  }
104
- const C = L(!1), R = L(!1);
105
- function x(p) {
106
- C.value = !0, R.value = p, setTimeout(() => {
107
- C.value = !1;
111
+ const r = H(!1), M = H(!1);
112
+ function k(p) {
113
+ r.value = !0, M.value = p, setTimeout(() => {
114
+ r.value = !1;
108
115
  }, 2e3);
109
116
  }
110
117
  return (p, n) => {
111
- var r, h;
112
- return l(), s("div", { class: y("cdx-block ce-editorjs-x-shiki"), style: f(`${(r = I(d)) == null ? void 0 : r.preStyle}`) }, [o("div", xe, [o("div", ye, J(a.value.data.lang), 1), o("div", { class: "ce-editorjs-x-shiki__copy", ref: "copyRef", onClick: T }, [n[2] || (n[2] = Q('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" data-v-f867b955><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z" data-v-f867b955></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5" data-v-f867b955></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12" data-v-f867b955></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5" data-v-f867b955></path></svg>', 1)), C.value ? (l(), s("div", ge, [R.value ? (l(), s("svg", Me, [...n[0] || (n[0] = [o("path", { d: "M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }, null, -1)])])) : (l(), s("svg", we, [...n[1] || (n[1] = [o("path", { d: "M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }, null, -1)])]))])) : H("", !0)], 512)]), o("div", { ref_key: "codeRef", ref: e, class: "ce-editorjs-x-shiki__code", style: f(i.value) }, [o("span", { innerHTML: (h = I(d)) == null ? void 0 : h.html }, null, 8, Le)], 4), o("div", { class: "ce-editorjs-x-shiki__code__dragHandler", onMousedown: m }, null, 32)], 4);
118
+ var u, b;
119
+ return a(), s("div", { class: L("cdx-block ce-editorjs-x-shiki"), style: g(`${(u = R(d)) == null ? void 0 : u.preStyle}`) }, [i("div", ze, [i("div", qe, F(l.value.data.lang), 1), i("div", { class: "ce-editorjs-x-shiki__copy", ref: "copyRef", onClick: h }, [n[2] || (n[2] = ee('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" data-v-f867b955><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z" data-v-f867b955></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5" data-v-f867b955></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12" data-v-f867b955></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5" data-v-f867b955></path></svg>', 1)), r.value ? (a(), s("div", Be, [M.value ? (a(), s("svg", Ie, [...n[0] || (n[0] = [i("path", { d: "M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }, null, -1)])])) : (a(), s("svg", Ve, [...n[1] || (n[1] = [i("path", { d: "M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }, null, -1)])]))])) : y("", !0)], 512)]), i("div", { ref_key: "codeRef", ref: e, class: "ce-editorjs-x-shiki__code", style: g(o.value) }, [i("span", { innerHTML: (b = R(d)) == null ? void 0 : b.html }, null, 8, We)], 4), i("div", { class: "ce-editorjs-x-shiki__code__dragHandler", onMousedown: c }, null, 32)], 4);
113
120
  };
114
- } }), z = (t, e) => {
115
- const a = t.__vccOpts || t;
116
- for (const [i, d] of e) a[i] = d;
117
- return a;
118
- }, Te = { class: "ce-delimiter cdx-block" }, Ce = { key: 0, class: "cdx-list cdx-list-unordered" }, Ae = ["innerHTML"], Ee = ["innerHTML"], Se = { key: 2, class: "cdx-list cdx-list-checklist" }, je = ["innerHTML"], ze = { class: "cdx-block cdx-quote" }, Be = ["innerHTML"], Re = { class: "tc-row" }, Ve = ["innerHTML"], $e = { class: "image-tool__image" }, qe = ["src"], N = [ae, se, ne, re, ce, pe, me, ke, _e, z(He, [["__scopeId", "data-v-f867b955"]]), c({ name: "ebldelimiter", inheritAttrs: !1, __name: "delimiter", setup: (t) => (e, a) => (l(), s("div", Te, [...a[0] || (a[0] = [o("div", { class: "ce-delimiter__line__wrapper" }, [o("div", { class: "ce-delimiter__line" })], -1)])])) }), c({ name: "eblList", inheritAttrs: !1, __name: "List", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
119
- const e = u(t, "block");
120
- return (a, i) => (l(), s(k, null, [e.value.data.style === "unordered" ? (l(), s("ul", Ce, [(l(!0), s(k, null, _(e.value.data.items, (d, m) => (l(), s("li", { class: "cdx-list__item", key: m }, [o("div", { class: "cdx-list__item-content", innerHTML: d.content }, null, 8, Ae)]))), 128))])) : H("", !0), e.value.data.style === "ordered" ? (l(), s("ol", { key: 1, class: "cdx-list cdx-list-ordered", style: f(`--list-counter-type: ${e.value.data.meta.counterType};`) }, [(l(!0), s(k, null, _(e.value.data.items, (d, m) => (l(), s("li", { class: "cdx-list__item", key: m }, [o("div", { class: "cdx-list__item-content", innerHTML: d.content }, null, 8, Ee)]))), 128))], 4)) : H("", !0), e.value.data.style === "checklist" ? (l(), s("ul", Se, [(l(!0), s(k, null, _(e.value.data.items, (d, m) => (l(), s("li", { class: "cdx-list__item", key: m }, [o("div", { class: y(["cdx-list__checkbox cdx-list__checkbox-check--disabled", { "cdx-list__checkbox--checked": d.meta.checked }]) }, [...i[0] || (i[0] = [o("span", { class: "cdx-list__checkbox-check" }, [o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24" }, [o("path", { stroke: "currentColor", "stroke-linecap": "round", "stroke-width": "2", d: "M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9" })])], -1)])], 2), o("div", { class: "cdx-list__item-content", innerHTML: d.content }, null, 8, je)]))), 128))])) : H("", !0)], 64));
121
- } }), c({ name: "eblquote", inheritAttrs: !1, __name: "quote", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
122
- const e = u(t, "block");
123
- return (a, i) => (l(), s("div", ze, [o("blockquote", { class: "cdx-input cdx-quote__text cdx-block-quote", innerHTML: e.value.data.text }, null, 8, Be)]));
124
- } }), z(c({ name: "ebltable", inheritAttrs: !1, __name: "table", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
125
- const e = u(t, "block"), a = B(() => {
126
- let i = "";
127
- if (e.value.data.colWidth && e.value.data.colWidth.length > 0) for (let d = 0; d < e.value.data.colWidth.length; d++) i += " " + e.value.data.colWidth[d] + "px";
128
- return i ? { "--col-width": i } : {};
121
+ } }), B = (t, e) => {
122
+ const l = t.__vccOpts || t;
123
+ for (const [o, d] of e) l[o] = d;
124
+ return l;
125
+ }, De = B(Re, [["__scopeId", "data-v-f867b955"]]), Ne = { class: "ce-delimiter cdx-block" }, Fe = v({ name: "ebldelimiter", inheritAttrs: !1, __name: "delimiter", setup: (t) => (e, l) => (a(), s("div", Ne, [...l[0] || (l[0] = [i("div", { class: "ce-delimiter__line__wrapper" }, [i("div", { class: "ce-delimiter__line" })], -1)])])) }), Oe = { key: 0, class: "cdx-list cdx-list-unordered" }, Ye = ["innerHTML"], Ge = ["innerHTML"], Ke = { key: 2, class: "cdx-list cdx-list-checklist" }, Pe = ["innerHTML"], Ue = v({ name: "eblList", inheritAttrs: !1, __name: "List", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
126
+ const e = m(t, "block");
127
+ return (l, o) => (a(), s(_, null, [e.value.data.style === "unordered" ? (a(), s("ul", Oe, [(a(!0), s(_, null, x(e.value.data.items, (d, c) => (a(), s("li", { class: "cdx-list__item", key: c }, [i("div", { class: "cdx-list__item-content", innerHTML: d.content }, null, 8, Ye)]))), 128))])) : y("", !0), e.value.data.style === "ordered" ? (a(), s("ol", { key: 1, class: "cdx-list cdx-list-ordered", style: g(`--list-counter-type: ${e.value.data.meta.counterType};`) }, [(a(!0), s(_, null, x(e.value.data.items, (d, c) => (a(), s("li", { class: "cdx-list__item", key: c }, [i("div", { class: "cdx-list__item-content", innerHTML: d.content }, null, 8, Ge)]))), 128))], 4)) : y("", !0), e.value.data.style === "checklist" ? (a(), s("ul", Ke, [(a(!0), s(_, null, x(e.value.data.items, (d, c) => (a(), s("li", { class: "cdx-list__item", key: c }, [i("div", { class: L(["cdx-list__checkbox cdx-list__checkbox-check--disabled", { "cdx-list__checkbox--checked": d.meta.checked }]) }, [...o[0] || (o[0] = [i("span", { class: "cdx-list__checkbox-check" }, [i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24" }, [i("path", { stroke: "currentColor", "stroke-linecap": "round", "stroke-width": "2", d: "M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9" })])], -1)])], 2), i("div", { class: "cdx-list__item-content", innerHTML: d.content }, null, 8, Pe)]))), 128))])) : y("", !0)], 64));
128
+ } }), Ze = { class: "cdx-block cdx-quote" }, Je = ["innerHTML"], Qe = v({ name: "eblquote", inheritAttrs: !1, __name: "quote", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
129
+ const e = m(t, "block");
130
+ return (l, o) => (a(), s("div", Ze, [i("blockquote", { class: "cdx-input cdx-quote__text cdx-block-quote", innerHTML: e.value.data.text }, null, 8, Je)]));
131
+ } }), Xe = { class: "tc-row" }, et = ["innerHTML"], tt = B(v({ name: "ebltable", inheritAttrs: !1, __name: "table", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
132
+ const e = m(t, "block"), l = A(() => {
133
+ let o = "";
134
+ if (e.value.data.colWidth && e.value.data.colWidth.length > 0) for (let d = 0; d < e.value.data.colWidth.length; d++) o += " " + e.value.data.colWidth[d] + "px";
135
+ return o ? { "--col-width": o } : {};
129
136
  });
130
- return (i, d) => (l(), s("div", { class: "tc-wrap tc-wrap--readonly", style: f(a.value) }, [o("div", { class: y(["tc-table", { "tc-table--heading": e.value.data.withHeadings }]) }, [(l(!0), s(k, null, _(e.value.data.content, (m) => (l(), s("div", Re, [(l(!0), s(k, null, _(m, (T) => (l(), s("div", { class: "tc-cell", innerHTML: T }, null, 8, Ve))), 256))]))), 256))], 2)], 4));
131
- } }), [["__scopeId", "data-v-0627102b"]]), z(c({ name: "eblimage", inheritAttrs: !1, __name: "image", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
132
- const e = u(t, "block");
133
- return (a, i) => (l(), s("div", { class: "cdx-block image-tool image-tool--filled", style: f({ width: e.value.tunes.imageResize.resizeSize + "px" }) }, [o("div", $e, [o("img", { class: "image-tool__image-picture", src: e.value.data.file.url }, null, 8, qe)]), i[0] || (i[0] = o("div", { class: "cdx-input image-tool__caption", contenteditable: "true", "data-placeholder": "Caption", "data-empty": "true" }, null, -1))], 4));
134
- } }), [["__scopeId", "data-v-7b6db628"]])];
135
- let D = [];
137
+ return (o, d) => (a(), s("div", { class: "tc-wrap tc-wrap--readonly", style: g(l.value) }, [i("div", { class: L(["tc-table", { "tc-table--heading": e.value.data.withHeadings }]) }, [(a(!0), s(_, null, x(e.value.data.content, (c) => (a(), s("div", Xe, [(a(!0), s(_, null, x(c, (h) => (a(), s("div", { class: "tc-cell", innerHTML: h }, null, 8, et))), 256))]))), 256))], 2)], 4));
138
+ } }), [["__scopeId", "data-v-0627102b"]]), lt = { class: "image-tool__image" }, at = ["src"], ot = B(v({ name: "eblimage", inheritAttrs: !1, __name: "image", props: { block: { default: { id: "", type: "", data: {} } }, blockModifiers: {} }, emits: ["update:block"], setup(t) {
139
+ const e = m(t, "block");
140
+ return (l, o) => (a(), s("div", { class: "cdx-block image-tool image-tool--filled", style: g({ width: e.value.tunes.imageResize.resizeSize + "px" }) }, [i("div", lt, [i("img", { class: "image-tool__image-picture", src: e.value.data.file.url }, null, 8, at)]), o[0] || (o[0] = i("div", { class: "cdx-input image-tool__caption", contenteditable: "true", "data-placeholder": "Caption", "data-empty": "true" }, null, -1))], 4));
141
+ } }), [["__scopeId", "data-v-7b6db628"]]), st = ["onClick"], nt = v({ name: "ebloutline", inheritAttrs: !1, __name: "outline", props: { blocks: { default: [] }, blocksModifiers: {} }, emits: ["update:blocks"], setup(t) {
142
+ const e = m(t, "blocks"), l = H([]);
143
+ function o(c) {
144
+ return c.data.text.replace(/<[^>]+>/g, "").replace(/&nbsp;/g, "");
145
+ }
146
+ function d(c) {
147
+ let h = `level_${c.level}`;
148
+ return c.selected && (h += " selected"), h;
149
+ }
150
+ return te(() => e, (c, h) => {
151
+ c && (l.value = c.value.filter((r) => r.type == "h1" || r.type == "h2" || r.type == "h3").map((r) => ({ id: r.id, level: r.data.level, text: o(r), selected: !1 })));
152
+ }, { deep: !0 }), le(() => {
153
+ ae(() => {
154
+ (function() {
155
+ const c = document.querySelectorAll('.ebl-er-doc .ce-block[data-type="h1"],.ebl-er-doc .ce-block[data-type="h2"],.ebl-er-doc .ce-block[data-type="h3"]'), h = new IntersectionObserver((r) => {
156
+ r.forEach((M) => {
157
+ if (M.isIntersecting) {
158
+ const k = M.target;
159
+ l.value.forEach((n) => n.selected = !1);
160
+ const p = l.value.find((n) => n.id == k.dataset.id);
161
+ p && (p.selected = !0);
162
+ }
163
+ });
164
+ }, { rootMargin: "-84px 0px -75% 0px", threshold: 1, root: null });
165
+ c.forEach((r) => {
166
+ h.observe(r);
167
+ });
168
+ })();
169
+ });
170
+ }), oe(() => {
171
+ }), (c, h) => (a(!0), s(_, null, x(l.value, (r) => (a(), s("div", { key: r.id, class: L(["ebl-er-doc-outline-item", d(r)]), onClick: (M) => function(k) {
172
+ l.value.forEach((b) => b.selected = !1), k.selected = !0;
173
+ const p = document.querySelector('.ebl-er-doc .ce-block[data-id="' + k.id + '"]'), n = document.querySelector(".ebl-er-header"), u = (n == null ? void 0 : n.offsetHeight) || 0;
174
+ if (p) {
175
+ const b = p.offsetTop;
176
+ window.scrollTo({ top: b - u, behavior: "smooth" });
177
+ }
178
+ }(r) }, [i("span", null, F(r.text), 1)], 10, st))), 128));
179
+ } }), N = [me, fe, ye, ge, we, He, Ce, Ae, $e, De, Fe, Ue, Qe, tt, ot, nt];
180
+ let O = [];
136
181
  for (let t in N) {
137
- const e = X(N[t]);
138
- D.push(e);
182
+ const e = ne(N[t]);
183
+ O.push(e);
139
184
  }
140
- const Y = /* @__PURE__ */ ((t = []) => ({ version: "2.31.29", install: (e) => {
141
- e[W] || (e[W] = !0, t.forEach((a) => e.use(a)));
142
- } }))(D), Ne = Y.install, De = Y.version;
185
+ const Y = /* @__PURE__ */ ((t = []) => ({ version: "2.31.31", install: (e) => {
186
+ e[D] || (e[D] = !0, t.forEach((l) => e.use(l)));
187
+ } }))(O), rt = Y.install, dt = Y.version;
143
188
  export {
144
189
  Y as default,
145
- Ne as install,
146
- De as version
190
+ rt as install,
191
+ dt as version
147
192
  };
148
- //# sourceMappingURL=index.mjs.map
@@ -47,7 +47,7 @@
47
47
  display: flex;
48
48
  gap:15px;
49
49
  justify-content: space-between;
50
- z-index: 12;
50
+
51
51
  border-bottom-style: solid;
52
52
  border-color: #9ca3af0d;
53
53
  border-bottom-width: 1px;
@@ -15,54 +15,100 @@
15
15
  @import './underline.css';
16
16
  @import './color.css';
17
17
 
18
- .ebl-editor-render{
19
- cursor:text;
18
+ .ebl-er-doc{
19
+ font-family: var(--font-family);
20
20
  font-size: 16px;
21
21
  font-weight: 400;
22
- background-color: #fff;
23
22
 
24
- height: 100%;
25
- overflow: hidden;
26
- position: relative;
27
- padding-left: 100px;
28
- padding-right: 100px;
29
- max-width: 100%;
30
- padding-right: 280px;
23
+ box-sizing: border-box;
24
+ }
25
+ .ebl-er-header{
26
+ height: var(--ebl-er-header-height);
27
+ box-sizing: border-box;
28
+ position:sticky;
29
+ top: 0;
30
+ z-index: 10;
31
+ }
32
+ .ebl-er-footer{
33
+ height: var(--ebl-er-footer-height);
34
+ box-sizing: border-box;
35
+ }
36
+ .ebl-er-container{
37
+ display: flex;
38
+ flex-direction: row;
39
+ min-height: calc(100vh - var(--ebl-er-header-height));
40
+ }
41
+ .ebl-er-doc-menu{
42
+ width: var(--ebl-er-doc-menu-width);
43
+ box-sizing: border-box;
44
+ flex-shrink:0;
45
+ }
46
+ .ebl-er-doc-menu-content{
47
+ box-sizing: border-box;
48
+ height: calc(100vh - var(--ebl-er-header-height));
49
+ overflow: auto;
50
+ position:sticky;
51
+ top: var(--ebl-er-header-height);
52
+ }
53
+ .ebl-er-doc-content{
54
+ box-sizing:border-box;
55
+ display:flex;
56
+ flex-direction: row;
57
+ max-width: calc(100% - var(--ebl-er-doc-menu-width));
58
+
59
+ }
60
+ .ebl-er-doc-content-inner{
61
+ box-sizing: border-box;
62
+ flex: 1;
63
+ padding: 50px;
64
+ width: 100%;
65
+ overflow-x: hidden;
66
+ white-space: normal;
67
+ word-wrap: break-word;
68
+ }
69
+ .ebl-er-doc-content-inner .ce-block {
70
+ width: 100%;
71
+ }
72
+ .ebl-er-doc-outline{
73
+
74
+ width: 280px;
75
+ box-sizing: border-box;
76
+ height: calc(100vh - var(--ebl-er-header-height));
77
+ position:sticky;
78
+ top: var(--ebl-er-header-height);
79
+ overflow: auto;
80
+ padding: 12px;
31
81
  }
32
82
 
33
- @media(max-width:1240px){
34
- .ebl-outline{
35
- display: none;
36
-
37
- }
38
- .ebl-editor.outline{
39
- padding-right: 0;
40
- }
83
+ @media(max-width:960px){
84
+ .ebl-er-doc-outline{
85
+ display: none;
86
+ }
41
87
  }
42
88
 
43
89
 
44
90
 
45
91
 
46
92
  /* 滚动条整体部分 */
47
- .ebl-editor-render ::-webkit-scrollbar {
93
+ .ebl-er-doc ::-webkit-scrollbar {
48
94
  width: 6px; /* 滚动条的宽度 */
49
95
  height: 6px; /* 滚动条的高度 */
50
96
  }
51
97
 
52
98
  /* 滚动条轨道 */
53
- .ebl-editor-render ::-webkit-scrollbar-track {
99
+ .ebl-er-doc ::-webkit-scrollbar-track {
54
100
  background: #f1f1f1; /* 轨道颜色 */
55
101
  border-radius: 1px; /* 轨道圆角 */
56
102
  }
57
103
 
58
104
  /* 滚动条滑块 */
59
- .ebl-editor-render ::-webkit-scrollbar-thumb {
105
+ .ebl-er-doc ::-webkit-scrollbar-thumb {
60
106
  background: #C0C0C0; /* 滑块颜色 */
61
107
  border-radius: 10px; /* 滑块圆角 */
62
108
  border: 1px solid #fff; /* 滑块边框 */
63
109
  }
64
110
 
65
111
  /* 滑块悬停时 */
66
- .ebl-editor-render ::-webkit-scrollbar-thumb:hover {
112
+ .ebl-er-doc ::-webkit-scrollbar-thumb:hover {
67
113
  background: #555; /* 滑块悬停时的颜色 */
68
114
  }
@@ -1,35 +1,18 @@
1
- .ebl-outline{
2
- background-color: #fff;
3
- box-sizing: border-box;
4
- position:fixed;
5
- top:var(--header-height,84px);
1
+ .ebl-er-doc-outline-item{
2
+ padding-left:24px;
3
+ padding-right: 24px;
4
+ padding-top:7px;
5
+ padding-bottom: 7px;
6
+ cursor: pointer;
6
7
 
7
- right:0;
8
- padding: 15px 12px;
9
- width:280px;
10
-
11
- overflow: hidden;
12
- font-family: "Qihei Lenovo", "Microsoft YaHei", "微软雅黑", "宋体", sans-serif;
13
- color: #606266;
14
- font-size: 14px;
15
- padding-bottom: 50px;
16
- max-height: calc(100vh - var(--header-height,84px));
8
+ white-space: normal;
9
+ word-wrap: break-word;
17
10
  }
18
- .ebl-outline:hover{
19
- overflow: auto;
11
+ .ebl-er-doc-outline-item:hover{
12
+ background-color: #F6F6F6;
20
13
  }
21
-
22
-
23
-
24
- .ebl-outline__item{
25
- cursor: pointer;
26
- height:36px;
27
- line-height: 36px;
28
- padding: 0 24px;
29
- word-break: break-word;
30
- overflow: hidden;
31
- text-overflow: ellipsis;
32
- white-space: nowrap;
14
+ .ebl-er-doc-outline-item.selected{
15
+ background-color: #EBEBEB;
33
16
  }
34
17
 
35
18
  .ebl-outline .level_1{
@@ -41,12 +24,4 @@
41
24
  }
42
25
  .ebl-outline .level_3{
43
26
  padding-left: 60px;
44
- }
45
- .ebl-outline__item.active{
46
- color:#222222;
47
- font-weight: bold;
48
- background-color: #EBEBEB;
49
- }
50
- .ebl-outline__item:hover{
51
- background-color: #EBEBEB;
52
- }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ebl-vue/editor-render",
3
- "version": "2.31.29",
3
+ "version": "2.31.31",
4
4
  "type": "module",
5
5
  "author": "lrj525@sina.com",
6
6
  "description": "用于渲染editor-full编辑器内容",