Proposal: Centralize Layout Mapping Logic
Reason
Mapping A2UI layout enums (like spaceBetween) to framework-specific values (like space-between in CSS or MainAxisAlignment.spaceBetween in Flutter) is currently handled inconsistently inside each renderer.
Design
- Shared Constants: Create
renderers/web_core/src/v0_9/common/layout.ts to host standard mapping functions for Web/CSS-based renderers.
- Normalization: Provide
mapJustify(val) and mapAlign(val) functions that return standard CSS values.
- Refactor: Remove the redundant mapping logic from
react_prototype and any future Angular/Lit renderers, importing from the centralized web_core location instead.
Key Files
renderers/web_core/src/v0_9/common/layout.ts (New)
renderers/react_prototype/src/basic_catalog/utils.ts
Proposal: Centralize Layout Mapping Logic
Reason
Mapping A2UI layout enums (like
spaceBetween) to framework-specific values (likespace-betweenin CSS orMainAxisAlignment.spaceBetweenin Flutter) is currently handled inconsistently inside each renderer.Design
renderers/web_core/src/v0_9/common/layout.tsto host standard mapping functions for Web/CSS-based renderers.mapJustify(val)andmapAlign(val)functions that return standard CSS values.react_prototypeand any future Angular/Lit renderers, importing from the centralizedweb_corelocation instead.Key Files
renderers/web_core/src/v0_9/common/layout.ts(New)renderers/react_prototype/src/basic_catalog/utils.ts