egatari 0.6.4 → 0.6.5-rc.2
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/NOTICE +36 -0
- package/README.ja.md +18 -4
- package/README.md +18 -4
- package/SECURITY.md +18 -0
- package/bin/egatari.mjs +86 -3
- package/components.lock.json +246 -123
- package/components2.lock.json +824 -1
- package/kit/article-steps.mjs +27 -0
- package/kit/browser.mjs +14 -2
- package/kit/build.mjs +50 -1
- package/kit/check-messages.mjs +15 -7
- package/kit/check.mjs +46 -9
- package/kit/cli-hint.mjs +27 -0
- package/kit/core/article-cite.mjs +188 -0
- package/kit/core/article-links.mjs +174 -0
- package/kit/core/article-messages.mjs +119 -0
- package/kit/core/article-page.mjs +183 -0
- package/kit/core/article-render.mjs +410 -0
- package/kit/core/article-text.mjs +559 -0
- package/kit/core/article.mjs +267 -0
- package/kit/core/build-core.mjs +49 -9
- package/kit/core/citeproc-credit.mjs +3 -0
- package/kit/core/colab-core.mjs +1 -1
- package/kit/core/components-lock.mjs +18 -0
- package/kit/core/llm-fix.mjs +2 -1
- package/kit/core/llm-pack-assemble.mjs +5 -3
- package/kit/core/llm-pack-data.mjs +63 -80
- package/kit/core/new-deck.mjs +1 -1
- package/kit/core/part-labels.mjs +17 -5
- package/kit/core/parts2.mjs +11 -1
- package/kit/core/player.mjs +1 -1
- package/kit/core/portable.mjs +132 -16
- package/kit/core/quote-ja.mjs +5 -0
- package/kit/core/themes-lock.mjs +16 -0
- package/kit/core/tier-a.mjs +47 -3
- package/kit/deck.js +195 -45
- package/kit/instruction-version.json +3 -0
- package/kit/layouts.css +11 -10
- package/kit/panes.js +1288 -0
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/tools.js +81 -20
- package/kit/track.js +308 -0
- package/package.json +20 -3
- package/render/only.mjs +21 -0
- package/render/render.mjs +11 -8
- package/tools/ids.mjs +77 -9
- package/tools/portable.mjs +2 -0
- package/tools/sheet.mjs +5 -3
- package/vendor/components/CATALOG.md +4 -4
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/CHANGELOG.md +37 -0
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/README.md +58 -0
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/demo.html +121 -0
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/index.js +894 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/CHANGELOG.md +44 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/README.md +32 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/demo.html +57 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/ABCJS-ADAPTER.md +101 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/LICENSE-abcjs.txt +21 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/chords.json +89 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/doremi.json +261 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/extras.json +192 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/kaeru.json +521 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/rhythm.json +248 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/ties.json +360 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/index.js +474 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/CHANGELOG.md +28 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/README.md +21 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/demo.html +32 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/index.js +139 -0
- package/vendor/components/sha256/03550bb20d425aa926258bab18b03bbc0cee292072e01bb6c78c429b3ae92c34/README.md +42 -0
- package/vendor/components/sha256/03550bb20d425aa926258bab18b03bbc0cee292072e01bb6c78c429b3ae92c34/index.js +250 -0
- package/vendor/components/sha256/07013c263cc595382dbcfd4931ca8b016f9dfb673440adf28911c95bd465cf9d/README.md +22 -0
- package/vendor/components/sha256/07013c263cc595382dbcfd4931ca8b016f9dfb673440adf28911c95bd465cf9d/index.js +41 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/CHANGELOG.md +25 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/README.md +35 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/demo.html +40 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/index.js +731 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/CHANGELOG.md +19 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/README.md +21 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/demo.html +33 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/index.js +106 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/CHANGELOG.md +21 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/README.md +34 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/demo.html +77 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/index.js +200 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/CHANGELOG.md +31 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/README.md +43 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/demo.html +47 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/index.js +484 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/CHANGELOG.md +23 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/README.md +44 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/demo.html +43 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/index.js +266 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/CHANGELOG.md +34 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/README.md +44 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/demo.html +56 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/index.js +429 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/CHANGELOG.md +25 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/README.md +42 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/demo.html +115 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/index.js +384 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/CHANGELOG.md +19 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/README.md +38 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/demo.html +72 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/index.js +248 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/CHANGELOG.md +19 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/README.md +36 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/demo.html +70 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/index.js +167 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/CHANGELOG.md +34 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/README.md +32 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/demo.html +51 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/index.js +302 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/CHANGELOG.md +41 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/README.md +35 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/demo.html +66 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/index.js +352 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/CHANGELOG.md +35 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/README.md +35 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/demo.html +40 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/index.js +747 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/CHANGELOG.md +35 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/README.md +43 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/demo.html +89 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/index.js +323 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/CHANGELOG.md +24 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/README.md +40 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/demo.html +70 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/index.js +561 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/CHANGELOG.md +27 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/README.md +50 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/demo.html +44 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/index.js +464 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/CHANGELOG.md +23 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/README.md +44 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/demo.html +56 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/index.js +402 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/CHANGELOG.md +27 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/README.md +49 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/demo.html +44 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/index.js +354 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/CHANGELOG.md +20 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/README.md +50 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/demo.html +61 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/index.js +141 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/CHANGELOG.md +42 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/README.md +32 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/demo.html +54 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/index.js +315 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/CHANGELOG.md +30 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/README.md +38 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/demo.html +72 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/index.js +267 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/CHANGELOG.md +16 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/README.md +27 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/demo.html +42 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/index.js +121 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/CHANGELOG.md +33 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/README.md +41 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/demo.html +70 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/index.js +592 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/CHANGELOG.md +23 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/README.md +43 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/demo.html +47 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/index.js +483 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/CHANGELOG.md +19 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/README.md +34 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/demo.html +60 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/index.js +209 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/CHANGELOG.md +30 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/README.md +79 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/demo.html +50 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/index.js +351 -0
- package/vendor/components/sha256/577008a069e7eb08057705a0800d975e82c8dfe0d0ba5fbf4f8974af7b298a7f/README.md +53 -0
- package/vendor/components/sha256/577008a069e7eb08057705a0800d975e82c8dfe0d0ba5fbf4f8974af7b298a7f/index.js +310 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/CHANGELOG.md +20 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/README.md +75 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/demo.html +50 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/index.js +342 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/CHANGELOG.md +24 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/README.md +26 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/demo.html +48 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/index.js +97 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/CHANGELOG.md +22 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/README.md +64 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/demo.html +97 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/index.js +875 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/CHANGELOG.md +21 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/README.md +50 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/demo.html +63 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/index.js +219 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/CHANGELOG.md +28 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/README.md +35 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/demo.html +73 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/index.js +228 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/CHANGELOG.md +34 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/README.md +65 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/demo.html +97 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/index.js +920 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/CHANGELOG.md +31 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/README.md +39 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/demo.html +66 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/index.js +304 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/CHANGELOG.md +31 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/README.md +40 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/demo.html +92 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/index.js +424 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/CHANGELOG.md +26 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/README.md +57 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/demo.html +121 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/index.js +875 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/CHANGELOG.md +20 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/README.md +46 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/demo.html +112 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/index.js +443 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/CHANGELOG.md +22 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/README.md +35 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/demo.html +69 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/index.js +217 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/CHANGELOG.md +46 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/LICENSE-strokesvg.txt +115 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/OFL.txt +93 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/README.md +30 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/demo.html +40 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/index.js +749 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/strokes-CHANGES.md +20 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/CHANGELOG.md +40 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/README.md +36 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/demo.html +52 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/index.js +268 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/CHANGELOG.md +31 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/README.md +46 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/demo.html +112 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/index.js +481 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/CHANGELOG.md +36 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/README.md +73 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/demo.html +76 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/index.js +805 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/CHANGELOG.md +24 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/README.md +35 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/demo.html +53 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/index.js +481 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/CHANGELOG.md +41 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/LICENSE-strokesvg.txt +115 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/OFL.txt +93 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/README.md +33 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/demo.html +40 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/index.js +749 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/strokes-CHANGES.md +20 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/CHANGELOG.md +35 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/README.md +35 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/demo.html +53 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/index.js +521 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/CHANGELOG.md +32 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/README.md +39 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/demo.html +70 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/index.js +166 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/CHANGELOG.md +56 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/README.md +35 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/demo.html +57 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/ABCJS-ADAPTER.md +101 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/LICENSE-abcjs.txt +21 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/chords.json +89 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/doremi.json +261 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/extras.json +192 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/kaeru.json +521 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/rhythm.json +248 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/ties.json +360 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/index.js +508 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/CHANGELOG.md +31 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/README.md +34 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/demo.html +77 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/index.js +222 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/CHANGELOG.md +30 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/README.md +50 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/demo.html +61 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/index.js +171 -0
- package/vendor/components/sha256/bd590a6619f80d659299e4e558f770e75244360450939d504a4eaf7989b0eb97/README.md +21 -0
- package/vendor/components/sha256/bd590a6619f80d659299e4e558f770e75244360450939d504a4eaf7989b0eb97/index.js +93 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/CHANGELOG.md +18 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/README.md +21 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/demo.html +32 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/index.js +53 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/CHANGELOG.md +20 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/README.md +40 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/demo.html +92 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/index.js +399 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/CHANGELOG.md +28 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/README.md +36 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/demo.html +70 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/index.js +179 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/CHANGELOG.md +25 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/README.md +32 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/demo.html +54 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/index.js +251 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/CHANGELOG.md +34 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/README.md +35 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/demo.html +69 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/index.js +244 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/CHANGELOG.md +19 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/README.md +44 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/demo.html +44 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/index.js +334 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/CHANGELOG.md +37 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/README.md +43 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/demo.html +75 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/index.js +348 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/CHANGELOG.md +20 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/README.md +39 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/demo.html +70 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/index.js +134 -0
- package/vendor/components/sha256/d4159ba1206d094364b7735750e5e2532aeabbc299e0d6858e3a0edb84495e11/README.md +22 -0
- package/vendor/components/sha256/d4159ba1206d094364b7735750e5e2532aeabbc299e0d6858e3a0edb84495e11/index.js +59 -0
- package/vendor/components/sha256/d92842c606795528d1246ddb050ac275e1b72659629185750a6e9ac7fdb763a3/README.md +20 -0
- package/vendor/components/sha256/d92842c606795528d1246ddb050ac275e1b72659629185750a6e9ac7fdb763a3/index.js +162 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/CHANGELOG.md +33 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/README.md +46 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/demo.html +43 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/index.js +278 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/CHANGELOG.md +15 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/README.md +25 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/demo.html +48 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/index.js +88 -0
- package/vendor/components/sha256/de9607f86221006e7bad43f1f661c751d9a6f8f9c62da5c7e0d7f1249b9afcd6/README.md +25 -0
- package/vendor/components/sha256/de9607f86221006e7bad43f1f661c751d9a6f8f9c62da5c7e0d7f1249b9afcd6/index.js +122 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/CHANGELOG.md +20 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/README.md +23 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/demo.html +236 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/index.js +572 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/CHANGELOG.md +29 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/README.md +23 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/demo.html +33 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/index.js +121 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/CHANGELOG.md +29 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/README.md +32 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/demo.html +56 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/index.js +232 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/CHANGELOG.md +25 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/README.md +71 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/demo.html +76 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/index.js +777 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/CHANGELOG.md +33 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/README.md +28 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/demo.html +236 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/index.js +600 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/CHANGELOG.md +16 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/README.md +38 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/demo.html +115 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/index.js +361 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/CHANGELOG.md +27 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/README.md +27 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/demo.html +42 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/index.js +233 -0
- package/vendor/components/sha256/f268cf809438c8af63a42f9c9121110fc7263e4d705c40c6206ce46cf7ec167b/README.md +23 -0
- package/vendor/components/sha256/f268cf809438c8af63a42f9c9121110fc7263e4d705c40c6206ce46cf7ec167b/index.js +180 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/CHANGELOG.md +31 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/README.md +36 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/demo.html +50 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/index.js +263 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/CHANGELOG.md +20 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/README.md +39 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/demo.html +66 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/index.js +258 -0
- package/vendor/components/sha256/fadd24868e2730ec14b8f3f1e9cb75b8577a48b8d71beaa12ef089f7a3ba0a7d/README.md +22 -0
- package/vendor/components/sha256/fadd24868e2730ec14b8f3f1e9cb75b8577a48b8d71beaa12ef089f7a3ba0a7d/index.js +37 -0
- package/vendor/components/sha256/faf6a2f0b5df589639de624e75c5b20594f517e4426f6415d152809249b00b92/README.md +19 -0
- package/vendor/components/sha256/faf6a2f0b5df589639de624e75c5b20594f517e4426f6415d152809249b00b92/index.js +200 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/CHANGELOG.md +25 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/README.md +32 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/demo.html +51 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/index.js +270 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/CHANGELOG.md +19 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/README.md +34 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/demo.html +60 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/index.js +209 -0
- package/vendor/components-2/manifest-2.2.0.json +1868 -0
- package/vendor/csl/SOURCE.json +17 -0
- package/vendor/csl/locales/locales-en-US.xml +864 -0
- package/vendor/csl/locales/locales-ja-JP.xml +676 -0
- package/vendor/csl/styles/apa.csl +2278 -0
- package/vendor/csl/styles/ieee.csl +519 -0
- package/vendor/csl/styles/sist02.csl +273 -0
- package/vendor/egatari-spec/SOURCE.json +3 -3
- package/vendor/egatari-spec/schema/deck-meta.schema.json +6 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="ja">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>m-syntax の見本</title>
|
|
7
|
+
<!-- 組み方:node kit/build.mjs components/syntax/demo.html -o components/syntax/out/demo.html -->
|
|
8
|
+
<!-- 英文と和訳は見本のために書いたもの -->
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="stage">
|
|
12
|
+
|
|
13
|
+
<section class="slide noconcl">
|
|
14
|
+
<h2>SVO と修飾する句</h2>
|
|
15
|
+
<div class="body">
|
|
16
|
+
<m-syntax style="height:420px">
|
|
17
|
+
[S The boy {形^ in the red cap}] [V plays] [O tennis] [M {副^plays after school}].
|
|
18
|
+
= 赤い帽子の男の子は、放課後にテニスをする。
|
|
19
|
+
</m-syntax>
|
|
20
|
+
</div>
|
|
21
|
+
</section>
|
|
22
|
+
|
|
23
|
+
<section class="slide noconcl">
|
|
24
|
+
<h2>SVOC:O と C はイコールの関係</h2>
|
|
25
|
+
<div class="body">
|
|
26
|
+
<m-syntax pos="on" style="height:500px">
|
|
27
|
+
[S We[代]] [V call[動]] [O him[代]] [C Ken[名]].
|
|
28
|
+
= 私たちは彼をケンと呼ぶ。
|
|
29
|
+
[S The[冠] news[名]] [V made[動]] [O her[代]] [C happy[形]].
|
|
30
|
+
= その知らせは彼女を幸せにした。
|
|
31
|
+
</m-syntax>
|
|
32
|
+
</div>
|
|
33
|
+
</section>
|
|
34
|
+
|
|
35
|
+
<section class="slide noconcl">
|
|
36
|
+
<h2>関係代名詞の節は前の名詞を説明する</h2>
|
|
37
|
+
<div class="body">
|
|
38
|
+
<m-syntax variant="draw" style="height:420px">
|
|
39
|
+
[S The girl {形^ [S who] [V lives] [M next door]}] [V is] [C my friend].
|
|
40
|
+
= 隣に住んでいる女の子は、私の友達だ。
|
|
41
|
+
</m-syntax>
|
|
42
|
+
</div>
|
|
43
|
+
</section>
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
// m-syntax:英文の構造(中学・高校の英語)。S V O C M の札、句と節の括弧、修飾の矢印、品詞、それから和訳
|
|
2
|
+
// <m-syntax style="height:420px">
|
|
3
|
+
// [S The girl {形^girl [S who] [V lives] [M next door]}] [V is] [C my friend].
|
|
4
|
+
// = 隣に住んでいる女の子は私の友達だ。
|
|
5
|
+
// </m-syntax>
|
|
6
|
+
// 1 行が 1 文。「= 」で始まる行は直前の文の和訳。
|
|
7
|
+
// [S …] [V …] [O …] [C …] [M …] 文の要素(O1 O2 も)。語の下に下線と記号。{ } の中の要素は小文字(s v o c m)
|
|
8
|
+
// {形 …} {副 …} {名 …} 句・節の括弧(形容詞は ( )、副詞は < >、名詞は [ ])。句か節かは中に V があるかで決まる(形句・形節と書けば固定)
|
|
9
|
+
// {形^girl …} 語^語(tall^boy) 修飾の矢印:括弧(語)から、^ の後の語(同じ文のいちばん近いもの)へ。^ だけなら隣の語({形^ …} は前、tall^ は次)
|
|
10
|
+
// 語[品詞](boy[名]) 品詞。pos="on" のときだけ出す
|
|
11
|
+
// 段階:(pos)→ 要素を 1 つずつ(S V O C M のうち出てくるもの)→ 括弧(と中の小文字の要素)→ 矢印 → 和訳。build="whole" で 1 段階
|
|
12
|
+
// 字は HTML(英文は var(--font-sans)、和訳も)。線・括弧・札は SVG で、描くたびに語の位置を測る(呼び出しの順によらない)
|
|
13
|
+
// 2.0(Egatari spec §6.1 の部品):base の MotionElement・el・prog・variant・previewOpacity を使い、プレイヤーのグローバルは使わない。
|
|
14
|
+
// 書き方の誤りは ctx.report("data", "[syntax] …")、属性の誤りは ctx.report("attr", …)・ctx.report("range", …)、矢印が行をまたぐときと
|
|
15
|
+
// 要素の高さが足りないときは ctx.report("size", …) で知らせる(1.x の console.warn("m-syntax: …") の代わり)。
|
|
16
|
+
// 読み取りと段階(parse・plan・durationOf と表)は試験のために static testing に出す(ほかのパーツは読まない)
|
|
17
|
+
egatariParts.define({name: "syntax", version: "2.0.2", requires: {base: "1.1.0"}, element: "m-syntax"}, function(deps){
|
|
18
|
+
"use strict";
|
|
19
|
+
var base = deps.base;
|
|
20
|
+
var D = base;
|
|
21
|
+
|
|
22
|
+
// ---------------------------------------------------------------- 決まり
|
|
23
|
+
var ROLES = ["S", "V", "O", "C", "M"];
|
|
24
|
+
var ROLE_COLOR = {S: "var(--series-1)", V: "var(--series-2)", O: "var(--series-3)", C: "var(--series-4)", M: "var(--muted)"};
|
|
25
|
+
// 括弧の種類:名詞 [ ]・形容詞 ( )・副詞 < >(形と記号の両方で種類が分かる。色だけに頼らない)
|
|
26
|
+
var KIND = {"名": {name: "名詞", shape: "square"}, "形": {name: "形容詞", shape: "round"}, "副": {name: "副詞", shape: "angle"}};
|
|
27
|
+
// 品詞:略号 → [名前, 色の組]
|
|
28
|
+
var POS = {"名": ["名詞", "n"], "代": ["代名詞", "n"], "動": ["動詞", "v"], "助": ["助動詞", "v"], "形": ["形容詞", "a"], "副": ["副詞", "d"],
|
|
29
|
+
"冠": ["冠詞", "x"], "前": ["前置詞", "x"], "接": ["接続詞", "x"], "関": ["関係詞", "x"], "間": ["間投詞", "x"]};
|
|
30
|
+
var POS_COLOR = {n: "var(--series-1)", v: "var(--series-2)", a: "var(--series-3)", d: "var(--series-4)", x: "var(--fg)"};
|
|
31
|
+
var PUNCT = /^[.,!?;:]+$/;
|
|
32
|
+
|
|
33
|
+
// ---------------------------------------------------------------- 読み取り
|
|
34
|
+
// parse(文字列) → {sentences: [{tokens, roles, groups, mods, yaku, text}], warnings}
|
|
35
|
+
// tokens[i] = {t, punct, pos: {tag, name, cls} | null}
|
|
36
|
+
// roles[j] = {code: "S"…"M", sub: "" | "1" | "2", a, b, lower({ } の中), depth(囲む要素の数), owner(いちばん内側の括弧の番号 | -1)}
|
|
37
|
+
// groups[j] = {kind: "名" | "形" | "副" | null, unit: "句" | "節", label, a, b, depth(囲む括弧の数), head: 語 | null}
|
|
38
|
+
// mods[j] = {from: {group: j} | {token: i}, a, b, to(頭の語の番号)} a..b は修飾する側の語の範囲
|
|
39
|
+
function norm(w){ return String(w).toLowerCase().replace(/[^\p{L}\p{N}'’-]/gu, ""); }
|
|
40
|
+
function parse(src){
|
|
41
|
+
var sentences = [], warnings = [];
|
|
42
|
+
String(src || "").split(/\r?\n/).map(function(l){ return l.trim(); }).filter(Boolean).forEach(function(l, li){
|
|
43
|
+
if (/^[==]/.test(l)){
|
|
44
|
+
var y = l.replace(/^[==]\s*/, "");
|
|
45
|
+
if (!sentences.length) warnings.push("和訳の前に英文がない:" + l);
|
|
46
|
+
else if (sentences[sentences.length - 1].yaku) warnings.push("和訳が 2 行ある(" + (li + 1) + " 行目。1 行にまとめる):" + l);
|
|
47
|
+
else sentences[sentences.length - 1].yaku = y;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
sentences.push(sentence(l, li + 1, warnings));
|
|
51
|
+
});
|
|
52
|
+
return {sentences: sentences, warnings: warnings};
|
|
53
|
+
}
|
|
54
|
+
function sentence(src, ln, warnings){
|
|
55
|
+
var l = src.replace(/[/g, "[").replace(/]/g, "]").replace(/{/g, "{").replace(/}/g, "}").replace(/^/g, "^");
|
|
56
|
+
var at = "(" + ln + " 行目)";
|
|
57
|
+
var tokens = [], roles = [], groups = [], wmods = [], stack = [], cur = "", curPos = null, nOpen = 0;
|
|
58
|
+
var lastWord = function(){ for (var i = tokens.length - 1; i >= 0; i--) if (!tokens[i].punct) return i; return -1; };
|
|
59
|
+
var push = function(t, pos){
|
|
60
|
+
var m = /^(.*?)([.,!?;:]*)$/.exec(t), w = m[1], p = m[2];
|
|
61
|
+
if (w){
|
|
62
|
+
var head = null, k = w.indexOf("^");
|
|
63
|
+
if (k === 0){ warnings.push("「^」の前に語がない:" + w + at); w = w.slice(1); }
|
|
64
|
+
else if (k > 0){ head = w.slice(k + 1); w = w.slice(0, k); } // head が "" なら次の語
|
|
65
|
+
if (w){
|
|
66
|
+
tokens.push({t: w, punct: false, pos: pos});
|
|
67
|
+
if (head !== null) wmods.push({i: tokens.length - 1, head: head});
|
|
68
|
+
}
|
|
69
|
+
} else if (pos) warnings.push("品詞の前に語がない:[" + pos.tag + "]" + at);
|
|
70
|
+
if (p) tokens.push({t: p, punct: true, pos: null});
|
|
71
|
+
};
|
|
72
|
+
var flush = function(){
|
|
73
|
+
if (!cur) return;
|
|
74
|
+
var pos = null;
|
|
75
|
+
if (curPos !== null){
|
|
76
|
+
var P = POS[curPos];
|
|
77
|
+
if (!P) warnings.push("知らない品詞「" + curPos + "」(" + Object.keys(POS).join(" ") + " のどれか)" + at);
|
|
78
|
+
pos = {tag: curPos, name: P ? P[0] : curPos, cls: P ? P[1] : "x"};
|
|
79
|
+
}
|
|
80
|
+
push(cur, pos); cur = ""; curPos = null;
|
|
81
|
+
};
|
|
82
|
+
var close = function(item){
|
|
83
|
+
var b = lastWord();
|
|
84
|
+
if (b < item.a){ warnings.push("中に語のない" + (item.type === "role" ? "要素 [" + item.code : "括弧 {" + (item.kind || "")) + "]" + at); return; }
|
|
85
|
+
item.b = b;
|
|
86
|
+
if (item.type === "role") roles.push(item); else groups.push(item);
|
|
87
|
+
};
|
|
88
|
+
var closeUntil = function(type, ch){
|
|
89
|
+
for (var j = stack.length - 1; j >= 0; j--) if (stack[j].type === type){
|
|
90
|
+
if (j !== stack.length - 1) warnings.push("閉じる順が違う:「" + ch + "」の前に閉じていないものがある" + at);
|
|
91
|
+
while (stack.length > j){ var it = stack.pop(); if (it.type !== "bad") close(it); }
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
// 開いていない(読めなかった開きは bad として積んである)
|
|
95
|
+
for (var q = stack.length - 1; q >= 0; q--) if (stack[q].type === "bad" && stack[q].ch === (ch === "]" ? "[" : "{")){ stack.splice(q, 1); return; }
|
|
96
|
+
warnings.push("「" + ch + "」に対応する開きがない" + at);
|
|
97
|
+
};
|
|
98
|
+
var nGroups = function(){ return stack.filter(function(x){ return x.type === "group"; }); };
|
|
99
|
+
for (var i = 0; i < l.length; i++){
|
|
100
|
+
var ch = l[i], rest = l.slice(i), m;
|
|
101
|
+
if (/\s/.test(ch)){ flush(); continue; }
|
|
102
|
+
if (ch === "[" && cur){
|
|
103
|
+
// 語に付いた [ ]:品詞
|
|
104
|
+
var e = l.indexOf("]", i), body = e > 0 ? l.slice(i + 1, e) : "";
|
|
105
|
+
if (e > 0 && body && !/\s/.test(body)){ curPos = body; i = e; continue; }
|
|
106
|
+
}
|
|
107
|
+
if (ch === "["){
|
|
108
|
+
flush();
|
|
109
|
+
m = /^\[([SVOCMsvocm])([12]?)(?=\s)/.exec(rest);
|
|
110
|
+
if (!m){ warnings.push("「[」の後に要素の記号(S V O C M)と空白がない:" + rest.slice(0, 12) + at); stack.push({type: "bad", ch: "["}); continue; }
|
|
111
|
+
var gs = nGroups();
|
|
112
|
+
stack.push({type: "role", code: m[1].toUpperCase(), sub: m[2], a: tokens.length, lower: gs.length > 0,
|
|
113
|
+
owner: gs.length ? gs[gs.length - 1].id : -1, depth: stack.filter(function(x){ return x.type === "role"; }).length});
|
|
114
|
+
i += m[0].length - 1; continue;
|
|
115
|
+
}
|
|
116
|
+
if (ch === "{"){
|
|
117
|
+
flush();
|
|
118
|
+
m = /^\{([名形副])(句|節)?(?:\^([^\s[\]{}^]*))?(?=\s)/.exec(rest);
|
|
119
|
+
var id = nOpen++;
|
|
120
|
+
if (!m){
|
|
121
|
+
var bad = /^\{(\S*)/.exec(rest)[1];
|
|
122
|
+
warnings.push("知らない括弧の種類「" + bad + "」(形・副・名。句・節と ^語 を続けてよい:{形節^girl …})" + at);
|
|
123
|
+
stack.push({type: "group", id: id, kind: null, unit: "", label: bad.replace(/\^.*$/, ""), head: null, a: tokens.length, depth: nGroups().length});
|
|
124
|
+
i += bad.length; continue;
|
|
125
|
+
}
|
|
126
|
+
stack.push({type: "group", id: id, kind: m[1], unit: m[2] || "", head: m[3] === undefined ? null : m[3], a: tokens.length, depth: nGroups().length});
|
|
127
|
+
i += m[0].length - 1; continue;
|
|
128
|
+
}
|
|
129
|
+
if (ch === "]"){ flush(); closeUntil("role", "]"); continue; }
|
|
130
|
+
if (ch === "}"){ flush(); closeUntil("group", "}"); continue; }
|
|
131
|
+
cur += ch;
|
|
132
|
+
}
|
|
133
|
+
flush();
|
|
134
|
+
while (stack.length){
|
|
135
|
+
var it = stack.pop();
|
|
136
|
+
if (it.type === "bad") continue;
|
|
137
|
+
warnings.push("閉じていない" + (it.type === "role" ? "「[" + it.code + "」" : "「{" + (it.kind || it.label) + "」") + at);
|
|
138
|
+
close(it);
|
|
139
|
+
}
|
|
140
|
+
// 括弧の番号を開いた順に(id は開いた順に振ってある)
|
|
141
|
+
groups.sort(function(x, y){ return x.id - y.id; });
|
|
142
|
+
var gid = {};
|
|
143
|
+
groups.forEach(function(g, j){ gid[g.id] = j; });
|
|
144
|
+
roles.forEach(function(r){ r.owner = r.owner >= 0 && gid[r.owner] !== undefined ? gid[r.owner] : -1; });
|
|
145
|
+
roles.sort(function(x, y){ return x.a - y.a || x.depth - y.depth; });
|
|
146
|
+
groups.forEach(function(g){
|
|
147
|
+
if (g.kind && !g.unit) g.unit = roles.some(function(r){ return r.code === "V" && r.a >= g.a && r.b <= g.b; }) ? "節" : "句";
|
|
148
|
+
if (g.kind) g.label = KIND[g.kind].name + g.unit;
|
|
149
|
+
delete g.id;
|
|
150
|
+
});
|
|
151
|
+
// 修飾の矢印:頭の語は、修飾する側の外で、いちばん近い同じ語(同じ距離なら左)
|
|
152
|
+
var mods = [];
|
|
153
|
+
var find = function(head, a, b){
|
|
154
|
+
var h = norm(head), best = -1, bd = Infinity;
|
|
155
|
+
tokens.forEach(function(t, i){
|
|
156
|
+
if (t.punct || (i >= a && i <= b) || norm(t.t) !== h) return;
|
|
157
|
+
var d = i < a ? a - i : i - b;
|
|
158
|
+
if (d < bd){ bd = d; best = i; }
|
|
159
|
+
});
|
|
160
|
+
return best;
|
|
161
|
+
};
|
|
162
|
+
// ^ だけなら隣の語:括弧は前の語、語は次の語
|
|
163
|
+
var near = function(i, dir){ for (i += dir; i >= 0 && i < tokens.length; i += dir) if (!tokens[i].punct) return i; return -1; };
|
|
164
|
+
groups.forEach(function(g, j){
|
|
165
|
+
if (g.head === null) return;
|
|
166
|
+
var to = g.head ? find(g.head, g.a, g.b) : near(g.a, -1);
|
|
167
|
+
if (to < 0) warnings.push((g.head ? "矢印の先「" + g.head + "」が括弧の外にない" : "括弧の前に語がない") + "({" + (g.kind || g.label) + "^" + g.head + " …})" + at);
|
|
168
|
+
else mods.push({from: {group: j}, a: g.a, b: g.b, to: to});
|
|
169
|
+
});
|
|
170
|
+
wmods.forEach(function(w){
|
|
171
|
+
var to = w.head ? find(w.head, w.i, w.i) : near(w.i, 1);
|
|
172
|
+
if (to < 0) warnings.push((w.head ? "矢印の先「" + w.head + "」がない" : "「^」の後に語がない") + "(" + tokens[w.i].t + "^" + w.head + ")" + at);
|
|
173
|
+
else mods.push({from: {token: w.i}, a: w.i, b: w.i, to: to});
|
|
174
|
+
});
|
|
175
|
+
mods.sort(function(x, y){ return Math.min(x.a, x.to) - Math.min(y.a, y.to) || x.a - y.a; });
|
|
176
|
+
// 矢印の段:つなぐ範囲の短いものから、重なる矢印より 1 つ上の段へ
|
|
177
|
+
var placed = [];
|
|
178
|
+
mods.map(function(o){ return {o: o, lo: Math.min(o.a, o.to), hi: Math.max(o.b, o.to)}; })
|
|
179
|
+
.sort(function(x, y){ return (x.hi - x.lo) - (y.hi - y.lo) || x.lo - y.lo; })
|
|
180
|
+
.forEach(function(s){
|
|
181
|
+
var lv = 1;
|
|
182
|
+
placed.forEach(function(q){ if (q.lo < s.hi && s.lo < q.hi) lv = Math.max(lv, q.o.lane + 1); }); // 端で接するだけなら同じ段(同じ語に来る矢印は語の幅に並べる)
|
|
183
|
+
s.o.lane = lv; placed.push(s);
|
|
184
|
+
});
|
|
185
|
+
var text = tokens.map(function(t, i){ return (i && !t.punct ? " " : "") + t.t; }).join("");
|
|
186
|
+
return {tokens: tokens, roles: roles, groups: groups, mods: mods, yaku: "", text: text};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// ---------------------------------------------------------------- 段階
|
|
190
|
+
// plan(model, {pos, yaku, whole}) → {phases: [{name, code, n, dur, step, off}], steps}
|
|
191
|
+
// name:pos(品詞)・role(code の要素)・brackets(括弧と中の小文字の要素)・arrows(矢印)・yaku(和訳)
|
|
192
|
+
var GAP = 0.2; // build="whole" の段の間
|
|
193
|
+
function phaseDur(name, n){
|
|
194
|
+
if (name === "pos") return 0.8;
|
|
195
|
+
if (name === "role") return 0.5 + 0.2 * (n - 1);
|
|
196
|
+
if (name === "brackets") return 0.7 + 0.3 * (n - 1);
|
|
197
|
+
if (name === "arrows") return 0.6 + 0.4 * (n - 1);
|
|
198
|
+
return 0.6;
|
|
199
|
+
}
|
|
200
|
+
function plan(model, o){
|
|
201
|
+
o = o || {};
|
|
202
|
+
var S = model.sentences, ph = [];
|
|
203
|
+
var all = function(f){ var n = 0; S.forEach(function(s){ n += f(s); }); return n; };
|
|
204
|
+
var nPos = all(function(s){ return s.tokens.filter(function(t){ return t.pos; }).length; });
|
|
205
|
+
if (o.pos && nPos) ph.push({name: "pos", n: nPos});
|
|
206
|
+
ROLES.forEach(function(c){
|
|
207
|
+
var n = all(function(s){ return s.roles.filter(function(r){ return !r.lower && r.code === c; }).length; });
|
|
208
|
+
if (n) ph.push({name: "role", code: c, n: n});
|
|
209
|
+
});
|
|
210
|
+
var nG = all(function(s){ return s.groups.length; });
|
|
211
|
+
if (nG) ph.push({name: "brackets", n: nG});
|
|
212
|
+
var nM = all(function(s){ return s.mods.length; });
|
|
213
|
+
if (nM) ph.push({name: "arrows", n: nM});
|
|
214
|
+
var nY = all(function(s){ return s.yaku ? 1 : 0; });
|
|
215
|
+
if (o.yaku !== false && nY) ph.push({name: "yaku", n: nY});
|
|
216
|
+
var off = 0;
|
|
217
|
+
ph.forEach(function(p, j){
|
|
218
|
+
p.dur = phaseDur(p.name, p.n);
|
|
219
|
+
if (o.whole){ p.step = 1; p.off = off; off += p.dur + GAP; }
|
|
220
|
+
else { p.step = j + 1; p.off = 0; }
|
|
221
|
+
});
|
|
222
|
+
return {phases: ph, steps: o.whole ? (ph.length ? 1 : 0) : ph.length};
|
|
223
|
+
}
|
|
224
|
+
function durationOf(pl, k){
|
|
225
|
+
var d = 0;
|
|
226
|
+
pl.phases.forEach(function(p){ if (p.step === k) d = Math.max(d, p.off + p.dur); });
|
|
227
|
+
return d;
|
|
228
|
+
}
|
|
229
|
+
// 段の中の時刻:済んだ段は Infinity、まだの段は -Infinity
|
|
230
|
+
function localTime(p, k, t){ return p.step < k ? Infinity : p.step > k ? -Infinity : t - p.off; }
|
|
231
|
+
function prog(lt, a, d){ if (lt === Infinity) return 1; if (!(lt > a)) return 0; return D.prog ? D.prog(lt, a, d) : Math.min(1, (lt - a) / d); }
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
// ---------------------------------------------------------------- 部品
|
|
235
|
+
var CSS = [
|
|
236
|
+
"m-syntax{display:block;position:relative;color:var(--fg);font-family:var(--font-sans)}",
|
|
237
|
+
"m-syntax .sx-s{display:flex;flex-wrap:wrap;align-items:flex-start}",
|
|
238
|
+
"m-syntax .sx-w{display:inline-block;white-space:nowrap}",
|
|
239
|
+
"m-syntax .sx-t{display:inline-block}",
|
|
240
|
+
"m-syntax .sx-y{font-size:28px;line-height:1.4;margin:0 0 14px}",
|
|
241
|
+
].join("\n");
|
|
242
|
+
var TAGROW = 30; // 括弧の名前の段の高さ(24px の字)
|
|
243
|
+
var LANE = 14; // 矢印の段の間
|
|
244
|
+
var ROWH = 40; // 要素の下線と記号の段の高さ
|
|
245
|
+
var POSH = 30; // 品詞の段の高さ
|
|
246
|
+
var ON = function(v){ return /^(on|true|yes)$/i.test(String(v || "").trim()); };
|
|
247
|
+
var f1 = function(x){ return x.toFixed(1); };
|
|
248
|
+
var CSS_ID = "syntax-2-0-2-css"; // the style element this part writes, named with its name and version (spec §6.1 Identifiers)
|
|
249
|
+
return class extends base.MotionElement {
|
|
250
|
+
static partName = "syntax"; // the registry name (define meta name), for report prefixes
|
|
251
|
+
static testing = {parse: parse, plan: plan, durationOf: durationOf, POS: POS, KIND: KIND}; // for tools/test-syntax.mjs only (no part reads it)
|
|
252
|
+
static variants = ["fade", "draw"];
|
|
253
|
+
// データの形(kit/shape.js):JSON ではなく、要素の中に 1 行 1 文の英文(「= 」の行は和訳)
|
|
254
|
+
static shape = {text: true, example: "[S We] [V call] [O him] [C Ken].\n= 私たちは彼をケンと呼ぶ。"};
|
|
255
|
+
static props = {
|
|
256
|
+
size: {type: "number", default: 36, doc: "英文の字の大きさ(px)"},
|
|
257
|
+
pos: {type: "string", default: "off", doc: "on で品詞(語[名])を語の下に"},
|
|
258
|
+
build: {type: "string", default: "steps", doc: "whole で全部を 1 段階に"},
|
|
259
|
+
yaku: {type: "bool", default: true, doc: "和訳(= の行)を最後に出す"},
|
|
260
|
+
};
|
|
261
|
+
get model(){ if (!this._m) this._m = parse(this._src !== undefined ? this._src : this.textContent); return this._m; }
|
|
262
|
+
get plan(){
|
|
263
|
+
if (!this._pl){ var P = this.props; this._pl = plan(this.model, {pos: ON(P.pos), yaku: P.yaku, whole: String(P.build).trim() === "whole"}); }
|
|
264
|
+
return this._pl;
|
|
265
|
+
}
|
|
266
|
+
get steps(){ return this.getAttribute("steps") !== null ? +this.getAttribute("steps") : this.plan.steps; }
|
|
267
|
+
duration(k){ return durationOf(this.plan, k); }
|
|
268
|
+
mount(ctx){
|
|
269
|
+
var self = this, P = this.props, size = P.size, m = this.model, pos = ON(P.pos);
|
|
270
|
+
this._src = this.textContent;
|
|
271
|
+
m.warnings.forEach(function(w){ ctx.report("data", "[syntax] " + w); });
|
|
272
|
+
if (!/^(steps|whole)$/.test(String(P.build).trim())) ctx.report("attr", '[syntax] build="' + P.build + '" is not steps or whole (steps is used)');
|
|
273
|
+
if (!(typeof size === "number" && isFinite(size))){ ctx.report("attr", '[syntax] size="' + self.getAttribute("size") + '" is not a number (36 is used)'); size = 36; }
|
|
274
|
+
if (size < 27){ ctx.report("range", "[syntax] size " + size + " is below 27 px (27 is used)"); size = 27; }
|
|
275
|
+
this.size = size;
|
|
276
|
+
this.variant = base.variant(this);
|
|
277
|
+
this.textContent = "";
|
|
278
|
+
this.classList.add("plot");
|
|
279
|
+
if (!document.getElementById(CSS_ID)){ var st = document.createElement("style"); st.id = CSS_ID; st.textContent = CSS; document.head.appendChild(st); }
|
|
280
|
+
var W = this.clientWidth || 1184, H = this.clientHeight || 400;
|
|
281
|
+
var mk = function(tag, cls, parent, text){ var e = document.createElement(tag); if (cls) e.className = cls; if (text !== undefined) e.textContent = text; parent.appendChild(e); return e; };
|
|
282
|
+
var box = mk("div", "sx-text", this);
|
|
283
|
+
box.setAttribute("aria-hidden", "true");
|
|
284
|
+
this.box = box;
|
|
285
|
+
var svg = 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);
|
|
286
|
+
var gB = D.el("g", {}, svg), gL = D.el("g", {}, svg), gA = D.el("g", {}, svg);
|
|
287
|
+
var BR = Math.round(size * 0.36);
|
|
288
|
+
this.BR = BR;
|
|
289
|
+
this.S = m.sentences.map(function(s){
|
|
290
|
+
var G = 0, R = 0, L = 0;
|
|
291
|
+
s.groups.forEach(function(g){ G = Math.max(G, g.depth + 1); });
|
|
292
|
+
s.roles.forEach(function(r){ R = Math.max(R, r.depth + 1); });
|
|
293
|
+
s.mods.forEach(function(o){ L = Math.max(L, o.lane); });
|
|
294
|
+
var above = G * TAGROW + (L ? 14 + (L - 1) * LANE + 4 : 0) + 6, below = (pos ? POSH : 0) + R * ROWH + 6;
|
|
295
|
+
var el = mk("div", "sx-s", box);
|
|
296
|
+
el.style.cssText = "font-size:" + size + "px;line-height:1.25;column-gap:" + Math.round(size * 0.3) + "px;row-gap:" + (above + below) + "px;padding:" + above + "px 0 " + below + "px 0";
|
|
297
|
+
var opens = s.tokens.map(function(){ return 0; }), closes = opens.slice();
|
|
298
|
+
s.groups.forEach(function(g){ opens[g.a]++; closes[g.b]++; });
|
|
299
|
+
var T = [], outer = null;
|
|
300
|
+
s.tokens.forEach(function(t, i){
|
|
301
|
+
if (t.punct && outer){ T.push({el: mk("span", "sx-p", outer, t.t), t: t}); return; }
|
|
302
|
+
if (outer) el.appendChild(document.createTextNode(" ")); // 字として読むときの語の間(flex の中の空白は場所を取らない)
|
|
303
|
+
outer = mk("span", "sx-w", el);
|
|
304
|
+
var tx = mk("span", "sx-t", outer, t.t);
|
|
305
|
+
if (opens[i] || closes[i]) tx.style.margin = "0 " + closes[i] * BR + "px 0 " + opens[i] * BR + "px";
|
|
306
|
+
T.push({el: tx, t: t});
|
|
307
|
+
});
|
|
308
|
+
var S2 = {s: s, el: el, T: T, G: G, R: R, L: L};
|
|
309
|
+
S2.roles = s.roles.map(function(r){
|
|
310
|
+
var c = ROLE_COLOR[r.code];
|
|
311
|
+
var line = D.el("path", {fill: "none", stroke: c, "stroke-width": 3, "stroke-linecap": "round", pathLength: 1}, gL);
|
|
312
|
+
var lab = D.el("text", {"font-size": 28, "font-weight": 700, fill: c, "text-anchor": "middle"}, gL);
|
|
313
|
+
lab.appendChild(document.createTextNode(r.lower ? r.code.toLowerCase() : r.code));
|
|
314
|
+
if (r.sub){ var ts = D.el("tspan", {"font-size": 24, dy: 6}, lab); ts.textContent = r.sub; }
|
|
315
|
+
return {r: r, line: line, lab: lab};
|
|
316
|
+
});
|
|
317
|
+
S2.groups = s.groups.map(function(g){
|
|
318
|
+
return {g: g, path: D.el("path", {fill: "none", stroke: "var(--fg)", "stroke-width": 2.5, "stroke-linecap": "round", "stroke-linejoin": "round", pathLength: 1}, gB),
|
|
319
|
+
tag: (function(){ var e = D.el("text", {"font-size": 24, fill: "var(--fg)"}, gB); e.textContent = g.label; return e; })()};
|
|
320
|
+
});
|
|
321
|
+
S2.mods = s.mods.map(function(o){
|
|
322
|
+
return {o: o, path: D.el("path", {fill: "none", stroke: "var(--emph)", "stroke-width": 2.5, "stroke-linecap": "round", "stroke-linejoin": "round", pathLength: 1}, gA),
|
|
323
|
+
head: D.el("path", {d: "M0,0L-13,-6.5L-13,6.5Z", fill: "var(--emph)"}, gA)};
|
|
324
|
+
});
|
|
325
|
+
S2.pos = pos ? s.tokens.map(function(t, i){
|
|
326
|
+
if (!t.pos) return null;
|
|
327
|
+
var e = D.el("text", {"font-size": 24, fill: POS_COLOR[t.pos.cls], "text-anchor": "middle"}, gL);
|
|
328
|
+
e.textContent = t.pos.tag;
|
|
329
|
+
return {i: i, el: e};
|
|
330
|
+
}).filter(Boolean) : [];
|
|
331
|
+
S2.yaku = s.yaku && P.yaku ? mk("div", "sx-y", box, s.yaku) : null;
|
|
332
|
+
return S2;
|
|
333
|
+
});
|
|
334
|
+
// 順番(段の中で何番目に出るか):文の順、文の中は左から
|
|
335
|
+
var cnt = {};
|
|
336
|
+
var next = function(key){ cnt[key] = (cnt[key] || 0) + 1; return cnt[key] - 1; };
|
|
337
|
+
var gIndex = [];
|
|
338
|
+
this.S.forEach(function(S2){
|
|
339
|
+
S2.pos.forEach(function(p){ p.j = next("pos"); });
|
|
340
|
+
S2.roles.forEach(function(R2){ if (!R2.r.lower) R2.j = next("role" + R2.r.code); });
|
|
341
|
+
S2.groups.forEach(function(G2){ G2.j = next("brackets"); });
|
|
342
|
+
gIndex.push(S2.groups);
|
|
343
|
+
S2.roles.forEach(function(R2){ if (R2.r.lower) R2.j = R2.r.owner >= 0 ? S2.groups[R2.r.owner].j : 0; });
|
|
344
|
+
S2.mods.forEach(function(M2){ M2.j = next("arrows"); });
|
|
345
|
+
});
|
|
346
|
+
// 読める層(画面にも印刷にも出ない):英文と構造と和訳を字で
|
|
347
|
+
var lines = m.sentences.map(function(s){
|
|
348
|
+
var span = function(a, b){ return s.tokens.slice(a, b + 1).map(function(t, i){ return (i && !t.punct ? " " : "") + t.t; }).join(""); };
|
|
349
|
+
var out = [s.text];
|
|
350
|
+
if (s.roles.length) out.push("要素:" + s.roles.map(function(r){ return (r.lower ? r.code.toLowerCase() : r.code) + r.sub + "「" + span(r.a, r.b) + "」"; }).join("、"));
|
|
351
|
+
if (s.groups.length) out.push("括弧:" + s.groups.map(function(g){ return g.label + "「" + span(g.a, g.b) + "」"; }).join("、"));
|
|
352
|
+
if (s.mods.length) out.push("修飾:" + s.mods.map(function(o){ return "「" + span(o.a, o.b) + "」→「" + s.tokens[o.to].t + "」"; }).join("、"));
|
|
353
|
+
if (pos){ var ps = s.tokens.filter(function(t){ return t.pos; }); if (ps.length) out.push("品詞:" + ps.map(function(t){ return t.t + "(" + t.pos.name + ")"; }).join("、")); }
|
|
354
|
+
if (s.yaku) out.push("訳:" + s.yaku);
|
|
355
|
+
return out.join(" ");
|
|
356
|
+
});
|
|
357
|
+
var sr = document.createElement("p");
|
|
358
|
+
sr.className = "sr-only";
|
|
359
|
+
sr.setAttribute("style", "position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0");
|
|
360
|
+
sr.textContent = "文の構造:" + lines.join(";");
|
|
361
|
+
this.appendChild(sr);
|
|
362
|
+
if (!this.getAttribute("aria-label")) this.setAttribute("aria-label", m.sentences.map(function(s){ return s.text; }).join(" ") + "(文の構造)");
|
|
363
|
+
}
|
|
364
|
+
// 要素の字の箱を部品の座標で。部品の外側の拡大(舞台の scale)によらない
|
|
365
|
+
rect(e){
|
|
366
|
+
var R = this.getBoundingClientRect(), sc = R.width / (this.offsetWidth || 1) || 1, r = e.getBoundingClientRect();
|
|
367
|
+
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};
|
|
368
|
+
}
|
|
369
|
+
render(k, t, ctx){
|
|
370
|
+
var self = this, P = this.props, pl = this.plan, draw = this.variant === "draw", BR = this.BR;
|
|
371
|
+
var preview = !!ctx.preview, PV = preview ? base.previewOpacity(this) : 0.45;
|
|
372
|
+
// 段ごとの時刻と、薄く見せるか
|
|
373
|
+
var phase = {};
|
|
374
|
+
pl.phases.forEach(function(p){ phase[p.name === "role" ? "role" + p.code : p.name] = p; });
|
|
375
|
+
var st = function(key){
|
|
376
|
+
var p = phase[key];
|
|
377
|
+
if (!p) return {lt: -Infinity, faint: false};
|
|
378
|
+
var faint = preview && p.step > k;
|
|
379
|
+
return {lt: faint ? Infinity : localTime(p, k, t), faint: faint};
|
|
380
|
+
};
|
|
381
|
+
var show = function(e, s, a, d){ var v = s.faint ? PV : prog(s.lt, a, d); e.setAttribute("opacity", v.toFixed(3)); return v; };
|
|
382
|
+
var stroke = function(e, s, a, d, v){ e.setAttribute("stroke-dasharray", "1"); e.setAttribute("stroke-dashoffset", (draw && !s.faint ? 1 - prog(s.lt, a, d) : 0).toFixed(4)); if (draw && !s.faint) e.setAttribute("opacity", v > 0 ? 1 : 0); };
|
|
383
|
+
var warns = [];
|
|
384
|
+
this.S.forEach(function(S2){
|
|
385
|
+
var s = S2.s, R = S2.R, G = S2.G;
|
|
386
|
+
// 語の箱と行(上の位置が変わるところで次の行)
|
|
387
|
+
var box = S2.T.map(function(x){ return self.rect(x.el); }), line = [], ln = 0, top = null;
|
|
388
|
+
box.forEach(function(b, i){
|
|
389
|
+
if (S2.T[i].t.punct){ line.push(ln); return; }
|
|
390
|
+
if (top !== null && b.t > top + 4) ln++;
|
|
391
|
+
top = b.t; line.push(ln);
|
|
392
|
+
});
|
|
393
|
+
// 範囲 a..b の語を行ごとの区間に(句読点は除く)
|
|
394
|
+
var segs = function(a, b){
|
|
395
|
+
var out = [];
|
|
396
|
+
for (var i = a; i <= b; i++){
|
|
397
|
+
if (S2.T[i].t.punct) continue;
|
|
398
|
+
var x = box[i], last = out[out.length - 1];
|
|
399
|
+
if (last && last.line === line[i]) last.r = x.r;
|
|
400
|
+
else out.push({l: x.l, r: x.r, t: x.t, b: x.b, line: line[i]});
|
|
401
|
+
}
|
|
402
|
+
return out;
|
|
403
|
+
};
|
|
404
|
+
// ---- 品詞:語の下
|
|
405
|
+
var sPos = st("pos");
|
|
406
|
+
S2.pos.forEach(function(p){
|
|
407
|
+
var x = box[p.i];
|
|
408
|
+
p.el.setAttribute("x", f1((x.l + x.r) / 2)); p.el.setAttribute("y", f1(x.b + 24));
|
|
409
|
+
show(p.el, sPos, 0.3 * p.j / Math.max(1, phase.pos ? phase.pos.n - 1 : 1), 0.5);
|
|
410
|
+
});
|
|
411
|
+
// ---- 要素:下線と記号。囲む要素の数だけ下の段(文の要素は同じ段にそろう)
|
|
412
|
+
var posH = S2.pos.length ? POSH : 0;
|
|
413
|
+
S2.roles.forEach(function(R2){
|
|
414
|
+
var r = R2.r, sg = segs(r.a, r.b), row = R - 1 - r.depth, d = "", best = null;
|
|
415
|
+
sg.forEach(function(g){
|
|
416
|
+
var y = g.b + posH + 6 + row * ROWH;
|
|
417
|
+
var cx = (g.l + g.r) / 2, hw = Math.max(14, (g.r - g.l) / 2 - 2); // 1 字の語(I)でも記号の幅はある
|
|
418
|
+
d += "M" + f1(cx - hw) + "," + f1(y) + "H" + f1(cx + hw);
|
|
419
|
+
if (!best || g.r - g.l > best.r - best.l) best = {l: g.l, r: g.r, y: y};
|
|
420
|
+
});
|
|
421
|
+
R2.line.setAttribute("d", d || "M0,0");
|
|
422
|
+
R2.lab.setAttribute("x", f1(best ? (best.l + best.r) / 2 : 0)); R2.lab.setAttribute("y", f1(best ? best.y + 27 : 0));
|
|
423
|
+
var s1 = r.lower ? st("brackets") : st("role" + r.code), a = r.lower ? 0.3 * R2.j + 0.2 : 0.2 * R2.j;
|
|
424
|
+
var v = show(R2.line, s1, a, 0.5); stroke(R2.line, s1, a, 0.5, v);
|
|
425
|
+
show(R2.lab, s1, a + (draw ? 0.2 : 0), draw ? 0.3 : 0.5);
|
|
426
|
+
});
|
|
427
|
+
// ---- 括弧:最初の語の前と最後の語の後。同じ語で開く(閉じる)括弧は外のものほど外へ、少し高く
|
|
428
|
+
var sB = st("brackets"), tags = [];
|
|
429
|
+
var slot = function(i, key){ return s.groups.filter(function(g){ return g[key] === i; }).sort(function(x, y){ return y.depth - x.depth; }); };
|
|
430
|
+
S2.groups.forEach(function(G2){
|
|
431
|
+
var g = G2.g, A = box[g.a], B = box[g.b], shape = g.kind ? KIND[g.kind].shape : "round";
|
|
432
|
+
var jo = slot(g.a, "a").indexOf(g), jc = slot(g.b, "b").indexOf(g), w = BR * 0.5;
|
|
433
|
+
var glyph = function(x, t0, b0, dir){ // dir 1:開き(右へ開く)、-1:閉じ
|
|
434
|
+
var h = w * dir, mid = (t0 + b0) / 2;
|
|
435
|
+
if (shape === "square") return "M" + f1(x + h / 2) + "," + f1(t0) + "H" + f1(x - h / 2) + "V" + f1(b0) + "H" + f1(x + h / 2);
|
|
436
|
+
if (shape === "angle") return "M" + f1(x + h / 2) + "," + f1(t0) + "L" + f1(x - h / 2) + "," + f1(mid) + "L" + f1(x + h / 2) + "," + f1(b0);
|
|
437
|
+
return "M" + f1(x + h / 2) + "," + f1(t0) + "Q" + f1(x - h * 0.9) + "," + f1(mid) + " " + f1(x + h / 2) + "," + f1(b0);
|
|
438
|
+
};
|
|
439
|
+
var xo = A.l - BR * (jo + 0.5), xc = B.r + BR * (jc + 0.5);
|
|
440
|
+
G2.path.setAttribute("d", glyph(xo, A.t + 4 - jo * 3, A.b - 4 + jo * 3, 1) + glyph(xc, B.t + 4 - jc * 3, B.b - 4 + jc * 3, -1));
|
|
441
|
+
var a = 0.3 * G2.j, v = show(G2.path, sB, a, 0.5); stroke(G2.path, sB, a, 0.5, v);
|
|
442
|
+
// 名前:開きの括弧の上。外の括弧ほど上の段。同じ段・同じ行で前の名前に重なれば右へずらす
|
|
443
|
+
var row = G - 1 - g.depth, tw = Array.from(g.label).length * 24, x = xo - w / 2, y = A.t - 6 - row * TAGROW;
|
|
444
|
+
tags.forEach(function(q){ if (q.line === line[g.a] && q.row === row && x < q.r + 8 && x + tw > q.l - 8) x = q.r + 8; });
|
|
445
|
+
tags.push({line: line[g.a], row: row, l: x, r: x + tw});
|
|
446
|
+
G2.tag.setAttribute("x", f1(x)); G2.tag.setAttribute("y", f1(y));
|
|
447
|
+
show(G2.tag, sB, a, 0.5);
|
|
448
|
+
G2.tagBox = {l: x, r: x + tw, t: y - 21};
|
|
449
|
+
});
|
|
450
|
+
// ---- 矢印:修飾する側(括弧の名前、または語)の上から段の高さへ上がり、頭の語の上へ下りる
|
|
451
|
+
var sA = st("arrows"), ends = {};
|
|
452
|
+
S2.mods.forEach(function(M2){ (ends[M2.o.to] = ends[M2.o.to] || []).push(M2); });
|
|
453
|
+
Object.keys(ends).forEach(function(h){
|
|
454
|
+
var list = ends[h], x = box[+h], n = list.length;
|
|
455
|
+
list.sort(function(p, q){ return p.o.a - q.o.a; });
|
|
456
|
+
list.forEach(function(M2, j){ M2.x1 = n === 1 ? (x.l + x.r) / 2 : x.l + (x.r - x.l) * (j + 1) / (n + 1); });
|
|
457
|
+
});
|
|
458
|
+
S2.mods.forEach(function(M2){
|
|
459
|
+
var o = M2.o, H = box[o.to], x0, y0, x1 = M2.x1, y1 = H.t + 3, left = o.to < o.a;
|
|
460
|
+
if (o.from.group !== undefined){ var tb = S2.groups[o.from.group].tagBox; x0 = left ? tb.l + 12 : tb.r - 12; y0 = tb.t - 2; }
|
|
461
|
+
else { var F = box[o.from.token]; x0 = (F.l + F.r) / 2; y0 = F.t + 3; }
|
|
462
|
+
var F0 = box[o.a];
|
|
463
|
+
if (line[o.a] !== line[o.to]) warns.push("「" + s.tokens[o.a].t + "」から「" + s.tokens[o.to].t + "」への矢印が行をまたぐ(要素を広くするか size を小さく、文を短く)");
|
|
464
|
+
var yl = Math.min(F0.t, H.t) - 6 - G * TAGROW - 10 - (o.lane - 1) * LANE, rr = Math.min(8, Math.abs(x1 - x0) / 2), sx = x1 < x0 ? -1 : 1;
|
|
465
|
+
var d = "M" + f1(x0) + "," + f1(y0) + "V" + f1(yl + rr) + "Q" + f1(x0) + "," + f1(yl) + " " + f1(x0 + sx * rr) + "," + f1(yl) +
|
|
466
|
+
"H" + f1(x1 - sx * rr) + "Q" + f1(x1) + "," + f1(yl) + " " + f1(x1) + "," + f1(yl + rr) + "V" + f1(y1 - 2);
|
|
467
|
+
M2.path.setAttribute("d", d);
|
|
468
|
+
M2.head.setAttribute("transform", "translate(" + f1(x1) + " " + f1(y1) + ") rotate(90)");
|
|
469
|
+
var a = 0.4 * M2.j, v = show(M2.path, sA, a, 0.6); stroke(M2.path, sA, a, 0.6, v);
|
|
470
|
+
if (draw && !sA.faint) M2.head.setAttribute("opacity", prog(sA.lt, a, 0.6) >= 0.98 ? 1 : 0);
|
|
471
|
+
else show(M2.head, sA, a, 0.6);
|
|
472
|
+
});
|
|
473
|
+
// ---- 和訳
|
|
474
|
+
if (S2.yaku){ var sY = st("yaku"); S2.yaku.style.opacity = (sY.faint ? PV : prog(sY.lt, 0, 0.6)).toFixed(3); }
|
|
475
|
+
});
|
|
476
|
+
// 収まらないとき(1 度だけ知らせる。描く絵は変えない)
|
|
477
|
+
if (!this._warned){
|
|
478
|
+
var last = this.box.lastElementChild, bottom = last ? last.offsetTop + last.offsetHeight : 0;
|
|
479
|
+
if (bottom > this.clientHeight + 2) warns.push("要素の高さ " + this.clientHeight + "px に " + Math.ceil(bottom - this.clientHeight) + "px 足りない(要素を高くするか、文を分ける)");
|
|
480
|
+
if (warns.length && document.fonts && document.fonts.status === "loaded"){ this._warned = true; warns.filter(function(w, i){ return warns.indexOf(w) === i; }).forEach(function(w){ ctx.report("size", "[syntax] " + w); }); }
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# m-kobun changelog
|
|
2
|
+
|
|
3
|
+
The part's own versions (Egatari spec §6.1). Releases of the whole library are in the repository's CHANGELOG.md.
|
|
4
|
+
|
|
5
|
+
## 2.0.0 (components 2.0, alpha; not for lessons yet)
|
|
6
|
+
|
|
7
|
+
- Moved to `egatariParts.define({name: "kobun", version: "2.0.0", requires: {base: "1.0.0"}, element: "m-kobun"})`,
|
|
8
|
+
extending `base.MotionElement` with `base.prog` / `previewOpacity`; `static partName = "kobun"`.
|
|
9
|
+
The DOM is byte-identical to 1.13.0 on its demo at every step (tools/test-c2-identity.mjs).
|
|
10
|
+
- Writing errors (an unknown part of speech or auxiliary verb, …) are reported with `ctx.report("data", "[kobun] …")`
|
|
11
|
+
from `mount` (1.13.0: `console.warn("m-kobun: …")`).
|
|
12
|
+
- The auxiliary verb's card: closed when the step changes or on `ctx.reset` (as in 1.13.0); it does not open in video,
|
|
13
|
+
read from `ctx.mode` in `mount` (1.13.0: `DECK.mode` at the click). A click redraws with the last render's ctx, without
|
|
14
|
+
`reset` and `entered`.
|
|
15
|
+
- The reader and the tables for tests are `static testing = {parse, AUX, FORMS, auxOf, posOf}` on the class, read through
|
|
16
|
+
the registry (1.13.0: `DECK.kobun`); no part reads it.
|
|
17
|
+
- The preview view is `ctx.preview` alone (1.13.0 also accepted `ctx.mode === "lecture"`).
|
|
18
|
+
- Ids: its style element is `kobun-2-0-0-css` (1.13.0: `m-kobun-css`); it is in `<head>`, not in the component's DOM, so
|
|
19
|
+
no id rewrite is needed in the identity test.
|
|
20
|
+
|
|
21
|
+
## 1.13.0
|
|
22
|
+
|
|
23
|
+
As released in the library's 1.13.0.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: m-kobun
|
|
3
|
+
version: 2.0.0
|
|
4
|
+
series: kokugo
|
|
5
|
+
tier: specialized
|
|
6
|
+
set: kokugo
|
|
7
|
+
summary: 古文を語に切り(スラッシュ)、品詞で色を分けて 1 文ずつ見せ、最後に現代語訳と並べる。助動詞を押すと活用表と意味
|
|
8
|
+
steps: 文の数(現代語訳があれば +1)
|
|
9
|
+
purposes: text-structure
|
|
10
|
+
props: size, tate, yaku, fade, detail
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
古文の品詞分解を、板書のように 1 文ずつ見せるときに使う。段階 0 は切っていない本文。
|
|
14
|
+
|
|
15
|
+
## 書き方
|
|
16
|
+
|
|
17
|
+
1 行が 1 文(1 段階)。語は `/` で切り、語の後ろの `[ ]` に品詞(と、`・` で区切って詳しいこと)を書く。`[ ]` の後ろの字(`、` `。`)は語に付けて出す。
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
春[名]/は[係助]/あけぼの[名]。
|
|
21
|
+
= 春は明け方(がよい)。
|
|
22
|
+
紫だち[動・タ四・連用]/たる[助動・たり・存続・連体]/雲[名]/の[格助]/…
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- 品詞:`名` `代` `動` `補動` `形` `形動` `副` `連体` `接` `感` `助動` `格助` `係助` `副助` `接助` `終助` `間助` `接頭` `接尾`(色:動詞 `--term`、形容詞・形容動詞 `--accent2`、助動詞 `--emph`、助詞 `--muted`、ほか `--fg`)
|
|
26
|
+
- 助動詞:`[助動・基本形・この文での意味・活用形]`。基本形は部品の中の表(文語の助動詞 28 語。`なり`・`たり` は意味で断定と伝聞推定・完了を分ける)から引く。表にないものは知らせる
|
|
27
|
+
- `= …` の行:直前の文の現代語訳(最後の段階で、本文の下、縦書きでは左に出す)
|
|
28
|
+
- `{漢字|かな}`:振り仮名
|
|
29
|
+
|
|
30
|
+
<!-- llm: omit -->
|
|
31
|
+
## 押すと出る札
|
|
32
|
+
|
|
33
|
+
助動詞は押す(タップする、または Tab で選んで Enter)と、基本形・活用の型・接続・意味と、6 つの活用形の表(この文の活用形に色)を出す。表は部品の中にあり、何も読み込まない(ネットワークを使わない。中身は文字だけ)。
|
|
34
|
+
札は発表の操作で、画面の決まり (i, k, t) の外にある:段階を動かす・もう一度押す・札を押す・同じ段階に入り直す(ランタイムが `ctx.reset` を渡すとき)と消え、動画(`?mode=video`)では開かず、印刷には出ない。
|
|
35
|
+
- 授業の表示(`ctx.preview`):先の文の区切りと品詞の札、現代語訳を `--preview-opacity` の濃さで見せる。本文の字は初めから見えているので、品詞の色と、助動詞の地の薄い色(`--emph-tint`)は先に見せない。薄い語の札は開かない
|
|
36
|
+
<!-- llm: end -->
|
|
37
|
+
|
|
38
|
+
## 属性
|
|
39
|
+
|
|
40
|
+
- `tate`:縦書き(品詞は語の左)
|
|
41
|
+
- `detail`:品詞の下に `[ ]` の中をすべて出す(活用の種類・活用形まで。語の間が広がる)
|
|
42
|
+
- `yaku="false"`:現代語訳の段階を作らない
|
|
43
|
+
|
|
44
|
+
見本は `demo.html`(『枕草子』春はあけぼの、横書きと縦書き)。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="ja" data-theme="kokugo">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>m-kobun の見本</title>
|
|
7
|
+
<!-- 組み方:node kit/build.mjs components/kobun/demo.html -o components/kobun/out/demo.html -->
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="stage">
|
|
11
|
+
|
|
12
|
+
<section class="slide noconcl">
|
|
13
|
+
<h2>『枕草子』春はあけぼの</h2>
|
|
14
|
+
<div class="body">
|
|
15
|
+
<p class="ia-badge" style="margin:0 0 10px;line-height:1.3"><span style="display:inline-block;font-size:27px;font-weight:700;color:var(--fg);border:2px dashed var(--accent2);border-radius:8px;padding:0 12px">操作できる</span></p>
|
|
16
|
+
<m-kobun style="height:470px">
|
|
17
|
+
春[名]/は[係助]/あけぼの[名]。
|
|
18
|
+
= 春は明け方(がよい)。
|
|
19
|
+
やうやう[副]/白く[形・ク・連用]/なりゆく[動・カ四・連体]/山ぎは[名]、
|
|
20
|
+
= だんだん白くなっていく山ぎわ(の空)が、
|
|
21
|
+
少し[副]/明かり[動・ラ四・連用]/て[接助]、
|
|
22
|
+
= 少し明るくなって、
|
|
23
|
+
紫だち[動・タ四・連用]/たる[助動・たり・存続・連体]/雲[名]/の[格助]/細く[形・ク・連用]/たなびき[動・カ四・連用]/たる[助動・たり・存続・連体]。
|
|
24
|
+
= 紫がかった雲が細くたなびいている(のがよい)。
|
|
25
|
+
</m-kobun>
|
|
26
|
+
</div>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<section class="slide noconcl">
|
|
30
|
+
<h2>縦書きの品詞分解</h2>
|
|
31
|
+
<div class="body">
|
|
32
|
+
<m-kobun tate style="height:520px">
|
|
33
|
+
春[名]/は[係助]/あけぼの[名]。
|
|
34
|
+
= 春は明け方(がよい)。
|
|
35
|
+
少し[副]/明かり[動・ラ四・連用]/て[接助]、
|
|
36
|
+
= 少し明るくなって、
|
|
37
|
+
</m-kobun>
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
</div>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|