egatari 0.6.14 → 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 (246) hide show
  1. package/CHANGELOG.md +34 -1
  2. package/components.lock.json +507 -153
  3. package/components2.lock.json +1710 -33
  4. package/kit/check-messages.mjs +11 -2
  5. package/kit/core/article-render.mjs +1 -1
  6. package/kit/core/article-text.mjs +3 -1
  7. package/kit/core/build-core.mjs +23 -1
  8. package/kit/core/check-parity.mjs +1 -1
  9. package/kit/core/check-rules.mjs +1 -1
  10. package/kit/core/colab-core.mjs +1 -1
  11. package/kit/core/comment-core.mjs +6 -0
  12. package/kit/core/layout-scan.mjs +67 -2
  13. package/kit/core/llm-fix.mjs +12 -1
  14. package/kit/core/llm-pack-assemble.mjs +5 -2
  15. package/kit/core/llm-pack-data.mjs +218 -32
  16. package/kit/core/llm-pack.mjs +3 -3
  17. package/kit/core/new-deck.mjs +17 -3
  18. package/kit/core/part-labels.mjs +6 -0
  19. package/kit/core/player.mjs +18 -0
  20. package/kit/core/portable.mjs +21 -3
  21. package/kit/core/tier-a.mjs +14 -2
  22. package/kit/instruction-version.json +1 -1
  23. package/kit/player.json +1 -1
  24. package/kit/player.lock.json +2 -2
  25. package/kit/presenter.js +3 -1
  26. package/kit/tools.js +9 -2
  27. package/package.json +4 -2
  28. package/server/dev.mjs +3 -2
  29. package/server/editor-ui.js +8 -3
  30. package/server/hints.js +22 -2
  31. package/vendor/components/CATALOG.md +21 -14
  32. package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/README.en.md +40 -0
  33. package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/index.js +408 -0
  34. package/vendor/components/sha256/0396a1895978803ae342b7f598f187b17ead47800e8f8317a5cb041111349813/index.js +278 -0
  35. package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/README.en.md +26 -0
  36. package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/index.js +322 -0
  37. package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/README.en.md +54 -0
  38. package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/index.js +470 -0
  39. package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/README.en.md +18 -0
  40. package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/index.js +279 -0
  41. package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/README.en.md +31 -0
  42. package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/index.js +267 -0
  43. package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/README.en.md +53 -0
  44. package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/index.js +171 -0
  45. package/vendor/components/sha256/1117758820dc561f41cf9d1cc0bab8cf3173cde7771ac10a12b94c96007c0f55/index.js +268 -0
  46. package/vendor/components/sha256/137017ad452afe209bdff81bc02ffae99c6b60a1c4aed2383515974f65511ff2/index.js +205 -0
  47. package/vendor/components/sha256/1a1471ba5f68e54304825a64e736afeda421e3763cdcbcdab2e45509562a0291/index.js +607 -0
  48. package/vendor/components/sha256/1b15fcc12b2fa43821e6299e87aae31aa69dbbc5a0d1b80088a5d7c5f8b8f7f5/index.js +429 -0
  49. package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/README.en.md +23 -0
  50. package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/index.js +147 -0
  51. package/vendor/components/sha256/21c099461befc0d382ddfe982f2a6cd8eeb6dd731252164ac619525e4bacdf0d/index.js +242 -0
  52. package/vendor/components/sha256/2352e0e22460f4a3c46dca6cef27cd9c63f161a411f1cf56c75c585e9124503c/index.js +315 -0
  53. package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/README.en.md +53 -0
  54. package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/index.js +171 -0
  55. package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/README.en.md +38 -0
  56. package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/index.js +414 -0
  57. package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/README.en.md +45 -0
  58. package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/index.js +211 -0
  59. package/vendor/components/sha256/2f111b900898579b3ec1611c2110db336a46d9133171a0cbb125ee37bd1f24f8/index.js +592 -0
  60. package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/README.en.md +45 -0
  61. package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/index.js +211 -0
  62. package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/README.en.md +20 -0
  63. package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/index.js +310 -0
  64. package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/README.en.md +35 -0
  65. package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/index.js +179 -0
  66. package/vendor/components/sha256/3af0b84b1799fc64ec74d6da9cbd343eccd89e8a11c81bfb444562c911284442/index.js +342 -0
  67. package/vendor/components/sha256/3c69bf3b3c6b9f76048fbc0839b3aa9699723570086d3d44bac799230ed6de5b/index.js +121 -0
  68. package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/README.en.md +37 -0
  69. package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/index.js +501 -0
  70. package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/README.en.md +38 -0
  71. package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/index.js +414 -0
  72. package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/README.en.md +30 -0
  73. package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/index.js +305 -0
  74. package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/README.en.md +31 -0
  75. package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/index.js +236 -0
  76. package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/README.en.md +21 -0
  77. package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/index.js +108 -0
  78. package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/README.en.md +28 -0
  79. package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/index.js +213 -0
  80. package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/README.en.md +35 -0
  81. package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/index.js +179 -0
  82. package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/README.en.md +53 -0
  83. package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/index.js +171 -0
  84. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ABCJS-ADAPTER.md +101 -0
  85. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/LICENSE-abcjs.txt +21 -0
  86. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/chords.json +89 -0
  87. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/doremi.json +261 -0
  88. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/extras.json +192 -0
  89. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/kaeru.json +521 -0
  90. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/rhythm.json +248 -0
  91. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ties.json +360 -0
  92. package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/index.js +508 -0
  93. package/vendor/components/sha256/59996a56df462b36e24a928d4397c9308d9e39ad8224ebd19fb5c981608ef458/index.js +521 -0
  94. package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/README.en.md +30 -0
  95. package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/index.js +305 -0
  96. package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/README.en.md +30 -0
  97. package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/index.js +192 -0
  98. package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/README.en.md +20 -0
  99. package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/index.js +307 -0
  100. package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/README.en.md +24 -0
  101. package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/index.js +554 -0
  102. package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/README.en.md +25 -0
  103. package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/index.js +316 -0
  104. package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/README.en.md +18 -0
  105. package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/index.js +279 -0
  106. package/vendor/components/sha256/624acb997c4975ace65570b529b3ba00baa421c80ecb7fc80f392a64e8c573a7/index.js +107 -0
  107. package/vendor/components/sha256/62602488ee33dd4bdef8516de16da5ab27d7f7265d5041681beab80e08f1d482/index.js +97 -0
  108. package/vendor/components/sha256/67eaf344bddac79b74ed03fdcd70285c7b52b160e6c5ffbd6897848179aa5230/index.js +818 -0
  109. package/vendor/components/sha256/682c9c8871eccd19ff1264e0323a2e4c5798b0488b612ba0339c6fe85aab5914/index.js +926 -0
  110. package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/README.en.md +51 -0
  111. package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/index.js +230 -0
  112. package/vendor/components/sha256/72138936ed0b8fd3cb0214ae7ed250ae3f1f8b21ed6fd593544947774064ba0d/index.js +250 -0
  113. package/vendor/components/sha256/74c1a0f3ed1370c5003aa5770ee28cea2ce994d415680116a92fdbcd5854ba62/index.js +198 -0
  114. package/vendor/components/sha256/76125035eb153b98befa9c735bcd9fc4f99f774dc1d082fdae40acaadfe7d95b/index.js +818 -0
  115. package/vendor/components/sha256/7728cf7dde88a6688aba0ed70f23f7e21362a147beac09c1fa1a4b773e08e93b/index.js +354 -0
  116. package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/README.en.md +23 -0
  117. package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/index.js +289 -0
  118. package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/README.en.md +31 -0
  119. package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/index.js +236 -0
  120. package/vendor/components/sha256/7d50e50fbb6c5ec636b62509bd88ddaac1870e0522cf11bcc293ce924d48072d/index.js +312 -0
  121. package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/README.en.md +42 -0
  122. package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/index.js +549 -0
  123. package/vendor/components/sha256/87fc302c41b2bfeea88951ed689ec01b4dc79218c4bc69b310dc2228dfa2e153/index.js +926 -0
  124. package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/README.en.md +24 -0
  125. package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/index.js +103 -0
  126. package/vendor/components/sha256/89c8c16788e24df17920542ed6eb6557dea4a10e835de8fe839e439ccbba8014/index.js +69 -0
  127. package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/README.en.md +44 -0
  128. package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/index.js +304 -0
  129. package/vendor/components/sha256/8d9af78aef44ad2f98101c67d32473373d39725a09c923969aa621d5f5b124bb/index.js +121 -0
  130. package/vendor/components/sha256/8f861d71df72a82be86a3e63abf7d69bbab5aac6fa68be6e077c4e19c3519ed8/index.js +312 -0
  131. package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/README.en.md +54 -0
  132. package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/index.js +470 -0
  133. package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/README.en.md +24 -0
  134. package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/index.js +214 -0
  135. package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/README.en.md +33 -0
  136. package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/index.js +390 -0
  137. package/vendor/components/sha256/9289efef4a75afe011e54a17e34db08cfb16a450b2e0653e6a98525495cfba99/index.js +315 -0
  138. package/vendor/components/sha256/93256a923199ea51108cdb7491c3c96f376dbef15b64cbf1a1aa7cc5726b4970/index.js +429 -0
  139. package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/README.en.md +24 -0
  140. package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/index.js +550 -0
  141. package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/README.en.md +28 -0
  142. package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/index.js +213 -0
  143. package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/README.en.md +40 -0
  144. package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/index.js +348 -0
  145. package/vendor/components/sha256/97c074a5473618c65f4c23263f056870a0b7940e73475f2a1f32f68c08d8eb0f/index.js +198 -0
  146. package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/README.en.md +66 -0
  147. package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/index.js +984 -0
  148. package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/README.en.md +34 -0
  149. package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/index.js +244 -0
  150. package/vendor/components/sha256/a18b2b15d00c76462a43823b5c270c7ddd7c31794da9c236f74f20f80ec2ffdb/index.js +354 -0
  151. package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/README.en.md +32 -0
  152. package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/index.js +222 -0
  153. package/vendor/components/sha256/a979207c60fbd2a12cb557297eb0217eb098d660de684530a0f43d0d9c64e6ef/index.js +312 -0
  154. package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/README.en.md +34 -0
  155. package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/index.js +244 -0
  156. package/vendor/components/sha256/af7ed69b8969f6da14784b6e9d26e4dfd20147772ea172a99bd936a71be10fcd/index.js +278 -0
  157. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ABCJS-ADAPTER.md +101 -0
  158. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/LICENSE-abcjs.txt +21 -0
  159. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/chords.json +89 -0
  160. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/doremi.json +261 -0
  161. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/extras.json +192 -0
  162. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/kaeru.json +521 -0
  163. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/rhythm.json +248 -0
  164. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ties.json +360 -0
  165. package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/index.js +508 -0
  166. package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/README.en.md +66 -0
  167. package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/index.js +990 -0
  168. package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/README.en.md +24 -0
  169. package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/index.js +550 -0
  170. package/vendor/components/sha256/b8096d7a60609520981273673761a110e40e3bdf52a7ab5548363b20e16f6e93/index.js +404 -0
  171. package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/README.en.md +32 -0
  172. package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/index.js +222 -0
  173. package/vendor/components/sha256/bd8e3893df02411deccc1d6d7b02292ca0d59dfeddfafcf99419430981572c82/index.js +351 -0
  174. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ABCJS-ADAPTER.md +101 -0
  175. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/LICENSE-abcjs.txt +21 -0
  176. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/chords.json +89 -0
  177. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/doremi.json +261 -0
  178. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/extras.json +192 -0
  179. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/kaeru.json +521 -0
  180. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/rhythm.json +248 -0
  181. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ties.json +360 -0
  182. package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/index.js +508 -0
  183. package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/README.en.md +31 -0
  184. package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/index.js +267 -0
  185. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/LICENSE-strokesvg.txt +115 -0
  186. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/OFL.txt +93 -0
  187. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/index.js +749 -0
  188. package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/strokes-CHANGES.md +20 -0
  189. package/vendor/components/sha256/c791e69e722f64146242f97acb29a341160d0c327cfe1d76307954d80e70db85/index.js +268 -0
  190. package/vendor/components/sha256/c8c0de41d603b61c6ec4dc1da5b50559e213dd1f3693ee5019df858016fd6daf/index.js +747 -0
  191. package/vendor/components/sha256/c99d4f2ab443484b9f462e405c72ea4794838b88f8823f27c606d12cbbedb996/index.js +404 -0
  192. package/vendor/components/sha256/cbde046e30c35db60259911a88e2ae0bedaf545e29b1da8b8ce13bc602a33c19/index.js +465 -0
  193. package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/README.en.md +51 -0
  194. package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/index.js +228 -0
  195. package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/README.en.md +35 -0
  196. package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/index.js +179 -0
  197. package/vendor/components/sha256/cf0985ffcd8e7cbe2175ddb9a4342b2a4aa3f322794188fc99af8789b494460d/index.js +521 -0
  198. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/LICENSE-strokesvg.txt +115 -0
  199. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/OFL.txt +93 -0
  200. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/index.js +749 -0
  201. package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/strokes-CHANGES.md +20 -0
  202. package/vendor/components/sha256/d01dc7fd78d08dd720ed86b39d7877dc0913d72e914036088a86af2df2faee52/index.js +484 -0
  203. package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/README.en.md +24 -0
  204. package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/index.js +214 -0
  205. package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/README.en.md +31 -0
  206. package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/index.js +271 -0
  207. package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/README.en.md +25 -0
  208. package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/index.js +316 -0
  209. package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/README.en.md +23 -0
  210. package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/index.js +120 -0
  211. package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/README.en.md +40 -0
  212. package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/index.js +405 -0
  213. package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/README.en.md +66 -0
  214. package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/index.js +984 -0
  215. package/vendor/components/sha256/ddd4b9cbbc282cbb3117ff662e1a14ecdb3cc7c16072a574418ec6a6eecef4d8/index.js +107 -0
  216. package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/README.en.md +22 -0
  217. package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/index.js +145 -0
  218. package/vendor/components/sha256/e2da948daac7bfac158857877b5a6932dbd2369e73901abcef118c92dd20b725/index.js +747 -0
  219. package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/README.en.md +42 -0
  220. package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/index.js +268 -0
  221. package/vendor/components/sha256/e653a4da80f7761442dc5b504ea5b0700fd0acf1979beeff56122cfdb3d4654c/index.js +607 -0
  222. package/vendor/components/sha256/ea217c6821e931b2d8474bf56d38f2dcc89ec705fe1d276f313e1c7e8db2b98a/index.js +233 -0
  223. package/vendor/components/sha256/ea2e4e24838574f607879c7d05556281258c018331e4da3e6f3a5263173f2e99/index.js +75 -0
  224. package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/README.en.md +42 -0
  225. package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/index.js +549 -0
  226. package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/README.en.md +44 -0
  227. package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/index.js +203 -0
  228. package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/README.en.md +34 -0
  229. package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/index.js +244 -0
  230. package/vendor/components/sha256/fa1a09c10181456143d125d68dbbdcacde6bab2e4a2b3e573367103ce28ebf55/index.js +228 -0
  231. package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/README.en.md +51 -0
  232. package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/index.js +228 -0
  233. package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/README.en.md +23 -0
  234. package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/index.js +147 -0
  235. package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/README.en.md +20 -0
  236. package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/index.js +307 -0
  237. package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/README.en.md +26 -0
  238. package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/index.js +322 -0
  239. package/vendor/components-2/manifest-2.12.0.json +2348 -0
  240. package/vendor/components-2/manifest-2.13.0.json +2477 -0
  241. package/vendor/components-2/manifest-2.14.0.json +2460 -0
  242. package/vendor/components-2/manifest-2.14.1.json +2460 -0
  243. package/vendor/components-2/manifest-2.15.0.json +2460 -0
  244. package/vendor/egatari-spec/SOURCE.json +3 -3
  245. package/vendor/egatari-spec/schema/deck-meta.schema.json +15 -0
  246. package/vendor/egatari-spec/schema/egatari-metadata.schema.json +15 -0
@@ -0,0 +1,198 @@
1
+ // m-sweep:パラメータを動かして関数の形の変化を見せる。前の形は灰色で残す
2
+ // <m-sweep f="u*u + c*u*u*u + c*c*u**4" values="[0,0.5,1]" xr="[-3,3]" yr="[0,16]" xt="[-2,0,2]" yt="[0,5,10,15]"
3
+ // xl="*u*" yl="損失" param="c" style="height:380px"></m-sweep>
4
+ // 段階 k(1〜values.length-1)で、値を values[k-1] から values[k] へ動かす。at="[0.5, 3]" なら変化をすべて段階 1 に入れ、
5
+ // i 番目の変化を at[i] 秒から始める。point='{"u": 9.8, "label": "平均待ち {y} 日"}' は u の所の曲線の上の点(値の変化について動く)
6
+ // 2.0(Egatari spec §6.1 の部品):base の MotionElement・el・mtext・prog・lerp・previewOpacity、plot の Plot、expr の compile を使い、
7
+ // プレイヤーのグローバルは使わない(1.x は式の評価器 egatari-expr を写して持っていた)
8
+ egatariParts.define({name: "sweep", version: "2.1.2", requires: {base: "1.2.0", expr: "1.0.0", plot: "1.1.2"}, element: "m-sweep"}, function(deps){
9
+ "use strict";
10
+ var base = deps.base, plot = deps.plot, expr = deps.expr;
11
+ // 関数 f を [a, b] で n 分割した点列(px)。有限でない値(NaN・±Infinity)の点は null
12
+ function samples(p, f, a, b, n){
13
+ var out = [];
14
+ for (var i = 0; i <= n; i++){ var v = a + (b - a) * i / n, x = p.x(v), y = p.y(f(v)); out.push(isFinite(x) && isFinite(y) ? [x, y] : null); }
15
+ return out;
16
+ }
17
+ // 点列の d。null の所で線を切り、次の有限な点から M で引き直す(plot の p.d と同じ字。切れ目がなければ同じ d)
18
+ function pathOf(pts){
19
+ var d = "", pen = false;
20
+ pts.forEach(function(q){ if (q){ d += (pen ? "L" : "M") + q[0].toFixed(1) + "," + q[1].toFixed(1); pen = true; } else pen = false; });
21
+ return d;
22
+ }
23
+ // 線分 s = [[x, y], [x, y]] が箱 r = [x0, y0, x1, y1] にかかるか(Liang–Barsky)
24
+ function segHitsBox(s, r){
25
+ var x = s[0][0], y = s[0][1], dx = s[1][0] - x, dy = s[1][1] - y, t0 = 0, t1 = 1;
26
+ var pp = [-dx, dx, -dy, dy], qq = [x - r[0], r[2] - x, y - r[1], r[3] - y];
27
+ for (var i = 0; i < 4; i++){
28
+ if (pp[i] === 0){ if (qq[i] < 0) return false; continue; }
29
+ var u = qq[i] / pp[i];
30
+ if (pp[i] < 0){ if (u > t1) return false; if (u > t0) t0 = u; }
31
+ else { if (u < t0) return false; if (u < t1) t1 = u; }
32
+ }
33
+ return true;
34
+ }
35
+ // 灰色の線の名前の置き場所:その線のすぐ上か下に、どの線(自分の線も)にもかからないように置く(線の上に字を重ねない)。
36
+ // 候補は自分の線の描かれている点ごとに、字の箱を点の上・下(6 px 離す)、点を中心・左端・右端にした 6 通り。
37
+ // bd(字を置ける範囲)の中で、置いた字(boxes)に重ならず、線にかかる数が最も少なく(1 本 1000)、自分の線に近く、
38
+ // ほかの線から離れている所(40 px まで)。w は字の幅の見積もり、fs は字の大きさ。置けなければ null
39
+ function placeOn(own, w, fs, lines, boxes, bd, cl){
40
+ var best = null, bc = Infinity;
41
+ var hits = function(L, r){
42
+ var q = [Math.max(r[0], cl[0]), Math.max(r[1], cl[1]), Math.min(r[2], cl[2]), Math.min(r[3], cl[3])];
43
+ if (q[0] >= q[2] || q[1] >= q[3]) return false;
44
+ for (var i = 1; i < L.length; i++) if (L[i - 1] && L[i] && segHitsBox([L[i - 1], L[i]], q)) return true;
45
+ return false;
46
+ };
47
+ var near = function(L, r){
48
+ var g = 40;
49
+ L.forEach(function(z){ if (z && z[0] >= cl[0] && z[0] <= cl[2] && z[1] >= cl[1] && z[1] <= cl[3]) g = Math.min(g, Math.hypot(Math.max(r[0] - z[0], 0, z[0] - r[2]), Math.max(r[1] - z[1], 0, z[1] - r[3]))); });
50
+ return g;
51
+ };
52
+ for (var j = 0; j < own.length; j += 3){
53
+ var q = own[j];
54
+ if (!q || q[0] < cl[0] || q[0] > cl[2] || q[1] < cl[1] || q[1] > cl[3]) continue; // 描かれている点だけ
55
+ [-1, 1].forEach(function(side){
56
+ [0.5, 0, 1].forEach(function(f){
57
+ // side −1:箱の下の端が点の 6 px 上。+1:箱の上の端が点の 6 px 下。f:点が箱の横の何割の所か
58
+ var y = side < 0 ? q[1] - 6 - fs * 0.22 : q[1] + 6 + fs * 0.88, x0 = q[0] - w * f;
59
+ var r = [x0, y - fs * 0.88, x0 + w, y + fs * 0.22];
60
+ if (r[0] < bd[0] || r[2] > bd[2] || r[1] < bd[1] || r[3] > bd[3]) return;
61
+ if (boxes.some(function(b){ return r[0] < b[2] + 6 && b[0] < r[2] + 6 && r[1] < b[3] + 4 && b[1] < r[3] + 4; })) return;
62
+ var c = 0, r3 = [r[0] - 3, r[1] - 3, r[2] + 3, r[3] + 3], gap = 40;
63
+ lines.forEach(function(L){ if (hits(L, r3)) c += 1000; else if (L !== own) gap = Math.min(gap, near(L, r)); });
64
+ if (hits(own, r3) && lines.indexOf(own) < 0) c += 1000;
65
+ c += 40 - gap + (f === 0.5 ? 0 : 2);
66
+ if (c < bc){ bc = c; best = {x: x0 + w / 2, y: y, box: r, hits: Math.floor(c / 1000)}; }
67
+ });
68
+ });
69
+ }
70
+ return best;
71
+ }
72
+ return class extends base.MotionElement {
73
+ static partName = "sweep"; // the registry name (define meta name), for report prefixes
74
+ // データの形(kit/shape.js):JSON の子はなく、属性で書く(values は数の配列、2 つ以上)
75
+ static shape = {schema: null, example: '<m-sweep f="u*u + c*u" values="[0,0.5,1]" xr="[-3,3]" yr="[0,10]"></m-sweep>'};
76
+ static props = {
77
+ f: {type: "string", default: "u*u", doc: "関数の式(算術の式。変数は横軸 u とパラメータ c。Math.exp(…) などの Math の関数と定数、+ - * / % **、比較と ? : が使える)"},
78
+ values: {type: "json", default: [0, 1], doc: "パラメータの値の列。ステップごとに次の値へ動く", shape: {type: "array", items: {type: "number"}, minItems: 2}, example: [0, 0.5, 1]},
79
+ param: {type: "string", default: "c", doc: "表示するパラメータの名前"},
80
+ xr: {type: "json", default: [-3, 3]}, yr: {type: "json", default: [0, 10]},
81
+ xt: {type: "json", default: []}, yt: {type: "json", default: []},
82
+ xl: {type: "string", default: ""}, yl: {type: "string", default: ""},
83
+ digits: {type: "number", default: 2, doc: "表示する値の小数の桁数"},
84
+ at: {type: "json", default: null, doc: "変化ごとの開始秒(増える順)。あれば全部をステップ 1 で", shape: {type: "array", items: {type: "number"}}, example: [0.5, 3]},
85
+ point: {type: "json", default: null, doc: "曲線上の点 {u, label({y} = 値), digits}", shape: {type: "object", properties: {u: {type: "number"}, label: {type: "string"}, digits: {type: "number"}}, required: ["u"]}, example: {u: 9.8, label: "平均待ち {y} 日", digits: 1}},
86
+ dur: {type: "number", default: 1.2, doc: "1 ステップの動きの秒数"},
87
+ size: {type: "number", default: 0, doc: "字の大きさ(24 以上。0 = 既定)"},
88
+ };
89
+ get steps(){ return this.getAttribute("steps") !== null ? +this.getAttribute("steps") : this.ats ? 1 : this.props.values.length - 1; }
90
+ // at のときの変化の開始秒(なければ null)。数でない・数が合わない・減る列は知らせて、段階ごとの動きに戻す
91
+ get ats(){
92
+ var A = this.props.at, n = this.props.values.length - 1;
93
+ if (A === null || A === undefined) return null;
94
+ if (!Array.isArray(A) || A.length !== n || A.some(function(x, i){ return typeof x !== "number" || !isFinite(x) || x < 0 || (i > 0 && x < A[i - 1]); })) return null;
95
+ return A;
96
+ }
97
+ mount(ctx){
98
+ var P = this.props, D = base, self = this;
99
+ this.classList.add("plot"); this.style.display = "block";
100
+ // 式は木にしてから計算する(コードとしては実行しない。Egatari spec §6)。書けない式は SyntaxError で、base が受け止めて札を出す(spec §6.1 Containment)
101
+ var g = expr.compile(P.f, {name: "f", vars: ["u", "c"]});
102
+ this.g = function(c){ return function(u){ return g(u, c); }; };
103
+ // size:字の大きさ(24 未満は 24 にして知らせる)。0 なら 2.0 と同じ大きさと余白
104
+ var S = P.size > 0 ? Math.max(24, P.size) : 0, k = S ? S / 26 : 1;
105
+ if (P.size > 0 && P.size < 24) ctx.report("attr", "[sweep] size " + P.size + " is under 24 px; 24 is used");
106
+ this.fs = {lab: S ? Math.round(S * 1.04) : 27, ghost: S ? Math.max(24, Math.round(S * 0.92)) : 24, pt: S || 26};
107
+ var p = this.p = plot.Plot(this, {xr: P.xr, yr: P.yr, xt: P.xt, yt: P.yt, xl: P.xl, yl: P.yl, fs: S || undefined, m: {l: Math.round(86 * k), r: 10, t: Math.round(40 * k), b: Math.round(64 * k)}});
108
+ this.ghosts = P.values.map(function(){ return D.el("path", {fill: "none", stroke: "var(--line)", "stroke-width": 2.5, "clip-path": p.clip, opacity: 0}, p.svg); });
109
+ // 有限でない値のある線は、その所で切って引き、値ごとに 1 回知らせる
110
+ var pts = P.values.map(function(v, i){
111
+ var q = samples(p, self.g(v), P.xr[0], P.xr[1], 300);
112
+ self.ghosts[i].setAttribute("d", pathOf(q));
113
+ if (q.indexOf(null) >= 0) ctx.report("data", "[sweep] f is not a finite number (NaN or ±Infinity) at some u for " + P.param + " = " + v + "; the line is broken there");
114
+ return q;
115
+ });
116
+ this.cur = D.el("path", {fill: "none", stroke: "var(--emph)", "stroke-width": 3.5, "clip-path": p.clip}, p.svg);
117
+ if (P.at !== null && P.at !== undefined && !this.ats) ctx.report("attr", "[sweep] at must be " + (P.values.length - 1) + " non-negative seconds in increasing order (one per change); each change gets its own step instead");
118
+ var A = this.ats; if (A) for (var j = 1; j < A.length; j++) if (A[j] < A[j - 1] + P.dur) { ctx.report("attr", "[sweep] change " + (j + 1) + " starts at " + A[j] + " s, before change " + j + " ends (" + (A[j - 1] + P.dur) + " s); it takes over from there"); break; }
119
+ // 曲線の上の点:u の所の f。値ごとに図の中にあるか確かめる(外なら知らせて、その間は点と字を隠す)
120
+ this.pt = null;
121
+ if (P.point !== null && P.point !== undefined){
122
+ var pt = P.point;
123
+ if (!pt || typeof pt !== "object" || typeof pt.u !== "number" || !isFinite(pt.u)) ctx.report("attr", "[sweep] point needs a number u (where on the curve)");
124
+ else {
125
+ if (pt.u < Math.min(P.xr[0], P.xr[1]) || pt.u > Math.max(P.xr[0], P.xr[1])) ctx.report("range", "[sweep] point.u = " + pt.u + " is outside xr");
126
+ P.values.forEach(function(v){ var y = self.g(v)(pt.u); if (!isFinite(y) || y < Math.min(P.yr[0], P.yr[1]) || y > Math.max(P.yr[0], P.yr[1])) ctx.report("range", "[sweep] the point at u = " + pt.u + " is " + (isFinite(y) ? y : "not a number") + " for " + P.param + " = " + v + ", outside yr (hidden there)"); });
127
+ this.pt = {u: pt.u, label: typeof pt.label === "string" ? pt.label : "", digits: typeof pt.digits === "number" ? pt.digits : P.digits,
128
+ dot: D.el("circle", {r: 9, fill: "var(--emph)", stroke: "var(--bg)", "stroke-width": 3}, p.svg),
129
+ text: D.el("text", {fill: "var(--emph)", stroke: "var(--bg)", "stroke-width": 6, "paint-order": "stroke", "font-size": this.fs.pt}, p.svg)};
130
+ }
131
+ }
132
+ this.lab = D.mtext(p.svg, p.m.l + 10, Math.round(30 * k), "", {fill: "var(--emph)", "font-size": this.fs.lab});
133
+ // 灰色の線の名前(「σ = 0.5」):最後の段階で残る線(最後の値と違う値。同じ値は最初の 1 本)に、--muted の 24px で線の上に(背景色で縁取って)書く。
134
+ // 5 本以上なら最初と最後だけ。置き場所は最後の段階の形(今の線と灰色の線)で決め、灰色の線が見えている間だけ出す
135
+ var V = P.values, L = V.length - 1, fs = this.fs.ghost, wOf = function(str){ return D.textWidth(str, fs, {font: self, mark: true}); }; // base の textWidth(記法の * _ ^ を除く)
136
+ var shown = [];
137
+ V.forEach(function(v, i){ if (i < L && v !== V[L] && V.indexOf(v) === i) shown.push(i); });
138
+ if (shown.length > 4) shown = [shown[0], shown[shown.length - 1]];
139
+ var LS = this.fs.lab, LY = Math.round(30 * k), lw = 0; V.forEach(function(v){ lw = Math.max(lw, wOf(P.param + " = " + v.toFixed(P.digits)) * LS / fs); });
140
+ var boxes = [[p.m.l + 10, LY - LS * 0.88, p.m.l + 10 + lw, LY + LS * 0.22]];
141
+ // 曲線の上の点の字(最後の値の所)にも灰色の線の名前をかけない
142
+ if (this.pt){ var fa = this.ptAt(V[L]); if (fa.inside && fa.str) boxes.push(fa.box); }
143
+ var lines = [pts[L]].concat(V.map(function(v, i){ return i < L && v !== V[L] ? pts[i] : null; }).filter(Boolean));
144
+ // 字は図の中か上の余白に(横軸の目盛りの数字にはかからない)。線は clip の中だけ描かれる
145
+ var bd = [p.m.l + 4, 4, p.W - p.m.r, p.H - p.m.b - 2], cl = [p.m.l, p.m.t - 4, p.W - p.m.r, p.H - p.m.b];
146
+ this.glabs = [];
147
+ shown.forEach(function(i){
148
+ var str = P.param + " = " + V[i].toFixed(P.digits), at = placeOn(pts[i], wOf(str), fs, lines, boxes, bd, cl);
149
+ if (!at){ ctx.report("layout", "[sweep] no free place for the name of the grey line " + JSON.stringify(str) + " (not drawn)"); return; }
150
+ if (at.hits) ctx.report("layout", "[sweep] the name of the grey line " + JSON.stringify(str) + " crosses a line (no free place beside it); give the element more room or a shorter param");
151
+ boxes.push(at.box);
152
+ self.glabs.push({i: i, el: D.mtext(p.svg, +at.x.toFixed(1), +at.y.toFixed(1), str, {"text-anchor": "middle", fill: "var(--muted)", stroke: "var(--bg)", "stroke-width": 6, "paint-order": "stroke", "font-size": fs, opacity: 0})});
153
+ });
154
+ }
155
+ // 曲線の上の点の置き場所(値 c のとき):点、字({y} を今の値に)、字の箱。字は点の右上、図の右端に近ければ左上。図の外なら inside = false
156
+ ptAt(c){
157
+ var q = this.pt, P = this.props, p = this.p, y = this.g(c)(q.u), inside = isFinite(y) && y >= Math.min(P.yr[0], P.yr[1]) && y <= Math.max(P.yr[0], P.yr[1]);
158
+ var X = p.x(q.u), Y = inside ? p.y(y) : 0, str = q.label.replace(/\{y\}/g, inside ? y.toFixed(q.digits) : "");
159
+ var F = this.fs.pt, w = base.textWidth(str, F, {font: this}), right = X + 14 + w <= p.W - p.m.r, tx = right ? X + 14 : X - 14, ty = Math.max(p.m.t + F * 0.8, Y - 14);
160
+ return {inside: inside, X: X, Y: Y, str: str, tx: tx, ty: ty, anchor: right ? "start" : "end", box: [right ? tx : tx - w, ty - F * 0.88, right ? tx + w : tx, ty + F * 0.22]};
161
+ }
162
+ duration(k){ var A = this.ats; return k >= 1 ? (A ? A[A.length - 1] + this.props.dur : this.props.dur) : 0; }
163
+ // 変化の始まり(at のとき):口述原稿の {cue} に合わせる同期点
164
+ cues(k){ var A = this.ats; return A && k === 1 ? A.slice() : null; }
165
+ render(k, t, ctx){
166
+ var P = this.props, V = P.values, preview = !!ctx.preview, PV = preview ? base.previewOpacity(this) : 0;
167
+ // 先を薄く見せる表示:後の段階で動いていく先の値の線を、強調の色でテーマの --preview-opacity(なければ 0.45)で描く
168
+ // pos:始まった変化の数(灰色の線と先を見せる線の境)。at なら段階 1 の中の秒で、なければ段階で決まる
169
+ var A = this.ats, c, pos;
170
+ if (A){
171
+ pos = 0; c = V[0];
172
+ if (k >= 1) for (var i = 0; i < A.length; i++) if (t >= A[i]){ pos = i + 1; c = base.lerp(V[i], V[i + 1], base.prog(t, A[i], P.dur)); }
173
+ } else {
174
+ var to = V[Math.min(k, V.length - 1)], from = k >= 1 ? V[k - 1] : to;
175
+ c = base.lerp(from, to, base.prog(t, 0, P.dur)); pos = Math.min(k, V.length - 1);
176
+ }
177
+ this.cur.setAttribute("d", pathOf(samples(this.p, this.g(c), P.xr[0], P.xr[1], 300)));
178
+ this.lab.textContent = P.param + " = " + c.toFixed(P.digits);
179
+ V.forEach(function(v, i){
180
+ var e = this.ghosts[i], ahead = preview && i > pos && v !== c, col = ahead ? "var(--emph)" : "var(--line)";
181
+ // style は base.el と同じ書き方で書く(style.stroke に代入すると "stroke: var(--x);" になり、作った直後と字が変わる)
182
+ e.setAttribute("style", "stroke:" + col + ";");
183
+ e.setAttribute("opacity", ahead ? PV : i < pos && v !== c ? 1 : 0);
184
+ }, this);
185
+ // 灰色の線の名前は、その線が灰色で見えている間だけ
186
+ this.glabs.forEach(function(o){ o.el.setAttribute("opacity", o.i < pos && V[o.i] !== c ? 1 : 0); });
187
+ // 曲線の上の点と、その字({y} は今の値)。字は点の右上、図の右端に近ければ左上。図の外の値なら隠す
188
+ var q = this.pt;
189
+ if (q){
190
+ var a = this.ptAt(c);
191
+ q.dot.setAttribute("cx", a.X.toFixed(1)); q.dot.setAttribute("cy", a.Y.toFixed(1)); q.dot.setAttribute("opacity", a.inside ? 1 : 0);
192
+ q.text.setAttribute("x", a.tx.toFixed(1)); q.text.setAttribute("y", a.ty.toFixed(1)); q.text.setAttribute("text-anchor", a.anchor);
193
+ if (q.text.textContent !== a.str) q.text.textContent = a.str;
194
+ q.text.setAttribute("opacity", a.inside && a.str ? 1 : 0);
195
+ }
196
+ }
197
+ };
198
+ });
@@ -0,0 +1,66 @@
1
+ ---
2
+ summary: Timeline; events one by one; periods drawn along the axis, overlaps stacked; end exclusive ("1912" = start of 1912)
3
+ steps: event count (default 1 per step in time order; per-step n each; node step wins)
4
+ props:
5
+ orient: h or v
6
+ scale: time or even
7
+ per-step: events per step (0 = all)
8
+ size: label px (shrinks to 24)
9
+ dur: event appear (s)
10
+ stagger: event offset (s)
11
+ unit: ticks: day, week, month
12
+ today: today line (YYYY-MM-DD)
13
+ example: {"nodes": [{"id": "a", "label": "Meiji Restoration", "when": "1868", "whenLabel": "Meiji 1"}, {"id": "b", "label": "Constitution", "when": "1889", "note": "Feb 11"}, {"id": "c", "label": "Sino-Japanese War", "when": "1894", "end": "1895", "tone": "emph"}]}
14
+ ---
15
+
16
+ History, lives, schedules. No coordinates; content and times only.
17
+
18
+ Child JSON: `{"nodes": [...], "edges": [...]}` (`edges` optional).
19
+
20
+ - `when`: number (`1868`, `-500`, `0.5`) or `"YYYY"` `"YYYY-MM"` `"YYYY-MM-DD"`; shown as the date line
21
+ - `whenLabel`: text replacing the date ("Meiji 1"); `when` still sets position
22
+ - `label` (`\n`) or `tex` (KaTeX)
23
+ - `note`: small last line in the box (`--muted`); after the name for periods/milestones
24
+ - `tone`: `term` (default), `emph`, `muted`, `accent2`, `series-1..4`
25
+ - `end`: a period, drawn along the axis below it; name inside (or beside); `\n` names thicken it
26
+ - `end` is exclusive: Meiji 1868–1912 and Taishō 1912–1926 share a row; through December = next month (`"2027-01"`)
27
+ - `lane`: named group of rows ("Eras", "Authors"); overlaps stack within; `lane` without `end` = milestone (◆)
28
+ - `step`, `at` (start s)
29
+ - `edges`: extra links (`from` `to` `label` `tone` `dash` `step`); dashed arrows (`dash: false` solid)
30
+ - Schedules: `after: ["id", …]` (arrow end→start), `progress` (0–100 %); `today` line; tick `unit`
31
+ - `after` only between periods and milestones; `today` needs a period
32
+
33
+ Layout:
34
+
35
+ - `orient`: `h` (default) or `v`; `scale`: `time` (default) or `even` (very uneven gaps)
36
+ - Events (no `end` or `lane`): axis dot plus date-and-name box, alternating sides (`v`: left/right); 2 rows when crowded
37
+ - With periods: round ticks; event boxes all above the axis
38
+ - Steps: time order, periods and events together; the axis comes with the first
39
+ - `variant`: `fade` (default), `draw` (lines first, periods drawn), `grow` (boxes grow, periods stretch); same steps and end
40
+ - Show later steps faintly (`ctx.preview`): later items faint
41
+ - `cues(k)`: start times of 2nd+ items in a step (for `{cue}`)
42
+
43
+ The demo is `demo.html`; the schedule is fictional, years are history.
44
+
45
+ <!-- llm: omit -->
46
+ Notes
47
+
48
+ - Box and tick widths estimated from characters (CJK 1, digits 0.6, Latin 0.62)
49
+ - No fit: names shrink from `size` by 2px to 24px, then `ctx.report("size", …)`
50
+ - No `Date` (leap years computed); months and days as positions in the year
51
+ - Period names sit in the period's `g`
52
+ - Axis `--muted` 5 px; lane dividers `--line`; links and `edges` `--muted` 3 px
53
+ - Motion: boxes and periods move ≤ 12 px from the axis side, within `fade` time (conventions §1.2)
54
+ <!-- llm: end -->
55
+
56
+ <!-- llm: omit -->
57
+ Schedules (`after`, `progress`, `today`, `unit`)
58
+
59
+ - Any `after`: one row per task in each lane (written order). Arrows only between periods and milestones (others reported)
60
+ - Arrows (`--muted` 3px, right-angled) from a task's end to the next one's start; drawn with the later task; avoid crossing periods where possible
61
+ - A last milestone gets room for its name; arrows to periods whose name is left of the start enter at the edge
62
+ - `progress`: period filled darker from the start; "70%" shown if room; outside 0–100 clamped and reported
63
+ - `today`: only with periods (else reported); small triangle and vertical line (`--accent2`, 3px), "Today" below; range widens to include it
64
+ - `unit`: default month (≤ 4 years with months/days) or round numbers. `day`: 1–2 days or 1–8 weeks (Mondays); `week`: 1–26 weeks; `month`: 1–120 months; finest step whose 24px labels don't overlap; minor ticks unlabeled. Day/week labels "11/2"; `day` shades weekends (`--line`)
65
+ - No plan-vs-actual periods yet
66
+ <!-- llm: end -->