egatari 0.6.10 → 0.6.11-rc.1

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 (124) hide show
  1. package/README.ja.md +22 -22
  2. package/README.md +1 -1
  3. package/bin/egatari.mjs +1 -1
  4. package/components.lock.json +288 -144
  5. package/components2.lock.json +657 -1
  6. package/kit/build.mjs +3 -2
  7. package/kit/check-messages.mjs +46 -12
  8. package/kit/check.mjs +54 -19
  9. package/kit/core/article-messages.mjs +5 -4
  10. package/kit/core/attachments.mjs +2 -1
  11. package/kit/core/build-core.mjs +2 -1
  12. package/kit/core/check-parity.mjs +3 -1
  13. package/kit/core/check-result.mjs +2 -1
  14. package/kit/core/check-rules.mjs +132 -0
  15. package/kit/core/colab-core.mjs +2 -2
  16. package/kit/core/geometry-check.mjs +302 -0
  17. package/kit/core/layout-scan.mjs +9 -2
  18. package/kit/core/live-results.mjs +1 -1
  19. package/kit/core/llm-fix.mjs +3 -2
  20. package/kit/core/llm-outline.mjs +3 -2
  21. package/kit/core/llm-pack-data.mjs +114 -114
  22. package/kit/core/narration-lint.mjs +37 -0
  23. package/kit/core/new-deck-pack.mjs +2 -1
  24. package/kit/core/new-deck.mjs +1 -1
  25. package/kit/core/plural.mjs +5 -0
  26. package/kit/core/portable.mjs +6 -5
  27. package/kit/core/sample-layout.mjs +14 -0
  28. package/kit/core/text-band.mjs +37 -0
  29. package/kit/core/tier-a.mjs +2 -1
  30. package/kit/instruction-version.json +1 -1
  31. package/kit/player.json +1 -1
  32. package/kit/player.lock.json +2 -2
  33. package/kit/render-compare.mjs +5 -4
  34. package/kit/tools.js +2 -2
  35. package/package.json +3 -2
  36. package/server/editor-ui.js +2 -2
  37. package/vendor/components/CATALOG.md +12 -12
  38. package/vendor/components/sha256/00d9072cb279a1a68166787f53395c747072388971d916c082a106844dbf888f/index.js +315 -0
  39. package/vendor/components/sha256/03e20fb6803de0d94e93de7c01d7d00cede57b0b2604b449daa4cb156367500d/README.en.md +23 -0
  40. package/vendor/components/sha256/03e20fb6803de0d94e93de7c01d7d00cede57b0b2604b449daa4cb156367500d/index.js +289 -0
  41. package/vendor/components/sha256/0e5458deb63e32aefdbf8722fa156fd44cd90d5d8f9d6a25a636007b4b599450/README.en.md +40 -0
  42. package/vendor/components/sha256/0e5458deb63e32aefdbf8722fa156fd44cd90d5d8f9d6a25a636007b4b599450/index.js +341 -0
  43. package/vendor/components/sha256/1073e03374f0fe65d2691f160bfd8c092986c168d0bd6a6094ebd444d4b89c27/index.js +592 -0
  44. package/vendor/components/sha256/12b1b32eb3a75e9f11eff407b7876473674ae996d7ce276e2ab6ffaf41ad4376/README.en.md +48 -0
  45. package/vendor/components/sha256/12b1b32eb3a75e9f11eff407b7876473674ae996d7ce276e2ab6ffaf41ad4376/index.js +384 -0
  46. package/vendor/components/sha256/147987bd84722249dab609293d4fafa93f0a2aac25b8517fda1710840b575d00/index.js +341 -0
  47. package/vendor/components/sha256/170e9072285213a2b4e79d7c2e4ddb882d1501e60b5da63c59b1679643163005/README.en.md +23 -0
  48. package/vendor/components/sha256/170e9072285213a2b4e79d7c2e4ddb882d1501e60b5da63c59b1679643163005/index.js +120 -0
  49. package/vendor/components/sha256/17da8ef5ce58354df54ebb52c8a9b0726e69d06ac28cc8e78f807ec338002782/README.en.md +32 -0
  50. package/vendor/components/sha256/17da8ef5ce58354df54ebb52c8a9b0726e69d06ac28cc8e78f807ec338002782/index.js +222 -0
  51. package/vendor/components/sha256/1b30dfd9b366ff07556024eb8ce75cca2eac8001fa392eed4e1232047001ec74/index.js +404 -0
  52. package/vendor/components/sha256/37846655693f8dd869d11d3d4cddb43be57f848037d0e49564b2250401448ab5/README.en.md +66 -0
  53. package/vendor/components/sha256/37846655693f8dd869d11d3d4cddb43be57f848037d0e49564b2250401448ab5/index.js +920 -0
  54. package/vendor/components/sha256/3fdd15756f779a16362dd854f143ca4343154059882d88d44adf64745c7876e3/README.en.md +50 -0
  55. package/vendor/components/sha256/3fdd15756f779a16362dd854f143ca4343154059882d88d44adf64745c7876e3/index.js +171 -0
  56. package/vendor/components/sha256/435c3f8e0c0abc123866e57ae2c7f3409e19d14a2eb67b1fde84c4da5d95f14c/README.en.md +31 -0
  57. package/vendor/components/sha256/435c3f8e0c0abc123866e57ae2c7f3409e19d14a2eb67b1fde84c4da5d95f14c/index.js +232 -0
  58. package/vendor/components/sha256/43740da51de85c1b7ec1eaf688f93fd9ea25b15977ab075e6abac196f08643a6/index.js +122 -0
  59. package/vendor/components/sha256/4817f77bd021ec5c77d5a15ee56e2e34d31d1d98630e86225eb20f2f9bf095e9/index.js +812 -0
  60. package/vendor/components/sha256/4e4bf3b2968c36a334dc997e32e36f22ecbc4f5dfe1c76bb7a5beef002fe8899/index.js +228 -0
  61. package/vendor/components/sha256/553e132d1f84caad648bb7175a206d4c5d18c005b5ca17989f5e8a5e3f5cdfa1/index.js +75 -0
  62. package/vendor/components/sha256/5b02d8a81a41f4d1658f1972f3fc91de3cc431b2c71bb6b92601d58f734de9ec/README.en.md +34 -0
  63. package/vendor/components/sha256/5b02d8a81a41f4d1658f1972f3fc91de3cc431b2c71bb6b92601d58f734de9ec/index.js +244 -0
  64. package/vendor/components/sha256/5c72414df5a948a7cbb882be1e5bdd4113d188e357d4a0f01fabda15781417eb/LICENSE-tabler.txt +21 -0
  65. package/vendor/components/sha256/5c72414df5a948a7cbb882be1e5bdd4113d188e357d4a0f01fabda15781417eb/index.js +4868 -0
  66. package/vendor/components/sha256/5c72414df5a948a7cbb882be1e5bdd4113d188e357d4a0f01fabda15781417eb/names.txt +4808 -0
  67. package/vendor/components/sha256/636f47e955f5550f046cfc7a3de8de70c4b97aa77771bde2ee0e31d706bb032e/index.js +278 -0
  68. package/vendor/components/sha256/65ddc34bd9c75e073f4c2cd283369417fe88769521809670c6b8730852d4f647/index.js +97 -0
  69. package/vendor/components/sha256/6b0c75b0f697fe451197301de82a113f1c2548b67f7a8d2b56576d2bae8e240c/index.js +607 -0
  70. package/vendor/components/sha256/6cdf432d3e61be3ff15e80910369324ac7ea0e8b9f62c32ef37bf09a5bfe93b9/README.en.md +33 -0
  71. package/vendor/components/sha256/6cdf432d3e61be3ff15e80910369324ac7ea0e8b9f62c32ef37bf09a5bfe93b9/index.js +390 -0
  72. package/vendor/components/sha256/6d648d0e5c96ec680c04a14b7c3d672010d3b9f101197689e9672ec00174383d/README.en.md +31 -0
  73. package/vendor/components/sha256/6d648d0e5c96ec680c04a14b7c3d672010d3b9f101197689e9672ec00174383d/index.js +267 -0
  74. package/vendor/components/sha256/71208afc5c8ea1ed6d2180f46de7385e43990cfb046ba350eefb917eca5d92fe/README.en.md +22 -0
  75. package/vendor/components/sha256/71208afc5c8ea1ed6d2180f46de7385e43990cfb046ba350eefb917eca5d92fe/index.js +145 -0
  76. package/vendor/components/sha256/7552a029f30f9c2f2ec8c5af4f144b63eeffc9172b53e35a925821f69a738b64/README.en.md +44 -0
  77. package/vendor/components/sha256/7552a029f30f9c2f2ec8c5af4f144b63eeffc9172b53e35a925821f69a738b64/index.js +203 -0
  78. package/vendor/components/sha256/781a45d97f1325cfb40aa98d00e1db9600949158fdb2749b0223b019c67a80f2/index.js +919 -0
  79. package/vendor/components/sha256/850944419734168be3dc202057de128131869c471cb8ab3baec2cfe789d56493/index.js +465 -0
  80. package/vendor/components/sha256/863d4d42075fbae1084089730f10da943c88d3e3e655235f28c24b9a3cf95c88/README.en.md +37 -0
  81. package/vendor/components/sha256/863d4d42075fbae1084089730f10da943c88d3e3e655235f28c24b9a3cf95c88/index.js +424 -0
  82. package/vendor/components/sha256/8a892d25d0bb6105ba31ea690b465876ce3af1fbaf18e2a9ce44ad2fee81260e/index.js +162 -0
  83. package/vendor/components/sha256/8acec8f299510287fbad6a69311ec58a39b0e99647dd03609c818e053b3b6087/index.js +484 -0
  84. package/vendor/components/sha256/8ef66bd1e800bcbedef436585469d308665aaa1ab6011aee699544302d0a8ad0/index.js +312 -0
  85. package/vendor/components/sha256/8fa5ed6ab12a27542e077ff965bea626ff9450b330609304dc1148fc8dbb68b0/README.en.md +40 -0
  86. package/vendor/components/sha256/8fa5ed6ab12a27542e077ff965bea626ff9450b330609304dc1148fc8dbb68b0/index.js +348 -0
  87. package/vendor/components/sha256/a0c71874d83045baaef70285bd00d87a7c6c43219fa5630dfff60d5cb08509be/index.js +250 -0
  88. package/vendor/components/sha256/a31f39625d7d1087d06a72b644cec417372f98add940288257ef07f812d8395a/index.js +747 -0
  89. package/vendor/components/sha256/ae04a57be4a26b7443796a93c58adcf1cbcf746120eba619bf9c2bcdce53c640/README.en.md +38 -0
  90. package/vendor/components/sha256/ae04a57be4a26b7443796a93c58adcf1cbcf746120eba619bf9c2bcdce53c640/index.js +289 -0
  91. package/vendor/components/sha256/ae06622a328da2a01260bc68b28bb632c391e8d62a4e8387638e5a944525a418/index.js +521 -0
  92. package/vendor/components/sha256/b490139e9afa84164054738532d5ec4985bf071e40791d903012fe3b850bae43/README.en.md +24 -0
  93. package/vendor/components/sha256/b490139e9afa84164054738532d5ec4985bf071e40791d903012fe3b850bae43/index.js +103 -0
  94. package/vendor/components/sha256/b756c66d5c6e6ace90912ab467dea3031f2c9b291d8b2a786ca660faa0e8ac84/index.js +121 -0
  95. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/ABCJS-ADAPTER.md +101 -0
  96. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/LICENSE-abcjs.txt +21 -0
  97. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/chords.json +89 -0
  98. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/doremi.json +261 -0
  99. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/extras.json +192 -0
  100. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/kaeru.json +521 -0
  101. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/rhythm.json +248 -0
  102. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/fixtures/ties.json +360 -0
  103. package/vendor/components/sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/index.js +508 -0
  104. package/vendor/components/sha256/bea7cb344f55677d5756c9711b90cc971126830ec5f66a03f71f13dbfadc401e/index.js +351 -0
  105. package/vendor/components/sha256/c08b25a2f7be68c36634cdee180aa617fd018d80b7ddf2a484a2edb4acffdbe0/README.en.md +42 -0
  106. package/vendor/components/sha256/c08b25a2f7be68c36634cdee180aa617fd018d80b7ddf2a484a2edb4acffdbe0/index.js +268 -0
  107. package/vendor/components/sha256/cbe8bb4b2fd0845a9333bc2064d86758ea6465992ad86a99167ba17f57f3e382/README.en.md +51 -0
  108. package/vendor/components/sha256/cbe8bb4b2fd0845a9333bc2064d86758ea6465992ad86a99167ba17f57f3e382/index.js +228 -0
  109. package/vendor/components/sha256/d2df3d70fc7c6e07e3cad7332a7e5501e84abeb24653786e567f57046adebcba/index.js +268 -0
  110. package/vendor/components/sha256/d386f2b94cd9fbed765ad301aa7009228599edb2859efe7f37a98d7aaa44b9bb/README.en.md +35 -0
  111. package/vendor/components/sha256/d386f2b94cd9fbed765ad301aa7009228599edb2859efe7f37a98d7aaa44b9bb/index.js +179 -0
  112. package/vendor/components/sha256/e6d219f67d241fdf00a40d4cec261d9dd3c09ad3110d3418d4e843d0f2b8c196/index.js +429 -0
  113. package/vendor/components/sha256/ef60e6c089f5f6e909f439af8fc0c9c0a2d7a1aafad5e65be6328ba993b990a0/index.js +354 -0
  114. package/vendor/components/sha256/f6f47601c90f0195353e94b76d57499591d6330a7e35714958a2c41229f70da2/index.js +198 -0
  115. package/vendor/components/sha256/f9159c87fa998487787f738fdfab52aa2483f52f170fc258840b127f6ed06051/README.en.md +44 -0
  116. package/vendor/components/sha256/f9159c87fa998487787f738fdfab52aa2483f52f170fc258840b127f6ed06051/index.js +304 -0
  117. package/vendor/components/sha256/fb482cbe2ca1da07d08f41880e03fe75ff3f1d29842ff40946541e63030219b8/README.en.md +42 -0
  118. package/vendor/components/sha256/fb482cbe2ca1da07d08f41880e03fe75ff3f1d29842ff40946541e63030219b8/index.js +481 -0
  119. package/vendor/components/sha256/fdcea28e27638d8bfe234016672375e14de8bb97c32f7b6840d1b7b10ac4b1cd/index.js +233 -0
  120. package/vendor/components/sha256/ff5eaa083a46db6aefc13d97b27c9487f9fc318805f5c89b05a12e63703b7a72/LICENSE-strokesvg.txt +115 -0
  121. package/vendor/components/sha256/ff5eaa083a46db6aefc13d97b27c9487f9fc318805f5c89b05a12e63703b7a72/OFL.txt +93 -0
  122. package/vendor/components/sha256/ff5eaa083a46db6aefc13d97b27c9487f9fc318805f5c89b05a12e63703b7a72/index.js +749 -0
  123. package/vendor/components/sha256/ff5eaa083a46db6aefc13d97b27c9487f9fc318805f5c89b05a12e63703b7a72/strokes-CHANGES.md +20 -0
  124. package/vendor/components-2/manifest-2.7.0.json +2118 -0
@@ -6,6 +6,10 @@
6
6
  // ({Q*|キュースター}、{x′|エックスプライム}、{x_0|…}、{x^2|…}、{θ̂|シータハット}、{\hat{\theta}|…}、{\theta|シータ})。
7
7
  // x に演算子(= + − × / < > ^ _ \ など、数字や記号の隣の -)があれば 'operator'(式を読み上げている)、
8
8
  // 記号が 2 つ以上(θとη、a, b、x y)なら 'several'。f(x) の形(記号の後ろに括弧で 1 つ)は 1 つとみなす
9
+ // readingGaps(segs) 台本の全体で、読みを付けた語が読みなしで出てくる所(backlog #203)→ [{slideKey, stepKey, line, t, reading, first}]
10
+ // 読みは出てくる所ごとに当たる(プレーヤーは yomi.yaml を使わない)。1 か所に {下人|げにん} と付けても、ほかの「下人」は TTS が「したひと」と読みうる。
11
+ // 1 つの語に読みが 1 つだけのときに限る(読みが 2 つ以上なら文脈で変わる語)。漢字・かなの 1 字は文脈で読みが変わるので見ない。
12
+ // 英字・数字・ギリシャ文字で始まるか終わる語は、語の途中の一致を数えない(x と max)。式(演算子のある語)と $…$ の中は見ない。段階ごとに 1 語 1 回
9
13
  // stepKeysOf({max, cstep, static}) 段階の鍵の集まり(kit/deck.js の stepKey と同じ:cstep の段階は concl)
10
14
  // orphanSteps(segs, slides) narration.md の段階のうち、スライドにないもの → [{slideKey, stepKey, line, valid}]
11
15
  // slides:[{key, max, cstep, static}](組んだデッキの DECK.slides の _key・_max・_cstep)。どのスライドにも合わない節は build が知らせる
@@ -57,6 +61,39 @@ export function readingProblems(raw) {
57
61
  return out;
58
62
  }
59
63
 
64
+ export function readingGaps(segs) {
65
+ const read = new Map(); // 語 → {readings, first(最初に読みを付けた段階の行)}
66
+ for (const seg of segs) for (const t of seg.turns) for (const m of stripNotes(t.raw).matchAll(READING)) {
67
+ const d = m[1].trim(), r = m[2].trim();
68
+ if (/^(mark:|cue$)/.test(d)) continue;
69
+ if (!read.has(d)) read.set(d, { readings: new Set(), first: seg.line });
70
+ read.get(d).readings.add(r);
71
+ }
72
+ const EDGE = /[A-Za-z0-9\u0370-\u03FF]/;
73
+ const esc = (x) => x.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
74
+ const terms = [...read].filter(([d, v]) => v.readings.size === 1 && !OPS.test(bare(d)) && !([...d].length < 2 && !EDGE.test(d)))
75
+ .sort((a, b) => b[0].length - a[0].length) // 長い語から(「下人」を見た後の「人」の二重を避ける)
76
+ .map(([d, v]) => ({ d, reading: [...v.readings][0], first: v.first,
77
+ re: new RegExp(`${EDGE.test(d[0]) ? '(?<![A-Za-z0-9_\\u0370-\\u03FF])' : ''}${esc(d)}${EDGE.test(d[d.length - 1]) ? '(?![A-Za-z0-9_\\u0370-\\u03FF])' : ''}`, 'g') }));
78
+ const out = [];
79
+ if (!terms.length) return out;
80
+ for (const seg of segs) {
81
+ const seen = new Set();
82
+ for (const t of seg.turns) {
83
+ let text = stripNotes(String(t.raw)).replace(/\$[^$]*\$/g, ' ').replace(READING, ' ').replace(/\{cue\}/g, ' ');
84
+ for (const x of terms) {
85
+ x.re.lastIndex = 0;
86
+ if (!x.re.test(text)) continue;
87
+ text = text.replace(x.re, ' ');
88
+ if (seen.has(x.d)) continue;
89
+ seen.add(x.d);
90
+ out.push({ slideKey: seg.slideKey, stepKey: seg.stepKey, line: seg.line, t: x.d, reading: x.reading, first: x.first });
91
+ }
92
+ }
93
+ }
94
+ return out;
95
+ }
96
+
60
97
  export function stepKeysOf(s) {
61
98
  const keys = new Set();
62
99
  const max = s.static ? 0 : s.max;
@@ -21,6 +21,7 @@ import { partsPackOpts, fitPack, fitSample, packSize, fitSize } from './llm-pack
21
21
  import { sampleStructureRequest, validateSample } from './sample-info.mjs';
22
22
  import { outlineRequest, slideCountOf, OUTLINE_OVER } from './llm-outline.mjs';
23
23
  import { CHOOSABLE } from './themes-list.mjs';
24
+ import { plural } from './plural.mjs';
24
25
 
25
26
  export const REQUEST_WORDS = Object.freeze({
26
27
  ja: {
@@ -33,7 +34,7 @@ export const REQUEST_WORDS = Object.freeze({
33
34
  sampleBook: '- 本:サンプルには本(読むための本文)もありますが、本は Claude Code で作ります。ここではスライドと台本だけを作ってください',
34
35
  },
35
36
  en: {
36
- lengthReq: (n, u) => (u === 'min' ? `${n} minutes` : `${n} slides`),
37
+ lengthReq: (n, u) => (u === 'min' ? `${n} ${plural(n, 'minute')}` : `${n} ${plural(n, 'slide')}`),
37
38
  langReq: { ja: 'Japanese', en: 'English' },
38
39
  speakersReq: { 1: 'one narrator', 2: 'two (an Expert and Novice dialogue)' },
39
40
  themeLine: (t) => `- Theme: ${t} (<html data-theme="${t}">)`,
@@ -101,7 +101,7 @@ export const SET_LABELS = [
101
101
  { set: 'english', label: { ja: '英語', en: 'English (foreign language)' }, inside: { ja: '英文の構造(S V O C M・句と節)', en: 'Sentence structure (S V O C M, phrases, clauses)' } },
102
102
  { set: 'music', label: { ja: '音楽', en: 'Music' }, inside: { ja: '鍵盤・楽譜(音階・和音)', en: 'Keyboard and score (scales, chords)' } },
103
103
  { set: 'business', label: { ja: 'ビジネス', en: 'Business' }, inside: { ja: '市場規模の円・お金の流れ', en: 'Market size circles, money flows' } },
104
- { set: 'tools', label: { ja: '道具', en: 'Classroom tools' }, inside: { ja: 'タイマー', en: 'Timer' } },
104
+ { set: 'tools', label: { ja: 'ツール', en: 'Classroom tools' }, inside: { ja: 'タイマー', en: 'Timer' } },
105
105
  { set: 'science', label: { ja: '理科', en: 'Science' }, inside: { ja: '月の満ち欠け', en: 'Phases of the Moon' } },
106
106
  ];
107
107
 
@@ -0,0 +1,5 @@
1
+ // 英語の数え方:n が 1 なら単数、それ以外は複数(既定は one + 's'。不規則な複数は many に渡す)
2
+ // plural(1, 'error') → 'error' plural(2, 'error') → 'errors' plural(1, 'character') → 'character'
3
+ // 注意:kit/core/layout-scan.mjs・kit/core/geometry-check.mjs・app/frame-shim.js は文字列化してページに埋め込むので、
4
+ // ここを import せず三項演算子をその場に書く(埋め込み先はこのファイルを読めない)
5
+ export const plural = (n, one, many = one + 's') => (n === 1 ? one : many);
@@ -11,6 +11,7 @@
11
11
  //
12
12
  // 鍵で引く表はすべて原型のない object か Map(__proto__ などの鍵で取り違えない)
13
13
  import { boundedParse, PARSE_LIMITS } from './bounded-html.mjs';
14
+ import { plural } from './plural.mjs';
14
15
  import { codeReasons } from './code-scan.mjs';
15
16
  import { build as coreBuild, jsonScript, MIME, buildBudget, chargedEnv, BuildLimitError, DECK_META_RIGHTS, normalizeOffer, OFFER_MODES, OFFER_FACES } from './build-core.mjs';
16
17
  import { parseNarration } from './narration-core.mjs';
@@ -769,7 +770,7 @@ function exportIdsFor(env, deckDir, srcPath, inDeck, opts) {
769
770
  if (isObj(c) && isObj(c.articleLinks)) { const a = remap(c.articleLinks); if (a) patch.articleLinks = a; }
770
771
  if (Object.keys(patch).length) writes[CFG] = updateConfig(cfgText, patch);
771
772
  }
772
- if (x.added.length) warnings.push(`${LOG}: gave ${x.added.length} slide(s) an id (§8.1) and wrote them back to the working folder: ${x.added.map((a) => `${a.key} → ${a.id}`).join(', ')}`);
773
+ if (x.added.length) warnings.push(`${LOG}: gave ${x.added.length} ${plural(x.added.length, 'slide')} an id (§8.1) and wrote them back to the working folder: ${x.added.map((a) => `${a.key} → ${a.id}`).join(', ')}`);
773
774
  for (const o of x.orphans) warnings.push(`${LOG}: narration section "## ${o.key}" matches no slide; it was given the id ${o.id}`);
774
775
  // 確かめ:付けた後の原稿はどのスライドも id で、口述原稿のどの見出しも {#id}
775
776
  const deck = x.changed.deck ?? files.deck, narr = x.changed.narration ?? files.narration;
@@ -827,7 +828,7 @@ export async function exportPortable(env0, srcPath, opts = {}) {
827
828
  const ov = { ...env0, readText: (p, max) => { const o = overlay.get(P.resolve(p)); return o !== undefined ? o : env0.readText(p, max); } };
828
829
  const sw = AT.sectionIdWrites(ov, srcPath, opts.idRand ? { rand: opts.idRand } : {});
829
830
  for (const [rp, text] of Object.entries(sw.writes)) { overlay.set(P.resolve(deckDir, ...rp.split('/')), text); writes[rp] = text; }
830
- if (sw.added.length) warnings.push(`${LOG}: gave ${sw.added.length} article section(s) an id (§9C.3) and wrote them back to the working folder: ${sw.added.map((a) => `${a.file}:${a.line} ${a.id}`).join(', ')}`);
831
+ if (sw.added.length) warnings.push(`${LOG}: gave ${sw.added.length} article ${plural(sw.added.length, 'section')} an id (§9C.3) and wrote them back to the working folder: ${sw.added.map((a) => `${a.file}:${a.line} ${a.id}`).join(', ')}`);
831
832
  }
832
833
  // 組み立てが読んだファイルを記録する
833
834
  const reads = new Set();
@@ -906,12 +907,12 @@ export async function exportPortable(env0, srcPath, opts = {}) {
906
907
  if (art && art.L.index) {
907
908
  const ml = /^ja\b/i.test(lang0) ? 'ja' : 'en';
908
909
  const errs = art.problems.filter((x) => x.sev === 'error');
909
- if (errs.length) fail('article-invalid', `the article has ${errs.length} error(s) (§9C.8); fix them first (npm run check): ` + errs.slice(0, 8).map((x) => AT.articleMessage(ml, x)).join(' / '), errs);
910
+ if (errs.length) fail('article-invalid', `the article has ${errs.length} ${plural(errs.length, 'error')} (§9C.8); fix them first (npm run check): ` + errs.slice(0, 8).map((x) => AT.articleMessage(ml, x)).join(' / '), errs);
910
911
  for (const x of art.problems) if (x.sev === 'warn') warnings.push(`${LOG}: article: ${AT.articleMessage(ml, x)}`);
911
912
  for (const w of art.warnings) warnings.push(`${LOG}: article: ${w}`);
912
913
  art.links = await AT.articleLinkReport(art.L);
913
914
  for (const x of art.links.problems) warnings.push(`${LOG}: article: ${AT.articleMessage(ml, x)}`);
914
- if (art.links.removed.length) warnings.push(`${LOG}: article: dropped ${art.links.removed.length} link record(s) of pairs no longer linked (§9C.7): ${art.links.removed.map((x) => `${x.slide}↔${x.section}`).join(', ')}`);
915
+ if (art.links.removed.length) warnings.push(`${LOG}: article: dropped ${art.links.removed.length} link ${plural(art.links.removed.length, 'record')} of pairs no longer linked (§9C.7): ${art.links.removed.map((x) => `${x.slide}↔${x.section}`).join(', ')}`);
915
916
  } else art = null;
916
917
  }
917
918
 
@@ -1419,7 +1420,7 @@ export async function exportPortable(env0, srcPath, opts = {}) {
1419
1420
  if (typeof env0.articleSteps !== 'function') fail('article-unsupported', 'the article has step links, and this producer cannot check them in the player (§9C.8): export it with the CLI (npm run portable -- pack)');
1420
1421
  const res = await env0.articleSteps(html, links);
1421
1422
  const errs = AT.validateArticle(art.L.article, { ...art.L.ctx, resolveStep: AT.stepResolver(res) }).problems.filter((x) => x.code === 'articleStep');
1422
- if (errs.length) { const ml = /^ja\b/i.test(lang) ? 'ja' : 'en'; fail('article-invalid', `the article has ${errs.length} error(s) (§9C.8); fix them first (npm run check): ` + errs.slice(0, 8).map((x) => AT.articleMessage(ml, x)).join(' / '), errs); }
1423
+ if (errs.length) { const ml = /^ja\b/i.test(lang) ? 'ja' : 'en'; fail('article-invalid', `the article has ${errs.length} ${plural(errs.length, 'error')} (§9C.8); fix them first (npm run check): ` + errs.slice(0, 8).map((x) => AT.articleMessage(ml, x)).join(' / '), errs); }
1423
1424
  }
1424
1425
  }
1425
1426
  const size = utf8Length(html);
@@ -0,0 +1,14 @@
1
+ // はじめの画面のサンプルの、区分の中の並び(app/examples-gallery.js と tools/examples-sync.mjs が同じものを使う。Node にもブラウザにも依存しない)
2
+ // 小見出しのある区分(groups)で、サンプルが minLessons 以上なら小見出しの順。小見出しの中は教科(subjects)の順、それから一覧の順。
3
+ // 決まりは egatari.org の src/gallery/lessons.json の grouping と同じ(作者 11/12、handoff/samples-gallery-plan.md の最後の節)
4
+ // sectionLayout({sections, subjects, grouping, examples}, sectionId) → [{group: {id, title} | null, names: [名前 …]}]
5
+ // examples:[{name, section, group?, subject?}](一覧の順)。小見出しなしは group: null の 1 つ
6
+ export function sectionLayout({ sections, subjects = [], grouping = {}, examples }, sectionId) {
7
+ const sec = sections.find((x) => x.id === sectionId);
8
+ const xs = examples.filter((e) => e.section === sectionId);
9
+ const min = grouping && grouping.minLessons ? grouping.minLessons : Infinity;
10
+ if (!sec || !sec.groups || xs.length < min) return [{ group: null, names: xs.map((e) => e.name) }];
11
+ const subj = (e) => { const i = subjects.indexOf(e.subject); return i < 0 ? Infinity : i; };
12
+ return sec.groups.map((g) => ({ group: g, names: xs.map((e, i) => [e, i]).filter(([e]) => e.group === g.id).sort((a, b) => subj(a[0]) - subj(b[0]) || a[1] - b[1]).map(([e]) => e.name) }))
13
+ .filter((x) => x.names.length);
14
+ }
@@ -0,0 +1,37 @@
1
+ // 図の札の字の範囲(backlog #201、kit/core/geometry-check.mjs が使う):基線から上 up・下 down(em)。
2
+ // 字体の申告する枠(ascent/descent)は行の上下の余白を含むので使わず、実際の字の形の範囲(canvas の actualBoundingBox)を測った値。
3
+ // 測り方:node tools/measure-text-band.mjs(同梱の字体を埋め込んで、欧文・和文・数字・混ぜた札の範囲を出す)。
4
+ // 値はその字体の欧文・和文・数字の最大を 0.01em 単位で切り上げたもの。アクセント付きの大文字(É・Å)は入れない
5
+ // (Andika・Shippori Mincho で +0.99 に届き、ほかの札の誤った重なりを増やすため。札にアクセントはまれ)。
6
+ // 字体を足すとき:tools/measure-text-band.mjs の FONTS に 1 行足して測り、この表に 1 行足す。
7
+ // 横書きだけ。縦書き(tate)は字の範囲が中心線の左右になるので、形の点検は skipped(tate)にする。
8
+ // 測った日:2026-11-12(Chrome。handoff/v0.6.11-check-sketch-2026-11-12.md に表)。Hiragino Sans は Mac だけの代わりの字体で埋め込まないので、表に入れない。
9
+
10
+ export const TEXT_BANDS = Object.freeze({
11
+ 'BIZ UDPGothic': { up: 0.86, down: 0.12 },
12
+ 'BIZ UDPMincho': { up: 0.86, down: 0.12 },
13
+ 'Zen Maru Gothic': { up: 0.85, down: 0.22 },
14
+ 'Klee One': { up: 0.81, down: 0.18 },
15
+ 'Shippori Mincho': { up: 0.85, down: 0.26 },
16
+ 'Source Sans 3': { up: 0.85, down: 0.23 },
17
+ 'Source Serif 4': { up: 0.85, down: 0.25 },
18
+ 'Source Code Pro': { up: 0.85, down: 0.23 },
19
+ 'Andika': { up: 0.85, down: 0.24 },
20
+ 'Atkinson Hyperlegible Next': { up: 0.85, down: 0.20 },
21
+ 'Noto Sans JP': { up: 0.85, down: 0.20 },
22
+ });
23
+
24
+ // 表にない字体だけの札:表のすべてを覆う範囲
25
+ export const DEFAULT_BAND = Object.freeze({
26
+ up: Math.max(...Object.values(TEXT_BANDS).map((b) => b.up)),
27
+ down: Math.max(...Object.values(TEXT_BANDS).map((b) => b.down)),
28
+ });
29
+
30
+ // font-family の並び(getComputedStyle の文字列)→ 範囲。並びの中で表にある字体のうち最も広いもの
31
+ // (和文の字が欧文の字体から代わりの字体に落ちても覆えるように、並びの全部を見る)。表にある字体がなければ DEFAULT_BAND
32
+ export function textBand(fontFamily = '') {
33
+ const names = String(fontFamily).split(',').map((s) => s.trim().replace(/^["']|["']$/g, ''));
34
+ const known = names.map((n) => TEXT_BANDS[n]).filter(Boolean);
35
+ if (!known.length) return DEFAULT_BAND;
36
+ return { up: Math.max(...known.map((b) => b.up)), down: Math.max(...known.map((b) => b.down)) };
37
+ }
@@ -33,6 +33,7 @@
33
33
  // 段 A でできない変更(スライドの原稿が変わった・組んだ教材と原稿が食い違う・場所が見つからない)は ok: false と理由を返す(呼び手は段 B へ)
34
34
  import { parse as parseHtml } from 'parse5';
35
35
  import { FORMAT } from './format.mjs';
36
+ import { plural } from './plural.mjs';
36
37
  import {
37
38
  readPortable, sha256Hex, sourceSha256, cmpCodePoint, mimeOf, htmlSafeJson, toBase64, parseJsonStrict, manifestFromAudio, inputHash,
38
39
  readableStep, readableStepOrder, extensionsFrom, excludedReason, LIMITS, RE, KNOWN, copyUnknown, validateDeckMeta, isOffset,
@@ -596,7 +597,7 @@ async function run(original, filesIn, opts) {
596
597
  // 字の元がない(字体のファイルを持たない編集アプリ)か、元のどの分割ファイルにもない字:断らずに保存し、端末の字体で出る字を名指して知らせる(handoff/font-subset-design-2026-11-05.md の決めごと 3)
597
598
  if (missing.length) {
598
599
  uncovered = String.fromCodePoint(...missing.sort((a, b) => a - b));
599
- warnings.push(`${FONT_FALLBACK_WARN}${missing.length} new character(s) got no font supplement (no font source has them), so they use the fonts of the device that opens the file: ${uncovered}`);
600
+ warnings.push(`${FONT_FALLBACK_WARN}${missing.length} new ${plural(missing.length, 'character')} got no font supplement (no font source has them), so they use the fonts of the device that opens the file: ${uncovered}`);
600
601
  }
601
602
  if (add.length) {
602
603
  // 分割ファイルの並び(組み立てと同じ:字の種類 → 太さ → 分割の順)。同じファイルを別の太さ・style に使うときはその順
@@ -1,3 +1,3 @@
1
1
  {
2
- "instruction": "dec25cea"
2
+ "instruction": "67a95271"
3
3
  }
package/kit/player.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "egatari-player",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "title": "Egatari Player"
5
5
  }
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.5.1",
3
- "sha256": "5319e38ff4769bc86bf7e9f5fe568569554c687d5b859cee770f9e1246129db7"
2
+ "version": "1.5.2",
3
+ "sha256": "90372777bb28769e515a11dd1844762e0a9bfd2f25085808a138a0dd15251895"
4
4
  }
@@ -7,6 +7,7 @@
7
7
  // (m-cycle の隠れた矢じりの transform、m-codetree の style の書き方 "fill:x;" と "fill: x;"。画素は同じ)があり、今までどおり通す
8
8
  // 理由:Linux の Chrome(SwiftShader)は同じ SVG を何度も描き直すと途中で描き方を切り替え、曲線の縁のアンチエイリアスが 45〜72 px ずれる
9
9
  // (CI の実行 40245997855:tree・venn・numberline。部品の DOM はバイトまで同じ)。画素の数だけの基準(40)ではこれを拾ってしまう
10
+ import { plural } from './core/plural.mjs';
10
11
 
11
12
  // 描き方の揺れとして許す範囲。どれか 1 つでも外れたら失敗(本当の描き違いを隠さないための枠):
12
13
  // strong :はっきり違う画素・色の段差のしきい値(RGB の差の和。今までの基準と同じ 48)
@@ -97,13 +98,13 @@ export function faintOff(stats, b = NOISE_BOUNDS) {
97
98
  export function describeRender(r) {
98
99
  if (r.kind === 'exact') return 'pixel-identical';
99
100
  const box = r.box ? ` in ${JSON.stringify(r.box)}` : '';
100
- if (r.kind === 'legacy') return `${r.n} pixel(s) clearly differ${box}; no component DOM to compare (canvas etc.)${r.same ? ` (within ${r.cap}, ok)` : ` (more than ${r.cap})`}`;
101
- if (r.kind === 'dom') return `${r.n} pixel(s) clearly differ${box}; component DOM differs, so no renderer-noise allowance${r.same ? ` (within ${r.cap}, ok)` : ` (more than ${r.cap})`}`;
101
+ if (r.kind === 'legacy') return `${r.n} ${plural(r.n, 'pixel')} clearly differ${box}; no component DOM to compare (canvas etc.)${r.same ? ` (within ${r.cap}, ok)` : ` (more than ${r.cap})`}`;
102
+ if (r.kind === 'dom') return `${r.n} ${plural(r.n, 'pixel')} clearly differ${box}; component DOM differs, so no renderer-noise allowance${r.same ? ` (within ${r.cap}, ok)` : ` (more than ${r.cap})`}`;
102
103
  const why = [r.off && !r.same ? `${r.off} away from any edge (first [x, y, max channel diff]: ${JSON.stringify((r.offPts || []).slice(0, 4))})` : '', r.out && !r.same ? `${r.out} outside the component${r.far ? ` (${r.far} outside the slide)` : ''}${r.slideSame === false ? ', slide DOM differs' : ''}` : ''].filter(Boolean).join(', ');
103
- const faint = r.same && r.off ? `; ${r.off} isolated faint pixel(s) away from edges (each channel <= ${NOISE_BOUNDS.offMaxCh}/255, at most ${NOISE_BOUNDS.offMax})` : '';
104
+ const faint = r.same && r.off ? `; ${r.off} isolated faint ${plural(r.off, 'pixel')} away from edges (each channel <= ${NOISE_BOUNDS.offMaxCh}/255, at most ${NOISE_BOUNDS.offMax})` : '';
104
105
  const outside = r.same && r.out ? ` (${r.out} outside the component box but inside the slide, whose DOM is identical too)` : '';
105
106
  const where = why || `all within ${NOISE_BOUNDS.edgePx} px of an edge${faint}, inside the component${outside}`;
106
- return `${r.n} pixel(s) clearly differ${box}, ${where}; component DOM byte-identical; cap ${r.cap} (${(NOISE_BOUNDS.capFrac * 100).toFixed(1)} % of the component area ${r.compArea} px, at most ${NOISE_BOUNDS.capPx})${r.same ? ' -> accepted as renderer anti-aliasing noise' : ''}`;
107
+ return `${r.n} ${plural(r.n, 'pixel')} clearly differ${box}, ${where}; component DOM byte-identical; cap ${r.cap} (${(NOISE_BOUNDS.capFrac * 100).toFixed(1)} % of the component area ${r.compArea} px, at most ${NOISE_BOUNDS.capPx})${r.same ? ' -> accepted as renderer anti-aliasing noise' : ''}`;
107
108
  }
108
109
 
109
110
  // ブラウザの中で 2 枚の PNG(base64)を読み、diffStats をかける
package/kit/tools.js CHANGED
@@ -1042,10 +1042,10 @@ function helpHtml(){
1042
1042
  row(K("Shift") + "+" + K("s"), j ? "字幕の大きさ(S / M / L)" : "Caption size (S / M / L)"),
1043
1043
  row(K("b"), j ? "黒い画面" : "Black screen")].concat(canFull() ? [row(K("f"), j ? "全画面" : "Fullscreen")] : []).concat([row(K("p"), j ? "発表者ビュー" : "Presenter view")]).concat([
1044
1044
  row(K("?"), j ? "このキーの一覧" : "This help")]))),
1045
- sec(j ? "道具" : "Tools", [
1045
+ sec(j ? "ツール" : "Tools", [
1046
1046
  row(K("x"), j ? "レーザーポインター" : "Laser pointer"), row(K("d"), j ? "ペン" : "Pen"), row(K("v"), j ? "消えるペン" : "Fading pen"),
1047
1047
  row(K("Shift") + "+" + K("d"), j ? "ペンの色" : "Pen color"), row(K("Backspace"), j ? "ペンのとき:書き込みを消す(Shift で全部)" : "With a pen: clear ink (Shift: all slides)"),
1048
- row(K("Esc"), j ? "道具を解除" : "Exit tool")])
1048
+ row(K("Esc"), j ? "ツールを解除" : "Exit tool")])
1049
1049
  ];
1050
1050
  if (isDev()) cols.push(sec(j ? "開発サーバー" : "Dev server", [
1051
1051
  row(K("e"), j ? "編集モード" : "Edit mode"), row(K("n"), j ? "台本" : "Script"), row(K("c"), j ? "コメントの一覧" : "Comments"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egatari",
3
- "version": "0.6.10",
3
+ "version": "0.6.11-rc.1",
4
4
  "license": "MIT",
5
5
  "homepage": "https://studio.egatari.org/",
6
6
  "repository": {
@@ -75,8 +75,9 @@
75
75
  "comment-shots": "node tools/comment-shots.mjs",
76
76
  "release:assets": "node tools/release-assets.mjs",
77
77
  "gen": "node tools/catalog.mjs && node tools/make-llm-guide.mjs && node tools/katex-ranges.mjs && node tools/make-colab-notebook.mjs",
78
- "gen:check": "node tools/components-update.mjs --check && node tools/themes-lock.mjs --check && node tools/fonts-vendor.mjs --check && node tools/catalog.mjs --check && node tools/make-llm-guide.mjs --check && node tools/part-labels-check.mjs && node tools/katex-ranges.mjs --check && node tools/changelog.mjs --check && node tools/make-colab-notebook.mjs --check && node tools/part-thumbs.mjs --check && node tools/parts-gallery.mjs --verify && node tools/build-book-tools.mjs --check",
78
+ "gen:check": "node tools/components-update.mjs --check && node tools/themes-lock.mjs --check && node tools/fonts-vendor.mjs --check && node tools/catalog.mjs --check && node tools/make-llm-guide.mjs --check && node tools/part-labels-check.mjs && node tools/katex-ranges.mjs --check && node tools/changelog.mjs --check && node tools/make-colab-notebook.mjs --check && node tools/part-thumbs.mjs --check && node tools/example-covers.mjs --check && node tools/examples-sync.mjs --check && node tools/parts-gallery.mjs --verify && node tools/build-book-tools.mjs --check",
79
79
  "thumbs": "node tools/part-thumbs.mjs",
80
+ "covers": "node tools/example-covers.mjs",
80
81
  "changelog": "node tools/changelog.mjs",
81
82
  "components:update": "node tools/components-update.mjs",
82
83
  "components:check": "node tools/components-update.mjs --check",
@@ -73,7 +73,7 @@ const STR = {
73
73
  ja: {
74
74
  mark: '編集中 — アプリ', editMode: '編集モード', where: (n, t) => 'スライド ' + n + (t ? ':' + t : ''), locked: 'この欄を開いている間、スライドはクリックを受けません', warn: '警告 ', editTip: (alt) => 'ダブルクリックで編集 · ' + alt + '+クリックでコメント · e で終了',
75
75
  save: '保存', cancel: 'キャンセル', editSrc: 'HTML を編集', closeEsc: '閉じる(Esc)', editHint: '⌘/Ctrl+Enter で保存 · Esc でキャンセル · 数式は \\( … \\) のまま書けます',
76
- loading: '読み込み中…', loadFail: '読み込めませんでした', stale: 'HTML が変わっています。再読み込みしてください(この画面は古い版から作られています)',
76
+ loading: '読み込み中…', loadFail: '読み込めませんでした', stale: 'HTML が変わっています。再読み込みしてください(この画面は古いバージョンから作られています)',
77
77
  saving: '保存中…', saved: '保存しました', conflict: 'HTML が変わっています。再読み込みしてください(入力した内容はコピーしておいてください)', saveFail: '保存できませんでした', offline: 'サーバーに繋がりません',
78
78
  reload: '再読み込み', cPlace: '例:この行をもっと短く / 図の色を合わせて / 例を一つ足して', cSave: '残す', cTitle: 'コメント', cHint: '⌘/Ctrl+Enter で残す · comments.json に書きます',
79
79
  cFail: '残せませんでした', cDone: 'コメントを残しました(comments.json)', cList: 'コメント(未対応)', cVolatile: 'Egatari ファイルではコメントは保存されません(閉じると消えます)。残すなら作業フォルダで', closeC: '閉じる(c)', resolve: '解決', resolveT: '対応済みにする',
@@ -95,7 +95,7 @@ const STR = {
95
95
  inkMark: 'マーカーの線', inkMarks: (n) => 'マーカーの線 ' + n + ' 本', inkT: '描いた線(comments.json の strokes)', inkMore: 'スライドに続けて描くと、このコメントに線を足せます(20 本まで)', inkFull: '1 つのコメントの線は 20 本まで', ink: 'マーカー(m)', inkTip: '丸や矢印で場所を示して、コメントを付ける(スライドに描いてから書きます。1 つのコメントに何本でも。スライドのツールバーのペンのボタンでも開く。d でも開く)',
96
96
  nUnsaved: '台本が保存されていません。保存するか元に戻すと、プレビューを操作できます', nRevert: '元に戻す',
97
97
  dateLocale: 'ja-JP',
98
- modeEdit: '編集中', modeInk: '編集中:マーカー', modeView: '表示', modeTool: (t) => '発表の道具:' + t, tools: { laser: 'レーザーポインター', pen: 'ペン', vpen: '消えるペン' }, modeLabel: '今のモード',
98
+ modeEdit: '編集中', modeInk: '編集中:マーカー', modeView: '表示', modeTool: (t) => '発表のツール:' + t, tools: { laser: 'レーザーポインター', pen: 'ペン', vpen: '消えるペン' }, modeLabel: '今のモード',
99
99
  },
100
100
  };
101
101
 
@@ -41,22 +41,22 @@
41
41
  | [`<m-tree>`](sha256/e0daed8338f51de7e86b5980a098394298455972218370ee65331ca48f7f9696/README.md) | 1.13.1 | 階層・分類の木(組織図、生物の分類など)を、根から 1 段ずつ組み立てる。座標は書かず、配置は部品が決める | 節の深さの数(by="level"、既定)か節の数(by="node")。節と edges の step があればその最大 | orient, by, link, size, fade, draw | [demo](sha256/e0daed8338f51de7e86b5980a098394298455972218370ee65331ca48f7f9696/demo.html) |
42
42
  | [`<m-venn>`](sha256/82b2dbc925a4ae4511bb48ccb1777a3932313ac7e18cb91572371d272a930980/README.md) | 1.13.1 | 2 つか 3 つの集合の円(ベン図)。集合を 1 つずつ出し、最後に重なりを強めてその中の項目を出す | 集合の数 + 1(overlaps="each" なら 集合の数 + 項目のある重なりの数) | size, dur, spread, overlaps | [demo](sha256/82b2dbc925a4ae4511bb48ccb1777a3932313ac7e18cb91572371d272a930980/demo.html) |
43
43
 
44
- ## 2.x のパーツ(components2.lock.json の既定の版 2.6.2)
44
+ ## 2.x のパーツ(components2.lock.json の既定の版 2.7.0)
45
45
 
46
46
  1.x の目録にない、2.x 専用の要素パーツ(`kind: "element"`)。土台パーツ(`kind: "library"`:base・boxplot-core・codetree-core・
47
47
  expr・heatmap-core・hist-core・icons・kanbun-core・markup-reader・plot・shape)は教材の作者が直接書かないので一覧には出さない。
48
48
 
49
49
  | 部品 | 版 | 内容 | 段階の数 | 受け取る値 | 見本 |
50
50
  |---|---|---|---|---|---|
51
- | [`<m-balance>`](sha256/1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be/README.md) | 2.0.0 | 確率の重りを置き、支点が期待値でつり合う様子を示す | 数直線と重り→支点を期待値へ→値と和の式(3 段階) | dur, digits, size | [demo](sha256/1298d779fe60ccfc09747fbdba47e2111175bd7fd2385a5b68c8f2644cd267be/demo.html) |
52
- | [`<m-cards>`](sha256/f3d5b6ce53f40c5f355a67538ff11b9cd28297da6292125ccb6e055aeddef906/README.md) | 2.0.3 | カード(番号の丸・アイコン・見出し・説明)を横一列か 2 段に並べ、段階ごとに出す。矢印で順を、枠の色で強調を見せる | カードの step の最大(既定はカード 1 枚 = 1 段階。per-step で n 枚ずつ) | layout, arrows, nums, hilite, per-step, stagger, dur | [demo](sha256/f3d5b6ce53f40c5f355a67538ff11b9cd28297da6292125ccb6e055aeddef906/demo.html) |
53
- | [`<m-ci>`](sha256/a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42/README.md) | 2.0.0 | 正規標本の区間を重ね、母平均を含む割合で信頼水準を説明する | 軸と μ→区間を順に→含む数と外れの強調(3 段階) | dur, fast, size | [demo](sha256/a69ab76ff7d0746d093b4e606d7b113be921cbb156edc16c2ad40aafab280d42/demo.html) |
54
- | [`<m-code>`](sha256/f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548/README.md) | 2.0.0 | 短いコードを行ごとに説明し、最後に出力を見せる | コード全体→説明を順に→出力(説明数+1、出力ありは+2) | dur, size, outputPos | [demo](sha256/f13af97d7ebf9893d5783eff27e4e1ce092ccd01783b332ad01aa0d201356548/demo.html) |
55
- | [`<m-folds>`](sha256/d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287/README.md) | 2.0.0 | 検証用の区画を順に替え、各分割の誤差と平均を示す | 分割を 1 行ずつ→平均(k + 1 段階) | dur, size | [demo](sha256/d75c461bb7b2b1c9a2b6d15bee1e11bcec88ef94931174d6b222cd309f6a0287/demo.html) |
56
- | [`<m-mapping>`](sha256/decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256/README.md) | 2.0.0 | 実験の結果を数値へ対応させ、同じ値になる結果をまとめて確率分布を作る | 結果の札→対応の矢印→同じ値の色と個数・確率の和→分布の横棒の 4 段階 | dur, stagger, digits, size | [demo](sha256/decb7c026527ea269a401efedcb5d4d56d186074b286d2f94772068bef56b256/demo.html) |
57
- | [`<m-orbit>`](sha256/2e9a35ce9e289196d0b5fd24b8546cf6e0f4a6df857e69f4f78e686cabb00e61/README.md) | 2.0.4 | 月の満ち欠け(金星の満ち欠け)。北極の上から見た図と地球から見た形を並べ、月を位置から位置へ動かす。形は位置から計算する | 動く先の数(既定は 8 つの位置を新月から 1 周 = 8 段階。visit で決める) | mode, hemisphere, sun, earth, moon, observer, size, dur | [demo](sha256/2e9a35ce9e289196d0b5fd24b8546cf6e0f4a6df857e69f4f78e686cabb00e61/demo.html) |
58
- | [`<m-particles>`](sha256/ec132caf4b4fd019fab20f9e9d6bc86266e30eb80a4fb8d2de4ca440ad45a098/README.md) | 2.0.0 | 状態変化の粒子の並び方と間隔、化学変化で保存される原子の数を見せる | state は states の数 − 1(既定 2)。reaction は反応前→原子に分かれる→反応後の 3 段階 | mode, count, size, dur, volume, motion | [demo](sha256/ec132caf4b4fd019fab20f9e9d6bc86266e30eb80a4fb8d2de4ca440ad45a098/demo.html) |
59
- | [`<m-sampling>`](sha256/7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45/README.md) | 2.0.0 | 母集団から標本を取り、比率・平均の標本分布を積む | 母集団→抽出→統計量と点→反復の 4 段階 | dur, stagger, fast, size | [demo](sha256/7aea8341beffcd4ad95c12b7e7e3be3f0f52eb7932d424be9e74e2fbd7339e45/demo.html) |
60
- | [`<m-score>`](sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/README.md) | 2.1.0 | 楽譜(五線譜)を 1 音・和音ずつ、または 1 小節ずつ出して音も鳴らす。ABC 記譜法で書く | 音符・和音・休符 1 つ=1 段階。by="measure" なら 1 小節=1 段階(per-step="N" なら N 小節。弱起の小節は次の段階に入る) | by, names, per-step | [demo](sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/demo.html) |
51
+ | [`<m-balance>`](sha256/170e9072285213a2b4e79d7c2e4ddb882d1501e60b5da63c59b1679643163005/README.md) | 2.0.1 | 確率の重りを置き、支点が期待値でつり合う様子を示す | 数直線と重り→支点を期待値へ→値と和の式(3 ステップ) | dur, digits, size | [demo](sha256/170e9072285213a2b4e79d7c2e4ddb882d1501e60b5da63c59b1679643163005/demo.html) |
52
+ | [`<m-cards>`](sha256/cbe8bb4b2fd0845a9333bc2064d86758ea6465992ad86a99167ba17f57f3e382/README.md) | 2.0.4 | カード(番号の丸・アイコン・見出し・説明)を横一列か 2 段に並べ、ステップごとに出す。矢印で順を、枠の色で強調を見せる | カードの step の最大(既定はカード 1 枚 = 1 ステップ。per-step で n 枚ずつ) | layout, arrows, nums, hilite, per-step, stagger, dur | [demo](sha256/cbe8bb4b2fd0845a9333bc2064d86758ea6465992ad86a99167ba17f57f3e382/demo.html) |
53
+ | [`<m-ci>`](sha256/71208afc5c8ea1ed6d2180f46de7385e43990cfb046ba350eefb917eca5d92fe/README.md) | 2.0.1 | 正規標本の区間を重ね、母平均を含む割合で信頼水準を説明する | 軸と μ→区間を順に→含む数と外れの強調(3 ステップ) | dur, fast, size | [demo](sha256/71208afc5c8ea1ed6d2180f46de7385e43990cfb046ba350eefb917eca5d92fe/demo.html) |
54
+ | [`<m-code>`](sha256/ae04a57be4a26b7443796a93c58adcf1cbcf746120eba619bf9c2bcdce53c640/README.md) | 2.1.0 | 短いコードを行ごとに説明し、最後に出力を見せる | コード全体→説明を順に→出力(説明数+1、出力ありは+2) | dur, size, outputPos | [demo](sha256/ae04a57be4a26b7443796a93c58adcf1cbcf746120eba619bf9c2bcdce53c640/demo.html) |
55
+ | [`<m-folds>`](sha256/b490139e9afa84164054738532d5ec4985bf071e40791d903012fe3b850bae43/README.md) | 2.0.1 | 検証用の区画を順に替え、各分割の誤差と平均を示す | 分割を 1 行ずつ→平均(k + 1 ステップ) | dur, size | [demo](sha256/b490139e9afa84164054738532d5ec4985bf071e40791d903012fe3b850bae43/demo.html) |
56
+ | [`<m-mapping>`](sha256/6d648d0e5c96ec680c04a14b7c3d672010d3b9f101197689e9672ec00174383d/README.md) | 2.0.1 | 実験の結果を数値へ対応させ、同じ値になる結果をまとめて確率分布を作る | 結果の札→対応の矢印→同じ値の色と個数・確率の和→分布の横棒の 4 ステップ | dur, stagger, digits, size | [demo](sha256/6d648d0e5c96ec680c04a14b7c3d672010d3b9f101197689e9672ec00174383d/demo.html) |
57
+ | [`<m-orbit>`](sha256/850944419734168be3dc202057de128131869c471cb8ab3baec2cfe789d56493/README.md) | 2.0.5 | 月の満ち欠け(金星の満ち欠け)。北極の上から見た図と地球から見た形を並べ、月を位置から位置へ動かす。形は位置から計算する | 動く先の数(既定は 8 つの位置を新月から 1 周 = 8 ステップ。visit で決める) | mode, hemisphere, sun, earth, moon, observer, size, dur | [demo](sha256/850944419734168be3dc202057de128131869c471cb8ab3baec2cfe789d56493/demo.html) |
58
+ | [`<m-particles>`](sha256/1b30dfd9b366ff07556024eb8ce75cca2eac8001fa392eed4e1232047001ec74/README.md) | 2.0.1 | 状態変化の粒子の並び方と間隔、化学変化で保存される原子の数を見せる | state は states の数 − 1(既定 2)。reaction は反応前→原子に分かれる→反応後の 3 ステップ | mode, count, size, dur, volume, motion | [demo](sha256/1b30dfd9b366ff07556024eb8ce75cca2eac8001fa392eed4e1232047001ec74/demo.html) |
59
+ | [`<m-sampling>`](sha256/03e20fb6803de0d94e93de7c01d7d00cede57b0b2604b449daa4cb156367500d/README.md) | 2.0.1 | 母集団から標本を取り、比率・平均の標本分布を積む | 母集団→抽出→統計量と点→反復の 4 ステップ | dur, stagger, fast, size | [demo](sha256/03e20fb6803de0d94e93de7c01d7d00cede57b0b2604b449daa4cb156367500d/demo.html) |
60
+ | [`<m-score>`](sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/README.md) | 2.1.1 | 楽譜(五線譜)を 1 音・和音ずつ、または 1 小節ずつ出して音も鳴らす。ABC 記譜法で書く | 音符・和音・休符 1 つ=1 ステップ。by="measure" なら 1 小節=1 ステップ(per-step="N" なら N 小節。弱起の小節は次のステップに入る) | by, names, per-step | [demo](sha256/babd98da50ea334b63f79c66be436d092e8aea32654e011a6444667abb882e77/demo.html) |
61
61
 
62
- 名前で引く線のアイコン(土台パーツ `icons`)は[この README](sha256/b2dfb4fa290d240024c95e2d24fda887db9fbc5b94f99b5be00c74c488fcfddb/README.md) を見る。
62
+ 名前で引く線のアイコン(土台パーツ `icons`)は[この README](sha256/5c72414df5a948a7cbb882be1e5bdd4113d188e357d4a0f01fabda15781417eb/README.md) を見る。