How plusnew/webcomponent works
Main System Components
a) JSX Runtime Layer
• jsx-runtime.ts component
• It to the Babel transform plugin (babel-plugin-transform-jsx.mjs)
b) Reconciliation Layer (Core)
• This in the center as it's the heart of the system
• Array Reconciler
• Component Reconciler
• Fragment Reconciler
• Host Reconciler
• Text Reconciler
• Internal connections between reconciler components
c) Component Layer
• This to the right
• Portal system (PortalEntrance.tsx)
• Connection to the reconciler
Data Flow and Interactions
• JSX/TSX code → Babel Transform → JSX Runtime
• JSX Runtime → Reconciler
• Reconciler → WebComponent Output
• Portal Component → DOM manipulation
Architectural Patterns to Highlight
• Reconciliation pattern (similar to React's virtual DOM)
• Component composition
• Event handling system
• Error boundaries
Implementation Details
• TypeScript integration
• WebComponent standard compliance
• Browser compatibility
• Build/Development tools
Key Relationships
• How JSX gets transformed into WebComponents
• How the reconciler manages component lifecycle
• How portals interact with the main component tree
• Error boundary propagation
Technical Stack Indicators
• TypeScript
• WebComponents API
• Babel
• Testing Framework