Other frameworks
The bindings are thin layers over helpers that are exported for anyone writing another one.
From core
| Helper | |
|---|---|
cellCss(cell, layout, { points }) | { left, top, width, height, clipPath } as percentages, to place an absolutely positioned element. With points, the clip path has that many points, for animating between shapes. |
boundsAspectRatio(layout) | The container's CSS aspect-ratio. |
contentSlots, matchSlots | Which item goes in which cell. |
safeAreaCss, backdropCss, objectPosition | Boxes and positions for content inside a cell's element. |
regionCss, viewCss, cssShapes, morphPolygon | Clip paths for the region, the window view, and shapes with a fixed number of points. |
cellInDirection | Keyboard navigation. |
cellAt, cellsInRect, screenToLayout | Hit testing. |
bevelFacets, lightVector | Relief geometry. |
From @andamento/dom
@andamento/dom exports the pieces the React, Vue and web component bindings share: tile styles, bevel and focus ring paths, what a key does, and what's in view. They have names like tileStyle, keyAction, viewRect, layoutResolver and frameBuilder. Read packages/vue/src/TileLayout.ts for a complete binding in about 400 lines.
Every spec is JSON
Tilings, layout options and features are plain objects, so they can be stored, sent to a server, or generated by a form, as the playground does. The exception is sizeAt, which is a function.