The namespace held 3,300 lines: component sync, instance creation and
detach, swap and the variant switch's attribute carry, duplication,
and the sync of library colors and typographies. Each now has its own
namespace:
- app.common.logic.libraries (cll): component sync, reset, update
main, attribute and placement sync, and the sync of a file with its
libraries;
- app.common.logic.instances (cli): create, instantiate and restore a
component, detach a copy;
- app.common.logic.swap (clsw): swap a copy head, carry overrides
across a variant switch;
- app.common.logic.duplicate (cld): duplicate components and shapes;
- app.common.logic.library-assets (clla): sync of library colors and
typographies, which the asset multimethods delegate to.
Each new namespace may require libraries, never the reverse; the
helpers they share became public there (attr-operations,
reposition-shape, orient-like, swap-content-root-id, ...). Callers use
the new aliases. The functions move as they were.
No behavior change: the golden masters and the suites are unchanged.
Benchmark (lower quantile, ms; baseline / now / ratio):
deepest-edit-through-three-levels 35.2 / 37.3 / 1.06
edit-through-a-chain-of-dependents 68.9 / 69.7 / 1.01
library-update-into-copies 83.1 / 79.8 / 0.96
main-edit-into-10-copies 1.8 / 1.6 / 0.92
main-edit-into-100-copies 15.4 / 15.4 / 1.00
main-edit-into-1000-copies 153.1 / 156.0 / 1.02
variant-switch-into-copies 32.1 / 27.0 / 0.84
AI-assisted-by: claude-opus-5-5