var i=globalThis.__LEPTOS_TIPTAP_BRIDGE__;if(i==null||i.modules==null)throw new Error("leptos-tiptap bridge bindings are unavailable");var t=i.modules["@tiptap/core"];if(t==null)throw new Error('leptos-tiptap bridge module "@tiptap/core" is unavailable');var R=t.CommandManager,P=t.Editor,C=t.Extension,T=t.InputRule,S=t.Mark,a=t.Node,A=t.NodePos,B=t.NodeView,N=t.PasteRule,O=t.Tracker,M=t.callOrReturn,w=t.canInsertNode,v=t.combineTransactionSteps,I=t.createChainableState,F=t.createDocument,D=t.createNodeFromContent,j=t.createStyleTag,H=t.defaultBlockAt,L=t.deleteProps,K=t.elementFromString,q=t.escapeForRegEx,G=t.extensions,z=t.findChildren,J=t.findChildrenInRange,$=t.findDuplicates,U=t.findParentNode,V=t.findParentNodeClosestToPos,Y=t.fromString,Q=t.generateHTML,W=t.generateJSON,X=t.generateText,Z=t.getAttributes,tt=t.getAttributesFromExtensions,et=t.getChangedRanges,nt=t.getDebugJSON,ot=t.getExtensionField,rt=t.getHTMLFromFragment,it=t.getMarkAttributes,st=t.getMarkRange,at=t.getMarkType,lt=t.getMarksBetween,dt=t.getNodeAtPosition,pt=t.getNodeAttributes,ct=t.getNodeType,ut=t.getRenderedAttributes,gt=t.getSchema,_t=t.getSchemaByResolvedExtensions,xt=t.getSchemaTypeByName,mt=t.getSchemaTypeNameByName,kt=t.getSplittedAttributes,bt=t.getText,yt=t.getTextBetween,ft=t.getTextContentFromNodes,ht=t.getTextSerializersFromSchema,Et=t.injectExtensionAttributesToParseRule,Rt=t.inputRulesPlugin,Pt=t.isActive,Ct=t.isAtEndOfNode,Tt=t.isAtStartOfNode,St=t.isEmptyObject,At=t.isExtensionRulesEnabled,Bt=t.isFunction,Nt=t.isList,Ot=t.isMacOS,Mt=t.isMarkActive,wt=t.isNodeActive,vt=t.isNodeEmpty,It=t.isNodeSelection,Ft=t.isNumber,Dt=t.isPlainObject,jt=t.isRegExp,Ht=t.isSafari,Lt=t.isString,Kt=t.isTextSelection,qt=t.isiOS,Gt=t.markInputRule,zt=t.markPasteRule,l=t.mergeAttributes,Jt=t.mergeDeep,$t=t.minMax,Ut=t.nodeInputRule,Vt=t.nodePasteRule,Yt=t.objectIncludes,Qt=t.pasteRulesPlugin,Wt=t.posToDOMRect,Xt=t.removeDuplicates,Zt=t.resolveFocusPosition,te=t.rewriteUnknownContent,ee=t.selectionToInsertionEnd,ne=t.splitExtensions,oe=t.textInputRule,re=t.textPasteRule,ie=t.textblockTypeInputRule,se=t.wrappingInputRule;var d=a.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",l(this.options.HTMLAttributes,e)]},renderText(){return`
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:n,state:o,editor:g})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:r,storedMarks:_}=o;if(r.$from.parent.type.spec.isolating)return!1;let{keepMarks:x}=this.options,{splittableMarks:m}=g.extensionManager,s=_||r.$to.parentOffset&&r.$from.marks();return n().insertContent({type:this.name}).command(({tr:k,dispatch:b})=>{if(b&&s&&x){let y=s.filter(f=>m.includes(f.type.name));k.ensureMarks(y)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var p="__LEPTOS_TIPTAP_BRIDGE__";function h(){let e=globalThis,n=e[p];if(n!=null)return n;let o={modules:{},registerExtension:()=>{throw new Error("leptos-tiptap bridge runtime is not initialized")}};return e[p]=o,o}function c(){return h()}function u(e){c().registerExtension(e)}var E={name:"hard_break",create:()=>d,commands:{set_hard_break:e=>e.chain().focus().setHardBreak().run()}};function xe(){u(E)}export{xe as register_hard_break};
