egatari 0.6.8 → 0.6.9

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +37 -1
  2. package/README.ja.md +2 -2
  3. package/README.md +2 -2
  4. package/components.lock.json +84 -3
  5. package/components2.lock.json +202 -1
  6. package/kit/check-messages.mjs +5 -0
  7. package/kit/check.mjs +18 -4
  8. package/kit/core/check-parity.mjs +62 -0
  9. package/kit/core/check-source.mjs +56 -0
  10. package/kit/core/colab-core.mjs +1 -1
  11. package/kit/core/color-vocab.mjs +8 -2
  12. package/kit/core/layout-scan.mjs +7 -4
  13. package/kit/core/llm-pack-assemble.mjs +1 -1
  14. package/kit/core/llm-pack-data.mjs +185 -9
  15. package/kit/core/llm-pack.mjs +1 -1
  16. package/kit/core/narration-lint.mjs +12 -0
  17. package/kit/core/new-deck.mjs +3 -0
  18. package/kit/core/part-labels.mjs +6 -0
  19. package/kit/core/template-text.mjs +5 -3
  20. package/kit/deck.js +88 -13
  21. package/kit/instruction-version.json +1 -1
  22. package/kit/player.json +1 -1
  23. package/kit/player.lock.json +2 -2
  24. package/kit/presenter.js +33 -9
  25. package/kit/tools.js +4 -0
  26. package/package.json +1 -1
  27. package/themes/asagi/theme.json +1 -1
  28. package/themes/asagi/tokens.css +12 -0
  29. package/themes/business/theme.json +1 -1
  30. package/themes/business/tokens.css +12 -0
  31. package/themes/default/README.ja.md +24 -1
  32. package/themes/default/README.md +24 -1
  33. package/themes/default/theme.json +1 -1
  34. package/themes/default/tokens.css +12 -0
  35. package/themes/kogecha/theme.json +1 -1
  36. package/themes/kogecha/tokens.css +12 -0
  37. package/themes/kokugo/theme.json +1 -1
  38. package/themes/kokugo/tokens.css +12 -0
  39. package/themes/murasaki/theme.json +1 -1
  40. package/themes/murasaki/tokens.css +12 -0
  41. package/themes/sumi/theme.json +1 -1
  42. package/themes/sumi/tokens.css +12 -0
  43. package/themes/tokiwa/theme.json +1 -1
  44. package/themes/tokiwa/tokens.css +12 -0
  45. package/themes.lock.json +80 -24
  46. package/vendor/components/CATALOG.md +7 -1
  47. package/vendor/components/sha256/1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be/README.en.md +23 -0
  48. package/vendor/components/sha256/1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be/index.js +120 -0
  49. package/vendor/components/sha256/7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45/README.en.md +23 -0
  50. package/vendor/components/sha256/7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45/index.js +289 -0
  51. package/vendor/components/sha256/90ed438b40ed8d765348834b2bed2baad9b0053c2168c218335b6d95b9c80283/README.en.md +44 -0
  52. package/vendor/components/sha256/90ed438b40ed8d765348834b2bed2baad9b0053c2168c218335b6d95b9c80283/index.js +203 -0
  53. package/vendor/components/sha256/a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42/README.en.md +22 -0
  54. package/vendor/components/sha256/a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42/index.js +145 -0
  55. package/vendor/components/sha256/d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287/README.en.md +24 -0
  56. package/vendor/components/sha256/d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287/index.js +103 -0
  57. package/vendor/components/sha256/decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256/README.en.md +31 -0
  58. package/vendor/components/sha256/decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256/index.js +267 -0
  59. package/vendor/components/sha256/f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548/README.en.md +38 -0
  60. package/vendor/components/sha256/f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548/index.js +266 -0
  61. package/vendor/components-2/manifest-2.6.0.json +2104 -0
  62. package/vendor/egatari-spec/SOURCE.json +2 -2
  63. package/vendor/egatari-spec/schema/egatari-audio.schema.json +21 -0
  64. package/vendor/themes/asagi/1.1.0/theme.json +14 -0
  65. package/vendor/themes/asagi/1.1.0/tokens.css +18 -0
  66. package/vendor/themes/business/1.1.0/theme.json +5 -0
  67. package/vendor/themes/business/1.1.0/tokens.css +29 -0
  68. package/vendor/themes/default/1.3.0/theme.json +4 -0
  69. package/vendor/themes/default/1.3.0/tokens.css +74 -0
  70. package/vendor/themes/kogecha/1.1.0/theme.json +10 -0
  71. package/vendor/themes/kogecha/1.1.0/tokens.css +17 -0
  72. package/vendor/themes/kokugo/1.1.0/theme.json +5 -0
  73. package/vendor/themes/kokugo/1.1.0/tokens.css +13 -0
  74. package/vendor/themes/murasaki/1.1.0/theme.json +10 -0
  75. package/vendor/themes/murasaki/1.1.0/tokens.css +13 -0
  76. package/vendor/themes/sumi/1.1.0/theme.json +10 -0
  77. package/vendor/themes/sumi/1.1.0/tokens.css +37 -0
  78. package/vendor/themes/tokiwa/1.1.0/theme.json +10 -0
  79. package/vendor/themes/tokiwa/1.1.0/tokens.css +15 -0
package/CHANGELOG.md CHANGED
@@ -8,6 +8,41 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
8
8
 
9
9
  <!-- Unreleased changes are fragments in changes/*.md (see CONTRIBUTING.md "Changelog"); node tools/changelog.mjs --release X.Y.Z moves them here. -->
10
10
 
11
+ ## [0.6.9] - 2026-11-11
12
+
13
+ ### Added
14
+
15
+ - New part set `data` (情報・データサイエンス / Data science and code; components 2.6.0, candidate): `m-mapping` (random variable mapping), `m-sampling` (sampling), `m-ci` (confidence intervals), `m-folds` (cross-validation), `m-balance` (expectation as a balance point) and `m-code` (code walkthrough). It has its own AI instructions (`docs/llm-parts/data(.ja).md`), is listed after stats wherever part sets are offered (New…, Insert slide's full instructions, `node kit/llm-pack.mjs --sets data`), and is suggested in New… for words such as data science, programming or cross-validation
16
+ - Egatari Player 1.5.0: an embedded lesson (`?embed=1`) takes the remaining Player P8 commands. `{egatari:"seek", id?, slide, step, t}` (slide key or index from 0, step key, seconds or `null` for the final state) moves there, keeping the playing state, and replies `{egatari:"seeked", id?, slideKey, stepKey, t}` after the `position`;
17
+ `{egatari:"preview", id?, on}` and `{egatari:"controls", id?, visible}` switch the faint preview of later steps and the player's own controls at run time and reply in the same shape
18
+ - Egatari Player 1.5.0: an embedded lesson sends `{egatari:"stepEnded", slideKey, stepKey}` when playback has played a step to its end (not for skipped steps or when paused) and `{egatari:"ended"}` after the last step.
19
+ `snapshot` (OPTIONAL in Player P8) and unknown commands reply `{egatari:"error", id, code:"unsupported"}`; bad arguments reply `error` with the command's name as `code`, as `mode`, `rate` and `layout` already did
20
+ - Themes: eleven object colours `--obj-white`, `--obj-black`, `--obj-red`, `--obj-green`, `--obj-yellow`, `--obj-blue`, `--obj-brown`, `--obj-purple`, `--obj-pink`, `--obj-orange` and `--obj-gray`, for colours that are themselves the content (balls in a bag, litmus paper, traffic lights; format spec §8.4). They are always shown with the colour's name or initial, and white, black and colours near the background with an outline; a part that uses one gives a fallback, which may be a literal colour of that name. Every bundled theme sets all eleven: `default` (1.4.0) `#FFFFFF` `#222222` `#E0242B` `#2E9E44` `#F5D90A` `#1E6FD9` `#8B5A2B` `#8E44AD` `#F27BB0` `#F28C1A` `#8C8C8C`, the same in `sumi`, `kokugo`, `tokiwa`, `murasaki` and `business`; `kogecha` a little less saturated and `asagi` a little brighter (each 1.2.0). No existing colour changes; earlier versions stay in `vendor/themes/`
21
+ `node tools/test-themes.mjs` checks each colour's OKLCH hue window, lightness and chroma, that adjacent names (red–orange, blue–purple, brown–red, gray–white …) are at least ΔE00 20 apart, and prints each colour's contrast with `--bg`
22
+ - Quality check: a literal fallback in `var(--obj-…, …)` is not reported as a colour outside the theme's vocabulary (`colorOutside`), since the format lets an object colour fall back to a literal colour of that name
23
+ - Egatari Viewer: markup, stage 1. Highlight text in a lesson's book in three colours (drawn in the Viewer's own layer in the book's scrolling box; the lesson's text and markup unchanged), practise recall (暗記: the chosen colours hidden, revealed one at a time), and a list with colour filters and names. Highlights are kept on this device only (IndexedDB, one record per docId, not on a shared device) and re-attach after the lesson is revised (egatari-spec annotations.md, Highlight record).
24
+
25
+ ### Changed
26
+
27
+ - Editor site (studio.egatari.org): it now hosts the current version and only the one release before it (`/vX.Y.Z/`), instead of every release since v0.6.0; each release moves the window. Older versions show the short “no longer hosted” page linking to their GitHub release, where the whole site can still be downloaded
28
+ - Components 2.0 lessons use egatari/components **v2.6.0** (candidate) by default. `m-curves` 2.2.0 adds `area` / `areaLabel`: shade between a line and the x-axis over one or several spans (rejection regions, p-values, probabilities), with a label above each span. The new part set `data` (see Added) comes with this release. No other part changes version
29
+ - `egatari check --json`: the stale-audio finding's code is now `audioStale` (was `audio: stale`); the message is unchanged.
30
+ - Egatari Player 1.5.0 (the bundled player that files carry, `player` in the index and `deck-meta`): minor release. Hosts can now drive an embedded lesson with every required Player P8 command and follow playback through `stepEnded` and `ended`. The presenter view's top-right pane is now **Next slide** (「次のスライド」): it shows the next slide in its final state, with all its steps, even while the current slide still has steps to go (with animation, the old pane showed only the next step). On the last slide it shows a plain “End” (「終わり」). The script pane still shows the next step's script under “Next step”
31
+ - Egatari Player 1.5.0: the presenter view's current pane always shows the slide's later steps faintly, like `l` and the preview (at the theme's `--preview-opacity`). This is the presenter's own view: the main window does not change. `l` and its button in the presenter view now turn showing later steps faintly on or off on the main window only, and the button shows the main window's state. No keys were added
32
+ - Format spec copy (`vendor/egatari-spec`): the snapshot **wd-2026-11-10** (egatari-spec 6d93c49). Conforms to WD 2026-11-10 except §8.2 language spans ({lang:…|…}). Not implemented yet, planned for v0.6.10. Files that use spans get a different inputHash from the §5.4 rule until then, so their audio will be regenerated once after the upgrade.
33
+
34
+ ### Fixed
35
+
36
+ - `egatari check` (and `node kit/check.mjs`) refuses a built `.ega.html` with exit code 2 and the message “.ega.html is a built file. Run the quality check on the source instead (the working folder or deck.html)”; with `--json` it prints `status: "refused"` and no results. It used to read the built file as a deck source and report false overflows, missing narration and overlaps. Checking the source embedded in a `.ega.html` is planned for v0.6.10.
37
+ - Editor app: the quality check now reports raw math left in the slides (`rawMath`, such as a leftover `$…$` in an English lesson) as an error, with the same message as `npm run check`, and includes it in the fix request with the R-math standard
38
+ - Editor app: the quality check now also runs the other checks that `npm run check` had alone and that need no screenshots or files on disk: です・ます and mixed punctuation, script that reads a formula, broken `{note:}`, long turns and the script language, links to slides, emphasis targets, morphs, image and figure names, slide ids and legacy keys, source outside the 1.0 vocabulary and colours outside the theme's vocabulary (info). Findings the fix request did not map to a standard now take it from the check messages (`ruleOf`)
39
+ - `tools/test-check-parity.mjs` (in `npm test`) fails when `npm run check` reports a code that the editor's check lacks, unless it is on `CLI_ONLY` in `kit/core/check-parity.mjs` with its reason
40
+ - Editor app: the Japanese quote template now reads 「引用する文をここに書く」 (plain form), so a new quote slide no longer trips the です・ます check; the earlier text is still found as template text
41
+ - The narration check (`narrFormula`, R-formula) no longer reports code identifiers joined with `_` (`cross_val_score`, `random_state`, `train_test_split`) as an equation read aloud. A name counts as an identifier when one of its parts is a word of three letters or more; subscripts such as `x_1`, `x_t`, `a_ij` and `\alpha_t` are still reported. Hyphenated words such as `scikit-learn` were never reported
42
+ - The same check reads a reading `{x|よみ}` by its spoken form: a single symbol with its reading (`{E_i|イーアイ}`, `{θ|シータ}`), which R-reading allows, is no longer reported, and an expression under one reading (`{E_i + E_j|…}`) is left to `readingExpr` instead of being reported twice
43
+ - Editor app: after **Create** with a pasted AI output (also from a sample) and **Replace** on an Egatari file, the wait logo shows
44
+ “Creating the lesson…” / “Replacing…” until the lesson appears, instead of the start screen (or the old lesson) with no sign of progress for 1–2 seconds
45
+
11
46
  ## [0.6.8] - 2026-11-10
12
47
 
13
48
  ### Added
@@ -1412,7 +1447,8 @@ First public release.
1412
1447
  - Docs: README (English and Japanese), the contract (`docs/contract.md`), a reference of every option, syntax and key (`docs/reference.md`, `docs/reference.ja.md`), guides for the dev server and video, CONTRIBUTING, SECURITY, issue forms
1413
1448
  - Tests (`npm test`) and GitHub Actions running them on Node 22 and 24, plus a TTS dry-run through video export
1414
1449
 
1415
- [Unreleased]: https://github.com/egatari/egatari-studio/compare/v0.6.8...HEAD
1450
+ [Unreleased]: https://github.com/egatari/egatari-studio/compare/v0.6.9...HEAD
1451
+ [0.6.9]: https://github.com/egatari/egatari-studio/compare/v0.6.8...v0.6.9
1416
1452
  [0.6.8]: https://github.com/egatari/egatari-studio/compare/v0.6.7...v0.6.8
1417
1453
  [0.6.7]: https://github.com/egatari/egatari-studio/compare/v0.6.6...v0.6.7
1418
1454
  [0.6.6]: https://github.com/egatari/egatari-studio/compare/v0.6.5...v0.6.6
package/README.ja.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- i18n: pair=README.md sha256=0d671e51a6da4638 -->
1
+ <!-- i18n: pair=README.md sha256=1f6271225e0a0761 -->
2
2
  <p align="center">
3
3
  <picture>
4
4
  <source media="(prefers-color-scheme: dark)" srcset="assets/logo/egatari-dark.svg">
@@ -310,7 +310,7 @@ node kit/build.mjs examples/minimal/deck.html --theme mylab
310
310
  |---|---|
311
311
  | `docs/contract.ja.md` | 約束事(位置と時刻、パーツ、台本、タイムライン、強調、モーフ)。**まずここを読む**([English](docs/contract.md)) |
312
312
  | `docs/dev-server.ja.md`、`docs/editor.ja.md`、`docs/video.ja.md`、`docs/distributing.ja.md` | 手引き:開発サーバー、編集アプリ、動画にする、学習者に配る([English](docs/dev-server.md)、[English](docs/editor.md)、[English](docs/video.md)、[English](docs/distributing.md)) |
313
- | `docs/authoring-with-llms.ja.md` | チャットの AI(claude.ai・Gemini・ChatGPT)に初めの下書きを書かせる指示。共通の本体(標準パーツ)。束の指示(stats・math・maps・kokugo・english・music・business・tools・science)は `docs/llm-parts/`。`tools/make-llm-guide.mjs` が作り、`node kit/llm-pack.mjs` が組み立てる([English](docs/authoring-with-llms.md)) |
313
+ | `docs/authoring-with-llms.ja.md` | チャットの AI(claude.ai・Gemini・ChatGPT)に初めの下書きを書かせる指示。共通の本体(標準パーツ)。束の指示(stats・data・math・maps・kokugo・english・music・business・tools・science)は `docs/llm-parts/`。`tools/make-llm-guide.mjs` が作り、`node kit/llm-pack.mjs` が組み立てる([English](docs/authoring-with-llms.md)) |
314
314
  | `docs/reference.ja.md` | リファレンス:原稿の記法、台本、長さ、テーマ、キー、URL の引数、すべてのコマンドの選択肢と環境変数([English](docs/reference.md)) |
315
315
  | `kit/` | 実行系(`deck.js` `presenter.js` `tools.js`)、体裁、ビルド、台本の解析、品質チェック、ブラウザの起動。`kit/core/` は Node と編集アプリが共有する組み立ての本体、`kit/templates/` は新しい教材のテンプレート |
316
316
  | `vendor/components/` | [egatari/components](https://github.com/egatari/components) のリリース(パーツ)の写し。取り込んだ版をすべて残し、既定の版は `components.lock.json` で固定。一覧は `vendor/components/CATALOG.md`。取り込みは `npm run components:update -- vX.Y.Z` |
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- i18n: pair=README.ja.md sha256=eb2c3d4dbdd4d423 -->
1
+ <!-- i18n: pair=README.ja.md sha256=57a9c47c38482fca -->
2
2
  <p align="center">
3
3
  <picture>
4
4
  <source media="(prefers-color-scheme: dark)" srcset="assets/logo/egatari-dark.svg">
@@ -310,7 +310,7 @@ The `voice.json` of `examples/tmlr2026-calibration` uses the engine's default vo
310
310
  |---|---|
311
311
  | `docs/contract.md` | the contract: position and time, parts, script, timeline, emphasis, morphs. **Read this first** ([日本語](docs/contract.ja.md)) |
312
312
  | `docs/dev-server.md`, `docs/editor.md`, `docs/video.md`, `docs/distributing.md` | guides: the dev server, the editor app, making a video, and handing a lesson to learners ([日本語](docs/dev-server.ja.md), [日本語](docs/editor.ja.md), [日本語](docs/video.ja.md), [日本語](docs/distributing.ja.md)) |
313
- | `docs/authoring-with-llms.md` | instructions for chat AIs (claude.ai, Gemini, ChatGPT) to write a first draft; the common body (standard parts); the part set packs (stats, math, maps, kokugo, english, music, business, tools, science) are in `docs/llm-parts/`; generated by `tools/make-llm-guide.mjs`, assembled by `node kit/llm-pack.mjs` ([日本語](docs/authoring-with-llms.ja.md)) |
313
+ | `docs/authoring-with-llms.md` | instructions for chat AIs (claude.ai, Gemini, ChatGPT) to write a first draft; the common body (standard parts); the part set packs (stats, data, math, maps, kokugo, english, music, business, tools, science) are in `docs/llm-parts/`; generated by `tools/make-llm-guide.mjs`, assembled by `node kit/llm-pack.mjs` ([日本語](docs/authoring-with-llms.ja.md)) |
314
314
  | `docs/reference.md` | reference: slide syntax, script, timing, themes, keys, URL parameters, and all CLI options and environment variables ([日本語](docs/reference.ja.md)) |
315
315
  | `kit/` | runtime (`deck.js`, `presenter.js`, `tools.js`), styles, build, script parser, quality checker, browser launcher; `kit/core/` is the build shared by Node and the editor app, `kit/templates/` the new-lesson template |
316
316
  | `vendor/components/` | copies of the [egatari/components](https://github.com/egatari/components) releases (parts), every version brought in; default versions pinned in `components.lock.json`; catalog in `vendor/components/CATALOG.md`. Update with `npm run components:update -- vX.Y.Z` |
@@ -627,7 +627,8 @@
627
627
  "2.0.1",
628
628
  "2.0.2",
629
629
  "2.1.0",
630
- "2.1.1"
630
+ "2.1.1",
631
+ "2.2.0"
631
632
  ],
632
633
  "sha256": {
633
634
  "1.0.0": "87140b4461fe1595514c712cf1a0c87b0e7fe4607138702df4d950dd6984144c",
@@ -656,7 +657,8 @@
656
657
  "2.0.1": "c932e8c83bc2b9a8199bdf9c56e39e7bf5b9ed6980cb1b46bdcbefd20be81126",
657
658
  "2.0.2": "59519c0484932a018a8adf13999b5c198a1c06974607bd331793b5e379d2a2b9",
658
659
  "2.1.0": "6f1df1087e6d2ea7826d80e11fe21319715a7fd55079a1a7a0a849c785a40474",
659
- "2.1.1": "0c07349365739345e3d2ec294953d72dbb1599c9685925ec51d8cd832ae09701"
660
+ "2.1.1": "0c07349365739345e3d2ec294953d72dbb1599c9685925ec51d8cd832ae09701",
661
+ "2.2.0": "d85caa5d9121289004afe8147e2d934b7d33a91f55f56260c291545a95730150"
660
662
  },
661
663
  "crlfSha256": {
662
664
  "1.0.0": "39e1b134ad1c6a99cb3b108953e05c29b703473babc575bf09e201fcf17eaac9",
@@ -709,7 +711,8 @@
709
711
  "2.0.1": "afcc0d2ca964536fb7a4a0997bede6b16a2049fd2a6ff298e1b8592f236257f7",
710
712
  "2.0.2": "a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a",
711
713
  "2.1.0": "fde0e1e193f6af8fcef914359dfad392c47eedee4fe9b3a4348b8a5aac86b3e6",
712
- "2.1.1": "f9643ffeae11d30f6ae947fee7ed6615e2494bd5bf18c747975bcd3f75871e91"
714
+ "2.1.1": "f9643ffeae11d30f6ae947fee7ed6615e2494bd5bf18c747975bcd3f75871e91",
715
+ "2.2.0": "90ed438b40ed8d765348834b2bed2baad9b0053c2168c218335b6d95b9c80283"
713
716
  }
714
717
  },
715
718
  "cycle": {
@@ -3172,6 +3175,84 @@
3172
3175
  "2.0.0": "ec132caf4b4fd019fab20f9e9d6bc86266e30eb80a4fb8d2de4ca440ad45a098"
3173
3176
  },
3174
3177
  "catalogue": "2"
3178
+ },
3179
+ "balance": {
3180
+ "default": "2.0.0",
3181
+ "versions": [
3182
+ "2.0.0"
3183
+ ],
3184
+ "sha256": {
3185
+ "2.0.0": "0e71ee08c6fd07ed89d702c102b311b2fafc1aad8594ff9cbf890b6cda10fbce"
3186
+ },
3187
+ "content": {
3188
+ "2.0.0": "1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be"
3189
+ },
3190
+ "catalogue": "2"
3191
+ },
3192
+ "ci": {
3193
+ "default": "2.0.0",
3194
+ "versions": [
3195
+ "2.0.0"
3196
+ ],
3197
+ "sha256": {
3198
+ "2.0.0": "dadb20634cf3de920bb175417aab55ef7d1fa25fe007418900a1379dc0557616"
3199
+ },
3200
+ "content": {
3201
+ "2.0.0": "a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42"
3202
+ },
3203
+ "catalogue": "2"
3204
+ },
3205
+ "code": {
3206
+ "default": "2.0.0",
3207
+ "versions": [
3208
+ "2.0.0"
3209
+ ],
3210
+ "sha256": {
3211
+ "2.0.0": "e66ec3b6cb89b7a4b1032e20209b4a027244cac7e6ba7a4cd0e69ab4bd3b142a"
3212
+ },
3213
+ "content": {
3214
+ "2.0.0": "f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548"
3215
+ },
3216
+ "catalogue": "2"
3217
+ },
3218
+ "folds": {
3219
+ "default": "2.0.0",
3220
+ "versions": [
3221
+ "2.0.0"
3222
+ ],
3223
+ "sha256": {
3224
+ "2.0.0": "d5d1c993132c5d4a4bae8bbf26c62a5cd33edd79d352b1264e6ae64611d60d2b"
3225
+ },
3226
+ "content": {
3227
+ "2.0.0": "d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287"
3228
+ },
3229
+ "catalogue": "2"
3230
+ },
3231
+ "mapping": {
3232
+ "default": "2.0.0",
3233
+ "versions": [
3234
+ "2.0.0"
3235
+ ],
3236
+ "sha256": {
3237
+ "2.0.0": "4f366e498fd3b74bdff043cc0f570b668704897e6bd98e835235d810951dad33"
3238
+ },
3239
+ "content": {
3240
+ "2.0.0": "decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256"
3241
+ },
3242
+ "catalogue": "2"
3243
+ },
3244
+ "sampling": {
3245
+ "default": "2.0.0",
3246
+ "versions": [
3247
+ "2.0.0"
3248
+ ],
3249
+ "sha256": {
3250
+ "2.0.0": "c45be3629eb58c430def3ea290f7a29df464e8e057fe09039c71bcb256a7e862"
3251
+ },
3252
+ "content": {
3253
+ "2.0.0": "7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45"
3254
+ },
3255
+ "catalogue": "2"
3175
3256
  }
3176
3257
  }
3177
3258
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "source": "https://github.com/egatari/components",
3
- "default": "2.5.1",
3
+ "default": "2.6.0",
4
4
  "catalogues": {
5
5
  "2.0.0": {
6
6
  "tag": "v2.0.0",
@@ -1501,9 +1501,142 @@
1501
1501
  "tree": "554ed56e1ec963627be86ba1f573099ff57cf4cb22e8e10ce00e2128e30d39e2",
1502
1502
  "venn": "e1a0240f83e1925ee59ef2752662e2b0ec27f69251c012f8bab682aadcd8695f"
1503
1503
  }
1504
+ },
1505
+ "2.6.0": {
1506
+ "tag": "v2.6.0",
1507
+ "tarballSha256": "9d885544d1d5e1856a3a78172b67471000350b80d3bbcbf70d42709e3e951204",
1508
+ "manifestSha256": "b30ebf1e7b488eb27418af16787c188844666cc956d921584f3287de640eb997",
1509
+ "parts": {
1510
+ "balance": "2.0.0",
1511
+ "bars": "2.0.2",
1512
+ "base": "1.1.0",
1513
+ "boxplot": "2.0.4",
1514
+ "boxplot-core": "1.0.0",
1515
+ "cards": "2.0.3",
1516
+ "ci": "2.0.0",
1517
+ "code": "2.0.0",
1518
+ "codetree": "2.0.4",
1519
+ "codetree-core": "1.0.0",
1520
+ "collect": "2.0.2",
1521
+ "compare": "2.0.2",
1522
+ "curves": "2.2.0",
1523
+ "cycle": "2.0.3",
1524
+ "expr": "1.0.0",
1525
+ "fishbone": "2.0.3",
1526
+ "flow": "2.0.3",
1527
+ "folds": "2.0.0",
1528
+ "gendai": "2.0.2",
1529
+ "heatmap": "2.0.2",
1530
+ "heatmap-core": "1.0.0",
1531
+ "hissan": "2.0.2",
1532
+ "hist": "2.0.4",
1533
+ "hist-core": "1.0.0",
1534
+ "icons": "1.0.0",
1535
+ "kakijun": "2.0.1",
1536
+ "kanbun": "2.0.2",
1537
+ "kanbun-core": "1.0.0",
1538
+ "keyboard": "2.0.3",
1539
+ "kobun": "2.0.2",
1540
+ "kpi": "2.0.2",
1541
+ "map-japan": "2.0.4",
1542
+ "map-world": "2.0.3",
1543
+ "mapping": "2.0.0",
1544
+ "market": "2.0.2",
1545
+ "markup-reader": "1.0.1",
1546
+ "menu": "2.0.2",
1547
+ "numberline": "2.0.2",
1548
+ "orbit": "2.0.4",
1549
+ "particles": "2.0.0",
1550
+ "pie": "2.0.2",
1551
+ "plot": "1.1.1",
1552
+ "predict": "2.0.3",
1553
+ "quad": "2.0.3",
1554
+ "sampling": "2.0.0",
1555
+ "scatter": "2.0.4",
1556
+ "score": "2.1.0",
1557
+ "seq": "2.0.4",
1558
+ "shape": "1.0.0",
1559
+ "sweep": "2.1.1",
1560
+ "syntax": "2.0.2",
1561
+ "tape": "2.0.2",
1562
+ "timeline": "2.0.2",
1563
+ "timer": "2.0.3",
1564
+ "tree": "2.0.3",
1565
+ "venn": "2.0.2"
1566
+ },
1567
+ "content": {
1568
+ "balance": "1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be",
1569
+ "bars": "520606a746b0d38fdc1aa380e665a1b95eead2487b11f389d2ebac4abe8f07cb",
1570
+ "base": "577008a069e7eb08057705a0800d975e82c8dfe0d0ba5fbf4f8974af7b298a7f",
1571
+ "boxplot": "2af8f6248ebd499dd036bffcac49b3e43fd8c74a0435bd256e2b1dbd8141b4d5",
1572
+ "boxplot-core": "fadd24868e2730ec14b8f3f1e9cb75b8577a48b8d71beaa12ef089f7a3ba0a7d",
1573
+ "cards": "f3d5b6ce53f40c5f355a67538ff11b9cd28297da6292125ccb6e055aeddef906",
1574
+ "ci": "a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42",
1575
+ "code": "f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548",
1576
+ "codetree": "4f96929f3b539c459bb78196251009a5f80e607eebccfae641cec60e979efe0e",
1577
+ "codetree-core": "bb139fb1c2e4d010aa82a2c50db120f95f12a0a251cded3130a71dd57dec0274",
1578
+ "collect": "e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357",
1579
+ "compare": "0cab77d128c5f304c2d2ba32841b0bc5adc54b4e72f6681e0a0dda68c96b5d7e",
1580
+ "curves": "90ed438b40ed8d765348834b2bed2baad9b0053c2168c218335b6d95b9c80283",
1581
+ "cycle": "0787c5bbf2e61801398aeefc39a3674b1fc0e556173c450b85cafa4201cb44a6",
1582
+ "expr": "faf6a2f0b5df589639de624e75c5b20594f517e4426f6415d152809249b00b92",
1583
+ "fishbone": "782ae2154247b00451fc30aa140bf386d3a7a56ac4ad9ee04916f4bd1d29dda0",
1584
+ "flow": "28238c4fa50a377b96ce8a130ce5bdbf7bfc0536ed9c331499ea22377c43adb6",
1585
+ "folds": "d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287",
1586
+ "gendai": "3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2",
1587
+ "heatmap": "2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df",
1588
+ "heatmap-core": "de9607f86221006e7bad43f1f661c751d9a6f8f9c62da5c7e0d7f1249b9afcd6",
1589
+ "hissan": "328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135",
1590
+ "hist": "f0ac8d6498c1f51ea963f6c0776937f9dc6d2a9f2ac0fdbe6243d94cc3bbc06d",
1591
+ "hist-core": "07013c263cc595382dbcfd4931ca8b016f9dfb673440adf28911c95bd465cf9d",
1592
+ "icons": "b2dfb4fa290d240024c95e2d24fda887db9fbc5b94f99b5be00c74c488fcfddb",
1593
+ "kakijun": "8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8",
1594
+ "kanbun": "556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4",
1595
+ "kanbun-core": "f268cf809438c8af63a42f9c9121110fc7263e4d705c40c6206ce46cf7ec167b",
1596
+ "keyboard": "3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f",
1597
+ "kobun": "de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae",
1598
+ "kpi": "ef9c8c77ddf2b3953376a2db700c1277f550ea2606eab11cd8e18056dcba84c1",
1599
+ "map-japan": "340f7678bb19a64f9d4ed63b95d290046367a6b49c44977184f1cec1e97a7d68",
1600
+ "map-world": "bec04685638f8fc1217c380d361fd9a425ffeade0291a4f2b2d4e41a5628e0ef",
1601
+ "mapping": "decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256",
1602
+ "market": "5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721",
1603
+ "markup-reader": "03550bb20d425aa926258bab18b03bbc0cee292072e01bb6c78c429b3ae92c34",
1604
+ "menu": "e2181655ed2050668133e08eb14b5683cda48d6af8d76fd7b551c58798c95287",
1605
+ "numberline": "4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4",
1606
+ "orbit": "2e9a35ce9e289196d0b5fd24b8546cf6e0f4a6df857e69f4f78e686cabb00e61",
1607
+ "particles": "ec132caf4b4fd019fab20f9e9d6bc86266e30eb80a4fb8d2de4ca440ad45a098",
1608
+ "pie": "2f1c797ecd028d04ce12b3d55d8ef9d5a4180d564aa99afb492d0bfc9cd39c94",
1609
+ "plot": "80bf0ca9b592205315d09e2041df5aeb9e123e4129ada03cb4c7e0fd914a3bd7",
1610
+ "predict": "40571cbc11cd649c447da73ede0f89937da344b05d4386abeb4afeecedfe7d3e",
1611
+ "quad": "4dd7e6a02f4128e90d4e2a86cccd9bf267a02cebcff1cdf36e0aaff8848af66e",
1612
+ "sampling": "7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45",
1613
+ "scatter": "808f748e76833742bb12a80482b37cb3dedaf3dcd592ee477d611cb40e95b094",
1614
+ "score": "abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f",
1615
+ "seq": "7ad71dad059fd45a875a68e177335e7c13c550edb4e7746f9410a76f5015bc5a",
1616
+ "shape": "d92842c606795528d1246ddb050ac275e1b72659629185750a6e9ac7fdb763a3",
1617
+ "sweep": "7ef95fd3156f83c48e0961765bae7155607393e16485184fd60fb80cb8a63a16",
1618
+ "syntax": "0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd",
1619
+ "tape": "693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809",
1620
+ "timeline": "3df7d0ec0c3ed4a6b06fbe3befec78b65a2202e5571580d8b28700a14b7b4321",
1621
+ "timer": "9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c",
1622
+ "tree": "554ed56e1ec963627be86ba1f573099ff57cf4cb22e8e10ce00e2128e30d39e2",
1623
+ "venn": "e1a0240f83e1925ee59ef2752662e2b0ec27f69251c012f8bab682aadcd8695f"
1624
+ }
1504
1625
  }
1505
1626
  },
1506
1627
  "parts": {
1628
+ "balance": {
1629
+ "2.0.0": {
1630
+ "sha256": "0e71ee08c6fd07ed89d702c102b311b2fafc1aad8594ff9cbf890b6cda10fbce",
1631
+ "kind": "element",
1632
+ "tag": "m-balance",
1633
+ "requires": {
1634
+ "base": "1.1.0",
1635
+ "plot": "1.1.1"
1636
+ },
1637
+ "license": "MIT"
1638
+ }
1639
+ },
1507
1640
  "bars": {
1508
1641
  "2.0.0": {
1509
1642
  "sha256": "f826e31ccc7fce690b1060027722d79fee0f83b4837426dfe7e4f8af125858cc",
@@ -1658,6 +1791,29 @@
1658
1791
  "license": "MIT"
1659
1792
  }
1660
1793
  },
1794
+ "ci": {
1795
+ "2.0.0": {
1796
+ "sha256": "dadb20634cf3de920bb175417aab55ef7d1fa25fe007418900a1379dc0557616",
1797
+ "kind": "element",
1798
+ "tag": "m-ci",
1799
+ "requires": {
1800
+ "base": "1.1.0",
1801
+ "plot": "1.1.1"
1802
+ },
1803
+ "license": "MIT"
1804
+ }
1805
+ },
1806
+ "code": {
1807
+ "2.0.0": {
1808
+ "sha256": "e66ec3b6cb89b7a4b1032e20209b4a027244cac7e6ba7a4cd0e69ab4bd3b142a",
1809
+ "kind": "element",
1810
+ "tag": "m-code",
1811
+ "requires": {
1812
+ "base": "1.1.0"
1813
+ },
1814
+ "license": "MIT"
1815
+ }
1816
+ },
1661
1817
  "codetree": {
1662
1818
  "2.0.0": {
1663
1819
  "sha256": "21f5e95ee0d45bd05c56a56a32da0f286adefef1f79fc51813cc216c0613bc7a",
@@ -1864,6 +2020,17 @@
1864
2020
  "plot": "1.1.1"
1865
2021
  },
1866
2022
  "license": "MIT"
2023
+ },
2024
+ "2.2.0": {
2025
+ "sha256": "d85caa5d9121289004afe8147e2d934b7d33a91f55f56260c291545a95730150",
2026
+ "kind": "element",
2027
+ "tag": "m-curves",
2028
+ "requires": {
2029
+ "base": "1.1.0",
2030
+ "expr": "1.0.0",
2031
+ "plot": "1.1.1"
2032
+ },
2033
+ "license": "MIT"
1867
2034
  }
1868
2035
  },
1869
2036
  "cycle": {
@@ -2128,6 +2295,17 @@
2128
2295
  "license": "MIT"
2129
2296
  }
2130
2297
  },
2298
+ "folds": {
2299
+ "2.0.0": {
2300
+ "sha256": "d5d1c993132c5d4a4bae8bbf26c62a5cd33edd79d352b1264e6ae64611d60d2b",
2301
+ "kind": "element",
2302
+ "tag": "m-folds",
2303
+ "requires": {
2304
+ "base": "1.1.0"
2305
+ },
2306
+ "license": "MIT"
2307
+ }
2308
+ },
2131
2309
  "gendai": {
2132
2310
  "2.0.0": {
2133
2311
  "sha256": "a9617e3ebadb6a274759f9e495998c9011bfd19d392ea1cd4eb6debeca2b9021",
@@ -2578,6 +2756,17 @@
2578
2756
  "license": "MIT"
2579
2757
  }
2580
2758
  },
2759
+ "mapping": {
2760
+ "2.0.0": {
2761
+ "sha256": "4f366e498fd3b74bdff043cc0f570b668704897e6bd98e835235d810951dad33",
2762
+ "kind": "element",
2763
+ "tag": "m-mapping",
2764
+ "requires": {
2765
+ "base": "1.1.0"
2766
+ },
2767
+ "license": "MIT"
2768
+ }
2769
+ },
2581
2770
  "market": {
2582
2771
  "2.0.0": {
2583
2772
  "sha256": "a5e21bb4f7c3c07f61842ee14cadcef44a35408db0ae2cd29e62dff39a59d4c2",
@@ -2880,6 +3069,18 @@
2880
3069
  "license": "MIT"
2881
3070
  }
2882
3071
  },
3072
+ "sampling": {
3073
+ "2.0.0": {
3074
+ "sha256": "c45be3629eb58c430def3ea290f7a29df464e8e057fe09039c71bcb256a7e862",
3075
+ "kind": "element",
3076
+ "tag": "m-sampling",
3077
+ "requires": {
3078
+ "base": "1.1.0",
3079
+ "plot": "1.1.1"
3080
+ },
3081
+ "license": "MIT"
3082
+ }
3083
+ },
2883
3084
  "scatter": {
2884
3085
  "2.0.0": {
2885
3086
  "sha256": "61912b8301256cdff038c992298b0800577e37e7a6c8b2308000e5c601cc8aee",
@@ -125,6 +125,11 @@ export const MESSAGES = {
125
125
  linkCount: { ja: (a) => `スライドへのリンク:${a.ok} 本(ほかのファイルへ ${a.other} 本)`, en: (a) => `links to slides: ${a.ok} (to other files: ${a.other})` },
126
126
  // ---------------------------------------------------------------- 参照音声(AI 音声が声をまねる元の録音。format spec §5 の recipe。kit/core/ref-voice.mjs)
127
127
  // where:slides(スライドが使う:エクスポートが断る)・audio(audio/manifest.json の段階の音声:入れない)・attachments(添付:入れない)・folder(作業フォルダのほかの所)
128
+ // 音声が古い段階(K。format spec §5.4)。v0.6.8 までは code が言葉そのもの('audio: stale — …')だった。言葉は変えない(日本語だけ)
129
+ audioStale: {
130
+ ja: (a) => `audio: stale — 段階 ${a.k} の音声は今の口述原稿から作ったものではない(${a.kind === 'recorded' ? '録音' : a.kind === 'imported' ? '取り込み' : 'TTS'}。編集アプリの「音声」で録り直すか、tts/synth.py で作り直す)`,
131
+ en: (a) => `audio: stale — 段階 ${a.k} の音声は今の口述原稿から作ったものではない(${a.kind === 'recorded' ? '録音' : a.kind === 'imported' ? '取り込み' : 'TTS'}。編集アプリの「音声」で録り直すか、tts/synth.py で作り直す)`,
132
+ },
128
133
  refVoice: {
129
134
  ja: (a) => `参照音声「${a.path}」(voice.json の声の元の録音)が${{ slides: 'スライドで使われている:教材には参照音声を入れないので、Egatari ファイル(.ega.html)へのエクスポートは断る。スライドから外す', audio: ' audio/manifest.json で段階の音声になっている:Egatari ファイル(.ega.html)には入れない(その段階は音声なし)。その声で作った音声に替える', attachments: '添付の場所(attachments/)にある:Egatari ファイル(.ega.html)には入れない', folder: '作業フォルダの中にある:Egatari ファイル(.ega.html)には入れないが、作業フォルダごと人に渡すと一緒に渡る' }[a.where]}。録音は作業フォルダの外に置き、voice.json にはその場所か名前を書く(教材には、その声で作った音声だけが入る)`,
130
135
  en: (a) => `the reference voice “${a.path}” (the recording a voice in voice.json imitates) ${{ slides: 'is used by the slides: a lesson does not carry reference voices, so export to an Egatari file (.ega.html) is refused. Remove it from the slides', audio: 'is a step\'s audio in audio/manifest.json: it is left out of the Egatari file (.ega.html) and that step has no audio. Replace it with audio made with the voice', attachments: 'is in the attachments folder (attachments/): it is left out of the Egatari file (.ega.html)', folder: 'is inside the working folder: it is left out of the Egatari file (.ega.html), but goes along if you share the whole working folder' }[a.where]}. Keep the recording outside the working folder and give its location or name in voice.json (a lesson carries only the audio made with the voice)`,
package/kit/check.mjs CHANGED
@@ -45,7 +45,7 @@ import { excludedReason } from './core/portable.mjs';
45
45
  import { FORMAT } from './core/format.mjs';
46
46
  import { planAttachments, inspectAttachment, ATTACH_LIMITS } from './core/attachments.mjs';
47
47
  import { normalizeKey, noteProblems } from './narration.mjs';
48
- import { readingProblems, orphanSteps, orphanDetail, formulaLike, narrationLang, textLang } from './core/narration-lint.mjs';
48
+ import { readingProblems, orphanSteps, orphanDetail, formulaLike, formulaText, narrationLang, textLang } from './core/narration-lint.mjs';
49
49
  import { cleanErrorText, componentError } from './core/error-text.mjs';
50
50
  import { partReportFinding, message, where, ruleOf } from './check-messages.mjs';
51
51
  import { readRegular, readHead, READ_LIMITS } from './bounded-read.mjs';
@@ -68,6 +68,15 @@ if (!arg0) {
68
68
  console.error('usage: node kit/check.mjs <deck.html | working folder> [--theme name] [--lang ja|en] [--json]');
69
69
  process.exit(1);
70
70
  }
71
+ // 組み立てた後の 1 ファイル(.ega.html)は原稿ではない:デッキとして読むと、はみ出し・台本なし・重なりを誤って出す。断る(終了コード 2:
72
+ // 「エラー 0」でも「指摘あり」でもない、検査していない)。中に入った原稿を取り出して検査するのは v0.6.10
73
+ if (/\.ega\.html?$/i.test(arg0)) {
74
+ const ja = '.ega.html は組み立てた後のファイルです。品質チェックは原稿(フォルダか deck.html)にかけてください';
75
+ const en = '.ega.html is a built file. Run the quality check on the source instead (the working folder or deck.html)';
76
+ console.error(`check: ${langArg === 'en' ? en : langArg === 'ja' ? ja : ja + '\n ' + en}`);
77
+ if (asJson) console.log(JSON.stringify({ ok: false, status: 'refused', reason: 'egaFile', lang: langArg === 'en' ? 'en' : 'ja', counts: { error: 0, warn: 0, info: 0 }, results: [] }, null, 2));
78
+ process.exit(2);
79
+ }
71
80
  // 作業フォルダを渡したら、その中の deck.html(組み立てと同じ。フォルダは「通常のファイルでない」と紛らわしく断られていた)
72
81
  let src;
73
82
  try { src = resolveDeckArg(arg0); } catch (e) { console.error(`check: ${e.message}`); process.exit(1); }
@@ -193,7 +202,7 @@ if (extraMissing.length) report(null, 'error', 'fontsExtraMissing', { fonts: ext
193
202
  const sj = e && typeof e === 'object' && !('inputHash' in e) && /^[0-9a-f]{1,64}$/.test(String(e.digest || '')) ? readJson(path.join('audio', `seg_${e.digest}.json`)) : null;
194
203
  if ((await audioState(e, seg, sj)) === 'stale') {
195
204
  const i = slideOf.has(seg.slideKey) ? slideOf.get(seg.slideKey) : null;
196
- report(i, 'warn', `audio: stale — 段階 ${k} の音声は今の口述原稿から作ったものではない(${e && e.kind === 'recorded' ? '録音' : e && e.kind === 'imported' ? '取り込み' : 'TTS'}。編集アプリの「音声」で録り直すか、tts/synth.py で作り直す)`);
205
+ report(i, 'warn', 'audioStale', { k, kind: e && e.kind === 'recorded' ? 'recorded' : e && e.kind === 'imported' ? 'imported' : 'tts' });
197
206
  }
198
207
  }
199
208
  }
@@ -527,12 +536,17 @@ if (isJapanese(NL.lang) !== JA) report(null, 'info', 'narrLang', { lang: NL.lang
527
536
  // 部品のデータが合わず描けないスライド(compData):その部品の段階は 0 になり、段階の数がデータと合わない。そこで数えた口述原稿の抜け・余り
528
537
  // (narrMissing・narrOrphan)は出さない(修正依頼が正しい口述原稿を消させないように)。代わりに、データを直した後に確かめ直すと 1 行で知らせる
529
538
  for (const [i, comps] of badComps) if (i !== null && i !== undefined && meta[i]) report(i, 'info', 'narrRecheck', { comps: [...new Set(comps)] });
539
+ // 式の検査は元の文字列から(1 つの記号の読みは読みのほうで見る。narration-lint.mjs の formulaText)
540
+ const RAW_TURNS = new Map();
541
+ for (const seg of built.segs || []) RAW_TURNS.set(`${seg.slideKey}\u0000${seg.stepKey}`, seg.turns.map((t) => t.raw));
530
542
  for (const { i, stepKey, turns } of narrInfo) {
531
543
  if (badComps.has(i)) continue;
532
544
  if (turns.length === 0) { report(i, 'warn', 'narrMissing', { step: stepKey }, stepKey); continue; }
533
- for (const t of turns) {
545
+ const raws = RAW_TURNS.get(`${meta[i]?.key}\u0000${stepKey}`);
546
+ for (const [ti, t] of turns.entries()) {
534
547
  const tl = textLang(t.text, NL.lang);
535
- if (formulaLike(t.text, tl)) report(i, 'warn', 'narrFormula', { t: t.text.slice(0, 40) }, stepKey);
548
+ const ft = raws && raws.length === turns.length && raws[ti] != null ? formulaText(raws[ti]) : t.text;
549
+ if (formulaLike(ft, tl)) report(i, 'warn', 'narrFormula', { t: t.text.slice(0, 40) }, stepKey);
536
550
  if (tl === 'ja' && t.text.length > 200) report(i, 'info', 'turnLong', { n: t.text.length, unit: '字' }, stepKey);
537
551
  const words = t.text.trim().split(/\s+/).length;
538
552
  if (tl !== 'ja' && words > 60) report(i, 'info', 'turnLong', { n: words, unit: '語' }, stepKey);
@@ -0,0 +1,62 @@
1
+ // 品質チェックのコマンド版(kit/check.mjs)と編集アプリ(app/frame-shim.js・app/main.js・app/llm.js)の揃え方。tools/test-check-parity.mjs が使う
2
+ // コマンド版が出す code は、ここの CLI_ONLY にない限り、同じ教材で編集アプリも出す(v0.6.9:rawMath がコマンド版だけにあり、
3
+ // 規格の担当の評価は通るのに、Studio の利用者には見えず修正依頼にも入らなかった)。Node にもブラウザにも依存しない
4
+ // IN_EDITOR 編集アプリの品質チェックがコマンド版と同じ名前で出す code(kit/check-messages.mjs の MESSAGES のキー)
5
+ // CLI_ONLY コマンド版だけの code → そのわけ(1 行)。前方一致の印は CLI_ONLY_PREFIX
6
+ // MESSAGES のキーは、IN_EDITOR・CLI_ONLY(と CLI_ONLY_PREFIX)・EDITOR_ALIAS と BUILD_WARN の行き先の、ちょうど 1 つに入る(tools/test-check-parity.mjs の 0.)。
7
+ // 新しい code を足したら、どれかに入れないと試験が落ちる(v0.6.9:rawMath がどこにも入らないまま、コマンド版だけにあった)
8
+ // EDITOR_ALIAS 編集アプリが前からの名前で出す code → コマンド版の code
9
+ // BUILD_WARN 編集アプリが品質チェックの板の「組み立ての警告」(S.warn)に出すもの:コマンド版の code → その警告の行の形
10
+ // cliOnly(code) わけ(CLI_ONLY か CLI_ONLY_PREFIX)か null
11
+ export const IN_EDITOR = Object.freeze([
12
+ // 原稿の文字列から(kit/core/check-source.mjs)
13
+ 'slideId', 'legacyDataKey', 'legacyIndex', 'legacyColorClass', 'legacyStepAttr', 'legacyLectureMode', 'colorOutside', 'narrHeadingDiffers',
14
+ 'narrNote', 'narrFormula', 'turnLong', 'narrLang',
15
+ // app/main.js・app/llm.js(作業場所の原稿と台本から)
16
+ 'refVoice', 'audioStale', 'narrPlaceholder', 'templateText', 'readingExpr', 'readingSeveral',
17
+ // 体裁の検査(kit/core/layout-scan.mjs。bodyBottom・bodyRight は EDITOR_ALIAS)
18
+ 'titleLong', 'titleLongEn', 'titleColon', 'tateTitle', 'conclLong', 'conclLongEn', 'conclOverflow', 'tateBodyHead', 'bodyConclCol', 'bodyLeft',
19
+ 'smallText', 'smallSvgText', 'textClipped', 'svgTextOut', 'svgTextBox', 'outsideBody', 'textOffSlide', 'textOverlap', 'cellWordBreak',
20
+ 'secHeading', 'textContrast', 'cardsHint',
21
+ // プレビューの中(app/frame-shim.js)
22
+ 'themeMetricsDrift', 'metricsFontLoad', 'fontNotEmbedded', 'desuMasu', 'rawMath', 'katexError', 'punctMixed', 'narrRecheck',
23
+ 'linkEmpty', 'linkUnknown', 'linkNumberRange', 'linkNoConcl', 'linkStepRange', 'linkBadStep', 'linkNumber', 'linkNoId', 'linkCount',
24
+ 'markMissing', 'morphNoSrc', 'morphNoIds', 'morphPairs', 'morphLater', 'morphDupSrc', 'morphDupDst', 'imgAlt', 'svgName', 'compName',
25
+ 'compLayout', 'compReport', 'compData', 'consoleError',
26
+ ]);
27
+ export const CLI_ONLY = Object.freeze({
28
+ balance: 'needs screenshots: it rasterizes the slide body to find the centre of mass (kit/fill-scan.mjs)',
29
+ compOrder: 'needs screenshots: reopens the deck and compares renders of every component step in two orders (slow)',
30
+ compOrderDetail: 'detail line of compOrder (screenshots)',
31
+ compOrderNoise: 'detail line of compOrder (screenshots)',
32
+ step0: 'info listing of what each slide shows at step 0, for reviewers; not a problem to fix',
33
+ palette: 'info listing of the colour roles; the contrast findings themselves run in the editor (contrast)',
34
+ marks: 'info listing of the marks per step; markMissing runs in the editor',
35
+ timelineTotal: 'info listing of the deck length; not a problem to fix',
36
+ slideLength: 'info listing of the slide lengths; not a problem to fix',
37
+ fontNotCovered: 'info; measured on the subset fonts of the command-line build (the editor preview is not subset; saving warns with font-fallback)',
38
+ linkFileMissing: 'needs the filesystem: checks that a linked file exists next to the deck',
39
+ fontsExtraMissing: 'needs the @egatari/fonts-extra npm package on disk; the editor bundles its fonts',
40
+ extensionVersion: 'info; reads extension versions from egatari.json on disk',
41
+ 'component-requires-missing': 'the build stops; the editor shows the same message as a build error',
42
+ 'component-not-in-catalogue': 'the build stops; the editor shows the same message (catalogueMessage) as a build error',
43
+ });
44
+ // 添付(attachments/):編集アプリは「添付」の板とエクスポートで同じ決まり(kit/core/attachments.mjs)を見る。中身を全部読むので品質チェックには入れない。
45
+ // 本(article):編集アプリは本の板(app/book.js)で同じ検査(kit/core/article.mjs の validateArticle)を見る
46
+ export const CLI_ONLY_PREFIX = Object.freeze({
47
+ attach: 'needs the attachments/ folder on disk; the editor checks attachments in its Attachments panel and on export (same rules)',
48
+ article: 'the editor validates the book in its Book panel (app/book.js, same validateArticle)',
49
+ });
50
+ export const EDITOR_ALIAS = Object.freeze({
51
+ overflowBottom: 'bodyBottom', overflowRight: 'bodyRight',
52
+ noNarration: 'narrMissing', orphanNarration: 'narrOrphan', contrast: 'contrastLow',
53
+ });
54
+ export const BUILD_WARN = Object.freeze({
55
+ build: /^(?!theme-metrics: |mark: 目印|slide key: )/,
56
+ themeMetricsInvalid: /^theme-metrics: /,
57
+ });
58
+ export function cliOnly(code) {
59
+ if (Object.hasOwn(CLI_ONLY, code)) return CLI_ONLY[code];
60
+ for (const [p, why] of Object.entries(CLI_ONLY_PREFIX)) if (code.startsWith(p) && code.length > p.length && /[A-Z]/.test(code[p.length])) return why;
61
+ return null;
62
+ }