リファレンス
ブラウザーの卓
import { … } from "@johnmorrisdotca/kumimoji/ui";
最小化と gzip 圧縮をしたサイズは 674.9 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Kumimoji played in the browser, in plain DOM: a whole game alone
(mountKumimoji), and the window a board shows the grid through
(boardModel). Its own entry, so the rules never carry a stylesheet.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
BOARD_LEAST | 定数 | The fewest squares a side, so an empty or small table is still a table. |
BOARD_MARGIN | 定数 | How many empty squares are kept round the tiles on every side, so there is always room to build out. |
boardModel | 関数 | THE PART OF THE TABLE TO DRAW, for a grid and its verdict: the tiles and a margin round them, at least BOARD_LEAST a side, each square with its tile, what is printed on it, and how it stands. |
BoardModel | 型 | The part of the table to draw: how many rows and columns, and every square, row by row. |
BoardSquare | 型 | One square of the board drawn. |
Cloth | 型 | A cloth's name. |
clothVars | 関数 | A cloth as CSS variables; nothing for a name that is not a cloth, so the defaults stay. |
isCloth | 関数 | Whether a text names a cloth. |
KUMIMOJI_CLOTHS | 定数 | THE CLOTHS A TABLE MAY BE LAID IN: the same five the whole family offers, and itsutsu.com's boards: green, blue, red, black and wood. |
KUMIMOJI_STRINGS | 定数 | The table's words in each language it speaks: KUMIMOJI_STRINGS.en, KUMIMOJI_STRINGS.ja. |
KUMIMOJI_STYLE | 定数 | The table's own styles, scoped to .km-root, every colour and size a CSS variable so a page can wear it in its own colours (set them on the element or any ancestor, or pass them as theme). |
KumimojiLocale | 型 | The languages the table speaks: English and Japanese. |
kumimojiSay | 関数 | A line from a table of strings with its braces filled in: kumimojiSay(strings.left, { n: 12, time: "1:05" }). |
kumimojiStrings | 関数 | The table of strings for a locale with a page's own words laid over it. |
KumimojiStrings | 型 | Every word the table shows, by name: one table of these for each language. |
KumimojiTableHandle | 型 | Readiness, structured play and presentation/game controls for a mounted table. |
KumimojiTableOptions | 型 | Optional initial game, presentation, readiness and callback choices. |
mountKumimoji | 関数 | A GAME OF KUMIMOJI ALONE, IN PLAIN DOM: the bag dealt from a seed, your hand, and a table to build your crossword on, every run judged as you lay it. |
TileMark | 型 | How a tile on the table stands: part of a sound crossword, in a run that is not a word, or apart from the rest. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。