Skip to the content

Kazu数

Generate checked Sudoku and logic puzzles, read native rules and hints, and draw or embed playable boards.

Kazu is the Japanese word 数 for number. About the name

Contents

Reference

Register puzzle elements

import { … } from "@johnmorrisdotca/kazu/element/define";

27.7 kB minified and gzipped, with everything it imports (measured with esbuild)

Defines the <kazu-board> element on the page. Import it for its effect:

<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/kazu@1/dist/element-define.js"></script>
<kazu-board kind="number-place" size="9" level="medium"></kazu-board>

A tag already defined is left as it is, and on a server, where there is no page, nothing happens.

Exports

NameKindWhat it is
defineBoardfunctionRegister a standard or custom board tag without replacing a definition.
KAZU_EMBED_OPTION_KEYSconstantEvery mounted-board option, kept complete by TypeScript and checked by the builder.
KazuBoardclassNative custom element with reflected setup and presentation.
KazuElementOptionstypeHost callbacks; the same actions also emit native events.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kazu 2.1.0.