本文へ移動

Jirai地雷

シード付きの地雷の盤を作り、見える数字からヒントを証明し、四角・四近傍・六角・端がつながる盤で遊べます。

「地雷」は、地面に埋められた爆弾のことです。 名前について(英語)

目次

変更履歴

この変更履歴はまだ日本語に訳されていないため、英語で表示しています。

All notable changes to this project are written here. The format follows Keep a Changelog, and the project uses Semantic Versioning.

[Unreleased]

[0.5.0] - 2026-10-14

The board 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 dealing, the deduction, the drawing and saved games are unchanged.

Added

  • Add the bilingual documentation site, checked public examples, paired guides, local search and machine-readable pages.
  • Add the shared embed builder, validated iframe route, reflected board settings, display sizes and UTC daily play. Preserve legacy cell dimensions, safe openings and mounted methods. Native events now bubble with JSON-safe error detail.
  • Share a package-independent embed builder for option controls, preview adapters, code tabs and shareable links.

Changed

  • pnpm check builds the package before it type-checks, because the type-check reads the built dist/element.js; in a clean checkout, which is what the release workflow has, it failed without the build.
  • The API link in the header reads "API" in English, 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 complete resource catalogues on the documentation entry index and the active resource beside core navigation; render valid default imports in HTML and Markdown.
  • Group the package family by kind, alphabetize each group, and include the geography packages and REST in Pieces in the shared footer and README.
  • Update the shared family description for addresses in all seven supported countries, including France and Germany.

[0.4.2] - 2026-10-06

Nothing that was exported has changed. The README is the family's one layout, in full.

Added

  • The README has a picture of the demo on a desk and on a phone, in light and dark, taken from the demo by pnpm screenshots:readme (the pictures are in docs/images/ and are not in the package), a picture of each rule set and outline (square, orthogonal, hexagonal, wraparound, a heart, a star), of the explained hint and of the slate board with flowers on a phone, an Examples section of twelve examples that run, examples for React, Vue, Svelte and Angular, tables of the entry points, the calls to learn first and every theme property, and an Accessibility section.
  • pnpm test:readme type-checks and runs every TypeScript and JavaScript example in the README against the built package, as a job of its own in CI; src/readme.test.js holds the README to the family's standard (sections in order, languages on code fences, pictures with alt text and a caption, no marketing words, version pins) in pnpm check; pnpm test:package fails if a picture or anything under docs/ is in the packed package.

Fixed

  • The README told readers to import DEFAULT_SETTINGS from @johnmorrisdotca/jirai/play, which does not export it (it is in the main entry), and showed opening="clear" on <jirai-board>, which does not read an opening attribute (the tag reads width, height, mines, seed, grid, shape, no-guess, material, pieces and lang). Both examples are corrected, and every TypeScript example is now type-checked and run.

Changed

  • pnpm pictures is pnpm screenshots:readme, and takes WebP pictures in light and dark under docs/images/; docs/desktop.jpg and docs/phone.jpg are gone, and the presentation check looks for the hero pictures there instead.
  • 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 Jirai, 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.
  • The demo's page titles read Jirai · pitch, like the rest of the family's.
  • The demo's own stylesheet is demo/jirai.css, named for the package like the family's.
  • The demo is built into site/, where the Pages workflow and every other package look for it.

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.

[0.4.1] - 2026-10-05

Nothing that was exported has changed.

Added

  • A test holds every @johnmorrisdotca/jirai@N version 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. homepage is the demo site and author is "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.
  • Every entry has an import condition beside default.
  • The README has the family's sections in the family's order (Who it is for, Features, Use it in your project, API, Theming, Limits, Browser support, Languages, Roadmap, Architecture, Where it comes from, Changes), the family list sits under "Where it comes from", and a test holds it to them.
  • The development tools are the family's: Vitest 5 and Playwright 1.63, as in the other packages.

[0.4.0] - 2026-10-05

  • Huge fields. hugeSettings(level, { grid, shape, size }) and HUGE_SIZES (32×32, 48×24 and 24×48) give each of the four levels on a field of four times the medium level's area, 1,024 to 1,152 squares, with the level's share of mines (a 32×32 has 126, 160, 211 and 256 mines at easy, medium, hard and extra-hard), on every rule set and outline. Every one is dealt and proved to need no guess in a median of 3 to 60 ms (73 ms the slowest of ten 32×32 seeds), on the square, orthogonal, hexagonal and wraparound grids and the heart, star and hexagon outlines, and src/huge.test.ts wins a 32×32 at easy and at extra-hard by the explained hints alone. The demo's Level menu offers them (?level=huge-hard).
  • A faster hint. deduce compares a count only with the counts that hold its first square, and hintFor builds the neighbours once instead of at every step: on a 32×32 extra-hard field the explained hint took 51 ms on average and up to 400 ms late in the game, now 8 ms and at most 43 ms. The hints it finds are the same ones.
  • Measured, not changed: a reveal or a flag on a 1,024-square board is 4 ms of script, 20 ms with the processor slowed fourfold, and the next frame follows (2,400 squares, the most settings accept: 36 ms), so the board stays plain buttons; the README has the numbers.

[0.3.0] - 2026-10-05

  • An extra-hard level, 40×24 with 240 mines (25%), joins easy, medium and hard on every rule and outline, and every field is still proved to need no guess. beginner, intermediate and expert stay as names for easy, medium and hard, and PRESETS keeps them. New: LEVELS, LEVEL_SIZES, LEVEL_ALIASES, levelNamed, levelSettings (shaped boards keep a level's size and share of mines) and measureBoard, which scores density, multi-step share and depth of deduction so the levels can be shown to step up.
  • No-guess dealing is much faster and no longer fails on dense fields: a one-pass solver that agrees with the hint engine replaces the repeated scans (a 30×16 expert square field took over half a second, now about 2 ms), and when no random layout can be finished the closest is repaired by moving single mines next to where the solver stopped. Orthogonal expert fields, which failed five times in six, are now dealt every time. New options repairs and repair: false (the 0.2 behaviour of giving up after the random layouts).
  • Every field 0.2.1 dealt is dealt again, identically, for the same seed and settings (pinned by tests), and saved games from 0.2.1 replay unchanged. Only settings that used to throw GenerationError deal differently, because they now succeed.
  • Narrowed: a cell with no neighbours under the rules (a tip of an orthogonal or hexagonal star) cannot be opened from without a guess, so an opening there now throws GenerationError with code "opening", and unreachable cells are made mines. Nothing else is narrowed: extra-hard is offered on square, orthogonal, hexagonal and wraparound grids and on rectangle, heart, star and hexagon outlines.
  • The demo's Size menu is now Level (easy, medium, hard, extra-hard, wide, tall), in English and Japanese, follows the grid and outline, and reads ?level= (old names too). The Playwright port can be set with TEST_PORT.

[0.2.1] - 2026-10-05

  • The package no longer ships its unit tests (src/*.test.ts) in the npm tarball.
  • Each of the demo's settings now has a real line of help under it when the Help switch is on, in English and Japanese.
  • The demo, its README family list and its tests are the family's own: the shared header, footer and list of twenty-two, written from one template.
  • The package check runs on Windows too, where npm is a .cmd file.
  • CI runs on a push to main and on a pull request, not twice per pull request, and the release's notes are the changelog's section.
  • Complete package presentation: desktop and phone screenshots, badges, demo/API links, targeted keywords and linked MIT licence.
  • Source-derived API reference and public API comments, contribution/security files, and a package presentation gate.

[0.2.0] - 2026-10-05

  • Orthogonal fields: four-neighbour clues, independent hints, proof-backed generation, drawing, saved progress and bilingual controls. Existing square, hexagonal and wraparound modes remain available.

[0.1.0] - 2026-10-04

  • Square, hexagonal and wraparound fields, seeded and configurable.
  • Safe and clear openings, verified no-guess generation and explained deductions.
  • Immutable rules, versioned saved games, daily seeds and separate browser worker.
  • Configurable materials and markers, English/Japanese controls, keyboard and touch play.
  • Plain-DOM mounting, optional React component and custom element.

ソースを見るGitHub で編集@johnmorrisdotca/jirai 0.5.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。