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.
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 insvgSnippet. Prop resolution and color sampling are already shared (resolveXxxProps,xxxColors) — layout is the remaining duplication.Proposal: extract pure
layoutXxx(resolved) → { box, items[] }helpers insrc/core/consumed by all three, so a new geometry parameter is one change instead of three.