Florian Schrödl 0ae02daae9
♻️ Extract and test how tokens are applied to shapes (#13034)
toggle-token and apply-token-from-input each worked out inside the
event which attributes a token goes on, and repeated most of it. The
decision now lives in pure helpers both events share: `toggle-action`
(remove the token or apply it), `apply-action` (on which attributes)
and `target-shapes` (a selected group stands for its children).
`action->event` turns the result into the event to run. Nothing
changes in behavior; apply-spacing-token-separated loses its `attr`
option, which every caller left empty.

Unit tests cover the decision, with the cases the store tests
lacked: a color token comes off the stroke too, a shape without the
token completes the others, and a spacing token on chosen attributes.
Store tests cover what had none: applying from the fill and stroke
rows, the opacity, position and size fields, the min width of a flex
child and the selection colors, choosing the token a shape already
has, and toggling a token on a group.

Signed-off-by: Florian Schroedl <flo.schroedl@gmail.com>
2026-11-17 09:31:47 +01:00
..