Reference
Playable board
import { … } from "@johnmorrisdotca/suido/play";
15.7 kB minified and gzipped, with everything it imports (measured with esbuild)
Suido, played in a page: mountSuido draws a board into any element and
plays it by tap, mouse and keyboard, with the water flowing as pipes join, a
hint, Start over, and the words in English and Japanese. A separate entry
(@johnmorrisdotca/suido/play), so a server never loads any of it.
Exports
| Name | Kind | What it is |
|---|---|---|
ensureSuidoPlayStyle | function | Put the style in the page once: in the document's head, or in the shadow root the host is in. |
mountSuido | function | Draw a board into host and play it. |
SUIDO_PLAY_STYLE | constant | THE STYLE a playable Suido board wears (mountSuido, <suido-board>): the drawing's own (SUIDO_STYLE) and the board's box, its chips, its lines of words and its buttons. |
SUIDO_STRINGS | constant | The native English and Japanese labels, announcements and interpolation templates. |
SuidoEventDetail | type | What a mounted board tells of itself in every event. |
SuidoLanguage | type | THE WORDS A SUIDO BOARD SAYS, in English and Japanese: what a screen reader hears of each cell, the buttons and the lines of words under a playable board, and what each twist means. |
suidoLanguageOf | function | The language a piece of text is in: Japanese for anything starting ja, English for everything else. |
SuidoMount | type | The native mounted board, its game and view, actions and cleanup methods. |
SuidoMountOptions | type | The initial puzzle, native controls, language and event callbacks for mounting a board. |
suidoSay | function | A line in a language, with its values filled in; the line itself if there is none by that name. |
SuidoTurning | type | The way a tap turns a piece. |