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,112 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="ja" data-theme="default">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>m-tree の見本</title>
|
|
7
|
+
<!-- 組み方:node kit/build.mjs components/tree/demo.html -o components/tree/out/demo.html(会社と確率の値は架空) -->
|
|
8
|
+
<style>
|
|
9
|
+
.vcap{font-size:27px;color:var(--muted);text-align:center;margin-bottom:6px}
|
|
10
|
+
</style>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div id="stage">
|
|
14
|
+
|
|
15
|
+
<section class="slide">
|
|
16
|
+
<h2>会社の組織(架空)</h2>
|
|
17
|
+
<div class="body">
|
|
18
|
+
<m-tree aria-label="架空の会社の組織図" style="height:440px">
|
|
19
|
+
<script type="application/json">{
|
|
20
|
+
"nodes": [
|
|
21
|
+
{"id": "ceo", "label": "社長", "tone": "emph"},
|
|
22
|
+
{"id": "s", "label": "営業本部", "parent": "ceo"},
|
|
23
|
+
{"id": "d", "label": "開発本部", "parent": "ceo"},
|
|
24
|
+
{"id": "a", "label": "管理本部", "parent": "ceo"},
|
|
25
|
+
{"id": "s1", "label": "国内営業部", "parent": "s"},
|
|
26
|
+
{"id": "s2", "label": "海外営業部", "parent": "s"},
|
|
27
|
+
{"id": "d1", "label": "製品開発部", "parent": "d"},
|
|
28
|
+
{"id": "d2", "label": "品質保証部", "parent": "d"},
|
|
29
|
+
{"id": "a1", "label": "人事部", "parent": "a"},
|
|
30
|
+
{"id": "a2", "label": "経理部", "parent": "a"},
|
|
31
|
+
{"id": "d11", "label": "設計課", "parent": "d1"},
|
|
32
|
+
{"id": "d12", "label": "試作課", "parent": "d1"},
|
|
33
|
+
{"id": "d13", "label": "試験課", "parent": "d1", "note": "2026 年に新設"}
|
|
34
|
+
]
|
|
35
|
+
}</script>
|
|
36
|
+
</m-tree>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="concl"><span>→ 上から 1 段ずつ:本部、部、課</span></div>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
<section class="slide">
|
|
42
|
+
<h2>動物の分け方(orient="right")</h2>
|
|
43
|
+
<div class="body">
|
|
44
|
+
<m-tree orient="right" aria-label="動物の分類" style="height:440px">
|
|
45
|
+
<script type="application/json">{
|
|
46
|
+
"nodes": [
|
|
47
|
+
{"id": "an", "label": "動物"},
|
|
48
|
+
{"id": "v", "label": "脊椎動物", "parent": "an", "note": "背骨がある"},
|
|
49
|
+
{"id": "i", "label": "無脊椎動物", "parent": "an", "note": "背骨がない", "tone": "muted"},
|
|
50
|
+
{"id": "f", "label": "魚類", "parent": "v"},
|
|
51
|
+
{"id": "am", "label": "両生類", "parent": "v"},
|
|
52
|
+
{"id": "r", "label": "は虫類", "parent": "v"},
|
|
53
|
+
{"id": "b", "label": "鳥類", "parent": "v"},
|
|
54
|
+
{"id": "m", "label": "哺乳類", "parent": "v", "tone": "emph"},
|
|
55
|
+
{"id": "ar", "label": "節足動物", "parent": "i", "tone": "muted"},
|
|
56
|
+
{"id": "mo", "label": "軟体動物", "parent": "i", "tone": "muted"}
|
|
57
|
+
],
|
|
58
|
+
"edges": [
|
|
59
|
+
{"from": "r", "to": "b", "label": "近い仲間", "step": 4}
|
|
60
|
+
]
|
|
61
|
+
}</script>
|
|
62
|
+
</m-tree>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="concl"><span>→ 背骨の有無で分け、脊椎動物をさらに 5 つに分ける</span></div>
|
|
65
|
+
</section>
|
|
66
|
+
|
|
67
|
+
<section class="slide">
|
|
68
|
+
<h2>見せ方の種類(variant)</h2>
|
|
69
|
+
<div class="body">
|
|
70
|
+
<div style="display:grid;grid-template-columns:1fr 1fr 1fr;gap:28px">
|
|
71
|
+
<div><div class="vcap">箱、それから線(fade、既定)</div>
|
|
72
|
+
<m-tree variant="fade" aria-label="植物の分類(fade)" style="height:330px">
|
|
73
|
+
<script type="application/json">{"nodes": [{"id": "p", "label": "植物"}, {"id": "s", "label": "種子植物", "parent": "p"}, {"id": "f", "label": "胞子植物", "parent": "p"}, {"id": "a", "label": "被子植物", "parent": "s"}, {"id": "g", "label": "裸子植物", "parent": "s"}]}</script>
|
|
74
|
+
</m-tree></div>
|
|
75
|
+
<div><div class="vcap">線を引いてから箱(draw)</div>
|
|
76
|
+
<m-tree variant="draw" aria-label="植物の分類(draw)" style="height:330px">
|
|
77
|
+
<script type="application/json">{"nodes": [{"id": "p", "label": "植物"}, {"id": "s", "label": "種子植物", "parent": "p"}, {"id": "f", "label": "胞子植物", "parent": "p"}, {"id": "a", "label": "被子植物", "parent": "s"}, {"id": "g", "label": "裸子植物", "parent": "s"}]}</script>
|
|
78
|
+
</m-tree></div>
|
|
79
|
+
<div><div class="vcap">親の側から大きくなる(grow)</div>
|
|
80
|
+
<m-tree variant="grow" aria-label="植物の分類(grow)" style="height:330px">
|
|
81
|
+
<script type="application/json">{"nodes": [{"id": "p", "label": "植物"}, {"id": "s", "label": "種子植物", "parent": "p"}, {"id": "f", "label": "胞子植物", "parent": "p"}, {"id": "a", "label": "被子植物", "parent": "s"}, {"id": "g", "label": "裸子植物", "parent": "s"}]}</script>
|
|
82
|
+
</m-tree></div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="concl"><span>→ 書かなければ最初の見せ方(fade)になる</span></div>
|
|
86
|
+
</section>
|
|
87
|
+
|
|
88
|
+
<section class="slide">
|
|
89
|
+
<h2>確率の木:雨の日に遅れる確率(架空の値)</h2>
|
|
90
|
+
<div class="body">
|
|
91
|
+
<m-tree orient="right" aria-label="天気と遅刻の確率の木(架空の値)" style="height:440px">
|
|
92
|
+
<script type="application/json">{
|
|
93
|
+
"nodes": [
|
|
94
|
+
{"id": "s", "label": "出発"},
|
|
95
|
+
{"id": "r", "label": "雨", "parent": "s", "branch": "0.3"},
|
|
96
|
+
{"id": "f", "label": "晴れ", "parent": "s", "branch": "0.7"},
|
|
97
|
+
{"id": "rl", "label": "遅れる", "parent": "r", "branch": "0.4"},
|
|
98
|
+
{"id": "ro", "label": "間に合う", "parent": "r", "branch": "0.6"},
|
|
99
|
+
{"id": "fl", "label": "遅れる", "parent": "f", "branch": "0.1"},
|
|
100
|
+
{"id": "fo", "label": "間に合う", "parent": "f", "branch": "0.9"}
|
|
101
|
+
],
|
|
102
|
+
"path": ["s", "r", "rl"],
|
|
103
|
+
"pathNote": "0.3 × 0.4 = 0.12"
|
|
104
|
+
}</script>
|
|
105
|
+
</m-tree>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="concl"><span>→ 道に沿って枝の確率をかける:雨で遅れる確率は 0.12</span></div>
|
|
108
|
+
</section>
|
|
109
|
+
|
|
110
|
+
</div>
|
|
111
|
+
</body>
|
|
112
|
+
</html>
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
// m-tree:階層・分類の木(組織図、生物の分類など)を、上の段から順に組み立てる
|
|
2
|
+
// <m-tree style="height:480px"><script type="application/json">
|
|
3
|
+
// {"nodes": [{"id": "co", "label": "本社"}, {"id": "a", "label": "営業部", "parent": "co"}, …],
|
|
4
|
+
// "edges": [{"from": "a", "to": "b", "label": "連携"}]}
|
|
5
|
+
// (JSON の終わり)</m-tree>
|
|
6
|
+
// 座標は書かない(docs/conventions.md §2)。parent のない節がちょうど 1 つ(根)。子は配列の順に並べる
|
|
7
|
+
// 配置:親を子の並びの中央に置き、隣り合う部分木は段ごとの輪郭(左右の端)がぶつからないところまで寄せる(Reingold–Tilford の考え方)
|
|
8
|
+
// orient:down(既定、上から下)か right(左から右)。link:elbow(既定、かぎ形)か straight(まっすぐ)
|
|
9
|
+
// 段階:by="level"(既定、根、それから深さごとに 1 段)か by="node"(深さ優先の順に 1 つずつ)。節の step が勝つ
|
|
10
|
+
// edges:親子のほかのつながり(破線、矢印つき)。段階は両端の遅いほう
|
|
11
|
+
// 字の大きさは要素の大きさから決め(27 px から)、入らなければ 24 px まで縮める。それでも入らなければ、字は 24 px のまま
|
|
12
|
+
// 葉だけの子を 2 段に互い違いに並べ、名前を 2 行に折る。それでも入らなければ要素の箱からはみ出して ctx.report("size", …)(足りない px)
|
|
13
|
+
// 見せ方(docs/conventions.md §2.5):fade(箱が下から 12 px 上がりながら現れてから線を引く、既定)・draw(線を先に引き、
|
|
14
|
+
// その先に箱が親の側から 12 px 寄りながら現れる)・grow(箱が親の側から 12 px 寄りながら 0.92 → 1 に大きくなる)。
|
|
15
|
+
// 箱の動きはどれも 12 px まで。段階の数・長さ・最後の中身はどれも同じ
|
|
16
|
+
// branch(子の節):親からの線に添える字(確率・条件・はい/いいえ)。path:根から葉への id の列を --emph で示す
|
|
17
|
+
// (既定は木の後に線 1 本ごとに 1 段階、pathStep があればその段階に)。pathNote:終わりの箱の外の一言
|
|
18
|
+
// 2.0(Egatari spec §6.1 の部品):base の MotionElement・el・mtext・prog・lerp・variant・previewOpacity を使い、プレイヤーのグローバルは使わない。
|
|
19
|
+
// 式(tex)は組み立てのときに KaTeX で描く(spec §6.2):build.fields の nodes[].tex を作り手が描いて texHtml を足し、
|
|
20
|
+
// この部品は markup-reader で決まった要素と属性だけを読んで置く(再生のときに KaTeX は動かない)。描いた結果がなければ tex を字のまま出して知らせる。
|
|
21
|
+
// 入らないときは ctx.report("size", "[tree] …") で知らせる(1.x の console.warn の代わり)
|
|
22
|
+
egatariParts.define({name: "tree", version: "2.0.2", requires: {base: "1.1.0", "markup-reader": "1.0.1"}, element: "m-tree"}, function(deps){
|
|
23
|
+
"use strict";
|
|
24
|
+
var base = deps.base, MR = deps["markup-reader"];
|
|
25
|
+
// 形の要素ごとに、書き直すと形が作り直される属性(render の終わりで使う)
|
|
26
|
+
var SHAPE_GEOM = {rect: "width", circle: "r", ellipse: "rx", path: "d", line: "x1", polyline: "points", polygon: "points"};
|
|
27
|
+
// 複数行の名前の行の位置(1 行目からの下がり、px)と、上下に足す余白。base 1.1.0 で mtext の下付き・上付きは 24px 以上になり、
|
|
28
|
+
// 行の間 lh(字の 1.25 倍)では上の行の下付きと下の行の上付きが重なる。下付きの字の下端は基線から添字の 0.75 倍まで、上付きの字の
|
|
29
|
+
// 上端は添字の 1.4 倍まで(Source Sans 3 で測った値。BIZ UDPGothic ではそれぞれ 0.5 倍と 1.2 倍)。上の行に下付き(_)があれば
|
|
30
|
+
// その下端から字の下の余白(字の 0.12 倍)を引いた分、下の行に上付き(^)があればその上端から字の上の高さ(0.88 倍)を引いた分だけ
|
|
31
|
+
// 行の間を広げる。top・bottom は 1 行目の上付き・最後の行の下付きの分(添字がなければどれも 0 で、行は lh ずつ)
|
|
32
|
+
function subX(s, fs){ var ss = Math.max(24, Math.round(fs * 0.75)); return /_./.test(s) ? Math.max(0, 0.75 * ss - 0.12 * fs) : 0; }
|
|
33
|
+
function supX(s, fs){ var ss = Math.max(24, Math.round(fs * 0.75)); return /\^./.test(s) ? Math.max(0, 1.4 * ss - 0.88 * fs) : 0; }
|
|
34
|
+
function lineYs(lines, lh, fs){
|
|
35
|
+
var y = [0];
|
|
36
|
+
for (var j = 1; j < lines.length; j++) y.push(y[j - 1] + lh + subX(lines[j - 1], fs) + supX(lines[j], fs));
|
|
37
|
+
y.top = supX(lines[0], fs); y.bottom = subX(lines[lines.length - 1], fs);
|
|
38
|
+
return y;
|
|
39
|
+
}
|
|
40
|
+
var Part = class extends base.MotionElement {
|
|
41
|
+
static partName = "tree"; // the registry name (define meta name), for report prefixes
|
|
42
|
+
// 組み立てのときに描く欄(spec §6.2)。式の意味は字(tex)でも持つので、KaTeX の出力は HTML だけ
|
|
43
|
+
static build = {fields: {"nodes[].tex": "katex"}, options: {katex: {output: "html"}}};
|
|
44
|
+
static variants = ["fade", "draw", "grow"];
|
|
45
|
+
// データの形(kit/shape.js)
|
|
46
|
+
static shape = {
|
|
47
|
+
schema: {type: "object", additionalProperties: false, required: ["nodes"], properties: {
|
|
48
|
+
nodes: {type: "array", minItems: 1, items: {type: "object", required: ["id"], properties: {
|
|
49
|
+
id: {type: ["string", "integer"]}, label: {type: "string"}, tex: {type: "string"}, texHtml: {type: "string"}, note: {type: "string"}, tone: {type: "string"},
|
|
50
|
+
parent: {type: ["string", "integer"]}, branch: {type: "string"}, step: {type: "integer"}, at: {type: "number"}}}},
|
|
51
|
+
edges: {type: "array", items: {type: "object", required: ["from", "to"], properties: {
|
|
52
|
+
from: {type: ["string", "integer"]}, to: {type: ["string", "integer"]}, label: {type: "string"}, tone: {type: "string"}, dash: {type: "boolean"},
|
|
53
|
+
step: {type: "integer"}, at: {type: "number"}}}},
|
|
54
|
+
path: {type: "array", minItems: 2, items: {type: ["string", "integer"]}}, pathStep: {type: "integer"}, pathNote: {type: "string"}, renderers: {type: "object"}}},
|
|
55
|
+
example: {nodes: [{id: "r", label: "動物"}, {id: "a", label: "脊椎動物", parent: "r"}, {id: "b", label: "無脊椎動物", parent: "r"}]},
|
|
56
|
+
note: "parent のない節(根)はちょうど 1 つ",
|
|
57
|
+
};
|
|
58
|
+
static props = {
|
|
59
|
+
orient: {type: "string", default: "down", doc: "down(上から下、既定)か right(左から右)"},
|
|
60
|
+
by: {type: "string", default: "level", doc: "段階の分け方:level(深さごと、既定)か node(1 つずつ、深さ優先の順)"},
|
|
61
|
+
link: {type: "string", default: "elbow", doc: "親子の線:elbow(かぎ形、既定)か straight(まっすぐ)"},
|
|
62
|
+
size: {type: "number", default: 0, doc: "箱の字の大きさ(px。0 = 27 から入るまで 24 まで縮める)"},
|
|
63
|
+
fade: {type: "number", default: 0.45, doc: "箱が現れる秒数"},
|
|
64
|
+
draw: {type: "number", default: 0.5, doc: "線を引く秒数"},
|
|
65
|
+
};
|
|
66
|
+
// 木の形と段階(mount の前にも段階の数のために使う)
|
|
67
|
+
plan(){
|
|
68
|
+
if (this._plan) return this._plan;
|
|
69
|
+
var d = this.data || {}, P = this.props, byId = {}, roots = [], notes = this._notes = []; // データの問題:mount が ctx.report で知らせる
|
|
70
|
+
var nodes = (d.nodes || []).map(function(n){
|
|
71
|
+
var o = {n: n, kids: [], depth: 0};
|
|
72
|
+
if (byId[n.id]) notes.push("[tree] the id " + JSON.stringify(n.id) + " is used by more than one node (parent, edges and path refer to the last one; give each node its own id)");
|
|
73
|
+
byId[n.id] = o; return o;
|
|
74
|
+
});
|
|
75
|
+
nodes.forEach(function(o){
|
|
76
|
+
if (o.n.parent === undefined || o.n.parent === null) roots.push(o);
|
|
77
|
+
else if (!byId[o.n.parent]) throw new Error("m-tree: node " + JSON.stringify(o.n.id) + " has an unknown parent " + JSON.stringify(o.n.parent));
|
|
78
|
+
else byId[o.n.parent].kids.push(o);
|
|
79
|
+
});
|
|
80
|
+
if (roots.length !== 1) throw new Error("m-tree: exactly one node must have no parent (the root); found " + roots.length);
|
|
81
|
+
var order = [], seen = 0;
|
|
82
|
+
(function walk(o, dep){
|
|
83
|
+
if (++seen > nodes.length) throw new Error("m-tree: the parents form a loop");
|
|
84
|
+
o.depth = dep; order.push(o);
|
|
85
|
+
o.kids.forEach(function(c){ c.par = o; walk(c, dep + 1); });
|
|
86
|
+
})(roots[0], 0);
|
|
87
|
+
if (order.length !== nodes.length) throw new Error("m-tree: the parents form a loop");
|
|
88
|
+
var byNode = P.by === "node";
|
|
89
|
+
order.forEach(function(o, i){ o.step = o.n.step !== undefined ? o.n.step : byNode ? i + 1 : o.depth + 1; o.at = o.n.at || 0; });
|
|
90
|
+
var edges = (d.edges || []).map(function(e){
|
|
91
|
+
var a = byId[e.from], b = byId[e.to];
|
|
92
|
+
if (!a || !b) throw new Error("m-tree: edge to an unknown node " + JSON.stringify(a ? e.to : e.from));
|
|
93
|
+
return {e: e, a: a, b: b, step: e.step !== undefined ? e.step : Math.max(a.step, b.step)};
|
|
94
|
+
});
|
|
95
|
+
// 強調する道(path:根から葉への id の列)。既定は木ができた後に 1 段階に 1 本ずつ、pathStep があればその段階に順に
|
|
96
|
+
var path = null;
|
|
97
|
+
if (d.path !== undefined){
|
|
98
|
+
if (!Array.isArray(d.path) || d.path.length < 2) throw new Error("m-tree: path must list at least two ids, from the root");
|
|
99
|
+
var pn = d.path.map(function(id){ if (!byId[id]) throw new Error("m-tree: path names an unknown node " + JSON.stringify(id)); return byId[id]; });
|
|
100
|
+
if (pn[0] !== roots[0]) throw new Error("m-tree: path must start at the root " + JSON.stringify(roots[0].n.id));
|
|
101
|
+
pn.forEach(function(o, i){ if (i && o.par !== pn[i - 1]) throw new Error("m-tree: path: " + JSON.stringify(o.n.id) + " is not a child of " + JSON.stringify(pn[i - 1].n.id)); });
|
|
102
|
+
var last = 1, one = d.pathStep !== undefined;
|
|
103
|
+
nodes.concat(edges).forEach(function(o){ last = Math.max(last, o.step); });
|
|
104
|
+
path = {nodes: pn, note: d.pathNote, links: pn.slice(1).map(function(o, i){ return {o: o, step: one ? d.pathStep : last + 1 + i, at: one ? i * P.draw : 0}; })};
|
|
105
|
+
}
|
|
106
|
+
return (this._plan = {nodes: nodes, order: order, root: roots[0], byId: byId, edges: edges, path: path});
|
|
107
|
+
}
|
|
108
|
+
get steps(){
|
|
109
|
+
if (this.getAttribute("steps") !== null) return +this.getAttribute("steps");
|
|
110
|
+
var p = this.plan(), m = 1;
|
|
111
|
+
p.nodes.concat(p.edges, p.path ? p.path.links : []).forEach(function(o){ m = Math.max(m, o.step); });
|
|
112
|
+
return m;
|
|
113
|
+
}
|
|
114
|
+
mount(ctx){
|
|
115
|
+
var P = this.props, D = base, self = this, pl = this.plan(), sk = MR.sink(this, ctx);
|
|
116
|
+
this._notes.forEach(function(m){ ctx.report("data", m); });
|
|
117
|
+
this.variant = base.variant(this);
|
|
118
|
+
this.style.display = "block"; this.style.position = "relative";
|
|
119
|
+
var W = this.clientWidth, H = this.clientHeight, right = P.orient === "right";
|
|
120
|
+
var svg = D.el("svg", {viewBox: "0 0 " + W + " " + H, width: W, height: H, "aria-hidden": "true", style: "display:block;overflow:visible"}, this);
|
|
121
|
+
var root = D.el("g", {}, svg), gL = D.el("g", {}, root), gE = D.el("g", {}, root), gN = D.el("g", {}, root);
|
|
122
|
+
// 字の幅の見積もり(字の大きさ 1 あたり。base の textWidth:テーマの字で測った幅。*斜体* などの記号は数えない)
|
|
123
|
+
var est = function(s){ return D.textWidth(s, 1, {font: self, mark: true}); };
|
|
124
|
+
var texEst = function(s){ return Math.max(1, String(s).replace(/\\[a-zA-Z]+/g, "x").replace(/[{}^_\\ ]/g, "").length) * 0.62; };
|
|
125
|
+
var NS = 24, NLH = 30; // 注(note)の字の大きさと行の高さ
|
|
126
|
+
var levels = 0;
|
|
127
|
+
pl.nodes.forEach(function(o){ levels = Math.max(levels, o.depth + 1); });
|
|
128
|
+
var labW = 0;
|
|
129
|
+
pl.edges.forEach(function(x){ if (x.e.label) labW = Math.max(labW, est(x.e.label) * 24); });
|
|
130
|
+
var edgeRoom = pl.edges.length ? 56 + (labW ? (right ? labW + 14 : 36) : 0) : 0;
|
|
131
|
+
// 枝の名前(node.branch:親からの線に添える字。確率・条件・はい/いいえ)と、道の終わりの一言(pathNote)の場所
|
|
132
|
+
var brs = pl.nodes.filter(function(o){ o.brw = o.par && o.n.branch ? est(o.n.branch) * 24 : 0; return o.brw > 0; }), brW = 0;
|
|
133
|
+
brs.forEach(function(o){ brW = Math.max(brW, o.brw); });
|
|
134
|
+
var pnote = pl.path && pl.path.note ? String(pl.path.note) : "", pnRoom = pnote ? (right ? est(pnote) * 27 + 18 : 44) : 0;
|
|
135
|
+
// 名前を 2 行に折る(入らないときだけ)。\n も *_^ もない 4 字以上の名前に限る。空白があれば真ん中に近い空白で、
|
|
136
|
+
// 和文は真ん中あたりで(小さい仮名・長音・句読点を行の頭にしない)。空白のない欧文の 1 語は折らない
|
|
137
|
+
function wrap2(t){
|
|
138
|
+
var ch = [...t], n = ch.length, best = -1;
|
|
139
|
+
if (n < 4 || /[*_^]/.test(t)) return null;
|
|
140
|
+
if (/ /.test(t)){
|
|
141
|
+
ch.forEach(function(c, i){ if (c === " " && (best < 0 || Math.abs(i - n / 2) < Math.abs(best - n / 2))) best = i; });
|
|
142
|
+
return [ch.slice(0, best).join(""), ch.slice(best + 1).join("")];
|
|
143
|
+
}
|
|
144
|
+
if (/^[\u0000-ɏ]+$/.test(t)) return null;
|
|
145
|
+
// 真ん中から 2 字以内で、平仮名の後ろで平仮名でない字の前(「とても長い|分類」)があればそこで
|
|
146
|
+
var cut = Math.ceil(n / 2), hira = /[ぁ-ゖ]/, d;
|
|
147
|
+
for (d = 0; d <= 2; d++){
|
|
148
|
+
if (cut - d >= 2 && hira.test(ch[cut - d - 1]) && !hira.test(ch[cut - d])){ cut -= d; break; }
|
|
149
|
+
if (d && cut + d <= n - 2 && hira.test(ch[cut + d - 1]) && !hira.test(ch[cut + d])){ cut += d; break; }
|
|
150
|
+
}
|
|
151
|
+
while (cut < n - 1 && /[ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮー、。・)」』]/.test(ch[cut])) cut++;
|
|
152
|
+
return [ch.slice(0, cut).join(""), ch.slice(cut).join("")];
|
|
153
|
+
}
|
|
154
|
+
var wrapOn = false, RG = 14; // RG:2 段に並べた子の、段の間
|
|
155
|
+
// 大きさ s の字で箱を測る(b:並ぶ向きの幅、d:深さの向きの幅)
|
|
156
|
+
function measure(s){
|
|
157
|
+
pl.nodes.forEach(function(o){
|
|
158
|
+
var n = o.n, lines = n.tex ? [n.tex] : String(n.label || "").split("\n");
|
|
159
|
+
if (wrapOn && !n.tex && lines.length === 1){ var w2 = wrap2(lines[0]); if (w2) lines = w2; }
|
|
160
|
+
var tw = n.tex ? texEst(n.tex) * s : Math.max.apply(null, lines.map(est)) * s;
|
|
161
|
+
o.lines = lines;
|
|
162
|
+
var ys0 = n.tex ? null : lineYs(lines, s * 1.25, s);
|
|
163
|
+
o.w = Math.max(s * 2.4, tw + s * 1.3);
|
|
164
|
+
o.h = (n.tex ? s * 1.5 : ys0[lines.length - 1] + s * 1.25 + ys0.top + ys0.bottom) + s * 0.75;
|
|
165
|
+
o.notes = n.note ? String(n.note).split("\n") : [];
|
|
166
|
+
o.nw = o.notes.length ? Math.max.apply(null, o.notes.map(est)) * NS : 0; o.nh = o.notes.length ? o.notes.length * NLH + 4 : 0;
|
|
167
|
+
o.fb = right ? o.h + o.nh : Math.max(o.w, o.nw);
|
|
168
|
+
o.fd = right ? Math.max(o.w, o.nw) : o.h + o.nh;
|
|
169
|
+
// 下向きでは枝の名前が線の横に並ぶので、その分を並ぶ向きの幅にとる
|
|
170
|
+
if (!right && o.brw) o.fb = Math.max(o.fb, o.w + 2 * (o.brw + 14));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
// 部分木を置く:段ごとの輪郭 [左, 右] を返し、子の親からのずれ off を決める
|
|
174
|
+
function lay(o, gap){
|
|
175
|
+
var half = o.fb / 2, ks = o.kids;
|
|
176
|
+
if (!ks.length){ o.cont = [[-half, half]]; return; }
|
|
177
|
+
if (o.fold){
|
|
178
|
+
// 葉だけの子を 2 段に互い違いに並べる(row 1 が奥の段)。奥の段への線は手前の段の箱の間を通るので、箱から C 空ける
|
|
179
|
+
var p = [], C = 12;
|
|
180
|
+
ks.forEach(function(c, j){
|
|
181
|
+
c.cont = [[-c.fb / 2, c.fb / 2]];
|
|
182
|
+
if (!j){ p.push(0); return; }
|
|
183
|
+
var v = j % 2 ? p[j - 1] + ks[j - 1].fb / 2 + C : p[j - 1] + C + c.fb / 2;
|
|
184
|
+
if (j >= 2) v = Math.max(v, p[j - 2] + (ks[j - 2].fb + c.fb) / 2 + gap);
|
|
185
|
+
p.push(v);
|
|
186
|
+
});
|
|
187
|
+
var m0 = (p[0] + p[p.length - 1]) / 2, lo = Infinity, hi = -Infinity;
|
|
188
|
+
ks.forEach(function(c, j){ c.off = p[j] - m0; c.row = j % 2; lo = Math.min(lo, c.off - c.fb / 2); hi = Math.max(hi, c.off + c.fb / 2); });
|
|
189
|
+
o.cont = [[-half, half], [lo, hi]];
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
var acc = null, pos = [];
|
|
193
|
+
ks.forEach(function(c){
|
|
194
|
+
c.row = 0;
|
|
195
|
+
lay(c, gap);
|
|
196
|
+
if (!acc){ pos.push(0); acc = c.cont.map(function(a){ return a.slice(); }); return; }
|
|
197
|
+
var sh = -Infinity, dd;
|
|
198
|
+
for (dd = 0; dd < Math.min(acc.length, c.cont.length); dd++) sh = Math.max(sh, acc[dd][1] + gap - c.cont[dd][0]);
|
|
199
|
+
pos.push(sh);
|
|
200
|
+
for (dd = 0; dd < c.cont.length; dd++){
|
|
201
|
+
var l = c.cont[dd][0] + sh, r = c.cont[dd][1] + sh;
|
|
202
|
+
if (dd < acc.length){ acc[dd][0] = Math.min(acc[dd][0], l); acc[dd][1] = Math.max(acc[dd][1], r); } else acc.push([l, r]);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
var mid = (pos[0] + pos[pos.length - 1]) / 2;
|
|
206
|
+
ks.forEach(function(c, i){ c.off = pos[i] - mid; });
|
|
207
|
+
o.cont = [[-half, half]].concat(acc.map(function(a){ return [a[0] - mid, a[1] - mid]; }));
|
|
208
|
+
}
|
|
209
|
+
function breadth(gap){
|
|
210
|
+
lay(pl.root, gap);
|
|
211
|
+
var lo = Infinity, hi = -Infinity;
|
|
212
|
+
pl.root.cont.forEach(function(a){ lo = Math.min(lo, a[0]); hi = Math.max(hi, a[1]); });
|
|
213
|
+
return {lo: lo, hi: hi, span: hi - lo};
|
|
214
|
+
}
|
|
215
|
+
// 深さの向きの段ごとの幅(2 段に並べた子のある段は、奥の段の分だけ広い)
|
|
216
|
+
function depthSum(){
|
|
217
|
+
var ext = [], r2 = [], rowOff = [];
|
|
218
|
+
pl.nodes.forEach(function(o){ if (o.row) r2[o.depth] = Math.max(r2[o.depth] || 0, o.fd); else ext[o.depth] = Math.max(ext[o.depth] || 0, o.fd); });
|
|
219
|
+
r2.forEach(function(e, d){ rowOff[d] = (ext[d] || 0) + RG; ext[d] = rowOff[d] + e; });
|
|
220
|
+
return {ext: ext, rowOff: rowOff, sum: ext.reduce(function(a, b){ return a + b; }, 0)};
|
|
221
|
+
}
|
|
222
|
+
var B = right ? H : W, DA = (right ? W : H) - edgeRoom - pnRoom;
|
|
223
|
+
var gmin = right ? 14 : 22, gmax = right ? 30 : 64, lgmin = right ? 56 : 40, lgmax = right ? 110 : 90;
|
|
224
|
+
// 枝の名前があれば、段の間に名前の入る長さをとる(right:線の上に横書き、down:線の横)
|
|
225
|
+
if (brs.length){ lgmin = Math.max(lgmin, right ? brW + 52 : 76); lgmax = Math.max(lgmax, lgmin); }
|
|
226
|
+
// 入れ方を順に試す:字を 27 → 24 px、それでも入らなければ 24 px のまま、葉だけの子の多い親から順に子を 2 段にし、
|
|
227
|
+
// さらに名前を 2 行に折る。字は 24 px より小さくしない(docs/conventions.md §2.3)。どれでも入らなければ、
|
|
228
|
+
// はみ出しのいちばん少ない形で描き、足りない px を ctx.report("size", …) で知らせる
|
|
229
|
+
var cands = P.link === "straight" || brs.length ? [] : pl.nodes.filter(function(o){ return o.kids.length >= 3 && o.kids.every(function(c){ return !c.kids.length; }); })
|
|
230
|
+
.sort(function(a, b){ return b.kids.length - a.kids.length; });
|
|
231
|
+
var sizes = P.size ? [P.size] : [27, 26, 25, 24], s24 = sizes[sizes.length - 1], tries = [], cfg = null, best = null, nf;
|
|
232
|
+
sizes.forEach(function(z){ tries.push([z, false, 0]); });
|
|
233
|
+
for (nf = 1; nf <= cands.length; nf++) tries.push([s24, false, nf]);
|
|
234
|
+
for (nf = 0; nf <= cands.length; nf++) tries.push([s24, true, nf]);
|
|
235
|
+
var setup = function(t){
|
|
236
|
+
wrapOn = t[1];
|
|
237
|
+
pl.nodes.forEach(function(o){ o.fold = false; o.row = 0; });
|
|
238
|
+
cands.slice(0, t[2]).forEach(function(o){ o.fold = true; });
|
|
239
|
+
measure(t[0]);
|
|
240
|
+
var b = breadth(gmin), d = depthSum();
|
|
241
|
+
return [Math.max(0, b.span - B), Math.max(0, d.sum + (levels - 1) * lgmin - DA)];
|
|
242
|
+
};
|
|
243
|
+
for (var i = 0; i < tries.length && !cfg; i++){
|
|
244
|
+
var miss = setup(tries[i]);
|
|
245
|
+
if (!miss[0] && !miss[1]) cfg = tries[i];
|
|
246
|
+
else if (!best || miss[0] + miss[1] < best.m[0] + best.m[1]) best = {t: tries[i], m: miss};
|
|
247
|
+
}
|
|
248
|
+
var fit = !!cfg;
|
|
249
|
+
if (!fit){ cfg = best.t; ctx.report("size", "[tree] the tree does not fit at " + cfg[0] + " px; it overflows its box by " + Math.ceil(best.m[0]) + " px across and " + Math.ceil(best.m[1]) + " px along the levels (text is not made smaller). Split the tree, shorten the labels or make the element larger"); }
|
|
250
|
+
setup(cfg);
|
|
251
|
+
var s = cfg[0], br, ds;
|
|
252
|
+
// 並ぶ向きの間:入る範囲で広げる
|
|
253
|
+
var gap = gmin;
|
|
254
|
+
if (fit) for (var g = gmax; g > gmin; g -= 2){ if (breadth(g).span <= B){ gap = g; break; } }
|
|
255
|
+
br = breadth(gap); ds = depthSum();
|
|
256
|
+
var lgap = levels > 1 ? Math.max(lgmin, Math.min(lgmax, (DA - ds.sum) / (levels - 1))) : 0;
|
|
257
|
+
var totalD = ds.sum + (levels - 1) * lgap;
|
|
258
|
+
var lvStart = [], acc = 0;
|
|
259
|
+
ds.ext.forEach(function(e, d){ lvStart[d] = acc; acc += e + lgap; });
|
|
260
|
+
// 絶対位置(b:並ぶ向きの中心、d0:その段の始まり)。入らないときは並ぶ向きに中央(両側へ同じだけはみ出す)、深さの向きは端から
|
|
261
|
+
(function place(o, b){ o.b = b; o.kids.forEach(function(c){ place(c, b + c.off); }); })(pl.root, 0);
|
|
262
|
+
var oB = (B - br.span) / 2 - br.lo, oD = Math.max(0, (DA - totalD) / 2);
|
|
263
|
+
var tones = {term: ["var(--term)", "var(--term-tint)", "var(--fg)"], emph: ["var(--emph)", "var(--emph-tint)", "var(--emph)"]};
|
|
264
|
+
var toneOf = function(t){
|
|
265
|
+
if (tones[t]) return tones[t];
|
|
266
|
+
if (/^(muted|accent2|series-[1-4])$/.test(t || "")) return ["var(--" + t + ")", "var(--bg)", "var(--" + t + ")"];
|
|
267
|
+
return tones.term;
|
|
268
|
+
};
|
|
269
|
+
this.size = s;
|
|
270
|
+
// 箱
|
|
271
|
+
pl.nodes.forEach(function(o){
|
|
272
|
+
var n = o.n, c = toneOf(n.tone), b = o.b + oB, d0 = lvStart[o.depth] + oD + (o.row ? ds.rowOff[o.depth] : 0);
|
|
273
|
+
if (right){ o.x = d0; o.y = b - o.fb / 2; } else { o.x = b - o.w / 2; o.y = d0; }
|
|
274
|
+
o.cx = o.x + o.w / 2; o.cy = o.y + o.h / 2;
|
|
275
|
+
o.g = D.el("g", {opacity: 0}, gN);
|
|
276
|
+
D.el("rect", {class: "box", x: o.x.toFixed(1), y: o.y.toFixed(1), width: o.w.toFixed(1), height: o.h.toFixed(1), rx: 10, fill: c[1], stroke: c[0], "stroke-width": n.tone === "emph" ? 3 : 2.2}, o.g);
|
|
277
|
+
if (n.tex) MR.texFrame(o.g, o.cx, o.cy + s * 0.36, n, "tex", {size: s, anchor: "middle", color: c[2], w: o.w, h: o.h}, sk).firstChild.style.verticalAlign = "top";
|
|
278
|
+
else {
|
|
279
|
+
var ys = lineYs(o.lines, s * 1.25, s), y0 = o.cy - ys[ys.length - 1] / 2 + s * 0.36 + (ys.top - ys.bottom) / 2;
|
|
280
|
+
o.lines.forEach(function(t, j){ D.mtext(o.g, o.cx, y0 + ys[j], t, {"text-anchor": "middle", "font-size": s, fill: c[2]}); });
|
|
281
|
+
}
|
|
282
|
+
o.notes.forEach(function(t, j){
|
|
283
|
+
var ny = o.y + o.h + 4 + NLH * j + NS * 0.95;
|
|
284
|
+
D.mtext(o.g, right ? o.x + 2 : o.cx, ny, t, {"text-anchor": right ? "start" : "middle", "font-size": NS, fill: "var(--muted)"});
|
|
285
|
+
});
|
|
286
|
+
// 線が付く点:入る点(親からの線の終わり)と出る点(子への線の始まり)
|
|
287
|
+
o.inP = right ? [o.x, o.cy] : [o.cx, o.y];
|
|
288
|
+
o.outP = right ? [o.x + o.w, o.cy] : [o.cx, o.y + o.h + o.nh];
|
|
289
|
+
});
|
|
290
|
+
// 親子の線。o.dir:親の中心から箱の中心への向き(draw と grow で箱が寄ってくる向き)
|
|
291
|
+
// 枝の名前があれば、かぎの曲がり角を親の側に寄せ(20 px)、子へ入る線を長くしてそこに名前を添える
|
|
292
|
+
var bo = brs.length ? Math.min(lgap / 2, 20) : lgap / 2, gB = brs.length ? D.el("g", {}) : null;
|
|
293
|
+
pl.nodes.forEach(function(o){
|
|
294
|
+
if (!o.par){ o.dir = [0, 1]; return; }
|
|
295
|
+
var dx = o.cx - o.par.cx, dy = o.cy - o.par.cy, dl = Math.hypot(dx, dy) || 1;
|
|
296
|
+
o.dir = [dx / dl, dy / dl];
|
|
297
|
+
var p = o.par, a = p.outP, z = o.inP, pts;
|
|
298
|
+
if (P.link === "straight") pts = [a, z];
|
|
299
|
+
else if (right){ var bx = lvStart[p.depth] + oD + ds.ext[p.depth] + bo; pts = [a, [bx, a[1]], [bx, z[1]], z]; }
|
|
300
|
+
else { var by = lvStart[p.depth] + oD + ds.ext[p.depth] + bo; pts = [a, [a[0], by], [z[0], by], z]; }
|
|
301
|
+
o.path = self.poly(pts);
|
|
302
|
+
if (o.brw){
|
|
303
|
+
// 名前は子へ入る線に添え、線とほかの名前を避ける。right:線の上、down:線の外側(親から離れる側)の横
|
|
304
|
+
var sd = o.cx < p.cx - 0.5 ? -1 : 1, lx, ly, an, q = pts[pts.length - 2];
|
|
305
|
+
if (P.link === "straight"){
|
|
306
|
+
var mx = (a[0] + z[0]) / 2, my = (a[1] + z[1]) / 2, ddx = z[0] - a[0], ddy = z[1] - a[1];
|
|
307
|
+
if (right){ var sl = Math.abs(ddy / (ddx || 1)) * o.brw / 2; lx = mx; an = "middle"; ly = ddy <= 0 ? my - sl - 12 : my + sl + 27; }
|
|
308
|
+
else { lx = mx + sd * (10 + 14 * Math.abs(ddx / (ddy || 1))); ly = my + 8; an = sd > 0 ? "start" : "end"; }
|
|
309
|
+
} else if (right){ lx = (q[0] + z[0]) / 2; ly = z[1] - 9; an = "middle"; }
|
|
310
|
+
else { lx = z[0] + sd * 10; ly = (q[1] + z[1]) / 2 + 8; an = sd > 0 ? "start" : "end"; }
|
|
311
|
+
o.blab = D.mtext(gB, lx.toFixed(1), ly.toFixed(1), String(o.n.branch), {"text-anchor": an, "font-size": 24, fill: "var(--fg)", opacity: 0});
|
|
312
|
+
}
|
|
313
|
+
o.line = D.el("path", {d: "", fill: "none", stroke: "var(--muted)", "stroke-width": 3, "stroke-linejoin": "round"}, gL);
|
|
314
|
+
});
|
|
315
|
+
// そのほかのつながり:外側(down は下、right は右)にふくらむ破線の曲線
|
|
316
|
+
var depthEnd = oD + totalD;
|
|
317
|
+
this.edges = pl.edges.map(function(x){
|
|
318
|
+
var e = x.e, a = x.a, b = x.b;
|
|
319
|
+
var pa = right ? [a.x + a.fd, a.cy] : [a.cx, a.y + a.fd], pb = right ? [b.x + b.fd, b.cy] : [b.cx, b.y + b.fd];
|
|
320
|
+
var sg = right ? (b.cy > a.cy ? 1 : -1) : (b.cx > a.cx ? 1 : -1), q = Math.min(18, (right ? a.fb : a.w) / 4);
|
|
321
|
+
if (right){ pa = [pa[0] + 6, pa[1] + sg * q]; pb = [pb[0] + 10, pb[1] - sg * q]; } else { pa = [pa[0] + sg * q, pa[1] + 6]; pb = [pb[0] - sg * q, pb[1] + 10]; }
|
|
322
|
+
var far = Math.max(right ? pa[0] : pa[1], right ? pb[0] : pb[1]) + 44;
|
|
323
|
+
var mid = [(pa[0] + pb[0]) / 2, (pa[1] + pb[1]) / 2], ctl = right ? [2 * far - mid[0], mid[1]] : [mid[0], 2 * far - mid[1]];
|
|
324
|
+
// 頂点が far になるように制御点を置く(2 次ベジェの中点 = (端の中点 + 制御点) / 2)
|
|
325
|
+
var pts = [];
|
|
326
|
+
for (var j = 0; j <= 24; j++){
|
|
327
|
+
var u = j / 24, v = 1 - u;
|
|
328
|
+
pts.push([v * v * pa[0] + 2 * u * v * ctl[0] + u * u * pb[0], v * v * pa[1] + 2 * u * v * ctl[1] + u * u * pb[1]]);
|
|
329
|
+
}
|
|
330
|
+
var col = e.tone ? toneOf(e.tone)[0] : "var(--muted)";
|
|
331
|
+
var g = D.el("g", {opacity: 0}, gE);
|
|
332
|
+
var line = D.el("path", {d: "", fill: "none", stroke: col, "stroke-width": 3, "stroke-dasharray": e.dash === false ? "none" : "8 6"}, g);
|
|
333
|
+
var head = D.el("path", {d: "M0,0L-16,-7L-16,7Z", fill: col}, g);
|
|
334
|
+
var lab = e.label ? D.mtext(g, right ? far + 10 : (pa[0] + pb[0]) / 2, right ? mid[1] + 8 : far + 30, e.label,
|
|
335
|
+
{"text-anchor": right ? "start" : "middle", "font-size": 24, fill: col, opacity: 0}) : null;
|
|
336
|
+
depthEnd = Math.max(depthEnd, far);
|
|
337
|
+
var after = 0;
|
|
338
|
+
[a, b].forEach(function(o){ if (o.step === x.step) after = Math.max(after, o.at + self.span()); });
|
|
339
|
+
return {g: g, line: line, head: head, lab: lab, path: self.poly(pts), step: x.step, at: e.at !== undefined ? e.at : after};
|
|
340
|
+
});
|
|
341
|
+
if (gB) root.appendChild(gB);
|
|
342
|
+
// 強調する道:線の上に --emph の太い線を引き、箱を --emph の枠で囲む。終わりの箱の外に pathNote
|
|
343
|
+
if (pl.path){
|
|
344
|
+
var gPL = D.el("g", {}), gPF = D.el("g", {});
|
|
345
|
+
root.insertBefore(gPL, gE); root.appendChild(gPF);
|
|
346
|
+
var frame = function(o){ return D.el("rect", {x: (o.x - 4).toFixed(1), y: (o.y - 4).toFixed(1), width: (o.w + 8).toFixed(1), height: (o.h + 8).toFixed(1), rx: 13, fill: "none", stroke: "var(--emph)", "stroke-width": 4, opacity: 0}, gPF); };
|
|
347
|
+
this.pathRoot = frame(pl.root);
|
|
348
|
+
this.pathEls = pl.path.links.map(function(x){
|
|
349
|
+
return {x: x, line: D.el("path", {d: "", fill: "none", stroke: "var(--emph)", "stroke-width": 6, "stroke-linejoin": "round", "stroke-linecap": "round", opacity: 0}, gPL), frame: frame(x.o)};
|
|
350
|
+
});
|
|
351
|
+
if (pnote){
|
|
352
|
+
var lf = pl.path.links[pl.path.links.length - 1].o;
|
|
353
|
+
this.pathNote = right ? D.mtext(gPF, (lf.x + Math.max(lf.w, lf.nw) + 16).toFixed(1), (lf.cy + s * 0.36).toFixed(1), pnote, {"text-anchor": "start", "font-size": s, fill: "var(--emph)", opacity: 0})
|
|
354
|
+
: D.mtext(gPF, lf.cx.toFixed(1), (lf.y + lf.h + lf.nh + 10 + s * 0.95).toFixed(1), pnote, {"text-anchor": "middle", "font-size": s, fill: "var(--emph)", opacity: 0});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
// 形の一覧(render の終わりに形を作り直すため。下の render を見る)
|
|
358
|
+
this.shapes = [].slice.call(svg.querySelectorAll("rect,circle,ellipse,path,line,polyline,polygon"));
|
|
359
|
+
// 読み上げ:最後の形(すべての節、ほかのつながり、強調した道)を 1 文で。作者の aria-label があればそれを使う(上書きしない)
|
|
360
|
+
if (this._aria === undefined) this._aria = this.getAttribute("aria-label");
|
|
361
|
+
this.setAttribute("role", "img");
|
|
362
|
+
if (!this._aria) this.setAttribute("aria-label", this.summary(/^ja\b/i.test(ctx.lang || "ja")));
|
|
363
|
+
sk.flush(); // what the formulas have to report, once per kind (spec §6.2)
|
|
364
|
+
}
|
|
365
|
+
// 最後の形を 1 文で(読み上げの名前):「木:動物。動物の下に 脊椎動物、無脊椎動物。脊椎動物の下に(はい)魚類、…。つながり:…。強調した道:動物 → 脊椎動物(…)」
|
|
366
|
+
summary(ja){
|
|
367
|
+
var pl = this.plan(), one = function(n){ return String(n.label || n.tex || "").replace(/\s*\n\s*/g, " ").replace(/\*/g, "").replace(/[_^](.)/g, "$1"); };
|
|
368
|
+
var lp = ja ? "(" : " (", rp = ja ? ")" : ")", cm = ja ? "、" : ", ", dot = ja ? "。" : ". ";
|
|
369
|
+
var full = function(n){ return one(n) + (n.note ? lp + n.note + rp : ""); };
|
|
370
|
+
var s = (ja ? "木:" : "Tree: ") + full(pl.root.n);
|
|
371
|
+
pl.order.forEach(function(o){
|
|
372
|
+
if (!o.kids.length) return;
|
|
373
|
+
s += dot + (ja ? one(o.n) + "の下に " : "Under " + one(o.n) + ": ") + o.kids.map(function(c){ return (c.n.branch ? (ja ? "(" + c.n.branch + ")" : "(" + c.n.branch + ") ") : "") + full(c.n); }).join(cm);
|
|
374
|
+
});
|
|
375
|
+
var ed = pl.edges.map(function(x){ return one(x.a.n) + " → " + one(x.b.n) + (x.e.label ? lp + x.e.label + rp : ""); });
|
|
376
|
+
if (ed.length) s += dot + (ja ? "つながり:" : "Links: ") + ed.join(cm);
|
|
377
|
+
if (pl.path) s += dot + (ja ? "強調した道:" : "Highlighted path: ") + pl.path.nodes.map(function(o){ return one(o.n); }).join(" → ") + (pl.path.note ? lp + pl.path.note + rp : "");
|
|
378
|
+
return s;
|
|
379
|
+
}
|
|
380
|
+
// 箱 1 つの動きの長さ(どの見せ方でも同じ):箱が現れて線を引き終わるまで
|
|
381
|
+
span(){ return this.props.fade * 0.6 + this.props.draw; }
|
|
382
|
+
// 折れ線:点と累積の長さ
|
|
383
|
+
poly(pts){
|
|
384
|
+
var L = [0];
|
|
385
|
+
for (var i = 1; i < pts.length; i++) L.push(L[i - 1] + Math.hypot(pts[i][0] - pts[i - 1][0], pts[i][1] - pts[i - 1][1]));
|
|
386
|
+
return {pts: pts, L: L, len: L[L.length - 1] || 1};
|
|
387
|
+
}
|
|
388
|
+
// 折れ線の始めから割合 f までの部分:{d, end, ang}
|
|
389
|
+
part(pl, f){
|
|
390
|
+
var want = pl.len * Math.max(0, Math.min(1, f)), pts = pl.pts, out = [pts[0]], i = 1;
|
|
391
|
+
for (; i < pts.length && pl.L[i] <= want; i++) out.push(pts[i]);
|
|
392
|
+
var end = out[out.length - 1];
|
|
393
|
+
if (i < pts.length && want > pl.L[i - 1]){
|
|
394
|
+
var u = (want - pl.L[i - 1]) / (pl.L[i] - pl.L[i - 1]);
|
|
395
|
+
end = [base.lerp(pts[i - 1][0], pts[i][0], u), base.lerp(pts[i - 1][1], pts[i][1], u)];
|
|
396
|
+
out.push(end);
|
|
397
|
+
}
|
|
398
|
+
var pv = out.length > 1 ? out[out.length - 2] : pts[0], nx = i < pts.length ? pts[i] : end;
|
|
399
|
+
var ang = Math.atan2(end[1] - pv[1], end[0] - pv[0]);
|
|
400
|
+
if (out.length < 2) ang = Math.atan2(nx[1] - end[1], nx[0] - end[0]);
|
|
401
|
+
return {d: "M" + out.map(function(p){ return p[0].toFixed(1) + "," + p[1].toFixed(1); }).join("L"), end: end, ang: ang};
|
|
402
|
+
}
|
|
403
|
+
duration(k){
|
|
404
|
+
var self = this, d = 0, pl = this.plan();
|
|
405
|
+
pl.nodes.forEach(function(o){ if (o.step === k) d = Math.max(d, o.at + (o.par ? self.span() : self.props.fade)); });
|
|
406
|
+
(this.edges || []).forEach(function(o){ if (o.step === k) d = Math.max(d, o.at + self.props.draw + (o.lab ? 0.3 : 0)); });
|
|
407
|
+
if (pl.path){
|
|
408
|
+
var P = this.props, ls = pl.path.links, z = ls[ls.length - 1];
|
|
409
|
+
ls.forEach(function(x){ if (x.step === k) d = Math.max(d, x.at + Math.max(P.draw, P.draw * 0.8 + P.fade * 0.6)); });
|
|
410
|
+
if (pl.path.note && z.step === k) d = Math.max(d, z.at + P.draw + 0.4);
|
|
411
|
+
}
|
|
412
|
+
return d;
|
|
413
|
+
}
|
|
414
|
+
render(k, t, ctx){
|
|
415
|
+
var P = this.props, D = base, self = this, vr = this.variant, lect = !!ctx.preview, S = this.span(), FAINT = 0.45;
|
|
416
|
+
if (lect) FAINT = base.previewOpacity(this); // 先の段階の薄さ:テーマの --preview-opacity(ないときは 0.45)
|
|
417
|
+
// 段階 step の要素の、その段階の中の時刻(-1 = まだ、Infinity = 済み)
|
|
418
|
+
var tOf = function(step){ return step < k ? Infinity : step > k ? -1 : t; };
|
|
419
|
+
var pr = function(tt, at, dur){ return tt < 0 ? 0 : D.prog(tt, at, dur); };
|
|
420
|
+
// 箱の動きは 12 px まで(docs/conventions.md §1.2:どの見せ方も fade より遠くへ動かさない)
|
|
421
|
+
var OFF = 12;
|
|
422
|
+
this.plan().nodes.forEach(function(o){
|
|
423
|
+
var tt = tOf(o.step), eb, el, sc = 1, m, sh;
|
|
424
|
+
if (!o.par || vr === "fade"){
|
|
425
|
+
// fade:箱が下から 12 px 上がりながら現れ(0.92 → 1)、それから線を引く
|
|
426
|
+
eb = pr(tt, o.at, P.fade); el = pr(tt, o.at + P.fade * 0.6, P.draw); sc = D.lerp(0.92, 1, eb); sh = [0, OFF * (1 - eb)];
|
|
427
|
+
} else if (vr === "draw"){
|
|
428
|
+
// draw:線を先に引き、その先に箱が親の側から 12 px 寄りながら現れる
|
|
429
|
+
el = pr(tt, o.at, S * 0.5); eb = pr(tt, o.at + S * 0.45, S * 0.55); sc = D.lerp(0.92, 1, eb);
|
|
430
|
+
sh = [-o.dir[0] * OFF * (1 - eb), -o.dir[1] * OFF * (1 - eb)];
|
|
431
|
+
} else {
|
|
432
|
+
// grow:箱が親の側から 12 px 寄りながら 0.92 → 1 に大きくなる。線は同時に親から引く
|
|
433
|
+
m = pr(tt, o.at, P.fade); eb = pr(tt, o.at, P.fade * 0.6); el = pr(tt, o.at, S); sc = D.lerp(0.92, 1, m);
|
|
434
|
+
sh = [-o.dir[0] * OFF * (1 - m), -o.dir[1] * OFF * (1 - m)];
|
|
435
|
+
}
|
|
436
|
+
if (lect){
|
|
437
|
+
// 授業の表示:後の段階は薄く、今の段階は薄い状態から濃くなる(位置は動かさない。どの見せ方でも同じ)
|
|
438
|
+
var f = tt < 0 ? FAINT : FAINT + (1 - FAINT) * eb;
|
|
439
|
+
o.g.setAttribute("opacity", f.toFixed(3)); o.g.setAttribute("transform", "");
|
|
440
|
+
if (o.line){ o.line.setAttribute("d", self.part(o.path, 1).d); o.line.setAttribute("opacity", f.toFixed(3)); }
|
|
441
|
+
if (o.blab) o.blab.setAttribute("opacity", f.toFixed(3));
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
o.g.setAttribute("opacity", eb.toFixed(3));
|
|
445
|
+
o.g.setAttribute("transform", sc >= 1 && Math.abs(sh[0]) < 0.01 && Math.abs(sh[1]) < 0.01 ? "" :
|
|
446
|
+
"translate(" + (o.cx + sh[0]).toFixed(2) + " " + (o.cy + sh[1]).toFixed(2) + ") scale(" + sc.toFixed(4) + ") translate(" + (-o.cx).toFixed(2) + " " + (-o.cy).toFixed(2) + ")");
|
|
447
|
+
if (o.line){ o.line.setAttribute("d", el > 0 ? self.part(o.path, el).d : ""); o.line.setAttribute("opacity", el > 0 ? 1 : 0); }
|
|
448
|
+
if (o.blab) o.blab.setAttribute("opacity", Math.max(0, Math.min(1, el * 2 - 1)).toFixed(3));
|
|
449
|
+
});
|
|
450
|
+
// 強調する道:線を親から引き、届いたら箱の枠と枝の名前を --emph に。授業の表示では後の段階を薄く、全部引いた形で
|
|
451
|
+
if (this.pathEls){
|
|
452
|
+
var pth = this.plan().path, lit = function(tt, v){ return lect ? (tt < 0 ? FAINT : FAINT + (1 - FAINT) * v) : v; };
|
|
453
|
+
this.pathEls.forEach(function(e, i){
|
|
454
|
+
var x = e.x, tt = tOf(x.step), l = pr(tt, x.at, P.draw), f = pr(tt, x.at + P.draw * 0.8, P.fade * 0.6);
|
|
455
|
+
e.line.setAttribute("d", lect || l > 0 ? self.part(x.o.path, lect ? 1 : l).d : "");
|
|
456
|
+
e.line.setAttribute("opacity", lit(tt, l > 0 ? 1 : 0).toFixed(3));
|
|
457
|
+
e.frame.setAttribute("opacity", lit(tt, f).toFixed(3));
|
|
458
|
+
if (x.o.blab) x.o.blab.setAttribute("style", "fill:" + (l >= 1 ? "var(--emph)" : "var(--fg)") + ";");
|
|
459
|
+
if (!i){ var r = pr(tt, x.at, P.fade * 0.6); self.pathRoot.setAttribute("opacity", lit(tt, r).toFixed(3)); }
|
|
460
|
+
});
|
|
461
|
+
if (this.pathNote){ var z = pth.links[pth.links.length - 1], zt = tOf(z.step); this.pathNote.setAttribute("opacity", lit(zt, pr(zt, z.at + P.draw, 0.4)).toFixed(3)); }
|
|
462
|
+
}
|
|
463
|
+
this.edges.forEach(function(o){
|
|
464
|
+
var tt = tOf(o.step), e = pr(tt, o.at, P.draw), lo = pr(tt, o.at + P.draw * 0.8, 0.3);
|
|
465
|
+
if (lect){ var f = tt < 0 ? FAINT : FAINT + (1 - FAINT) * e; e = 1; lo = 1; o.g.setAttribute("opacity", f.toFixed(3)); }
|
|
466
|
+
else o.g.setAttribute("opacity", e > 0 ? 1 : 0);
|
|
467
|
+
var p = self.part(o.path, e);
|
|
468
|
+
o.line.setAttribute("d", e > 0 ? p.d : "");
|
|
469
|
+
// 矢じりは線が 20px 伸びるまでに大きくなる
|
|
470
|
+
var hs = Math.min(1, e * o.path.len / 20);
|
|
471
|
+
o.head.setAttribute("transform", "translate(" + p.end[0].toFixed(2) + " " + p.end[1].toFixed(2) + ") rotate(" + (p.ang * 180 / Math.PI).toFixed(2) + ") scale(" + hs.toFixed(4) + ")");
|
|
472
|
+
if (o.lab) o.lab.setAttribute("opacity", lo.toFixed(3));
|
|
473
|
+
});
|
|
474
|
+
// 形を作り直す(同じ値を書き直すだけで、DOM は変わらない)。Chrome は、変わっていない形を近くの変化のために塗り直す(ラスタライズし直す)と、
|
|
475
|
+
// 2 回目からその形の輪郭(曲線の縁)を別の方法で描き、縁の画素が数十個変わる(ソフトウェアの GPU、CI の Linux・Windows)。
|
|
476
|
+
// 何回塗り直されたかは呼び出しの間にコマが描かれたかで決まるので、作り直さないと同じ (k, t) でも呼び出しの順と時刻で画素が変わる(docs/contract.md §3)
|
|
477
|
+
this.shapes.forEach(function(e){ var a = SHAPE_GEOM[e.localName], v = e.getAttribute(a); if (v !== null) e.setAttribute(a, v); });
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
return Part;
|
|
481
|
+
});
|