| 
									
										
										
										
											2025-06-24 22:45:50 +00:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Block Registration Module | 
					
						
							|  |  |  |  * Handles registration of all block handlers with the BlockRegistry | 
					
						
							|  |  |  |  *  | 
					
						
							|  |  |  |  * Phase 2 Complete: Divider block has been successfully migrated | 
					
						
							|  |  |  |  * to the new block handler architecture. | 
					
						
							|  |  |  |  * Phase 3 Complete: Paragraph block has been successfully migrated | 
					
						
							|  |  |  |  * to the new block handler architecture. | 
					
						
							|  |  |  |  * Phase 4 Complete: All heading blocks (h1, h2, h3) have been successfully migrated | 
					
						
							|  |  |  |  * to the new block handler architecture using a unified HeadingBlockHandler. | 
					
						
							|  |  |  |  * Phase 5 Complete: Quote, Code, and List blocks have been successfully migrated | 
					
						
							|  |  |  |  * to the new block handler architecture. | 
					
						
							| 
									
										
										
										
											2025-06-26 13:18:34 +00:00
										 |  |  |  * Phase 6 Complete: Image, YouTube, and Attachment blocks have been successfully migrated | 
					
						
							|  |  |  |  * to the new block handler architecture. | 
					
						
							|  |  |  |  * Phase 7 Complete: Markdown and HTML blocks have been successfully migrated | 
					
						
							|  |  |  |  * to the new block handler architecture. | 
					
						
							| 
									
										
										
										
											2025-06-24 22:45:50 +00:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-06-26 13:18:34 +00:00
										 |  |  | import {  | 
					
						
							|  |  |  |   BlockRegistry,  | 
					
						
							|  |  |  |   DividerBlockHandler, | 
					
						
							|  |  |  |   ParagraphBlockHandler, | 
					
						
							|  |  |  |   HeadingBlockHandler, | 
					
						
							|  |  |  |   QuoteBlockHandler, | 
					
						
							|  |  |  |   CodeBlockHandler, | 
					
						
							|  |  |  |   ListBlockHandler, | 
					
						
							|  |  |  |   ImageBlockHandler, | 
					
						
							|  |  |  |   YouTubeBlockHandler, | 
					
						
							|  |  |  |   AttachmentBlockHandler, | 
					
						
							|  |  |  |   MarkdownBlockHandler, | 
					
						
							|  |  |  |   HtmlBlockHandler | 
					
						
							|  |  |  | } from './blocks/index.js'; | 
					
						
							| 
									
										
										
										
											2025-06-24 22:45:50 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | // Initialize and register all block handlers
 | 
					
						
							|  |  |  | export function registerAllBlockHandlers(): void { | 
					
						
							|  |  |  |   // Register content blocks
 | 
					
						
							|  |  |  |   BlockRegistry.register('divider', new DividerBlockHandler()); | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |   // Register text blocks
 | 
					
						
							|  |  |  |   BlockRegistry.register('paragraph', new ParagraphBlockHandler()); | 
					
						
							|  |  |  |   BlockRegistry.register('heading-1', new HeadingBlockHandler('heading-1')); | 
					
						
							|  |  |  |   BlockRegistry.register('heading-2', new HeadingBlockHandler('heading-2')); | 
					
						
							|  |  |  |   BlockRegistry.register('heading-3', new HeadingBlockHandler('heading-3')); | 
					
						
							|  |  |  |   BlockRegistry.register('quote', new QuoteBlockHandler()); | 
					
						
							|  |  |  |   BlockRegistry.register('code', new CodeBlockHandler()); | 
					
						
							|  |  |  |   BlockRegistry.register('list', new ListBlockHandler()); | 
					
						
							|  |  |  |    | 
					
						
							| 
									
										
										
										
											2025-06-26 13:18:34 +00:00
										 |  |  |   // Register media blocks
 | 
					
						
							|  |  |  |   BlockRegistry.register('image', new ImageBlockHandler()); | 
					
						
							|  |  |  |   BlockRegistry.register('youtube', new YouTubeBlockHandler()); | 
					
						
							|  |  |  |   BlockRegistry.register('attachment', new AttachmentBlockHandler()); | 
					
						
							| 
									
										
										
										
											2025-06-24 22:45:50 +00:00
										 |  |  |    | 
					
						
							| 
									
										
										
										
											2025-06-26 13:18:34 +00:00
										 |  |  |   // Register other content blocks
 | 
					
						
							|  |  |  |   BlockRegistry.register('markdown', new MarkdownBlockHandler()); | 
					
						
							|  |  |  |   BlockRegistry.register('html', new HtmlBlockHandler()); | 
					
						
							| 
									
										
										
										
											2025-06-24 22:45:50 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // Ensure blocks are registered when this module is imported
 | 
					
						
							|  |  |  | registerAllBlockHandlers(); |