When using toAbs for all but the most trivial cases, one needs access to
the options. Unlike measurements which are always there, options aren't
always set since they are only set when they differ from the default.
This would shift a lot of responsibility on the pattern designer who
would have to check whether an option is set, and if it's not use the
default which in turn depends on what type of an option it is (and it's
pct for example you have to remember to divide it by 100 and so on).
This feels footgun-y so instead I've added a `mergeOptions` method that
merges the options passed by the user with the defaults from the pattern
config so that you have a simple object with all option values.
This should get passed to `toAbs()` as the 3rd parameter.
This is some initial work to support part-level (SVG) transforms when
layouting the pattern.
It updates the method that calculates the bounding box to calculate a
bounding box with transforms applied.
It also adds two new methods to utils to help with that, methods that
could be useful for other people trying to do fancy transform stuff.
This changes they was settings (what the user provides) are handled.
Before this, settings were passed as an object and that was it.
Now, settings are treated as an array of settings objects and this adds
full support for managing multiple sets of settings in a single pattern
instance.
This is the mechanism that's used for FreeSewing's sampling which used
to be a rather hackish implementation, but now merely sets up the
relevant list of settings, and then calls `pattern.draft()` as usual.
Things to be mindful of is that parts, the store and settings themselves
are tied to each set of settings. So where they used to be an object,
they are now an array of object.
This moves resolving of the config from the pattern constructor to the
init() method. The idea is that adding a part to a pattern is exactly
the same as adding a part to a design. In other words, late-stage adding
of parts would be no different as the config gets resolved after that.
This is currently broken in many different ways, but the unit tests
particular to this new way of resolving the config do pass.