var n=globalThis.__LEPTOS_TIPTAP_BRIDGE__;if(n==null||n.modules==null)throw new Error("leptos-tiptap bridge bindings are unavailable");var e=n.modules["@tiptap/core"];if(e==null)throw new Error('leptos-tiptap bridge module "@tiptap/core" is unavailable');var g=e.CommandManager,_=e.Editor,x=e.Extension,m=e.InputRule,r=e.Mark,k=e.Node,b=e.NodePos,y=e.NodeView,E=e.PasteRule,h=e.Tracker,R=e.callOrReturn,f=e.canInsertNode,P=e.combineTransactionSteps,C=e.createChainableState,T=e.createDocument,A=e.createNodeFromContent,S=e.createStyleTag,N=e.defaultBlockAt,O=e.deleteProps,B=e.elementFromString,w=e.escapeForRegEx,M=e.extensions,v=e.findChildren,I=e.findChildrenInRange,F=e.findDuplicates,D=e.findParentNode,j=e.findParentNodeClosestToPos,L=e.fromString,K=e.generateHTML,H=e.generateJSON,U=e.generateText,q=e.getAttributes,G=e.getAttributesFromExtensions,z=e.getChangedRanges,J=e.getDebugJSON,V=e.getExtensionField,Y=e.getHTMLFromFragment,Q=e.getMarkAttributes,W=e.getMarkRange,X=e.getMarkType,Z=e.getMarksBetween,$=e.getNodeAtPosition,ee=e.getNodeAttributes,te=e.getNodeType,ne=e.getRenderedAttributes,oe=e.getSchema,ie=e.getSchemaByResolvedExtensions,re=e.getSchemaTypeByName,se=e.getSchemaTypeNameByName,le=e.getSplittedAttributes,ae=e.getText,de=e.getTextBetween,pe=e.getTextContentFromNodes,ce=e.getTextSerializersFromSchema,ue=e.injectExtensionAttributesToParseRule,ge=e.inputRulesPlugin,_e=e.isActive,xe=e.isAtEndOfNode,me=e.isAtStartOfNode,ke=e.isEmptyObject,be=e.isExtensionRulesEnabled,ye=e.isFunction,Ee=e.isList,he=e.isMacOS,Re=e.isMarkActive,fe=e.isNodeActive,Pe=e.isNodeEmpty,Ce=e.isNodeSelection,Te=e.isNumber,Ae=e.isPlainObject,Se=e.isRegExp,Ne=e.isSafari,Oe=e.isString,Be=e.isTextSelection,we=e.isiOS,Me=e.markInputRule,ve=e.markPasteRule,s=e.mergeAttributes,Ie=e.mergeDeep,Fe=e.minMax,De=e.nodeInputRule,je=e.nodePasteRule,Le=e.objectIncludes,Ke=e.pasteRulesPlugin,He=e.posToDOMRect,Ue=e.removeDuplicates,qe=e.resolveFocusPosition,Ge=e.rewriteUnknownContent,ze=e.selectionToInsertionEnd,Je=e.splitExtensions,Ve=e.textInputRule,Ye=e.textPasteRule,Qe=e.textblockTypeInputRule,We=e.wrappingInputRule;var l=r.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",s(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});var a="__LEPTOS_TIPTAP_BRIDGE__";function c(){let t=globalThis,o=t[a];if(o!=null)return o;let i={modules:{},registerExtension:()=>{throw new Error("leptos-tiptap bridge runtime is not initialized")}};return t[a]=i,i}function d(){return c()}function p(t){d().registerExtension(t)}var u={name:"underline",create:()=>l,selection_keys:["underline"],selection_state:t=>({underline:t.isActive("underline")})};function rt(){p(u)}export{rt as register_underline};
