1import{$i as e,Ca as a,Da as t,Na as r,Pa as s,ao as o,da as i,ia as l,ja as n,nt as u,sa as d,to as c,ya as p,za as v}from"./B25Pxpwh.js";import{a as f,c as m,d as g,f as x,i as y,l as b,m as h,n as w,o as S,p as j,r as q,s as L,t as N,u as z}from"./DpWoOn5u.js";var A=["id","name","data-input-selector","value","required"],P=Object.assign({inheritAttrs:!1},{__name:"TiptapEditor",props:p({type:{type:String,default:"rte"},id:{type:[String,Number],default:null},name:{type:String,default:null},value:{type:String,default:""},maxLength:{type:Number,default:void 0},rows:{type:[Number,String],default:3},required:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},onInput:{type:Function,default:null}},{modelValue:{type:String,default:void 0},modelModifiers:{}}),emits:["update:modelValue"],setup(p,{expose:P}){const V=p,$=s(p,"modelValue");$.value??=V.value??"";const _=r(),k=w({editorProps:{attributes:{id:_,class:"s-rich-text text-body-sm-regular text-min-16 text-strong max-w-full h-full px-[calc(var(--theme-spacing-3xs)+var(--theme-spacing-4xs))] py-2xs rounded-inputField border-1 border-solid border-extraStrong active:border-interactive focus:border-interactive user-invalid:border-danger aria-invalid:border-danger bg-canvas hover:bg-canvasHover active:bg-canvasActive focus:bg-canvasActive overflow-y-scroll"}},extensions:[g,y,q,z.configure({levels:[2,3,4]}),h,m,j,f,S,b,L.configure({openOnClick:!1,autolink:!1,defaultProtocol:"https"}),V.maxLength&&x.configure({limit:V.maxLength})],content:$.value,onUpdate:({editor:e})=>{$.value=e.getHTML(),V.onInput?.($.value)}});return P({editor:k}),a(()=>{c(k).destroy()}),(a,r)=>{const s=u;return t(),d(e,null,[n(a.$slots,"before",{editor:c(k)}),i(s,{class:"c-tiptap-editor","aria-controls":c(_),"enable-horizontal":!1},{default:v(()=>[i(c(N),{class:"min-h-[calc(var(--theme-spacing-2xs,0px)*2+1lh)] h-[calc(var(--theme-spacing-2xs,0px)*2+var(--rows,3)*1lh)] resize-y overflow-hidden",style:o({"--rows":p.rows}),autofocus:p.autofocus,editor:c(k)},null,8,["style","autofocus","editor"]),l("input",{id:p.id,type:"hidden",name:p.name,"data-input-selector":`#${c(_)}`,value:$.value,required:p.required},null,8,A)]),_:1},8,["aria-controls"])],64)}}});export{P as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.