You can not select more than 25 topics 
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. 
		
		
		
		
		
			
	
	
		
			
	
		
			This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
		 
	
		
		
			
				
				
					
						
						
						
							import  {  Node ,  mergeAttributes ,  nodeInputRule  }  from  '@tiptap/core' ; 
 
						
						
						
							import  {  TextSelection  }  from  'prosemirror-state' ; 
 
						
						
						
							
 
						
						
						
							const  HorizontalRule  =  Node . create ( { 
 
						
						
						
							    name :  'horizontalRule' , 
 
						
						
						
							    addOptions ( )  { 
 
						
						
						
							        return  { 
 
						
						
						
							            HTMLAttributes :  { } , 
 
						
						
						
							        } ; 
 
						
						
						
							    } , 
 
						
						
						
							    group :  'block' , 
 
						
						
						
							    parseHTML ( )  { 
 
						
						
						
							        return  [ 
 
						
						
						
							            {  tag :  'hr'  } , 
 
						
						
						
							        ] ; 
 
						
						
						
							    } , 
 
						
						
						
							    renderHTML ( {  HTMLAttributes  } )  { 
 
						
						
						
							        return  [ 'hr' ,  mergeAttributes ( this . options . HTMLAttributes ,  HTMLAttributes ) ] ; 
 
						
						
						
							    } , 
 
						
						
						
							    addCommands ( )  { 
 
						
						
						
							        return  { 
 
						
						
						
							            setHorizontalRule :  ( )  =>  ( {  chain  } )  =>  { 
 
						
						
						
							                return  chain ( ) 
 
						
						
						
							                    . insertContent ( {  type :  this . name  } ) 
 
						
						
						
							                    // set cursor after horizontal rule
  
						
						
						
							. command ( ( {  tr ,  dispatch  } )  =>  { 
 
						
						
						
							                    var  _a ; 
 
						
						
						
							                    if  ( dispatch )  { 
 
						
						
						
							                        const  {  $to  }  =  tr . selection ; 
 
						
						
						
							                        const  posAfter  =  $to . end ( ) ; 
 
						
						
						
							                        if  ( $to . nodeAfter )  { 
 
						
						
						
							                            tr . setSelection ( TextSelection . create ( tr . doc ,  $to . pos ) ) ; 
 
						
						
						
							                        } 
 
						
						
						
							                        else  { 
 
						
						
						
							                            // add node after horizontal rule if it’   
						
						
						
							const  node  =  ( _a  =  $to . parent . type . contentMatch . defaultType )  ===  null  ||  _a  ===  void  0  ?  void  0  :  _a . create ( ) ; 
 
						
						
						
							                            if  ( node )  { 
 
						
						
						
							                                tr . insert ( posAfter ,  node ) ; 
 
						
						
						
							                                tr . setSelection ( TextSelection . create ( tr . doc ,  posAfter ) ) ; 
 
						
						
						
							                            } 
 
						
						
						
							                        } 
 
						
						
						
							                        tr . scrollIntoView ( ) ; 
 
						
						
						
							                    } 
 
						
						
						
							                    return  true ; 
 
						
						
						
							                } ) 
 
						
						
						
							                    . run ( ) ; 
 
						
						
						
							            } , 
 
						
						
						
							        } ; 
 
						
						
						
							    } , 
 
						
						
						
							    addInputRules ( )  { 
 
						
						
						
							        return  [ 
 
						
						
						
							            nodeInputRule ( { 
 
						
						
						
							                find :  /^(?:---|—-|___\s|\*\*\*\s)$/ , 
 
						
						
						
							                type :  this . type , 
 
						
						
						
							            } ) , 
 
						
						
						
							        ] ; 
 
						
						
						
							    } , 
 
						
						
						
							} ) ; 
 
						
						
						
							
 
						
						
						
							export  {  HorizontalRule ,  HorizontalRule  as  default  } ; 
 
						
						
						
							//# sourceMappingURL=tiptap-extension-horizontal-rule.esm.js.map