egatari 0.6.13 → 0.6.15

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 (260) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/README.ja.md +46 -46
  3. package/bin/egatari.mjs +6 -6
  4. package/components.lock.json +507 -153
  5. package/components2.lock.json +1710 -33
  6. package/kit/build.mjs +3 -1
  7. package/kit/check-messages.mjs +23 -8
  8. package/kit/check.mjs +27 -15
  9. package/kit/core/article-messages.mjs +4 -4
  10. package/kit/core/article-render.mjs +1 -1
  11. package/kit/core/article-text.mjs +3 -1
  12. package/kit/core/build-core.mjs +28 -6
  13. package/kit/core/check-parity.mjs +3 -1
  14. package/kit/core/check-rules.mjs +6 -4
  15. package/kit/core/colab-core.mjs +3 -3
  16. package/kit/core/comment-core.mjs +6 -0
  17. package/kit/core/image-size.mjs +35 -0
  18. package/kit/core/layout-scan.mjs +89 -2
  19. package/kit/core/llm-fix.mjs +39 -6
  20. package/kit/core/llm-pack-assemble.mjs +5 -2
  21. package/kit/core/llm-pack-data.mjs +269 -83
  22. package/kit/core/llm-pack.mjs +3 -3
  23. package/kit/core/new-deck.mjs +17 -3
  24. package/kit/core/part-labels.mjs +9 -3
  25. package/kit/core/parts2.mjs +1 -1
  26. package/kit/core/player.mjs +18 -0
  27. package/kit/core/portable.mjs +44 -4
  28. package/kit/core/purposes.mjs +6 -3
  29. package/kit/core/readable-parts.mjs +42 -0
  30. package/kit/core/themes-lock.mjs +1 -1
  31. package/kit/core/tier-a.mjs +14 -2
  32. package/kit/deck.js +49 -2
  33. package/kit/instruction-version.json +1 -1
  34. package/kit/live.js +6 -6
  35. package/kit/player.json +1 -1
  36. package/kit/player.lock.json +2 -2
  37. package/kit/presenter.js +3 -1
  38. package/kit/readable-parts.mjs +25 -0
  39. package/kit/tools.js +11 -4
  40. package/package.json +4 -2
  41. package/server/dev.mjs +7 -6
  42. package/server/editor-ui.js +9 -4
  43. package/server/hints.js +22 -2
  44. package/tts/yomi.yaml +1 -1
  45. package/vendor/components/CATALOG.md +21 -14
  46. package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/README.en.md +40 -0
  47. package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/index.js +408 -0
  48. package/vendor/components/sha256/0396a1895978803ae342b7f598f187b17ead47800e8f8317a5cb041111349813/index.js +278 -0
  49. package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/README.en.md +26 -0
  50. package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/index.js +322 -0
  51. package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/README.en.md +54 -0
  52. package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/index.js +470 -0
  53. package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/README.en.md +18 -0
  54. package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/index.js +279 -0
  55. package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/README.en.md +31 -0
  56. package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/index.js +267 -0
  57. package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/README.en.md +53 -0
  58. package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/index.js +171 -0
  59. package/vendor/components/sha256/1117758820dc561f41cf9d1cc0bab8cf3173cde7771ac10a12b94c96007c0f55/index.js +268 -0
  60. package/vendor/components/sha256/137017ad452afe209bdff81bc02ffae99c6b60a1c4aed2383515974f65511ff2/index.js +205 -0
  61. package/vendor/components/sha256/1a1471ba5f68e54304825a64e736afeda421e3763cdcbcdab2e45509562a0291/index.js +607 -0
  62. package/vendor/components/sha256/1b15fcc12b2fa43821e6299e87aae31aa69dbbc5a0d1b80088a5d7c5f8b8f7f5/index.js +429 -0
  63. package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/README.en.md +23 -0
  64. package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/index.js +147 -0
  65. package/vendor/components/sha256/21c099461befc0d382ddfe982f2a6cd8eeb6dd731252164ac619525e4bacdf0d/index.js +242 -0
  66. package/vendor/components/sha256/2352e0e22460f4a3c46dca6cef27cd9c63f161a411f1cf56c75c585e9124503c/index.js +315 -0
  67. package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/README.en.md +53 -0
  68. package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/index.js +171 -0
  69. package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/README.en.md +38 -0
  70. package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/index.js +414 -0
  71. package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/README.en.md +45 -0
  72. package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/index.js +211 -0
  73. package/vendor/components/sha256/2f111b900898579b3ec1611c2110db336a46d9133171a0cbb125ee37bd1f24f8/index.js +592 -0
  74. package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/README.en.md +45 -0
  75. package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/index.js +211 -0
  76. package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/README.en.md +20 -0
  77. package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/index.js +310 -0
  78. package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/README.en.md +35 -0
  79. package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/index.js +179 -0
  80. package/vendor/components/sha256/3af0b84b1799fc64ec74d6da9cbd343eccd89e8a11c81bfb444562c911284442/index.js +342 -0
  81. package/vendor/components/sha256/3c69bf3b3c6b9f76048fbc0839b3aa9699723570086d3d44bac799230ed6de5b/index.js +121 -0
  82. package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/README.en.md +37 -0
  83. package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/index.js +501 -0
  84. package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/README.en.md +38 -0
  85. package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/index.js +414 -0
  86. package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/README.en.md +30 -0
  87. package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/index.js +305 -0
  88. package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/README.en.md +31 -0
  89. package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/index.js +236 -0
  90. package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/README.en.md +21 -0
  91. package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/index.js +108 -0
  92. package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/README.en.md +28 -0
  93. package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/index.js +213 -0
  94. package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/README.en.md +35 -0
  95. package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/index.js +179 -0
  96. package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/README.en.md +53 -0
  97. package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/index.js +171 -0
  98. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ABCJS-ADAPTER.md +101 -0
  99. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/LICENSE-abcjs.txt +21 -0
  100. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/chords.json +89 -0
  101. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/doremi.json +261 -0
  102. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/extras.json +192 -0
  103. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/kaeru.json +521 -0
  104. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/rhythm.json +248 -0
  105. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ties.json +360 -0
  106. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/index.js +508 -0
  107. package/vendor/components/sha256/59996a56df462b36e24a928d4397c9308d9e39ad8224ebd19fb5c981608ef458/index.js +521 -0
  108. package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/README.en.md +30 -0
  109. package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/index.js +305 -0
  110. package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/README.en.md +30 -0
  111. package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/index.js +192 -0
  112. package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/README.en.md +20 -0
  113. package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/index.js +307 -0
  114. package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/README.en.md +24 -0
  115. package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/index.js +554 -0
  116. package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/README.en.md +25 -0
  117. package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/index.js +316 -0
  118. package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/README.en.md +18 -0
  119. package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/index.js +279 -0
  120. package/vendor/components/sha256/624acb997c4975ace65570b529b3ba00baa421c80ecb7fc80f392a64e8c573a7/index.js +107 -0
  121. package/vendor/components/sha256/62602488ee33dd4bdef8516de16da5ab27d7f7265d5041681beab80e08f1d482/index.js +97 -0
  122. package/vendor/components/sha256/67eaf344bddac79b74ed03fdcd70285c7b52b160e6c5ffbd6897848179aa5230/index.js +818 -0
  123. package/vendor/components/sha256/682c9c8871eccd19ff1264e0323a2e4c5798b0488b612ba0339c6fe85aab5914/index.js +926 -0
  124. package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/README.en.md +51 -0
  125. package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/index.js +230 -0
  126. package/vendor/components/sha256/72138936ed0b8fd3cb0214ae7ed250ae3f1f8b21ed6fd593544947774064ba0d/index.js +250 -0
  127. package/vendor/components/sha256/74c1a0f3ed1370c5003aa5770ee28cea2ce994d415680116a92fdbcd5854ba62/index.js +198 -0
  128. package/vendor/components/sha256/76125035eb153b98befa9c735bcd9fc4f99f774dc1d082fdae40acaadfe7d95b/index.js +818 -0
  129. package/vendor/components/sha256/7728cf7dde88a6688aba0ed70f23f7e21362a147beac09c1fa1a4b773e08e93b/index.js +354 -0
  130. package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/README.en.md +23 -0
  131. package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/index.js +289 -0
  132. package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/README.en.md +31 -0
  133. package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/index.js +236 -0
  134. package/vendor/components/sha256/7d50e50fbb6c5ec636b62509bd88ddaac1870e0522cf11bcc293ce924d48072d/index.js +312 -0
  135. package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/README.en.md +42 -0
  136. package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/index.js +549 -0
  137. package/vendor/components/sha256/87fc302c41b2bfeea88951ed689ec01b4dc79218c4bc69b310dc2228dfa2e153/index.js +926 -0
  138. package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/README.en.md +24 -0
  139. package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/index.js +103 -0
  140. package/vendor/components/sha256/89c8c16788e24df17920542ed6eb6557dea4a10e835de8fe839e439ccbba8014/index.js +69 -0
  141. package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/README.en.md +44 -0
  142. package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/index.js +304 -0
  143. package/vendor/components/sha256/8d9af78aef44ad2f98101c67d32473373d39725a09c923969aa621d5f5b124bb/index.js +121 -0
  144. package/vendor/components/sha256/8f861d71df72a82be86a3e63abf7d69bbab5aac6fa68be6e077c4e19c3519ed8/index.js +312 -0
  145. package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/README.en.md +54 -0
  146. package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/index.js +470 -0
  147. package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/README.en.md +24 -0
  148. package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/index.js +214 -0
  149. package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/README.en.md +33 -0
  150. package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/index.js +390 -0
  151. package/vendor/components/sha256/9289efef4a75afe011e54a17e34db08cfb16a450b2e0653e6a98525495cfba99/index.js +315 -0
  152. package/vendor/components/sha256/93256a923199ea51108cdb7491c3c96f376dbef15b64cbf1a1aa7cc5726b4970/index.js +429 -0
  153. package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/README.en.md +24 -0
  154. package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/index.js +550 -0
  155. package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/README.en.md +28 -0
  156. package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/index.js +213 -0
  157. package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/README.en.md +40 -0
  158. package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/index.js +348 -0
  159. package/vendor/components/sha256/97c074a5473618c65f4c23263f056870a0b7940e73475f2a1f32f68c08d8eb0f/index.js +198 -0
  160. package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/README.en.md +66 -0
  161. package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/index.js +984 -0
  162. package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/README.en.md +34 -0
  163. package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/index.js +244 -0
  164. package/vendor/components/sha256/a18b2b15d00c76462a43823b5c270c7ddd7c31794da9c236f74f20f80ec2ffdb/index.js +354 -0
  165. package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/README.en.md +32 -0
  166. package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/index.js +222 -0
  167. package/vendor/components/sha256/a979207c60fbd2a12cb557297eb0217eb098d660de684530a0f43d0d9c64e6ef/index.js +312 -0
  168. package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/README.en.md +34 -0
  169. package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/index.js +244 -0
  170. package/vendor/components/sha256/af7ed69b8969f6da14784b6e9d26e4dfd20147772ea172a99bd936a71be10fcd/index.js +278 -0
  171. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ABCJS-ADAPTER.md +101 -0
  172. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/LICENSE-abcjs.txt +21 -0
  173. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/chords.json +89 -0
  174. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/doremi.json +261 -0
  175. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/extras.json +192 -0
  176. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/kaeru.json +521 -0
  177. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/rhythm.json +248 -0
  178. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ties.json +360 -0
  179. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/index.js +508 -0
  180. package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/README.en.md +66 -0
  181. package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/index.js +990 -0
  182. package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/README.en.md +24 -0
  183. package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/index.js +550 -0
  184. package/vendor/components/sha256/b8096d7a60609520981273673761a110e40e3bdf52a7ab5548363b20e16f6e93/index.js +404 -0
  185. package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/README.en.md +32 -0
  186. package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/index.js +222 -0
  187. package/vendor/components/sha256/bd8e3893df02411deccc1d6d7b02292ca0d59dfeddfafcf99419430981572c82/index.js +351 -0
  188. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ABCJS-ADAPTER.md +101 -0
  189. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/LICENSE-abcjs.txt +21 -0
  190. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/chords.json +89 -0
  191. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/doremi.json +261 -0
  192. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/extras.json +192 -0
  193. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/kaeru.json +521 -0
  194. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/rhythm.json +248 -0
  195. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ties.json +360 -0
  196. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/index.js +508 -0
  197. package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/README.en.md +31 -0
  198. package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/index.js +267 -0
  199. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/LICENSE-strokesvg.txt +115 -0
  200. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/OFL.txt +93 -0
  201. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/index.js +749 -0
  202. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/strokes-CHANGES.md +20 -0
  203. package/vendor/components/sha256/c791e69e722f64146242f97acb29a341160d0c327cfe1d76307954d80e70db85/index.js +268 -0
  204. package/vendor/components/sha256/c8c0de41d603b61c6ec4dc1da5b50559e213dd1f3693ee5019df858016fd6daf/index.js +747 -0
  205. package/vendor/components/sha256/c99d4f2ab443484b9f462e405c72ea4794838b88f8823f27c606d12cbbedb996/index.js +404 -0
  206. package/vendor/components/sha256/cbde046e30c35db60259911a88e2ae0bedaf545e29b1da8b8ce13bc602a33c19/index.js +465 -0
  207. package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/README.en.md +51 -0
  208. package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/index.js +228 -0
  209. package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/README.en.md +35 -0
  210. package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/index.js +179 -0
  211. package/vendor/components/sha256/cf0985ffcd8e7cbe2175ddb9a4342b2a4aa3f322794188fc99af8789b494460d/index.js +521 -0
  212. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/LICENSE-strokesvg.txt +115 -0
  213. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/OFL.txt +93 -0
  214. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/index.js +749 -0
  215. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/strokes-CHANGES.md +20 -0
  216. package/vendor/components/sha256/d01dc7fd78d08dd720ed86b39d7877dc0913d72e914036088a86af2df2faee52/index.js +484 -0
  217. package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/README.en.md +24 -0
  218. package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/index.js +214 -0
  219. package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/README.en.md +31 -0
  220. package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/index.js +271 -0
  221. package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/README.en.md +25 -0
  222. package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/index.js +316 -0
  223. package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/README.en.md +23 -0
  224. package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/index.js +120 -0
  225. package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/README.en.md +40 -0
  226. package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/index.js +405 -0
  227. package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/README.en.md +66 -0
  228. package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/index.js +984 -0
  229. package/vendor/components/sha256/ddd4b9cbbc282cbb3117ff662e1a14ecdb3cc7c16072a574418ec6a6eecef4d8/index.js +107 -0
  230. package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/README.en.md +22 -0
  231. package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/index.js +145 -0
  232. package/vendor/components/sha256/e2da948daac7bfac158857877b5a6932dbd2369e73901abcef118c92dd20b725/index.js +747 -0
  233. package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/README.en.md +42 -0
  234. package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/index.js +268 -0
  235. package/vendor/components/sha256/e653a4da80f7761442dc5b504ea5b0700fd0acf1979beeff56122cfdb3d4654c/index.js +607 -0
  236. package/vendor/components/sha256/ea217c6821e931b2d8474bf56d38f2dcc89ec705fe1d276f313e1c7e8db2b98a/index.js +233 -0
  237. package/vendor/components/sha256/ea2e4e24838574f607879c7d05556281258c018331e4da3e6f3a5263173f2e99/index.js +75 -0
  238. package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/README.en.md +42 -0
  239. package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/index.js +549 -0
  240. package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/README.en.md +44 -0
  241. package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/index.js +203 -0
  242. package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/README.en.md +34 -0
  243. package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/index.js +244 -0
  244. package/vendor/components/sha256/fa1a09c10181456143d125d68dbbdcacde6bab2e4a2b3e573367103ce28ebf55/index.js +228 -0
  245. package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/README.en.md +51 -0
  246. package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/index.js +228 -0
  247. package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/README.en.md +23 -0
  248. package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/index.js +147 -0
  249. package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/README.en.md +20 -0
  250. package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/index.js +307 -0
  251. package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/README.en.md +26 -0
  252. package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/index.js +322 -0
  253. package/vendor/components-2/manifest-2.12.0.json +2348 -0
  254. package/vendor/components-2/manifest-2.13.0.json +2477 -0
  255. package/vendor/components-2/manifest-2.14.0.json +2460 -0
  256. package/vendor/components-2/manifest-2.14.1.json +2460 -0
  257. package/vendor/components-2/manifest-2.15.0.json +2460 -0
  258. package/vendor/egatari-spec/SOURCE.json +3 -3
  259. package/vendor/egatari-spec/schema/deck-meta.schema.json +15 -0
  260. package/vendor/egatari-spec/schema/egatari-metadata.schema.json +15 -0
package/kit/build.mjs CHANGED
@@ -218,6 +218,8 @@ export const nodeEnv = {
218
218
  articleTools: async () => ({ ...(await import('./core/article-page.mjs')), ...(await import('./core/article-messages.mjs')), ...(await import('./core/article.mjs')) }),
219
219
  // 本文のステップへのリンクの行き先を再生器で確かめる(§9C.8 の 1。kit/article-steps.mjs。ブラウザを起動するので、リンクがあるときだけ)
220
220
  articleSteps: async (html, links) => (await import('./article-steps.mjs')).resolveStepLinks(html, links),
221
+ // パーツの読める中身(§2.1、#216。kit/readable-parts.mjs。ブラウザを起動するので、印のあるときだけ)
222
+ readableParts: async (html) => (await import('./readable-parts.mjs')).readParts(html),
221
223
  get commit() { return repoCommit(); },
222
224
  katexDir: path.dirname(require.resolve('katex')),
223
225
  fontDir,
@@ -373,7 +375,7 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
373
375
  const rd = (p, max) => { try { return readRegularText(p, { max }).text; } catch { return null; } };
374
376
  const left = draftLeftovers(rd(src, READ_LIMITS.source), rd(path.join(path.dirname(src), 'narration.md'), READ_LIMITS.narration));
375
377
  const lines = leftoverLines(left);
376
- if (lines.length) { console.error(`portable: warning: ${lines.length} template ${plural(lines.length, 'leftover')}; the file is written anyway / 雛形のままのところ(書き出しはする):`); for (const l of lines) console.error(' ' + l); }
378
+ if (lines.length) { console.error(`portable: warning: ${lines.length} template ${plural(lines.length, 'leftover')}; the file is written anyway / テンプレートのままのところ(エクスポートはする):`); for (const l of lines) console.error(' ' + l); }
377
379
  }
378
380
  let r;
379
381
  try { r = await buildPortable(src, { ...opts }); } catch (e) { console.error(`portable: ${e.code ? `[${e.code}] ` : ''}${e.message}`); process.exit(1); }
@@ -185,7 +185,7 @@ export const MESSAGES = {
185
185
  kickerLong: { rule: 'R-headings', ja: (a) => `肩見出しが長い(${a.n} ${a.latin ? '文字' : '字分'}。${a.latin ? 'ラテン文字は 40 文字まで' : '24 字分まで。全角 1・半角 0.5'}):${quoteJa(a.t)}を短くする`, en: (a) => `the kicker has ${a.n} ${a.latin ? 'characters' : 'units'}, over ${a.max} (${a.latin ? 'Latin script' : 'full-width 1, ASCII 0.5'}): shorten “${a.t}”` },
186
186
  kickerPlace: { rule: 'R-headings', ja: () => '肩見出し(.kicker)はスライドに 1 つだけ、見出しの直前に置く', en: () => 'place just one kicker (.kicker) per slide, immediately before the heading' },
187
187
  cautionEmpty: { rule: 'R-caution', ja: () => '注意・警告の枠(.caution)にラベル以外の本文を書く', en: () => 'write body text besides the label in the caution or warning box (.caution)' },
188
- cautionLabel: { rule: 'R-caution', ja: () => '注意・警告のラベルは組み立てが付けるので、枠の先頭に書いたラベルを消す', en: () => 'remove the label written at the start of the caution or warning box; the build adds it' },
188
+ cautionLabel: { rule: 'R-caution', ja: () => '注意・警告のラベルはビルドが付けるので、枠の先頭に書いたラベルを消す', en: () => 'remove the label written at the start of the caution or warning box; the build adds it' },
189
189
  kickerSlide: { rule: 'R-headings', ja: () => '表紙・章の扉・縦書きのスライド(layout-tate)には肩見出し(.kicker)を置かない', en: () => 'do not use a kicker (.kicker) on a cover, chapter divider or vertical slide (layout-tate)' },
190
190
  titleLong: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 字で長い(26 字まで。全角 1・半角 0.5):${quoteJa(a.t)}を短くするか、要点を結論の行に移す`, en: (a) => `the heading has ${a.n} units, over 26 (full-width 1, ASCII 0.5): shorten “${a.t}” or move the point to the conclusion line` },
191
191
  titleLongEn: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 文字で長い(英文は 60 文字まで):${quoteJa(a.t)}を短くする`, en: (a) => `the heading has ${a.n} characters, over 60: shorten “${a.t}”` },
@@ -207,20 +207,20 @@ export const MESSAGES = {
207
207
  ja: (a) => `テーマ「${a.theme}」の${a.declared ? '寸法の宣言(theme.json の metrics)と描いた体裁の箱が違う' : '体裁の箱が既定の位置から動いているのに、寸法の宣言(theme.json の metrics)がない'}(${driftList(a.items, 'ja')})。本文の場所の限りは${a.declared ? '宣言' : '既定'}の値で決めるので、はみ出しの指摘がずれる:${driftHow(a, 'ja')}`,
208
208
  en: (a) => `the theme “${a.theme}” ${a.declared ? 'renders its layout boxes differently from its declared geometry (metrics in theme.json)' : 'moves layout boxes from their default positions but declares no geometry (metrics in theme.json)'} (${driftList(a.items, 'en')}). The body limits come from the ${a.declared ? 'declared' : 'default'} values, so overflow findings may be off: ${driftHow(a, 'en')}` },
209
209
  metricsFontLoad: {
210
- ja: (a) => `テーマ「${a.theme}」の寸法と描いた箱を比べなかった:同梱の字体(${(a.fonts || []).join('・')})が読み込めず、代わりの字体では測らないため(themeMetricsDrift を確かめていない):npm ci か node tools/get-fonts.mjs で字体をそろえて組み直すか、テーマの --font-sans に同梱の字体を入れる`,
210
+ ja: (a) => `テーマ「${a.theme}」の寸法と描いた箱を比べなかった:同梱のフォント(${(a.fonts || []).join('・')})が読み込めず、代わりのフォントでは測らないため(themeMetricsDrift を確かめていない):npm ci か node tools/get-fonts.mjs でフォントをそろえて再ビルドするか、テーマの --font-sans に同梱のフォントを入れる`,
211
211
  en: (a) => `the theme “${a.theme}” was not compared with its rendered boxes: the bundled fonts (${(a.fonts || []).join(', ')}) did not load, and a fallback font is never measured (themeMetricsDrift was not checked): restore the fonts (npm ci or node tools/get-fonts.mjs) and rebuild, or put a bundled font in the theme's --font-sans` },
212
212
  themeMetricsInvalid: {
213
213
  ja: (a) => `テーマ「${a.theme}」の寸法の宣言(theme.json の metrics)に使えない値がある:${a.list.join(';')}。その値の代わりに親のテーマ(なければ既定)の値で品質チェックした:theme.json の metrics を直す(docs/contract.md §12、node tools/theme-metrics.mjs measure <テーマ> で描いた箱の値を出せる)`,
214
214
  en: (a) => `the theme “${a.theme}” declares geometry (metrics in theme.json) that cannot be used: ${a.list.join('; ')}. The quality check used the parent theme's (or the default) values instead: fix metrics in theme.json (docs/contract.md §12; node tools/theme-metrics.mjs measure <theme> prints the rendered values)` },
215
215
  fontsExtraMissing: {
216
- ja: (a) => `字体(${(a.fonts || []).join('・')})は別の包み ${a.pkg} にあり、入っていないのでファイルに入らない(開く端末の字体で出る):${a.install} で入れて組み直す(npx なら npx -p egatari -p ${a.pkg} egatari …)。または既定の字体のテーマにする`,
216
+ ja: (a) => `フォント(${(a.fonts || []).join('・')})は別のパッケージ ${a.pkg} にあり、入っていないのでファイルに入らない(開く端末のフォントで出る):${a.install} で入れて再ビルドする(npx なら npx -p egatari -p ${a.pkg} egatari …)。または既定のフォントのテーマにする`,
217
217
  en: (a) => `the fonts (${(a.fonts || []).join(', ')}) are in the separate package ${a.pkg}, which is not installed, so they are not embedded (each device shows its own font): install it with ${a.install} and build again (with npx: npx -p egatari -p ${a.pkg} egatari …), or use a theme with the default fonts` },
218
218
  // 埋め込んだ字体のどれにもない字(kit/core/font-coverage.mjs。#178 (4))。where:slides | narration | article
219
219
  fontNotCovered: {
220
- ja: (a) => `ファイルの字体にない字があります(${(a.groups || []).map((g) => `${WHERE_JA[g.where] || g.where}:${g.chars}`).join('、')})。この字は開く端末の字体で表示されるので、端末によって見え方が変わります:どの端末でも同じに見せるには、字体にある字に替える(∎ なら □ や ■、記号なら式の中に書く)`,
220
+ ja: (a) => `ファイルのフォントにない字があります(${(a.groups || []).map((g) => `${WHERE_JA[g.where] || g.where}:${g.chars}`).join('、')})。この字は開く端末のフォントで表示されるので、端末によって見え方が変わります:どの端末でも同じに見せるには、フォントにある字に替える(∎ なら □ や ■、記号なら式の中に書く)`,
221
221
  en: (a) => `Some characters are not in the file's fonts (${(a.groups || []).map((g) => `${WHERE_EN[g.where] || g.where}: ${g.chars}`).join('; ')}). They show in the font of the device that opens the file, so they look different on each device: to look the same everywhere, use characters the fonts have (for ∎, □ or ■; for symbols, write them in math)` },
222
222
  fontNotEmbedded: {
223
- ja: (a) => `ファイルに入っていない字体です(${(a.fonts || []).join('・')})。開く端末によって見え方が変わります:どの端末でも同じに見せるには、ファイルに入る字体(docs/reference.ja.md「字体」の一覧)から選ぶ`,
223
+ ja: (a) => `ファイルに入っていないフォントです(${(a.fonts || []).join('・')})。開く端末によって見え方が変わります:どの端末でも同じに見せるには、ファイルに入るフォント(docs/reference.ja.md「フォント」の一覧)から選ぶ`,
224
224
  en: (a) => `This font is not embedded in the file (${(a.fonts || []).join(', ')}), so it looks different on each device: to look the same everywhere, choose a font that goes into the file (the list in docs/reference.md, “Fonts”)` },
225
225
  secHeading: { ja: (a) => `章の扉の題が h2 で書かれている(${quoteJa(a.t)}):章の扉(<section class="slide sec">)の題は h1 にする`, en: (a) => `the chapter divider's title is written with h2 (“${a.t}”): write the title of a divider (<section class="slide sec">) as h1` },
226
226
  textContrast: { rule: 'R-colors', ja: (a) => `字と地のコントラストが低い(${a.ratio}:1 < ${a.min}:1、<${a.tag}>「${a.t}」):テーマの色に戻す(スライドに書いた色・地の色を消し、テーマの class と変数だけを使う)`, en: (a) => `low contrast between text and background (${a.ratio}:1 < ${a.min}:1, <${a.tag}> “${a.t}”): go back to the theme colors (remove colors and backgrounds written on the slide; use only theme classes and variables)` },
@@ -235,12 +235,20 @@ export const MESSAGES = {
235
235
  outsideBody: { rule: 'R-fit',
236
236
  ja: (a) => `本文(.body)の外に置いた字が${{ slide: `スライドの外に出る(${a.px}px)`, title: '見出しに重なる', concl: '結論の行に重なる', pn: 'ページ番号に重なる' }[a.why] || 'はみ出す'}(「${a.t}」${moreJa(a)}):本文の中に置くか、位置を直す`,
237
237
  en: (a) => `text placed outside the body (.body) ${{ slide: `goes off the slide (${a.px}px)`, title: 'overlaps the heading', concl: 'overlaps the conclusion line', pn: 'overlaps the page number' }[a.why] || 'overflows'} (“${a.t}”${moreEn(a)}): put it inside the body or fix its position` },
238
+ // パーツの直下の <svg> がパーツの要素の箱から出る(backlog #208)。a:tag・index・label(compName)・px・n
239
+ partSvgOut: { rule: 'R-fit',
240
+ ja: (a) => `${compName(a, true)}の図(いちばん外側の <svg>)がパーツの箱からはみ出す(${a.px}px${moreJa(a)}):パーツのコードで、その <svg> に width と height を付ける(または style で width:100%;height:100%)`,
241
+ en: (a) => `the figure (outermost <svg>) of ${compName(a, false)} sticks out of the part's box (${a.px}px${moreEn(a)}): in the part's code, give that <svg> a width and height (or width:100%;height:100% in its style)` },
242
+ // 横並び(.cols)の列からはみ出す中身(handoff Issue #40)。a:col(はみ出した列。左から、縦の並びは上から)・cols(列の数)・into(重なる隣の列)・px・t・n・v(列が上下に並ぶ)
243
+ colOverflow: { rule: 'R-fit',
244
+ ja: (a) => `横並び(.cols)の${a.v ? '上' : '左'}から ${a.col} 列目の中身が列の幅を超え、${a.into ? `${a.into} 列目に重なる` : 'はみ出す'}(「${a.t}」${moreJa(a)}、${a.px}px):式や語を短くするか、長い式は列の外の別の行に置くか、列を減らして幅を広げる`,
245
+ en: (a) => `content in column ${a.col} of ${a.cols} (from the ${a.v ? 'top' : 'left'}) of a side-by-side layout (.cols) is wider than the column and ${a.into ? `overlaps column ${a.into}` : 'sticks out'} (“${a.t}”${moreEn(a)}, ${a.px}px): shorten the formula or words, put a long formula on its own line outside the columns, or use fewer columns so each is wider` },
238
246
  // 字の箱がスライドの外に出る・重なる(どのスライドでも。#64)と、表の短いセルの語が割れる(#65)。警告。表紙と章の扉では置ける子要素を添える
239
247
  textOffSlide: { rule: 'R-fit',
240
248
  ja: (a) => `字がスライドの外に出る(「${a.t}」${moreJa(a)}、${a.px}px):字を短くするか、位置を直して 1280×720 の内に収める${PLACE_JA[a.kind] || ''}`,
241
249
  en: (a) => `text goes off the slide (“${a.t}”${moreEn(a)}, ${a.px}px): shorten it or move it inside the 1280×720 slide${PLACE_EN[a.kind] || ''}` },
242
250
  textOverlap: { rule: 'R-fit',
243
- ja: (a) => `${a.with === 'band' ? `字がスライドの帯(飾り)に重なる(「${a.t}」${moreJa(a)})` : `字の箱がほかの字に重なる(「${a.t}」と「${a.u}」${moreJa(a)})`}:重ならない位置に置き直すか、字を減らす${a.svg ? (a.component === 'm-flow' ? '。m-flow の逆向きの辺には shift を付ける' : a.component === 'm-quad' ? '。m-quad の項目の x/y を変え、象限の名前と重ならない位置に動かす' : a.component ? `。パーツ <${a.component}> のデータを変え、ラベルどうしが重ならないようにする` : '。字の x/y か text-anchor を変えるか、軸の名前を軸の端より外に置く') : ''}${PLACE_JA[a.kind] || ''}`,
251
+ ja: (a) => `${a.with === 'band' ? `文字がスライドの装飾(色の付いた部分)に重なる(「${a.t}」${moreJa(a)})` : `文字の枠がほかの文字に重なる(「${a.t}」と「${a.u}」${moreJa(a)})`}:重ならない位置に置き直すか、字を減らす${a.svg ? (a.component === 'm-flow' ? '。m-flow の逆向きの辺には shift を付ける' : a.component === 'm-quad' ? '。m-quad の項目の x/y を変え、象限の名前と重ならない位置に動かす' : a.component ? `。パーツ <${a.component}> のデータを変え、ラベルどうしが重ならないようにする` : '。字の x/y か text-anchor を変えるか、軸の名前を軸の端より外に置く') : ''}${PLACE_JA[a.kind] || ''}`,
244
252
  en: (a) => `${a.with === 'band' ? `text overlaps the slide's decorative band (“${a.t}”${moreEn(a)})` : `a text box overlaps other text (“${a.t}” and “${a.u}”${moreEn(a)})`}: move it to free space or cut the text${a.svg ? (a.component === 'm-flow' ? '; add shift to the reverse edge in m-flow' : a.component === 'm-quad' ? '; change the item’s x/y in m-quad to move it away from the quadrant name' : a.component ? `; change the data in the part <${a.component}> so the labels do not meet` : '; change the text’s x/y or text-anchor, or put the axis name beyond the axis end') : ''}${PLACE_EN[a.kind] || ''}` },
245
253
  cellWordBreak: { rule: 'R-fit',
246
254
  ja: (a) => `表のセルの短い語が途中で折り返している(「${a.t}」が ${a.lines} 行:${a.split}${moreJa(a)}):表の列を減らすか、語を短くするか、その列を広げる(ほかの列の字を減らす)`,
@@ -340,6 +348,8 @@ export const MESSAGES = {
340
348
  morphLater: { ja: (a) => `モーフ:ステップ 0 で見えないので動かさない:${a.ids}`, en: (a) => `morph: not moved because not visible at step 0: ${a.ids}` },
341
349
  morphDupSrc: { ja: (a) => `モーフ:元のスライドに data-id「${a.id}」が 2 つ以上ある(初めのものだけを使う):1 つにする`, en: (a) => `morph: the source slide has data-id “${a.id}” more than once (only the first is used): keep one` },
342
350
  morphDupDst: { ja: (a) => `モーフ:data-id「${a.id}」が 2 つ以上ある(初めのものだけを使う):1 つにする`, en: (a) => `morph: data-id “${a.id}” appears more than once (only the first is used): keep one` },
351
+ imgTooLarge: { ja: (a) => `教材に埋め込む画像 ${a.image} が 1 MiB を超えている(${mibOf(a.n)}):必要な部分を切り抜くか、幅 1600 px ほどの JPEG・WebP で保存する`, en: (a) => `the lesson’s embedded image ${a.image} is over 1 MiB (${mibOf(a.n)}): crop it or save it as JPEG/WebP about 1600 px wide` },
352
+ imgTotal: { ja: (a) => `教材に埋め込む画像は ${a.count} 枚、合計 ${mibOf(a.n)}(パーツ自身の画像を除く)`, en: (a) => `the lesson has ${a.count} embedded ${plural(a.count, 'image')}, totalling ${mibOf(a.n)} (excluding parts' own images)` },
343
353
  imgAlt: { ja: (a) => `alt の無い画像が ${a.n} 枚(${a.list}):内容を alt="…" に書く(飾りなら alt="")`, en: (a) => `${a.n} ${plural(a.n, 'image')} without alt (${a.list}): describe ${a.n === 1 ? 'it' : 'them'} in alt="…" (alt="" if decorative)` },
344
354
  svgName: { ja: (a) => `名前の無い SVG の図が ${a.n} 個:aria-label="…" か <title>…</title> を付ける(飾りなら aria-hidden="true")`, en: (a) => `${a.n} SVG ${plural(a.n, 'figure')} without a name: add aria-label="…" or <title>…</title> (aria-hidden="true" if decorative)` },
345
355
  compName: { ja: (a) => `名前の無いパーツ:${a.list}(読み上げ用に aria-label="…" を付けられる)`, en: (a) => `parts without a name: ${a.list} (an aria-label="…" helps screen readers)` },
@@ -348,9 +358,14 @@ export const MESSAGES = {
348
358
  compLayout: { rule: 'R-fit',
349
359
  ja: (a) => `${compName(a, true)}を置く場所が足りない:${a.msg}。パーツを置く場所を広げるか、表示する内容を減らす`,
350
360
  en: (a) => `${compName(a, false)} does not have enough room: ${a.msg}. Give the part more space or show less content` },
361
+ // パーツが ctx.report で知らせた見た目の問題(format spec §8.4 の code:range・size・theme ほか)。range(値が表示する範囲の外)は直し方を言う(handoff Issue #40)
351
362
  compReport: { rule: 'R-components',
352
- ja: (a) => `${compName(a, true)}からの知らせ:${a.msg}。表示する値や量、テーマの色を確かめる`,
353
- en: (a) => `${compName(a, false)} reports a problem: ${a.msg}. Check the values, the amount of content and the theme colours` },
363
+ ja: (a) => (a.code === 'range'
364
+ ? `${compName(a, true)}の値が表示する範囲の外にある:${a.msg}。範囲の属性(xr・yr など)を、値がすべて入るように書く`
365
+ : `${compName(a, true)}からの知らせ:${a.msg}。表示する値や量、テーマの色を確かめる`),
366
+ en: (a) => (a.code === 'range'
367
+ ? `${compName(a, false)} has values outside the range it shows: ${a.msg}. Set its range attributes (such as xr and yr) so that every value fits`
368
+ : `${compName(a, false)} reports a problem: ${a.msg}. Check the values, the amount of content and the theme colours`) },
354
369
  compData: { rule: 'R-components',
355
370
  ja: (a) => `${compName(a, true)}のデータが合わない:${compWhat(a, true)}${compHow(a, true) ? `。${compHow(a, true)}` : ''}`,
356
371
  en: (a) => `${compName(a, false)} has data it cannot draw: ${compWhat(a, false)}${compHow(a, false) ? `. Write it like this: ${compHow(a, false)}` : ''}` },
package/kit/check.mjs CHANGED
@@ -1,7 +1,9 @@
1
1
  // 組んだデッキをヘッドレス Chrome で検査する
2
2
  // 約束事は docs/contract.md、段階の規則は skills/motion-slides/SKILL.md §4
3
3
  //
4
- // node kit/check.mjs <deck.html> [--json]
4
+ // node kit/check.mjs <deck.html> [--json] [--no-browser]
5
+ // --no-browser:ブラウザを起動せず、原稿だけで見られる検査(組み立て・id・語彙・音声・添付・参照音声など)をする。見た目と動きの検査(R-fit など)は
6
+ // 飛ばし、その決まりの状態は skipped(noBrowser)。エラーのあった決まりは failed。ブラウザを使えない所(サンドボックス)向け(backlog #215 (c))
5
7
  //
6
8
  // A. 体裁の検査(はみ出し・文字の大きさ・字数・表記・段階 0 の一覧)
7
9
  // ただし段階の状態は DECK.seek(i, k, Infinity) で作る(beforeprint の代わり)
@@ -63,6 +65,7 @@ import { legacyVocabulary } from './core/legacy-vocab.mjs';
63
65
  import { colorsOutsideVocabulary } from './core/color-vocab.mjs';
64
66
  import { kickerFindings } from './core/kicker.mjs';
65
67
  import { cautionFindings } from './core/caution.mjs';
68
+ import { imageSizeFindings } from './core/image-size.mjs';
66
69
  import { predictStepProblems } from './core/predict-steps.mjs';
67
70
  import { FONTS_EXTRA_WARN, FONTS_EXTRA_PKG, FONTS_EXTRA_INSTALL } from './core/build-core.mjs';
68
71
  import { uncoveredGlyphs } from './core/font-coverage.mjs';
@@ -70,17 +73,18 @@ import { uncoveredGlyphs } from './core/font-coverage.mjs';
70
73
  // ---------------------------------------------------------------- 引数
71
74
  const args = process.argv.slice(2);
72
75
  const asJson = args.includes('--json');
76
+ const noBrowser = args.includes('--no-browser');
73
77
  const ti = args.indexOf('--theme'), theme = ti >= 0 ? args[ti + 1] : undefined;
74
78
  const li = args.indexOf('--lang'), langArg = li >= 0 ? args[li + 1] : undefined; // 知らせの言葉(ja | en。既定は教材の言語)
75
79
  const arg0 = args.find((a, i) => !a.startsWith('--') && !(ti >= 0 && i === ti + 1) && !(li >= 0 && i === li + 1));
76
80
  if (!arg0) {
77
- console.error('usage: node kit/check.mjs <deck.html | working folder> [--theme name] [--lang ja|en] [--json]');
81
+ console.error('usage: node kit/check.mjs <deck.html | working folder> [--theme name] [--lang ja|en] [--json] [--no-browser]');
78
82
  process.exit(1);
79
83
  }
80
84
  // 組み立てた後の 1 ファイル(.ega.html)は原稿ではない:デッキとして読むと、はみ出し・台本なし・重なりを誤って出す。断る(終了コード 2:
81
85
  // 「エラー 0」でも「指摘あり」でもない、検査していない)。中に入った原稿を取り出して検査するのは v0.6.10
82
86
  if (/\.ega\.html?$/i.test(arg0)) {
83
- const ja = '.ega.html は組み立てた後のファイルです。品質チェックは組み立てる前の作業フォルダか deck.html にかけてください';
87
+ const ja = '.ega.html はビルドした後のファイルです。品質チェックはビルドする前の作業フォルダか deck.html にかけてください';
84
88
  const en = '.ega.html is a built file. Run the quality check on the source instead (the working folder or deck.html)';
85
89
  console.error(`check: ${langArg === 'en' ? en : langArg === 'ja' ? ja : ja + '\n ' + en}`);
86
90
  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));
@@ -144,6 +148,8 @@ catch (e) {
144
148
  const lang = built.html.match(/<html[^>]*\slang="([^"]*)"/)?.[1] || '';
145
149
  const JA = isJapanese(lang);
146
150
  const ML = langArg === 'en' || langArg === 'ja' ? langArg : JA ? 'ja' : 'en';
151
+ // ローカルの画像も data: URI になった後で数える(編集アプリと同じ関数)
152
+ for (const f of imageSizeFindings(built.html)) report(f.i, f.sev, f.code, f.a);
147
153
  // テーマの寸法の宣言(theme.json の metrics。kit/core/theme-metrics.mjs):本文の場所の限りに使い、描いた箱と比べる(A)
148
154
  const themeInfo = built.theme || { name: built.stats.theme, metrics: null, declared: false };
149
155
  const metricsWarn = [];
@@ -299,7 +305,19 @@ if (extraMissing.length) report(null, 'error', 'fontsExtraMissing', { fonts: ext
299
305
  }
300
306
  }
301
307
 
308
+ // 出力に使うもの(ブラウザの検査が埋める。--no-browser では組み立てのスライドの一覧から)
309
+ let meta = [], compErrors = [], narrText = '';
310
+ // コンソールのエラーとページの例外は、読み込み直後だけでなく検査の全体(後の seek・再現性の確認・開き直し)を通して集め、最後にまとめて報告する
311
+ const consoleErrors = [];
312
+ const titleOf = (i) => (meta[i] ? meta[i].title : '');
313
+ // 通った検査の段(kit/core/check-rules.mjs の決まりの phase。通らなかった段の決まりは incomplete。--no-browser では skipped)
314
+ const visited = new Set();
315
+ let phase = '読み込み';
316
+ visited.add(phase);
317
+ if (noBrowser) meta = built.slides.map((x, i) => ({ i, key: x.key, id: x.id || null, title: x.heading || '' }));
318
+
302
319
  // ---------------------------------------------------------------- 2. 一時ファイルへ書き出し、ヘッドレス Chrome で開く
320
+ if (!noBrowser) {
303
321
  const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'macs-check-'));
304
322
  const tmpFile = path.join(tmpDir, 'deck.html');
305
323
  fs.writeFileSync(tmpFile, built.html);
@@ -321,12 +339,6 @@ process.on('unhandledRejection', crashed);
321
339
  browserPhase = true;
322
340
  const browser = await launch();
323
341
  const page = await browser.newPage({ viewport: { width: 1280, height: 720 } });
324
- // コンソールのエラーとページの例外は、読み込み直後だけでなく検査の全体(後の seek・再現性の確認・開き直し)を通して集め、最後にまとめて報告する
325
- const consoleErrors = [];
326
- // 通った検査の段(kit/core/check-rules.mjs の決まりの phase。通らなかった段の決まりは incomplete)
327
- const visited = new Set();
328
- let phase = '読み込み';
329
- visited.add(phase);
330
342
  page.on('console', (m) => { if (m.type() === 'error') consoleErrors.push(`[${phase}] ${m.text()}`); });
331
343
  page.on('pageerror', (e) => consoleErrors.push(`[${phase}] ${e.message}`));
332
344
  await page.goto(url);
@@ -334,7 +346,7 @@ await page.waitForFunction(() => window.DECK && DECK.ready, null, { timeout: 150
334
346
  await page.evaluate(() => document.fonts.ready);
335
347
 
336
348
  // スライドの一覧(番号・鍵・タイトル・段階数・static か・部品の数)
337
- const meta = await page.evaluate(() => DECK.slides.map((s, i) => ({
349
+ meta = await page.evaluate(() => DECK.slides.map((s, i) => ({
338
350
  i,
339
351
  key: s._key,
340
352
  max: s._max,
@@ -348,7 +360,6 @@ const meta = await page.evaluate(() => DECK.slides.map((s, i) => ({
348
360
  // 見出しの字(隠れているスライドでは innerText が空になるので textContent。KaTeX の読み上げ用の MathML は除く)
349
361
  title: (() => { const h = s.querySelector('h2, h1'); if (!h) return ''; const c = h.cloneNode(true); c.querySelectorAll('.katex-mathml').forEach((x) => x.remove()); c.querySelectorAll('br').forEach((x) => x.replaceWith(' ')); return c.textContent.replace(/\s+/g, ' ').trim(); })(),
350
362
  })));
351
- const titleOf = (i) => (meta[i] ? meta[i].title : '');
352
363
  // 口述原稿と合わせる段階:実行系の数(_max・_cstep)と DOM から数えたものの大きいほう(数えられないもの(NaN)は DOM のほう)
353
364
  for (const m of meta) {
354
365
  const hasC = !m.static && (m.cstep >= 0 || m.domConcl);
@@ -370,7 +381,7 @@ async function collectPartReports() {
370
381
  await collectPartReports();
371
382
 
372
383
  // 部品のデータの形(kit/deck.js の DECK.componentErrors):スライドごとに、どの部品の何が違うか
373
- const compErrors = await page.evaluate(() => (DECK.componentErrors || []).map((r) => JSON.parse(JSON.stringify(r))));
384
+ compErrors = await page.evaluate(() => (DECK.componentErrors || []).map((r) => JSON.parse(JSON.stringify(r))));
374
385
  const badComps = new Map();
375
386
  for (const r of compErrors) {
376
387
  report(r.slide, 'error', 'compData', { ...r, msg: r.msg === undefined ? undefined : cleanErrorText(r.msg) });
@@ -582,7 +593,6 @@ for (const { i, stepKey, turns } of narrInfo) {
582
593
  }
583
594
 
584
595
  // スライドにない段階の口述原稿([k] が段階の数を超える・結論のないスライドの [concl]・結論の段階を番号で書いた):読まれないのでエラー
585
- let narrText = '';
586
596
  try { narrText = readRegular(path.join(path.dirname(path.resolve(src)), 'narration.md'), { max: READ_LIMITS.narration }).toString('utf8'); } catch { /* なければ行は出さない */ }
587
597
  const stepMeta = meta.map((m) => ({ key: m.key, max: m.smax, cstep: m.scstep, static: m.static }));
588
598
  for (const o of orphanSteps(built.segs, stepMeta)) {
@@ -794,6 +804,7 @@ await page.waitForTimeout(100);
794
804
  await browser.close();
795
805
  browserPhase = false; // ここから先は検査の結果を作るだけ(ブラウザは使わない)
796
806
  fs.rmSync(tmpDir, { recursive: true, force: true });
807
+ } // if (!noBrowser)
797
808
  // スタックの行とファイルの場所は除き、言葉だけにする。部品の例外(古い形の「M-CURVES TypeError: …」)は部品のデータの知らせにする
798
809
  const compTags = new Set(compErrors.map((r) => r.tag));
799
810
  for (const e of [...new Set(consoleErrors.map(cleanErrorText))]) {
@@ -813,7 +824,7 @@ let srcText = '';
813
824
  try { srcText = readRegular(src, { max: READ_LIMITS.source }).toString('utf8'); } catch { /* 組めたので読めるはず */ }
814
825
  // 教材の性質は原稿と台本の文字列から(編集アプリと同じ factsFromSource)
815
826
  const facts = factsFromSource({ deck: srcText, narration: narrText || '', audio: has('audio', 'manifest.json') || has('voice.json'), attachments: has(FORMAT.ATTACH_DIR), book: hasArticle(src) });
816
- const acc = account({ results, visited, facts });
827
+ const acc = account({ results, visited, facts, noBrowser });
817
828
  const ruleSet = createHash('sha256').update(ruleSetText()).digest('hex').slice(0, 12);
818
829
  const ok = counts.error === 0;
819
830
 
@@ -838,7 +849,7 @@ if (asJson) {
838
849
  }));
839
850
  // renderNoise:呼び出し順の比べで、描き方の揺れ(アンチエイリアス)として通したもの。指摘ではなく、数えない(backlog #210)
840
851
  const noiseOut = renderNoise.map((x) => ({ slide: x.slide + 1, id: (meta[x.slide] && meta[x.slide].id) || null, step: x.step, data: x.a, msg: where(ML, placeOf({ slide: x.slide, step: x.step })) + sep + renderNoiseMessage(ML, x.a) }));
841
- console.log(JSON.stringify({ ok, status: acc.status, lang: ML, counts, results: out, renderNoise: noiseOut, ruleSet, rules: acc.rules, summary: acc.summary, ...(acc.status === 'incomplete' ? { unset: acc.unset, problems: acc.problems } : {}) }, null, 2));
852
+ console.log(JSON.stringify({ ok, status: acc.status, lang: ML, counts, results: out, renderNoise: noiseOut, ruleSet, ...(noBrowser ? { noBrowser: true } : {}), rules: acc.rules, summary: acc.summary, ...(acc.status === 'incomplete' ? { unset: acc.unset, problems: acc.problems } : {}) }, null, 2));
842
853
  } else {
843
854
  // スライド番号順(null=デッキ全体は先頭)にグループ化し、各グループ内は error → warn → info。見出しの行にスライドがあるので、行には段階と言葉だけ
844
855
  const groups = new Map();
@@ -862,6 +873,7 @@ if (asJson) {
862
873
  console.log(EN ? `${counts.error} ${plural(counts.error, 'error')}, ${counts.warn} ${plural(counts.warn, 'warning')}, ${counts.info} info` : `エラー ${counts.error} 警告 ${counts.warn} 情報 ${counts.info}`);
863
874
  const S = acc.summary;
864
875
  console.log(EN ? `quality check items: ${S.checked} done, ${S.excused} not applicable, ${S.skipped} not run, ${S.failed} failed (of ${S.total})` : `品質チェックの項目:見た ${S.checked} 当てはまらない ${S.excused} 見られなかった ${S.skipped} 落ちた ${S.failed}(${S.total} のうち)`);
876
+ if (noBrowser) console.log(EN ? 'run without a browser (--no-browser): only the checks of the source were done; the checks of how slides look and move (R-fit, contrast, parts, narration steps and more) were skipped. Run the check with a browser before you share the lesson' : 'ブラウザなしで動かした(--no-browser):原稿だけでできるチェックをした。スライドの見た目と動きのチェック(R-fit・コントラスト・パーツ・台本のステップなど)は飛ばした。教材を配る前に、ブラウザのある所で品質チェックをかけ直す');
865
877
  if (acc.status === 'incomplete') console.log((EN ? 'the check did not finish: ' : '点検が終わっていない:') + [...acc.unset.map((id) => id + (EN ? ' (not looked at)' : '(見ていない)')), ...acc.problems].join('; '));
866
878
  }
867
879
  // 出力を書き終えてから終える(stdout がパイプのとき、process.exit は書きかけの出力(64 KiB を超える分)を捨てる。--json の大きな結果が途中で切れていた)
@@ -73,7 +73,7 @@ export const ARTICLE_MESSAGES = {
73
73
  articleUnlisted: { ja: () => '本文のファイルが egatari.json の article に載っていない(本に入らない):chapters に足すか、ファイルを外す', en: () => 'this article file is not listed in egatari.json article (it is not part of the book): add it to chapters or move the file' },
74
74
  articleRead: { ja: (a) => `本文のファイルが読めない:${a.why}`, en: (a) => `cannot read the article file: ${a.why}` },
75
75
  articleUnsafeParagraph: {
76
- ja: (a) => `${a.heading ? `節${quoteJa(a.heading)}の` : ''}段落${quoteJa(a.text + '…')}に${a.what === 'html' ? 'タグの書き出し(<! と <?)' : '引用符(" と \')'}が ${a.count} 個ある。1 つの段落に ${a.max} 個を越えると安全に読めないので、本を読み込まない:段落を分けるか、${a.what === 'html' ? 'タグ' : '引用符'}を減らす`,
76
+ ja: (a) => `${a.heading ? `節${quoteJa(a.heading)}の` : ''}段落${quoteJa(a.text + '…')}に${a.what === 'html' ? 'タグの始まり(<! と <?)' : '引用符(" と \')'}が ${a.count} 個ある。1 つの段落に ${a.max} 個を越えると安全に読めないので、本を読み込まない:段落を分けるか、${a.what === 'html' ? 'タグ' : '引用符'}を減らす`,
77
77
  en: (a) => `the paragraph “${a.text}…”${a.heading ? ` in the section “${a.heading}”` : ''} has ${a.count} ${a.what === 'html' ? 'tag openings (<! and <?)' : 'quotation marks (" and \')'}. More than ${a.max} in one paragraph cannot be read safely, so the book is not read: split the paragraph or use fewer ${a.what === 'html' ? 'tags' : 'quotation marks'}`,
78
78
  },
79
79
  articleTooLarge: { ja: (a) => `本文のファイルが大きすぎる(${a.bytes} 字、${a.max} まで):章に分ける`, en: (a) => `the article file is too large (${a.bytes} characters, up to ${a.max}): split it into chapters` },
@@ -100,14 +100,14 @@ export const ARTICLE_MESSAGES = {
100
100
  articleImage: { ja: (a) => `画像 ${a.path} が作業フォルダにない`, en: (a) => `the image ${a.path} is not in the working folder` },
101
101
  articleDataArticle: { ja: (a) => `スライド ${a.slide} の data-article の節「${a.section}」が本文にない`, en: (a) => `slide ${a.slide}: data-article names “${a.section}”, which is not a section of the article` },
102
102
  articleCitations: { ja: (a) => (a.why === 'list' ? `egatari.json の metadata.citations.list「${a.value}」が違う(end・chapter・none のどれか)` : 'egatari.json の metadata.citations が object でない({"style": "apa", "list": "end"} のように書く)'), en: (a) => (a.why === 'list' ? `egatari.json metadata.citations.list “${a.value}” is not one of end, chapter, none` : 'egatari.json metadata.citations is not an object (write e.g. {"style": "apa", "list": "end"})') },
103
- articleCiteStyle: { ja: (a) => `引用の書式「${a.style}」はこの Studio にない:${a.fallback} で組んだ(使える書式:${a.styles.join('・')}。style はそのまま残す)`, en: (a) => `this Studio does not have the citation style “${a.style}”: used ${a.fallback} instead (available: ${a.styles.join(', ')}; style is kept as written)` },
103
+ articleCiteStyle: { ja: (a) => `引用の書式「${a.style}」はこの Studio にない:${a.fallback} で書いた(使える書式:${a.styles.join('・')}。style はそのまま残す)`, en: (a) => `this Studio does not have the citation style “${a.style}”: used ${a.fallback} instead (available: ${a.styles.join(', ')}; style is kept as written)` },
104
104
  articleCiteListChapter: { ja: () => 'metadata.citations.list が chapter だが、本文が章に分かれていない(article/ の章のファイルのときだけ):end にする', en: () => 'metadata.citations.list is chapter, but the article has no chapters (only with chapter files in article/): use end' },
105
- articleCiteEngine: { ja: (a) => `引用を書式で組めなかった(${a.why}):引用キーの字のまま書いた。references.json の項目を確かめる`, en: (a) => `could not format citations (${a.why}); wrote the citation keys instead: check the items in references.json` },
105
+ articleCiteEngine: { ja: (a) => `引用を書式に整えられなかった(${a.why}):引用キーの字のまま書いた。references.json の項目を確かめる`, en: (a) => `could not format citations (${a.why}); wrote the citation keys instead: check the items in references.json` },
106
106
  articleUncited: { ja: (a) => `本文で引いていない文献が ${a.count} 件ある(${a.keys.join('・')}${a.count > a.keys.length ? ' …' : ''}):一覧には出ない`, en: (a) => `${a.count} ${plural(a.count, 'reference')} never cited (${a.keys.join(', ')}${a.count > a.keys.length ? ', …' : ''}); ${a.count === 1 ? 'it is' : 'they are'} not listed` },
107
107
  articleLinksShape: { ja: (a) => `egatari.json の articleLinks の形が違う(${a.why}):その項目を消し、npm run ids で付け直す`, en: (a) => `egatari.json articleLinks has the wrong shape (${a.why}): remove it and run npm run ids to record the links again` },
108
108
  articleLinkStale: { ja: (a) => `スライドと本が合っていないかもしれません:スライド ${a.slide} と節${quoteJa(a.heading || a.section)}(${a.section})。つないだ後に${a.changed === 'article' ? '節' : a.changed === 'slide' ? 'スライドか台本' : '節とスライドの両方'}が変わった。読み比べて、合っていれば npm run ids -- --confirm-links で確かめた印を付ける(字は自動では直さない)`, en: (a) => `slides and book may not match: slide ${a.slide} and the section “${a.heading || a.section}” (${a.section}); ${a.changed === 'article' ? 'the section' : a.changed === 'slide' ? 'the slide or its script' : 'both the section and the slide'} changed after they were linked. Compare them; if they still agree, run npm run ids -- --confirm-links (nothing is changed automatically)` },
109
109
  articleLinkUnconfirmed: { ja: (a) => `スライドと節のつながり ${a.count} 組がまだ記録されていない(${a.pairs.join('、')}${a.count > a.pairs.length ? ' …' : ''}):npm run ids で記録すると、後でどちらかが変わったときに知らせる`, en: (a) => `${a.count} slide–section ${plural(a.count, 'link')} ${a.count === 1 ? 'is' : 'are'} not recorded yet (${a.pairs.join(', ')}${a.count > a.pairs.length ? ', …' : ''}): run npm run ids to record them, so that later changes on either side are reported` },
110
- articleLinkUnlinked: { ja: (a) => `egatari.json の articleLinks に、もうつながっていない組が ${a.count} 組ある(${a.pairs.join('、')}${a.count > a.pairs.length ? ' …' : ''}):Egatari ファイルに書き出すときに外す`, en: (a) => `egatari.json articleLinks records ${a.count} ${plural(a.count, 'pair')} that ${a.count === 1 ? 'is' : 'are'} no longer linked (${a.pairs.join(', ')}${a.count > a.pairs.length ? ', …' : ''}); ${a.count === 1 ? 'it is' : 'they are'} dropped when the Egatari file is written` },
110
+ articleLinkUnlinked: { ja: (a) => `egatari.json の articleLinks に、もうつながっていない組が ${a.count} 組ある(${a.pairs.join('、')}${a.count > a.pairs.length ? ' …' : ''}):Egatari ファイルにエクスポートするときに外す`, en: (a) => `egatari.json articleLinks records ${a.count} ${plural(a.count, 'pair')} that ${a.count === 1 ? 'is' : 'are'} no longer linked (${a.pairs.join(', ')}${a.count > a.pairs.length ? ', …' : ''}); ${a.count === 1 ? 'it is' : 'they are'} dropped when the Egatari file is written` },
111
111
  articleSummary: { ja: (a) => `本文:ファイル ${a.files}、節 ${a.sections}、名前 ${a.labels}`, en: (a) => `article: ${a.files} ${plural(a.files, 'file')}, ${a.sections} ${plural(a.sections, 'section')}, ${a.labels} ${plural(a.labels, 'label')}` },
112
112
  articleSectionUnlinked: { ja: (a) => `節${quoteJa(a.heading)}(${a.section})がどのスライドともつながっていない({step} のリンクか、スライドの data-article で結ぶ)`, en: (a) => `the section “${a.heading}” (${a.section}) is linked to no slide (add a {step} link or name it in a slide's data-article)` },
113
113
  };
@@ -86,7 +86,7 @@ export function numberArticle(article, lang) {
86
86
  const num = next('table'); // 名前がなくても番号を付ける(mystmd と同じ。§9C.1A)
87
87
  set(n, { kind: 'table', num, text: num ? `${W.table}${W.sp}${num}` : null });
88
88
  } else if (n.type === 'aside') {
89
- const num = next('aside'); // 名前がなくても番号を付ける(mystmd と同じ。§9C.1A)
89
+ const num = n.enumerated === false ? null : next('aside'); // 名前がなくても番号を付ける(mystmd と同じ。§9C.1A)。:nonumber: は数えない(§9C.2)
90
90
  set(n, { kind: 'aside', num, text: num ? `${W.aside}${W.sp}${num}` : null, title: titleOf(n) });
91
91
  } else if (n.type === 'exercise') {
92
92
  const num = n.enumerated === false ? null : next('exercise');
@@ -28,7 +28,7 @@ export const KINDS = Object.freeze(['preface', 'chapter', 'appendix', 'afterword
28
28
  // 前付けに書ける項目と型(§9C.2)
29
29
  const FM_MEMBERS = { title: 'string', subtitle: 'string', lang: 'lang', bibliography: 'string', 'writing-mode': 'mode', chapter: 'posint', kind: 'kind', numbering: 'boolean' };
30
30
  // 指令ごとに書ける option(§9C.2)
31
- const DIRECTIVES = { figure: ['label', 'alt'], table: ['label', 'class'], aside: ['label', 'class'], exercise: ['label', 'nonumber'], solution: ['label'], glossary: [] };
31
+ const DIRECTIVES = { figure: ['label', 'alt'], table: ['label', 'class'], aside: ['label', 'class', 'nonumber'], exercise: ['label', 'nonumber'], solution: ['label'], glossary: [] };
32
32
  const ROLES = new Set(['step', 'ruby', 'term', 'sub', 'sup']);
33
33
  const ADMONITIONS = new Set(['admonition', 'note', 'tip', 'hint', 'important', 'warning', 'caution', 'attention', 'danger', 'error', 'seealso', 'margin', 'sidebar', 'topic']);
34
34
  // 名前の決まり(§8.1・§9C.3・§9C.4)
@@ -307,6 +307,8 @@ export function parseArticleText(src, opts = {}) {
307
307
  return;
308
308
  }
309
309
  for (const k of Object.keys(opts0)) if (!allowed.includes(k)) add('error', 'articleOption', '§9C.2', node, { name, option: k });
310
+ // コラムの :nonumber:(§9C.2、wd-2026-11-18):番号を付けない。myst の aside は知らない項目を捨てるので、ここで写す(exercise と同じ enumerated: false)
311
+ if (name === 'aside' && Object.prototype.hasOwnProperty.call(opts0, 'nonumber')) for (const c of node.children || []) if (c.type === 'aside') c.enumerated = false;
310
312
  if (name === 'figure') figureDirective(node, parents);
311
313
  if (name === 'table') tableDirective(node);
312
314
  if (name === 'solution' && !String(node.args || '').trim()) add('error', 'articleSolutionLabel', '§9C.2', node);
@@ -53,6 +53,24 @@ export function localPartFile(env, P, deckDir, tag) {
53
53
  }
54
54
 
55
55
  export const DECK_META_RIGHTS = ['license', 'copyright', 'attribution', 'creators'];
56
+ // metadata.edits(format spec §3.6.1:ほかの人の教材を直した人の記録 [{by?, note?}]、古い順)を書く形にする。索引の metadata.edits と deck-meta.edits に使う。
57
+ // 形の合わない項目(object でない・by と note のほかの項目がある・by や note が文字でない)は捨て、その数を dropped に。by・note の前後の空白は除き、
58
+ // 空になったものは書かない(名前のない項目は {})。配列でなければ全体を捨てる。→ {edits(なければ null), dropped}
59
+ export function normalizeEdits(v) {
60
+ if (v === undefined) return { edits: null, dropped: 0 };
61
+ if (!Array.isArray(v)) return { edits: null, dropped: 1 };
62
+ const out = [];
63
+ let dropped = 0;
64
+ for (const x of v) {
65
+ const ok = x !== null && typeof x === 'object' && !Array.isArray(x) && Object.keys(x).every((k) => (k === 'by' || k === 'note') && typeof x[k] === 'string');
66
+ if (!ok) { dropped++; continue; }
67
+ const e = {};
68
+ for (const k of ['by', 'note']) if (typeof x[k] === 'string' && x[k].trim()) e[k] = x[k].trim();
69
+ out.push(e);
70
+ }
71
+ return { edits: out, dropped };
72
+ }
73
+ export const editsDroppedWarning = (n) => `metadata.edits: ${n} malformed ${n === 1 ? 'entry was' : 'entries were'} not copied (each entry is {by?, note?} with text values)`;
56
74
  // metadata.offer(format spec §1.2:作者が見せるモードと見え方、開くときの {mode, face})を書く形にする。deck-meta.offer と索引の metadata.offer に使う。
57
75
  // 前の版の learn は talk と読む(Player P1)。知らない値・重なりは捨て、空になった modes・faces は書かない。open は offer の中にあるものだけ。
58
76
  // 何も残らなければ null(書かない)
@@ -447,8 +465,8 @@ function fontCss(env, text, subset, lang, mincho = false, warn = [], more = {})
447
465
  for (const f of more.chosen || []) {
448
466
  if (!hasFont(env, f)) {
449
467
  // 別の包みの字体(f.extra)で、その包みを入れていない(env.fontsExtraMissing。Node の組み立て):入れ方を言う
450
- if (f.extra && env.fontsExtraMissing) warn.push(`${FONTS_EXTRA_WARN}字体「${f.family}」は ${FONTS_EXTRA_PKG} にあり、入っていないので埋め込まない(開く端末の字体で出る):${FONTS_EXTRA_INSTALL}(npx なら npx -p egatari -p ${FONTS_EXTRA_PKG} egatari …)/ the font "${f.family}" is in ${FONTS_EXTRA_PKG}, which is not installed, so it is not embedded: ${FONTS_EXTRA_INSTALL} (with npx: npx -p egatari -p ${FONTS_EXTRA_PKG} egatari …)`);
451
- else warn.push(`字体「${f.family}」の字がないので埋め込まない(開く端末の字体で出る)。npm ci`);
468
+ if (f.extra && env.fontsExtraMissing) warn.push(`${FONTS_EXTRA_WARN}フォント「${f.family}」は ${FONTS_EXTRA_PKG} にあり、入っていないので埋め込まない(開く端末のフォントで出る):${FONTS_EXTRA_INSTALL}(npx なら npx -p egatari -p ${FONTS_EXTRA_PKG} egatari …)/ the font "${f.family}" is in ${FONTS_EXTRA_PKG}, which is not installed, so it is not embedded: ${FONTS_EXTRA_INSTALL} (with npx: npx -p egatari -p ${FONTS_EXTRA_PKG} egatari …)`);
469
+ else warn.push(`フォント「${f.family}」の字がないので埋め込まない(開く端末のフォントで出る)。npm ci`);
452
470
  continue;
453
471
  }
454
472
  g = add(g, rangeCss(env, [f], text, false, subset));
@@ -512,7 +530,7 @@ function missingThemeWarning(env, name, used) {
512
530
  const ud = Array.isArray(env.themeDirs) && env.themeDirs.length > 0;
513
531
  const where = env.app ? (ud ? `選んだテーマのフォルダに ${name}/ を置くか、` : '編集アプリでは「テーマを読み込む…」で ZIP ファイルか自分のテーマのフォルダ(~/.egatari/themes など)から読み込むか、')
514
532
  : env.themeDirs ? 'EGATARI_THEMES・~/.egatari/themes に置くか、' : '編集アプリは利用者のテーマのフォルダ(EGATARI_THEMES・~/.egatari/themes)を読めないので、';
515
- return `theme not found: "${name}" — テーマ「${name}」が見つからないので ${used} で組む(探した場所:作業フォルダ、その themes/、利用者のテーマのフォルダ、同梱の themes/)。${where}作業フォルダの themes/${name}/ に置く`;
533
+ return `theme not found: "${name}" — テーマ「${name}」が見つからないので ${used} でビルドする(探した場所:作業フォルダ、その themes/、利用者のテーマのフォルダ、同梱の themes/)。${where}作業フォルダの themes/${name}/ に置く`;
516
534
  }
517
535
  // 同梱のテーマの版の固定(themes.lock.json。kit/core/themes-lock.mjs):教材が記録した前の版(作業フォルダの設定のファイルの themes、
518
536
  // 組み直す文書の索引から opts.themeVersions)なら、同梱の themes/<名前>/ の代わりにその版の写し vendor/themes/<名前>/<版>/ で組む。
@@ -859,7 +877,7 @@ export function build(env0, srcPath, opts = {}) {
859
877
  if (outside) { warn.push(`refused: 「${name}」は作業フォルダの外にある(読まない)`); return null; }
860
878
  // opts.missingFiles === 'warn':ないファイルは知らせて空のまま組む(編集アプリのメモリの上の原稿:deck.html だけを開いたときなど。
861
879
  // 既定(コマンド・フォルダ)は今までどおり断る)
862
- if (opts.missingFiles === 'warn') { if (!missingSeen.has(name)) { missingSeen.add(name); warn.push(`missing: 「${name}」が作業フォルダにない(空のまま組んだ)`); } return null; }
880
+ if (opts.missingFiles === 'warn') { if (!missingSeen.has(name)) { missingSeen.add(name); warn.push(`missing: 「${name}」が作業フォルダにない(空のままビルドした)`); } return null; }
863
881
  throw new Error('not found: ' + name);
864
882
  };
865
883
  // 取り込むたびに、回数と読んだ大きさ(読む前に。env を通して)と増える大きさ(置き換える前に)を数える(同じ小さなファイルを何万回も取り込ませない)
@@ -1042,7 +1060,7 @@ export function build(env0, srcPath, opts = {}) {
1042
1060
  // 置き換え先の版が手元にあるか・index.js の同一性の hash が変わるか(編集アプリが組み直しの知らせに使う)
1043
1061
  const lc = lock.components[name], ok = !!lc && lc.versions.includes(y.replacement);
1044
1062
  yankedUsed.push({ tag, name, version: pick.version, replacement: y.replacement, reason: y.reason, date: y.date, replacementAvailable: ok, sha256Changes: ok ? lc.sha256[pick.version] !== lc.sha256[y.replacement] : null });
1045
- warn.push(`yanked: ${tag} ${pick.version} was withdrawn by the component registry on ${y.date} (replacement ${y.replacement}; ${y.reason}). It is built as recorded, never replaced silently. To rebuild with ${y.replacement}, set "${name}": "${y.replacement}" under components in egatari.json (the editor has a button) / パーツライブラリが取り下げた版:記録のまま組む。黙って置き換えない`);
1063
+ warn.push(`yanked: ${tag} ${pick.version} was withdrawn by the component registry on ${y.date} (replacement ${y.replacement}; ${y.reason}). It is built as recorded, never replaced silently. To rebuild with ${y.replacement}, set "${name}": "${y.replacement}" under components in egatari.json (the editor has a button) / パーツライブラリが取り下げたバージョン:記録のままビルドする。黙って置き換えない`);
1046
1064
  }
1047
1065
  if (env.within(lib, compRoot)) { file = lib; componentVersions[name] = pick.version; }
1048
1066
  else { warn.push(`refused: パーツライブラリのパーツ ${tag} が vendor/components/ の外を指している(読まない)`); continue; }
@@ -1139,7 +1157,7 @@ export function build(env0, srcPath, opts = {}) {
1139
1157
  const headCss = `<style id="deck-base">\n${styleSafe(`${fonts.css}${kcss}\n${read(KIT, 'base.css')}\n${read(KIT, 'layouts.css')}\n${opts.articleCss || ''}\n${theme.css}\n${isJapanese(lang) ? '' : read(KIT, 'latin.css')}`)}</style>`;
1140
1158
  if (!/id="bar"/.test(html)) html = html.replace(/<\/body>/, '<div id="bar"></div><div id="jump"></div>\n</body>');
1141
1159
  // 作業フォルダの組み立ても、設定のファイルの metadata.completion を deck-meta に写す(format spec §9.2。再生器の記録が終えた判定を読む。1 ファイルと同じ)。
1142
- // 権利の表示と作成者(license・copyright・attribution・creators。§4・§7.3)と offer(§1.2)も写す:再生器のファイルの情報と開き方が deck-meta から出る。形の合わない値は写さない
1160
+ // 権利の表示と作成者(license・copyright・attribution・creators。§4・§7.3)、編集の記録(edits。§3.6.1)と offer(§1.2)も写す:再生器のファイルの情報と開き方が deck-meta から出る。形の合わない値は写さない
1143
1161
  const folderCompletion = () => {
1144
1162
  const cfg = P.join(deckDir, FORMAT.CONFIG_FILE);
1145
1163
  if (!env.exists(cfg) || !inDeck(cfg)) return {};
@@ -1151,6 +1169,10 @@ export function build(env0, srcPath, opts = {}) {
1151
1169
  const v = md[k];
1152
1170
  if (k === 'creators' ? Array.isArray(v) && v.every((x) => typeof x === 'string') : typeof v === 'string') out[k] = k === 'creators' ? [...v] : v;
1153
1171
  }
1172
+ // 編集の記録(§3.6.1・§7.3):再生器のファイルの情報が「編集」を出す。形の合わない項目は写さず知らせる
1173
+ const ed = normalizeEdits(md.edits);
1174
+ if (ed.edits) out.edits = ed.edits;
1175
+ if (ed.dropped) warn.push(editsDroppedWarning(ed.dropped));
1154
1176
  // 見せるモードと見え方(format spec §1.2、Player P1):再生器が deck-meta.offer を読む
1155
1177
  const offer = normalizeOffer(md.offer);
1156
1178
  if (offer) out.offer = offer;
@@ -13,12 +13,14 @@ export const IN_EDITOR = Object.freeze([
13
13
  'slideId', 'legacyDataKey', 'legacyIndex', 'legacyColorClass', 'legacyStepAttr', 'legacyLectureMode', 'colorOutside', 'narrHeadingDiffers',
14
14
  'kickerLong', 'kickerPlace', 'kickerSlide',
15
15
  'cautionEmpty', 'cautionLabel',
16
+ // 組み立てた文書の埋め込み画像から(kit/core/image-size.mjs)
17
+ 'imgTooLarge', 'imgTotal',
16
18
  'narrNote', 'narrFormula', 'turnLong', 'narrLang', 'predictAnswerWithCount', 'predictAnswerNeverShown',
17
19
  // app/main.js・app/llm.js(作業場所の原稿と台本から)
18
20
  'refVoice', 'audioStale', 'narrPlaceholder', 'templateText', 'readingExpr', 'readingSeveral', 'readingGap',
19
21
  // 体裁の検査(kit/core/layout-scan.mjs。bodyBottom・bodyRight は EDITOR_ALIAS)
20
22
  'titleLong', 'titleLongEn', 'titleColon', 'tateTitle', 'conclLong', 'conclLongEn', 'conclOverflow', 'tateBodyHead', 'bodyConclCol', 'bodyLeft',
21
- 'smallText', 'smallSvgText', 'textClipped', 'svgTextOut', 'svgTextBox', 'outsideBody', 'textOffSlide', 'textOverlap', 'cellWordBreak',
23
+ 'smallText', 'smallSvgText', 'textClipped', 'svgTextOut', 'svgTextBox', 'outsideBody', 'partSvgOut', 'colOverflow', 'textOffSlide', 'textOverlap', 'cellWordBreak',
22
24
  'secHeading', 'textContrast', 'cardsHint',
23
25
  // 描いた図の形(kit/core/geometry-check.mjs。R-geometry)
24
26
  'geoEdgeThroughBox', 'geoLineOverLabel', 'geoLabelOverlap', 'geoLabelOutsideBox', 'geoTateSlides',
@@ -41,7 +41,7 @@ const ATTACH = ['attachBadConfig', 'attachBadName', 'attachExcluded', 'attachDup
41
41
 
42
42
  export const RULES = Object.freeze([
43
43
  // ---- 作者への決まり(R-*)
44
- { id: 'R-fit', kind: 'authoring', phase: 'A 体裁', codes: ['bodyBottom', 'bodyRight', 'tateBodyHead', 'bodyConclCol', 'bodyLeft', 'smallText', 'smallSvgText', 'textClipped', 'svgTextOut', 'svgTextBox', 'outsideBody', 'textOffSlide', 'textOverlap', 'cellWordBreak', 'compLayout'] },
44
+ { id: 'R-fit', kind: 'authoring', phase: 'A 体裁', codes: ['bodyBottom', 'bodyRight', 'tateBodyHead', 'bodyConclCol', 'bodyLeft', 'smallText', 'smallSvgText', 'textClipped', 'svgTextOut', 'svgTextBox', 'outsideBody', 'partSvgOut', 'colOverflow', 'textOffSlide', 'textOverlap', 'cellWordBreak', 'compLayout'] },
45
45
  { id: 'R-title', kind: 'authoring', phase: 'A 体裁', codes: ['titleLong', 'titleLongEn', 'titleColon', 'tateTitle'] },
46
46
  { id: 'R-concl', kind: 'authoring', phase: 'A 体裁', codes: ['conclLong', 'conclLongEn', 'conclOverflow'] },
47
47
  { id: 'R-headings', kind: 'authoring', phase: 'A 体裁', codes: ['secHeading', 'narrHeadingDiffers', 'kickerLong', 'kickerPlace', 'kickerSlide'] },
@@ -67,6 +67,7 @@ export const RULES = Object.freeze([
67
67
  // ---- 検査器の族(C-*)
68
68
  { id: 'C-build', kind: 'checker', phase: '読み込み', codes: ['build', 'consoleError', 'extensionVersion', 'component-requires-missing', 'component-not-in-catalogue'] },
69
69
  { id: 'C-ids', kind: 'checker', phase: '読み込み', codes: ['slideId', 'legacyDataKey', 'legacyIndex'] },
70
+ { id: 'C-images', kind: 'checker', phase: '読み込み', codes: ['imgTooLarge', 'imgTotal'] },
70
71
  { id: 'C-vocab', kind: 'checker', phase: '読み込み', codes: ['legacyColorClass', 'legacyStepAttr', 'legacyLectureMode'] },
71
72
  { id: 'C-template', kind: 'checker', phase: 'B 台本', codes: ['templateText', 'narrPlaceholder'] },
72
73
  { id: 'C-font', kind: 'checker', phase: 'A 体裁', codes: ['themeMetricsDrift', 'metricsFontLoad', 'themeMetricsInvalid', 'fontsExtraMissing', 'fontNotCovered', 'fontNotEmbedded'] },
@@ -101,7 +102,8 @@ export function factsFromSource({ deck = '', narration = '', audio = false, atta
101
102
  };
102
103
  }
103
104
 
104
- export function account({ results, visited = null, facts = {}, inEditor = false }) {
105
+ // noBrowser(check --no-browser、#215 (c)):通らなかった段の決まりは null(incomplete)でなく skipped(noBrowser)。原稿で見た分にエラーがあれば failed
106
+ export function account({ results, visited = null, facts = {}, inEditor = false, noBrowser = false }) {
105
107
  const by = new Map(RULES.map((r) => [r.id, { error: 0, warning: 0, info: 0, codes: new Set() }]));
106
108
  const problems = [];
107
109
  for (const x of results) {
@@ -118,14 +120,14 @@ export function account({ results, visited = null, facts = {}, inEditor = false
118
120
  const base = { id: r.id, kind: r.kind };
119
121
  let state, reason;
120
122
  if (inEditor && cliOnlyRule(r)) { state = 'skipped'; reason = 'notInEditor'; }
121
- else if (!inEditor && visited && !visited.has(r.phase)) state = null;
123
+ else if (!inEditor && visited && !visited.has(r.phase)) { if (noBrowser) { state = counts.error ? 'failed' : 'skipped'; reason = 'noBrowser'; } else state = null; }
122
124
  else {
123
125
  reason = r.applies ? r.applies(facts) : null;
124
126
  if (reason) state = 'excused';
125
127
  else if (r.skips && (reason = r.skips(facts))) state = 'skipped';
126
128
  else state = counts.error ? 'failed' : 'checked';
127
129
  }
128
- if ((state === 'excused' || state === 'skipped') && codes.length) problems.push(`${r.id}: ${state} (${reason}) but reported ${codes.join(', ')}`);
130
+ if ((state === 'excused' || state === 'skipped') && reason !== 'noBrowser' && codes.length) problems.push(`${r.id}: ${state} (${reason}) but reported ${codes.join(', ')}`);
129
131
  return { ...base, state, reason: reason || null, counts, codes };
130
132
  });
131
133
  const unset = rules.filter((r) => r.state === null).map((r) => r.id);
@@ -26,9 +26,9 @@ export const COLAB_VERIFIED = Object.freeze({
26
26
  // handoff/audio-flow-2026-10-25.md §4 の cloud.c2Steps・§7。時間の目安は T4 のものだけ(CPU の数は実測してから足す)
27
27
  export const COLAB_STEPS = Object.freeze({
28
28
  ja: Object.freeze([
29
- '右上の「接続」を押す(T4 GPU につなぎます)。つながらないと知らせが出たら、メニューの「ランタイム」→「ランタイムのタイプを変更」で「CPU」を選んでから、もう一度「接続」(CPU でも作れますが、時間がかかります)',
29
+ '右上の「接続」を押す(T4 GPU に接続します)。接続できないと知らせが出たら、メニューの「ランタイム」→「ランタイムのタイプを変更」で「CPU」を選んでから、もう一度「接続」(CPU でも作れますが、時間がかかります)',
30
30
  '「ランタイム」→「すべてのセルを実行」',
31
- 'ファイルを選ぶ画面が出たら、書き出したファイルを選ぶ',
31
+ 'ファイルを選ぶ画面が出たら、エクスポートしたファイルを選ぶ',
32
32
  '終わると音声の ZIP ファイルがダウンロードされます',
33
33
  ]),
34
34
  en: Object.freeze([
@@ -45,7 +45,7 @@ export const JOB = Object.freeze({ tag: 'tts-job', recordsTag: 'tts-records', v:
45
45
  export const COLAB = Object.freeze({
46
46
  repo: 'egatari/egatari-studio', notebook: 'colab/egatari-tts.ipynb',
47
47
  videoNotebook: 'colab/egatari-video.ipynb', // 動画(MP4)を作るノート(CPU のランタイム。#131)
48
- ref: 'v0.6.13', // バッジの URL は版のタグに固定する(リリースの手順で替える。RELEASING.md)
48
+ ref: 'v0.6.15', // バッジの URL は版のタグに固定する(リリースの手順で替える。RELEASING.md)
49
49
  pause: 0.35,
50
50
  models: Object.freeze({ irodori: 'irodori-tts-500m-v3', kokoro: 'kokoro-82m-v1.0' }),
51
51
  // 後処理の版(records の recipe.processing は PROCESSING に '+colab<ノートブックの版>' を付けたもの):ノートブック(colab/egatari_tts.py)の後処理は audio-core.mjs と同じ数。数を変えたら名前も変える
@@ -11,6 +11,12 @@ export function normPin(p) {
11
11
  return { x: clamp(p.x, SLIDE_W), y: clamp(p.y, SLIDE_H) };
12
12
  }
13
13
 
14
+ // マーカーの重心の下のパーツ。名前はタグ、id は data-id(なければ省略)。未知の項目は残さない。
15
+ export function normPart(p) {
16
+ if (!p || typeof p !== 'object' || Array.isArray(p) || typeof p.name !== 'string' || !/^m-[^\s<>]*$/.test(p.name) || p.name.length > 100) return null;
17
+ return { name: p.name, ...(typeof p.id === 'string' && p.id ? { id: p.id.replace(/\s+/g, ' ').trim().slice(0, 200) } : {}) };
18
+ }
19
+
14
20
  // strokes:編集モードのマーカー(コメントのペン、m)で描いた線。1 つのメモに線は何本でも(丸と矢印など。STROKES_MAX 本まで)。
15
21
  // 線はスライドの座標の点の並び [[x, y], …](1280×720、表示の倍率によらない)。形は docs/contract.md「Review notes」(§13)
16
22
  // pin と同じく信頼しない知らせが元なので、線ごとに:配列でなければ・点(有限の数の組)が 2 つに満たなければその線は捨てる。
@@ -0,0 +1,35 @@
1
+ // 埋め込んだ画像の大きさ(data: URI を戻したバイト数)。組み立てた HTML をコマンド版と編集アプリで同じように調べる
2
+ import { parse } from 'parse5';
3
+
4
+ const MAX_IMAGE_BYTES = 1048576;
5
+ const attr = (n, name) => (n.attrs || []).find((a) => a.name === name)?.value || '';
6
+ function dataBytes(src) {
7
+ const m = /^data:([^,]*),([\s\S]*)$/i.exec(src.trim());
8
+ if (!m) return null;
9
+ if (!/;base64$/i.test(m[1])) return new TextEncoder().encode(m[2].replace(/%[\da-f]{2}/gi, 'a')).length;
10
+ let data;
11
+ try { data = decodeURIComponent(m[2]).replace(/\s/g, ''); } catch { return null; }
12
+ if (!/^[a-z\d+/]*={0,2}$/i.test(data) || data.length % 4 === 1) return null;
13
+ return Math.floor(data.replace(/=+$/, '').length * 3 / 4);
14
+ }
15
+
16
+ export function imageSizeFindings(html) {
17
+ const out = [];
18
+ let index = 0, count = 0, total = 0;
19
+ const walk = (n, i = null) => {
20
+ // パーツの画像はパーツ自身が知らせる。見本の文字列やテンプレートの画像も数えない
21
+ if (/^m-/.test(n.tagName || '') || ['script', 'style', 'template', 'textarea'].includes(n.tagName)) return;
22
+ if (n.tagName === 'section' && attr(n, 'class').split(/\s+/).includes('slide')) i = index++;
23
+ if (n.tagName === 'img') {
24
+ const bytes = dataBytes(attr(n, 'src'));
25
+ if (bytes !== null) {
26
+ count++; total += bytes;
27
+ if (bytes > MAX_IMAGE_BYTES) out.push({ i, sev: 'warn', code: 'imgTooLarge', a: { image: count, n: bytes, max: MAX_IMAGE_BYTES } });
28
+ }
29
+ }
30
+ for (const c of n.childNodes || []) walk(c, i);
31
+ };
32
+ walk(parse(String(html)));
33
+ if (count) out.push({ i: null, sev: 'info', code: 'imgTotal', a: { n: total, count } });
34
+ return out;
35
+ }