egatari 0.6.13 → 0.6.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -1
- package/README.ja.md +46 -46
- package/bin/egatari.mjs +6 -6
- package/components.lock.json +507 -153
- package/components2.lock.json +1710 -33
- package/kit/build.mjs +3 -1
- package/kit/check-messages.mjs +23 -8
- package/kit/check.mjs +27 -15
- package/kit/core/article-messages.mjs +4 -4
- package/kit/core/article-render.mjs +1 -1
- package/kit/core/article-text.mjs +3 -1
- package/kit/core/build-core.mjs +28 -6
- package/kit/core/check-parity.mjs +3 -1
- package/kit/core/check-rules.mjs +6 -4
- package/kit/core/colab-core.mjs +3 -3
- package/kit/core/comment-core.mjs +6 -0
- package/kit/core/image-size.mjs +35 -0
- package/kit/core/layout-scan.mjs +89 -2
- package/kit/core/llm-fix.mjs +39 -6
- package/kit/core/llm-pack-assemble.mjs +5 -2
- package/kit/core/llm-pack-data.mjs +269 -83
- package/kit/core/llm-pack.mjs +3 -3
- package/kit/core/new-deck.mjs +17 -3
- package/kit/core/part-labels.mjs +9 -3
- package/kit/core/parts2.mjs +1 -1
- package/kit/core/player.mjs +18 -0
- package/kit/core/portable.mjs +44 -4
- package/kit/core/purposes.mjs +6 -3
- package/kit/core/readable-parts.mjs +42 -0
- package/kit/core/themes-lock.mjs +1 -1
- package/kit/core/tier-a.mjs +14 -2
- package/kit/deck.js +49 -2
- package/kit/instruction-version.json +1 -1
- package/kit/live.js +6 -6
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/presenter.js +3 -1
- package/kit/readable-parts.mjs +25 -0
- package/kit/tools.js +11 -4
- package/package.json +4 -2
- package/server/dev.mjs +7 -6
- package/server/editor-ui.js +9 -4
- package/server/hints.js +22 -2
- package/tts/yomi.yaml +1 -1
- package/vendor/components/CATALOG.md +21 -14
- package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/README.en.md +40 -0
- package/vendor/components/sha256/000cc8b85d22854d93587d53fe07585e0d9f0abee86d863c5ed1f6c53967912b/index.js +408 -0
- package/vendor/components/sha256/0396a1895978803ae342b7f598f187b17ead47800e8f8317a5cb041111349813/index.js +278 -0
- package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/README.en.md +26 -0
- package/vendor/components/sha256/07b8bfd9240585ee76082632c6f9483017d46ad3c74e509e715c27294970606c/index.js +322 -0
- package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/README.en.md +54 -0
- package/vendor/components/sha256/08778858e2fb42765077b50e08f848089b1d11ea394909a4f611557b94b3acf2/index.js +470 -0
- package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/README.en.md +18 -0
- package/vendor/components/sha256/0a08eb254e59cb306adb32c940ffe54e88efa3c9b7ef05ee021c38995996e742/index.js +279 -0
- package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/README.en.md +31 -0
- package/vendor/components/sha256/1001b3cfcd3fbc34370accbb37aa550c8cadbb54bf8e8155d417219de3797be9/index.js +267 -0
- package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/README.en.md +53 -0
- package/vendor/components/sha256/109c302247e0c62720872be35392a73bea72804b0ed421ef8ced3f030f72e537/index.js +171 -0
- package/vendor/components/sha256/1117758820dc561f41cf9d1cc0bab8cf3173cde7771ac10a12b94c96007c0f55/index.js +268 -0
- package/vendor/components/sha256/137017ad452afe209bdff81bc02ffae99c6b60a1c4aed2383515974f65511ff2/index.js +205 -0
- package/vendor/components/sha256/1a1471ba5f68e54304825a64e736afeda421e3763cdcbcdab2e45509562a0291/index.js +607 -0
- package/vendor/components/sha256/1b15fcc12b2fa43821e6299e87aae31aa69dbbc5a0d1b80088a5d7c5f8b8f7f5/index.js +429 -0
- package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/README.en.md +23 -0
- package/vendor/components/sha256/1cc1732d052e58f7913ee50c0fc834d896db6b00ba779164de11b442347863db/index.js +147 -0
- package/vendor/components/sha256/21c099461befc0d382ddfe982f2a6cd8eeb6dd731252164ac619525e4bacdf0d/index.js +242 -0
- package/vendor/components/sha256/2352e0e22460f4a3c46dca6cef27cd9c63f161a411f1cf56c75c585e9124503c/index.js +315 -0
- package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/README.en.md +53 -0
- package/vendor/components/sha256/2564dd8096be4cb3ba43703dc76029c1ba3965b831e430597c754865df4b67f4/index.js +171 -0
- package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/README.en.md +38 -0
- package/vendor/components/sha256/2bae0f89ba91574c6ffb654e246365acd9aaf16a7aae92d95e1bad045671fbd2/index.js +414 -0
- package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/README.en.md +45 -0
- package/vendor/components/sha256/2c68c355d60fdc879728c39245b7cf964b193628b63e9ab87df09c6bc2bfa7d3/index.js +211 -0
- package/vendor/components/sha256/2f111b900898579b3ec1611c2110db336a46d9133171a0cbb125ee37bd1f24f8/index.js +592 -0
- package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/README.en.md +45 -0
- package/vendor/components/sha256/2fd81df4107ecb28c0dcecfdb3fd8fb9a474b5a7e0aeb16d8c0c6b1275c3a178/index.js +211 -0
- package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/README.en.md +20 -0
- package/vendor/components/sha256/337febae1374670413653c453feee7cec169892e130248617c6642a91678564e/index.js +310 -0
- package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/README.en.md +35 -0
- package/vendor/components/sha256/38f6385118112c679b520909d677935176e0c7aa2183a877324eeb5108606eae/index.js +179 -0
- package/vendor/components/sha256/3af0b84b1799fc64ec74d6da9cbd343eccd89e8a11c81bfb444562c911284442/index.js +342 -0
- package/vendor/components/sha256/3c69bf3b3c6b9f76048fbc0839b3aa9699723570086d3d44bac799230ed6de5b/index.js +121 -0
- package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/README.en.md +37 -0
- package/vendor/components/sha256/3f2f66da34496213cf6140ae041122c31f13c77e5ee18ad11a3390fbc4a6ecca/index.js +501 -0
- package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/README.en.md +38 -0
- package/vendor/components/sha256/41b82d13037c4597e560cf2b3adebea4495ebb4711a8bb82b1a84495839b8fc8/index.js +414 -0
- package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/README.en.md +30 -0
- package/vendor/components/sha256/4220949efd68ff86e73ee6a0920b9f5b53f445cfcd657db72ecb2b55da1cc019/index.js +305 -0
- package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/README.en.md +31 -0
- package/vendor/components/sha256/47f7ea3e2551abb250a9f5883716791026f0f54ae9cca6d82fabdb92478c69ae/index.js +236 -0
- package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/README.en.md +21 -0
- package/vendor/components/sha256/4b515bfb3a39a6c1e2b04f235affc5bc84e74d80bfd7f9e6d9b5d84d0a9eeb57/index.js +108 -0
- package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/README.en.md +28 -0
- package/vendor/components/sha256/4e7ba7759ddebfa5432b733e5f10abfd336ef7d6cc4d46305d5ff7d00ed3a423/index.js +213 -0
- package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/README.en.md +35 -0
- package/vendor/components/sha256/52149f061935e65502b8353cf70285bba93ab24451d2daac26b994d3901d3864/index.js +179 -0
- package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/README.en.md +53 -0
- package/vendor/components/sha256/5644e63364f46ee53d5f8623355149753147cdc4720e4c66fc9b8a32627e68a5/index.js +171 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ABCJS-ADAPTER.md +101 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/LICENSE-abcjs.txt +21 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/chords.json +89 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/doremi.json +261 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/extras.json +192 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/kaeru.json +521 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/rhythm.json +248 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/fixtures/ties.json +360 -0
- package/vendor/components/sha256/5662bea8cc48f484ccf14c5a8ac12d64b2c5ab032a26176d133ed3a8eb33a557/index.js +508 -0
- package/vendor/components/sha256/59996a56df462b36e24a928d4397c9308d9e39ad8224ebd19fb5c981608ef458/index.js +521 -0
- package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/README.en.md +30 -0
- package/vendor/components/sha256/5afcaf27e9209a32a8a8e6667b637ea434326b76f563689552716de953c94a98/index.js +305 -0
- package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/README.en.md +30 -0
- package/vendor/components/sha256/5cf9baec12bac716d9218d6fbc4f95446adf31658da62564aa403bb5bdee542e/index.js +192 -0
- package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/README.en.md +20 -0
- package/vendor/components/sha256/5ffac218340cc51ce842a530f6021fc916090376b243e2ad5d4c0ef48a040ce9/index.js +307 -0
- package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/README.en.md +24 -0
- package/vendor/components/sha256/6084fd3102b7d450db3804120ac27aa585ab44937734d980fb50c51f39fc98a7/index.js +554 -0
- package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/README.en.md +25 -0
- package/vendor/components/sha256/60e3e41c34034e16f9f7ee9ce6c8d669ebb753614989fc2e5e181ef295e83631/index.js +316 -0
- package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/README.en.md +18 -0
- package/vendor/components/sha256/6156a8a03235e1ed92d3cd3ba1f40df86667059003d82e47297bd3917ef562b8/index.js +279 -0
- package/vendor/components/sha256/624acb997c4975ace65570b529b3ba00baa421c80ecb7fc80f392a64e8c573a7/index.js +107 -0
- package/vendor/components/sha256/62602488ee33dd4bdef8516de16da5ab27d7f7265d5041681beab80e08f1d482/index.js +97 -0
- package/vendor/components/sha256/67eaf344bddac79b74ed03fdcd70285c7b52b160e6c5ffbd6897848179aa5230/index.js +818 -0
- package/vendor/components/sha256/682c9c8871eccd19ff1264e0323a2e4c5798b0488b612ba0339c6fe85aab5914/index.js +926 -0
- package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/README.en.md +51 -0
- package/vendor/components/sha256/6937967bbf62098aca7cef99f14f97fa11c861a12da6a1d8fe5fa55a6b4551f2/index.js +230 -0
- package/vendor/components/sha256/72138936ed0b8fd3cb0214ae7ed250ae3f1f8b21ed6fd593544947774064ba0d/index.js +250 -0
- package/vendor/components/sha256/74c1a0f3ed1370c5003aa5770ee28cea2ce994d415680116a92fdbcd5854ba62/index.js +198 -0
- package/vendor/components/sha256/76125035eb153b98befa9c735bcd9fc4f99f774dc1d082fdae40acaadfe7d95b/index.js +818 -0
- package/vendor/components/sha256/7728cf7dde88a6688aba0ed70f23f7e21362a147beac09c1fa1a4b773e08e93b/index.js +354 -0
- package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/README.en.md +23 -0
- package/vendor/components/sha256/7822f137d446604a83c1dbc3b40fdb455001dc55da12276ff3e7079d270dd143/index.js +289 -0
- package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/README.en.md +31 -0
- package/vendor/components/sha256/7c2b93508a09a5dd36639ab1329ca6d00487b326c53db436b14295174dc03369/index.js +236 -0
- package/vendor/components/sha256/7d50e50fbb6c5ec636b62509bd88ddaac1870e0522cf11bcc293ce924d48072d/index.js +312 -0
- package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/README.en.md +42 -0
- package/vendor/components/sha256/82ffee434e7f2213031190f832f3a75a8cdf59554fdbc092c0b079d6b0753cad/index.js +549 -0
- package/vendor/components/sha256/87fc302c41b2bfeea88951ed689ec01b4dc79218c4bc69b310dc2228dfa2e153/index.js +926 -0
- package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/README.en.md +24 -0
- package/vendor/components/sha256/8886ccd82d68dc1bbf5b7ffcef746074ce8a3d26414d55691dc5e691e4976ded/index.js +103 -0
- package/vendor/components/sha256/89c8c16788e24df17920542ed6eb6557dea4a10e835de8fe839e439ccbba8014/index.js +69 -0
- package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/README.en.md +44 -0
- package/vendor/components/sha256/8beed7e471fa0d6b801b5c540f69ab77220e228c58ff16b0bc2b1a6eef30800e/index.js +304 -0
- package/vendor/components/sha256/8d9af78aef44ad2f98101c67d32473373d39725a09c923969aa621d5f5b124bb/index.js +121 -0
- package/vendor/components/sha256/8f861d71df72a82be86a3e63abf7d69bbab5aac6fa68be6e077c4e19c3519ed8/index.js +312 -0
- package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/README.en.md +54 -0
- package/vendor/components/sha256/90415da5ad04e1944258e29c929c5de65c8152c829414e911ba55a84ac89f348/index.js +470 -0
- package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/README.en.md +24 -0
- package/vendor/components/sha256/91a1e0e48e20cac705cbe6e33e66a24a2851b1dc88c5164ed906bcecba4d943f/index.js +214 -0
- package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/README.en.md +33 -0
- package/vendor/components/sha256/91a9353a0c3b3744765944783aa1537b3f6ff1677c67caede643cdf2f52289cf/index.js +390 -0
- package/vendor/components/sha256/9289efef4a75afe011e54a17e34db08cfb16a450b2e0653e6a98525495cfba99/index.js +315 -0
- package/vendor/components/sha256/93256a923199ea51108cdb7491c3c96f376dbef15b64cbf1a1aa7cc5726b4970/index.js +429 -0
- package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/README.en.md +24 -0
- package/vendor/components/sha256/94f4891971b26f5bc157ef9f7f630b1528fc7e2a4c63e84e01951a5a3f94cedc/index.js +550 -0
- package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/README.en.md +28 -0
- package/vendor/components/sha256/94f4f798fdd070fc1693494e772ff479d3e694a07a0c97b6e97c3b3895cad478/index.js +213 -0
- package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/README.en.md +40 -0
- package/vendor/components/sha256/95583538da2982ec5f508217a8f2821796e6a34cf755baa66f2aaeb1c6dae814/index.js +348 -0
- package/vendor/components/sha256/97c074a5473618c65f4c23263f056870a0b7940e73475f2a1f32f68c08d8eb0f/index.js +198 -0
- package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/README.en.md +66 -0
- package/vendor/components/sha256/98e1957b1fac2d55d9bfa6a0990ead6a2730d571c988055ca280df05a0e9ea37/index.js +984 -0
- package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/README.en.md +34 -0
- package/vendor/components/sha256/99a26795f8b351ade4a4cbbea845aeb149c96b09fe96151edda57128082185fa/index.js +244 -0
- package/vendor/components/sha256/a18b2b15d00c76462a43823b5c270c7ddd7c31794da9c236f74f20f80ec2ffdb/index.js +354 -0
- package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/README.en.md +32 -0
- package/vendor/components/sha256/a744049fc56e0a5d5b1638bef597a4e65f99d0776a35d830a389f216f314f1bc/index.js +222 -0
- package/vendor/components/sha256/a979207c60fbd2a12cb557297eb0217eb098d660de684530a0f43d0d9c64e6ef/index.js +312 -0
- package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/README.en.md +34 -0
- package/vendor/components/sha256/aba898152e40ca44e1e7bea22242bd6897a31e0254cbfd70e426907b65379af2/index.js +244 -0
- package/vendor/components/sha256/af7ed69b8969f6da14784b6e9d26e4dfd20147772ea172a99bd936a71be10fcd/index.js +278 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ABCJS-ADAPTER.md +101 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/LICENSE-abcjs.txt +21 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/chords.json +89 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/doremi.json +261 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/extras.json +192 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/kaeru.json +521 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/rhythm.json +248 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/fixtures/ties.json +360 -0
- package/vendor/components/sha256/b08a536a07498629c026f8fc2962acda791c83a99268ac715db5e764087000e2/index.js +508 -0
- package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/README.en.md +66 -0
- package/vendor/components/sha256/b28d136dffb03a3e855b2ff959712a143da9a84c3a4fd13a1126d7711083a2d6/index.js +990 -0
- package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/README.en.md +24 -0
- package/vendor/components/sha256/b2d9c417f258745c56c04e05dc9463a412a4978d46c3ffff2556f0b0fafbbfc2/index.js +550 -0
- package/vendor/components/sha256/b8096d7a60609520981273673761a110e40e3bdf52a7ab5548363b20e16f6e93/index.js +404 -0
- package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/README.en.md +32 -0
- package/vendor/components/sha256/b9e27e84b2c534b87d6da5da30ee808d7863cbd1b818082b4c11d1f8b7129b1a/index.js +222 -0
- package/vendor/components/sha256/bd8e3893df02411deccc1d6d7b02292ca0d59dfeddfafcf99419430981572c82/index.js +351 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ABCJS-ADAPTER.md +101 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/LICENSE-abcjs.txt +21 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/chords.json +89 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/doremi.json +261 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/extras.json +192 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/kaeru.json +521 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/rhythm.json +248 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/fixtures/ties.json +360 -0
- package/vendor/components/sha256/c201dbc3f1f790c59cc010b3be3566daa9085754614402e9dc1296dba9e87769/index.js +508 -0
- package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/README.en.md +31 -0
- package/vendor/components/sha256/c5226220649a5854d56ceeaea16722fe54a79b4197f71c51c4e1523bf22bec32/index.js +267 -0
- package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/LICENSE-strokesvg.txt +115 -0
- package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/OFL.txt +93 -0
- package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/index.js +749 -0
- package/vendor/components/sha256/c691f9c83d06502bf20f86df02ee5a516063d6af1e9ee8204aad8fd8c1a44a71/strokes-CHANGES.md +20 -0
- package/vendor/components/sha256/c791e69e722f64146242f97acb29a341160d0c327cfe1d76307954d80e70db85/index.js +268 -0
- package/vendor/components/sha256/c8c0de41d603b61c6ec4dc1da5b50559e213dd1f3693ee5019df858016fd6daf/index.js +747 -0
- package/vendor/components/sha256/c99d4f2ab443484b9f462e405c72ea4794838b88f8823f27c606d12cbbedb996/index.js +404 -0
- package/vendor/components/sha256/cbde046e30c35db60259911a88e2ae0bedaf545e29b1da8b8ce13bc602a33c19/index.js +465 -0
- package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/README.en.md +51 -0
- package/vendor/components/sha256/ccdd16ed76838ac9d6abb4ee695769bfecb802ae490ac91914ed68131ad04434/index.js +228 -0
- package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/README.en.md +35 -0
- package/vendor/components/sha256/ce0a52fa13ae579020d1172845647daee9ba78e070736e47740f2d2feabffe7e/index.js +179 -0
- package/vendor/components/sha256/cf0985ffcd8e7cbe2175ddb9a4342b2a4aa3f322794188fc99af8789b494460d/index.js +521 -0
- package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/LICENSE-strokesvg.txt +115 -0
- package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/OFL.txt +93 -0
- package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/index.js +749 -0
- package/vendor/components/sha256/cff7ed8a0e0708bcef2e13105b28810bda867251a9f205ad9c2f1a5b4f759866/strokes-CHANGES.md +20 -0
- package/vendor/components/sha256/d01dc7fd78d08dd720ed86b39d7877dc0913d72e914036088a86af2df2faee52/index.js +484 -0
- package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/README.en.md +24 -0
- package/vendor/components/sha256/d448fec2aeb436f187875c493b1592b373c6a18274ffc64231dbe3f1b54f8cbc/index.js +214 -0
- package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/README.en.md +31 -0
- package/vendor/components/sha256/d4aa3ffb394d5db7f47081b1818958547fe164bb968df03131f9400c103b97c4/index.js +271 -0
- package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/README.en.md +25 -0
- package/vendor/components/sha256/d582d02ceeaf1ec4d94115b806852ddb66c009788e67728ae0e08cb8d29ca546/index.js +316 -0
- package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/README.en.md +23 -0
- package/vendor/components/sha256/d75ab2c8f6c01082bfcaeaba44290367d6b49654e2bf538422b7b3e499de9acf/index.js +120 -0
- package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/README.en.md +40 -0
- package/vendor/components/sha256/d8f5272dac33066a04ecefa9a828ca11d18dec581866899f55433573ba4472d6/index.js +405 -0
- package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/README.en.md +66 -0
- package/vendor/components/sha256/dd1ff8de877573e30635928e9abce0b1fba8dfc95a079eca86703a884d3c3d59/index.js +984 -0
- package/vendor/components/sha256/ddd4b9cbbc282cbb3117ff662e1a14ecdb3cc7c16072a574418ec6a6eecef4d8/index.js +107 -0
- package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/README.en.md +22 -0
- package/vendor/components/sha256/e24a4235a661bfda4049e1c72b6c376066fcc65e27a2bdfe77942a3394726c81/index.js +145 -0
- package/vendor/components/sha256/e2da948daac7bfac158857877b5a6932dbd2369e73901abcef118c92dd20b725/index.js +747 -0
- package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/README.en.md +42 -0
- package/vendor/components/sha256/e40201a655bf5c556d70fbf45b5052dd48c33fc8030b331a9d9cbc96913d02a6/index.js +268 -0
- package/vendor/components/sha256/e653a4da80f7761442dc5b504ea5b0700fd0acf1979beeff56122cfdb3d4654c/index.js +607 -0
- package/vendor/components/sha256/ea217c6821e931b2d8474bf56d38f2dcc89ec705fe1d276f313e1c7e8db2b98a/index.js +233 -0
- package/vendor/components/sha256/ea2e4e24838574f607879c7d05556281258c018331e4da3e6f3a5263173f2e99/index.js +75 -0
- package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/README.en.md +42 -0
- package/vendor/components/sha256/eb0b402dc4738b2dca2918c7f64a4d6fc3c27b4ba419270bbe8240a3c8a77f0c/index.js +549 -0
- package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/README.en.md +44 -0
- package/vendor/components/sha256/f219b47f32b0a78e8f8f5dac83596acfed24dd6e8bfe3f05f8ebfb9582d64485/index.js +203 -0
- package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/README.en.md +34 -0
- package/vendor/components/sha256/f4204773037ae296786e3614b5bfd7487b0f5ba6d5cf92ce20262bb7613e1b6b/index.js +244 -0
- package/vendor/components/sha256/fa1a09c10181456143d125d68dbbdcacde6bab2e4a2b3e573367103ce28ebf55/index.js +228 -0
- package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/README.en.md +51 -0
- package/vendor/components/sha256/fa9c9f63d74a514636961bcb8af75063e00e39bdf85655ecf5d4d7bbc05a831a/index.js +228 -0
- package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/README.en.md +23 -0
- package/vendor/components/sha256/facebe095849528396ee91d7d6856cb6945ba89ca8b1f34dce488dccb29e9d40/index.js +147 -0
- package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/README.en.md +20 -0
- package/vendor/components/sha256/fb0a77a344098c53cc90215685cee32b0d31362a1de5b5ac0eee422ed2c3c430/index.js +307 -0
- package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/README.en.md +26 -0
- package/vendor/components/sha256/fc48e703adab4715157f8dbb0e33c8b5c00099358ae522484290a7098fda2910/index.js +322 -0
- package/vendor/components-2/manifest-2.12.0.json +2348 -0
- package/vendor/components-2/manifest-2.13.0.json +2477 -0
- package/vendor/components-2/manifest-2.14.0.json +2460 -0
- package/vendor/components-2/manifest-2.14.1.json +2460 -0
- package/vendor/components-2/manifest-2.15.0.json +2460 -0
- package/vendor/egatari-spec/SOURCE.json +3 -3
- package/vendor/egatari-spec/schema/deck-meta.schema.json +15 -0
- package/vendor/egatari-spec/schema/egatari-metadata.schema.json +15 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
// m-gendai:現代文の読解の図。傍線・二重傍線を引き、指示語から指す内容へ矢印を出し、段落を役割(主張・具体例・対比)の枠で囲んで線でつなぐ
|
|
2
|
+
// <m-gendai tate style="height:440px">
|
|
3
|
+
// @具体例#p1>p3
|
|
4
|
+
// 駅までの道を、私は{地図アプリ|#app}に頼って歩く。…{それ|>app}を閉じると、…
|
|
5
|
+
//
|
|
6
|
+
// @主張#p3
|
|
7
|
+
// 便利な道具は、私たちから=={迷う機会を奪う}==。…{迷うことこそが…営みなのである|_A}
|
|
8
|
+
// </m-gendai>
|
|
9
|
+
// 段落は空行で区切る。段落の頭の行「@役割#名前」で役割(主張・具体例・対比・反論・結論など、自由な言葉)と名前を付け、
|
|
10
|
+
// 「>名前」(その段落を支える・つながる。矢印)か「~名前」(対比。両向きの線)で別の段落とつなぐ。
|
|
11
|
+
// 本文の中:__語句__ 傍線、==語句== 二重傍線、{語句|しるし,…}(しるし:_A 傍線と記号 A、=B 二重傍線と記号 B、#名前 指す先、>名前 指示語)
|
|
12
|
+
// 段階(phases の順。中身のないものは飛ばす。既定は marks refs roles):marks 傍線 → refs 指示語の矢印 → roles 段落の枠と線
|
|
13
|
+
// 線と枠は、字の位置を測って SVG で描く(部品の中の座標。描く度に測るので、呼び出しの順によらない)
|
|
14
|
+
// 2.0(Egatari spec §6.1 の部品):base の MotionElement・el・prog・previewOpacity を使い、プレイヤーのグローバルは使わない。
|
|
15
|
+
// 書き方の誤りは ctx.report("data", "[gendai] …") で知らせる(1.x の console.warn("m-gendai: …") の代わり)。
|
|
16
|
+
// 読み取り(parse)は試験のために static testing に出す(ほかのパーツは読まない)
|
|
17
|
+
egatariParts.define({name: "gendai", version: "2.0.4", requires: {base: "1.3.0"}, element: "m-gendai"}, function(deps){
|
|
18
|
+
"use strict";
|
|
19
|
+
var base = deps.base;
|
|
20
|
+
var D = base;
|
|
21
|
+
|
|
22
|
+
// ---------------------------------------------------------------- 読み取り
|
|
23
|
+
// parse(文字列) → {paras: [{role, id, to, rel, runs: [{t, line, label, id, ref}]}], warnings}
|
|
24
|
+
function parse(src){
|
|
25
|
+
var paras = [], warnings = [], blocks = String(src || "").replace(/\r/g, "").split(/\n\s*\n/);
|
|
26
|
+
blocks.forEach(function(b){
|
|
27
|
+
var lines = b.split("\n").map(function(l){ return l.trim(); }).filter(Boolean);
|
|
28
|
+
if (!lines.length) return;
|
|
29
|
+
var p = {role: "", id: "", to: "", rel: "", runs: []};
|
|
30
|
+
var m = /^@([^#>~\s]*)(?:#([^>~\s]+))?(?:([>~])(\S+))?\s*$/.exec(lines[0]);
|
|
31
|
+
if (m){ p.role = m[1]; p.id = m[2] || ""; p.rel = m[3] || ""; p.to = m[4] || ""; lines.shift(); }
|
|
32
|
+
p.runs = inline(lines.join(""), warnings);
|
|
33
|
+
paras.push(p);
|
|
34
|
+
});
|
|
35
|
+
var ids = {};
|
|
36
|
+
paras.forEach(function(p){ if (p.id) ids[p.id] = true; });
|
|
37
|
+
paras.forEach(function(p){ if (p.to && !ids[p.to]) warnings.push("段落「" + p.to + "」がない(@" + p.role + ")"); });
|
|
38
|
+
var anchors = {};
|
|
39
|
+
paras.forEach(function(p){ p.runs.forEach(function(r){ if (r.id) anchors[r.id] = true; }); });
|
|
40
|
+
paras.forEach(function(p){ p.runs.forEach(function(r){ if (r.ref && !anchors[r.ref]) warnings.push("指す先「#" + r.ref + "」がない(" + r.t + ")"); }); });
|
|
41
|
+
return {paras: paras, warnings: warnings};
|
|
42
|
+
}
|
|
43
|
+
// 本文の中のしるし → 字の並び(runs)。run = {t, line: 0 | 1 | 2(傍線・二重傍線), label, id, ref}
|
|
44
|
+
function inline(s, warnings){
|
|
45
|
+
var runs = [], re = /__(.+?)__|==(.+?)==|\{([^{}|]+)\|([^{}]*)\}/g, last = 0, m;
|
|
46
|
+
var plain = function(t){ if (t) runs.push({t: t, line: 0, label: "", id: "", ref: ""}); };
|
|
47
|
+
while ((m = re.exec(s))){
|
|
48
|
+
plain(s.slice(last, m.index)); last = re.lastIndex;
|
|
49
|
+
if (m[1] !== undefined){ runs.push({t: m[1], line: 1, label: "", id: "", ref: ""}); continue; }
|
|
50
|
+
if (m[2] !== undefined){ runs.push({t: m[2], line: 2, label: "", id: "", ref: ""}); continue; }
|
|
51
|
+
var r = {t: m[3], line: 0, label: "", id: "", ref: ""};
|
|
52
|
+
m[4].split(/[,,、]/).map(function(f){ return f.trim(); }).filter(Boolean).forEach(function(f){
|
|
53
|
+
if (f[0] === "_"){ r.line = 1; r.label = f.slice(1); }
|
|
54
|
+
else if (f[0] === "="){ r.line = 2; r.label = f.slice(1); }
|
|
55
|
+
else if (f[0] === "#") r.id = f.slice(1);
|
|
56
|
+
else if (f[0] === ">") r.ref = f.slice(1);
|
|
57
|
+
else warnings.push("知らないしるし「" + f + "」(" + m[3] + ")");
|
|
58
|
+
});
|
|
59
|
+
runs.push(r);
|
|
60
|
+
}
|
|
61
|
+
plain(s.slice(last));
|
|
62
|
+
// 残った { } __ ==:閉じていないか、入れ子にしたしるし(しるしは入れ子にできない。{語句|=,#名前} のように 1 つにまとめる)
|
|
63
|
+
runs.forEach(function(r){ if (/[{}]|__|==/.test(r.t)) warnings.push("しるしの書き方が違う(閉じていない・入れ子):" + r.t); });
|
|
64
|
+
return runs;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ---------------------------------------------------------------- 部品
|
|
68
|
+
var ROLE_COLOR = function(role){ return /主張|結論|筆者/.test(role) ? "var(--emph)" : /対比|反論|対立/.test(role) ? "var(--accent2)" : /具体|例/.test(role) ? "var(--term)" : "var(--muted)"; };
|
|
69
|
+
var PH = ["marks", "refs", "roles"];
|
|
70
|
+
// 枠をつなぐ線は札(枠の上の名前)から札へ、札と枠の外の通り道(縦書きは札の上、横書きは札の左)を通す。
|
|
71
|
+
// 通り道は線ごとに段(level)を分け、間の段落を越える線ほど外の段を通る。段の数だけ場所を空ける(線が札や枠に重ならないように)
|
|
72
|
+
var CHIP = 34; // 札の高さ
|
|
73
|
+
var STUB = 22, STEP = 16; // 札から 1 段目までの距離、段の間
|
|
74
|
+
var LH_TATE = 2.4; // 縦書きの行の送り(傍線と記号 A の入る列の間を空ける)
|
|
75
|
+
return class extends base.MotionElement {
|
|
76
|
+
static partName = "gendai"; // the registry name (define meta name), for report prefixes
|
|
77
|
+
static testing = {parse: parse}; // for tools/test-kokugo.mjs only (no part reads it)
|
|
78
|
+
// データの形(kit/shape.js):JSON ではなく、要素の中に本文の字(段落は空行で区切る)
|
|
79
|
+
static shape = {text: true, example: "@主張#p1\n便利な道具は、私たちから==迷う機会を奪う==。"};
|
|
80
|
+
static props = {
|
|
81
|
+
size: {type: "number", default: 28, doc: "本文の字の大きさ(px)"},
|
|
82
|
+
tate: {type: "bool", default: false, doc: "縦書きにする(段落は右から左へ、枠をつなぐ線は上を通す)"},
|
|
83
|
+
phases: {type: "string", default: "marks refs roles", doc: "ステップの並び(marks 傍線・refs 指示語・roles 段落の枠から選ぶ。中身のないものは飛ばす)"},
|
|
84
|
+
draw: {type: "number", default: 0.7, doc: "線 1 本を引く秒数"},
|
|
85
|
+
};
|
|
86
|
+
get model(){ if (!this._m) this._m = parse(this._src !== undefined ? this._src : this.textContent); return this._m; }
|
|
87
|
+
get phaseList(){
|
|
88
|
+
var m = this.model, has = {
|
|
89
|
+
marks: m.paras.some(function(p){ return p.runs.some(function(r){ return r.line; }); }),
|
|
90
|
+
refs: m.paras.some(function(p){ return p.runs.some(function(r){ return r.ref; }); }),
|
|
91
|
+
roles: m.paras.some(function(p){ return p.role; })};
|
|
92
|
+
return String(this.props.phases || "").split(/[\s,]+/).filter(function(x){ return PH.indexOf(x) >= 0 && has[x]; });
|
|
93
|
+
}
|
|
94
|
+
get steps(){ return this.getAttribute("steps") !== null ? +this.getAttribute("steps") : this.phaseList.length; }
|
|
95
|
+
phaseStep(name){ return this.phaseList.indexOf(name) + 1; }
|
|
96
|
+
mount(ctx){
|
|
97
|
+
var self = this, P = this.props, tate = P.tate;
|
|
98
|
+
this._src = this.textContent;
|
|
99
|
+
var m = this.model;
|
|
100
|
+
m.warnings.forEach(function(w){ ctx.report("data", "[gendai] " + w); });
|
|
101
|
+
this.textContent = "";
|
|
102
|
+
this.classList.add("plot");
|
|
103
|
+
this.style.display = "block"; this.style.position = "relative";
|
|
104
|
+
this.style.fontFamily = "var(--font-mincho)";
|
|
105
|
+
var W =this.clientWidth || 1184, H = this.clientHeight || 440;
|
|
106
|
+
var roles = m.paras.some(function(p){ return p.role; });
|
|
107
|
+
// つなぐ線の段:つなぐ段落の間の短いものから順に、重なる線より 1 つ外の段へ
|
|
108
|
+
var pIdx = {};
|
|
109
|
+
m.paras.forEach(function(p, i){ if (p.id) pIdx[p.id] = i; });
|
|
110
|
+
var spans = m.paras.map(function(p, i){ return p.to && pIdx[p.to] !== undefined ? {i: i, lo: Math.min(i, pIdx[p.to]), hi: Math.max(i, pIdx[p.to])} : null; }).filter(Boolean)
|
|
111
|
+
.sort(function(a, b){ return (a.hi - a.lo) - (b.hi - b.lo) || a.lo - b.lo; });
|
|
112
|
+
var levelOf = {}, placed = [], nLev = 0;
|
|
113
|
+
spans.forEach(function(o){
|
|
114
|
+
var lv = 1;
|
|
115
|
+
placed.forEach(function(q){ if (q.lo < o.hi && o.lo < q.hi) lv = Math.max(lv, q.lv + 1); });
|
|
116
|
+
o.lv = lv; placed.push(o); levelOf[o.i] = lv; nLev = Math.max(nLev, lv);
|
|
117
|
+
});
|
|
118
|
+
this.nLev = nLev;
|
|
119
|
+
// 通り道と札の場所:縦書きは上に(札 + 段)、横書きは左に(段)と上に(札)
|
|
120
|
+
var lane = nLev ? STUB + (nLev - 1) * STEP + 10 : 0;
|
|
121
|
+
this.padTop = tate ? (roles ? CHIP + lane + 10 : 20) : (roles ? CHIP + 10 : 20);
|
|
122
|
+
this.padLeft = tate ? 0 : (nLev ? lane - 2 : 4);
|
|
123
|
+
// 重ね順:塗り(指す先の淡い色)→ 字 → 線・枠・矢印
|
|
124
|
+
this.back = D.el("svg", {width: W, height: H, viewBox: "0 0 " + W + " " + H, "aria-hidden": "true", style: "position:absolute;left:0;top:0;overflow:visible;pointer-events:none"}, this);
|
|
125
|
+
var text = document.createElement("div");
|
|
126
|
+
text.style.cssText = "position:absolute;inset:0;font-size:" + P.size + "px;line-height:" + (tate ? LH_TATE : 1.85) + ";padding-top:" + this.padTop + "px;" + (tate ? "writing-mode:vertical-rl;" : "padding-left:" + this.padLeft + "px;");
|
|
127
|
+
this.appendChild(text);
|
|
128
|
+
this.front = D.el("svg", {width: W, height: H, viewBox: "0 0 " + W + " " + H, "aria-hidden": "true", style: "position:absolute;left:0;top:0;overflow:visible;pointer-events:none"}, this);
|
|
129
|
+
this.text = text;
|
|
130
|
+
var byId = {};
|
|
131
|
+
this.paras = m.paras.map(function(p, pi){
|
|
132
|
+
var d = document.createElement("div");
|
|
133
|
+
// 枠の内側の余白と、段落の間(枠の名前の札が入る)
|
|
134
|
+
// 横書きは次の段落の札が前の枠に掛からないように空ける
|
|
135
|
+
d.style.cssText = "padding:10px 14px;text-indent:1em;" + (tate ? "margin:0 0 0 22px;" : "margin:0 0 " + (roles ? CHIP + 12 : 22) + "px 0;");
|
|
136
|
+
text.appendChild(d);
|
|
137
|
+
var P2 = {p: p, el: d, spans: []};
|
|
138
|
+
p.runs.forEach(function(r){
|
|
139
|
+
if (!r.line && !r.id && !r.ref){ d.appendChild(document.createTextNode(r.t)); return; }
|
|
140
|
+
var s = document.createElement("span"); s.textContent = r.t; d.appendChild(s);
|
|
141
|
+
P2.spans.push({r: r, el: s});
|
|
142
|
+
if (r.id) byId[r.id] = s;
|
|
143
|
+
});
|
|
144
|
+
return P2;
|
|
145
|
+
});
|
|
146
|
+
this.byId = byId;
|
|
147
|
+
// 傍線(引く順に)
|
|
148
|
+
this.lines = [];
|
|
149
|
+
this.paras.forEach(function(P2){ P2.spans.forEach(function(s){ if (s.r.line){
|
|
150
|
+
var g = D.el("g", {}, self.front), o = {el: s.el, r: s.r, g: g, segs: [], lab: null};
|
|
151
|
+
if (s.r.label) o.lab = D.el("text", {"font-size": 24, "font-weight": 700, fill: "var(--emph)", "text-anchor": "middle", opacity: 0}, g);
|
|
152
|
+
if (o.lab) o.lab.textContent = s.r.label;
|
|
153
|
+
self.lines.push(o);
|
|
154
|
+
} }); });
|
|
155
|
+
// 指示語 → 指す先
|
|
156
|
+
this.refs = [];
|
|
157
|
+
this.paras.forEach(function(P2){ P2.spans.forEach(function(s){ if (s.r.ref && byId[s.r.ref]){
|
|
158
|
+
self.refs.push({from: s.el, to: byId[s.r.ref],
|
|
159
|
+
fill: D.el("g", {opacity: 0}, self.back),
|
|
160
|
+
box: D.el("g", {opacity: 0}, self.front),
|
|
161
|
+
path: D.el("path", {fill: "none", stroke: "var(--emph)", "stroke-width": 3, "stroke-linecap": "round", pathLength: 1, "stroke-dasharray": 1, "stroke-dashoffset": 1}, self.front),
|
|
162
|
+
head: D.el("path", {d: "M0,0L-14,-7L-14,7Z", fill: "var(--emph)", opacity: 0}, self.front)});
|
|
163
|
+
} }); });
|
|
164
|
+
// 段落の枠・札・つなぐ線
|
|
165
|
+
var pById = {};
|
|
166
|
+
this.paras.forEach(function(P2){ if (P2.p.id) pById[P2.p.id] = P2; });
|
|
167
|
+
this.boxes = this.paras.filter(function(P2){ return P2.p.role; }).map(function(P2){
|
|
168
|
+
var c = ROLE_COLOR(P2.p.role);
|
|
169
|
+
var rect = D.el("rect", {fill: "none", stroke: c, "stroke-width": 2.5, rx: 10, pathLength: 1, "stroke-dasharray": 1, "stroke-dashoffset": 1}, self.front);
|
|
170
|
+
var chip = D.el("g", {opacity: 0}, self.front);
|
|
171
|
+
var cr = D.el("rect", {fill: "var(--bg)", stroke: c, "stroke-width": 2, rx: 14, height: 34}, chip);
|
|
172
|
+
var ct = D.el("text", {"font-size": 24, "font-weight": 700, fill: c, "text-anchor": "middle"}, chip);
|
|
173
|
+
ct.textContent = P2.p.role;
|
|
174
|
+
return {P2: P2, c: c, rect: rect, chip: chip, cr: cr, ct: ct};
|
|
175
|
+
});
|
|
176
|
+
this.links = this.paras.filter(function(P2){ return P2.p.to && pById[P2.p.to]; }).map(function(P2){
|
|
177
|
+
var c = P2.p.rel === "~" ? "var(--accent2)" : "var(--muted)";
|
|
178
|
+
return {a: P2, b: pById[P2.p.to], rel: P2.p.rel, c: c, lv: levelOf[self.paras.indexOf(P2)] || 1,
|
|
179
|
+
path: D.el("path", {fill: "none", stroke: c, "stroke-width": 2.5, "stroke-dasharray": P2.p.rel === "~" ? "none" : "none", pathLength: 1}, self.front),
|
|
180
|
+
h1: D.el("path", {d: "M0,0L-13,-6.5L-13,6.5Z", fill: c, opacity: 0}, self.front),
|
|
181
|
+
h0: P2.p.rel === "~" ? D.el("path", {d: "M0,0L-13,-6.5L-13,6.5Z", fill: c, opacity: 0}, self.front) : null};
|
|
182
|
+
});
|
|
183
|
+
// 読み上げ:本文はそのまま読める字(role="figure" の中身)。名前は最後の形の読解のしるし(傍線・指示語・段落の役割とつながり。
|
|
184
|
+
// phases にある段階のものだけ)を 1 文で。線と枠の SVG は aria-hidden。作者の aria-label があればそれを使う(上書きしない)
|
|
185
|
+
if (this._aria === undefined) this._aria = this.getAttribute("aria-label");
|
|
186
|
+
this.setAttribute("role", "figure");
|
|
187
|
+
if (!this._aria) this.setAttribute("aria-label", this.summary());
|
|
188
|
+
}
|
|
189
|
+
// 最後の形の読解のしるしを 1 文で(読み上げの名前)
|
|
190
|
+
summary(){
|
|
191
|
+
var m = this.model, ph = this.phaseList, out = [], anchors = {};
|
|
192
|
+
m.paras.forEach(function(p){ p.runs.forEach(function(r){ if (r.id) anchors[r.id] = r.t; }); });
|
|
193
|
+
var runs = [].concat.apply([], m.paras.map(function(p){ return p.runs; }));
|
|
194
|
+
if (ph.indexOf("marks") >= 0) out.push(runs.filter(function(r){ return r.line; }).map(function(r){ return (r.line === 2 ? "二重傍線" : "傍線") + (r.label ? " " + r.label : "") + "「" + r.t + "」"; }).join("、"));
|
|
195
|
+
if (ph.indexOf("refs") >= 0) out.push(runs.filter(function(r){ return r.ref && anchors[r.ref] !== undefined; }).map(function(r){ return "指示語「" + r.t + "」は「" + anchors[r.ref] + "」を指す"; }).join("、"));
|
|
196
|
+
if (ph.indexOf("roles") >= 0){
|
|
197
|
+
var byId = {};
|
|
198
|
+
m.paras.forEach(function(p){ if (p.id) byId[p.id] = p; });
|
|
199
|
+
var links = m.paras.filter(function(p){ return p.to && byId[p.to]; }).map(function(p){ return (p.role || "段落") + (p.rel === "~" ? " ↔ " : " → ") + (byId[p.to].role || "段落"); });
|
|
200
|
+
out.push("段落の役割:" + m.paras.map(function(p){ return p.role; }).filter(Boolean).join("・") + (links.length ? "(" + links.join("、") + ")" : ""));
|
|
201
|
+
}
|
|
202
|
+
out = out.filter(Boolean);
|
|
203
|
+
return "現代文の読解" + (out.length ? ":" + out.join("。") : "");
|
|
204
|
+
}
|
|
205
|
+
// 要素の字の箱(行ごと)を部品の座標で。部品の外側の拡大(舞台の scale・段階の translate)によらない
|
|
206
|
+
rects(e){
|
|
207
|
+
var R = this.getBoundingClientRect(), sc = R.width / (this.offsetWidth || 1) || 1;
|
|
208
|
+
return [].map.call(e.getClientRects(), function(r){ return {l: (r.left - R.left) / sc, t: (r.top - R.top) / sc, r: (r.right - R.left) / sc, b: (r.bottom - R.top) / sc}; })
|
|
209
|
+
.filter(function(r){ return r.r - r.l > 0.5 && r.b - r.t > 0.5; });
|
|
210
|
+
}
|
|
211
|
+
box(e){ var r = this.rects(e), o = null; r.forEach(function(x){ o = o ? {l: Math.min(o.l, x.l), t: Math.min(o.t, x.t), r: Math.max(o.r, x.r), b: Math.max(o.b, x.b)} : x; }); return o; }
|
|
212
|
+
duration(k){
|
|
213
|
+
var name = this.phaseList[k - 1], P = this.props;
|
|
214
|
+
if (name === "marks") return this.lines.length * P.draw * 0.8 + 0.3;
|
|
215
|
+
if (name === "refs") return this.refs.length * (P.draw + 0.3) + 0.2;
|
|
216
|
+
if (name === "roles") return this.boxes.length * 0.35 + P.draw + (this.links.length ? 0.3 + P.draw : 0);
|
|
217
|
+
return 0;
|
|
218
|
+
}
|
|
219
|
+
render(k, t, ctx){
|
|
220
|
+
var self = this, P = this.props, tate = P.tate;
|
|
221
|
+
var at = function(name){ var s = self.phaseStep(name); if (!s) return -1; return k > s ? Infinity : k < s ? -1 : t; };
|
|
222
|
+
var pr = function(tt, a, d){ return tt < 0 ? 0 : D.prog(tt, a, d); };
|
|
223
|
+
var tm = at("marks"), trf = at("refs"), tro = at("roles");
|
|
224
|
+
// 先の段階を薄く見せる表示(授業の表示):後の段階の傍線・指示語の囲みと矢印・段落の枠と札とつなぐ線を、
|
|
225
|
+
// 引き終えた形のまま --preview-opacity の濃さで出す
|
|
226
|
+
var preview = !!ctx.preview, PV = preview ? base.previewOpacity(this) : 0.45;
|
|
227
|
+
var later = function(name){ return preview && self.phaseStep(name) > k; };
|
|
228
|
+
var fM = later("marks"), fR = later("refs"), fO = later("roles");
|
|
229
|
+
if (fM) tm = Infinity;
|
|
230
|
+
if (fR) trf = Infinity;
|
|
231
|
+
if (fO) tro = Infinity;
|
|
232
|
+
var f1 = function(x){ return x.toFixed(1); };
|
|
233
|
+
// ---- 傍線:縦書きは字の右、横書きは字の下。二重傍線は 2 本。行をまたぐときは行ごとに順に引く
|
|
234
|
+
this.lines.forEach(function(o, j){
|
|
235
|
+
var e = pr(tm, j * P.draw * 0.8, P.draw), rs = self.rects(o.el), total = 0;
|
|
236
|
+
rs.forEach(function(r){ total += tate ? r.b - r.t : r.r - r.l; });
|
|
237
|
+
while (o.g.childNodes.length > (o.lab ? 1 : 0)) o.g.removeChild(o.g.lastChild);
|
|
238
|
+
if (fM) o.g.setAttribute("opacity", PV); else o.g.removeAttribute("opacity");
|
|
239
|
+
var left = e * total;
|
|
240
|
+
rs.forEach(function(r){
|
|
241
|
+
var len = tate ? r.b - r.t : r.r - r.l, d = Math.max(0, Math.min(len, left)); left -= len;
|
|
242
|
+
if (d <= 0) return;
|
|
243
|
+
for (var q = 0; q < o.r.line; q++){
|
|
244
|
+
var off = 3 + q * 5;
|
|
245
|
+
var attrs = tate ? {x1: f1(r.r + off), x2: f1(r.r + off), y1: f1(r.t), y2: f1(r.t + d)} : {x1: f1(r.l), x2: f1(r.l + d), y1: f1(r.b + off), y2: f1(r.b + off)};
|
|
246
|
+
attrs.stroke = "var(--emph)"; attrs["stroke-width"] = 2.2;
|
|
247
|
+
D.el("line", attrs, o.g);
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
if (o.lab && rs.length){
|
|
251
|
+
var r0 = rs[0];
|
|
252
|
+
// 記号(A など)は線の始まりの外:縦書きは線の右の列の間で始まりより上、横書きは線の下の行の間
|
|
253
|
+
// 縦書きは線のすぐ右(列の間の、自分の列に寄ったところ)に、線の始まりから下へ
|
|
254
|
+
if (tate){ o.lab.setAttribute("x", f1(r0.r + 3 + o.r.line * 5 + 7)); o.lab.setAttribute("y", f1(r0.t + 22)); }
|
|
255
|
+
else { o.lab.setAttribute("x", f1(r0.l + 10)); o.lab.setAttribute("y", f1(r0.b + 3 + o.r.line * 5 + 20)); }
|
|
256
|
+
o.lab.setAttribute("opacity", pr(tm, j * P.draw * 0.8, 0.3).toFixed(3));
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
// ---- 指示語:指示語を四角で囲み、指す先に淡い色を敷き、指示語から指す先へ矢印
|
|
260
|
+
this.refs.forEach(function(o, j){
|
|
261
|
+
var a0 = j * (P.draw + 0.3), eb = pr(trf, a0, 0.3), ea = pr(trf, a0 + 0.25, P.draw);
|
|
262
|
+
var A = self.box(o.from), B = self.box(o.to);
|
|
263
|
+
while (o.box.firstChild) o.box.removeChild(o.box.firstChild);
|
|
264
|
+
while (o.fill.firstChild) o.fill.removeChild(o.fill.firstChild);
|
|
265
|
+
if (!A || !B){ o.box.setAttribute("opacity", 0); return; }
|
|
266
|
+
if (fR) eb = ea = PV;
|
|
267
|
+
D.el("rect", {x: f1(A.l - 3), y: f1(A.t - 2), width: f1(A.r - A.l + 6), height: f1(A.b - A.t + 4), rx: 5, fill: "none", stroke: "var(--emph)", "stroke-width": 2.5}, o.box);
|
|
268
|
+
self.rects(o.to).forEach(function(r){ D.el("rect", {x: f1(r.l - 2), y: f1(r.t), width: f1(r.r - r.l + 4), height: f1(r.b - r.t), rx: 4, fill: "var(--emph-tint)"}, o.fill); });
|
|
269
|
+
o.box.setAttribute("opacity", eb.toFixed(3)); o.fill.setAttribute("opacity", ea.toFixed(3));
|
|
270
|
+
// 矢印:指す先の行(字の箱)のうち指示語に近いものへ。同じ列(行)なら列の右(行の上)に弧、違えば列の頭(行の上)の側を通す
|
|
271
|
+
var ac = {x: (A.l + A.r) / 2, y: (A.t + A.b) / 2}, Bn = null, bd = Infinity;
|
|
272
|
+
self.rects(o.to).forEach(function(r){ var d = Math.hypot((r.l + r.r) / 2 - ac.x, (r.t + r.b) / 2 - ac.y); if (d < bd){ bd = d; Bn = r; } });
|
|
273
|
+
var x0, y0, x1, y1, cx, cy, same = tate ? Math.abs((Bn.l + Bn.r) / 2 - ac.x) < 6 : Math.abs((Bn.t + Bn.b) / 2 - ac.y) < 6;
|
|
274
|
+
if (tate && same){ var up = Bn.b <= A.t; x0 = A.r + 4; y0 = up ? A.t + 4 : A.b - 4; x1 = Bn.r + 4; y1 = up ? Bn.b - 4 : Bn.t + 4; cx = Math.max(x0, x1) + 44; cy = (y0 + y1) / 2; }
|
|
275
|
+
else if (tate){ x0 = ac.x; y0 = A.t - 4; x1 = (Bn.l + Bn.r) / 2; y1 = Bn.t - 4; cx = (x0 + x1) / 2; cy = Math.min(y0, y1) - 60; }
|
|
276
|
+
else if (same){ x0 = ac.x; y0 = A.t - 2; x1 = (Bn.l + Bn.r) / 2; y1 = Bn.t - 2; cx = (x0 + x1) / 2; cy = Math.min(y0, y1) - 46; }
|
|
277
|
+
else { var above = Bn.b <= A.t; x0 = ac.x; y0 = above ? A.t - 2 : A.b + 2; x1 = (Bn.l + Bn.r) / 2; y1 = above ? Bn.b + 2 : Bn.t - 2; cx = (x0 + x1) / 2 + 40; cy = (y0 + y1) / 2; }
|
|
278
|
+
// 指示語と指す先が同じ段落なら、弧の膨らみをその段落の枠の内側にとどめる(2 次曲線の頂は端と制御点の中ほど)
|
|
279
|
+
var para = o.from.parentNode === o.to.parentNode ? self.box(o.from.parentNode) : null, pad = 6;
|
|
280
|
+
if (para){
|
|
281
|
+
var mid = function(a, b){ return (a + b) / 2; };
|
|
282
|
+
if (cy < mid(y0, y1)) cy = Math.max(cy, 2 * (para.t + pad) - mid(y0, y1));
|
|
283
|
+
if (cx > mid(x0, x1)) cx = Math.min(cx, 2 * (para.r - pad) - mid(x0, x1));
|
|
284
|
+
}
|
|
285
|
+
o.path.setAttribute("d", "M" + f1(x0) + "," + f1(y0) + "Q" + f1(cx) + "," + f1(cy) + " " + f1(x1) + "," + f1(y1));
|
|
286
|
+
o.path.setAttribute("stroke-dashoffset", (fR ? 0 : 1 - ea).toFixed(4));
|
|
287
|
+
o.path.setAttribute("opacity", fR ? PV : ea > 0 ? 1 : 0);
|
|
288
|
+
o.head.setAttribute("transform", "translate(" + f1(x1) + " " + f1(y1) + ") rotate(" + (Math.atan2(y1 - cy, x1 - cx) * 180 / Math.PI).toFixed(1) + ")");
|
|
289
|
+
o.head.setAttribute("opacity", fR ? PV : ea >= 0.98 ? 1 : 0);
|
|
290
|
+
});
|
|
291
|
+
// ---- 段落の枠:順に囲み、札を出し、最後につなぐ線
|
|
292
|
+
var nb = this.boxes.length, tLink = nb * 0.35 + P.draw;
|
|
293
|
+
var boxOf = {}, chipOf = {};
|
|
294
|
+
this.boxes.forEach(function(o, j){
|
|
295
|
+
var e = pr(tro, j * 0.35, P.draw), el = o.P2.el;
|
|
296
|
+
var x = el.offsetLeft, y = el.offsetTop, w = el.offsetWidth, h = el.offsetHeight;
|
|
297
|
+
// offset は .text の中の座標。.text は部品の左上にある
|
|
298
|
+
boxOf[o.P2.p.id || j] = {x: x, y: y, w: w, h: h};
|
|
299
|
+
o.rect.setAttribute("x", x); o.rect.setAttribute("y", y); o.rect.setAttribute("width", w); o.rect.setAttribute("height", h);
|
|
300
|
+
o.rect.setAttribute("stroke-dashoffset", (1 - e).toFixed(4));
|
|
301
|
+
o.rect.setAttribute("opacity", fO ? PV : e > 0 ? 1 : 0);
|
|
302
|
+
// 札:縦書きは枠の上の辺の右寄り、横書きは左上の角
|
|
303
|
+
var tw = Array.from(o.P2.p.role).length * 24 + 24;
|
|
304
|
+
var cx = tate ? x + w - tw / 2 - 12 : x + tw / 2 + 12, cy = tate ? y - 17 : y - 17;
|
|
305
|
+
o.cr.setAttribute("x", f1(cx - tw / 2)); o.cr.setAttribute("y", f1(cy - 17)); o.cr.setAttribute("width", tw);
|
|
306
|
+
o.ct.setAttribute("x", f1(cx)); o.ct.setAttribute("y", f1(cy + 8.5));
|
|
307
|
+
o.chip.setAttribute("opacity", (fO ? PV : pr(tro, j * 0.35 + P.draw * 0.5, 0.3)).toFixed(3));
|
|
308
|
+
chipOf[o.P2.p.id || j] = {l: cx - tw / 2, r: cx + tw / 2, t: cy - 17, b: cy + 17, at: []};
|
|
309
|
+
});
|
|
310
|
+
// 札に付く線の端:縦書きは札の上の辺に左から、横書きは札の左の辺に上から並べる。
|
|
311
|
+
// 相手が左(上)にある線を先に、段の低い順に。相手が右(下)にある線は後に、段の高い順に(縦の線が横の線を横切らないように)
|
|
312
|
+
var ends = [];
|
|
313
|
+
this.links.forEach(function(o){
|
|
314
|
+
var A = chipOf[o.a.p.id], B = chipOf[o.b.p.id];
|
|
315
|
+
if (!A || !B) return;
|
|
316
|
+
var ca = tate ? (A.l + A.r) / 2 : (A.t + A.b) / 2, cb = tate ? (B.l + B.r) / 2 : (B.t + B.b) / 2;
|
|
317
|
+
o.ea = {link: o, chip: A, dir: cb < ca ? -1 : 1}; o.eb = {link: o, chip: B, dir: ca < cb ? -1 : 1};
|
|
318
|
+
A.at.push(o.ea); B.at.push(o.eb); ends.push(A, B);
|
|
319
|
+
});
|
|
320
|
+
ends.forEach(function(C){
|
|
321
|
+
if (C.done) return; C.done = true;
|
|
322
|
+
C.at.sort(function(p, q){ return p.dir !== q.dir ? p.dir - q.dir : p.dir < 0 ? p.link.lv - q.link.lv : q.link.lv - p.link.lv; });
|
|
323
|
+
var n = C.at.length;
|
|
324
|
+
C.at.forEach(function(e, i){
|
|
325
|
+
if (tate){ e.x = C.l + (C.r - C.l) * (i + 1) / (n + 1); e.y = C.t - 1; }
|
|
326
|
+
else { e.x = C.l - 1; e.y = C.t + (C.b - C.t) * (i + 1) / (n + 1); }
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
this.links.forEach(function(o){
|
|
330
|
+
if (!o.ea){ o.path.setAttribute("opacity", 0); o.h1.setAttribute("opacity", 0); if (o.h0) o.h0.setAttribute("opacity", 0); return; }
|
|
331
|
+
var e = pr(tro, tLink, P.draw), d, ang1, ang0, x0 = o.ea.x, y0 = o.ea.y, x1 = o.eb.x, y1 = o.eb.y, rr = 8;
|
|
332
|
+
if (tate){
|
|
333
|
+
// 札の上の辺から上へ出て、段の高さを横に通り、相手の札の上の辺へ下りる(角は丸める)
|
|
334
|
+
var top = Math.min(o.ea.chip.t, o.eb.chip.t), yl = top - STUB - (o.lv - 1) * STEP, sx = x1 < x0 ? -1 : 1;
|
|
335
|
+
d = "M" + f1(x0) + "," + f1(y0) + "V" + f1(yl + rr) + "Q" + f1(x0) + "," + f1(yl) + " " + f1(x0 + sx * rr) + "," + f1(yl) +
|
|
336
|
+
"H" + f1(x1 - sx * rr) + "Q" + f1(x1) + "," + f1(yl) + " " + f1(x1) + "," + f1(yl + rr) + "V" + f1(y1);
|
|
337
|
+
ang1 = 90; ang0 = 90;
|
|
338
|
+
} else {
|
|
339
|
+
// 札の左の辺から左へ出て、段の位置を縦に通り、相手の札の左の辺へ
|
|
340
|
+
var lft = Math.min(o.ea.chip.l, o.eb.chip.l), xl = lft - STUB - (o.lv - 1) * STEP, sy = y1 < y0 ? -1 : 1;
|
|
341
|
+
d = "M" + f1(x0) + "," + f1(y0) + "H" + f1(xl + rr) + "Q" + f1(xl) + "," + f1(y0) + " " + f1(xl) + "," + f1(y0 + sy * rr) +
|
|
342
|
+
"V" + f1(y1 - sy * rr) + "Q" + f1(xl) + "," + f1(y1) + " " + f1(xl + rr) + "," + f1(y1) + "H" + f1(x1);
|
|
343
|
+
ang1 = 0; ang0 = 0;
|
|
344
|
+
}
|
|
345
|
+
o.path.setAttribute("d", d);
|
|
346
|
+
o.path.setAttribute("stroke-dasharray", "1"); o.path.setAttribute("stroke-dashoffset", (1 - e).toFixed(4));
|
|
347
|
+
o.path.setAttribute("opacity", fO ? PV : e > 0 ? 1 : 0);
|
|
348
|
+
o.h1.setAttribute("transform", "translate(" + f1(x1) + " " + f1(y1) + ") rotate(" + ang1 + ")");
|
|
349
|
+
o.h1.setAttribute("opacity", fO ? PV : e >= 0.98 ? 1 : 0);
|
|
350
|
+
if (o.h0){ o.h0.setAttribute("transform", "translate(" + f1(x0) + " " + f1(y0) + ") rotate(" + ang0 + ")"); o.h0.setAttribute("opacity", fO ? PV : e >= 0.98 ? 1 : 0); }
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: Sample; stack statistics
|
|
3
|
+
steps: Population → sample → dot → repeat (4)
|
|
4
|
+
props:
|
|
5
|
+
dur: Seconds
|
|
6
|
+
stagger: Delay
|
|
7
|
+
fast: Repeat seconds
|
|
8
|
+
size: Text px
|
|
9
|
+
example: {"values":[1,2,3,4,5,6],"n":2,"replace":true,"repeat":40,"seed":3}
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Child JSON:
|
|
13
|
+
- `balls`: colour counts, total 2–30; proportion of `of`.
|
|
14
|
+
- `values`: 2–30 numbers; mean. One form.
|
|
15
|
+
- `n`: 1–population size; 1–30 with replacement. Clamp/report.
|
|
16
|
+
- `replace`: false; `repeat`: 1–200 (40); `seed`: integer (1).
|
|
17
|
+
- `stat`: proportion/mean; `digits`: 0–10 (2).
|
|
18
|
+
|
|
19
|
+
<!-- llm: omit -->
|
|
20
|
+
Copies with replacement; gaps without. Restore after recording. Seeded simulation, no answer preview. Final marker: population value. Caption: n and repetitions. Image label includes mean of sample statistics; author's label retained.
|
|
21
|
+
|
|
22
|
+
1184×440px suggested. One sample row; large n needs width. Text ≥24px; line spacing ≥1.45em. Dots shrink to radius 5px, then report size. Integer ticks for small integer ranges, otherwise 1–2–5 steps; proportions use quarters. Composition: red 3, blue 2; omit for cards. Incompatible stat: report, use form default. Missing of: first colour; absent: report, zero. Invalid population: report, no draw. Fictional simulations.
|
|
23
|
+
<!-- llm: end -->
|