Repository navigation
Releases: johnmorrisdotca/toranpu
Releases · johnmorrisdotca/toranpu
Release list
v2.15.0
The hand, card and pile elements take the family's standard embed attributes and have a shared builder, and the package has an English and Japanese documentation site with a checked example for every export. The rules, deals, saved games and the 2.x entry points are unchanged.
Added
- Add the bilingual documentation site, checked public examples, paired guides, local search and machine-readable pages.
- Add the shared hand/card/pile builder, validated iframe pages and reflected display attributes, preserving card methods and structured getters.
- Share a package-independent embed builder for option controls, preview adapters, code tabs and shareable links.
Changed
- The API link in the demo's header reads "API" in English (
pageApiinSTRINGS), so that the header takes the same number of rows in English and in Japanese on a phone, as the demo's test of a language change asks. - Synchronize documentation tooling for repository layouts, generated type references, Node entry points and repository-specific README links.
- 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.
- The tables of the drawings' custom properties moved from the README to
docs/theming.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. - Group the package family by kind, alphabetize each group, and include the geography packages and REST in Pieces in the shared footer and README.
- Repository only:
e2e/shots.mjsno longer takes the README's pictures (pnpm screenshots:readmedoes, since the last release) and keeps its general pictures. - Update the shared family description for addresses in all seven supported countries, including France and Germany.
v2.14.2
Nothing that was exported has changed.
Changed
- 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 the three card games on the table and of each part of the demo (the designs, the backs, your own branding, one card, a hand, the piles, a whole table and the sounds), an Install section, an Examples section of twelve examples whose output is what they print, and a short list of the calls to learn first. Its pictures are in
docs/images(WebP, light and dark) and are retaken withpnpm screenshots:readme(it replacespnpm pictures,docs/desktop.jpganddocs/phone.jpg;e2e/shots.mjskeeps its general pictures); they are not in the tarball, andpnpm test:packagefails if one is. - To keep the README under the 64,000 characters npm can show, the long sections moved to pages under
docs/, each with its heading and a summary left in the README: the rules interface and the solitaires todocs/RULES-API.md; card sounds, backs, designs and your own branding todocs/CARDS.md; the card, hand, pile, embed and table elements todocs/ELEMENTS.md; the tables of every export todocs/API.md; the source tree todocs/ARCHITECTURE.md. Nothing was removed, and the tests that hold these to the code read the README and these pages together. docs/games.md,docs/strings-ja.mdanddocs/credits.mdare no longer in the tarball: the family's standard keepsdocs/out of what npm installs, and the README links them on GitHub, where they are read. The card artwork and sounds that ship are CC0 or public domain, and the README's Licence section now says which and where each came from.- The command line's help in the README names its language (
text). - Repository only: the package and everything it exports are unchanged.
CONTRIBUTING.mdis the family's one text with a section of its own for Toranpu, held to the master in johnmorrisdotca/.github bysrc/family.test.js;ci.ymlandpages.ymlare 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. - Source files are named in kebab-case, and a lint rule keeps them so.
- The demo's page titles read
Toranpu · pitch, like the rest of the family's. - The demo's own stylesheet is
demo/toranpu.css, named for the package like the family's.
Fixed
- 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.
v2.14.1
Nothing that was exported has changed.
Added
- A test holds every
@johnmorrisdotca/toranpu@Nversion pin in the README to this package's major version.
Changed
- The family's list, in the README and in the demo's footer, names all twenty-four packages, Karakuri and Houseki included.
- The npm description is one sentence of 250 characters or fewer, so npm and its search show it whole; it is also the repository's About text.
homepageis the demo site andauthoris"John Morris", the same in every package. - The GitHub Actions workflows use the current versions of the actions (checkout 7, setup-node 7, pnpm/action-setup 6; configure-pages 6, upload-pages-artifact 5 and deploy-pages 5 for Pages), which clears GitHub's Node 20 deprecation warning.
v2.14.0
Added
- Your own branding. A page's own card backs, faces and cards no deck has.
registerCardBack(name, options)andregisterCardDesign(design)keep them by
name, soback="frontier"anddesign="frontier"work on every card, hand,
pile and table of the page, and an element already on the page draws again with
what is registered after it. A back takesart(SVG of your own for the whole
back),image(a picture),logo(in the middle, on a plate over the lattice
or bare over your own art) andlogoSize; an element takesback-imageand
back-logo. A design draws standard cards in your own art, and cards no deck
has (a territory card, any id of letters, digits,-,_,.or:), from
artor fromdraw(card, { language }), named for a screen reader by
label, withframe: "none"for art that fills the card. A hand or pile
written as text reads those ids beside the usual ones. - A face or a back put into a card. An element with
slot="face"or
slot="back"inside<toranpu-card>is drawn as that side, and aface
property that is a function draws the face from the card's id. Alabel
attribute names a card of your own.cardFaceFromArt(art, options?)draws one
face from artwork alone. cleanMarkupandsafeImageUrl: everything a page hands in is cleaned first,
so scripts, handlers, foreign objects and addresses that are not pictures never
reach the page.- War, the eleventh game: two players, a turn of the cards, wars three cards
deep inside wars, a player who cannot finish a war losing, and a limit of 25,
50, 100, 200 or 1000 turns so that a game can end, the player holding more
cards winning. Its rules, a computer player (War has no choices, so it turns the
cards over), seeded deals, saved games as text, its words in English and
Japanese, the/warentry point, the command line,<toranpu-table game="war">
and a place in the demo. - An Accessibility section in the README, and the sixteen packages of the
family listed. - A Help switch in the demo, beside the language chooser in the family header, shared by every demo. Off (the default) the page is as it was; on, each option row says in one plain line what it does, in English or Japanese, and every button in it has the same words as its hover text. Kept on the device.
Changed
- React 19, Vue 3 and Svelte 5 set a property, not an attribute, on a custom
element that has a property of that name.flipon a card andmarkon a hand
are methods as well as attributes,cardson a hand or pile took only a list,
andcounton a pile andgameon a table could not be set at all. Each now
sets its attribute, the methods go on working, and a list or text is taken for
cards. - Node 22 or later (
engines), as the CI matrix has always tested. Node 20 is
end of life. - The family's SECURITY.md and CODE_OF_CONDUCT.md, with a copy of the master text
kept inscripts/communityand held by a test; CONTRIBUTING.md carries the
family's house rules. - The GitHub release's notes are the version's section of this changelog.
- Nothing that was exported before has changed: every deal, rule, saved game and
drawing of the ten games and the three solitaires is as it was.