Skip to content

Deduplicate layout geometry across components and snippet exporters #1

Description

@syoooo

Box sizes and element placement formulas for each geometry (grid, line bars, loop bars, line dots, loop dots) are written three times: in the component JSX, in cssSnippet, and in svgSnippet. Prop resolution and color sampling are already shared (resolveXxxProps, xxxColors) — layout is the remaining duplication.

Proposal: extract pure layoutXxx(resolved) → { box, items[] } helpers in src/core/ consumed by all three, so a new geometry parameter is one change instead of three.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions