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