@johnmorrisdotca/kumimoji 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -1
- package/CONTRIBUTING.md +81 -44
- package/README.md +478 -327
- package/dist/check.d.ts +26 -1
- package/dist/check.js +26 -1
- package/dist/computer.types.d.ts +24 -2
- package/dist/computerPlay.d.ts +45 -2
- package/dist/computerPlay.js +45 -2
- package/dist/computerTurn.d.ts +42 -3
- package/dist/computerTurn.js +42 -3
- package/dist/daily.d.ts +22 -2
- package/dist/daily.js +22 -2
- package/dist/element-define.d.ts +1 -1
- package/dist/element-define.js +3 -13
- package/dist/element.d.ts +85 -4
- package/dist/element.js +176 -45
- package/dist/embed-day.d.ts +4 -0
- package/dist/embed-day.js +23 -0
- package/dist/export.d.ts +123 -6
- package/dist/export.js +91 -4
- package/dist/generate.d.ts +14 -0
- package/dist/generate.js +14 -0
- package/dist/grid.d.ts +181 -10
- package/dist/grid.js +122 -7
- package/dist/help.d.ts +36 -3
- package/dist/help.js +36 -3
- package/dist/judge.d.ts +14 -0
- package/dist/judge.js +14 -0
- package/dist/kana.d.ts +23 -1
- package/dist/kana.js +23 -1
- package/dist/kumimoji.types.d.ts +70 -5
- package/dist/party.d.ts +268 -14
- package/dist/party.js +268 -14
- package/dist/party.types.d.ts +50 -2
- package/dist/partyKept.d.ts +74 -4
- package/dist/partyKept.js +74 -4
- package/dist/partySeats.d.ts +92 -6
- package/dist/partySeats.js +72 -4
- package/dist/partyTurns.d.ts +171 -5
- package/dist/partyTurns.js +171 -5
- package/dist/placement.d.ts +50 -2
- package/dist/placement.js +30 -0
- package/dist/play.d.ts +247 -15
- package/dist/play.js +237 -15
- package/dist/random.d.ts +34 -3
- package/dist/random.js +23 -2
- package/dist/react.d.ts +42 -4
- package/dist/react.js +22 -5
- package/dist/showcase.d.ts +83 -7
- package/dist/showcase.js +49 -4
- package/dist/strings.d.ts +54 -5
- package/dist/strings.js +34 -3
- package/dist/tableView.d.ts +151 -8
- package/dist/tableView.js +129 -6
- package/dist/tileFace.d.ts +59 -5
- package/dist/tileFace.js +48 -4
- package/dist/tileFamily.d.ts +9 -0
- package/dist/tileFamily.js +9 -0
- package/dist/tileWords.d.ts +93 -6
- package/dist/tileWords.js +83 -6
- package/dist/tileWordsModule.d.ts +11 -1
- package/dist/tileWordsModule.js +11 -1
- package/dist/tiles.constants.d.ts +99 -5
- package/dist/tiles.constants.js +99 -5
- package/dist/turn.d.ts +82 -4
- package/dist/turn.js +82 -4
- package/dist/ui/board.d.ts +60 -5
- package/dist/ui/board.js +28 -2
- package/dist/ui/mount.d.ts +41 -2
- package/dist/ui/mount.js +38 -1
- package/dist/ui/style.d.ts +6 -1
- package/dist/ui/style.js +6 -0
- package/dist/version.d.ts +9 -2
- package/dist/version.js +9 -2
- package/dist/wilds.d.ts +22 -1
- package/dist/wilds.js +22 -1
- package/package.json +66 -57
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,41 @@ All notable changes to this project are written down here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.3.0] - 2026-10-14
|
|
10
|
+
|
|
11
|
+
The table is a custom element with the family's standard embed attributes and a shared builder, and the package has an English and Japanese documentation site with a checked example for every export. The rules, generation, seeds and saved games are unchanged.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Add the bilingual documentation site, checked public examples, paired guides, local search and machine-readable pages.
|
|
16
|
+
- Add the shared crossword-table builder and validated iframe route with reflected settings and display options. Preserve native saved/table access and gameplay methods; presentation updates now retain play.
|
|
17
|
+
- Add native ready/set, optional initial saved state, control visibility and localized load failures, forwarded by the React wrapper. Preserve event shapes with composed JSON-safe snapshots and add load/error events.
|
|
18
|
+
- Share a package-independent embed builder for option controls, preview adapters, code tabs and shareable links.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Synchronize documentation tooling for repository layouts, generated type references, Node entry points and repository-specific README links.
|
|
23
|
+
- Keep large documentation resource catalogues on the entry index and the active resource beside core navigation, preserving every reference page; render valid default imports in HTML and Markdown.
|
|
24
|
+
- The props table of `KumimojiBoard` moved from the README to `docs/react.md`, so that the README, which now lists the sports packages too, stays under npm's 65,536 characters; the README keeps a summary and a link.
|
|
25
|
+
- Group the package family by kind, alphabetize each group, and include the geography packages and REST in Pieces in the shared footer and README.
|
|
26
|
+
- Update the shared family description for addresses in all seven supported countries, including France and Germany.
|
|
27
|
+
|
|
28
|
+
## [1.2.2] - 2026-10-06
|
|
29
|
+
|
|
30
|
+
Nothing that was exported has changed.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- The README takes the family's one layout, fully: a hero picture of the demo on a desk and on a phone in light and dark, a picture of each kind of table (English, kana, a run that is not a word, a hand of eleven, a wild tile), an Examples section of ten examples whose output is what they print, an Install section, and a short list of the calls to learn first. Its pictures are in `docs/images` (WebP, light and dark) and are retaken with `pnpm screenshots:readme` (it replaces `pnpm pictures` and the two JPEGs `docs/desktop.jpg` and `docs/phone.jpg`); they are not in the tarball, and `pnpm test:package` fails if one is.
|
|
35
|
+
- To keep the README under the 64,000 characters npm can show, the long tables of exports (dealing and judging, tiles and grids, playing, the table of players, looking at the table) and the table's, the element's and the React components' options moved to `docs/API.md`, and the source tree moved to `docs/ARCHITECTURE.md`, each with a summary and a link left in the README. Nothing was removed, and the tests that hold these tables to the code read the README and `docs/API.md` together.
|
|
36
|
+
- `pnpm test:readme` type-checks and runs every TypeScript and JavaScript example in the README against the built package, as a CI job of its own, and `pnpm check` holds the README to the family's lint.
|
|
37
|
+
- "The command line" says there is none, and now sits after the languages, where the other sections of the standard's order leave room for it.
|
|
38
|
+
- Repository only: the package and everything it exports are unchanged. `CONTRIBUTING.md` is the family's one text with a section of its own for Kumimoji, held to the master in johnmorrisdotca/.github by `src/family.test.js`; `ci.yml` and `pages.yml` are the family's one text (`pnpm check`, the demo, and the package on Linux, macOS and Windows), and any jobs of the package's own after them.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- The API reference page wraps a long entry path instead of running about 2 px wider than a 360 px screen. Nothing the package exports has changed.
|
|
43
|
+
|
|
9
44
|
## [1.2.1] - 2026-10-05
|
|
10
45
|
|
|
11
46
|
Nothing that was exported has changed.
|
|
@@ -141,7 +176,8 @@ The first release.
|
|
|
141
176
|
`@johnmorrisdotca/kumimoji/react`.
|
|
142
177
|
- A static demo for GitHub Pages.
|
|
143
178
|
|
|
144
|
-
[Unreleased]: https://github.com/johnmorrisdotca/kumimoji/compare/v1.
|
|
179
|
+
[Unreleased]: https://github.com/johnmorrisdotca/kumimoji/compare/v1.3.0...HEAD
|
|
180
|
+
[1.3.0]: https://github.com/johnmorrisdotca/kumimoji/compare/v1.2.2...v1.3.0
|
|
145
181
|
[1.2.1]: https://github.com/johnmorrisdotca/kumimoji/compare/v1.2.0...v1.2.1
|
|
146
182
|
[1.1.1]: https://github.com/johnmorrisdotca/kumimoji/compare/v1.1.0...v1.1.1
|
|
147
183
|
[1.1.0]: https://github.com/johnmorrisdotca/kumimoji/releases/tag/v1.1.0
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,28 +1,100 @@
|
|
|
1
|
-
# Contributing
|
|
1
|
+
# Contributing
|
|
2
2
|
|
|
3
|
-
Thank you for helping. Bug reports,
|
|
4
|
-
|
|
3
|
+
Thank you for helping. Bug reports, ideas, corrections to the Japanese and pull
|
|
4
|
+
requests are all welcome.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This first part is the same in every package of the family. It is the master
|
|
7
|
+
text kept in
|
|
8
|
+
[johnmorrisdotca/.github](https://github.com/johnmorrisdotca/.github/blob/main/CONTRIBUTING.md),
|
|
9
|
+
copied unchanged into `scripts/community/CONTRIBUTING.md`, and a test holds
|
|
10
|
+
this file to that copy. What is particular to the package follows it, under
|
|
11
|
+
the heading "Particular to" and the package's name.
|
|
12
|
+
|
|
13
|
+
## Before you start
|
|
14
|
+
|
|
15
|
+
Open an issue first for anything bigger than a typo, so that we can agree on the
|
|
16
|
+
shape before you spend time on it. Taking part follows the
|
|
17
|
+
[Code of Conduct](CODE_OF_CONDUCT.md); report a security concern privately, as
|
|
18
|
+
[SECURITY.md](SECURITY.md) says.
|
|
19
|
+
|
|
20
|
+
## Making a change
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
pnpm install
|
|
24
|
+
pnpm check # lint, types and tests: the same as CI
|
|
25
|
+
pnpm test:package # pack it as npm does, install it in an empty project, import every entry
|
|
26
|
+
pnpm site # build the demo into ./site, as GitHub Pages publishes it
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The package's own further commands (its browser tests, its command line, its
|
|
30
|
+
data scripts) are listed under its own heading below.
|
|
31
|
+
|
|
32
|
+
## House rules, shared by every package of the family
|
|
33
|
+
|
|
34
|
+
- **No runtime dependencies.** Development dependencies are for tests, builds and
|
|
35
|
+
documentation only.
|
|
36
|
+
- **The core is pure.** Every function in it returns new values and never
|
|
37
|
+
changes what it was given.
|
|
38
|
+
- **Test what you change.** Tests sit beside the code they test. A rule you
|
|
39
|
+
change has a test that would have caught it.
|
|
40
|
+
- **Words a person reads come in English and Japanese.** If you cannot write the
|
|
41
|
+
Japanese, say so in the pull request and someone will.
|
|
42
|
+
- **Option values and names are kebab case.**
|
|
43
|
+
- **Art and sound are CC0 or public domain only**, checked at the source and
|
|
44
|
+
credited. Data and word lists may be under another licence that lets them be
|
|
45
|
+
shipped, with its notice kept in `NOTICE.md`. No GPL or LGPL code.
|
|
46
|
+
- **Needs Node 22 or later.**
|
|
47
|
+
- **A README table, example or count that a test holds to the code** changes
|
|
48
|
+
together with the code.
|
|
49
|
+
- **The family's own files are the same in every package**: `demo/family.css`,
|
|
50
|
+
`scripts/family-template.mjs`, `scripts/family-readme.mjs`,
|
|
51
|
+
`scripts/release-notes.mjs`, the files in `scripts/community/` and
|
|
52
|
+
`family.test.js` (in `src/`, or in `test/`). Do not edit one here. To change
|
|
53
|
+
one, change it in every repository at once, bump `FAMILY_TEMPLATE_VERSION` for
|
|
54
|
+
the template, and record the new hash in `family.test.js`. What is the
|
|
55
|
+
package's own goes in its own stylesheet, `demo/<name>.css`, and its page
|
|
56
|
+
builder, `scripts/site.mjs`.
|
|
57
|
+
- **The list of the family in the README is made, not written.**
|
|
58
|
+
`pnpm family:readme` writes it between its markers from
|
|
59
|
+
`scripts/family-template.mjs`.
|
|
60
|
+
- **The workflows are the family's too.** `ci.yml` runs `pnpm check`, the demo's
|
|
61
|
+
browser tests and the packed package on Linux, macOS and Windows; `pages.yml`
|
|
62
|
+
is the same text in every package. A package adds jobs of its own after those.
|
|
63
|
+
|
|
64
|
+
## Pull requests
|
|
65
|
+
|
|
66
|
+
One change per pull request. Say what changed and how you checked it, and add a
|
|
67
|
+
line to `CHANGELOG.md` under **Unreleased**: for a change a user would notice,
|
|
68
|
+
and for one to the repository alone.
|
|
69
|
+
|
|
70
|
+
## Releasing
|
|
71
|
+
|
|
72
|
+
Maintainers bump the version in `package.json` (and in `src/version.ts`, where
|
|
73
|
+
the package has one), move *Unreleased* to the new version in `CHANGELOG.md`,
|
|
74
|
+
dated, push, wait for CI and tag `vX.Y.Z`, the same as `package.json`'s version.
|
|
75
|
+
The Release workflow (`.github/workflows/release.yml`) checks and builds the
|
|
76
|
+
package, attaches the tarball to a GitHub release and publishes it to npm by
|
|
77
|
+
trusted publishing, with provenance and no token. A version already on npm is
|
|
78
|
+
not published again.
|
|
79
|
+
|
|
80
|
+
## Particular to Kumimoji
|
|
81
|
+
|
|
82
|
+
### Reporting a bug
|
|
7
83
|
|
|
8
84
|
Open an [issue](https://github.com/johnmorrisdotca/kumimoji/issues/new?template=report-a-bug.md)
|
|
9
85
|
with what you did, what you expected and what happened. A seed deals the same
|
|
10
86
|
bag every time, so the table's *Save as JSON* file, or the seed with the
|
|
11
87
|
language, hand and level, makes almost any bug reproducible.
|
|
12
88
|
|
|
13
|
-
|
|
89
|
+
### Commands and rules
|
|
14
90
|
|
|
15
91
|
```sh
|
|
16
|
-
git clone https://github.com/johnmorrisdotca/kumimoji
|
|
17
|
-
cd kumimoji
|
|
18
|
-
pnpm install
|
|
19
92
|
pnpm check # lint, types and tests: the same as CI
|
|
20
93
|
pnpm test:table # the demo in real browsers: builds it, then taps it
|
|
21
94
|
pnpm test:package # npm pack, install the tarball, import and require every entry, read both lists
|
|
22
95
|
pnpm test:frameworks # the README's examples built in React, Vue, Svelte, Angular and a plain page
|
|
23
96
|
pnpm site # builds the demo into ./site
|
|
24
97
|
pnpm pictures # re-takes the README's two pictures from the built demo
|
|
25
|
-
pnpm dlx serve site # or any static server
|
|
26
98
|
```
|
|
27
99
|
|
|
28
100
|
- **The rules are pure.** Everything outside `src/ui` and `src/react.tsx` is
|
|
@@ -44,7 +116,6 @@ pnpm dlx serve site # or any static server
|
|
|
44
116
|
- **How the lists load is not to be changed lightly.** They are fetched by a
|
|
45
117
|
dynamic import behind `typeof window`, so that a page's server code never
|
|
46
118
|
carries them; Itsutsu relies on it.
|
|
47
|
-
- **Test what you change.** Tests sit beside their source as `*.test.ts`.
|
|
48
119
|
- **The table is tested by tapping it.** `table/*.table.mjs` are Playwright
|
|
49
120
|
tests that open the built demo in Chromium and WebKit, at a phone's width by
|
|
50
121
|
touch and at a desktop's by mouse, and do what a person does. After every
|
|
@@ -61,38 +132,4 @@ pnpm dlx serve site # or any static server
|
|
|
61
132
|
each from the packed tarball and lays a tile.
|
|
62
133
|
- **Every export gets a doc comment**, which a test holds, and the README's
|
|
63
134
|
tables (options, theming, limits) are checked against the code.
|
|
64
|
-
- **The demo wears the family's look.** `demo/family.css` is the same file in
|
|
65
|
-
every sibling package's demo, and a test fails if it differs from its
|
|
66
|
-
recorded hash. What is Kumimoji's own goes in `demo/kumimoji.css`.
|
|
67
|
-
- **No dependencies.** The package has none at run time and should stay so.
|
|
68
135
|
- **No name, art or wording of a published game.**
|
|
69
|
-
- One change per pull request, with a line in `CHANGELOG.md` under
|
|
70
|
-
*Unreleased*.
|
|
71
|
-
|
|
72
|
-
## House rules, shared by every package of the family
|
|
73
|
-
|
|
74
|
-
- Open an issue first for anything bigger than a typo, so that we can agree on the shape before you spend time on it.
|
|
75
|
-
- No runtime dependencies. Every function that plays or checks a game is pure: it returns new values and never changes what it was given.
|
|
76
|
-
- Tests sit beside the code they test. A rule you change has a test that would have caught it.
|
|
77
|
-
- Words a player reads come in English and Japanese. If you cannot write the Japanese, say so in the pull request and someone will.
|
|
78
|
-
- Option values and names are kebab case.
|
|
79
|
-
- Art and sound are CC0 or public domain only, checked at the source, and credited in the README. No GPL or LGPL code.
|
|
80
|
-
- Needs Node 22 or later. A change a user would notice gets a line in `CHANGELOG.md`.
|
|
81
|
-
- **The list of the family in the README is made, not written.** `pnpm family:readme` writes it between its
|
|
82
|
-
markers from `scripts/family-template.mjs` (the names, the Japanese names and a line on each), and
|
|
83
|
-
`scripts/family-readme.mjs` is the same file in every package. To add a package or change a line, change the
|
|
84
|
-
template in every repository, bump `FAMILY_TEMPLATE_VERSION` and record the new hash in `src/family.test.js`.
|
|
85
|
-
|
|
86
|
-
## Releasing
|
|
87
|
-
|
|
88
|
-
Maintainers bump the version in `package.json` and `src/version.ts` and move
|
|
89
|
-
*Unreleased* to the new version in `CHANGELOG.md`, dated. Pushing the tag
|
|
90
|
-
`vX.Y.Z` runs the Release workflow, which checks that the tag matches
|
|
91
|
-
`package.json`, runs the checks, builds the package, installs and uses it as
|
|
92
|
-
npm packs it, attaches the tarball to a GitHub release, and publishes it to
|
|
93
|
-
npm with provenance, through npm's trusted publishing (no token is kept). A
|
|
94
|
-
version already on npm is not published again. The workflow can also be run
|
|
95
|
-
by hand.
|
|
96
|
-
|
|
97
|
-
By contributing you agree that your code is released under the
|
|
98
|
-
[MIT licence](LICENSE), and to follow the [code of conduct](CODE_OF_CONDUCT.md).
|