Five rules the codebase is built on: nothing is derived, presets run once, one painter, pure modules stay DOM-free, and two colour systems never mix.
Five rules the codebase is built on. Breaking one is how this gets slowly worse.
What is stored is what renders. A layer a preset created and a layer you drew are the same object with the same handles. There is no template engine, no roles, no blocks.
presets.ts, compositions.ts and styles.ts return plain layers and are then gone. There is no live template to fight with.
LayerView is the only painterCanvas, filmstrip thumbnails, previews, the print portal and the server-side export all render through it. Export works by serialising LayerView’s own output and screenshotting it — a second renderer would drift within a week.
geometry.ts, text.ts, colour.ts, gradient.ts, reflow.ts, insights.ts, preflight.ts, search.ts, sync.ts. That is where the reasoning lives and where the tests point.
App chrome uses the FlashFX tokens; slide content uses the document’s own palette. An app colour inside a slide is a bug.