Coordinate systems
Every number in Gridla is a pixel. What differs is the origin. There are four coordinate systems, and the API tells you which one it is in.
Canvas coordinates
The default. GridItem.x and GridItem.y are measured from the top-left corner of the canvas, and the item area starts at padding.left / padding.top. A layout with 16px padding has its first item at x: 16, not x: 0.
normalizeItem clamps an item so it fits between the padding edges; boundsFromCanvas derives the GridBounds a solver checks against (height is null for scrollable canvases).
Inner coordinates
Padding-relative. Useful when you compute proportions or compare layouts with different padding. toInnerItem and toCanvasItem convert one item; canvasInnerWidth and canvasInnerHeight give the usable size. The segment projection engine works in inner coordinates internally and converts back.
Root coordinates
Only in nested layouts. flattenLayout returns every node with a rect in root coordinates: the top-left of the outermost canvas is the origin, regardless of depth. A child's root rect is its parent's root rect plus the child's projected position inside the parent.
Each container also carries layout, the container's authored layout projected into its rendered rect. Solvers for that container's children run in that layout's canvas coordinates, which are local to the container. Converting between the two:
rootPointToContainer maps into the container's rendered canvas by default; pass the authored sourceLayout.canvas as the third argument to map into authored units instead. scaleSizeBetweenContainers translates a size from one container's units to another's so it covers the same number of root pixels.
Viewport coordinates
The screen. The core never sees the DOM, so conversion is one subtraction: local = client - element.getBoundingClientRect(). rectToViewportEdges(origin, rect) goes the other way for hit testing against pointer events. The React adapter does this in useGridInteraction; the vanilla quickstart does it in a local() helper.
Rendered versus source
One more distinction that is not a coordinate system but behaves like one. A layout is authored at a canvas size (the source) and projected onto the element's measured size (the rendered layout). Both are canvas coordinates, but in different canvases. Solvers run on the rendered layout; commits write the rendered layout back as the new source. GridProvider exposes both: useGridSourceLayout() and useGridLayout().