Reference
Playable number grid
import { … } from "@johnmorrisdotca/kazu/play";
27.3 kB minified and gzipped, with everything it imports (measured with esbuild)
Kazu, played in a page: mountKazu draws a puzzle into any element and plays it by touch, mouse and
keyboard, with a number pad, pencil marks, Undo, Hint, Check and a clock, and the words in English and
Japanese. A separate entry (@johnmorrisdotca/kazu/play), so a server never loads any of it.
Exports
| Name | Kind | What it is |
|---|---|---|
ensureKazuPlayStyle | function | Put the style in the page once: in the document's head, or in the shadow root the host is in. |
KAZU_PLAY_STYLE | constant | THE STYLE a playable Kazu board wears (mountKazu, <kazu-board>): the drawing's own (KAZU_STYLE) and the board's box, its number pad, its buttons and its lines of words. |
kazuClockText | function | A time taken, as a clock shows it: m:ss, and h:mm:ss past an hour. |
KazuEventDetail | type | What every event tells of the board. |
KazuMount | type | The native mounted number grid, its current game/detail, controls and cleanup methods. |
KazuMountOptions | type | The puzzle, optional solution/progress, assistance, controls and event callbacks for mounting a number grid. |
KazuMountSettings | type | Everything about how a mounted board plays that can change while it is on the page. |
mountKazu | function | Draw a puzzle into host and play it. |
mountShikaku | function | A rectangle player in any element; mount once, update appearance with set, destroy on unmount. |
SHIKAKU_PLAY_STYLE | constant | Scoped native Shikaku board and player CSS. |
SHIKAKU_STRINGS | constant | Native English and Japanese labels and announcements for Shikaku. |
ShikakuDrawOptions | type | Current Shikaku marks or entries, selection, errors and native SVG appearance choices. |
ShikakuLanguage | type | The native English or Japanese display language for Shikaku. |
ShikakuMaterial | type | A supported material of the native Shikaku board. |
ShikakuMount | type | The mounted Shikaku game and progress, native controls and cleanup handle. |
ShikakuMountOptions | type | The initial Shikaku board, native progress, appearance and host event callbacks. |
ShikakuPieces | type | A supported native Shikaku mark or piece appearance. |