@ebl-vue/editor-full 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +62 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--color-border: #EFF0F1}.ebl-editor-title{min-height:55px}.ebl-editor-title-wrap{min-height:55px;margin:0 auto}.ebl-editor-title-input{min-height:55px;width:100%;font-weight:600;border:none;background-color:transparent;font-size:34px}.ebl-editor-title-input:focus{outline:none}.ebl-editor-title-input:active{outline:none}.ebl-editor-time-wrap{white-space:nowrap;font-size:14px;font-weight:400;line-height:22px;padding-top:12px;padding-bottom:8px;color:#646a73}.ce-block__content{max-width:650px}@media (min-width: 1050px){.ce-block__content,.ce-toolbar__content{max-width:700px}}.ce-toolbar,.ce-inline-toolbar{z-index:1000}.ce-toolbar__plus{border:1px solid #EFF0F1}.ce-toolbar .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-toolbar .ce-popover__items .ce-popover-item{position:relative}.ce-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ce-toolbar .ce-popover-item-html,.ce-toolbar .ce-popover-item-separator,.ce-toolbar .ce-popover-item[data-item-name=convert-to]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title{display:block}.ce-inline-toolbar .ce-popover__items{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ce-inline-toolbar .ce-popover__items{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-inline-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:50%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #a0a0a0;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{background:none}.ce-header{padding:.6em 0 3px;margin:0;line-height:1.25em;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.ce-tune-alignment--right{text-align:right}.ce-tune-alignment--center{text-align:center}.ce-tune-alignment--left{text-align:left}.ce-paragraph{line-height:1.6em;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}.ce-editorjs-x-shiki{border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 0}.ce-editorjs-x-shiki__code{position:relative;float:left;min-width:100%;overflow-x:auto}.ce-editorjs-x-shiki__selector{display:-webkit-box;display:-ms-flexbox;display:flex;gap:.25rem;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;z-index:12;border-bottom-style:solid;border-color:#9ca3af0d;padding:.5rem}.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;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__textarea{white-space:pre;overflow:hidden;background-color:transparent;position:absolute;padding:20px;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__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%;-webkit-transition:opacity .3s;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}.cdx-quote{overflow:hidden;margin:0;-webkit-box-sizing:border-box;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;-webkit-box-shadow:none;box-shadow:none;color:#666;line-height:1.6em;padding:1px 0 0 12px;text-align:left}.ce-delimiter__line__wrapper{height:24px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-delimiter__line{-webkit-box-flex:1;-ms-flex:1;flex:1;height:2px;background-color:#eff0f1}.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;grid-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-left: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;grid-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-left: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:-webkit-box;display:-ms-flexbox;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;-webkit-transform:scale(2.5);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);-webkit-box-sizing:border-box;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;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:opacity .4s,-webkit-transform .4s ease-out;transition:opacity .4s,-webkit-transform .4s ease-out;transition:transform .4s ease-out,opacity .4s;transition:transform .4s ease-out,opacity .4s,-webkit-transform .4s ease-out}.cdx-list__checkbox-check--disabled{pointer-events:none}.cdx-list-start-with-field{background:#f8f8f8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-list-start-with-field--invalid{background:#ffeced;border:1px solid #E13F3F}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - var(--toolbox-buttons-size) - var(--icon-margin-right))}.cdx-list-start-with-field__input::-webkit-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-moz-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input:-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}.cdx-alert{position:relative;padding:10px;border-radius:5px;margin-bottom: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:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;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-popover-indent-item{cursor:default!important}.ce-popover-indent-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;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:0;border-width:0px;color:#000;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:#707684;opacity:.3;cursor:default}.ce-popover-indent-item .ce-popover-item__icon:focus{outline:none}.ce-popover-indent-item[version^="2.26"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon{box-shadow:0 0 0 1px #c9c9cc7a!important;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48)!important}.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon:hover{background-color:#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}.cdx-marker{background:#f5eb6f4a;padding:3px 0}.ce-popover--inline .ce-popover--nested .ce-popover__container{width:-webkit-min-content!important;width:-moz-min-content!important;width:min-content!important;min-width:0!important;min-width:initial!important}.ce-popover--inline .ce-popover--nested .ce-popover__items{width:-webkit-max-content;width:-moz-max-content;width:max-content}.editorjs__color-selector-container{display:grid;grid-gap:10px;padding:4px}.editorjs__color-selector__container-item{width:30px;height:30px;display:block;cursor:pointer;border-radius:100%;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.editorjs__color-selector__container-item:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.cdx-underline{-webkit-text-decoration:underline;text-decoration:underline}.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}.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);-webkit-box-sizing:border-box;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:-webkit-box;display:-ms-flexbox;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);-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-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);-webkit-box-align:center;-ms-flex-align:center;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{-webkit-transition:0s;transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{-webkit-transition:background-color .1s ease;transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{-webkit-transition:.1s;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;-webkit-transition:opacity .1s;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);-webkit-transform:translate(calc(var(--toggler-click-zone-size)*-1/2));transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);-webkit-transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));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:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;-webkit-transition:opacity .15s ease;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);-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.12941);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:block;-webkit-animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-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:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack: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{-webkit-transition:-webkit-transform .2s ease-in;transition:-webkit-transform .2s ease-in;transition:transform .2s ease-in;transition:transform .2s ease-in,-webkit-transform .2s ease-in;-webkit-transform:rotate(90deg) scale(1.2);transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@-webkit-keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cell-resizable{cursor:col-resize}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { defineComponent as Mt, inject as _t, ref as Ht, onMounted as It, toRaw as At, onUnmounted as Bt, createElementBlock as
|
|
2
|
+
import { defineComponent as Mt, inject as _t, ref as Ht, onMounted as It, toRaw as At, onUnmounted as Bt, createElementBlock as Dt, openBlock as Ot, createElementVNode as P, withDirectives as Rt, vModelText as Nt, toDisplayString as Wt } from "vue";
|
|
3
3
|
import Pt from "@ebl-vue/editorjs";
|
|
4
|
-
import { bundledLanguagesInfo as
|
|
5
|
-
import { make as
|
|
6
|
-
import { focus as
|
|
4
|
+
import { bundledLanguagesInfo as $t, codeToHtml as zt } from "shiki";
|
|
5
|
+
import { make as k, isEmpty as it } from "@editorjs/dom";
|
|
6
|
+
import { focus as Ft, isCaretAtStartOfInput as qt, getCaretNodeAndOffset as Ut, getContenteditableSlice as Vt } from "@editorjs/caret";
|
|
7
7
|
import rt from "vanilla-caret-js";
|
|
8
8
|
const ot = Symbol("INSTALLED_KEY"), jt = (d, t) => (d.install = (e) => {
|
|
9
9
|
for (const i of [d, ...Object.values({})]) e.component(i.name, i);
|
|
@@ -684,10 +684,10 @@ class nt {
|
|
|
684
684
|
return { icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 9V7.2C8 7.08954 8.08954 7 8.2 7L12 7M16 9V7.2C16 7.08954 15.9105 7 15.8 7L12 7M12 7L12 17M12 17H10M12 17H14"/></svg>', title: "Text" };
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
class
|
|
687
|
+
class $ {
|
|
688
688
|
constructor({ data: t, config: e, api: i, readOnly: s }) {
|
|
689
689
|
var n;
|
|
690
|
-
this._selectorLanguage = "", this._selectorTheme = "", this.api = i, this.readOnly = s, this.placeholder = this.api.i18n.t(e.placeholder ||
|
|
690
|
+
this._selectorLanguage = "", this._selectorTheme = "", this.api = i, this.readOnly = s, this.placeholder = this.api.i18n.t(e.placeholder || $.DEFAULT_PLACEHOLDER), this._selectorLanguage = t.lang || e.lang || $.DEFAULT_LANGUAGE, this._selectorTheme = t.theme || e.theme || $.DEFAULT_THEME, this.CSS = { baseClass: this.api.styles.block, input: this.api.styles.input, wrapper: "ce-editorjs-x-shiki", textarea: "ce-editorjs-x-shiki__textarea", span: "ce-editorjs-x-shiki__span", selectorLanguage: "ce-editorjs-x-shiki__selector-language", selectorTheme: "ce-editorjs-x-shiki__selector-theme" }, this.nodes = { holder: null, textarea: null }, this.data = { code: (n = t.code) != null ? n : "", lang: this._selectorLanguage, theme: this._selectorTheme }, this.nodes.holder = this.drawView();
|
|
691
691
|
}
|
|
692
692
|
static get isReadOnlySupported() {
|
|
693
693
|
return !0;
|
|
@@ -751,7 +751,7 @@ class W {
|
|
|
751
751
|
}
|
|
752
752
|
drawView() {
|
|
753
753
|
const t = document.createElement("div"), e = document.createElement("div"), i = document.createElement("div"), s = document.createElement("div"), n = document.createElement("div"), r = document.createElement("div"), o = document.createElement("select"), a = document.createElement("select"), h = document.createElement("span"), l = document.createElement("textarea");
|
|
754
|
-
return t.classList.add(this.CSS.baseClass, this.CSS.wrapper), e.classList.add("ce-editorjs-x-shiki__code"), i.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), n.classList.add("ce-editorjs-x-shiki__copy"), r.classList.add("ce-editorjs-x-shiki__copy_tip"), o.classList.add(this.CSS.selectorLanguage), l.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><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"/><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"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', r.innerText = this.api.i18n.t("Copied"),
|
|
754
|
+
return t.classList.add(this.CSS.baseClass, this.CSS.wrapper), e.classList.add("ce-editorjs-x-shiki__code"), i.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), n.classList.add("ce-editorjs-x-shiki__copy"), r.classList.add("ce-editorjs-x-shiki__copy_tip"), o.classList.add(this.CSS.selectorLanguage), l.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><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"/><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"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', r.innerText = this.api.i18n.t("Copied"), $t.forEach((c) => {
|
|
755
755
|
const u = document.createElement("option");
|
|
756
756
|
u.value = c.id, u.text = c.name, o.appendChild(u);
|
|
757
757
|
}), o.value = this.data.lang, l.value = this.data.code, l.placeholder = this.placeholder, l.spellcheck = !1, l.autocomplete = "off", l.autocapitalize = "off", this.readOnly && (l.disabled = !0), e.appendChild(h), e.appendChild(l), this.readOnly ? i.appendChild(s) : i.appendChild(o), n.appendChild(r), i.appendChild(n), t.appendChild(i), t.appendChild(e), this.runShiki().then(({ html: c, preStyle: u }) => {
|
|
@@ -830,8 +830,8 @@ class te {
|
|
|
830
830
|
return { baseClass: this.api.styles.block, wrapper: "cdx-quote", text: "cdx-quote__text", input: this.api.styles.input };
|
|
831
831
|
}
|
|
832
832
|
render() {
|
|
833
|
-
const t =
|
|
834
|
-
return this._quoteElement =
|
|
833
|
+
const t = k("div", [this._CSS.baseClass, this._CSS.wrapper]);
|
|
834
|
+
return this._quoteElement = k("blockquote", [this._CSS.input, this._CSS.text, "cdx-block-quote"], { contentEditable: !this.readOnly, innerHTML: this._data.text }), this._quoteElement.addEventListener("keydown", (e) => this.handleKeydown(e)), t.appendChild(this._quoteElement), t;
|
|
835
835
|
}
|
|
836
836
|
get currentItem() {
|
|
837
837
|
let t = window.getSelection().anchorNode;
|
|
@@ -892,20 +892,20 @@ class ee {
|
|
|
892
892
|
this.data = {};
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
const
|
|
895
|
+
const w = "cdx-list", v = { wrapper: w, item: `${w}__item`, itemContent: `${w}__item-content`, itemChildren: `${w}__item-children` };
|
|
896
896
|
class S {
|
|
897
897
|
static get CSS() {
|
|
898
|
-
return { ...v, orderedList: `${
|
|
898
|
+
return { ...v, orderedList: `${w}-ordered` };
|
|
899
899
|
}
|
|
900
900
|
constructor(t, e) {
|
|
901
901
|
this.config = e, this.readOnly = t;
|
|
902
902
|
}
|
|
903
903
|
renderWrapper(t) {
|
|
904
904
|
let e;
|
|
905
|
-
return e =
|
|
905
|
+
return e = k("ol", t === !0 ? [S.CSS.wrapper, S.CSS.orderedList] : [S.CSS.orderedList, S.CSS.itemChildren]), e;
|
|
906
906
|
}
|
|
907
907
|
renderItem(t, e) {
|
|
908
|
-
const i =
|
|
908
|
+
const i = k("li", S.CSS.item), s = k("div", S.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() });
|
|
909
909
|
return i.appendChild(s), i;
|
|
910
910
|
}
|
|
911
911
|
getItemContent(t) {
|
|
@@ -921,17 +921,17 @@ class S {
|
|
|
921
921
|
}
|
|
922
922
|
class x {
|
|
923
923
|
static get CSS() {
|
|
924
|
-
return { ...v, unorderedList: `${
|
|
924
|
+
return { ...v, unorderedList: `${w}-unordered` };
|
|
925
925
|
}
|
|
926
926
|
constructor(t, e) {
|
|
927
927
|
this.config = e, this.readOnly = t;
|
|
928
928
|
}
|
|
929
929
|
renderWrapper(t) {
|
|
930
930
|
let e;
|
|
931
|
-
return e =
|
|
931
|
+
return e = k("ul", t === !0 ? [x.CSS.wrapper, x.CSS.unorderedList] : [x.CSS.unorderedList, x.CSS.itemChildren]), e;
|
|
932
932
|
}
|
|
933
933
|
renderItem(t, e) {
|
|
934
|
-
const i =
|
|
934
|
+
const i = k("li", x.CSS.item), s = k("div", x.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() });
|
|
935
935
|
return i.appendChild(s), i;
|
|
936
936
|
}
|
|
937
937
|
getItemContent(t) {
|
|
@@ -950,23 +950,23 @@ function A(d) {
|
|
|
950
950
|
}
|
|
951
951
|
class m {
|
|
952
952
|
static get CSS() {
|
|
953
|
-
return { ...v, checklist: `${
|
|
953
|
+
return { ...v, checklist: `${w}-checklist`, itemChecked: `${w}__checkbox--checked`, noHover: `${w}__checkbox--no-hover`, checkbox: `${w}__checkbox-check`, checkboxContainer: `${w}__checkbox`, checkboxCheckDisabled: `${w}__checkbox-check--disabled` };
|
|
954
954
|
}
|
|
955
955
|
constructor(t, e) {
|
|
956
956
|
this.config = e, this.readOnly = t;
|
|
957
957
|
}
|
|
958
958
|
renderWrapper(t) {
|
|
959
959
|
let e;
|
|
960
|
-
return t === !0 ? (e =
|
|
960
|
+
return t === !0 ? (e = k("ul", [m.CSS.wrapper, m.CSS.checklist]), e.addEventListener("click", (i) => {
|
|
961
961
|
const s = i.target;
|
|
962
962
|
if (s) {
|
|
963
963
|
const n = s.closest(`.${m.CSS.checkboxContainer}`);
|
|
964
964
|
n && n.contains(s) && this.toggleCheckbox(n);
|
|
965
965
|
}
|
|
966
|
-
})) : e =
|
|
966
|
+
})) : e = k("ul", [m.CSS.checklist, m.CSS.itemChildren]), e;
|
|
967
967
|
}
|
|
968
968
|
renderItem(t, e) {
|
|
969
|
-
const i =
|
|
969
|
+
const i = k("li", [m.CSS.item, m.CSS.item]), s = k("div", m.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() }), n = k("span", m.CSS.checkbox), r = k("div", m.CSS.checkboxContainer);
|
|
970
970
|
return e.checked === !0 && r.classList.add(m.CSS.itemChecked), this.readOnly && r.classList.add(m.CSS.checkboxCheckDisabled), n.innerHTML = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
971
971
|
<path d="M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9" stroke="black" stroke-width="2" stroke-linecap="round"/>
|
|
972
972
|
</svg>
|
|
@@ -1015,12 +1015,12 @@ function Y(d) {
|
|
|
1015
1015
|
let t = d;
|
|
1016
1016
|
d.classList.contains(v.item) && (t = H(d)), t !== null && E(t).length === 0 && t.remove();
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function F(d) {
|
|
1019
1019
|
return d.querySelector(`.${v.itemContent}`);
|
|
1020
1020
|
}
|
|
1021
1021
|
function R(d, t = !0) {
|
|
1022
|
-
const e =
|
|
1023
|
-
e &&
|
|
1022
|
+
const e = F(d);
|
|
1023
|
+
e && Ft(e, t);
|
|
1024
1024
|
}
|
|
1025
1025
|
class G {
|
|
1026
1026
|
get currentItem() {
|
|
@@ -1065,7 +1065,7 @@ class G {
|
|
|
1065
1065
|
return { tags: ["OL", "UL", "LI"] };
|
|
1066
1066
|
}
|
|
1067
1067
|
merge(t) {
|
|
1068
|
-
const e = this.block.holder.querySelectorAll(`.${v.item}`), i = e[e.length - 1], s =
|
|
1068
|
+
const e = this.block.holder.querySelectorAll(`.${v.item}`), i = e[e.length - 1], s = F(i);
|
|
1069
1069
|
if (i === null || s === null || (s.insertAdjacentHTML("beforeend", t.items[0].content), this.listWrapper === void 0)) return;
|
|
1070
1070
|
const n = E(this.listWrapper);
|
|
1071
1071
|
if (n.length === 0) return;
|
|
@@ -1118,7 +1118,7 @@ class G {
|
|
|
1118
1118
|
backspace(t) {
|
|
1119
1119
|
var i;
|
|
1120
1120
|
const e = this.currentItem;
|
|
1121
|
-
e !== null &&
|
|
1121
|
+
e !== null && qt(e) && ((i = window.getSelection()) == null ? void 0 : i.isCollapsed) !== !1 && (t.stopPropagation(), e.parentNode !== this.listWrapper || e.previousElementSibling !== null ? (t.preventDefault(), this.mergeItemWithPrevious(e)) : this.convertFirstItemToDefaultBlock());
|
|
1122
1122
|
}
|
|
1123
1123
|
shiftTab(t) {
|
|
1124
1124
|
t.stopPropagation(), t.preventDefault(), this.currentItem !== null && this.unshiftItem(this.currentItem);
|
|
@@ -1153,7 +1153,7 @@ class G {
|
|
|
1153
1153
|
splitItem(t) {
|
|
1154
1154
|
const [e, i] = Ut();
|
|
1155
1155
|
if (e === null) return;
|
|
1156
|
-
const s =
|
|
1156
|
+
const s = F(t);
|
|
1157
1157
|
let n;
|
|
1158
1158
|
n = s === null ? "" : Vt(s, e, i, "right", !0);
|
|
1159
1159
|
const r = H(t), o = this.renderItem(n);
|
|
@@ -1173,7 +1173,7 @@ class G {
|
|
|
1173
1173
|
const r = this.renderer.getItemContent(t);
|
|
1174
1174
|
if (!n) return;
|
|
1175
1175
|
R(n, !1);
|
|
1176
|
-
const o =
|
|
1176
|
+
const o = F(n);
|
|
1177
1177
|
if (o === null) return;
|
|
1178
1178
|
o.insertAdjacentHTML("beforeend", r);
|
|
1179
1179
|
const a = E(t);
|
|
@@ -1245,7 +1245,7 @@ class G {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
}
|
|
1247
1247
|
const ie = /* @__PURE__ */ new Map([["Numeric", "numeric"], ["Lower Roman", "lower-roman"], ["Upper Roman", "upper-roman"], ["Lower Alpha", "lower-alpha"], ["Upper Alpha", "upper-alpha"]]);
|
|
1248
|
-
class
|
|
1248
|
+
class q {
|
|
1249
1249
|
static get isReadOnlySupported() {
|
|
1250
1250
|
return !0;
|
|
1251
1251
|
}
|
|
@@ -1277,7 +1277,7 @@ class F {
|
|
|
1277
1277
|
return { tags: ["OL", "UL", "LI"] };
|
|
1278
1278
|
}
|
|
1279
1279
|
static get conversionConfig() {
|
|
1280
|
-
return { export: (t) =>
|
|
1280
|
+
return { export: (t) => q.joinRecursive(t), import: (t, e) => ({ meta: {}, items: [{ content: t, meta: {}, items: [] }], style: (e == null ? void 0 : e.defaultStyle) !== void 0 ? e.defaultStyle : "unordered" }) };
|
|
1281
1281
|
}
|
|
1282
1282
|
get listStyle() {
|
|
1283
1283
|
return this.data.style || this.defaultListStyle;
|
|
@@ -1308,7 +1308,7 @@ class F {
|
|
|
1308
1308
|
}(t) : r, this.listStyle === "ordered" && this.data.meta.counterType === void 0 && (this.data.meta.counterType = "numeric"), this.changeTabulatorByStyle();
|
|
1309
1309
|
}
|
|
1310
1310
|
static joinRecursive(t) {
|
|
1311
|
-
return t.items.map((e) => `${e.content} ${
|
|
1311
|
+
return t.items.map((e) => `${e.content} ${q.joinRecursive(e)}`).join("");
|
|
1312
1312
|
}
|
|
1313
1313
|
render() {
|
|
1314
1314
|
return this.listElement = this.list.render(), this.listElement;
|
|
@@ -1992,7 +1992,7 @@ class oe extends re {
|
|
|
1992
1992
|
static get sanitize() {
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
|
-
const
|
|
1995
|
+
const O = class O {
|
|
1996
1996
|
constructor(t) {
|
|
1997
1997
|
this.tag = "U", this.api = t.api, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive };
|
|
1998
1998
|
}
|
|
@@ -2004,12 +2004,12 @@ const D = class D {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
surround(t) {
|
|
2006
2006
|
if (!t) return;
|
|
2007
|
-
const e = this.api.selection.findParentTag(this.tag,
|
|
2007
|
+
const e = this.api.selection.findParentTag(this.tag, O.CSS);
|
|
2008
2008
|
e ? this.unwrap(e) : this.wrap(t);
|
|
2009
2009
|
}
|
|
2010
2010
|
wrap(t) {
|
|
2011
2011
|
const e = document.createElement(this.tag);
|
|
2012
|
-
e.classList.add(
|
|
2012
|
+
e.classList.add(O.CSS), e.appendChild(t.extractContents()), t.insertNode(e), this.api.selection.expandToTag(e);
|
|
2013
2013
|
}
|
|
2014
2014
|
unwrap(t) {
|
|
2015
2015
|
var n;
|
|
@@ -2023,7 +2023,7 @@ const D = class D {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
checkState() {
|
|
2025
2025
|
var e;
|
|
2026
|
-
const t = this.api.selection.findParentTag(this.tag,
|
|
2026
|
+
const t = this.api.selection.findParentTag(this.tag, O.CSS);
|
|
2027
2027
|
return (e = this.button) == null || e.classList.toggle(this.iconClasses.active, !!t), !!t;
|
|
2028
2028
|
}
|
|
2029
2029
|
get toolboxIcon() {
|
|
@@ -2033,12 +2033,12 @@ const D = class D {
|
|
|
2033
2033
|
</svg>`;
|
|
2034
2034
|
}
|
|
2035
2035
|
static get sanitize() {
|
|
2036
|
-
return { u: { class:
|
|
2036
|
+
return { u: { class: O.CSS } };
|
|
2037
2037
|
}
|
|
2038
2038
|
};
|
|
2039
|
-
|
|
2040
|
-
let et =
|
|
2041
|
-
class
|
|
2039
|
+
O.isInline = !0;
|
|
2040
|
+
let et = O;
|
|
2041
|
+
class W {
|
|
2042
2042
|
constructor({ api: t }) {
|
|
2043
2043
|
this.tag = "CODE", this.api = t, this.button = null, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive };
|
|
2044
2044
|
}
|
|
@@ -2054,12 +2054,12 @@ class $ {
|
|
|
2054
2054
|
surround(t) {
|
|
2055
2055
|
var i;
|
|
2056
2056
|
if (!t) return;
|
|
2057
|
-
let e = this.api.selection.findParentTag(this.tag,
|
|
2057
|
+
let e = this.api.selection.findParentTag(this.tag, W.CSS);
|
|
2058
2058
|
e ? this.unwrap(e) : (i = t.commonAncestorContainer.parentElement) != null && i.querySelector(this.tag) || this.wrap(t);
|
|
2059
2059
|
}
|
|
2060
2060
|
wrap(t) {
|
|
2061
2061
|
let e = document.createElement(this.tag);
|
|
2062
|
-
e.classList.add(
|
|
2062
|
+
e.classList.add(W.CSS), e.appendChild(t.extractContents()), t.insertNode(e), this.api.selection.expandToTag(e);
|
|
2063
2063
|
}
|
|
2064
2064
|
unwrap(t) {
|
|
2065
2065
|
var n;
|
|
@@ -2070,7 +2070,7 @@ class $ {
|
|
|
2070
2070
|
(n = t.parentNode) == null || n.removeChild(t), i.insertNode(s), e.removeAllRanges(), e.addRange(i);
|
|
2071
2071
|
}
|
|
2072
2072
|
checkState() {
|
|
2073
|
-
const t = this.api.selection.findParentTag(this.tag,
|
|
2073
|
+
const t = this.api.selection.findParentTag(this.tag, W.CSS);
|
|
2074
2074
|
return this.button && this.button.classList.toggle(this.iconClasses.active, !!t), !!t;
|
|
2075
2075
|
}
|
|
2076
2076
|
get toolboxIcon() {
|
|
@@ -2081,7 +2081,7 @@ class $ {
|
|
|
2081
2081
|
`;
|
|
2082
2082
|
}
|
|
2083
2083
|
static get sanitize() {
|
|
2084
|
-
return { code: { class:
|
|
2084
|
+
return { code: { class: W.CSS } };
|
|
2085
2085
|
}
|
|
2086
2086
|
}
|
|
2087
2087
|
function y(d, t, e = {}) {
|
|
@@ -2149,7 +2149,7 @@ class C {
|
|
|
2149
2149
|
});
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
|
-
const
|
|
2152
|
+
const kt = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8 8L12 12M12 12L16 16M12 12L16 8M12 12L8 16"/></svg>';
|
|
2153
2153
|
class I {
|
|
2154
2154
|
constructor({ api: t, items: e, onOpen: i, onClose: s, cssModifier: n = "" }) {
|
|
2155
2155
|
this.api = t, this.items = e, this.onOpen = i, this.onClose = s, this.cssModifier = n, this.popover = null, this.wrapper = this.createToolbox();
|
|
@@ -2190,7 +2190,7 @@ class I {
|
|
|
2190
2190
|
(t = this.popover) == null || t.close(), this.wrapper.classList.remove(I.CSS.toolboxShowed);
|
|
2191
2191
|
}
|
|
2192
2192
|
}
|
|
2193
|
-
const
|
|
2193
|
+
const wt = "tc-wrap", ae = "tc-wrap--readonly", bt = "tc-table", B = "tc-row", yt = "tc-table--heading", X = "tc-row--selected", D = "tc-cell", J = "tc-cell--selected", Z = "tc-add-row", Lt = "tc-add-row--disabled", Q = "tc-add-column", St = "tc-add-column--disabled";
|
|
2194
2194
|
class le {
|
|
2195
2195
|
constructor(t, e, i, s) {
|
|
2196
2196
|
this.minCellWidhth = 50, this.defaultCellWidth = 100, this.handleDocumentMousedown = (n) => {
|
|
@@ -2202,7 +2202,7 @@ class le {
|
|
|
2202
2202
|
}, this.handleDocumentMouseup = (n) => {
|
|
2203
2203
|
this.updateToolboxesPosition(), this.isDragging = !1, this.table.classList.remove("table-resizing"), document.removeEventListener("mousemove", this.handleDocumentMousemove), document.removeEventListener("mouseup", this.handleDocumentMouseup);
|
|
2204
2204
|
}, this.readOnly = t, this.api = e, this.data = i, this.config = s, this.wrapper = null, this.table = null, this.hoveredCell = null, this.isDragging = !1, this.draggingColArr = [], this.draggingRow = 0, this.draggingColumn = 0, this.startWidth = 0, this.mouseStartX = 0, this.colWidthArr = [], this.focusedCell = { row: 0, col: 0 }, this.toolboxColumn = this.createColumnToolbox(), this.toolboxRow = this.createRowToolbox(), this.createTableWrapper(), this.hoveredRow = 0, this.hoveredColumn = 0, this.selectedRow = 0, this.selectedColumn = 0, this.tunes = { withHeadings: !1 }, this.resize(), this.data.colWidth.length > 0 && (this.colWidthArr = this.data.colWidth), this.updateColWidth(), this.fill(), this.focusedCell = { row: 0, column: 0 }, this.documentClicked = (n) => {
|
|
2205
|
-
const r = n.target.closest(`.${bt}`) !== null, o = n.target.closest(`.${
|
|
2205
|
+
const r = n.target.closest(`.${bt}`) !== null, o = n.target.closest(`.${wt}`) === null;
|
|
2206
2206
|
(r || o) && this.hideToolboxes();
|
|
2207
2207
|
const a = n.target.closest(`.${Z}`), h = n.target.closest(`.${Q}`);
|
|
2208
2208
|
a && a.parentNode === this.wrapper ? (this.addRow(void 0, !0), this.hideToolboxes()) : h && h.parentNode === this.wrapper && (this.addColumn(void 0, !0), this.hideToolboxes());
|
|
@@ -2223,7 +2223,7 @@ class le {
|
|
|
2223
2223
|
getCellInCol(t) {
|
|
2224
2224
|
const e = [];
|
|
2225
2225
|
return this.table.querySelectorAll(`.${B}`).forEach((i) => {
|
|
2226
|
-
const s = i.querySelector(`.${
|
|
2226
|
+
const s = i.querySelector(`.${D}:nth-child(${t})`);
|
|
2227
2227
|
s && e.push(s);
|
|
2228
2228
|
}), e;
|
|
2229
2229
|
}
|
|
@@ -2232,7 +2232,7 @@ class le {
|
|
|
2232
2232
|
this.addColumn(this.selectedColumn, !0), this.hideToolboxes(), this.updateColWidth();
|
|
2233
2233
|
} }, { label: this.api.i18n.t("Add column to right"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.13333 14.9167L12.4667 18.25M12.4667 18.25L15.8 14.9167M12.4667 18.25L12.4667 10.0833C12.4667 9.19928 12.1155 8.35143 11.4904 7.72631C10.8652 7.10119 10.0174 6.75 9.13333 6.75"/></svg>', hideIf: () => this.numberOfColumns === this.config.maxcols, onClick: () => {
|
|
2234
2234
|
this.addColumn(this.selectedColumn + 1, !0), this.hideToolboxes(), this.updateColWidth();
|
|
2235
|
-
} }, { label: this.api.i18n.t("Delete column"), icon:
|
|
2235
|
+
} }, { label: this.api.i18n.t("Delete column"), icon: kt, hideIf: () => this.numberOfColumns === 1, confirmationRequired: !0, onClick: () => {
|
|
2236
2236
|
this.deleteColumn(this.selectedColumn), this.hideToolboxes(), this.updateColWidth();
|
|
2237
2237
|
} }], onOpen: () => {
|
|
2238
2238
|
this.selectColumn(this.hoveredColumn), this.hideRowToolbox();
|
|
@@ -2245,7 +2245,7 @@ class le {
|
|
|
2245
2245
|
this.addRow(this.selectedRow, !0), this.hideToolboxes();
|
|
2246
2246
|
} }, { label: this.api.i18n.t("Add row below"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.8833 9.16666L18.2167 12.5M18.2167 12.5L14.8833 15.8333M18.2167 12.5H10.05C9.16594 12.5 8.31809 12.1488 7.69297 11.5237C7.06785 10.8986 6.71666 10.0507 6.71666 9.16666"/></svg>', hideIf: () => this.numberOfRows === this.config.maxrows, onClick: () => {
|
|
2247
2247
|
this.addRow(this.selectedRow + 1, !0), this.hideToolboxes();
|
|
2248
|
-
} }, { label: this.api.i18n.t("Delete row"), icon:
|
|
2248
|
+
} }, { label: this.api.i18n.t("Delete row"), icon: kt, hideIf: () => this.numberOfRows === 1, confirmationRequired: !0, onClick: () => {
|
|
2249
2249
|
this.deleteRow(this.selectedRow), this.hideToolboxes();
|
|
2250
2250
|
} }], onOpen: () => {
|
|
2251
2251
|
this.selectRow(this.hoveredRow), this.hideColumnToolbox();
|
|
@@ -2257,7 +2257,7 @@ class le {
|
|
|
2257
2257
|
this.focusedCell.row !== this.numberOfRows ? (this.focusedCell.row += 1, this.focusCell()) : (this.addRow(), this.focusedCell.row += 1, this.focusCell(), this.updateToolboxesPosition(0, 0));
|
|
2258
2258
|
}
|
|
2259
2259
|
getCell(t, e) {
|
|
2260
|
-
return this.table.querySelectorAll(`.${B}:nth-child(${t}) .${
|
|
2260
|
+
return this.table.querySelectorAll(`.${B}:nth-child(${t}) .${D}`)[e - 1];
|
|
2261
2261
|
}
|
|
2262
2262
|
getRow(t) {
|
|
2263
2263
|
return this.table.querySelector(`.${B}:nth-child(${t})`);
|
|
@@ -2266,7 +2266,7 @@ class le {
|
|
|
2266
2266
|
return t.parentElement;
|
|
2267
2267
|
}
|
|
2268
2268
|
getRowFirstCell(t) {
|
|
2269
|
-
return t.querySelector(`.${
|
|
2269
|
+
return t.querySelector(`.${D}:first-child`);
|
|
2270
2270
|
}
|
|
2271
2271
|
setCellContent(t, e, i) {
|
|
2272
2272
|
this.getCell(t, e).innerHTML = i;
|
|
@@ -2312,7 +2312,7 @@ class le {
|
|
|
2312
2312
|
e && e.classList.remove(Lt), this.addHeadingAttrToFirstRow();
|
|
2313
2313
|
}
|
|
2314
2314
|
createTableWrapper() {
|
|
2315
|
-
this.wrapper = y("div",
|
|
2315
|
+
this.wrapper = y("div", wt), this.table = y("div", bt), this.readOnly && this.wrapper.classList.add(ae), this.wrapper.appendChild(this.toolboxRow.element), this.wrapper.appendChild(this.toolboxColumn.element), this.wrapper.appendChild(this.table);
|
|
2316
2316
|
}
|
|
2317
2317
|
computeInitialSize() {
|
|
2318
2318
|
const t = this.data && this.data.content, e = Array.isArray(t), i = !!e && t.length, s = e ? t.length : void 0, n = i ? t[0].length : void 0, r = Number.parseInt(this.config && this.config.rows), o = Number.parseInt(this.config && this.config.cols), a = !isNaN(r) && r > 0 ? r : void 0, h = !isNaN(o) && o > 0 ? o : void 0;
|
|
@@ -2339,13 +2339,13 @@ class le {
|
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
2341
2341
|
createCell() {
|
|
2342
|
-
return y("div",
|
|
2342
|
+
return y("div", D, { contentEditable: !this.readOnly });
|
|
2343
2343
|
}
|
|
2344
2344
|
get numberOfRows() {
|
|
2345
2345
|
return this.table.childElementCount;
|
|
2346
2346
|
}
|
|
2347
2347
|
get numberOfColumns() {
|
|
2348
|
-
return this.numberOfRows ? this.table.querySelectorAll(`.${B}:first-child .${
|
|
2348
|
+
return this.numberOfRows ? this.table.querySelectorAll(`.${B}:first-child .${D}`).length : 0;
|
|
2349
2349
|
}
|
|
2350
2350
|
get isColumnMenuShowing() {
|
|
2351
2351
|
return this.selectedColumn !== 0;
|
|
@@ -2372,7 +2372,7 @@ class le {
|
|
|
2372
2372
|
}
|
|
2373
2373
|
focusInTableListener(t) {
|
|
2374
2374
|
const e = t.target, i = this.getRowByCell(e);
|
|
2375
|
-
this.focusedCell = { row: Array.from(this.table.querySelectorAll(`.${B}`)).indexOf(i) + 1, column: Array.from(i.querySelectorAll(`.${
|
|
2375
|
+
this.focusedCell = { row: Array.from(this.table.querySelectorAll(`.${B}`)).indexOf(i) + 1, column: Array.from(i.querySelectorAll(`.${D}`)).indexOf(e) + 1 };
|
|
2376
2376
|
}
|
|
2377
2377
|
hideToolboxes() {
|
|
2378
2378
|
this.hideRowToolbox(), this.hideColumnToolbox(), this.updateToolboxesPosition();
|
|
@@ -2472,7 +2472,7 @@ class le {
|
|
|
2472
2472
|
getData() {
|
|
2473
2473
|
const t = [];
|
|
2474
2474
|
for (let e = 1; e <= this.numberOfRows; e++) {
|
|
2475
|
-
const i = this.table.querySelector(`.${B}:nth-child(${e})`), s = Array.from(i.querySelectorAll(`.${
|
|
2475
|
+
const i = this.table.querySelector(`.${B}:nth-child(${e})`), s = Array.from(i.querySelectorAll(`.${D}`));
|
|
2476
2476
|
s.every((n) => !n.textContent.trim()) || t.push(s.map((n) => n.innerHTML));
|
|
2477
2477
|
}
|
|
2478
2478
|
return t;
|
|
@@ -2538,7 +2538,7 @@ const de = { class: "ebl-editor", id: "holder" }, ce = { class: "ce-block__conte
|
|
|
2538
2538
|
}
|
|
2539
2539
|
return It(() => {
|
|
2540
2540
|
const a = At(s.data);
|
|
2541
|
-
r = new Pt({ holder: "holder", autofocus: !0, defaultBlock: "paragraph", placeholder: s.placeholder, tunes: ["indent", "blockAlignment"], tools: { inlineCode:
|
|
2541
|
+
r = new Pt({ holder: "holder", autofocus: !0, defaultBlock: "paragraph", placeholder: s.placeholder, tunes: ["indent", "blockAlignment"], tools: { inlineCode: W, underline: et, Color: { class: oe }, marker: { class: N }, indent: { class: tt }, alert: { class: M, inlineToolbar: !0 }, List: { class: q, inlineToolbar: !0, config: { defaultStyle: "unordered" } }, h1: { class: Gt, inlineToolbar: !0 }, h2: { class: Kt, inlineToolbar: !0 }, h3: { class: Xt, inlineToolbar: !0 }, h4: { class: Jt, inlineToolbar: !0 }, h5: { class: Zt, inlineToolbar: !0 }, h6: { class: Qt, inlineToolbar: !0 }, paragraph: { class: nt, inlineToolbar: !0 }, blockAlignment: { class: st, inlineToolbar: !0 }, code: { class: $, config: { lang: "javascript", theme: "catppuccin-latte" } }, quote: { class: te, inlineToolbar: !0 }, delimiter: ee, table: { class: he, inlineToolbar: !0, config: { rows: 2, cols: 3 } } }, data: a, readOnly: s.readOnly, i18n: e, onChange: (h, l) => {
|
|
2542
2542
|
i("onChange", h, l);
|
|
2543
2543
|
}, onReady: () => {
|
|
2544
2544
|
new Yt("holder", s.readOnly, r, "1px solid #999"), new ne({ editor: r, config: { debounceTimer: 200, maxLength: 100 }, onUpdate: () => {
|
|
@@ -2546,20 +2546,21 @@ const de = { class: "ebl-editor", id: "holder" }, ce = { class: "ce-block__conte
|
|
|
2546
2546
|
} });
|
|
2547
2547
|
}), Bt(() => {
|
|
2548
2548
|
r !== null && (r.destroy(), r = null);
|
|
2549
|
-
}), (a, h) => (
|
|
2549
|
+
}), (a, h) => (Ot(), Dt("div", de, [P("div", ce, [Rt(P("input", { type: "text", "onUpdate:modelValue": h[0] || (h[0] = (l) => n.value = l), placeholder: "请输入标题", class: "ebl-editor-title-input" }, null, 512), [[Nt, n.value]])]), P("div", ue, [P("span", pe, "最后修改时间:" + Wt(a.lastUpdateTime), 1)]), P("button", { onClick: o }, "保存")]));
|
|
2550
2550
|
} }), xt = [ge];
|
|
2551
2551
|
let Tt = [];
|
|
2552
2552
|
for (let d in xt) {
|
|
2553
2553
|
const t = jt(xt[d]);
|
|
2554
2554
|
Tt.push(t);
|
|
2555
2555
|
}
|
|
2556
|
-
const Et = /* @__PURE__ */ ((d = []) => ({ version: "1.0.
|
|
2556
|
+
const be = { messages: { ui: { blockTunes: { toggler: { "Click to tune": "可拖拽和点击" } }, toolbar: { toolbox: { Add: "添加", Filter: "过滤", "Nothing found": "无内容" }, popover: { Filter: "过滤", "Nothing found": "无内容" } }, popover: { Filter: "筛选", "Nothing found": "未找到任何内容", "Convert to": "转化为" } }, toolNames: { Text: "段落", H1: "一级标题", H2: "二级标题", H3: "三级标题", H4: "四级标题", H5: "五级标题", H6: "六级标题", "Ordered List": "有序列表", "Unordered List": "无序列表", Checklist: "任务列表", Quote: "引用", Code: "代码块", Delimiter: "分割线", Link: "链接", Bold: "加粗", Italic: "倾斜", Alert: "高亮块", indent: "缩进", Marker: "突出显示", Color: "文本颜色", Underline: "下划线", InlineCode: "行内代码", Table: "表格" }, tools: { table: { "Add row above": "在下面插入行", "Add row below": "在下面插入行", "Delete row": "删除行", "Add column to left": "在左边插入列", "Add column to right": "在右边插入列", "Delete column": "删除列", "With headings": "使用标题行", "Without headings": "不使用标题行" }, marker: { Marker: "突出显示" }, link: { "Add a link": "添加链接", Save: "保存", "Pasted link is not valid.": "链接地址无效" }, List: { Unordered: "无序", Ordered: "有序", Checklist: "任务列表", "Counter type": "计数器类型", Numeric: "阿拉伯数字", "Lower Roman": "小写罗马数字", "Upper Roman": "大写罗马数字", "Lower Alpha": "小写字母", "Upper Alpha": "大写字母", "Start with": "从" }, paragraph: { "Enter something": "请输入内容" }, stub: { "The block can not be displayed correctly.": "该模块不能放置在这里" }, code: { "Enter your code": "输入代码", Copied: "已复制" }, convertTo: { "Convert to": "转化为" }, alert: { "alert-primary": "主要样式", "alert-secondary": "次要样式", "alert-info": "信息", "alert-success": "成功", "alert-warning": "警告", "alert-danger": "危险", "alert-light": "浅色", "alert-dark": "深色", "align-left": "左对齐", "align-center": "居中", "align-right": "右对齐" } }, blockTunes: { delete: { Delete: "删除", "Click to delete": "点击删除" }, moveUp: { "Move up": "向上移" }, moveDown: { "Move down": "向下移" }, filter: { Filter: "过滤" }, blockAlignment: { "left align": "左对齐", "center align": "居中对齐", "right align": "右对齐", "justify align": "两端对齐" }, indent: { "Indent right": "向右缩进", "Indent left": "向左缩进" } } } }, Et = /* @__PURE__ */ ((d = []) => ({ version: "1.0.10", install: (t, e) => {
|
|
2557
2557
|
t[ot] || (t[ot] = !0, d.forEach((i) => t.use(i)), e && t.provide("locale", e.locale));
|
|
2558
|
-
} }))(Tt),
|
|
2558
|
+
} }))(Tt), ye = Et.install, Le = Et.version;
|
|
2559
2559
|
export {
|
|
2560
2560
|
ge as EblEditor,
|
|
2561
2561
|
Et as default,
|
|
2562
|
-
|
|
2563
|
-
|
|
2562
|
+
ye as install,
|
|
2563
|
+
Le as version,
|
|
2564
|
+
be as zhCn
|
|
2564
2565
|
};
|
|
2565
2566
|
//# sourceMappingURL=index.mjs.map
|