Reference
Register the elements
import { … } from "@johnmorrisdotca/sugoroku/element/define";
24.4 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
defineBoard | function | Defines the default playable board, or a subclass under a custom tag. |
definePosition | function | Defines a static position, or a subclass under a host's tag. |
readEmbedPosition | function | Reads a GNU position ID or bounded JSON position; null means invalid counts or input. |
SUGOROKU_DRAW_OPTION_KEYS | constant | Native draw keys, checked by the shared builder. |
SUGOROKU_EMBED_OPTION_KEYS | constant | The real mounted options, checked alongside builder coverage. |
SUGOROKU_POSITION_OPTION_KEYS | constant | All host position options, checked by the builder. |
SugorokuBoard | class | Native custom element with reflected setup and presentation. |
SugorokuElementOptions | type | Host mount options, including custom colours, names, a match and callbacks. |
SugorokuPosition | class | A read-only backgammon position, drawn by the native SVG writer. |
SugorokuPositionOptions | type | Host data and all native SVG drawing choices for a position. |