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