How ranga-auaha-ako/canvas-design-blocks works
Main System Components
a. Core Components:
• Element System (src/lib/elements/)
• Toolbar Interface (src/lib/toolbar/)
• Theme Management (src/theme-loader.ts)
• Canvas Integration Layer
b. Element Types:
• MCE Elements
• Svelte Elements
• Client-Enabled Elements
• Generic Element Base Classes
Architectural Patterns to Emphasize
• Manager-Element Pattern (Each element type has a manager class)
• Component Composition (Svelte components hierarchy)
• Event-driven Communication (Between Canvas, TinyMCE, and elements)
┌─ Canvas LMS Integration Layer ─────────────────────┐
• ┌─ Design Blocks Core ──────────────────────┐ │
• ┌─ Element System ─┐ ┌─ Toolbar ─┐ │ │
• Base Classes │ │ - Panel │ │ │
• Managers │ │ - Search │ │ │
• Elements │ │ - Config │ │ │
• ┘ └───────────┘ │ │
• Loader │ │ - Builder │ │ │
• Config │ │ - Registry │ │ │
• ┘ └───────────────┘ │ │
• ┘ │
• ┘
Key Relationships
• Data flow between Canvas and Design Blocks
• Element manager to element instances
• Theme system influence on all components
• Toolbar interactions with elements
Additional Details
Annotations for:
• Build/Deploy Pipeline
• Theme Configuration Flow
• Element Lifecycle
• User Interaction Points
• Integration Points with TinyMCE