How bigskysoftware/idiomorph works
Main Components
a) Core Components:
• Morphing Engine (src/idiomorph.js)
• ID Set Management System
• DOM Processing Layer
• Configuration Manager
• Integration Layer (src/idiomorph-htmx.js)
b) Supporting Components:
• Head Tag Management System
• Two-Pass Processing System
• Callback System
• Pantry Management (for two-pass mode)
┌─ External Integrations Layer ─────────────────┐
• HTMX Integration │
• Turbo Integration │
• ┬───────────────────────────┘
• ↓
┌─ Public API Layer ───────────────────────────┐
• morph() Method │
• Configuration Interface │
• ┬───────────────────────────┘
• ↓
┌─ Core Processing Layer ────────────────────────┐
• ┌─────────────────┐ ┌────────────────────┐ │
• ID Set │ │ DOM Morphing │ │
• Management │←→│ Engine │ │
• ┘ └────────────────────┘ │
• ┌─────────────────┐ ┌────────────────────┐ │
• Head Tag │ │ Two-Pass │ │
• Manager │ │ Processor │ │
• ┘ └────────────────────┘ │
• ┘
Data Flow Indicators
• Input flow: HTML/DOM nodes → ID Set Creation → Morphing Process
• Two-pass flow: Initial Morph → Pantry Storage → Final Placement
• Callback execution points
• Configuration application points
Implementation Details
Notes for:
• Browser API dependencies
• Performance considerations
• State preservation mechanisms
• Integration points with frameworks
Integration capabilities with HTMX and other frameworks
Keep the abstraction level focused on the architectural components while providing enough detail to understand the unique ID Set-based morphing approach that makes Idiomorph special.