jekyll-theme-hydejack 9.0.0 → 9.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NOTICE.md +8 -9
- data/README.md +15 -16
- data/_config.yml +5 -4
- data/_includes/body/breadcrumbs.html +19 -0
- data/_includes/body/footer.html +1 -1
- data/_includes/body/index.html +3 -2
- data/_includes/body/main.html +1 -0
- data/_includes/body/nav.html +2 -2
- data/_includes/body/scripts.html +2 -2
- data/_includes/body/sidebar.html +1 -1
- data/_includes/components/dingbat.html +12 -0
- data/_includes/components/hy-img.html +1 -1
- data/_includes/components/post.html +30 -10
- data/_includes/head/links-static.html +4 -3
- data/_includes/head/meta-static.html +2 -3
- data/_includes/head/scripts.html +7 -2
- data/_includes/head/styles-inline.html +1 -1
- data/_includes/head/styles-no-inline.html +1 -1
- data/_includes/header.txt +1 -1
- data/_includes/scripts.html +33 -0
- data/_includes/scripts/load-js.min.js +1 -1
- data/_includes/scripts/nomodule.min.js +1 -1
- data/_includes/smart-url +10 -1
- data/_includes/styles/common.scss +2 -2
- data/_includes/styles/page-style.scss +3 -2
- data/_includes/styles/variables.scss +10 -6
- data/_includes/templates/animation.html +1 -0
- data/_includes/templates/index.html +20 -2
- data/_layouts/about.html +4 -1
- data/_layouts/base.html +3 -7
- data/_layouts/compress.html +1 -1
- data/_layouts/list.html +1 -1
- data/_layouts/page.html +4 -2
- data/_layouts/plain.html +29 -0
- data/_layouts/post.html +1 -1
- data/_sass/_mixins.scss +8 -2
- data/_sass/hydejack/__inline__/_base.scss +23 -4
- data/_sass/hydejack/__inline__/_content.scss +8 -5
- data/_sass/hydejack/__inline__/_sidebar.scss +18 -4
- data/_sass/hydejack/__inline__/_toc.scss +11 -11
- data/_sass/hydejack/__inline__/_utilities.scss +25 -0
- data/_sass/hydejack/__link__/_base.scss +9 -2
- data/_sass/hydejack/__link__/_break-layout.scss +8 -1
- data/_sass/hydejack/__link__/_content.scss +10 -4
- data/_sass/hydejack/__link__/_images.scss +1 -1
- data/_sass/hydejack/__link__/_sidebar.scss +15 -5
- data/_sass/hydejack/__link__/_toc.scss +4 -2
- data/_sass/hydejack/__link__/_utilities.scss +25 -0
- data/_sass/hydejack/_base.pre.scss +38 -8
- data/_sass/hydejack/_break-layout.pre.scss +8 -1
- data/_sass/hydejack/_content.pre.scss +12 -12
- data/_sass/hydejack/_images.pre.scss +1 -1
- data/_sass/hydejack/_sidebar.pre.scss +29 -5
- data/_sass/hydejack/_toc.pre.scss +14 -14
- data/_sass/hydejack/_utilities.pre.scss +25 -0
- data/_sass/pooleparty/__inline__/_base.scss +2 -0
- data/_sass/pooleparty/__inline__/_code.scss +1 -1
- data/_sass/pooleparty/__inline__/_message.scss +2 -2
- data/_sass/pooleparty/__inline__/_posts.scss +16 -3
- data/_sass/pooleparty/__inline__/_type.scss +2 -2
- data/_sass/pooleparty/__link__/_code.scss +138 -27
- data/_sass/pooleparty/__link__/_posts.scss +12 -0
- data/_sass/pooleparty/__link__/_read-more.scss +1 -0
- data/_sass/pooleparty/__link__/_table.scss +30 -36
- data/_sass/pooleparty/__link__/_type.scss +2 -2
- data/_sass/pooleparty/_base.pre.scss +2 -0
- data/_sass/pooleparty/_code.pre.scss +138 -27
- data/_sass/pooleparty/_message.pre.scss +2 -2
- data/_sass/pooleparty/_posts.pre.scss +28 -3
- data/_sass/pooleparty/_read-more.pre.scss +1 -0
- data/_sass/pooleparty/_table.pre.scss +30 -36
- data/_sass/pooleparty/_type.pre.scss +4 -4
- data/assets/bower.json +2 -1
- data/assets/bower_components/MathJax/.bower.json +5 -5
- data/assets/bower_components/MathJax/es5/a11y/assistive-mml.js +1 -1
- data/assets/bower_components/MathJax/es5/a11y/complexity.js +1 -1
- data/assets/bower_components/MathJax/es5/a11y/explorer.js +1 -1
- data/assets/bower_components/MathJax/es5/a11y/semantic-enrich.js +1 -1
- data/assets/bower_components/MathJax/es5/adaptors/liteDOM.js +1 -1
- data/assets/bower_components/MathJax/es5/core.js +1 -1
- data/assets/bower_components/MathJax/es5/input/asciimath.js +1 -1
- data/assets/bower_components/MathJax/es5/input/mml.js +1 -1
- data/assets/bower_components/MathJax/es5/input/mml/entities.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex-base.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex-full.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/action.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/all-packages.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/ams.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/amscd.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/autoload.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/bbox.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/boldsymbol.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/braket.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/bussproofs.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/cancel.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/color.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/colorV2.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/configMacros.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/enclose.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/extpfeil.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/html.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/mhchem.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/newcommand.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/noerrors.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/noundefined.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/physics.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/require.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/tagFormat.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/textmacros.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/unicode.js +1 -1
- data/assets/bower_components/MathJax/es5/input/tex/extensions/verb.js +1 -1
- data/assets/bower_components/MathJax/es5/latest.js +1 -1
- data/assets/bower_components/MathJax/es5/loader.js +1 -1
- data/assets/bower_components/MathJax/es5/mml-chtml.js +1 -1
- data/assets/bower_components/MathJax/es5/mml-svg.js +1 -1
- data/assets/bower_components/MathJax/es5/node-main.js +1 -1
- data/assets/bower_components/MathJax/es5/output/chtml.js +1 -1
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/tex.js +1 -1
- data/assets/bower_components/MathJax/es5/output/svg.js +1 -1
- data/assets/bower_components/MathJax/es5/output/svg/fonts/tex.js +1 -1
- data/assets/bower_components/MathJax/es5/sre/mathmaps/de.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/en.js +11 -5
- data/assets/bower_components/MathJax/es5/sre/mathmaps/es.js +1 -1
- data/assets/bower_components/MathJax/es5/sre/mathmaps/mathmaps_ie.js +117 -9
- data/assets/bower_components/MathJax/es5/sre/mathmaps/nemeth.js +3 -3
- data/assets/bower_components/MathJax/es5/sre/sre-node.js +11 -0
- data/assets/bower_components/MathJax/es5/sre/sre_browser.js +1110 -1186
- data/assets/bower_components/MathJax/es5/startup.js +1 -1
- data/assets/bower_components/MathJax/es5/tex-chtml-full.js +1 -1
- data/assets/bower_components/MathJax/es5/tex-chtml.js +1 -1
- data/assets/bower_components/MathJax/es5/tex-mml-chtml.js +1 -1
- data/assets/bower_components/MathJax/es5/tex-mml-svg.js +1 -1
- data/assets/bower_components/MathJax/es5/tex-svg-full.js +1 -1
- data/assets/bower_components/MathJax/es5/tex-svg.js +1 -1
- data/assets/bower_components/MathJax/es5/ui/menu.js +1 -1
- data/assets/bower_components/MathJax/es5/ui/safe.js +1 -0
- data/assets/bower_components/MathJax/package.json +3 -3
- data/assets/bower_components/katex/.bower.json +5 -5
- data/assets/bower_components/katex/LICENSE +1 -1
- data/assets/bower_components/katex/dist/contrib/auto-render.js +14 -3
- data/assets/bower_components/katex/dist/contrib/auto-render.min.js +1 -1
- data/assets/bower_components/katex/dist/contrib/auto-render.mjs +14 -3
- data/assets/bower_components/katex/dist/contrib/mhchem.min.js +1 -1
- data/assets/bower_components/katex/dist/contrib/render-a11y-string.js +870 -0
- data/assets/bower_components/katex/dist/contrib/render-a11y-string.min.js +1 -0
- data/assets/bower_components/katex/dist/contrib/render-a11y-string.mjs +753 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- data/assets/bower_components/katex/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/assets/bower_components/katex/dist/katex.css +25 -11
- data/assets/bower_components/katex/dist/katex.js +2437 -1938
- data/assets/bower_components/katex/dist/katex.min.css +1 -1
- data/assets/bower_components/katex/dist/katex.min.js +1 -1
- data/assets/bower_components/katex/dist/katex.mjs +2449 -1880
- data/assets/bower_components/katex/docs/cli.md.template +21 -0
- data/assets/bower_components/katex/flow-typed/npm/jest_v24.x.x.js +1201 -0
- data/assets/bower_components/katex/yarn.lock +389 -276
- data/assets/css/{hydejack-9.0.0.css → hydejack-9.1.0.css} +0 -0
- data/assets/icomoon/fonts/icomoon.eot +0 -0
- data/assets/icomoon/fonts/icomoon.svg +6 -3
- data/assets/icomoon/fonts/icomoon.ttf +0 -0
- data/assets/icomoon/fonts/icomoon.woff +0 -0
- data/assets/icomoon/selection.json +1 -1
- data/assets/icomoon/style.css +17 -8
- data/assets/icons/favicon.ico +0 -0
- data/assets/icons/icon-128x128.png +0 -0
- data/assets/icons/icon-144x144.png +0 -0
- data/assets/icons/icon-152x152.png +0 -0
- data/assets/icons/icon-192x192.png +0 -0
- data/assets/icons/icon-384x384.png +0 -0
- data/assets/icons/icon-512x512.png +0 -0
- data/assets/icons/icon-72x72.png +0 -0
- data/assets/icons/icon-96x96.png +0 -0
- data/assets/img/logo.png +0 -0
- data/assets/img/sidebar-bg.jpg +0 -0
- data/assets/img/swipe.svg +1 -22
- data/assets/js/LEGACY-clap-button-hydejack-9.1.0.js +14 -0
- data/assets/js/LEGACY-drawer-hydejack-9.1.0.js +14 -0
- data/assets/js/{LEGACY-fetch-hydejack-9.0.0.js → LEGACY-fetch-hydejack-9.1.0.js} +2 -2
- data/assets/js/LEGACY-hydejack-9.1.0.js +27 -0
- data/assets/js/LEGACY-navbar-hydejack-9.1.0.js +14 -0
- data/assets/js/LEGACY-push-state-hydejack-9.1.0.js +14 -0
- data/assets/js/{resize-observer-hydejack-9.0.0.js → LEGACY-resize-observer-hydejack-9.1.0.js} +2 -2
- data/assets/js/{LEGACY-shadydom-hydejack-9.0.0.js → LEGACY-shadydom-hydejack-9.1.0.js} +2 -2
- data/assets/js/LEGACY-vendors~clap-button-hydejack-9.1.0.js +182 -0
- data/assets/js/LEGACY-vendors~drawer-hydejack-9.1.0.js +48 -0
- data/assets/js/LEGACY-vendors~drawer~push-state-hydejack-9.1.0.js +214 -0
- data/assets/js/LEGACY-vendors~fetch-hydejack-9.1.0.js +14 -0
- data/assets/js/LEGACY-vendors~intersection-observer-hydejack-9.1.0.js +14 -0
- data/assets/js/LEGACY-vendors~push-state-hydejack-9.1.0.js +34 -0
- data/assets/js/LEGACY-vendors~shadydom-hydejack-9.1.0.js +155 -0
- data/assets/js/{LEGACY-vendors~webanimations-hydejack-9.0.0.js → LEGACY-vendors~webanimations-hydejack-9.1.0.js} +2 -2
- data/assets/js/{LEGACY-vendors~webcomponents-hydejack-9.0.0.js → LEGACY-vendors~webcomponents-hydejack-9.1.0.js} +4 -4
- data/assets/js/{LEGACY-webcomponents-hydejack-9.0.0.js → LEGACY-webcomponents-hydejack-9.1.0.js} +2 -2
- data/assets/js/clap-button-hydejack-9.1.0.js +14 -0
- data/assets/js/drawer-hydejack-9.1.0.js +14 -0
- data/assets/js/{shadydom-hydejack-9.0.0.js → fetch-hydejack-9.1.0.js} +2 -2
- data/assets/js/hydejack-9.1.0.js +28 -0
- data/assets/js/navbar-hydejack-9.1.0.js +14 -0
- data/assets/js/push-state-hydejack-9.1.0.js +14 -0
- data/assets/js/{LEGACY-resize-observer-hydejack-9.0.0.js → resize-observer-hydejack-9.1.0.js} +2 -2
- data/assets/js/shadydom-hydejack-9.1.0.js +14 -0
- data/assets/js/vendors~clap-button-hydejack-9.1.0.js +222 -0
- data/assets/js/vendors~drawer-hydejack-9.1.0.js +48 -0
- data/assets/js/vendors~drawer~push-state-hydejack-9.1.0.js +163 -0
- data/assets/js/vendors~fetch-hydejack-9.1.0.js +14 -0
- data/assets/js/vendors~intersection-observer-hydejack-9.1.0.js +14 -0
- data/assets/js/vendors~push-state-hydejack-9.1.0.js +34 -0
- data/assets/js/vendors~shadydom-hydejack-9.1.0.js +146 -0
- data/assets/js/{vendors~webanimations-hydejack-9.0.0.js → vendors~webanimations-hydejack-9.1.0.js} +2 -2
- data/assets/js/{webcomponents-hydejack-9.0.0.js → webcomponents-hydejack-9.1.0.js} +2 -2
- data/assets/site.webmanifest +65 -0
- data/assets/version.json +2 -2
- metadata +78 -53
- data/CHANGELOG.md +0 -1208
- data/_includes/templates/back.html +0 -6
- data/_includes/templates/forward.html +0 -6
- data/assets/icons/icon.png +0 -0
- data/assets/icons/icon@0,25x.png +0 -0
- data/assets/icons/icon@0,5x.png +0 -0
- data/assets/icons/icon@0,75x.png +0 -0
- data/assets/icons/icon@2x.png +0 -0
- data/assets/icons/icon@3x.png +0 -0
- data/assets/icons/tile-large.png +0 -0
- data/assets/icons/tile-medium.png +0 -0
- data/assets/icons/tile-small.png +0 -0
- data/assets/icons/tile-wide.png +0 -0
- data/assets/ieconfig.xml +0 -15
- data/assets/js/LEGACY-drawer-hydejack-9.0.0.js +0 -14
- data/assets/js/LEGACY-hydejack-9.0.0.js +0 -28
- data/assets/js/LEGACY-navbar-hydejack-9.0.0.js +0 -14
- data/assets/js/LEGACY-push-state-hydejack-9.0.0.js +0 -14
- data/assets/js/LEGACY-vendors~drawer-hydejack-9.0.0.js +0 -47
- data/assets/js/LEGACY-vendors~drawer~push-state-hydejack-9.0.0.js +0 -215
- data/assets/js/LEGACY-vendors~fetch-hydejack-9.0.0.js +0 -14
- data/assets/js/LEGACY-vendors~intersection-observer-hydejack-9.0.0.js +0 -14
- data/assets/js/LEGACY-vendors~push-state-hydejack-9.0.0.js +0 -33
- data/assets/js/LEGACY-vendors~shadydom-hydejack-9.0.0.js +0 -155
- data/assets/js/drawer-hydejack-9.0.0.js +0 -14
- data/assets/js/fetch-hydejack-9.0.0.js +0 -14
- data/assets/js/hydejack-9.0.0.js +0 -28
- data/assets/js/navbar-hydejack-9.0.0.js +0 -14
- data/assets/js/push-state-hydejack-9.0.0.js +0 -14
- data/assets/js/vendors~drawer-hydejack-9.0.0.js +0 -47
- data/assets/js/vendors~drawer~push-state-hydejack-9.0.0.js +0 -163
- data/assets/js/vendors~intersection-observer-hydejack-9.0.0.js +0 -14
- data/assets/js/vendors~push-state-hydejack-9.0.0.js +0 -33
- data/assets/js/vendors~shadydom-hydejack-9.0.0.js +0 -146
- data/assets/manifest.json +0 -46
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],r);else{var t="object"==typeof exports?r(require("katex")):r(e.katex);for(var a in t)("object"==typeof exports?exports:e)[a]=t[a]}}("undefined"!=typeof self?self:this,function(e){return function(e){var r={};function t(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:a})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(a,o,function(r){return e[r]}.bind(null,o));return a},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=1)}([function(r,t){r.exports=e},function(e,r,t){"use strict";t.r(r);var a=t(0),o=t.n(a),n={"(":"left parenthesis",")":"right parenthesis","[":"open bracket","]":"close bracket","\\{":"left brace","\\}":"right brace","\\lvert":"open vertical bar","\\rvert":"close vertical bar","|":"vertical bar","\\uparrow":"up arrow","\\Uparrow":"up arrow","\\downarrow":"down arrow","\\Downarrow":"down arrow","\\updownarrow":"up down arrow","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow","\\langle":"open angle","\\rangle":"close angle","\\lfloor":"open floor","\\rfloor":"close floor","\\int":"integral","\\intop":"integral","\\lim":"limit","\\ln":"natural log","\\log":"log","\\sin":"sine","\\cos":"cosine","\\tan":"tangent","\\cot":"cotangent","\\sum":"sum","/":"slash",",":"comma",".":"point","-":"negative","+":"plus","~":"tilde",":":"colon","?":"question mark","'":"apostrophe","\\%":"percent"," ":"space","\\ ":"space","\\$":"dollar sign","\\angle":"angle","\\degree":"degree","\\circ":"circle","\\vec":"vector","\\triangle":"triangle","\\pi":"pi","\\prime":"prime","\\infty":"infinity","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\omega":"omega","\\theta":"theta","\\sigma":"sigma","\\lambda":"lambda","\\tau":"tau","\\Delta":"delta","\\delta":"delta","\\mu":"mu","\\rho":"rho","\\nabla":"del","\\ell":"ell","\\ldots":"dots","\\hat":"hat","\\acute":"acute"},s={prime:"prime",degree:"degrees",circle:"degrees",2:"squared",3:"cubed"},i={"|":"open vertical bar",".":""},l={"|":"close vertical bar",".":""},c={"+":"plus","-":"minus","\\pm":"plus minus","\\cdot":"dot","*":"times","/":"divided by","\\times":"times","\\div":"divided by","\\circ":"circle","\\bullet":"bullet"},u={"=":"equals","\\approx":"approximately equals","\u2260":"does not equal","\\geq":"is greater than or equal to","\\ge":"is greater than or equal to","\\leq":"is less than or equal to","\\le":"is less than or equal to",">":"is greater than","<":"is less than","\\leftarrow":"left arrow","\\Leftarrow":"left arrow","\\rightarrow":"right arrow","\\Rightarrow":"right arrow",":":"colon"},p={"\\underleftarrow":"left arrow","\\underrightarrow":"right arrow","\\underleftrightarrow":"left-right arrow","\\undergroup":"group","\\underlinesegment":"line segment","\\utilde":"tilde"},d=function(e,r,t){var a;e&&(/^\d+$/.test(a="open"===r?e in i?i[e]:n[e]||e:"close"===r?e in l?l[e]:n[e]||e:"bin"===r?c[e]||e:"rel"===r?u[e]||e:n[e]||e)&&t.length>0&&/^\d+$/.test(t[t.length-1])?t[t.length-1]+=a:a&&t.push(a))},b=function(e,r){var t=[];e.push(t),r(t)},h=function(e,r,t){switch(e.type){case"accent":b(r,function(r){f(e.base,r,t),r.push("with"),d(e.label,"normal",r),r.push("on top")});break;case"accentUnder":b(r,function(r){f(e.base,r,t),r.push("with"),d(p[e.label],"normal",r),r.push("underneath")});break;case"accent-token":break;case"atom":var a=e.text;switch(e.family){case"bin":d(a,"bin",r);break;case"close":d(a,"close",r);break;case"inner":d(e.text,"inner",r);break;case"open":d(a,"open",r);break;case"punct":d(a,"punct",r);break;case"rel":d(a,"rel",r);break;default:throw e.family,new Error('"'+e.family+'" is not a valid atom type')}break;case"color":var o=e.color.replace(/katex-/,"");b(r,function(r){r.push("start color "+o),f(e.body,r,t),r.push("end color "+o)});break;case"color-token":break;case"delimsizing":e.delim&&"."!==e.delim&&d(e.delim,"normal",r);break;case"genfrac":b(r,function(r){var a=e.leftDelim,o=e.rightDelim;e.hasBarLine?(r.push("start fraction"),a&&d(a,"open",r),f(e.numer,r,t),r.push("divided by"),f(e.denom,r,t),o&&d(o,"close",r),r.push("end fraction")):(r.push("start binomial"),a&&d(a,"open",r),f(e.numer,r,t),r.push("over"),f(e.denom,r,t),o&&d(o,"close",r),r.push("end binomial"))});break;case"kern":break;case"leftright":b(r,function(r){d(e.left,"open",r),f(e.body,r,t),d(e.right,"close",r)});break;case"leftright-right":break;case"lap":f(e.body,r,t);break;case"mathord":d(e.text,"normal",r);break;case"op":var n=e.body,i=e.name;n?f(n,r,t):i&&d(i,"normal",r);break;case"op-token":d(e.text,t,r);break;case"ordgroup":f(e.body,r,t);break;case"overline":b(r,function(r){r.push("start overline"),f(e.body,r,t),r.push("end overline")});break;case"phantom":r.push("empty space");break;case"raisebox":f(e.body,r,t);break;case"rule":r.push("rectangle");break;case"sizing":f(e.body,r,t);break;case"spacing":r.push("space");break;case"styling":f(e.body,r,t);break;case"sqrt":b(r,function(r){var a=e.body,o=e.index;if(o)return"3"===m(f(o,[],t)).join(",")?(r.push("cube root of"),f(a,r,t),void r.push("end cube root")):(r.push("root"),r.push("start index"),f(o,r,t),void r.push("end index"));r.push("square root of"),f(a,r,t),r.push("end square root")});break;case"supsub":var l=e.base,c=e.sub,u=e.sup,h=!1;if(l&&(f(l,r,t),h="op"===l.type&&"\\log"===l.name),c){var y=h?"base":"subscript";b(r,function(e){e.push("start "+y),f(c,e,t),e.push("end "+y)})}u&&b(r,function(e){var r=m(f(u,[],t)).join(",");r in s?e.push(s[r]):(e.push("start superscript"),f(u,e,t),e.push("end superscript"))});break;case"text":if("\\textbf"===e.font){b(r,function(r){r.push("start bold text"),f(e.body,r,t),r.push("end bold text")});break}b(r,function(r){r.push("start text"),f(e.body,r,t),r.push("end text")});break;case"textord":d(e.text,t,r);break;case"smash":f(e.body,r,t);break;case"enclose":if(/cancel/.test(e.label)){b(r,function(r){r.push("start cancel"),f(e.body,r,t),r.push("end cancel")});break}if(/box/.test(e.label)){b(r,function(r){r.push("start box"),f(e.body,r,t),r.push("end box")});break}if(/sout/.test(e.label)){b(r,function(r){r.push("start strikeout"),f(e.body,r,t),r.push("end strikeout")});break}throw new Error("KaTeX-a11y: enclose node with "+e.label+" not supported yet");case"vphantom":throw new Error("KaTeX-a11y: vphantom not implemented yet");case"hphantom":throw new Error("KaTeX-a11y: hphantom not implemented yet");case"operatorname":f(e.body,r,t);break;case"array":throw new Error("KaTeX-a11y: array not implemented yet");case"raw":throw new Error("KaTeX-a11y: raw not implemented yet");case"size":break;case"url":throw new Error("KaTeX-a11y: url not implemented yet");case"tag":throw new Error("KaTeX-a11y: tag not implemented yet");case"verb":d("start verbatim","normal",r),d(e.body,"normal",r),d("end verbatim","normal",r);break;case"environment":throw new Error("KaTeX-a11y: environment not implemented yet");case"horizBrace":d("start "+e.label.slice(1),"normal",r),f(e.base,r,t),d("end "+e.label.slice(1),"normal",r);break;case"infix":break;case"includegraphics":throw new Error("KaTeX-a11y: includegraphics not implemented yet");case"font":f(e.body,r,t);break;case"href":throw new Error("KaTeX-a11y: href not implemented yet");case"cr":throw new Error("KaTeX-a11y: cr not implemented yet");case"underline":b(r,function(r){r.push("start underline"),f(e.body,r,t),r.push("end underline")});break;case"xArrow":throw new Error("KaTeX-a11y: xArrow not implemented yet");case"mclass":var g=e.mclass.slice(1);f(e.body,r,g);break;case"mathchoice":f(e.text,r,t);break;case"htmlmathml":f(e.mathml,r,t);break;case"middle":d(e.delim,t,r);break;case"internal":break;case"html":f(e.body,r,t);break;default:throw e.type,new Error("KaTeX a11y un-recognized type: "+e.type)}},f=function e(r,t,a){if(void 0===t&&(t=[]),r instanceof Array)for(var o=0;o<r.length;o++)e(r[o],t,a);else h(r,t,a);return t},m=function e(r){var t=[];return r.forEach(function(r){r instanceof Array?t=t.concat(e(r)):t.push(r)}),t};r.default=function(e,r){var t=o.a.__parse(e,r),a=f(t,[],"normal");return m(a).join(", ")}}]).default});
|
@@ -0,0 +1,753 @@
|
|
1
|
+
import katex from '../katex.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* renderA11yString returns a readable string.
|
5
|
+
*
|
6
|
+
* In some cases the string will have the proper semantic math
|
7
|
+
* meaning,:
|
8
|
+
* renderA11yString("\\frac{1}{2}"")
|
9
|
+
* -> "start fraction, 1, divided by, 2, end fraction"
|
10
|
+
*
|
11
|
+
* However, other cases do not:
|
12
|
+
* renderA11yString("f(x) = x^2")
|
13
|
+
* -> "f, left parenthesis, x, right parenthesis, equals, x, squared"
|
14
|
+
*
|
15
|
+
* The commas in the string aim to increase ease of understanding
|
16
|
+
* when read by a screenreader.
|
17
|
+
*/
|
18
|
+
const stringMap = {
|
19
|
+
"(": "left parenthesis",
|
20
|
+
")": "right parenthesis",
|
21
|
+
"[": "open bracket",
|
22
|
+
"]": "close bracket",
|
23
|
+
"\\{": "left brace",
|
24
|
+
"\\}": "right brace",
|
25
|
+
"\\lvert": "open vertical bar",
|
26
|
+
"\\rvert": "close vertical bar",
|
27
|
+
"|": "vertical bar",
|
28
|
+
"\\uparrow": "up arrow",
|
29
|
+
"\\Uparrow": "up arrow",
|
30
|
+
"\\downarrow": "down arrow",
|
31
|
+
"\\Downarrow": "down arrow",
|
32
|
+
"\\updownarrow": "up down arrow",
|
33
|
+
"\\leftarrow": "left arrow",
|
34
|
+
"\\Leftarrow": "left arrow",
|
35
|
+
"\\rightarrow": "right arrow",
|
36
|
+
"\\Rightarrow": "right arrow",
|
37
|
+
"\\langle": "open angle",
|
38
|
+
"\\rangle": "close angle",
|
39
|
+
"\\lfloor": "open floor",
|
40
|
+
"\\rfloor": "close floor",
|
41
|
+
"\\int": "integral",
|
42
|
+
"\\intop": "integral",
|
43
|
+
"\\lim": "limit",
|
44
|
+
"\\ln": "natural log",
|
45
|
+
"\\log": "log",
|
46
|
+
"\\sin": "sine",
|
47
|
+
"\\cos": "cosine",
|
48
|
+
"\\tan": "tangent",
|
49
|
+
"\\cot": "cotangent",
|
50
|
+
"\\sum": "sum",
|
51
|
+
"/": "slash",
|
52
|
+
",": "comma",
|
53
|
+
".": "point",
|
54
|
+
"-": "negative",
|
55
|
+
"+": "plus",
|
56
|
+
"~": "tilde",
|
57
|
+
":": "colon",
|
58
|
+
"?": "question mark",
|
59
|
+
"'": "apostrophe",
|
60
|
+
"\\%": "percent",
|
61
|
+
" ": "space",
|
62
|
+
"\\ ": "space",
|
63
|
+
"\\$": "dollar sign",
|
64
|
+
"\\angle": "angle",
|
65
|
+
"\\degree": "degree",
|
66
|
+
"\\circ": "circle",
|
67
|
+
"\\vec": "vector",
|
68
|
+
"\\triangle": "triangle",
|
69
|
+
"\\pi": "pi",
|
70
|
+
"\\prime": "prime",
|
71
|
+
"\\infty": "infinity",
|
72
|
+
"\\alpha": "alpha",
|
73
|
+
"\\beta": "beta",
|
74
|
+
"\\gamma": "gamma",
|
75
|
+
"\\omega": "omega",
|
76
|
+
"\\theta": "theta",
|
77
|
+
"\\sigma": "sigma",
|
78
|
+
"\\lambda": "lambda",
|
79
|
+
"\\tau": "tau",
|
80
|
+
"\\Delta": "delta",
|
81
|
+
"\\delta": "delta",
|
82
|
+
"\\mu": "mu",
|
83
|
+
"\\rho": "rho",
|
84
|
+
"\\nabla": "del",
|
85
|
+
"\\ell": "ell",
|
86
|
+
"\\ldots": "dots",
|
87
|
+
// TODO: add entries for all accents
|
88
|
+
"\\hat": "hat",
|
89
|
+
"\\acute": "acute"
|
90
|
+
};
|
91
|
+
const powerMap = {
|
92
|
+
"prime": "prime",
|
93
|
+
"degree": "degrees",
|
94
|
+
"circle": "degrees",
|
95
|
+
"2": "squared",
|
96
|
+
"3": "cubed"
|
97
|
+
};
|
98
|
+
const openMap = {
|
99
|
+
"|": "open vertical bar",
|
100
|
+
".": ""
|
101
|
+
};
|
102
|
+
const closeMap = {
|
103
|
+
"|": "close vertical bar",
|
104
|
+
".": ""
|
105
|
+
};
|
106
|
+
const binMap = {
|
107
|
+
"+": "plus",
|
108
|
+
"-": "minus",
|
109
|
+
"\\pm": "plus minus",
|
110
|
+
"\\cdot": "dot",
|
111
|
+
"*": "times",
|
112
|
+
"/": "divided by",
|
113
|
+
"\\times": "times",
|
114
|
+
"\\div": "divided by",
|
115
|
+
"\\circ": "circle",
|
116
|
+
"\\bullet": "bullet"
|
117
|
+
};
|
118
|
+
const relMap = {
|
119
|
+
"=": "equals",
|
120
|
+
"\\approx": "approximately equals",
|
121
|
+
"≠": "does not equal",
|
122
|
+
"\\geq": "is greater than or equal to",
|
123
|
+
"\\ge": "is greater than or equal to",
|
124
|
+
"\\leq": "is less than or equal to",
|
125
|
+
"\\le": "is less than or equal to",
|
126
|
+
">": "is greater than",
|
127
|
+
"<": "is less than",
|
128
|
+
"\\leftarrow": "left arrow",
|
129
|
+
"\\Leftarrow": "left arrow",
|
130
|
+
"\\rightarrow": "right arrow",
|
131
|
+
"\\Rightarrow": "right arrow",
|
132
|
+
":": "colon"
|
133
|
+
};
|
134
|
+
const accentUnderMap = {
|
135
|
+
"\\underleftarrow": "left arrow",
|
136
|
+
"\\underrightarrow": "right arrow",
|
137
|
+
"\\underleftrightarrow": "left-right arrow",
|
138
|
+
"\\undergroup": "group",
|
139
|
+
"\\underlinesegment": "line segment",
|
140
|
+
"\\utilde": "tilde"
|
141
|
+
};
|
142
|
+
|
143
|
+
const buildString = (str, type, a11yStrings) => {
|
144
|
+
if (!str) {
|
145
|
+
return;
|
146
|
+
}
|
147
|
+
|
148
|
+
let ret;
|
149
|
+
|
150
|
+
if (type === "open") {
|
151
|
+
ret = str in openMap ? openMap[str] : stringMap[str] || str;
|
152
|
+
} else if (type === "close") {
|
153
|
+
ret = str in closeMap ? closeMap[str] : stringMap[str] || str;
|
154
|
+
} else if (type === "bin") {
|
155
|
+
ret = binMap[str] || str;
|
156
|
+
} else if (type === "rel") {
|
157
|
+
ret = relMap[str] || str;
|
158
|
+
} else {
|
159
|
+
ret = stringMap[str] || str;
|
160
|
+
} // If the text to add is a number and there is already a string
|
161
|
+
// in the list and the last string is a number then we should
|
162
|
+
// combine them into a single number
|
163
|
+
|
164
|
+
|
165
|
+
if (/^\d+$/.test(ret) && a11yStrings.length > 0 && // TODO(kevinb): check that the last item in a11yStrings is a string
|
166
|
+
// I think we might be able to drop the nested arrays, which would make
|
167
|
+
// this easier to type - $FlowFixMe
|
168
|
+
/^\d+$/.test(a11yStrings[a11yStrings.length - 1])) {
|
169
|
+
a11yStrings[a11yStrings.length - 1] += ret;
|
170
|
+
} else if (ret) {
|
171
|
+
a11yStrings.push(ret);
|
172
|
+
}
|
173
|
+
};
|
174
|
+
|
175
|
+
const buildRegion = (a11yStrings, callback) => {
|
176
|
+
const regionStrings = [];
|
177
|
+
a11yStrings.push(regionStrings);
|
178
|
+
callback(regionStrings);
|
179
|
+
};
|
180
|
+
|
181
|
+
const handleObject = (tree, a11yStrings, atomType) => {
|
182
|
+
// Everything else is assumed to be an object...
|
183
|
+
switch (tree.type) {
|
184
|
+
case "accent":
|
185
|
+
{
|
186
|
+
buildRegion(a11yStrings, a11yStrings => {
|
187
|
+
buildA11yStrings(tree.base, a11yStrings, atomType);
|
188
|
+
a11yStrings.push("with");
|
189
|
+
buildString(tree.label, "normal", a11yStrings);
|
190
|
+
a11yStrings.push("on top");
|
191
|
+
});
|
192
|
+
break;
|
193
|
+
}
|
194
|
+
|
195
|
+
case "accentUnder":
|
196
|
+
{
|
197
|
+
buildRegion(a11yStrings, a11yStrings => {
|
198
|
+
buildA11yStrings(tree.base, a11yStrings, atomType);
|
199
|
+
a11yStrings.push("with");
|
200
|
+
buildString(accentUnderMap[tree.label], "normal", a11yStrings);
|
201
|
+
a11yStrings.push("underneath");
|
202
|
+
});
|
203
|
+
break;
|
204
|
+
}
|
205
|
+
|
206
|
+
case "accent-token":
|
207
|
+
{
|
208
|
+
// Used internally by accent symbols.
|
209
|
+
break;
|
210
|
+
}
|
211
|
+
|
212
|
+
case "atom":
|
213
|
+
{
|
214
|
+
const text = tree.text;
|
215
|
+
|
216
|
+
switch (tree.family) {
|
217
|
+
case "bin":
|
218
|
+
{
|
219
|
+
buildString(text, "bin", a11yStrings);
|
220
|
+
break;
|
221
|
+
}
|
222
|
+
|
223
|
+
case "close":
|
224
|
+
{
|
225
|
+
buildString(text, "close", a11yStrings);
|
226
|
+
break;
|
227
|
+
}
|
228
|
+
// TODO(kevinb): figure out what should be done for inner
|
229
|
+
|
230
|
+
case "inner":
|
231
|
+
{
|
232
|
+
buildString(tree.text, "inner", a11yStrings);
|
233
|
+
break;
|
234
|
+
}
|
235
|
+
|
236
|
+
case "open":
|
237
|
+
{
|
238
|
+
buildString(text, "open", a11yStrings);
|
239
|
+
break;
|
240
|
+
}
|
241
|
+
|
242
|
+
case "punct":
|
243
|
+
{
|
244
|
+
buildString(text, "punct", a11yStrings);
|
245
|
+
break;
|
246
|
+
}
|
247
|
+
|
248
|
+
case "rel":
|
249
|
+
{
|
250
|
+
buildString(text, "rel", a11yStrings);
|
251
|
+
break;
|
252
|
+
}
|
253
|
+
|
254
|
+
default:
|
255
|
+
{
|
256
|
+
tree.family;
|
257
|
+
throw new Error(`"${tree.family}" is not a valid atom type`);
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
break;
|
262
|
+
}
|
263
|
+
|
264
|
+
case "color":
|
265
|
+
{
|
266
|
+
const color = tree.color.replace(/katex-/, "");
|
267
|
+
buildRegion(a11yStrings, regionStrings => {
|
268
|
+
regionStrings.push("start color " + color);
|
269
|
+
buildA11yStrings(tree.body, regionStrings, atomType);
|
270
|
+
regionStrings.push("end color " + color);
|
271
|
+
});
|
272
|
+
break;
|
273
|
+
}
|
274
|
+
|
275
|
+
case "color-token":
|
276
|
+
{
|
277
|
+
// Used by \color, \colorbox, and \fcolorbox but not directly rendered.
|
278
|
+
// It's a leaf node and has no children so just break.
|
279
|
+
break;
|
280
|
+
}
|
281
|
+
|
282
|
+
case "delimsizing":
|
283
|
+
{
|
284
|
+
if (tree.delim && tree.delim !== ".") {
|
285
|
+
buildString(tree.delim, "normal", a11yStrings);
|
286
|
+
}
|
287
|
+
|
288
|
+
break;
|
289
|
+
}
|
290
|
+
|
291
|
+
case "genfrac":
|
292
|
+
{
|
293
|
+
buildRegion(a11yStrings, regionStrings => {
|
294
|
+
// genfrac can have unbalanced delimiters
|
295
|
+
const leftDelim = tree.leftDelim,
|
296
|
+
rightDelim = tree.rightDelim; // NOTE: Not sure if this is a safe assumption
|
297
|
+
// hasBarLine true -> fraction, false -> binomial
|
298
|
+
|
299
|
+
if (tree.hasBarLine) {
|
300
|
+
regionStrings.push("start fraction");
|
301
|
+
leftDelim && buildString(leftDelim, "open", regionStrings);
|
302
|
+
buildA11yStrings(tree.numer, regionStrings, atomType);
|
303
|
+
regionStrings.push("divided by");
|
304
|
+
buildA11yStrings(tree.denom, regionStrings, atomType);
|
305
|
+
rightDelim && buildString(rightDelim, "close", regionStrings);
|
306
|
+
regionStrings.push("end fraction");
|
307
|
+
} else {
|
308
|
+
regionStrings.push("start binomial");
|
309
|
+
leftDelim && buildString(leftDelim, "open", regionStrings);
|
310
|
+
buildA11yStrings(tree.numer, regionStrings, atomType);
|
311
|
+
regionStrings.push("over");
|
312
|
+
buildA11yStrings(tree.denom, regionStrings, atomType);
|
313
|
+
rightDelim && buildString(rightDelim, "close", regionStrings);
|
314
|
+
regionStrings.push("end binomial");
|
315
|
+
}
|
316
|
+
});
|
317
|
+
break;
|
318
|
+
}
|
319
|
+
|
320
|
+
case "kern":
|
321
|
+
{
|
322
|
+
// No op: we don't attempt to present kerning information
|
323
|
+
// to the screen reader.
|
324
|
+
break;
|
325
|
+
}
|
326
|
+
|
327
|
+
case "leftright":
|
328
|
+
{
|
329
|
+
buildRegion(a11yStrings, regionStrings => {
|
330
|
+
buildString(tree.left, "open", regionStrings);
|
331
|
+
buildA11yStrings(tree.body, regionStrings, atomType);
|
332
|
+
buildString(tree.right, "close", regionStrings);
|
333
|
+
});
|
334
|
+
break;
|
335
|
+
}
|
336
|
+
|
337
|
+
case "leftright-right":
|
338
|
+
{
|
339
|
+
// TODO: double check that this is a no-op
|
340
|
+
break;
|
341
|
+
}
|
342
|
+
|
343
|
+
case "lap":
|
344
|
+
{
|
345
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
346
|
+
break;
|
347
|
+
}
|
348
|
+
|
349
|
+
case "mathord":
|
350
|
+
{
|
351
|
+
buildString(tree.text, "normal", a11yStrings);
|
352
|
+
break;
|
353
|
+
}
|
354
|
+
|
355
|
+
case "op":
|
356
|
+
{
|
357
|
+
const body = tree.body,
|
358
|
+
name = tree.name;
|
359
|
+
|
360
|
+
if (body) {
|
361
|
+
buildA11yStrings(body, a11yStrings, atomType);
|
362
|
+
} else if (name) {
|
363
|
+
buildString(name, "normal", a11yStrings);
|
364
|
+
}
|
365
|
+
|
366
|
+
break;
|
367
|
+
}
|
368
|
+
|
369
|
+
case "op-token":
|
370
|
+
{
|
371
|
+
// Used internally by operator symbols.
|
372
|
+
buildString(tree.text, atomType, a11yStrings);
|
373
|
+
break;
|
374
|
+
}
|
375
|
+
|
376
|
+
case "ordgroup":
|
377
|
+
{
|
378
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
379
|
+
break;
|
380
|
+
}
|
381
|
+
|
382
|
+
case "overline":
|
383
|
+
{
|
384
|
+
buildRegion(a11yStrings, function (a11yStrings) {
|
385
|
+
a11yStrings.push("start overline");
|
386
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
387
|
+
a11yStrings.push("end overline");
|
388
|
+
});
|
389
|
+
break;
|
390
|
+
}
|
391
|
+
|
392
|
+
case "phantom":
|
393
|
+
{
|
394
|
+
a11yStrings.push("empty space");
|
395
|
+
break;
|
396
|
+
}
|
397
|
+
|
398
|
+
case "raisebox":
|
399
|
+
{
|
400
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
401
|
+
break;
|
402
|
+
}
|
403
|
+
|
404
|
+
case "rule":
|
405
|
+
{
|
406
|
+
a11yStrings.push("rectangle");
|
407
|
+
break;
|
408
|
+
}
|
409
|
+
|
410
|
+
case "sizing":
|
411
|
+
{
|
412
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
413
|
+
break;
|
414
|
+
}
|
415
|
+
|
416
|
+
case "spacing":
|
417
|
+
{
|
418
|
+
a11yStrings.push("space");
|
419
|
+
break;
|
420
|
+
}
|
421
|
+
|
422
|
+
case "styling":
|
423
|
+
{
|
424
|
+
// We ignore the styling and just pass through the contents
|
425
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
426
|
+
break;
|
427
|
+
}
|
428
|
+
|
429
|
+
case "sqrt":
|
430
|
+
{
|
431
|
+
buildRegion(a11yStrings, regionStrings => {
|
432
|
+
const body = tree.body,
|
433
|
+
index = tree.index;
|
434
|
+
|
435
|
+
if (index) {
|
436
|
+
const indexString = flatten(buildA11yStrings(index, [], atomType)).join(",");
|
437
|
+
|
438
|
+
if (indexString === "3") {
|
439
|
+
regionStrings.push("cube root of");
|
440
|
+
buildA11yStrings(body, regionStrings, atomType);
|
441
|
+
regionStrings.push("end cube root");
|
442
|
+
return;
|
443
|
+
}
|
444
|
+
|
445
|
+
regionStrings.push("root");
|
446
|
+
regionStrings.push("start index");
|
447
|
+
buildA11yStrings(index, regionStrings, atomType);
|
448
|
+
regionStrings.push("end index");
|
449
|
+
return;
|
450
|
+
}
|
451
|
+
|
452
|
+
regionStrings.push("square root of");
|
453
|
+
buildA11yStrings(body, regionStrings, atomType);
|
454
|
+
regionStrings.push("end square root");
|
455
|
+
});
|
456
|
+
break;
|
457
|
+
}
|
458
|
+
|
459
|
+
case "supsub":
|
460
|
+
{
|
461
|
+
const base = tree.base,
|
462
|
+
sub = tree.sub,
|
463
|
+
sup = tree.sup;
|
464
|
+
let isLog = false;
|
465
|
+
|
466
|
+
if (base) {
|
467
|
+
buildA11yStrings(base, a11yStrings, atomType);
|
468
|
+
isLog = base.type === "op" && base.name === "\\log";
|
469
|
+
}
|
470
|
+
|
471
|
+
if (sub) {
|
472
|
+
const regionName = isLog ? "base" : "subscript";
|
473
|
+
buildRegion(a11yStrings, function (regionStrings) {
|
474
|
+
regionStrings.push(`start ${regionName}`);
|
475
|
+
buildA11yStrings(sub, regionStrings, atomType);
|
476
|
+
regionStrings.push(`end ${regionName}`);
|
477
|
+
});
|
478
|
+
}
|
479
|
+
|
480
|
+
if (sup) {
|
481
|
+
buildRegion(a11yStrings, function (regionStrings) {
|
482
|
+
const supString = flatten(buildA11yStrings(sup, [], atomType)).join(",");
|
483
|
+
|
484
|
+
if (supString in powerMap) {
|
485
|
+
regionStrings.push(powerMap[supString]);
|
486
|
+
return;
|
487
|
+
}
|
488
|
+
|
489
|
+
regionStrings.push("start superscript");
|
490
|
+
buildA11yStrings(sup, regionStrings, atomType);
|
491
|
+
regionStrings.push("end superscript");
|
492
|
+
});
|
493
|
+
}
|
494
|
+
|
495
|
+
break;
|
496
|
+
}
|
497
|
+
|
498
|
+
case "text":
|
499
|
+
{
|
500
|
+
// TODO: handle other fonts
|
501
|
+
if (tree.font === "\\textbf") {
|
502
|
+
buildRegion(a11yStrings, function (regionStrings) {
|
503
|
+
regionStrings.push("start bold text");
|
504
|
+
buildA11yStrings(tree.body, regionStrings, atomType);
|
505
|
+
regionStrings.push("end bold text");
|
506
|
+
});
|
507
|
+
break;
|
508
|
+
}
|
509
|
+
|
510
|
+
buildRegion(a11yStrings, function (regionStrings) {
|
511
|
+
regionStrings.push("start text");
|
512
|
+
buildA11yStrings(tree.body, regionStrings, atomType);
|
513
|
+
regionStrings.push("end text");
|
514
|
+
});
|
515
|
+
break;
|
516
|
+
}
|
517
|
+
|
518
|
+
case "textord":
|
519
|
+
{
|
520
|
+
buildString(tree.text, atomType, a11yStrings);
|
521
|
+
break;
|
522
|
+
}
|
523
|
+
|
524
|
+
case "smash":
|
525
|
+
{
|
526
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
527
|
+
break;
|
528
|
+
}
|
529
|
+
|
530
|
+
case "enclose":
|
531
|
+
{
|
532
|
+
// TODO: create a map for these.
|
533
|
+
// TODO: differentiate between a body with a single atom, e.g.
|
534
|
+
// "cancel a" instead of "start cancel, a, end cancel"
|
535
|
+
if (/cancel/.test(tree.label)) {
|
536
|
+
buildRegion(a11yStrings, function (regionStrings) {
|
537
|
+
regionStrings.push("start cancel");
|
538
|
+
buildA11yStrings(tree.body, regionStrings, atomType);
|
539
|
+
regionStrings.push("end cancel");
|
540
|
+
});
|
541
|
+
break;
|
542
|
+
} else if (/box/.test(tree.label)) {
|
543
|
+
buildRegion(a11yStrings, function (regionStrings) {
|
544
|
+
regionStrings.push("start box");
|
545
|
+
buildA11yStrings(tree.body, regionStrings, atomType);
|
546
|
+
regionStrings.push("end box");
|
547
|
+
});
|
548
|
+
break;
|
549
|
+
} else if (/sout/.test(tree.label)) {
|
550
|
+
buildRegion(a11yStrings, function (regionStrings) {
|
551
|
+
regionStrings.push("start strikeout");
|
552
|
+
buildA11yStrings(tree.body, regionStrings, atomType);
|
553
|
+
regionStrings.push("end strikeout");
|
554
|
+
});
|
555
|
+
break;
|
556
|
+
}
|
557
|
+
|
558
|
+
throw new Error(`KaTeX-a11y: enclose node with ${tree.label} not supported yet`);
|
559
|
+
}
|
560
|
+
|
561
|
+
case "vphantom":
|
562
|
+
{
|
563
|
+
throw new Error("KaTeX-a11y: vphantom not implemented yet");
|
564
|
+
}
|
565
|
+
|
566
|
+
case "hphantom":
|
567
|
+
{
|
568
|
+
throw new Error("KaTeX-a11y: hphantom not implemented yet");
|
569
|
+
}
|
570
|
+
|
571
|
+
case "operatorname":
|
572
|
+
{
|
573
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
574
|
+
break;
|
575
|
+
}
|
576
|
+
|
577
|
+
case "array":
|
578
|
+
{
|
579
|
+
throw new Error("KaTeX-a11y: array not implemented yet");
|
580
|
+
}
|
581
|
+
|
582
|
+
case "raw":
|
583
|
+
{
|
584
|
+
throw new Error("KaTeX-a11y: raw not implemented yet");
|
585
|
+
}
|
586
|
+
|
587
|
+
case "size":
|
588
|
+
{
|
589
|
+
// Although there are nodes of type "size" in the parse tree, they have
|
590
|
+
// no semantic meaning and should be ignored.
|
591
|
+
break;
|
592
|
+
}
|
593
|
+
|
594
|
+
case "url":
|
595
|
+
{
|
596
|
+
throw new Error("KaTeX-a11y: url not implemented yet");
|
597
|
+
}
|
598
|
+
|
599
|
+
case "tag":
|
600
|
+
{
|
601
|
+
throw new Error("KaTeX-a11y: tag not implemented yet");
|
602
|
+
}
|
603
|
+
|
604
|
+
case "verb":
|
605
|
+
{
|
606
|
+
buildString(`start verbatim`, "normal", a11yStrings);
|
607
|
+
buildString(tree.body, "normal", a11yStrings);
|
608
|
+
buildString(`end verbatim`, "normal", a11yStrings);
|
609
|
+
break;
|
610
|
+
}
|
611
|
+
|
612
|
+
case "environment":
|
613
|
+
{
|
614
|
+
throw new Error("KaTeX-a11y: environment not implemented yet");
|
615
|
+
}
|
616
|
+
|
617
|
+
case "horizBrace":
|
618
|
+
{
|
619
|
+
buildString(`start ${tree.label.slice(1)}`, "normal", a11yStrings);
|
620
|
+
buildA11yStrings(tree.base, a11yStrings, atomType);
|
621
|
+
buildString(`end ${tree.label.slice(1)}`, "normal", a11yStrings);
|
622
|
+
break;
|
623
|
+
}
|
624
|
+
|
625
|
+
case "infix":
|
626
|
+
{
|
627
|
+
// All infix nodes are replace with other nodes.
|
628
|
+
break;
|
629
|
+
}
|
630
|
+
|
631
|
+
case "includegraphics":
|
632
|
+
{
|
633
|
+
throw new Error("KaTeX-a11y: includegraphics not implemented yet");
|
634
|
+
}
|
635
|
+
|
636
|
+
case "font":
|
637
|
+
{
|
638
|
+
// TODO: callout the start/end of specific fonts
|
639
|
+
// TODO: map \BBb{N} to "the naturals" or something like that
|
640
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
641
|
+
break;
|
642
|
+
}
|
643
|
+
|
644
|
+
case "href":
|
645
|
+
{
|
646
|
+
throw new Error("KaTeX-a11y: href not implemented yet");
|
647
|
+
}
|
648
|
+
|
649
|
+
case "cr":
|
650
|
+
{
|
651
|
+
// This is used by environments.
|
652
|
+
throw new Error("KaTeX-a11y: cr not implemented yet");
|
653
|
+
}
|
654
|
+
|
655
|
+
case "underline":
|
656
|
+
{
|
657
|
+
buildRegion(a11yStrings, function (a11yStrings) {
|
658
|
+
a11yStrings.push("start underline");
|
659
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
660
|
+
a11yStrings.push("end underline");
|
661
|
+
});
|
662
|
+
break;
|
663
|
+
}
|
664
|
+
|
665
|
+
case "xArrow":
|
666
|
+
{
|
667
|
+
throw new Error("KaTeX-a11y: xArrow not implemented yet");
|
668
|
+
}
|
669
|
+
|
670
|
+
case "mclass":
|
671
|
+
{
|
672
|
+
// \neq and \ne are macros so we let "htmlmathml" render the mathmal
|
673
|
+
// side of things and extract the text from that.
|
674
|
+
const atomType = tree.mclass.slice(1); // $FlowFixMe: drop the leading "m" from the values in mclass
|
675
|
+
|
676
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
677
|
+
break;
|
678
|
+
}
|
679
|
+
|
680
|
+
case "mathchoice":
|
681
|
+
{
|
682
|
+
// TODO: track which which style we're using, e.g. dispaly, text, etc.
|
683
|
+
// default to text style if even that may not be the correct style
|
684
|
+
buildA11yStrings(tree.text, a11yStrings, atomType);
|
685
|
+
break;
|
686
|
+
}
|
687
|
+
|
688
|
+
case "htmlmathml":
|
689
|
+
{
|
690
|
+
buildA11yStrings(tree.mathml, a11yStrings, atomType);
|
691
|
+
break;
|
692
|
+
}
|
693
|
+
|
694
|
+
case "middle":
|
695
|
+
{
|
696
|
+
buildString(tree.delim, atomType, a11yStrings);
|
697
|
+
break;
|
698
|
+
}
|
699
|
+
|
700
|
+
case "internal":
|
701
|
+
{
|
702
|
+
// internal nodes are never included in the parse tree
|
703
|
+
break;
|
704
|
+
}
|
705
|
+
|
706
|
+
case "html":
|
707
|
+
{
|
708
|
+
buildA11yStrings(tree.body, a11yStrings, atomType);
|
709
|
+
break;
|
710
|
+
}
|
711
|
+
|
712
|
+
default:
|
713
|
+
tree.type;
|
714
|
+
throw new Error("KaTeX a11y un-recognized type: " + tree.type);
|
715
|
+
}
|
716
|
+
};
|
717
|
+
|
718
|
+
const buildA11yStrings = function buildA11yStrings(tree, a11yStrings, atomType) {
|
719
|
+
if (a11yStrings === void 0) {
|
720
|
+
a11yStrings = [];
|
721
|
+
}
|
722
|
+
|
723
|
+
if (tree instanceof Array) {
|
724
|
+
for (let i = 0; i < tree.length; i++) {
|
725
|
+
buildA11yStrings(tree[i], a11yStrings, atomType);
|
726
|
+
}
|
727
|
+
} else {
|
728
|
+
handleObject(tree, a11yStrings, atomType);
|
729
|
+
}
|
730
|
+
|
731
|
+
return a11yStrings;
|
732
|
+
};
|
733
|
+
|
734
|
+
const flatten = function flatten(array) {
|
735
|
+
let result = [];
|
736
|
+
array.forEach(function (item) {
|
737
|
+
if (item instanceof Array) {
|
738
|
+
result = result.concat(flatten(item));
|
739
|
+
} else {
|
740
|
+
result.push(item);
|
741
|
+
}
|
742
|
+
});
|
743
|
+
return result;
|
744
|
+
};
|
745
|
+
|
746
|
+
const renderA11yString = function renderA11yString(text, settings) {
|
747
|
+
const tree = katex.__parse(text, settings);
|
748
|
+
|
749
|
+
const a11yStrings = buildA11yStrings(tree, [], "normal");
|
750
|
+
return flatten(a11yStrings).join(", ");
|
751
|
+
};
|
752
|
+
|
753
|
+
export default renderA11yString;
|