egatari 0.6.4 → 0.6.5-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 (383) hide show
  1. package/NOTICE +36 -0
  2. package/README.ja.md +16 -4
  3. package/README.md +16 -4
  4. package/bin/egatari.mjs +86 -3
  5. package/components.lock.json +246 -123
  6. package/components2.lock.json +824 -1
  7. package/kit/article-steps.mjs +27 -0
  8. package/kit/build.mjs +50 -1
  9. package/kit/check-messages.mjs +15 -7
  10. package/kit/check.mjs +40 -7
  11. package/kit/cli-hint.mjs +27 -0
  12. package/kit/core/article-cite.mjs +188 -0
  13. package/kit/core/article-links.mjs +174 -0
  14. package/kit/core/article-messages.mjs +115 -0
  15. package/kit/core/article-page.mjs +183 -0
  16. package/kit/core/article-render.mjs +410 -0
  17. package/kit/core/article-text.mjs +501 -0
  18. package/kit/core/article.mjs +266 -0
  19. package/kit/core/build-core.mjs +49 -9
  20. package/kit/core/citeproc-credit.mjs +3 -0
  21. package/kit/core/colab-core.mjs +1 -1
  22. package/kit/core/components-lock.mjs +18 -0
  23. package/kit/core/llm-fix.mjs +2 -1
  24. package/kit/core/llm-pack-assemble.mjs +5 -3
  25. package/kit/core/llm-pack-data.mjs +63 -80
  26. package/kit/core/new-deck.mjs +1 -1
  27. package/kit/core/part-labels.mjs +17 -5
  28. package/kit/core/parts2.mjs +11 -1
  29. package/kit/core/player.mjs +1 -1
  30. package/kit/core/portable.mjs +132 -16
  31. package/kit/core/quote-ja.mjs +5 -0
  32. package/kit/core/themes-lock.mjs +16 -0
  33. package/kit/core/tier-a.mjs +47 -3
  34. package/kit/deck.js +195 -45
  35. package/kit/instruction-version.json +3 -0
  36. package/kit/layouts.css +11 -10
  37. package/kit/panes.js +1288 -0
  38. package/kit/player.json +1 -1
  39. package/kit/player.lock.json +2 -2
  40. package/kit/tools.js +81 -20
  41. package/kit/track.js +308 -0
  42. package/package.json +20 -3
  43. package/render/only.mjs +21 -0
  44. package/render/render.mjs +11 -8
  45. package/tools/ids.mjs +74 -9
  46. package/tools/portable.mjs +2 -0
  47. package/tools/sheet.mjs +5 -3
  48. package/vendor/components/CATALOG.md +4 -4
  49. package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/CHANGELOG.md +37 -0
  50. package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/README.md +58 -0
  51. package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/demo.html +121 -0
  52. package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/index.js +894 -0
  53. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/CHANGELOG.md +44 -0
  54. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/README.md +32 -0
  55. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/demo.html +57 -0
  56. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/ABCJS-ADAPTER.md +101 -0
  57. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/LICENSE-abcjs.txt +21 -0
  58. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/chords.json +89 -0
  59. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/doremi.json +261 -0
  60. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/extras.json +192 -0
  61. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/kaeru.json +521 -0
  62. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/rhythm.json +248 -0
  63. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/ties.json +360 -0
  64. package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/index.js +474 -0
  65. package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/CHANGELOG.md +28 -0
  66. package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/README.md +21 -0
  67. package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/demo.html +32 -0
  68. package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/index.js +139 -0
  69. package/vendor/components/sha256/03550bb20d425aa926258bab18b03bbc0cee292072e01bb6c78c429b3ae92c34/README.md +42 -0
  70. package/vendor/components/sha256/03550bb20d425aa926258bab18b03bbc0cee292072e01bb6c78c429b3ae92c34/index.js +250 -0
  71. package/vendor/components/sha256/07013c263cc595382dbcfd4931ca8b016f9dfb673440adf28911c95bd465cf9d/README.md +22 -0
  72. package/vendor/components/sha256/07013c263cc595382dbcfd4931ca8b016f9dfb673440adf28911c95bd465cf9d/index.js +41 -0
  73. package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/CHANGELOG.md +25 -0
  74. package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/README.md +35 -0
  75. package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/demo.html +40 -0
  76. package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/index.js +731 -0
  77. package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/CHANGELOG.md +19 -0
  78. package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/README.md +21 -0
  79. package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/demo.html +33 -0
  80. package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/index.js +106 -0
  81. package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/CHANGELOG.md +21 -0
  82. package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/README.md +34 -0
  83. package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/demo.html +77 -0
  84. package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/index.js +200 -0
  85. package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/CHANGELOG.md +31 -0
  86. package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/README.md +43 -0
  87. package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/demo.html +47 -0
  88. package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/index.js +484 -0
  89. package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/CHANGELOG.md +23 -0
  90. package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/README.md +44 -0
  91. package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/demo.html +43 -0
  92. package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/index.js +266 -0
  93. package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/CHANGELOG.md +34 -0
  94. package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/README.md +44 -0
  95. package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/demo.html +56 -0
  96. package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/index.js +429 -0
  97. package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/CHANGELOG.md +25 -0
  98. package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/README.md +42 -0
  99. package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/demo.html +115 -0
  100. package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/index.js +384 -0
  101. package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/CHANGELOG.md +19 -0
  102. package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/README.md +38 -0
  103. package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/demo.html +72 -0
  104. package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/index.js +248 -0
  105. package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/CHANGELOG.md +19 -0
  106. package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/README.md +36 -0
  107. package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/demo.html +70 -0
  108. package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/index.js +167 -0
  109. package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/CHANGELOG.md +34 -0
  110. package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/README.md +32 -0
  111. package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/demo.html +51 -0
  112. package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/index.js +302 -0
  113. package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/CHANGELOG.md +41 -0
  114. package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/README.md +35 -0
  115. package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/demo.html +66 -0
  116. package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/index.js +352 -0
  117. package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/CHANGELOG.md +35 -0
  118. package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/README.md +35 -0
  119. package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/demo.html +40 -0
  120. package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/index.js +747 -0
  121. package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/CHANGELOG.md +35 -0
  122. package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/README.md +43 -0
  123. package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/demo.html +89 -0
  124. package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/index.js +323 -0
  125. package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/CHANGELOG.md +24 -0
  126. package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/README.md +40 -0
  127. package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/demo.html +70 -0
  128. package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/index.js +561 -0
  129. package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/CHANGELOG.md +27 -0
  130. package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/README.md +50 -0
  131. package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/demo.html +44 -0
  132. package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/index.js +464 -0
  133. package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/CHANGELOG.md +23 -0
  134. package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/README.md +44 -0
  135. package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/demo.html +56 -0
  136. package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/index.js +402 -0
  137. package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/CHANGELOG.md +27 -0
  138. package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/README.md +49 -0
  139. package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/demo.html +44 -0
  140. package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/index.js +354 -0
  141. package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/CHANGELOG.md +20 -0
  142. package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/README.md +50 -0
  143. package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/demo.html +61 -0
  144. package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/index.js +141 -0
  145. package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/CHANGELOG.md +42 -0
  146. package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/README.md +32 -0
  147. package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/demo.html +54 -0
  148. package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/index.js +315 -0
  149. package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/CHANGELOG.md +30 -0
  150. package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/README.md +38 -0
  151. package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/demo.html +72 -0
  152. package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/index.js +267 -0
  153. package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/CHANGELOG.md +16 -0
  154. package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/README.md +27 -0
  155. package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/demo.html +42 -0
  156. package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/index.js +121 -0
  157. package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/CHANGELOG.md +33 -0
  158. package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/README.md +41 -0
  159. package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/demo.html +70 -0
  160. package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/index.js +592 -0
  161. package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/CHANGELOG.md +23 -0
  162. package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/README.md +43 -0
  163. package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/demo.html +47 -0
  164. package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/index.js +483 -0
  165. package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/CHANGELOG.md +19 -0
  166. package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/README.md +34 -0
  167. package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/demo.html +60 -0
  168. package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/index.js +209 -0
  169. package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/CHANGELOG.md +30 -0
  170. package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/README.md +79 -0
  171. package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/demo.html +50 -0
  172. package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/index.js +351 -0
  173. package/vendor/components/sha256/577008a069e7eb08057705a0800d975e82c8dfe0d0ba5fbf4f8974af7b298a7f/README.md +53 -0
  174. package/vendor/components/sha256/577008a069e7eb08057705a0800d975e82c8dfe0d0ba5fbf4f8974af7b298a7f/index.js +310 -0
  175. package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/CHANGELOG.md +20 -0
  176. package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/README.md +75 -0
  177. package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/demo.html +50 -0
  178. package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/index.js +342 -0
  179. package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/CHANGELOG.md +24 -0
  180. package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/README.md +26 -0
  181. package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/demo.html +48 -0
  182. package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/index.js +97 -0
  183. package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/CHANGELOG.md +22 -0
  184. package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/README.md +64 -0
  185. package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/demo.html +97 -0
  186. package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/index.js +875 -0
  187. package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/CHANGELOG.md +21 -0
  188. package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/README.md +50 -0
  189. package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/demo.html +63 -0
  190. package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/index.js +219 -0
  191. package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/CHANGELOG.md +28 -0
  192. package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/README.md +35 -0
  193. package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/demo.html +73 -0
  194. package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/index.js +228 -0
  195. package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/CHANGELOG.md +34 -0
  196. package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/README.md +65 -0
  197. package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/demo.html +97 -0
  198. package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/index.js +920 -0
  199. package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/CHANGELOG.md +31 -0
  200. package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/README.md +39 -0
  201. package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/demo.html +66 -0
  202. package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/index.js +304 -0
  203. package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/CHANGELOG.md +31 -0
  204. package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/README.md +40 -0
  205. package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/demo.html +92 -0
  206. package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/index.js +424 -0
  207. package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/CHANGELOG.md +26 -0
  208. package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/README.md +57 -0
  209. package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/demo.html +121 -0
  210. package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/index.js +875 -0
  211. package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/CHANGELOG.md +20 -0
  212. package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/README.md +46 -0
  213. package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/demo.html +112 -0
  214. package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/index.js +443 -0
  215. package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/CHANGELOG.md +22 -0
  216. package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/README.md +35 -0
  217. package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/demo.html +69 -0
  218. package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/index.js +217 -0
  219. package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/CHANGELOG.md +46 -0
  220. package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/LICENSE-strokesvg.txt +115 -0
  221. package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/OFL.txt +93 -0
  222. package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/README.md +30 -0
  223. package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/demo.html +40 -0
  224. package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/index.js +749 -0
  225. package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/strokes-CHANGES.md +20 -0
  226. package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/CHANGELOG.md +40 -0
  227. package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/README.md +36 -0
  228. package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/demo.html +52 -0
  229. package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/index.js +268 -0
  230. package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/CHANGELOG.md +31 -0
  231. package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/README.md +46 -0
  232. package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/demo.html +112 -0
  233. package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/index.js +481 -0
  234. package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/CHANGELOG.md +36 -0
  235. package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/README.md +73 -0
  236. package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/demo.html +76 -0
  237. package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/index.js +805 -0
  238. package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/CHANGELOG.md +24 -0
  239. package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/README.md +35 -0
  240. package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/demo.html +53 -0
  241. package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/index.js +481 -0
  242. package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/CHANGELOG.md +41 -0
  243. package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/LICENSE-strokesvg.txt +115 -0
  244. package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/OFL.txt +93 -0
  245. package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/README.md +33 -0
  246. package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/demo.html +40 -0
  247. package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/index.js +749 -0
  248. package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/strokes-CHANGES.md +20 -0
  249. package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/CHANGELOG.md +35 -0
  250. package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/README.md +35 -0
  251. package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/demo.html +53 -0
  252. package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/index.js +521 -0
  253. package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/CHANGELOG.md +32 -0
  254. package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/README.md +39 -0
  255. package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/demo.html +70 -0
  256. package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/index.js +166 -0
  257. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/CHANGELOG.md +56 -0
  258. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/README.md +35 -0
  259. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/demo.html +57 -0
  260. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/ABCJS-ADAPTER.md +101 -0
  261. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/LICENSE-abcjs.txt +21 -0
  262. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/chords.json +89 -0
  263. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/doremi.json +261 -0
  264. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/extras.json +192 -0
  265. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/kaeru.json +521 -0
  266. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/rhythm.json +248 -0
  267. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/ties.json +360 -0
  268. package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/index.js +508 -0
  269. package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/CHANGELOG.md +31 -0
  270. package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/README.md +34 -0
  271. package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/demo.html +77 -0
  272. package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/index.js +222 -0
  273. package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/CHANGELOG.md +30 -0
  274. package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/README.md +50 -0
  275. package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/demo.html +61 -0
  276. package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/index.js +171 -0
  277. package/vendor/components/sha256/bd590a6619f80d659299e4e558f770e75244360450939d504a4eaf7989b0eb97/README.md +21 -0
  278. package/vendor/components/sha256/bd590a6619f80d659299e4e558f770e75244360450939d504a4eaf7989b0eb97/index.js +93 -0
  279. package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/CHANGELOG.md +18 -0
  280. package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/README.md +21 -0
  281. package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/demo.html +32 -0
  282. package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/index.js +53 -0
  283. package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/CHANGELOG.md +20 -0
  284. package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/README.md +40 -0
  285. package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/demo.html +92 -0
  286. package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/index.js +399 -0
  287. package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/CHANGELOG.md +28 -0
  288. package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/README.md +36 -0
  289. package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/demo.html +70 -0
  290. package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/index.js +179 -0
  291. package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/CHANGELOG.md +25 -0
  292. package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/README.md +32 -0
  293. package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/demo.html +54 -0
  294. package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/index.js +251 -0
  295. package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/CHANGELOG.md +34 -0
  296. package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/README.md +35 -0
  297. package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/demo.html +69 -0
  298. package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/index.js +244 -0
  299. package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/CHANGELOG.md +19 -0
  300. package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/README.md +44 -0
  301. package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/demo.html +44 -0
  302. package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/index.js +334 -0
  303. package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/CHANGELOG.md +37 -0
  304. package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/README.md +43 -0
  305. package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/demo.html +75 -0
  306. package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/index.js +348 -0
  307. package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/CHANGELOG.md +20 -0
  308. package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/README.md +39 -0
  309. package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/demo.html +70 -0
  310. package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/index.js +134 -0
  311. package/vendor/components/sha256/d4159ba1206d094364b7735750e5e2532aeabbc299e0d6858e3a0edb84495e11/README.md +22 -0
  312. package/vendor/components/sha256/d4159ba1206d094364b7735750e5e2532aeabbc299e0d6858e3a0edb84495e11/index.js +59 -0
  313. package/vendor/components/sha256/d92842c606795528d1246ddb050ac275e1b72659629185750a6e9ac7fdb763a3/README.md +20 -0
  314. package/vendor/components/sha256/d92842c606795528d1246ddb050ac275e1b72659629185750a6e9ac7fdb763a3/index.js +162 -0
  315. package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/CHANGELOG.md +33 -0
  316. package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/README.md +46 -0
  317. package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/demo.html +43 -0
  318. package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/index.js +278 -0
  319. package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/CHANGELOG.md +15 -0
  320. package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/README.md +25 -0
  321. package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/demo.html +48 -0
  322. package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/index.js +88 -0
  323. package/vendor/components/sha256/de9607f86221006e7bad43f1f661c751d9a6f8f9c62da5c7e0d7f1249b9afcd6/README.md +25 -0
  324. package/vendor/components/sha256/de9607f86221006e7bad43f1f661c751d9a6f8f9c62da5c7e0d7f1249b9afcd6/index.js +122 -0
  325. package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/CHANGELOG.md +20 -0
  326. package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/README.md +23 -0
  327. package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/demo.html +236 -0
  328. package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/index.js +572 -0
  329. package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/CHANGELOG.md +29 -0
  330. package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/README.md +23 -0
  331. package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/demo.html +33 -0
  332. package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/index.js +121 -0
  333. package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/CHANGELOG.md +29 -0
  334. package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/README.md +32 -0
  335. package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/demo.html +56 -0
  336. package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/index.js +232 -0
  337. package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/CHANGELOG.md +25 -0
  338. package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/README.md +71 -0
  339. package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/demo.html +76 -0
  340. package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/index.js +777 -0
  341. package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/CHANGELOG.md +33 -0
  342. package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/README.md +28 -0
  343. package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/demo.html +236 -0
  344. package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/index.js +600 -0
  345. package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/CHANGELOG.md +16 -0
  346. package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/README.md +38 -0
  347. package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/demo.html +115 -0
  348. package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/index.js +361 -0
  349. package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/CHANGELOG.md +27 -0
  350. package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/README.md +27 -0
  351. package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/demo.html +42 -0
  352. package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/index.js +233 -0
  353. package/vendor/components/sha256/f268cf809438c8af63a42f9c9121110fc7263e4d705c40c6206ce46cf7ec167b/README.md +23 -0
  354. package/vendor/components/sha256/f268cf809438c8af63a42f9c9121110fc7263e4d705c40c6206ce46cf7ec167b/index.js +180 -0
  355. package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/CHANGELOG.md +31 -0
  356. package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/README.md +36 -0
  357. package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/demo.html +50 -0
  358. package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/index.js +263 -0
  359. package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/CHANGELOG.md +20 -0
  360. package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/README.md +39 -0
  361. package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/demo.html +66 -0
  362. package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/index.js +258 -0
  363. package/vendor/components/sha256/fadd24868e2730ec14b8f3f1e9cb75b8577a48b8d71beaa12ef089f7a3ba0a7d/README.md +22 -0
  364. package/vendor/components/sha256/fadd24868e2730ec14b8f3f1e9cb75b8577a48b8d71beaa12ef089f7a3ba0a7d/index.js +37 -0
  365. package/vendor/components/sha256/faf6a2f0b5df589639de624e75c5b20594f517e4426f6415d152809249b00b92/README.md +19 -0
  366. package/vendor/components/sha256/faf6a2f0b5df589639de624e75c5b20594f517e4426f6415d152809249b00b92/index.js +200 -0
  367. package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/CHANGELOG.md +25 -0
  368. package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/README.md +32 -0
  369. package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/demo.html +51 -0
  370. package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/index.js +270 -0
  371. package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/CHANGELOG.md +19 -0
  372. package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/README.md +34 -0
  373. package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/demo.html +60 -0
  374. package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/index.js +209 -0
  375. package/vendor/components-2/manifest-2.2.0.json +1868 -0
  376. package/vendor/csl/SOURCE.json +17 -0
  377. package/vendor/csl/locales/locales-en-US.xml +864 -0
  378. package/vendor/csl/locales/locales-ja-JP.xml +676 -0
  379. package/vendor/csl/styles/apa.csl +2278 -0
  380. package/vendor/csl/styles/ieee.csl +519 -0
  381. package/vendor/csl/styles/sist02.csl +273 -0
  382. package/vendor/egatari-spec/SOURCE.json +3 -3
  383. package/vendor/egatari-spec/schema/deck-meta.schema.json +6 -0
@@ -0,0 +1,27 @@
1
+ // 本文のステップへのリンクの行き先(format spec §9C.8 の 1:ないスライド・ないステップへのリンクは誤りで、書き出さない)を、
2
+ // 組んだ文書を再生器(ヘッドレスのブラウザ、kit/browser.mjs)で開いて DECK.resolveFragment で確かめる。check(kit/check.mjs の M)と同じ確かめ方。
3
+ // 1 ファイルへの書き出し(kit/core/portable.mjs)が nodeEnv.articleSteps を通して使う
4
+ import fs from 'node:fs';
5
+ import os from 'node:os';
6
+ import path from 'node:path';
7
+ import { launch, fileUrl } from './browser.mjs';
8
+ import { STEP_PROBE } from './core/article.mjs';
9
+
10
+ // html:組んだ文書の字。links:"<slideKey>:<stepKey>" の並び。返すもの:{リンク → {error, max} か {legacy, id}}
11
+ export async function resolveStepLinks(html, links) {
12
+ if (!links.length) return {};
13
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'egatari-steps-'));
14
+ const file = path.join(dir, 'deck.html');
15
+ let browser = null;
16
+ try {
17
+ fs.writeFileSync(file, html);
18
+ browser = await launch();
19
+ const page = await browser.newPage({ viewport: { width: 1280, height: 720 } });
20
+ await page.goto(fileUrl(file));
21
+ await page.waitForFunction(() => window.DECK && DECK.ready, null, { timeout: 30000 }); // eslint-disable-line no-undef
22
+ return await page.evaluate(STEP_PROBE, links);
23
+ } finally {
24
+ if (browser) await browser.close().catch(() => {});
25
+ fs.rmSync(dir, { recursive: true, force: true });
26
+ }
27
+ }
package/kit/build.mjs CHANGED
@@ -23,6 +23,7 @@
23
23
  // narration.md(口述原稿)、timeline.json(秒数の調整)、audio/manifest.json(TTS の出力)、macros.tex(数式のマクロ)
24
24
  //
25
25
  // 組む本体は kit/core/build-core.mjs(ブラウザの編集アプリと共有)。ここは Node の読み書き・字の絞り込み(fonttools)・音声の圧縮(ffmpeg)・CLI
26
+ import { cliHints } from './cli-hint.mjs';
26
27
  import fs from 'node:fs';
27
28
  import path from 'node:path';
28
29
  import crypto from 'node:crypto';
@@ -42,6 +43,7 @@ import { safeWriteFile, backupFile } from './safe-fs.mjs';
42
43
  import { readRegular, readRegularText, regularStat, READ_LIMITS } from './bounded-read.mjs';
43
44
  import { userThemeDirs } from './theme-dirs.mjs';
44
45
  import { draftLeftovers, leftoverLines } from './core/template-text.mjs';
46
+ import { CITEPROC_CREDIT } from './core/citeproc-credit.mjs';
45
47
  import { THEMES_LOCK_FILE, parseThemesLock, configThemePins, themeUpdate } from './core/themes-lock.mjs';
46
48
 
47
49
  export { annotate, analyzeSlideIds, readMacros, isJapanese, decodeEntities, glyphText } from './core/build-core.mjs';
@@ -163,8 +165,23 @@ function fontDir(pkg) {
163
165
  return fs.existsSync(path.join(v, 'package.json')) ? v : path.dirname(require.resolve(`${pkg}/package.json`));
164
166
  }
165
167
  // max:読んでよいバイト数(kit/core/build-core.mjs の chargedEnv が渡す。なければ READ_LIMITS.default)
168
+ // 本文の引用を組む CSL(format spec §9C.4。kit/core/article-cite.mjs):citeproc-js と同梱の書式・言語のファイル(vendor/csl)。
169
+ // 読み込みが重いので、本文が文献を引くときに初めて読む
170
+ let cslCache = null;
171
+ function cslNode() {
172
+ if (cslCache) return cslCache;
173
+ const dir = path.join(ROOT, 'vendor', 'csl');
174
+ const file = (sub, name) => { const p = path.join(dir, sub, name); return fs.existsSync(p) ? readRegular(p, 1 << 20).toString('utf8') : null; }; // 同梱の書式は 100 KB ほど
175
+ cslCache = { CSL: require('citeproc'), style: (id) => (/^[a-z0-9-]+$/.test(id) ? file('styles', `${id}.csl`) : null), locale: (tag) => (/^[A-Za-z-]+$/.test(tag) ? file('locales', `locales-${tag}.xml`) : null) };
176
+ return cslCache;
177
+ }
166
178
  export const nodeEnv = {
167
179
  path, KIT, ROOT, version: VERSION, katex, abcjs,
180
+ csl: cslNode, // 関数(env を写す { ...env } で citeproc を読み込まないように)
181
+ // 本文の道具(format spec §9C。1 ファイルへの書き出し kit/core/portable.mjs が、本文があるときだけ読み込む。myst-parser が重いので)
182
+ articleTools: async () => ({ ...(await import('./core/article-page.mjs')), ...(await import('./core/article-messages.mjs')), ...(await import('./core/article.mjs')) }),
183
+ // 本文のステップへのリンクの行き先を再生器で確かめる(§9C.8 の 1。kit/article-steps.mjs。ブラウザを起動するので、リンクがあるときだけ)
184
+ articleSteps: async (html, links) => (await import('./article-steps.mjs')).resolveStepLinks(html, links),
168
185
  get commit() { return repoCommit(); },
169
186
  katexDir: path.dirname(require.resolve('katex')),
170
187
  fontDir,
@@ -274,6 +291,12 @@ export function updateThemePins(srcPath) {
274
291
  return out;
275
292
  }
276
293
 
294
+ // 本文(article.md・article/、format spec §9C)があるか。あるときだけ本文の読み手(myst-parser。読み込みが重い)を読み込む
295
+ export function hasArticle(srcPath) {
296
+ const d = path.dirname(path.resolve(srcPath));
297
+ return fs.existsSync(path.join(d, 'article.md')) || fs.existsSync(path.join(d, 'article'));
298
+ }
299
+
277
300
  // ---------------------------------------------------------------- CLI
278
301
  if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
279
302
  const a = process.argv.slice(2);
@@ -322,15 +345,41 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
322
345
  if (idw.length) console.log(` slide ids written back to the working folder (backups in .cache/edits/): ${idw.join(', ')}`);
323
346
  console.log(`portable${opts.playOnly ? ' (play-only)' : ''}${opts.live ? ` with live session ${opts.live.room}` : ''}: slides: ${s.slides}, source files: ${s.files}, audio: ${s.audio}, profile: ${r.index.profile}, size: ${(Buffer.byteLength(r.html) / 1024).toFixed(0)} KB\n -> ${out}`);
324
347
  for (const w of r.warnings) console.warn(' ⚠ ' + w);
348
+ if (r.stats.citeproc) console.log(CITEPROC_CREDIT); // citeproc-js の帰属の表示(CPAL-1.0 の Exhibit B。NOTICE)
325
349
  const lw = opts.playOnly ? null : liveResultsWarning(r.stats.liveResults);
326
350
  if (lw) console.warn(' ⚠ portable: ' + lw);
327
351
  } else {
328
352
  const out = opts.out || defaultOut(src);
353
+ // 本文(article.md・article/<名前>.md、format spec §9C):組む前に読み(言語と題は原稿から)、再生器の本の窓のために出力にも入れる
354
+ // (§9C.6 の形:<section id="egatari-readable"> の中の <article id="egatari-article">。実行系の前。再生器は始めにこの層を隠し、本の窓に移す)。
355
+ // 読むための頁も出力の横に <名前>.article.html で書き、点検(§9C.8)の結果を出す
356
+ let ap = null;
357
+ const A = hasArticle(src) ? { ...(await import('./core/article-page.mjs')), ...(await import('./core/article-messages.mjs')) } : null;
358
+ const { articlePage, articlePageOut, articleMessage, themeTokens } = A || {};
359
+ if (A) {
360
+ let srcHtml = '';
361
+ try { srcHtml = readRegularText(src, { max: READ_LIMITS.source }).text; } catch { /* 組み立てが知らせる */ }
362
+ const lang0 = srcHtml.match(/<html[^>]*\slang="([^"]*)"/)?.[1] || '';
363
+ try { ap = articlePage(nodeEnv, src, { lang: lang0, title: titleOf(srcHtml) }); } catch (e) { console.error(`article: ${e.message}`); process.exit(1); }
364
+ }
365
+ const withArticle = ap && ap.article ? { articleHtml: ap.article, articleCss: ap.css, runtimePrefix: `<section id="${FORMAT.READABLE_ID}" lang="${ap.lang.replace(/[&"<>]/g, '')}">\n${ap.article}\n</section>\n` } : {};
329
366
  let r;
330
- try { r = build(src, { ...opts, out }); } catch (e) { if (!['build-too-large', 'build-not-a-file', 'component-requires-missing', 'component-not-in-catalogue'].includes(e.code)) throw e; console.error(e.message); process.exit(1); }
367
+ try { r = build(src, { ...opts, ...withArticle, out }); } catch (e) { if (!['build-too-large', 'build-not-a-file', 'component-requires-missing', 'component-not-in-catalogue'].includes(e.code)) throw e; console.error(e.message); process.exit(1); }
331
368
  try { writeOutput(src, out, r.html); } catch (e) { console.error(`build: ${e.message}`); process.exit(1); }
332
369
  const s = r.stats;
333
370
  console.log(`slides: ${s.slides}, math: ${s.math}, components: ${s.components.join(' ') || '-'}, font files: ${s.fontFiles}, narration: ${s.narration}, audio: ${s.audio}, theme: ${s.theme}, size: ${(r.html.length / 1024).toFixed(0)} KB -> ${out}`);
334
371
  for (const w of s.warn) console.warn(' ⚠ ' + w);
372
+ const lang = r.html.match(/<html[^>]*\slang="([^"]*)"/)?.[1] || '';
373
+ if (ap) {
374
+ const ao = articlePageOut(path, path.resolve(out));
375
+ // 読むための頁の色:組んだデッキの :root の色の変数を写す
376
+ const page = ap.html.replace('<style>', () => '<style>' + themeTokens(r.html));
377
+ try { writeOutput(src, ao, page); } catch (e) { console.error(`article: ${e.message}`); process.exit(1); }
378
+ const ml = core.isJapanese(lang) ? 'ja' : 'en', st = ap.stats, errs = ap.problems.filter((p) => p.sev === 'error').length;
379
+ console.log(`article: files: ${st.files}, sections: ${st.sections}, figures: ${st.figures}, tables: ${st.tables}, equations: ${st.equations}, errors: ${errs} -> ${ao}`);
380
+ for (const p of ap.problems) console.warn(` ${p.sev === 'error' ? '✗' : '⚠'} article: ${cliHints(articleMessage(ml, p))}`);
381
+ for (const w of ap.warnings) console.warn(' ⚠ article: ' + w);
382
+ if (ap.citeproc) console.log(CITEPROC_CREDIT); // citeproc-js の帰属の表示(CPAL-1.0 の Exhibit B。NOTICE)
383
+ }
335
384
  }
336
385
  }
@@ -5,6 +5,8 @@
5
5
  import { CLIP_ATTR } from './core/layout-scan.mjs';
6
6
  import { catalogueMessage } from './core/parts2.mjs';
7
7
  import { DEFAULT_METRICS, limitsOf } from './core/theme-metrics.mjs';
8
+ import { quoteJa } from './core/quote-ja.mjs';
9
+ import { ARTICLE_MESSAGES, articleMessage } from './core/article-messages.mjs';
8
10
 
9
11
  // 値にないときの既定(テーマの寸法の既定。kit/core/theme-metrics.mjs):結論の行の上端・1 行の高さ・横の右の限り
10
12
  const DEF_CONCL_TOP = DEFAULT_METRICS.concl.top, DEF_LINE = DEFAULT_METRICS.body.line, DEF_RIGHT = limitsOf(DEFAULT_METRICS).right;
@@ -48,7 +50,7 @@ export function where(lang, { n, id, title, step }) {
48
50
  const st = step === null || step === undefined ? '' : (lang === 'en' ? ', ' + stepEn(step) : '、' + stepJa(step));
49
51
  return lang === 'en'
50
52
  ? `Slide ${n}${title ? ` “${title}”` : ''}${id ? ` (${id})` : ''}${st}`
51
- : `スライド ${n}${title ? `「${title}」` : ''}${id ? `(${id})` : ''}${st}`;
53
+ : `スライド ${n}${title ? quoteJa(title) : ''}${id ? `(${id})` : ''}${st}`;
52
54
  }
53
55
 
54
56
  // テーマの寸法のずれ(themeMetricsDrift)の項目:{field, declared, measured, by}。measured は数か [下, 上](body.floor・tate.floor)
@@ -71,7 +73,13 @@ function driftHow(a, lang) {
71
73
  return [t, d].filter(Boolean).join(ja ? '。' : '; ');
72
74
  }
73
75
 
76
+ // 本文の点検(format spec §9C.8。kit/core/article-messages.mjs):a は {...知らせの値, file, line, spec}
77
+ const ARTICLE = Object.fromEntries(Object.keys(ARTICLE_MESSAGES).map((c) => [c, {
78
+ ja: (a) => articleMessage('ja', { code: c, data: a, file: a.file, line: a.line, spec: a.spec }),
79
+ en: (a) => articleMessage('en', { code: c, data: a, file: a.file, line: a.line, spec: a.spec }),
80
+ }]));
74
81
  export const MESSAGES = {
82
+ ...ARTICLE,
75
83
  'component-requires-missing': {
76
84
  ja: (a) => `パーツ ${a.part} が必要とする ${a.requires} がありません。パーツを更新してください`,
77
85
  en: (a) => `Part ${a.part} requires ${a.requires}, which is not available. Update the parts.`,
@@ -95,7 +103,7 @@ export const MESSAGES = {
95
103
  en: (a) => `${a.what} is not in the 1.0 vocabulary (${a.n} place(s), first on line ${a.line}): the number of steps and the motion come from data-step and data-at on elements, class="draw" on strokes and the steps of parts (format spec §8.0); remove ${a.what}` },
96
104
  legacyLectureMode: { ja: (a) => `<html data-mode="lecture"> は 1.0 の語彙にない(${a.line} 行目):見せ方は再生の設定の「先のステップを薄く見せる」で選ぶ。原稿からは外す`,
97
105
  en: (a) => `<html data-mode="lecture"> is not in the 1.0 vocabulary (line ${a.line}): the participant chooses “Show later steps faintly” in the player; remove it from the source` },
98
- narrHeadingDiffers: { rule: 'R-headings', ja: (a) => `narration.md ${a.line} 行目の見出し「${a.heading}」がスライドの見出し「${a.slide}」と違う({#${a.id}} で対応しているので動きは変わらない)`, en: (a) => `the narration heading “${a.heading}” (narration.md line ${a.line}) differs from the slide heading “${a.slide}” (matched by {#${a.id}}, so nothing breaks)` },
106
+ narrHeadingDiffers: { rule: 'R-headings', ja: (a) => `narration.md ${a.line} 行目の見出し${quoteJa(a.heading)}がスライドの見出し${quoteJa(a.slide)}と違う({#${a.id}} で対応しているので動きは変わらない)`, en: (a) => `the narration heading “${a.heading}” (narration.md line ${a.line}) differs from the slide heading “${a.slide}” (matched by {#${a.id}}, so nothing breaks)` },
99
107
  // ---------------------------------------------------------------- リンク
100
108
  linkFileMissing: { ja: (a) => `リンク「${a.text}」(href="${a.href}")の先のファイル ${a.file} が作業フォルダから見つからない:ファイルを置くか、リンクを直す(1 ファイル(.ega.html)には入らない)`, en: (a) => `the link “${a.text}” (href="${a.href}") points to ${a.file}, which is not in the working folder: add the file or fix the link (it is not packed into the single file (.ega.html))` },
101
109
  linkEmpty: { ja: (a) => `リンク「${a.text}」(href="${a.href}")に行き先がない(# だけ):href="#<スライドの id>" にする`, en: (a) => `the link “${a.text}” (href="${a.href}") has no target (only #): use href="#<slide id>"` },
@@ -148,12 +156,12 @@ export const MESSAGES = {
148
156
  attachCount: { ja: (a) => `添付が多すぎる(${a.max} 個まで):「${a.path}」は 1 ファイルに入らない`, en: (a) => `too many attachments (at most ${a.max}): “${a.path}” is not packed` },
149
157
  attachList: { ja: (a) => `添付:${a.n} 個(${a.size}。読み手の一覧に ${a.listed} 個)。1 ファイル(.ega.html)の再生ではダウンロードだけで、再生専用(--play-only)には入らない`, en: (a) => `attachments: ${a.n} (${a.size}; ${a.listed} listed for readers). In the single file (.ega.html) they are download-only; play-only files (--play-only) do not carry them` },
150
158
  // ---------------------------------------------------------------- 体裁(はみ出し・字数・表記)
151
- titleLong: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 字で長い(26 字まで。全角 1・半角 0.5):「${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` },
152
- titleLongEn: { rule: 'R-title', ja: (a) => `見出しが ${a.n} 文字で長い(英語は 60 文字まで):「${a.t}」を短くする`, en: (a) => `the heading has ${a.n} characters, over 60: shorten “${a.t}”` },
153
- titleColon: { rule: 'R-title', ja: (a) => `見出し「${a.t}」がコロンで終わっている:コロンを取り、見出しだけで言い切る`, en: (a) => `the heading “${a.t}” ends with a colon: remove it and let the heading stand on its own` },
159
+ 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` },
160
+ 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}”` },
161
+ titleColon: { rule: 'R-title', ja: (a) => `見出し${quoteJa(a.t)}がコロンで終わっている:コロンを取り、見出しだけで言い切る`, en: (a) => `the heading “${a.t}” ends with a colon: remove it and let the heading stand on its own` },
154
162
  tateTitle: { rule: 'R-title', ja: (a) => `縦組みの見出しが列に収まらない(${a.h}px > ${a.max}px。14 字ほどまで):見出しを短くする`, en: (a) => `the vertical heading does not fit its column (${a.h}px > ${a.max}px, about 14 characters): shorten it` },
155
163
  conclLong: { rule: 'R-concl', ja: (a) => `結論の行が ${a.n} 字で長い(35 字まで):「${a.t}」を 1 つの短い文にする`, en: (a) => `the conclusion line has ${a.n} units, over 35: make “${a.t}” one short sentence` },
156
- conclLongEn: { rule: 'R-concl', ja: (a) => `結論の行が ${a.n} 文字で長い(英語は 70 文字まで):「${a.t}」を短くする`, en: (a) => `the conclusion line has ${a.n} characters, over 70: shorten “${a.t}”` },
164
+ conclLongEn: { rule: 'R-concl', ja: (a) => `結論の行が ${a.n} 文字で長い(英語は 70 文字まで):${quoteJa(a.t)}を短くする`, en: (a) => `the conclusion line has ${a.n} characters, over 70: shorten “${a.t}”` },
157
165
  conclOverflow: { rule: 'R-concl', ja: () => '結論の行が枠からはみ出す:結論の行を短くして 1 行に収める', en: () => 'the conclusion line overflows its box: shorten it to one line' },
158
166
  // 結論の行の上端(conclTop)・1 行の高さ(line)・右の限り(bodyRight の lim)はテーマの寸法(metrics)が既定と違うときだけ値にある(なければ既定の値)
159
167
  bodyBottom: { rule: 'R-fit',
@@ -176,7 +184,7 @@ export const MESSAGES = {
176
184
  fontNotEmbedded: {
177
185
  ja: (a) => `ファイルに入っていない字体です(${(a.fonts || []).join('・')})。開く端末によって見え方が変わります:どの端末でも同じに見せるには、ファイルに入る字体(docs/reference.ja.md「字体」の一覧)から選ぶ`,
178
186
  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”)` },
179
- secHeading: { ja: (a) => `章の扉の題が h2 で書かれている(「${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` },
187
+ 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` },
180
188
  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)` },
181
189
  smallText: { rule: 'R-fit', ja: (a) => `字が小さい(${a.px}px:「${a.t}」。本文は 27px、表・図は 24px から):font-size を書かず既定の大きさに戻し、入らなければスライドを分ける`, en: (a) => `text is too small (${a.px}px: “${a.t}”; body text needs 27px, tables and figures 24px): remove the font-size and split the slide if it does not fit` },
182
190
  smallSvgText: { rule: 'R-fit', ja: (a) => `図の中の字が小さい(${a.px}px、24px から):字を 24px 以上に上げる。その場の <svg> なら viewBox を表示する画素で書く(viewBox の幅 = 表示の幅)か、font-size を 24 × viewBox の幅 ÷ 表示の幅 以上にする`, en: (a) => `text inside a figure is too small (${a.px}px, at least 24px): raise it to 24px or more; for an inline <svg>, write the viewBox in the pixels it is shown at (viewBox width = displayed width) or use font-size ≥ 24 × viewBox width ÷ displayed width` },
package/kit/check.mjs CHANGED
@@ -30,12 +30,13 @@
30
30
  // 言語:<html lang> が ja 以外(英語など)なら、です・ます/句読点を見ず、字数は文字数(タイトル 60・結論 70 で警告)、
31
31
  // 式らしさは \ ^ _ と演算子の密度だけ、長いターンは 60 語で見る
32
32
  // 口述原稿の言語はスライドと別に決め(voice.json の "lang" > 発言の文字 > <html lang>)、式らしさと長いターンは発言ごとにその言語の規則で見る
33
+ import { cliHints } from './cli-hint.mjs';
33
34
  import fs from 'node:fs';
34
35
  import os from 'node:os';
35
36
  import path from 'node:path';
36
37
  import { launch } from './browser.mjs';
37
38
  import { compareRenders, domSnapshot } from './render-compare.mjs';
38
- import { build, isJapanese, analyzeSlideIds, listFiles, nodeEnv } from './build.mjs';
39
+ import { build, isJapanese, analyzeSlideIds, listFiles, nodeEnv, hasArticle, resolveDeckArg } from './build.mjs';
39
40
  import { referenceVoices, matchReference } from './core/ref-voice.mjs';
40
41
  import { excludedReason } from './core/portable.mjs';
41
42
  import { FORMAT } from './core/format.mjs';
@@ -55,11 +56,14 @@ const args = process.argv.slice(2);
55
56
  const asJson = args.includes('--json');
56
57
  const ti = args.indexOf('--theme'), theme = ti >= 0 ? args[ti + 1] : undefined;
57
58
  const li = args.indexOf('--lang'), langArg = li >= 0 ? args[li + 1] : undefined; // 知らせの言葉(ja | en。既定はデッキの言語)
58
- const src = args.find((a, i) => !a.startsWith('--') && !(ti >= 0 && i === ti + 1) && !(li >= 0 && i === li + 1));
59
- if (!src) {
60
- console.error('usage: node kit/check.mjs <deck.html> [--theme name] [--lang ja|en] [--json]');
59
+ const arg0 = args.find((a, i) => !a.startsWith('--') && !(ti >= 0 && i === ti + 1) && !(li >= 0 && i === li + 1));
60
+ if (!arg0) {
61
+ console.error('usage: node kit/check.mjs <deck.html | working folder> [--theme name] [--lang ja|en] [--json]');
61
62
  process.exit(1);
62
63
  }
64
+ // 作業フォルダを渡したら、その中の deck.html(組み立てと同じ。フォルダは「通常のファイルでない」と紛らわしく断られていた)
65
+ let src;
66
+ try { src = resolveDeckArg(arg0); } catch (e) { console.error(`check: ${e.message}`); process.exit(1); }
63
67
 
64
68
  // ---------------------------------------------------------------- 結果の置き場
65
69
  // slide: null(デッキ全体)または {i, title}。sev: 'error' | 'warn' | 'info'
@@ -101,7 +105,7 @@ catch (e) {
101
105
  msg: where(ml, { n: null }) + (ml === 'en' ? ': ' : ':') + message(ml, e.code, data),
102
106
  }));
103
107
  if (asJson) console.log(JSON.stringify({ ok: false, lang: ml, counts: { error: findings.length, warn: 0, info: 0 }, results: findings }, null, 2));
104
- else for (const f of findings) console.log(`[${ml === 'en' ? 'error' : 'エラー'}] ${f.msg}`);
108
+ else for (const f of findings) console.log(`[${ml === 'en' ? 'error' : 'エラー'}] ${cliHints(f.msg)}`);
105
109
  await new Promise((resolve) => process.stdout.write('', resolve));
106
110
  process.exit(1);
107
111
  }
@@ -353,6 +357,35 @@ phase = 'J リンク';
353
357
  if (links.length) report(null, 'info', 'linkCount', { ok, other: links.filter((l) => l.other).length });
354
358
  }
355
359
 
360
+ // ================================================================ M. 本文(article.md・article/<名前>.md、format spec §9C.8)
361
+ // 部分集合の外の書き方・名前・章の決まり・相互参照・解答・用語・引用の鍵・画像・data-article。ステップへのリンクの行き先は再生器(DECK.resolveFragment)で確かめる
362
+ phase = 'M 本文';
363
+ if (hasArticle(src)) {
364
+ const { loadArticle, stepLinksOf, articleLinkReport } = await import('./core/article-page.mjs');
365
+ const { validateArticle, stepResolver, STEP_PROBE } = await import('./core/article.mjs');
366
+ const L = loadArticle(nodeEnv, src, { lang });
367
+ if (L) {
368
+ const links = stepLinksOf(L.article);
369
+ const res = await page.evaluate(STEP_PROBE, links);
370
+ const resolveStep = stepResolver(res);
371
+ const v = validateArticle(L.article, { ...L.ctx, resolveStep });
372
+ for (const p of [...L.problems, ...v.problems]) report(null, p.sev, p.code, { ...p.data, file: p.file || null, line: p.line || null, spec: p.spec });
373
+ // スライドと節のつながりの古さ(§9C.7):記録の hash と今が違えば「スライドと本が合っていないかもしれません」。記録のない組はまとめて 1 行
374
+ if (L.index) {
375
+ const lr = await articleLinkReport(L);
376
+ for (const p of lr.problems) report(null, p.sev, p.code, { ...p.data, file: p.file, line: null, spec: p.spec });
377
+ for (const x of lr.states) if (x.state !== 'ok' && x.state !== 'unconfirmed') {
378
+ const sec = v.sections.get(x.section);
379
+ report(null, 'warn', 'articleLinkStale', { slide: x.slide, section: x.section, heading: sec ? sec.heading.slice(0, 40) : '', changed: x.state, file: sec ? sec.file : null, line: sec ? sec.line : null, spec: '§9C.7' });
380
+ }
381
+ const un = lr.states.filter((x) => x.state === 'unconfirmed');
382
+ if (un.length) report(null, 'info', 'articleLinkUnconfirmed', { count: un.length, pairs: un.slice(0, 10).map((x) => `${x.slide}↔${x.section}`), spec: '§9C.7' });
383
+ if (lr.removed.length) report(null, 'info', 'articleLinkUnlinked', { count: lr.removed.length, pairs: lr.removed.slice(0, 10).map((x) => `${x.slide}↔${x.section}`), spec: '§9C.7' });
384
+ }
385
+ report(null, 'info', 'articleSummary', { files: L.article.files.length, sections: v.sections.size, labels: v.labels.size });
386
+ }
387
+ }
388
+
356
389
  // ================================================================ A. 体裁の検査
357
390
  phase = 'A 体裁';
358
391
  // 体裁の検査の関数(kit/core/layout-scan.mjs)をページに入れる(文字列で。デッキの決まり(CSP)に依らない)
@@ -700,7 +733,7 @@ if (asJson) {
700
733
  code: r.code,
701
734
  rule: ruleOf(r.code, r.a),
702
735
  data: r.a,
703
- msg: r.msg,
736
+ msg: cliHints(r.msg),
704
737
  }));
705
738
  console.log(JSON.stringify({ ok, lang: ML, counts, results: out }, null, 2));
706
739
  } else {
@@ -720,7 +753,7 @@ if (asJson) {
720
753
  const label = key === -1 ? (EN ? '■ Whole deck' : '■ デッキ全体') : `■ ${key + 1}: ${titleOf(key)}${id ? ` (${id})` : ''}`;
721
754
  console.log(label);
722
755
  const items = groups.get(key).sort((a, b) => SEV_RANK[a.sev] - SEV_RANK[b.sev]);
723
- for (const r of items) console.log(` [${MARK[r.sev]}] ${stepOf(r.step)}${r.what}`);
756
+ for (const r of items) console.log(` [${MARK[r.sev]}] ${stepOf(r.step)}${cliHints(r.what)}`);
724
757
  }
725
758
  console.log('');
726
759
  console.log(EN ? `${counts.error} errors, ${counts.warn} warnings, ${counts.info} info` : `エラー ${counts.error} 警告 ${counts.warn} 情報 ${counts.info}`);
@@ -0,0 +1,27 @@
1
+ // 知らせの中のコマンド(「npm run ids」など。kit/core の言葉はリポジトリの中で打つ形で書いてある)を、今の呼ばれ方で打てる形にする。
2
+ // egatari コマンドから(EGATARI_CLI):npx egatari ids
3
+ // リポジトリ(この包み)の中から:npm run ids --(そのまま)
4
+ // 外から node <包み>/kit/check.mjs で:node <包みへの相対パス>/tools/ids.mjs
5
+ // 打つ場所は INIT_CWD(npm run・egatari コマンドが渡す)か今いる場所
6
+ import path from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+
9
+ const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
10
+ const SCRIPTS = { ids: 'tools/ids.mjs', build: 'kit/build.mjs', check: 'kit/check.mjs', portable: 'tools/portable.mjs', sheet: 'tools/sheet.mjs', new: 'tools/new.mjs' };
11
+
12
+ export function cliCommand(name, env = process.env, cwd = env.INIT_CWD || process.cwd()) {
13
+ if (env.EGATARI_CLI) return `npx ${env.EGATARI_CLI} ${name}`;
14
+ const rel = path.relative(ROOT, path.resolve(cwd));
15
+ if (!rel || (!rel.startsWith('..') && !path.isAbsolute(rel))) return `npm run ${name} --`;
16
+ const abs = path.join(ROOT, ...SCRIPTS[name].split('/'));
17
+ let script = path.relative(path.resolve(cwd), abs).split(path.sep).join('/');
18
+ if (/^(\.\.\/){3,}/.test(script)) script = abs; // 遠いときは絶対パス(その OS の書き方のまま)
19
+ return `node ${/\s/.test(script) ? `"${script}"` : script}`;
20
+ }
21
+ // 「npm run <名前> -- 」「npm run <名前>」を今の形に替える
22
+ export function cliHints(text, env, cwd) {
23
+ return String(text).replace(/npm run (ids|build|check|portable|sheet|new)(?: --(?= ))?/g, (m, name) => {
24
+ const c = cliCommand(name, env, cwd);
25
+ return c.endsWith(' --') && !/ --$/.test(m) ? c.slice(0, -3) : c;
26
+ });
27
+ }
@@ -0,0 +1,188 @@
1
+ // 本文の引用(format spec §9C.4・§9C.6):references.json(CSL-JSON)と metadata.citations({style?, list?})から、
2
+ // 地の文の中の引用の字と文献の一覧を、組み立てのときに CSL(citeproc-js)で作る。再生器は文献の道具を持たない。
3
+ // 書式(style):同梱の CSL の書式(vendor/csl/styles)。著者と年の書式 apa と番号の書式 ieee・sist02(日本語)。
4
+ // 書式がなければ既定(apa)で組み、警告して style はそのまま残す(§9C.4)。
5
+ // 一覧(list):end(本文の終わりに 1 つ。既定)・chapter(章の終わりごとに、その章で引いたもの。chapters のときだけ)・none(一覧なし)。
6
+ // 一覧の項目の id は ref-<鍵>、章ごとの一覧は ref-<章の印>-<鍵>(章の印は脚注と同じ。kit/core/article-render.mjs の numberArticle)。
7
+ // 所在([@key, p. 3] の p. 3)は解釈せず、字のまま引用の後ろに付ける(citeproc の suffix)。
8
+ // 1 つの括弧の中の引用([@a; @b])は、書式が並べた字の中で鍵ごとに <a class="egatari-cite" href="#ref-…"> にする(鍵ごとの印を
9
+ // citeproc の prefix・suffix に入れて、出てきた場所で包む)。印を付けると citeproc は番号をまとめない((1–4) を (1, 2, 3, 4) と書く)。
10
+ // citeproc の出力の HTML は許可した要素(i・b・sup・sub と飾りの span)だけを通す(字は citeproc が実体参照にしている)。
11
+ // 編集アプリと共有する(node: の読み込み・fs を使わない)。citeproc と書式のファイルは opts.csl で渡す:
12
+ // {CSL: citeproc の名前空間, style(id) → CSL の XML の字か null, locale(tag) → 言語の XML の字か null}
13
+ // 返す citeproc(true なら citeproc で組んだ)を見て、呼び手は CITEPROC_CREDIT を出す
14
+ import { visit } from './article-text.mjs';
15
+
16
+ // 同梱の書式(§9C.4:著者と年の書式 1 つと番号の書式 1 つ以上)。format は CSL の citation-format
17
+ export const CITATION_STYLES = Object.freeze({ apa: 'author-date', ieee: 'numeric', sist02: 'numeric' });
18
+ export const DEFAULT_CITATION_STYLE = 'apa';
19
+ export { CITEPROC_CREDIT } from './citeproc-credit.mjs'; // citeproc で組んだときに出す帰属の 1 行(NOTICE)
20
+ export const CITATION_LISTS = Object.freeze(['end', 'chapter', 'none']);
21
+ const LIST_TITLE = { ja: '参考文献', en: 'References' };
22
+ // CSL の言語のファイル(vendor/csl/locales)。ほかの言語は en-US(citeproc の既定)
23
+ const LOCALES = { ja: 'ja-JP', en: 'en-US' };
24
+ export const cslLocaleOf = (lang) => LOCALES[String(lang || '').toLowerCase().split('-')[0]] || 'en-US';
25
+
26
+ // 同梱の書式を、読み込むときに少しだけ合わせる(vendor/csl のファイルは手を加えない写しのまま。変えた点は NOTICE と vendor/csl/SOURCE.json の note)。
27
+ // sist02:
28
+ // - 著者のない文献(編者だけの本など)は編者を著者の場所に書く(CSL の substitute。元の書式は著者がないと名前を何も書かない)
29
+ // - 日本語の本では、巻・号・ページを SIST02 の略記 vol.・no.・p. にし(ja-JP の言語のファイルの「巻」「号」「ページ」に「. 」が付いて
30
+ // 「ページ. 84–93」となっていた)、書名を囲む引用符を「」『』にする(“ ” は縦書きで寝る)
31
+ export function adaptStyle(style, xml, lang) {
32
+ if (typeof xml !== 'string' || style !== 'sist02') return xml;
33
+ let out = xml.replace(/(<macro name="author">\s*<names variable="author" suffix="\. ">\s*<name [^>]*\/>)(\s*<\/names>)/,
34
+ '$1<label form="short" prefix=" " plural="never"/><substitute><names variable="editor"/><names variable="translator"/></substitute>$2');
35
+ if (/^ja\b/i.test(String(lang || ''))) {
36
+ const terms = '<term name="open-quote">「</term><term name="close-quote">」</term><term name="open-inner-quote">『</term><term name="close-inner-quote">』</term>' +
37
+ '<term name="volume" form="short"><single>vol.</single><multiple>vol.</multiple></term><term name="issue" form="short"><single>no.</single><multiple>no.</multiple></term>' +
38
+ '<term name="page" form="short"><single>p.</single><multiple>p.</multiple></term>';
39
+ out = out.replace(/<locale xml:lang="ja">\s*<terms>[\s\S]*?<\/terms>\s*<\/locale>/, `<locale xml:lang="ja"><terms>${terms}</terms></locale>`);
40
+ }
41
+ return out;
42
+ }
43
+
44
+ // metadata.citations を読む(§9C.4・§9C.8 の 7)。book:index.article が chapters か。styles:使える書式の名前(既定は同梱のもの)
45
+ // 返すもの:{style(実際に使う書式), asked(書いてあった style), list, problems}
46
+ export function citationSettings(citations, { book = false, styles = Object.keys(CITATION_STYLES) } = {}) {
47
+ const problems = [];
48
+ const c = citations && typeof citations === 'object' && !Array.isArray(citations) ? citations : {};
49
+ if (citations !== undefined && citations !== null && c !== citations) problems.push(D('error', 'articleCitations', '§9C.4', { why: 'shape' }));
50
+ let style = DEFAULT_CITATION_STYLE;
51
+ const asked = c.style;
52
+ if (asked !== undefined) {
53
+ if (typeof asked === 'string' && styles.includes(asked)) style = asked;
54
+ else problems.push(D('warn', 'articleCiteStyle', '§9C.4', { style: String(asked).slice(0, 80), fallback: DEFAULT_CITATION_STYLE, styles: styles.slice() }));
55
+ }
56
+ let list = 'end';
57
+ if (c.list !== undefined) {
58
+ if (!CITATION_LISTS.includes(c.list)) problems.push(D('error', 'articleCitations', '§9C.4', { why: 'list', value: String(c.list).slice(0, 40) }));
59
+ else if (c.list === 'chapter' && !book) problems.push(D('error', 'articleCiteListChapter', '§9C.8', {}));
60
+ else list = c.list;
61
+ }
62
+ return { style, asked: asked === undefined ? null : asked, list, problems };
63
+ }
64
+
65
+ // 引用の字と一覧を作る。article:readArticle の結果。items:references.json の配列。
66
+ // opts:csl(上)・lang・style・list(citationSettings の結果)・tokens(ファイルごとの章の印。numberArticle の files[].chapterAttr)
67
+ // 返すもの:{groups: Map(citeGroup → HTML), narratives: Map(cite → HTML), end: 一覧の HTML か ''、chapters: Map(ファイルの番号 → HTML), problems}
68
+ export function renderCitations(article, items, opts) {
69
+ const { csl, lang = '', style = DEFAULT_CITATION_STYLE, list = 'end', tokens = [] } = opts;
70
+ const groups = new Map(), narratives = new Map(), chapters = new Map(), problems = [];
71
+ let end = '', engineUsed = false;
72
+ const byId = new Map();
73
+ for (const it of Array.isArray(items) ? items : []) if (it && typeof it === 'object' && typeof it.id === 'string' && !byId.has(it.id)) byId.set(it.id, it);
74
+ const book = !!(article.index && article.index.chapters);
75
+ const perChapter = list === 'chapter' && book;
76
+ const styleXml = csl && csl.style ? adaptStyle(style, csl.style(style), lang) : null;
77
+ if (!csl || !csl.CSL || !styleXml) return { groups, narratives, end, chapters, problems, rendered: false };
78
+ const numeric = /<category\s+citation-format="numeric"/.test(styleXml);
79
+ const locale = cslLocaleOf(lang);
80
+ // 範囲:章ごとの一覧なら章ごと、ほかは本文全体で 1 つ(番号の書式の番号は範囲の中で引いた順)
81
+ const scopes = perChapter ? article.files.map((f, i) => [i]) : [article.files.map((f, i) => i)];
82
+ for (const scope of scopes) {
83
+ const uses = []; // {node, cites: [{key, suffix}], narrative}
84
+ for (const fi of scope) {
85
+ visit(article.files[fi].tree, (n, parents) => {
86
+ if (n.type === 'citeGroup') uses.push({ node: n, cites: (n.children || []).filter((c) => c.type === 'cite').map(citeOf) });
87
+ else if (n.type === 'cite' && !parents.some((p) => p.type === 'citeGroup')) uses.push({ node: n, cites: [citeOf(n)], narrative: true });
88
+ });
89
+ }
90
+ const keys = [];
91
+ for (const u of uses) for (const c of u.cites) if (byId.has(c.key) && !keys.includes(c.key)) keys.push(c.key);
92
+ if (!uses.length) continue;
93
+ const token = perChapter ? tokens[scope[0]] || '' : '';
94
+ const href = (key) => (perChapter && token ? `#ref-${token}-${key}` : `#ref-${key}`);
95
+ const wrap = (key, inner) => (byId.has(key) ? (list === 'none' ? `<span class="egatari-cite">${inner}</span>` : `<a class="egatari-cite" href="${esc(href(key))}">${inner}</a>`) : `<span class="egatari-cite egatari-cite-missing">${inner}</span>`);
96
+ let engine = null;
97
+ if (keys.length) {
98
+ try {
99
+ const sys = { retrieveLocale: (tag) => (csl.locale && csl.locale(tag)) || false, retrieveItem: (id) => byId.get(id) };
100
+ engine = new csl.CSL.Engine(sys, styleXml, locale, true);
101
+ engine.updateItems(keys);
102
+ engineUsed = true;
103
+ } catch (e) { problems.push(D('warn', 'articleCiteEngine', '§9C.4', { why: String(e && e.message || e).split('\n')[0].slice(0, 120) })); engine = null; }
104
+ }
105
+ for (const u of uses) {
106
+ const known = u.cites.filter((c) => byId.has(c.key));
107
+ let html = null;
108
+ if (engine && known.length === u.cites.length) {
109
+ try { html = u.narrative ? narrative(engine, u.cites[0], numeric, wrap) : cluster(engine, u.cites, wrap); } catch (e) { problems.push(D('warn', 'articleCiteEngine', '§9C.4', { why: String(e && e.message || e).split('\n')[0].slice(0, 120) })); html = null; }
110
+ }
111
+ // 書式で組めないとき(鍵が文献にない・citeproc がない・失敗):鍵の字のまま(点検が誤りを知らせる)
112
+ if (html === null) html = u.narrative ? wrap(u.cites[0].key, esc(u.cites[0].key)) : `(${u.cites.map((c) => wrap(c.key, esc(c.key) + (c.suffix ? `, ${esc(c.suffix)}` : ''))).join('; ')})`;
113
+ (u.narrative ? narratives : groups).set(u.node, html);
114
+ }
115
+ // 一覧(§9C.6:<section data-egatari-references> の <li id="ref-…">。書式の順)
116
+ if (list !== 'none' && engine) {
117
+ let bib = null;
118
+ try { bib = engine.makeBibliography(); } catch (e) { problems.push(D('warn', 'articleCiteEngine', '§9C.4', { why: String(e && e.message || e).split('\n')[0].slice(0, 120) })); }
119
+ if (bib && Array.isArray(bib[1])) {
120
+ const ids = (bib[0].entry_ids || []).map((x) => (Array.isArray(x) ? x[0] : x));
121
+ const lis = bib[1].map((entry, j) => {
122
+ const key = ids[j];
123
+ const id = perChapter && token ? `ref-${token}-${key}` : `ref-${key}`;
124
+ return `<li id="${esc(id)}">${cslHtml(entry).trim()}</li>`;
125
+ });
126
+ const words = LIST_TITLE[/^ja\b/i.test(lang) ? 'ja' : 'en'];
127
+ const sec = `<section data-egatari-references=""><h2>${words}</h2>\n<ul class="egatari-references egatari-references-${numeric ? 'numeric' : 'author-date'}">\n${lis.join('\n')}\n</ul></section>`;
128
+ if (perChapter) chapters.set(scope[0], sec); else end = sec;
129
+ }
130
+ }
131
+ }
132
+ return { groups, narratives, end, chapters, problems, rendered: true, citeproc: engineUsed };
133
+ }
134
+ const citeOf = (n) => ({ key: String(n.label || n.identifier || ''), suffix: n.suffix ? String(n.suffix) : '' });
135
+
136
+ // 1 つの括弧の中の引用:鍵ごとの印(私用領域の字)を prefix・suffix に入れて組み、出てきた場所を鍵ごとのリンクで包む
137
+ const OPEN = '', CLOSE = '', IDX = 0xE100;
138
+ function cluster(engine, cites, wrap) {
139
+ const marked = cites.map((c, i) => ({ id: c.key, prefix: OPEN + String.fromCharCode(IDX + i), suffix: (c.suffix ? `, ${c.suffix}` : '') + CLOSE }));
140
+ const raw = cslHtml(engine.makeCitationCluster(marked));
141
+ const re = new RegExp(`${OPEN}([\\uE100-\\uE1FF])([^${OPEN}${CLOSE}]*)${CLOSE}`, 'g');
142
+ const out = raw.replace(re, (m, idx, inner) => { const c = cites[idx.charCodeAt(0) - IDX]; return c ? wrap(c.key, inner) : inner; });
143
+ // 印が残る(包めなかった)なら、印を外して全体を最初の鍵へのリンクにする
144
+ if (/[-]/.test(out)) return wrap(cites[0].key, raw.replace(/[-]/g, ''));
145
+ return out;
146
+ }
147
+ // 地の文の引用(§9C.6):著者と年の書式は「著者 (年)」、番号の書式は番号([3])
148
+ function narrative(engine, c, numeric, wrap) {
149
+ if (!numeric) {
150
+ const who = cslHtml(engine.makeCitationCluster([{ id: c.key, 'author-only': true }])).trim();
151
+ const when = cslHtml(engine.makeCitationCluster([{ id: c.key, 'suppress-author': true }])).trim();
152
+ if (who && !/NO_PRINTED_FORM/.test(who)) return wrap(c.key, `${who} ${when}`);
153
+ }
154
+ return wrap(c.key, cslHtml(engine.makeCitationCluster([{ id: c.key }])).trim());
155
+ }
156
+
157
+ // citeproc の HTML の出力から、許可した要素だけを通す(ほかの要素は外して中の字を残す)。字の中の < > は citeproc が実体参照にしている
158
+ const SPAN_STYLE = { 'font-variant:small-caps;': 'egatari-sc', 'font-style:normal;': 'egatari-upright', 'font-weight:normal;': 'egatari-unbold', 'text-decoration:underline;': 'egatari-underline', 'font-variant:normal;': 'egatari-plain', 'text-decoration:none;': 'egatari-plain' };
159
+ const DIV_CLASS = { 'csl-left-margin': 'egatari-ref-label', 'csl-right-inline': 'egatari-ref-body', 'csl-block': 'egatari-ref-block', 'csl-indent': 'egatari-ref-indent' };
160
+ export function cslHtml(s) {
161
+ const stack = [];
162
+ const out = String(s).replace(/<(\/?)([A-Za-z][A-Za-z0-9]*)((?:\s+[^<>]*)?)\s*\/?>|[<>]/g, (m, close, tag, attrs) => {
163
+ if (!tag) return m === '<' ? '&lt;' : '&gt;';
164
+ const t = tag.toLowerCase();
165
+ if (close) {
166
+ for (let i = stack.length - 1; i >= 0; i--) if (stack[i].tag === t) { const [x] = stack.splice(i, 1); return x.close; }
167
+ return '';
168
+ }
169
+ if (t === 'br') return '';
170
+ let open = '', closeTag = '';
171
+ if (['i', 'b', 'sup', 'sub'].includes(t)) { open = `<${t}>`; closeTag = `</${t}>`; }
172
+ else if (t === 'span') {
173
+ const st = (attrs.match(/\bstyle\s*=\s*"([^"]*)"/) || [])[1];
174
+ const cls = st && SPAN_STYLE[st.replace(/\s+/g, '')];
175
+ if (cls) { open = `<span class="${cls}">`; closeTag = '</span>'; }
176
+ } else if (t === 'div') {
177
+ const c = (attrs.match(/\bclass\s*=\s*"([^"]*)"/) || [])[1];
178
+ const cls = c && DIV_CLASS[c.trim()];
179
+ if (cls) { open = `<span class="${cls}">`; closeTag = '</span> '; }
180
+ }
181
+ stack.push({ tag: t, close: closeTag });
182
+ return open;
183
+ });
184
+ // 閉じられなかった要素を閉じ、裸の & を実体参照にする
185
+ return (out + stack.reverse().map((x) => x.close).join('')).replace(/&(?!#[0-9]{1,7};|#x[0-9A-Fa-f]{1,6};|[A-Za-z][A-Za-z0-9]{1,31};)/g, '&amp;').replace(/\s+\n/g, '\n');
186
+ }
187
+ const esc = (s) => String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
188
+ function D(sev, code, spec, data) { return { sev, code, spec, file: null, line: null, data }; }