fix(structure): group components into groups inside the repo
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import {
|
||||
BlockRegistry,
|
||||
DividerBlockHandler,
|
||||
ParagraphBlockHandler,
|
||||
HeadingBlockHandler,
|
||||
QuoteBlockHandler,
|
||||
CodeBlockHandler,
|
||||
ListBlockHandler,
|
||||
ImageBlockHandler,
|
||||
YouTubeBlockHandler,
|
||||
AttachmentBlockHandler,
|
||||
MarkdownBlockHandler,
|
||||
HtmlBlockHandler
|
||||
} from './blocks/index.js';
|
||||
|
||||
// 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());
|
||||
|
||||
// Register media blocks
|
||||
BlockRegistry.register('image', new ImageBlockHandler());
|
||||
BlockRegistry.register('youtube', new YouTubeBlockHandler());
|
||||
BlockRegistry.register('attachment', new AttachmentBlockHandler());
|
||||
|
||||
// Register other content blocks
|
||||
BlockRegistry.register('markdown', new MarkdownBlockHandler());
|
||||
BlockRegistry.register('html', new HtmlBlockHandler());
|
||||
}
|
||||
|
||||
// Ensure blocks are registered when this module is imported
|
||||
registerAllBlockHandlers();
|
||||
Reference in New Issue
Block a user