リファレンス
遊べる数字の盤
import { … } from "@johnmorrisdotca/kazu/play";
最小化と gzip 圧縮をしたサイズは 27.3 kB(読み込むものをすべて含み、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.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
ensureKazuPlayStyle | 関数 | Put the style in the page once: in the document's head, or in the shadow root the host is in. |
KAZU_PLAY_STYLE | 定数 | 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 | 関数 | A time taken, as a clock shows it: m:ss, and h:mm:ss past an hour. |
KazuEventDetail | 型 | What every event tells of the board. |
KazuMount | 型 | The native mounted number grid, its current game/detail, controls and cleanup methods. |
KazuMountOptions | 型 | The puzzle, optional solution/progress, assistance, controls and event callbacks for mounting a number grid. |
KazuMountSettings | 型 | Everything about how a mounted board plays that can change while it is on the page. |
mountKazu | 関数 | Draw a puzzle into host and play it. |
mountShikaku | 関数 | A rectangle player in any element; mount once, update appearance with set, destroy on unmount. |
SHIKAKU_PLAY_STYLE | 定数 | Scoped native Shikaku board and player CSS. |
SHIKAKU_STRINGS | 定数 | Native English and Japanese labels and announcements for Shikaku. |
ShikakuDrawOptions | 型 | Current Shikaku marks or entries, selection, errors and native SVG appearance choices. |
ShikakuLanguage | 型 | The native English or Japanese display language for Shikaku. |
ShikakuMaterial | 型 | A supported material of the native Shikaku board. |
ShikakuMount | 型 | The mounted Shikaku game and progress, native controls and cleanup handle. |
ShikakuMountOptions | 型 | The initial Shikaku board, native progress, appearance and host event callbacks. |
ShikakuPieces | 型 | A supported native Shikaku mark or piece appearance. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。